What is the best way to achieve the same result as: Kernel estimation of log-pdf
using ggplot2 instead of base graphics? I would like to do it with something similar to stat_density
as otherwise things get quickly complicated when combined with faceting etc.
library(ggplot2)
x = rnorm(100)
dev.new(width=4, height=4)
qplot(x, stat='density', geom='line') + scale_y_log10()