Why? And how to solve it?  The code and result are following,


> data=rnorm(50)
>
> kde=density(data,n=20,from=-1,to=10)
>
> kde$x;kde$y
 [1] -1.0000000 -0.4210526  0.1578947  0.7368421  1.3157895  1.8947368
 [7]  2.4736842  3.0526316  3.6315789  4.2105263  4.7894737  5.3684211
[13]  5.9473684  6.5263158  7.1052632  7.6842105  8.2631579  8.8421053
[19]  9.4210526 10.0000000
 [1]  2.422392e-01  3.877025e-01  4.746580e-01  2.757747e-01  1.787630e-01
 [6]  1.102396e-01  2.331694e-02  3.294412e-04  2.260746e-07  6.996146e-12
[11] -1.179461e-18 -1.226790e-17  8.892545e-18  1.144173e-17 -1.881253e-17
[16] -2.782621e-17 -5.314722e-18 -1.691545e-17 -1.986261e-17 -2.498227e-17

Best,

Junjie Li

 Tsinghua Univercity

	[[alternative HTML version deleted]]

