View source: R/phy_add_metadata_variables.R
phy_add_metadata_variables | R Documentation |
Adds a set of metadata variables to the metadata of a phyloseq object. Make sure 'rownames' contain the same names. Row ordering is taken care of internally
phy_add_metadata_variables(physeq, df, by, verbose = FALSE)
physeq |
A 'phyloseq' object |
df |
A 'data.frame' object, with rownames matching 'sample_names' of the 'phyloseq' object |
by |
A 'character' containing the variable to merge the two 'sample_data' by. |
verbose |
Should the function tell you the missing samples? |
data(GlobalPatterns) df_test <- data.frame(variable_new = rnorm(n = nsamples(GlobalPatterns), mean = 2, sd = 0.8)) rownames(df) <- samples_names(GlobalPatterns) phy_add_metadata_variables(physeq=GlobalPatterns, df = df_test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.