Learn R Programming

chromConverter (version 0.12.0)

write_chroms: Write chromatograms

Description

Writes chromatograms to disk in the format specified by export_format: either mzml, cdf, csv, or arw.

Usage

write_chroms(
  chrom_list,
  path_out,
  export_format = c("mzml", "cdf", "csv", "arw"),
  what = "",
  force = FALSE,
  show_progress = TRUE,
  verbose = getOption("verbose"),
  ...
)

Value

No return value. The function is called for its side effects.

Arguments

chrom_list

A list of chromatograms.

path_out

Path to directory for writing files.

export_format

Format to export files: either "mzml", "cdf", "csv", "arw".

what

What to write. Used by the cdf and mzml exporters only. For export_format = "cdf", either "MS1" (written by write_andi_ms) or "chrom" (written by write_andi_chrom). For export_format = "mzml", any of "MS1", "MS2", "TIC", "BPC" and/or "DAD". If it is not specified, the streams to write are inferred from the supplied data.

force

Logical. Whether to overwrite existing files. Defaults to FALSE.

show_progress

Logical. Whether to show progress bar. Defaults to TRUE.

verbose

Logical. Whether to print verbose output.

...

Additional arguments to write function.

Side effects

Exports a chromatogram in the file format specified by export_format in the directory specified by path_out.

Author

Ethan Bass

See Also

Other write functions: write_agilent_amx(), write_andi_chrom(), write_andi_ms(), write_mzml()

Examples

Run this code
path <- system.file("extdata/alkane_ladder.txt", package = "chromConverter")
chroms <- read_chroms(path, format_in = "shimadzu_ascii",
                      find_files = FALSE, progress_bar = FALSE)
write_chroms(chroms, path_out = tempdir(), export_format = "csv",
             show_progress = FALSE)

Run the code above in your browser using DataLab