Peter Dalgaard <[EMAIL PROTECTED]> writes: > I think I'd go for something like > > V2 <- c(4, 6, 10)[factor(V1, levels=c(10, 20, 30))]
Come to think of it: c(4, 6, 10)[match(V1, c(10, 20, 30))] is more to the point. -- O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
