subsetEventData: Subset a 'bammdata' object

Description Usage Arguments Details Author(s) See Also Examples

View source: R/subsetEventData.R

Description

Subsets a bammdata object. Returns a bammdata object after extracting a specified set of samples from the posterior.

Usage

1
subsetEventData(ephy, index)

Arguments

ephy

An object of class bammdata.

index

A vector of integers corresponding to samples to be extracted from the posterior distribution of shift configurations included in the bammdata object.

Details

This will result in an error if you attempt to access samples that do not exist in the ephy data object. For example, if your bammdata object includes 100 samples from a posterior distribution sampled with BAMM, you can only attempt to subset with index values 1:100.

Author(s)

Dan Rabosky

See Also

plot.bammdata, getCohortMatrix, image

Examples

1
2
3
4
5
data(whales, events.whales)
ed <- getEventData(whales, events.whales, nsamples=500)
ed2 <- subsetEventData(ed, index=1)
plot(ed2) 
addBAMMshifts(ed2, cex=2)

BAMMtools documentation built on May 29, 2017, 5:47 p.m.