Tables of a simplicial complex
Arguments
- x
A
simplicial_complexobject fromsimplicial().- what
"simplices"(default) for one row per simplex,"f_vector"for the face counts by dimension,"betti"for the Betti numbers by dimension,"degree"for the simplicial degree of every node (the table ofhg_degree()), or"validation"for the tests of a window complex built withvalidate = TRUE.- ...
Additional arguments (ignored).
- dimension
Integer or
NULL. Forwhat = "simplices": keep only simplices of this dimension (0vertices,1edges,2triangles). Forwhat = "validation": keep only the sets ofdimension + 1actions.- normalized
Logical. Only for
what = "degree": divide each count by its largest possible value. DefaultFALSE.- top
Integer or
NULL. Return only the firsttoprows, applied after any filter and aftersort_by, sosort_byandtopcompose. DefaultNULLreturns every row.
Value
A data.frame. For what = "simplices", one row per simplex:
simplex (its number), dimension, size, members (the node names,
comma separated). For what = "f_vector", one row per dimension:
dimension, count. For what = "betti", one row per dimension:
dimension, betti (the number of connected parts, loops, voids, ...).
For what = "degree", one row per node, most
connected first: node, d0, d1, ... and total. For
what = "validation", one row per tested set of actions, by size, then
p-value, then z: members (the actions, comma separated), size,
count (windows with exactly these actions), n_windows (windows with
this many distinct actions), expected (the mean count under the null
model), z (the count minus expected, in null standard deviations),
p_value, p_adj (Benjamini-Hochberg over n_tests possible sets),
n_tests, significant.
Examples
adj <- matrix(c(0, 1, 1, 0,
1, 0, 1, 1,
1, 1, 0, 1,
0, 1, 1, 0), 4, 4, dimnames = list(letters[1:4], letters[1:4]))
sc <- simplicial(adj, type = "clique")
hg_get(sc)
#> simplex dimension size members
#> 1 1 0 1 c
#> 2 2 0 1 b
#> 3 3 1 2 b, c
#> 4 4 0 1 d
#> 5 5 1 2 b, d
#> 6 6 2 3 b, c, d
#> 7 7 1 2 c, d
#> 8 8 0 1 a
#> 9 9 1 2 a, b
#> 10 10 2 3 a, b, c
#> 11 11 1 2 a, c
hg_get(sc, what = "f_vector")
#> dimension count
#> 1 0 4
#> 2 1 5
#> 3 2 2