baseline {microbiome} | R Documentation

## Pick Baseline Timepoint Samples

### Description

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

### Usage

    baseline(x, na.omit = TRUE)

### 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

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

[Package microbiome version 1.8.0 Index]