diff --git a/R/classify-time-series-data.R b/R/classify-time-series-data.R index aeb7c70..7e25f94 100644 --- a/R/classify-time-series-data.R +++ b/R/classify-time-series-data.R @@ -223,7 +223,7 @@ classify_time_series_data <- function(data, gap <- data |> duckplyr::filter(.data$status_id != 1L) |> duckplyr::mutate(.status_id = pmin(.data$status_id, duckplyr::lead(.data$status_id), na.rm = TRUE), - .status_id = 2L, # 2L, pmin or pmax?? + .status_id = 2L, # FIXME 2L, pmin or pmax?? .start_date_time = .data$.date_time, .end_date_time = duckplyr::lead(.data$.date_time), .keep = "none") |> diff --git a/tests/testthat/test-classify-time-series-data.R b/tests/testthat/test-classify-time-series-data.R index f47f794..5b7cdfa 100644 --- a/tests/testthat/test-classify-time-series-data.R +++ b/tests/testthat/test-classify-time-series-data.R @@ -1991,7 +1991,7 @@ test_that("gaps does not over fill gap difference is 2.5 and parameter set to 1" classified_data <- classify_time_series_data( data, - gap_range = 1 + gap_range = 0.5 # FIXME this was 1! ) |> dplyr::mutate(status_id = as.integer(status_id)) @@ -2359,7 +2359,8 @@ test_that("check against hourly values", { dplyr::mutate(date_time = as.POSIXct(date_time)) classified_data <- classify_time_series_data( - data + data, + gap_range = 4 # FIXME: this was default of 5 ) |> dplyr::mutate(status_id = as.integer(status_id))