Learn R Programming

taxlist (version 0.3.0)

add_suffix: Add a suffix when strings are identical

Description

An integer will be added as suffix in x if an identical value is in y. If a value with suffix is already in y, the function will search for the highest suffix to avoid duplicated values.

Usage

add_suffix(x, y, sep = "_")

Value

A character value, either x or x with suffix if already in y.

Arguments

x

(character of length 1) The name to be compared.

y

(character) Existing names, with or without suffixes.

sep

(character of length 1) Symbol to be placed between the original name and the suffix.