powered by
Map the unique values of a vector
mapvalues_(x, facs, bNaturalSort = FALSE)
factor or character
character. It maps unique(x) to facs
binary. Whether to convert factor in natural order.
factor
# NOT RUN { mapvalues_(c("A","A","B","C"), c("one", "two", "three")) mapvalues_(c("apple", "apple", "banana", "pineable", "pineable"), c(3, 2, 1), bNaturalSort = TRUE) # }
Run the code above in your browser using DataLab