Last chance! 50% off unlimited learning
Sale ends in
partconv(x, consec=TRUE)
x
.
When consec = TRUE
, the distinct values in x
are numbered by
the order in which they appear.
When consec = FALSE
, each distinct value in x
is numbered by
the index corresponding to its first appearance in x
.partuniq
partconv(iris[,5])
set.seed(0)
cl <- sample(LETTERS[1:9], 25, replace=TRUE)
partconv(cl, consec=FALSE)
partconv(cl, consec=TRUE)
Run the code above in your browser using DataLab