Learn R Programming

phyloseq (version 1.16.2)

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

get_taxa taxa_names sample_names

sample_variables

Examples

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

Run the code above in your browser using DataLab