Skip to contents

Computation of the peak value, of a density function with a gaussian kernel.

Usage

calc_peak_density(x)

Arguments

x

A numeric vector

Value

A numeric single value with the computed peak density value.

Examples


x <- rnorm(100)

plot(density(x))


calc_peak_density(x)
#> [1] 0.4891915