[R] barchart in lattice
    Dieter Menne 
    dieter.menne at menne-biomed.de
       
    Sun Nov  2 20:13:48 CET 2003
    
    
  
Bernd,
for counts use histogram instead of barchart, and leave the left side of the
formula empty.
library(lattice)
meta<-read.table("meta.txt",header=T)
histogram(~daten.COUNTRY|daten.STATUS,data=meta)
Check "scales" in xyplot (it's also valid for histogram) so you get the
names of the
countries as vertical x-labels instead of the numbers.
--------- You wrote ----
I have two factors 'country' and 'status' which I would like to plot via
barchart (lattice). 'status' consist of three different levels and should be
the grouping variable, i.e. there should be drawn three different panels and
within each panel a barchart of 'country'.
barchart(daten$COUNTRY|daten$STATUS),
barchart(table(daten$COUNTRY)|table(daten$STATUS)),
    
    
More information about the R-help
mailing list