Description Usage Arguments Value See Also Examples
Creates a themetadata class by preprocessing data from an OTU table, taxonomic information, sample metadata, and a formula reflecting the preposed relationship between sample metadata and the topics over samples distribution.
1 2 3 4 5 6 7 8 9 10 11 12 | prepare_data(
otu_table,
rows_are_taxa,
tax_table,
metadata,
formula,
refs,
cn_normalize = TRUE,
drop = TRUE,
seed = sample.int(.Machine$integer.max, 1),
verbose = FALSE
)
|
otu_table |
(required) Matrix or dataframe containing taxa abundances (counts, non-negative integers) across samples. Rows and columns must be uniquely named. |
rows_are_taxa |
(required) Logical flag indicating whether otu_table rows correspond to taxa (TRUE) or samples (FALSE). |
tax_table |
Matrix or dataframe containing taxonomic information with row or column names corresponding to the otu_table. |
metadata |
Matrix or dataframe containing sample information with row or column names corresponding to the otu_table. |
formula |
Formula for covariates of interest found in metadata. Interactions, transformations, splines, and polynomial expansions are permitted. |
refs |
Character vector of length equal to the number of factors or binary covariates in formula, indicating the reference level. |
cn_normalize |
Logical flag for performing 16S rRNA copy number normalization. Defaults to TRUE. |
drop |
Logical flag to drop empty rows and columns. Defaults to TRUE. |
seed |
Seed for random number generation. This seed will be passed to each function that uses this prepared data unless otherwise overridden. Defaults to a random integer between 1 and the maximum integer supported by R. |
verbose |
Logical flag to print progress information. Defaults to FALSE. |
An object of class themetadata containing
Matrix of taxa abundances, correctly overlapping with tax_table and metadata. Will be copy number normalized, lacking empty rows and columns by default.
Matrix, correctly overlapping with otu_table
Dataframe, correctly overlapping with otu_table and formula. All character covariates are converted to factors.
Unaltered, given by the user
List containing the covariate, nonlinear function name, and basis function expansion of all applicable covariates based on the formula.
Dataframe of metadata of only applicable covariates with factors expanded as dummy variables
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.