Learn R Programming

archeofrag (version 1.2.0)

frag.diameters: Diameter distribution for unconnected graphs

Description

Returns the distribution of the diameter values of a fragmentation graph.

Usage

frag.diameters(graph, cumulative = FALSE)

Value

A numeric vector of the length equal to the maximum diameter value found. The first element is the frequency of the diameter values = 1, the second element is the frequency of diameter values = 2, etc. If cumulative is True, the cumulative density is returned.

Arguments

graph

An igraph object.

cumulative

Logical. If TRUE the cumulative relative frequency of the diameters is reported.

Author

Sebastien Plutniak <sebastien.plutniak at posteo.net>

Details

frag.diameters wraps the igraph diameter function. For graphs representing the fragmentation of archeological objects, the diameter of each component of the graph (i.e. archeological objects) can be interpreted: as a measure of the intensity of fragmentation (when all the fragments of the initial object are known); as a measure of the scattering of the fragments (when not all the fragments are known);

See Also

Examples

Run this code
g <- frag.simul.process(n.components=20, vertices=50, disturbance=.15)
frag.diameters(g)
frag.diameters(g, cumulative=TRUE)

Run the code above in your browser using DataLab