Skip to content
Prev 79200 / 398502 Next

change factor labels

it must be terribly simple, can someone quickly help me?

test <- data.frame(y=c(1:10), x=as.factor(c(rep("a",5),rep("b",5))))

how can i change the factor labels from "a" and "b" to for example "u"  and 
"v"?

i don't succeed with factor()

thanks a lot

------------------------------------------------
Sebastian Leuzinger
Institute of Botany, University of Basel