tef_runningMean: 1-dimensional Gaussian smoothing

View source: R/tef_runningMean.R

tef_runningMeanR Documentation

1-dimensional Gaussian smoothing

Description

Runs a Gaussian or Cauchy density estimate centered over each element [numeric, logical, or NA] of the vector, and calculates a density-weighted average for that element's index.

Usage

tef_runningMean(x, k_hwhm = 2, distr = "gaussian")

Arguments

x

vector to be smoothed

k_hwhm

The half-width half-max of the kernal [when Gaussian = sd*1.17741]. This is the index distance at which an element receives half the weight of the element at the center of the smooothing.

distr

The distribition's density function to be used. 'gaussian' or 'cauchy'


akcochrane/TEfits documentation built on June 12, 2025, 11:10 a.m.