R: Rename duplicated items (used in reading CTD files)

unduplicateNames {oce} | R Documentation

## Rename duplicated items (used in reading CTD files)

### Description

Rename items to avoid name collision, by appending a `2` to the second occurrence of a name, etc.

### Usage

    unduplicateNames(names)

### Arguments

`names` | Vector of strings with variable names.

### Value

names Vector of strings with numbered variable names.

### See Also

used by `read.ctd.sbe`.

### Examples

    unduplicateNames(c("a", "b", "a", "c", "b"))

[Package oce version 0.9-20 Index]