Hi folks,

I know that density function will give a estimated density for a give dataset. Now from that I want to have a percentage estimation for a certain range. For examle:

> y = density(c(-20,rep(0,98),20))
> plot(y, xlim=c(-4,4))

Now if I want to know the percentage of data lying in (-20,2). Basically it should be the area of the curve from -20 to 2. Anybody knows a simple function to do it?

Thanks,

D.

______________________________________________
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