| add.column {oce} | R Documentation |
Add a column to an oce object's data.
add.column(x, data, name)
x |
A ctd object, e.g. as read by read.ctd. |
data |
the data (length must match length of columns in existing
x$data data frame). |
name |
the name of the column. |
The header is unchanged by this operation.
An object of class oce, with a new column.
Dan Kelley
add.ctd.column does a similar thing for ctd
objects.
library(oce)
data(ctd)
sigthe <- sw.sigma.theta(ctd$data$salinity,
ctd$data$temperature,
ctd$data$pressure);
new <- add.column(ctd, sigthe, "sigmatheta")