[[<-,oce-method {oce} | R Documentation |
This is a base function that can be used to change items
in the metadata
or data
slot of an
object of the oce-class
. See
“Details” for the case in which both slots
contain an item of the given name.
The first step is to an item of the indicated name. First,
it is sought in the metadata
slot, and if it is found
there, then that value is altered. If it is not found there,
it is sought in the data
slot and modified there.
## S4 replacement method for signature 'oce' x[[i, j, ...]] <- value
x |
An oce object. |
i |
The item to extract. |
j |
Optional additional information on the |
... |
Optional additional information (ignored). |
value |
The value to be inserted into |
data(ctd) summary(ctd) # Move the CTD profile a nautical mile north, ctd[["latitude"]] <- 1/60 + ctd[["latitude"]] # in metadata # Increase the salinity by 0.01. ctd[["salinity"]] <- 0.01 + ctd[["salinity"]] # in data summary(ctd)