On Tue, Mar 23, 2010 at 7:21 AM, Veerappa Chetty <chett...@gmail.com> wrote: > Hi, > Please help to correct my error in the following. I want to plot the values > of 'x" in increasing order. > ----------------------------------- > library(lattice) > Name<-c("A","B","C") > x<-c(15,20,10) > test<-data.frame(Name,x) > dotplot(Name~x,test) > dotplot(reorder(Name,x)~x,test) > > "reorder" has no effect!
It has for me: > Name [1] "A" "B" "C" > reorder(Name,x) [1] A B C attr(,"scores") A B C 15 20 10 Levels: C A B Are you using a recent enough R? -Deepayan ______________________________________________ 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.