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://www.springer.com/us/book/9781493988426) 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(), 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's metadata or data 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-in ctd dataset, which does not contain potential temperature, "theta". Using ctd[["theta"]] therefore causes swTheta() to be called, to calculate theta. 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's metadata or data 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 its metadata slot and some statistics of the contents of its data 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.