frag.get.layers {archeofrag} | R Documentation |
Extracts the subgraph of each selected stratigraphic layer.
Description
Extracts the subgraph of each selected stratigraphic layer (or any other type of archaeological spatial unit).
Usage
frag.get.layers(graph, layer.attr, sel.layers)
Arguments
graph |
An undirected |
layer.attr |
Character. The name of the vertices attribute giving the layer of each fragment. |
sel.layers |
Character. The identifier(s) of the stratigraphic layers to retrieve. |
Details
This function is only a convenient function to extract the subgraphs of selected stratigraphic layers (or any other type of archaeological spatial unit).
A graph is created for each layer in the vertex attribute given by the layer.attr
argument.
Value
A list with a graph for each selected stratigraphic layer.
Author(s)
Sebastien Plutniak <sebastien.plutniak at posteo.net>
Examples
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(g, layer.attr="layers", sel.layers=c("layer1", "layer2"))
[Package archeofrag version 0.8.2 Index]