Dear Dr. Carbon, Perhaps (not lattice): barplot(t(foo),beside=TRUE,col=rainbow(6),ylim=c(0,max(foo)),names.arg=paste('Question',1:3), ylab='Your title here',xlab='Your title here') legend('topleft',colnames(foo),pch=15,col=rainbow(6),ncol=2,cex=1.1)
HTH, Jorge On Mon, Nov 17, 2008 at 3:40 PM, Dr Carbon <[EMAIL PROTECTED]> wrote: > I have a data.frame containing survey data that is already organized > like a table: > > > foo > Excellent Very Good Good Fair Poor Very Poor > Question 1 8 7 3 0 0 0 > Question 2 5 5 7 1 0 0 > Question 3 7 10 1 0 0 0 > > class(foo) > [1] "data.frame" > > > > I would like to make a barchart (or stripplot) with three barcharts, > one for each row in the data.frame foo. It seems like I have to coerce > foo to class table to use with barchart.table in lattice but a simple > as.table yields no fruit. Any help appreciated. > > ______________________________________________ > 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. > [[alternative HTML version deleted]] ______________________________________________ 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.