Hello everyone,

I have the following factor:

levels(pp_income)
 [1] ""       "1"      "2"      "3"      "4"      "5"      "6"      "7"
 [9] "8"      "9"      "Renter"

I want to subset so that only values 1:9 are included. I have the following:

> income<-pp_income[pp_income %in% c(1:9)]
>
> levels(income)
 [1] ""       "1"      "2"      "3"      "4"      "5"      "6"      "7"
 [9] "8"      "9"      "Renter"

Why is this not working and can someone please suggest a solution?

Thank you!

Dan

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to