baseline: Pick Baseline Timepoint Samples

Description Usage Arguments Details Value Author(s) References Examples

View source: R/baseline.R

Description

Identify and select the baseline timepoint samples in a phyloseq object.

Usage

1

Arguments

x

phyloseq object. Assuming that the sample_data(x) has the fields 'time', 'sample' and 'subject'

na.omit

Logical. Ignore samples with no time point information. If this is FALSE, the first sample for each subject is selected even when there is no time information.

Details

Arranges the samples by time and picks the first sample for each subject. Compared to simple subsetting at time point zero, this checks NAs and possibility for multiple samples at the baseline, and guarantees that a single sample per subject is selected.

Value

Phyloseq object with only baseline time point samples selected.

Author(s)

Contact: Leo Lahti microbiome-admin@googlegroups.com

References

See citation('microbiome')

Examples

1
2
data(peerj32)
a <- baseline(peerj32$phyloseq)

microbiome documentation built on Nov. 8, 2020, 5:08 p.m.