Coerce Data Into a cm Object

View source: R/cm.R

as.cmR Documentation

Coerce Data Into a cm Object


Coerce Data Into a cm Object

  u = NULL,
  v = NULL,
  pressure = NULL,
  conductivity = NULL,
  temperature = NULL,
  salinity = NULL,
  longitude = NA,
  latitude = NA,
  filename = "",
  debug = getOption("oceDebug")



A vector of times of observation, or an oce object from which time and two velocity components can be inferred, e.g. an adv object, or an adp object that has only one distance bin. If time is an oce object, then all of the following arguments are ignored.

u, v

optional numerical vectors containing the x and y components of velocity (m/s).

pressure, conductivity, salinity, temperature

optional numerical vectors containing pressure (dbar), electrical conductivity, practical salinity, and in-situ temperature (degree C).

longitude, latitude

optional position specified in degrees East and North.


optional source file name.


an integer specifying whether debugging information is to be printed during the processing. This is a general parameter that is used by many oce functions. Generally, setting debug=0 turns off the printing, while higher values suggest that more information be printed. If one function calls another, it usually reduces the value of debug first, so that a user can often obtain deeper debugging by specifying higher debug values.

See Also

Other things related to cm data: [[,cm-method, [[<-,cm-method, applyMagneticDeclination,cm-method, cm-class, cm, plot,cm-method,, rotateAboutZ(), subset,cm-method, summary,cm-method


# Example 1: creation from scratch
t <- Sys.time() + 0:50
u <- sin(2 * pi * 0:50 / 5) + rnorm(51)
v <- cos(2 * pi * 0:50 / 5) + rnorm(51)
p <- 100 + rnorm(51)
summary(, u, v, p))

# Example 2: creation from an adv object

oce documentation built on May 29, 2024, 7:48 a.m.