netCdfSource-class: Class '"netCdfSource"', for reading raw data from 'netCDF'...

Description Objects from the Class Slots Extends Methods Author(s) See Also Examples

Description

An implementation of xcmsSource which can load from netCDF files.

Objects from the Class

Objects can be created by calling new("netCdfSource", path). Upon creation, the presence and format of the file at path is checked.

Slots

.Data:

Object of class "character". File path of a file from which to read raw data as the object's data part.

cdf:

Object of class "integer". Internal file descriptor of netCDF file. There is no need to access this slot.

Extends

Class "xcmsFileSource", directly. Class "character", by class "xcmsFileSource", distance 2. Class "xcmsSource", by class "xcmsFileSource", distance 2.

Methods

initialize

signature(.Object = "netCdfSource", path = "character"): Create a new netCdfSource and try to open the file at path

loadRaw

signature(object = "netCdfSource"): Read and return the data from the file. Value is that of loadRaw

Author(s)

Daniel Hackney, dan@haxney.org

See Also

xcmsSource, loadRaw-methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
library(xcms)
library(faahKO)
cdfpath <- system.file("cdf", package = "faahKO")
cdffiles <- list.files(cdfpath, recursive = TRUE, full.names = TRUE)
## nc is a reference to the netCDF file
nc <- new("netCdfSource", cdffiles[1])

rawdata <- loadRaw(nc)
## The raw data has over 1,000 scans, so don't try to print them all out!
summary(rawdata)

## End(Not run)

benjiec/xcms documentation built on May 12, 2019, 11:57 a.m.