Learn R Programming

hzar (version 0.2-5)

hzar.doMorphoSets: Make hzar.obsData objects from scalar observations using reference tables

Description

Perform a Bernoulli transform on a table of scalar traits of sampled individuals while using a separate table of localities.

Usage

hzar.doMorphoSets(traitNames, tDist, tDLocCol, tDDistCol, tValues, tVLocCol)

Arguments

traitNames
The columns of tValues to transform.
tDist
A data.frame with a column of locality identifiers and a column of locality distances. See manakinLocations for an example.
tDLocCol
The name of the column of tDist with locality identifiers.
tDDistCol
The name of the column of tDist with locality distances.
tValues
A data.frame of observed scalar traits of individuals. See manakinMorphological for an example.
tVLocCol
The name of the column of tValues with locality identifiers where the sample was taken.

Value

A list of hzar.obsData objects. The values of traitNames are used as names. The Bernoulli likelihood function is for each hzar.obsData object.

See Also

manakinLocations manakinMorphological hzar.plot.obsData

Examples

Run this code
data(manakinMorphological);
data(manakinLocations);
mkn <-
  hzar.doMorphoSets("beard.length",
                    tDist=manakinLocations,
                    tDLocCol="LocalityID",
                    tDDistCol="distance",
                    tValues=manakinMorphological,
                    tVLocCol="Locality")
print(str(mkn));
hzar.plot.obsData(mkn$beard.length);

Run the code above in your browser using DataLab