Perhaps,

letters <- c("f","a", "j","i","d","e")
a <- c(18,15,12,12,9,6)
df <- data.frame(letters, a)

library(lattice)
barchart(reorder(df$letters, df$a) ~ df$a)

-Lauri

______________________________________________
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.

Reply via email to