Finding Modes Using Kernel Density Estimates

density_mode(x, na.rm = FALSE)

Arguments

x

Numeric vector

na.rm

Should NAs be removed? Default is FALSE

Source

Website page https://rmflight.github.io/post/finding-modes-using-kernel-density-estimates/

Value

Mode estimate

Examples

density_mode(rnorm(100))
#> [1] -0.1769384