ctdAddColumn {oce} | R Documentation |
WARNING: This function will be removed soon; see oce-deprecated.
Use oceSetData
instead of the present function.
ctdAddColumn(x, column, name, label, unit = NULL, log = TRUE, originalName = "", debug = getOption("oceDebug"))
x |
A |
column |
A column of data to be inserted, in the form of a numeric vector, whose length matches that of columns in the objecct. |
name |
Character string indicating the name this column is to
have in the |
label |
Optional character string or expression indicating the
name of the column, as it will appear in plot labels. (If not
given, |
unit |
Optional indication of the unit, in the form of a list containing
items |
log |
A logical value indicating whether to store an entry in the processing log that indicates this insertion. |
originalName |
string indicating the name of the data element as it was originally. This makes sense only for data being read from a file, where e.g. WOCE or SBE names might be used. |
debug |
an integer specifying whether debugging information is
to be printed during the processing. This is a general parameter that
is used by many |
Add a column to the data
slot of an object of
ctd-class
, also updating the metadata
slot as appropriate.
A ctd object.
Dan Kelley
The documentation for ctd-class
explains the structure
of CTD objects, and also outlines the other functions dealing with them.
Other functions that will be removed soon: addColumn
,
ctdUpdateHeader
,
mapMeridians
, mapZones
,
oce.as.POSIXlt
library(oce) data(ctd) F <- 32 + (9/5)*ctd[["temperature"]] ctdNew <- ctdAddColumn(ctd, F, "temperatureF", unit=list(unit=expression(degree*F), scale="ITS-90"))