R: Rename items in the data slot of an oce object

renameData {oce} | R Documentation

## Rename items in the data slot of an oce object

### Description

This function may be used to rename elements within the `data` slot of `oce` objects. It also updates the processing log of the returned object, indicating the changes.

### Usage

    renameData(x, old = NULL, new = NULL)

### Arguments

`x` | An `oce` object, i.e. one inheriting from `oce-class`.
`old` | Vector of strings, containing old names.
`new` | Vector of strings, containing old names.

### Examples

    data(ctd)
    new <- renameData(ctd, "temperature", "temperature68")
    new <- oceSetData(new, name="temperature",
                      value=T90fromT68(new[["temperature68"]]),
                      unit=list(unit=expression(degree*C),scale="ITS=90"))

[Package oce version 0.9-20 Index]