Description Usage Arguments Value Examples
OTU transformation for paired and longitudinal data. Computes average within-subject change (in presence for qualitative metrics, proportional or CLR-transformed abundance for quantitative metrics) during one unit of time for each taxon.
1 | pltransform(otu.data, paired, norm = TRUE)
|
otu.data |
OTU data after pre-processing using data_prep() function. List with elements otu.props, otu.clr, and metadata. |
paired |
Logical indicating whether to use the paired version of the metric (TRUE) or the longitudinal version (FALSE). Paired analyis is only possible when there are exactly 2 unique time points/identifiers for each subject or pair. |
norm |
Logical indicating whether quantitative differences should be normalized by taxon abundance (default TRUE) |
List with the following elements. Data matrices have subject identifiers as row names and OTU identifiers as column names.
dat.binary |
n x p matrix of data after binary/qualitative transformation |
dat.quant.prop |
n x p matrix of data after quantitative transformation applied to proportions |
dat.quant.prop |
n x p matrix of data after quantitative transformation applied to CLR-transformed proportions |
avg.prop |
n x p matrix with overall average proportion of each taxon |
type |
Type of transformation that was used (paired, balanced longitudinal, unbalanced longitudinal) with a warning if unbalanced longitudinal. |
1 2 3 4 5 6 7 8 9 | data("paired.otus")
data("paired.meta")
# paired transformation
otudat <- data_prep(paired.otus, paired.meta, paired = TRUE)
res1 <- pltransform(otudat, paired = TRUE, norm = TRUE)
# longitudinal transformation
otudat <- data_prep(paired.otus, paired.meta, paired = FALSE)
res2 <- pltransform(otudat, paired = FALSE, norm = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.