[R] how to create cumulative histogram from two independent variables?

Jim Lemon jim at bitwrit.com.au
Fri Jun 22 13:36:29 CEST 2007


Jose Borreguero wrote:
> Hi all,
> I am extremely newbie to R. Can anybody jump-start me with any clues as to
> how do I get a cumulative histogram from two independent variables,
> cumhist(X,Y) ?
> -jose
> 
Hi Jose,

Is this something like you want?

var1<-sample(1:10,100,TRUE)
var2<-sample(1:10,100,TRUE)
barplot(rbind(hist(var1,plot=FALSE)$counts,hist(var2,plot=FALSE)$counts))

Jim



More information about the R-help mailing list