makeUnique: Uniquify CMP names

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/AllClasses.R

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])

ChemmineR documentation built on Feb. 28, 2021, 2:02 a.m.