Learn R Programming

chromConverter (version 0.12.0)

summary.chrom_list: Summarize a chrom_list object

Description

Returns what print.chrom_list displays as a table, with one row per chromatogram: the sample it belongs to, its size, and the metadata fields in cols. Unlike print, nothing is collapsed into a header, abbreviated or truncated to the first few rows, so the result can be filtered and joined against.

Usage

# S3 method for chrom_list
summary(
  object,
  cols = chrom_summary_cols(),
  format_out = c("data.frame", "data.table", "tibble"),
  digits = NULL,
  ...
)

Value

A data.frame, data.table or tibble (according to the value of format_out) with one row per chromatogram. The first columns describe where the chromatogram sits and how large it is --- sample, trace (only when a sample holds more than one), n_rows and n_cols --- followed by one column per metadata field found. A field no chromatogram records, or that every one of them leaves empty, is dropped rather than filled with NA. A field holding more than one value, such as the product_mz of an MRM event monitoring several transitions, is collapsed to a comma-separated string so that it occupies one column.

Arguments

object

A chrom_list object.

cols

Character vector of attribute names to report. Defaults to: sample_name, run_datetime, method, detector, wavelength, detector_range, scan_type, polarity, precursor_mz, product_mz, mz_range. A field that no chromatogram carries, or that all of them leave empty, is omitted rather than filled with NA.

format_out

Format of object. Either data.frame, data.table or tibble.

digits

Number of significant digits for the numbers in a field collapsed into a string, or NULL (the default) to keep them in full.

...

Additional arguments (currently ignored).

See Also

extract_metadata, print.chrom_list

Examples

Run this code
path <- system.file("extdata", "benzoxazinoid_standards",
                    package = "chromConverter")
chroms <- read_chroms(path, format_in = "chemstation_ch", pattern = "dad1A",
                      parser = "chromconverter", progress_bar = FALSE)
summary(chroms)

Run the code above in your browser using DataLab