ctdRepair {oce} | R Documentation |
Repair a Malformed ctd Object
Description
Make a ctd object adhere more closely with the expected form, e.g. by
moving certain things from the data
slot to the metadata
slot, where
other oce functions may assume they will be located.
This can be handy for objects that were set up
incorrectly, perhaps by inappropriate user insertions.
Usage
ctdRepair(x, debug = getOption("oceDebug"))
Arguments
x |
a ctd object. |
debug |
an integer specifying whether debugging information is
to be printed during the processing. This is a general parameter that
is used by many |
Details
The possible changes fall into the following categories.
If unit-length values for
latitude
,longitude
,time
, orstation
exist in thedata
slot, move them to themetadata
slot. However, leave them indata
if their length exceeds 1, because this can arise with towyo data.If the
metadata
ordata
slot contains items namedtime
,recoveryTime
,startTime
, orsystemUploadTime
, and if these are not in POSIXt format, then useas.POSIXct()
withtz="UTC"
to convert them to POSIXt format. If that conversion fails, owing to an unrecognizable format, then the original value is retained, unaltered.
Value
A ctd object that is based on x
, but possibly
with some elements changed as described in the “Details”
section.
Author(s)
Dan Kelley
See Also
Other things related to ctd data:
CTD_BCD2014666_008_1_DN.ODF.gz
,
[[,ctd-method
,
[[<-,ctd-method
,
as.ctd()
,
cnvName2oceName()
,
ctd-class
,
ctd.cnv.gz
,
ctdDecimate()
,
ctdFindProfilesRBR()
,
ctdFindProfiles()
,
ctdRaw
,
ctdTrim()
,
ctd_aml.csv.gz
,
ctd
,
d200321-001.ctd.gz
,
d201211_0011.cnv.gz
,
handleFlags,ctd-method
,
initialize,ctd-method
,
initializeFlagScheme,ctd-method
,
oceNames2whpNames()
,
oceUnits2whpUnits()
,
plot,ctd-method
,
plotProfile()
,
plotScan()
,
plotTS()
,
read.ctd.aml()
,
read.ctd.itp()
,
read.ctd.odf()
,
read.ctd.odv()
,
read.ctd.saiv()
,
read.ctd.sbe()
,
read.ctd.ssda()
,
read.ctd.woce.other()
,
read.ctd.woce()
,
read.ctd()
,
setFlags,ctd-method
,
subset,ctd-method
,
summary,ctd-method
,
woceNames2oceNames()
,
woceUnit2oceUnit()
,
write.ctd()
Examples
library(oce)
data(ctd)
# Insert location information into 'data' slot, although it belongs in 'metadata'.
ctd@data$latitude <- ctd@metadata$latitude # Done by experts only!
ctd@data$longitude <- ctd@metadata$longitude # Done by experts only!
repaired <- ctdRepair(ctd)