Learn R Programming

ChemmineR (version 2.24.2)

makeUnique: Uniquify CMP names

Description

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

Usage

makeUnique(x, silent = FALSE)

Arguments

x
character vector
silent
silent = TRUE suppresses message about duplicate count

Value

character
of same length as x but without duplications

Details

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

References

...

See Also

Functions: cid, sdfid

Examples

Run this code
## SDFset instance
data(sdfsample)
sdfset <- sdfsample

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

Run the code above in your browser using DataLab