write_phyloseq {microbiome} | R Documentation

## Exporting phyloseq Data in CSV Files

### Description

Writes the otu, taxonomy and metadata in csv files.

### Usage

    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

    ## Not run:
    #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')

    ## End(Not run)

[Package microbiome version 1.6.0 Index]