Skip to contents

Read CDF file

Usage

read_cdf(
  file,
  format_out = c("matrix", "data.frame"),
  data_format = c("wide", "long"),
  what = "chromatogram",
  read_metadata = TRUE,
  metadata_format = c("chromconverter", "raw"),
  collapse = TRUE,
  ...
)

Arguments

file

Path to file.

format_out

R format. Either matrix or data.frame.

data_format

Whether to return data in wide or long format. For 2D files, "long" format returns the retention time as the first column of the data.frame or matrix while "wide" format returns the retention time as the rownames of the object.

what

Whether to extract chromatogram and/or peak_table.

read_metadata

Whether to read metadata from file.

metadata_format

Format to output metadata. Either chromconverter or raw.

collapse

Logical. Whether to collapse lists that only contain a single element.

...

Additional arguments to parser. The ms_format argument can be used here to specify whether to return mass spectra in list format or as a data.frame.

Value

A chromatogram in the format specified by the format_out and data_format arguments.

Author

Ethan Bass