Learn R Programming

oce (version 1.7-8)

odf-class: Class to Store ODF Data

Description

This class is for data stored in a format used at Canadian Department of Fisheries and Oceans laboratories. It is somewhat similar to the bremen class, in the sense that it does not apply just to a particular instrument.

Arguments

Slots

data

As with all oce objects, the data slot for odf objects is a list containing the main data for the object.

metadata

As with all oce objects, the metadata slot for odf objects is a list containing information about the data or about the object itself.

processingLog

As with all oce objects, the processingLog slot for odf objects is a list with entries describing the creation and evolution of the object. The contents are updated by various oce functions to keep a record of processing steps. Object summaries and processingLogShow() both display the log.

Modifying slot contents

Although the [[<- operator may permit modification of the contents of odf objects (see [[<-,odf-method), it is better to use oceSetData() and oceSetMetadata(), because those functions save an entry in the processingLog that describes the change.

Retrieving slot contents

The full contents of the data and metadata slots of a odf object may be retrieved in the standard R way using slot(). For example slot(o,"data") returns the data slot of an object named o, and similarly slot(o,"metadata") returns the metadata slot.

The slots may also be obtained with the [[,odf-method operator, as e.g. o[["data"]] and o[["metadata"]], respectively.

The [[,odf-method operator can also be used to retrieve items from within the data and metadata slots. For example, o[["temperature"]] can be used to retrieve temperature from an object containing that quantity. The rule is that a named quantity is sought first within the object's metadata slot, with the data slot being checked only if metadata does not contain the item. This [[ method can also be used to get certain derived quantities, if the object contains sufficient information to calculate them. For example, an object that holds (practical) salinity, temperature and pressure, along with longitude and latitude, has sufficient information to compute Absolute Salinity, and so o[["SA"]] will yield the calculated Absolute Salinity.

It is also possible to find items more directly, using oceGetData() and oceGetMetadata(), but neither of these functions can retrieve derived items.

Author

Dan Kelley

References

  1. Anthony W. Isenor and David Kellow, 2011. ODF Format Specification Version 2.0. (This is a .doc file obtained in June 2011 by Dan Kelley, which no longer seems to be made available at any DFO website.)

  2. (Unknown authors), October 2014. ODF Format Description (MLI), https://ogsl.ca/wp-content/uploads/ODF_format_desc_en_0.pdf, (Link worked early on March 16, 2022, but failed later that day.)

  3. A sample ODF file in the DFO format is available at system.file("extdata","CTD_BCD2014666_008_1_DN.ODF.gz",package="oce")

  4. A sample ODF file in the MLI format may be available at https://ogsl.ca/wp-content/uploads/ODF_file_example_en_0.pdf. (Link worked early on March 16, 2022, but failed later that day.)

See Also

Other things related to odf data: CTD_BCD2014666_008_1_DN.ODF.gz, ODF2oce(), ODFListFromHeader(), ODFNames2oceNames(), [[,odf-method, [[<-,odf-method, plot,odf-method, read.ctd.odf(), read.odf(), subset,odf-method, summary,odf-method

Other classes provided by oce: adp-class, adv-class, argo-class, bremen-class, cm-class, coastline-class, ctd-class, lisst-class, lobo-class, met-class, oce-class, rsk-class, sealevel-class, section-class, topo-class, windrose-class, xbt-class