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 igraph undirected graph.

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:

The (fragments) balance and components balance are calculated from the subgraph including only the 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.

When studying a pair of spatial units, disturbance is defined as the proportion of fragments which moved from their initial spatial unit to the other spatial unit. This definition is used in the frag.process.simul function to generate random fragmentation graphs. However, frag.get.parameters uses a different definition since its aim is different: considering a fragmentation graph representing the result of unknown post-depositional processes, frag.get.parameters returns an estimation of the disturbance which might happened. This estimation is computed from a subgraph including only the components with fragments from the two spatial units: disturbance is get from the number of fragments belonging to the less represented spatial unit in this subgraph over the total number of fragments in the 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, edge.weights.sum, edge.weights.median, edge.weights.median.abs.dev.).

Author(s)

Sebastien Plutniak <sebastien.plutniak at posteo.net>

See Also

frag.get.layers.pair, frag.simul.process, sd, median, mad, boyerMyrvoldPlanarityTest

Examples

g <- frag.simul.process(n.components=20, vertices=50, disturbance=0.1)
frag.get.parameters(g, "layer")

[Package archeofrag version 1.2.0 Index]