outliers.inc: Filter outliers with masking

View source: R/lassoc.R

outliers.incR Documentation

Filter outliers with masking

Description

Set outliers in a vector to NA

Usage

outliers.inc(
  x,
  inc = rep(T, length(x)),
  m = mean(x[inc], na.rm = T),
  sdev = sd(x[inc], na.rm = T),
  t = 3
)

Arguments

x

numeric vector

inc

boolean vector with same length as x, used for masking. FALSE will set the element to NA in the corresponding position in x.

m

target center of acceptable interval after outlier removal, default to x's mean

sdev

target variation of acceptable interval, default to x's standard deviation

t

scale of deviation, default to 3

Value

x after setting outliers to NA


remnrem/luna documentation built on June 1, 2025, 2:14 p.m.