I would like to rename a categorical variable according to the value of an other continuous variable.
set.seed(123) temp <- data.frame(label = as.factor(c(rep(