kernel_smoother: Function to apply kernel smoothing functions.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/kernel_smoother.R

Description

kernel_smoother is used to transform a vector.

Usage

1
kernel_smoother(x, kernel = "gaussian")

Arguments

x

Vector to transform/smooth.

kernel

Type of smoothing kernel to apply to x. See details for supported methods.

Details

Current kernels which are supported are:

Value

Vector the length of x.

Author(s)

Stuart K. Grange

See Also

wikipedia

Examples

1
2
3
4
5
6
7
8
9
# Create vector
vector <- seq(-5, 5, by = 0.1)

# Transform
vector_smooth <- kernel_smoother(vector, "gaussian")

# Or use a different kernel
vector_smooth_epanechnikov <- kernel_smoother(vector, "epanechnikov")
# plot(vector_smooth_epanechnikov, type = "l")

skgrange/enlightenr documentation built on May 30, 2019, 1:03 a.m.