addColumn {oce} | R Documentation |
Add a column to an oce object's data
.
addColumn(x, data, name)
x |
A |
data |
the data. The length of this item must match that of the
existing data entries in the |
name |
the name of the column. |
If there is already a column with the given name, its contents are replaced by the new value.
An object of class
oce
, with a new column.
Dan Kelley
ctdAddColumn
does a similar thing for ctd
objects,
and is in fact called, if x
is of class ctd
.
library(oce) data(ctd) st <- swSigmaTheta(salinity(ctd), temperature(ctd), pressure(ctd)) new <- addColumn(ctd, st, "sigmaTheta")