Displaying 1 result from an estimated 1 matches for "non_dup".
Did you mean:
neon_vdup
2012 Feb 11
2
Derive pattern from vector
Hello,
consider the following vector 'chars':
chars <- c(A, B, C, C, D, E, E, E, F, F, F)
I need to convert 'chars' into the following pattern:
1, 2, 3, 3, 4, 5, 5, 5, 6, 7, 8
As soon as there are duplicates they get the same number otherwise it's
increasing numbers.
However, for the char 'F' it should be always increasing numbers. Is that
possible in R?
I