data slot of an object of
ctd-class, also updating the metadata
slot as appropriate.
ctdAddColumn(x, column, name, label, unit = NULL, log = TRUE, originalName = "", debug = getOption("oceDebug"))ctd object, i.e. one inheriting from ctd-class.data slot of x.name will be used.)unit, which is an expression, and scale, which is a
character string. For example, modern measurements of temperature have
unit list(name=expression(degree*C), scale="ITS-90").oce functions. Generally, setting debug=0
turns off the printing, while higher values suggest that more information
be printed.ctd-class explains the structure
of CTD objects, and also outlines the other functions dealing with them.Other things related to ctd data: [[,ctd-method,
[[<-,ctd-method, as.ctd,
cnvName2oceName, ctd-class,
ctdDecimate, ctdFindProfiles,
ctdRaw, ctdTrim,
ctdUpdateHeader, ctd,
gps-class,
handleFlags,ctd-method,
plot,ctd-method, plotProfile,
plotScan, plotTS,
read.ctd.itp, read.ctd.odf,
read.ctd.sbe,
read.ctd.woce.other,
read.ctd.woce, read.ctd,
subset,ctd-method,
summary,ctd-method,
woceNames2oceNames, write.ctd
library(oce)
data(ctd)
F <- 32 + (9/5)*ctd[["temperature"]]
ctdNew <- ctdAddColumn(ctd, F, "temperatureF",
unit=list(unit=expression(degree*F), scale="ITS-90"))
Run the code above in your browser using DataLab