Compute density (vector)
1 2 |
1 2 3 4 5 6 7 8 | x <- runif(10)
d <- compute_density_vec(x)
plot(d$x_, d$density_, type = "l")
lines(stats::density(x, bw = 0.02), col = "red")
x <- runif(1e6)
system.time(stats::density(x, bw = 0.02 / 3))
system.time(compute_density_vec(x, bw = 0.02 / 3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.