[R] using reorder in dotplot
David Winsemius
dwinsemius at comcast.net
Tue Mar 23 04:09:05 CET 2010
On Mar 22, 2010, at 9:51 PM, Veerappa Chetty 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!
Are you sure? It appears to do so on my machine.
> sessionInfo()
R version 2.10.1 RC (2009-12-09 r50695)
x86_64-apple-darwin9.8.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Matrix_0.999375-32 lattice_0.17-26
loaded via a namespace (and not attached):
[1] grid_2.10.1 tools_2.10.1
--
David.
> Thanks.
> Chetty
> ------------------------
>
> --
> Professor of Family Medicine
> Boston University
> Tel: 617-414-6221, Fax:617-414-3345
> emails: chettyvk at gmail.com,vchetty at bu.edu
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list