[R] superimpose density line over hist

Albert Vilella avilella at gmail.com
Tue Dec 13 17:01:20 CET 2005


This certainly did the trick,

Thanks Ted, Sean, Romain, Dimitris, Lian and Andy,

>   alnlength<-rchisq(1000,4)
>   x<-0.25*(0:100)
>   hist(alnlength,breaks=0.25*(0:100))
>   lines(x,1000*dchisq(x,4)*0.25)

And apologies for my "newbieness" in the posting,

    Albert.




More information about the R-help mailing list