Learn R Programming

phytools (version 0.7-20)

sampleFrom: Sample from a set of distributions

Description

Function samples from a set of normal distributions with parameters given in xbar and xvar.

Usage

sampleFrom(xbar=0, xvar=1, n=1, randn=NULL, type="norm")

Arguments

xbar

a named vector of means.

xvar

a named vector of variances.

n

a vector containing the sample sizes of each species.

randn

a range of sample sizes are to be random.

type

"norm" is the only distribution implemented so far.

Value

A vector, with labels.

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.