Package 'oaqc'

Title: Computation of the Orbit-Aware Quad Census
Description: Implements the efficient algorithm by Ortmann and Brandes (2017) <doi:10.1007/s41109-017-0027-2> to compute the orbit-aware frequency distribution of induced and non-induced quads, i.e. subgraphs of size four. Given an edge matrix, data frame, or a graph object (e.g., 'igraph'), the orbit-aware counts are computed respective each of the edges and nodes.
Authors: Mark Ortmann [aut], Felix Schoenenberger [aut], David Schoch [aut, cre]
Maintainer: David Schoch <[email protected]>
License: GPL (>= 3)
Version: 2.0.0
Built: 2024-11-03 06:06:57 UTC
Source: https://github.com/schochastics/oaqc

Help Index


Annotates the igraph object with orbit labels.

Description

Annotates the igraph object with orbit labels.

Usage

annotate_result(graph, orbits, non_ind_freq)

Arguments

graph

Unmodified input graph.

orbits

List with n_orbits, e_orbits matrices.

non_ind_freq

A flag indicating whether non-induced frequencies have to be written or not.

Value

orbits if the input is not an igraph, the annotated igraph instead.


Coerce graph input.

Description

Coerce graph input.

Usage

as.edge_list(graph)

Arguments

graph

A matrix, data.frame or graph object.

Value

Edge list matrix.


Orbit-aware Quad Census computation

Description

Implements the efficient algorithm by Ortmann and Brandes (2017) doi:10.1007/s41109-017-0027-2 to compute the orbit-aware frequency distribution of induced and non-induced quads, i.e. subgraphs of size four. Given an edge matrix, data frame, or a graph object (e.g., 'igraph'), the orbit-aware counts are computed respective each of the edges and nodes.

Usage

oaqc(graph, non_ind_freq = F, file = "")

Arguments

graph

A matrix, data.frame or graph object.

non_ind_freq

A flag indicating whether non-induced frequencies have to be returned or not.

file

Name (and location) of the file to be written.

Value

orbit-aware quad census on a node and edge level. Consult vignette('oaqc') to see the correspondence between orbit and quad.

Author(s)

Maintainer: David Schoch [email protected] (ORCID)

Authors:

  • Mark Ortmann

  • Felix Schoenenberger

Examples

k4 <- data.frame(
    source = c(0, 0, 0, 1, 1, 2),
    target = c(1, 2, 3, 2, 3, 3)
)

k4orbits <- oaqc(k4, non_ind_freq = TRUE)
print(k4orbits)