[R] length of a density curve (or any curve)

sylvain willart sylvain.willart at gmail.com
Fri Dec 4 13:41:22 CET 2009


Yes, sure (and I just did it again)
but I can't see an answer... did I miss sthg ?

regards,

SW

2009/12/4 milton ruser <milton.ruser at gmail.com>:
> hi Sylvain,
>
> did you try ?density
>
> regards
>
> milton
>
> On Fri, Dec 4, 2009 at 7:19 AM, sylvain willart <sylvain.willart at gmail.com>
> wrote:
>>
>> Hello R users,
>>
>> When I type
>>
>> d <- density(MyData$x)
>>
>> I obtain a density object I can plot,
>>
>> But I wonder if there is a way to easily compute the length of the
>> density curve ?
>>
>> ( I imagine I could compute the distances between the 512 equally
>> spaced points using their x and y, but does it exist a smarter way ?)
>>
>> Regards,
>>
>> SW
>>
>> ______________________________________________
>> R-help at 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.
>
>




More information about the R-help mailing list