We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 288fb6e commit c0ae0d5Copy full SHA for c0ae0d5
R/import_expressions.R
@@ -548,7 +548,24 @@ import_expr <- list(
548
)
549
data <- data |>
550
dplyr::rename(Datetime = Date) |>
551
- dplyr::mutate(Datetime = lubridate::force_tz(Datetime, tz = tz))
+ dplyr::mutate(Datetime = lubridate::force_tz(Datetime, tz = tz),
552
+ dplyr::across(c(Lux, Dis),
553
+ \(x) {
554
+ dplyr::case_when(
555
+ x == -1 ~ "sleep_mode",
556
+ x == 204 ~ "out_of_range"
557
+ )
558
+ }, .names = "{.col}_status"),
559
+ Lux = dplyr::case_when(
560
+ Lux == -1 ~ NA,
561
+ .default = Lux
562
+ ),
563
+ Dis = dplyr::case_when(
564
+ Dis == -1 ~ NA,
565
+ Dis == 204 ~ NA,
566
567
568
569
})
570
571
0 commit comments