export_txt: Export mSet object to separate text files

Description Usage Arguments Author(s) Examples

View source: R/Methods-MetabolomicsSet-IO.R

Description

This function exports a mSet-class object into separate text files (i.e. csv, tsv and txt).

Usage

1
2
3
export_txt(object, path, prefix, sep = "\t", quote = FALSE,
  sample_names_head = "Sample name",
  feature_names_head = "Metabolite name")

Arguments

object

An object that inherits from the mSet-class

path

A string. Must be an exist directory to save the text files.

prefix

A string to be prepend to the output file names. If is missing, nothing will be prepended.

sep

Can be either tab, comma, or any separater.

quote

A logical value (TRUE or FALSE) whether add quotes to each column. See write.table

sample_names_head

A string. The name of the column for sample names.

feature_names_head

A string. The name of the column for feature names.

Author(s)

Chenghao Zhu

Examples

1
2
3
4
data(lipid)
dir.create("~/lipid-data")
export_txt(lipid, "~/lipid-data")
export_txt(lipid, "~/lipid-data", prefix = "lipid", sep = ",")

zhuchcn/Metabase documentation built on July 23, 2019, 1:36 p.m.