The variable I'm working with is described as;
4.111.108 School enrollment, preprimary (% gross) (wdi_gerpp)
Total enrollment in pre-primary education, regardless of age, expressed as a percentage of the total population of ocial pre-primary education age. GER can exceed 100% due to the inclusion of over-aged and under-aged students because of early or late school entrance and grade repetition.
I want to recode the percentages to a scale from 1-11, e.g the countries that have 1-10% preprimary enrollment get the number 1, the countries with 11-20% get the number 2 etc. And the countries above 100% get the number 11. I can really figure out how to do it after researching on YouTube for an hour now. thank you! :D
I tried this, but I don't really now what to put inside the brackets.
percent_vec = paste(1:177, "%", sep = "") as.numeric(sub("%", "", percent_vec))