X <- 1:1000 # Pseudo Time
Y <- 5000 + rnorm(1000) # Pseudo Data
Outliers <- sample(1:1000, 10, replace =FALSE) # Index of Outliers
Y[Outliers] <- Y[Outliers] + sample(1:1000, 10, replace =FALSE) # Pseudo Outliers
tmp <- FindOutliersHampel(X, Y)
Run the code above in your browser using DataLab