otu_table-tbl_df-method: Constructor for creating otu_table from a tibble (class...

Description Usage See Also

Description

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.

Usage

1
2
## S4 method for signature 'tbl_df'
otu_table(object, taxa_are_rows)

See Also

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)
mikemc/tidyseq documentation built on Oct. 27, 2019, 12:46 p.m.