as.cm | R Documentation |
Coerce Data Into a cm Object
as.cm(
time,
u = NULL,
v = NULL,
pressure = NULL,
conductivity = NULL,
temperature = NULL,
salinity = NULL,
longitude = NA,
latitude = NA,
filename = "",
debug = getOption("oceDebug")
)
time |
A vector of times of observation, or an |
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. |
filename |
optional source file name. |
debug |
an integer specifying whether debugging information is
to be printed during the processing. This is a general parameter that
is used by many |
Other things related to cm data:
[[,cm-method
,
[[<-,cm-method
,
applyMagneticDeclination,cm-method
,
cm
,
cm-class
,
plot,cm-method
,
read.cm()
,
rotateAboutZ()
,
subset,cm-method
,
summary,cm-method
library(oce)
# 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(as.cm(t, u, v, p))
# Example 2: creation from an adv object
data(adv)
summary(as.cm(adv))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.