Learn R Programming

TargetSearch (version 1.28.1)

peakCDFextraction: NetCDF to R

Description

This function reads a netcdf chromatogram file and returns a list containing the retention time and the intensity matrices.

Usage

peakCDFextraction(cdfFile, massRange = NULL)

Arguments

cdfFile
A character string naming a netcdf file.
massRange
A two component numeric vector with the scan mass range to extract.

Value

A two component list.
Time
The retention time vector.
Peaks
The intensity matrix. Rows are the retention times and columns are masses. The first column is the lower mass value and the last one is the higher mass.
massRange
The mass range.

Details

The function expects the following NetCDF variables: intensity_values, mass_values, scan_index, point_count and scan_acquisition_time. Otherwise, an error will be displayed. The massRange parameter is a numeric vector with two components: lower and higher masses. All masses in that range will be extracted. Note that it is not possible to extract a discontinuous mass range. It also can be NULL, in which case the mass range will be determined by scanning the cdf file.

See Also

NetCDFPeakFinding