View source: R/renameSampleVariables.R
renameSampleVariables | R Documentation |
Rename Sample Variables in Phyloseq Sample Data
renameSampleVariables(x, with = FALSE, ...)
x |
|
with |
Default is FALSE. Set this to TRUE when using a function. See
|
... |
Option to pass on to |
In some cases user may want to rename one or several sample variables.
With phyloseq
, this needs to be done one by one. To ease this step,
we make use of the rename
and
rename_with
. The later allows to use
functions such as those that work with string matching.
Phyloseq with modified sample_data
Sudarshan A. Shetty
Shetty SA (2020). Utilities for microbiome analytics. https://github.com/RIVM-IIV-Microbiome/biomeUtils
library(biomeUtils)
library(dplyr)
data(FuentesIliGutData)
FuentesIliGutData <- renameSampleVariables(FuentesIliGutData,
with=FALSE,
condition = "ILI")
FuentesIliGutData <- renameSampleVariables(FuentesIliGutData,
with=TRUE,
.fn = toupper)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.