Skip to content

Commit 459552b

Browse files
committed
Merge branch 'master' of https://github.com/exi/AnomalyDetection into yy_merge_exi
2 parents 7ce8cf1 + 1b69f09 commit 459552b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

R/detect_anoms.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ detect_anoms <- function(data, k = 0.49, alpha = 0.05, num_obs_per_period = NULL
8787

8888
# protect against constant time series
8989
data_sigma <- func_sigma(data[[2L]])
90-
if(data_sigma == 0)
90+
if(is.na(data_sigma) || data_sigma == 0)
9191
break
9292

9393
ares <- ares/data_sigma

0 commit comments

Comments
 (0)