Skip to content
Prev 23071 / 398502 Next

density() returns a density function that does not add up to 1

Jonathan Li <jonqli at labs.agilent.com> writes:
You're trying to calculate and then integrate a very spiky density.
Try plotting it and then increase the number of points used to
approximate it:
[1] 1.000014
Warning message: 
longer object length
        is not a multiple of shorter object length in: diff(ddd$x) * ddd$y