clean_covariates | R Documentation |
This function takes a tidy format. Coerces vectors to correct type. Only include covariates that have 2 or more levels. Sample identifiers are stored as rownames.
clean_covariates(md, factors, continuous, sample_identifier)
md |
A data frame with sample identifiers in a column and relevant experimental covariates. |
factors |
A vector of factor variables. |
continuous |
A vector of continuous variables. |
sample_identifier |
The name of the column with the sample identifiers that map to the gene counts data frame. |
A data frame with coerced variables.
data <- tibble::tribble(
~individualID, ~diagnosis, ~RIN,
"ind5436", "control", 7.7,
"ind234", "disease", 7.1
)
clean_covariates(data, factors = c("individualID", "diagnosis"),
continuous = c("RIN"),
sample_identifier = c("individualID"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.