The gaussianShape() function computes a personnalisable Gaussian function. Default values are the same as in stats::dnorm().

gaussianShape(x, optx = 0, opty = 1/sqrt(2 * pi), width = 1, pow = 2)

Arguments

x

a numeric vector.

optx

x-values at which the maximum is reached.

opty

extremum value.

width

width of the bell.

pow

a real number.

Value

A vector containing values standing for categories into which elements of x have fallen.

See also

Examples

gaussianShape(0)
#> [1] 0.3989423
plot(gaussianShape(1:1000, 500, 2, 250, pow=5), type='l')