An alternative to psmelt function from phyloseq-class object.

phy_to_ldf(x, transform.counts)

Arguments

x

phyloseq-class object

transform.counts

Data transform to be used in plotting (but not in sample/taxon ordering). The options are 'Z-OTU', 'Z-Sample', 'log10' and 'compositional'. See the transform function.

Value

A data frame in long format with appropriate transfomation if requested.

Examples

# NOT RUN {
  # Example data
    library(microbiomeutilities)
    data("zackular2014")
    pseq <- zackular2014
    pseq_df <- phy_to_ldf(pseq, transform.counts = NULL)


# }