[[<-,oce-method {oce} | R Documentation

## Change Something Within an oce Object

### Description

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.

### Usage

    ## S4 replacement method for signature 'oce'
    x[[i, j, ...]] <- value

### Arguments

`x` | An oce object.
`i` | The item to extract.
`j` | Optional additional information on the `i` item.
`...` | Optional additional information (ignored).
`value` | The value to be inserted into `x`.

### Examples

    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)

[Package oce version 0.9-18 Index]