Description Usage Arguments Value Examples
These functions create 'sc' objects from various input sources.
1 2 3 4 5 | sc_from_data_frame(d, vertices = NULL, reduce = FALSE)
sc_from_list(l, vertices = NULL, reduce = FALSE)
sc_reduce(sc)
|
d |
A data frame of vertex-face membership with columns |
vertices |
A character or integer vector of vertex IDs, possibly
including more than those included in |
reduce |
Whether to iteratively remove simplices that are faces of other simplices. |
l |
A list of simplices consisting of integer member vertex IDs. |
sc |
A simplicial complex (an igraph::igraph object prefixed with class 'sc'). |
A simplicial complex encoded as an igraph::igraph object prefixed with class 'sc'.
1 2 3 4 5 6 7 8 | # a face list with some redundancies
x <- list(a = 1:4, b = 3:5, c = c(3,6), d = 7, e = c(3,6), f = c(3:5, 7))
# creating a simplicial complex removes duplicates
(sc <- sc_from_list(x))
plot(sc)
# further reduction can be done by testing for subset relations among the faces
(rsc <- sc_reduce(sc))
plot(rsc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.