phy_to_floral_data | R Documentation |
Create data input list from phyloseq object
phy_to_floral_data(phy, y = NULL, covariates = NULL)
phy |
Phyloseq object |
y |
Outcome column of interest from phy's sample_data |
covariates |
Covariate column names from phy's sample_data |
list
library(phyloseq)
data(GlobalPatterns)
# add a covariate
sample_data(GlobalPatterns)$test <- rep(c(1, 0), nsamples(GlobalPatterns)/2)
# GlobalPatterns <- tax_glom(GlobalPatterns, "Phylum")
dat <- phy_to_floral_data(GlobalPatterns, y = "test", covariates = c("SampleType"))
# res <- FLORAL(x = dat$xcount, y=dat$y, ncov=dat$ncov, family = "binomial", ncv=NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.