sampleFrom: Sample from a set of distributions

View source: R/utilities.R

sampleFromR Documentation

Sample from a set of distributions

Description

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.

Author(s)

Liam Revell liam.revell@umb.edu

References

Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.


liamrevell/phytools documentation built on April 8, 2024, 9:59 p.m.