method_norm_1d | R Documentation |
Function used to specify univariate normal density estimator
for get_hdr_1d()
and layer functions (e.g. geom_hdr_rug()
).
method_norm_1d()
For more details on the use and implementation of the method_*_1d()
functions,
see vignette("method", "ggdensity")
.
# Normal estimators are useful when an assumption of normality is appropriate df <- data.frame(x = rnorm(1e3)) ggplot(df, aes(x)) + geom_hdr_rug(method = method_norm_1d()) + geom_density() # Can also be used with `get_hdr_1d()` for numerical summary of HDRs res <- get_hdr_1d(df$x, method = method_norm_1d()) str(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.