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

Description Usage Details See Also

Description

Assumes that the first column is the sample names.

Usage

1
2
## S4 method for signature 'tbl_df'
sample_data(object)

Details

This function creates a plain data.frame from object that contains all columns except the first one, which is used for the row names. The resulting data frame is then passed to sample_data().

See Also

phyloseq::sample_data

## Not run: # Read a .csv file with readr, which creates an object of class `tbl_df` tbl <- readr::read_csv("path/to/sample_data.csv") # Inspect and check that the first column contains the sample names head(tbl) # Create a phyloseq `sample_data` object sam <- sample_data(tbl) ## End(Not run)
mikemc/tidyseq documentation built on Oct. 27, 2019, 12:46 p.m.