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

sylvain willart sylvain.willart at gmail.com
Fri Dec 4 13:19:17 CET 2009

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 ?)



More information about the R-help mailing list