Skip to content
Prev 174903 / 398506 Next

Density estimation: scale back for calendar time

I am afraid your notion of a "concrete idea" is less concrete than  
what I would need to understand what you are requesting. Your first  
lines of example code should be:

library(<if the density function is not from stats>)
    <sample data construction of x>
density(x, <some set of parameters>)

... since  stats::density() by default would return 512 y estimates,  
even if the length of x were longer.

 > x <- rnorm(3471)
 > plot(density(x))
 > str(density(x))
List of 7
  $ x        : num [1:512] -3.98 -3.96 -3.94 -3.93 -3.91 ...
  $ y        : num [1:512] 7.98e-06