unduplicateNames {oce} | R Documentation |
Append numeric suffices to character strings, to avoid repeats. This is used by various data input functions, to handle the fact that several oceanographic data formats permit the reuse of variable names within a given file.
unduplicateNames(strings, style = 1)
strings |
Vector of character strings. |
style |
An integer giving the style. If |
Vector of strings with repeats distinguished by suffix.
Used by read.ctd.sbe
with style=1
to
rename repeated data elements (e.g. for multiple temperature sensors)
in CTD data, and by read.odf
with style=2
on
key-value pairs within ODF metadata.
unduplicateNames(c("a", "b", "a", "c", "b")) unduplicateNames(c("a", "b", "a", "c", "b"), style=2)