I am very much a novice to R and currently struggling to learn the language. What I am trying to do is create a new variable with three levels (if that makes sense). I am trying to show growth <=0%,<1%, and >=1% all in the same new variable (let me know if that is even possible).
So far I have tried this:
pincome$perctchng<- ifelse(pincome$perctchng<=0,ifelse(pincome$perctchng<1,
ifelse(pincome$perctchng>=1,"level 1","level 2","level 3")))
This is the code that I attempted. I know that it is wrong, but any advice is the right direction is welcomed.
Thanks!