The oce package provides functions for working with Oceanographic data, for calculations that are specific to Oceanography, and for producing graphics that match the conventions of the field.
Details
Over a dozen specialized data types are handled by oce, with generic plots and summaries for each, along with the specialized functions needed for typical Oceanographic analysis.
See oce for a summary of the class structure and links to documentation for the many subclasses of oce objects, each aligned with a class of instrument or or type of dataset. For a more task-oriented approach, see the several vignettes that are provided with oce, and a book (Kelley, Dan E. Oceanographic Analysis with R. New York: Springer-Verlag, 2018. https://link.springer.com/book/10.1007/978-1-4939-8844-0) written by one of the oce co-authors.
Specialized Functions
A key function is read.oce()
, which will attempt
to read Oceanographic data in raw format. This uses
oceMagic()
to try to detect the file type,
based on the file name and contents. If this detection
is not possible, users will need to go beyond read.oce()
,
using a more specialized function, e.g. read.ctd()
for CTD files,
read.ctd.sbe()
for Teledyne-Seabird files, etc.
Generic Methods
A list of the generic methods in oce is provided by
methods(class="oce")
; a few that are used frequently
are as follows.
[[
Finds the value of an item in the object'smetadata
ordata
slot. If the item does not exist, but can be calculated from the other items, then the calculated value is returned. As an example of the latter, consider the built-inctd
dataset, which does not contain potential temperature, "theta
". Usingctd[["theta"]]
therefore causesswTheta()
to be called, to calculatetheta
. See [[,oce-method or type?"[[,oce-method"
to learn more about general functioning, or a specialized method like [[,ctd-method for CTD data, etc.[[<-
Alters the named item in the object'smetadata
ordata
slot. If the item does not exist, it is created. See [[<-,oce-method or type?"[[<-,oce-method"
to learn more about the general methodology, or a specialized method like [[<-,ctd-method for CTD data, etc.summary()
Displays some information about the object named as an argument, including a few elements from itsmetadata
slot and some statistics of the contents of itsdata
slot. See summary,oce-method or type?"summary,oce-method"
to learn more about general functioning, or a specialized method like summary,ctd-method for CTD data, etc.subset()
Takes a subset of an oce object. See subset,oce-method or type?"subset,oce-method"
to learn more about general functioning, or a specialized method like subset,ctd-method for CTD data, etc.
Author
Maintainer: Dan Kelley Dan.Kelley@Dal.Ca (ORCID)
Authors:
Clark Richards clark.richards@gmail.com (ORCID)
Other contributors:
Chantelle Layton chantelle.layton@dal.ca (ORCID) (curl() coauthor) [contributor]
British Geological Survey (magnetic-field subroutine) [contributor, copyright holder]