Re: [R] how to recode an ordered factor

2012-12-21 Thread arun
) #[1] "not at all satisfied" "not very satisfied"   "fairly satisfied"    #[4] "very satisfied"    #or dat3<-transform(dat1,or.var1=reorder(o.var1, new.order=c("not at all satisfied","not very satisfied","fairly satisfied

Re: [R] how to recode an ordered factor

2012-12-21 Thread William Dunlap
GoodNeutral Levels: Good < Neutral < Bad Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Francesco Sarracino > Sent: Friday, December 21,

[R] how to recode an ordered factor

2012-12-21 Thread Francesco Sarracino
Dear R helpers, I'm trying to recode an ordered factor to reverse its scale, but I can't figure out how to make it. I am using the Recode function provided by the Car package. I've created an ordered variable: data$o.var1 <- ordered(data$var1, levels=c(1,2,3,4), labels =c("very satisfied", "fairl