Learn R Programming

archeofrag (version 1.2.0)

frag.observer.failure: Simulate the failure of an observer to determine the relationships between fragments.

Description

Simulate the failure of an observer to determine the relationships between fragments.

Usage

frag.observer.failure(graph, likelihood, remove.vertices=FALSE)

Value

A list of fragmentation graphs (igraph objects).

Arguments

graph

An undirected igraph object.

likelihood

Numerical vector of values in [0,1] giving the likelihood of not observing a relationship between two fragments.

remove.vertices

Logical. If TRUE, unconnected vertices are removed.

Author

Sebastien Plutniak <sebastien.plutniak at posteo.net>

Details

In determining connection relationships between archaeological fragments, archaeologists often consider the likelihood that they fail in identifying some of these relationships. Given an initial fragmentation graph, this function aims to simulate the effects of such different likelihood values.

For each value in the likelihood parameter, a new graph is generated by randomly removing the given proportion of edges from the input graph. When generating series of comparable graphs with different likelihoods, the function internally resets the seed for random number generation, to ensure that edges are removed in the same order.

An error message is displayed if at least one of the likelihood values is < 0 or > 1.

See Also

Examples

Run this code
g <- frag.simul.process(n.components=20, vertices=50, disturbance=.15)
frag.observer.failure(graph=g, likelihood=c(0.05, 0.1), remove.vertices=FALSE)

Run the code above in your browser using DataLab