Learn R Programming

OTUbase (version 1.22.0)

sampleData: sampleData

Description

These functions access and replace the sampleData slot of OTUbase objects. sampleData and sampleData<- access and replace the AnnotatedDataFrame sampleData. sampleLabels and sampleLabels<- access and replace the labels of this AnnotatedDataFrame. sData and sData<- access and replace the dataframe component of the AnnotatedDataFrame.

Usage

sData(object,...) sData(object)<-value sampleData(object,...) sampleData(object)<-value sampleLabels(object,...) sampleLabels(object)<-value

Arguments

object
An OTUset or a TAXset object
value
The replacement value for sampleData or sampleLabels
...
Added for completeness. Enables the passing of arguments.

Value

sData returns a dataframe. sampleData returns an AnnotatedDataFrame. sampleLabels returns a character. assignmentNames returns a character.

Examples

Run this code

## locate directory with data
dirPath <- system.file("extdata/Sogin_2006", package="OTUbase")

## read in data into OTUset object
soginOTU <- readOTUset(dirPath=dirPath, level="0.03", samplefile="sogin.groups", fastafile="sogin.fasta", otufile="sogin.unique.filter.fn.list", sampleADF="sample_metadata.txt")

## get the sData dataframe
sData(soginOTU)

## get the sampleData slot
sampleData(soginOTU)

Run the code above in your browser using DataLab