Displaying 2 results from an estimated 2 matches for "v961327".
Did you mean:
961327
2010 Feb 03
1
Changing an unordered factor into an ordered factor
I'm trying to change an unordered factor into an ordered factor:
data96$RV961327 <- data96$V961327
data96$RV961327[data96$V961327 %in% levels(data96$V961327)[4]] <- NA
data96$RV961327[data96$V961327 %in% levels(data96$V961327)[5]] <- NA
data96$RV961327 <- factor(data96$RV961327)
attributes(data96$RV961327)
levels(data96$RV961327)
data96$RV961327
data96$RRV961327 &...
2010 Jan 28
1
Recoding Variables in R
...opinion question from the ANES. I would like to throw out 8 and 9. Furthermore, I would like to reorder the responses so that:
1. Oppose (originally 5)
2. Haven't though much about this (originally 0)
3. favor (originally 1)
I tried the following, which did not work:
library(car)
data96$V961327 <- recode(data96$V961327, "c(1)=2; c(2)=3; c(3)=1")
I also tried the following, which also did not work:
new <- as.numeric(data96$V961327)
new
data96$V961327 <- recode(new, "c(5)=1; c(0)=2; c(1)=3")
Help,
Abraham M