Variável re -registro

library(plyr) #for recording
library(dplyr)

data7$stflife <- as.character(data7$stflife) #since revalue works just for characters

#it will be a new recoded variable
data7$stflife_rec =revalue(data7$stflife, c("1" = "10", "2" = "9", "3" = "8", "4" = "7", "5" = "6", "6" = "5", "7" = "4", "8" = "3", "9" = "2", "10" = "1"))

data7$stflife_rec <- as.factor(data7$stflife_rec)
Diana H