On Aug 19, 2013, at 7:35 PM, Gallon Li wrote:

> x=rchisq(100,1)
> density(x)
> 
> the density plot will give density for negative part also. of course I can
> truncate the plot to only view the non-negative part.
> 
> I wonder if there is a program to compute density for a user-specified
> range, in this case, only [0, infinity).

This has been asked and answered several times on this list.

-- 

David Winsemius
Alameda, CA, USA

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to