[R] (Small) problem with barchart

Lauri Nikkinen lauri.nikkinen at iki.fi
Sun Feb 3 16:58:19 CET 2008


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



More information about the R-help mailing list