sim.coord: Simulate coordinate data.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/sim.coord.R

Description

Generates 2-D and 3-D data based on a simple variance-covariance matrix.

Usage

1
sim.coord(n.obj, n.landmark, var=1, cov=0.5, dim)

Arguments

n.obj

Number of specimens.

n.landmark

Number of landmarks.

var

Single variance applied to each landmark (default=1.0).

cov

Single covariance applied to each pair of landmarks (default=0.5).

dim

Number of spatial dimensions (e.g., 2 for 2-D data, 3 for 3-D data)

Details

The function simulates 2-D or 3-D coordinate data by sampling values based on a variance-covariance matrix. The user can specify the variance and covariance values that will be applied to all landmarks and pairwise landmarks, respectively.

Value

The function returns a matrix of simulated coordinate values where rows and columns represent specimens and shape variables, respectively.

Author(s)

Akinobu Watanabe

References

Watanabe, A. 2018. How many landmarks are enough to characterize shape and size variation? PLoS ONE 13(6): e0198341. https://doi.org/10.1371/journal.pone.0198341

Examples

1
2
sim.3d.data <- sim.coord(n.obj=10, n.landmark=20, var=1, cov=0.5, dim=3)
sim.3d.data

akiopteryx/lambda documentation built on Dec. 26, 2020, 7:36 p.m.