I would like to create a dichotomous variable about corruption defining:
0 = every country with a value inferior or equal to 50 (low level of corruption),
1 = every country with a value superior or equal to 50 (high level of corruption)
I don't know if i'm doing right
This is my desk:
My variable is corruption, so
cpi_nueva$corruption <- ifelse(cpi_nueva$corruption >= 50, "less corruption", "more corruption" )