write_phyloseq: Exporting phyloseq Data in CSV Files

Description Usage Arguments Value See Also Examples

View source: R/write_phyloseq.R

Description

Writes the otu, taxonomy and metadata in csv files.

Usage

1
write_phyloseq(x, type = "all", path = getwd())

Arguments

x

phyloseq-class object

type

'OTU' or 'TAXONOMY' or 'METADATA'

path

Path to the directory/folder where the data will be written. Uses the working directory by default.

Value

Output file path (a string)

See Also

read_phyloseq

Examples

1
2
3
4
5
6
7
#data(dietswap)
#pseq <- dietswap
## By default writes all info at once (ie OTU/TAXONOMY/METADATA)
#write_phyloseq(pseq) 
#write_phyloseq(pseq, 'OTU')
#write_phyloseq(pseq, 'TAXONOMY')
#write_phyloseq(pseq, 'METADATA')

Example output

Loading required package: phyloseq
Loading required package: ggplot2

microbiome R package (microbiome.github.com)
    


 Copyright (C) 2011-2020 Leo Lahti, 
    Sudarshan Shetty et al. <microbiome.github.io>


Attaching package:microbiomeThe following object is masked frompackage:ggplot2:

    alpha

The following object is masked frompackage:base:

    transform

microbiome documentation built on Nov. 8, 2020, 5:08 p.m.