[R] Gettting barchart titles as numbers not characters

From: Elizabeth Webb <e.c.webb97_at_leeds.ac.uk>
Date: Thu, 26 Jun 2008 13:55:12 +0100


Hi, I wonder if you could help me with my barcharts, I am using the barchart function from the lattice library.

I have data like this:
Complex,Organisms,Percentage

130,0,50
130,1,10
130,2,20
130,3,15
130,4,5
133,0,10
133,1,15
133,2,20
133,3,50
133,4,5

I draw barcharts using this command...
barchart(Percentage~Organisms|Complex,data=data,layout=c(1,2),col=rainbow(5),box.ratio=3,horizontal=FALSE,xlim=c(" 0 "," 1 "," 2 "," 3 "," 4
"),ylim=c(1,100),xlab="")

But I can't get the title for each graph with the titles "130" and
"133". The same was for the xlim, so I cheated by using spaces so it
thinks it is a character string not a number. If you know the proper way to do this, that would be great to know too. One last thing, the title comes up in a pink row above each barchart - any way to make this look a little more exciting? i.e. change colour, align to the left??

Many thanks

Liz



R-help_at_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. Received on Thu 26 Jun 2008 - 13:03:59 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 26 Jun 2008 - 14:31:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive