Outliers treatment

treat_outliers(x, plot = FALSE, replace = TRUE)

Arguments

x

a time series

plot

a boolean; plot time series or not

replace

a boolean; replace outliers or not? (if TRUE, creates a new time series)

Examples


x <- rnorm(100)
x[5] <- 10
x[10] <- 10
x[20] <- 10
x[70] <- 10
after::treat_outliers(x, plot = TRUE)