search for: dfyr

Displaying 1 result from an estimated 1 matches for "dfyr".

Did you mean: dfr
2008 Dec 01
1
Help with lattice graphics
...yr<-c("2007","2008","2009");ny<-length(yr) fac_a<-factor(vec_a);fac_b<-factor(vec_b);fac_yr<-factor(yr) n<-na*nb*ny # y is the response variable y<-runif(n);y<-round(y,digits=1) dfa<-rep(fac_a,times=nb*ny) dfb<-rep(fac_b,each=na,times=ny) dfyr<-rep(fac_yr,each=na*nb) dataf<-data.frame(dfa=dfa,dfb=dfb,dfyr=dfyr,y=y);head(dataf) # dataf is the test data frame # First test with the lattice package library(lattice) barchart(y~dfb|dfyr,dataf,layout=c(3,1),beside=FALSE, ????????? groups=dfa, ????????? scales=list(x=list(rot=90)), ???????...