Skip to content

Commit

Permalink
Fixed duplicate outliers
Browse files Browse the repository at this point in the history
  • Loading branch information
robjhyndman committed Nov 29, 2019
1 parent df32154 commit d914c9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/clean.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ tsoutliers <- function(x, iterate=2, lambda=NULL) {
tmp <- tsoutliers(x, iterate = 1, lambda = lambda)
if (length(tmp$index) > 0) # Found some more
{
outliers <- sort(c(outliers, tmp$index))
outliers <- sort(unique(c(outliers, tmp$index)))
x[outliers] <- NA
x <- na.interp(x, lambda = lambda)
}
Expand Down

0 comments on commit d914c9e

Please sign in to comment.