nonAmbiguousNum: Make numeric vector non-ambiguous (ie unique)
Description
Thios function transfomrmes a vector of (named) numeric values x into unique.
Note: for non-numeric use the function firstOfRepeated - but 1000x slower !
Return sorted non-ambigous numeric vector (or list if 'asList'=TRUE and 'uniqOnly'=FASLSE)
sorted non-ambigous numeric vector (or list if 'asList'=TRUE and 'uniqOnly'=FALSE)
Arguments
x
(numeric) main input
uniqOnly
(logical) if=TRUE return unique only, if =FALSE return unique and single representative of non-unique values (with '' added to name), selection of representative of repeated: first (of sorted) or middle if >2 instances
asList
(logical) return list
nameMod
(character) text to add in case on ambiguous values, default="amb_"
silent
(logical) suppress messages
debug
(logical) additional messages for debugging
callFrom
(character) allows easier tracking of messages produced
See Also
firstOfRepeated for non-numeric use (much slower !!!), duplicated