frag.get.parameters {archeofrag} | R Documentation |
Returns a series of descriptive statistics for a fragmentation graph
Description
Returns a series of descriptive statistics for a fragmentation graph.
Usage
frag.get.parameters(graph, layer.attr, verbose=TRUE)
Arguments
graph |
An |
layer.attr |
Character. The name of the vertices attribute giving the spatial unit of each fragment (e.g. layer). |
verbose |
Logical. Whether to print or not warning messages. |
Details
This function is a convenient function to get general information about a fragmentation graph. It is particularly useful for setting the parameters of the frag.simul.process
function.
It returns:
number of components
number of fragments
number of edges
balance: proportion of fragments in the first spatial unit (see details)
components balance: proportion of components in the first spatial unit (see details)
disturbance: an estimation of disturbance (see details)
aggregation factor: diversity of the components' edge count (see details)
planar: whether the graph is planar or not
The balance and components balance are calculated from the subgraph including only fragments connected to fragments from the same spatial unit. This is to approximate these proportions of deposited materials regardless the effects of posterior disturbances. Results are given about the spatial unit whose label comes first alphanumerically (because this function is used internally by the frag.simul.process
function).
The disturbance is estimated using the subgraph including only components with fragments from the two spatial units: this value is computed as the number of fragments belonging to the less represented spatial unit in each component over the total number of fragments in the considered subgraph.
The aggregation factor reflects the diversity of the components' edge count. The factor is calculated by:
1 - 1/(1 + sd(components\ edge\ count))
.
The optional RBGL package is required to determine the planarity of the graph. If it is not installed, the planar
argument is set to FALSE by default.
Value
A list of parameters values (n.components, vertices, edges, balance, components.balance, disturbance, aggreg.factor, planar).
Author(s)
Sebastien Plutniak <sebastien.plutniak at posteo.net>
See Also
frag.get.layers.pair,
frag.simul.process,
sd,
boyerMyrvoldPlanarityTest
Examples
g <- frag.simul.process(n.components=20, vertices=50, disturbance=0.1)
frag.get.parameters(g, "layer")