rename.duplicate: Function to rename duplicated strings.

Description Usage Arguments Value Author(s) Examples

Description

This function renames duplicated strings by adding their number of occurrences at the end.

Usage

1
rename.duplicate(x, sep = "_", verbose = FALSE)

Arguments

x

vector of strings.

sep

a character to be the separator between the number added at the end and the string itself.

verbose

TRUE to print informative messages, FALSE otherwise.

Value

new.x

new strings (without duplicates).

duplicated.x

strings which were originally duplicated.

Author(s)

Benjamin Haibe-Kains

Examples

1
2
3
nn <- sample(letters[1:10], 30, replace=TRUE)
table(nn)
rename.duplicate(x=nn, verbose=TRUE)


Search within the genefu package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.