Friday, April 5, 2013

RG#13: Back to back histogram

#Back to back histograms
# data
set.seed(11233)

var1<- rnorm(1000,10,3)
var2 <- sample(c('A','B'),1000,TRUE)


#plot
 require(Hmisc)
 out <- histbackback(split(var1, var2), probability=TRUE, xlim=c(-.18,.18), main ='Back to Back Histogram')


 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.