extract_data: Extracts data from cdf file.

View source: R/extract_data.R

extract_dataR Documentation

Extracts data from cdf file.

Description

extract_data Extracts the data from a cdf file.

Usage

extract_data(filename, mod_t = 10, shift_time = TRUE)

Arguments

filename

a string object. The path or file name of the cdf file to be opened.

mod_t

a float object. The modulation time for the GCxGC sample analysis. Default is 10.

shift_time

a boolean object. Determines whether the Overall Time Index should be shifted to 0. Default is TRUE.

Details

This function opens the specified cdf file using the implemented function nc_open from ncdf4 package, then extracts the data and closes the cdf file using the implemented function nc_close from ncdf4 package \insertCitencdf4gcxgclab. It then returns a list of two data frames. The first is a dataframe of the TIC data, the output of create_df(). The second is a data frame of the full MS data, the output of mass_data().

Value

A list object. A list of the extracted data: scan acquisition time, total intensity, mass values, intensity values, and point count.

References

\insertAllCited

Examples

file <- system.file("extdata","sample1.cdf",package="gcxgclab")
frame <- extract_data(file,mod_t=.5)
plot_chr(frame, title='Raw Data', scale="linear")
plot_chr(frame, title='Log Intensity')


gcxgclab documentation built on May 29, 2024, 5:33 a.m.