Uniquify CMP names

Share:

Description

Creates unique CMP names by appending a counter to each duplicatation set. The function can be used for any character vector.

Usage

1
makeUnique(x, silent = FALSE)

Arguments

x

character vector

silent

silent = TRUE suppresses message about duplicate count

Details

The function is important to maintain unique compound names in the ID slot of SDFset containers.

Value

character

of same length as x but without duplications

Author(s)

Thomas Girke

References

...

See Also

Functions: cid, sdfid

Examples

1
2
3
4
5
6
7
8
## SDFset instance
data(sdfsample)
sdfset <- sdfsample

## Create unique compound IDs 
unique_ids <- makeUnique(sdfid(sdfset))
cid(sdfset) <- unique_ids 
cid(sdfset[1:4])

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.