[R] Histogram of multiple series on one histogram

Depire Alexandre depire at inrets.fr
Fri Jun 3 18:14:23 CEST 2005


Hello,
I have three sample, for example
	a<-c(10,20,10,20,30)
	b<-c(10,20,20,30,30)
	c<-c(20,20,10)

I would like to have only one histogram with these series,
I try the following code:
	hist(a)
	hist(b,add=TRUE,col="red")
	hist(c,add=TRUE,col="green")
but it's not that I want 

I would like an histogram with, from left to right, count of "10" for "a", 
count of "10" for "b", count of "10" for "c", count of "20" for "a", count of 
"20" for "b", ... not overlapped

Thanks


-- 
----------------
Alexandre DEPIRE
INRETS / GARIG
Tel.: (+33) 01 47 40 71 66
Fax: (+33) 01 45 47 56 06
2 av. du général Malleret-Joinville
94114 Arcueil - France




More information about the R-help mailing list