Simulate incomplete specimens

Share:

Description

Randomly selects a pre-determined number of specimens from a landmark dataset (2D or 3D) and removes some of their landmarks.

Usage

1
missing.specimens(dataset, nspremove, nldremove, nlandmarks)

Arguments

dataset

A n*l X 2 (or 3) matrix of coordinate data, where n is the number of specimens and l is the number of landmarks. All landmarks from one specimen should be grouped together.

nspremove

The number of specimens which should have landmarks removed.

nldremove

The number of landmarks to remove per specimen. This may be a single value or a vector of values, none of which can be >nlandmarks. If a vector is given, for each specimen selected, the function will randomly select a value from the vector and remove that many landmarks.

nlandmarks

The number of landmarks per specimen

Value

Returns an n * l X 2 (or 3) matrix with some complete and some incomplete specimens.

Author(s)

J. Arbour

References

Arbour, J. and Brown, C. 2014. Incomplete specimens in Geometric Morphometric Analyses. Methods in Ecology and Evolution 5(1):16-26.

See Also

align.missing, {codeMissingGeoMorph

Examples

1
2
3
4
5
data(dacrya)

#### remove 1 to 6 landmarks from 10 specimens
dac.miss<-missing.specimens(dacrya,10,c(1,2,3,4,5,6),16)
dac.miss