Skip to content

Commit

Permalink
fixmes
Browse files Browse the repository at this point in the history
  • Loading branch information
joethorley committed Jan 22, 2025
1 parent b405e61 commit ec231e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/classify-time-series-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -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") |>
Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-classify-time-series-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down Expand Up @@ -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))

Expand Down

0 comments on commit ec231e3

Please sign in to comment.