[R] superimpose density line over hist

Liaw, Andy andy_liaw at merck.com
Tue Dec 13 15:16:10 CET 2005


One thing to check:  Are the data in the same range as chisq with 4 df?

Andy

From: Albert Vilella
> Hi all,
> 
> I'm trying to superimpose a rchisq density line over a histogram with
> something like:
> 
> hist(alnlength)
> lines(density(rchisq(length(alnlength), 4)),col="red")
> 
> But the rchisq line won't appear anywhere,
> 
> Anyone knows what I am missing here?
> 
> Thanks in advance,
> 
>     Albert.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>




More information about the R-help mailing list