If taxa are rows, assumes that the first column is the OTU/taxon names. If taxa are columns, assumes that the first column is the sample names.
1 2 | ## S4 method for signature 'tbl_df'
otu_table(object, taxa_are_rows)
|
phyloseq::otu_table
## Not run: # Read a .csv file with readr, which creates an object of class `tbl_df` tbl <- readr::read_csv("path/to/otu_table.csv") # Inspect and check if taxa are rows and that the first column contains the # sample names or the taxa/OTU names head(tbl) # Create a phyloseq `otu_table` object otu <- otu_table(tbl, taxa_are_rows = FALSE) ## End(Not run)Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.