View source: R/frag.get.layers.pair.R
frag.get.layers.pair | R Documentation |
Extracts the subraph corresponding to a pair of stratigraphic layers (or any other type of archaeological spatial unit).
frag.get.layers.pair(graph, layer.attr, sel.layers, size.mini=2, mixed.components.only=FALSE)
graph |
An |
layer.attr |
Character. The name of the vertices attribute giving the layer of each fragment. |
sel.layers |
A numeric vector of length 2 with the name of the stratigraphic layer selected for extraction. |
size.mini |
A minimal number of vertices for the components to include in the resulting graph. |
mixed.components.only |
Logical. If TRUE, only the components with fragments from the two selected layers are returned. If FALSE, all the components of the two layers are extracted. |
The default setting of the mixed.components.only
argument is FALSE, for convenience for other measurements.
An undirected graph object.
Sebastien Plutniak <sebastien.plutniak at posteo.net>
g <- frag.simul.process(n.components=20, vertices=50, disturbance=.15) igraph::V(g)$layers <- c(rep("layer1", 20), rep("layer2", 20), rep("layer3", 10)) frag.get.layers.pair(g, "layers", sel.layers=c("layer2","layer3"), size.mini=2, mixed.components.only=FALSE) frag.get.layers.pair(g, "layers", sel.layers=c("layer2","layer3"), size.mini=2, mixed.components.only=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.