Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_variable

Get the values for a particular variable in sample_data


Description

This is a simple accessor function for streamlining access to values/vectors/factors/etc contained in the sample_data.

Usage

get_variable(physeq, varName)

Arguments

physeq

(Required). sample_data-class, or phyloseq-class.

varName

(Required). Character string of the variable name in sample_data. Use sample_variables(physeq) for available variables in your object.

Value

Data. The clas of the data depends on what the contents of sample_data.

See Also

Examples

# Load the GlobalPatterns dataset into the workspace environment
data(GlobalPatterns)
# Look at the different values for SampleType 
get_variable(GlobalPatterns, "SampleType")

phyloseq

Handling and analysis of high-throughput microbiome census data

v1.34.0
AGPL-3
Authors
Paul J. McMurdie <joey711@gmail.com>, Susan Holmes <susan@stat.stanford.edu>, with contributions from Gregory Jordan and Scott Chamberlain
Initial release
2019-04-23

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.