renameDuplicated: Rename vector to avoid duplicated values with another vector

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Renames values by adding an index to the end of duplicates. This allows to prepare unique values in two vectors before a merge, for instance.

Usage

1

Arguments

check

Character: values to rename if duplicated

comp

Character: values to compare with

Value

Character vector with renamed values if duplicated; else, it returns the usual values. It does not return the comparator values.

Examples

1
2
psichomics:::renameDuplicated(check = c("blue", "red"), comp = c("green",
                                                                 "blue"))

psichomics documentation built on Nov. 8, 2020, 5:44 p.m.