c(0, 1, 10, 100, 1000, 10000) |> log_zero_inflated()
#For use in a function
sample.data.environment |>
dplyr::filter(Id == "Participant") |>
dplyr::group_by(Date = lubridate::wday(Datetime, label = TRUE, week_start = 1)) |>
dplyr::summarize(
TAT250 = duration_above_threshold(log_zero_inflated(MEDI),
Datetime,
threshold = log_zero_inflated(250)
)
)
#Calling exp_zero_inflated on data transformed with log_zero_inflated yields to the original result
c(0, 1, 10, 100, 1000, 10000) |> log_zero_inflated() |> exp_zero_inflated()
Run the code above in your browser using DataLab