R/filter_processing_time_threshold.R

Defines functions filter_processing_time_threshold

filter_processing_time_threshold <- function(log, lower_threshold, upper_threshold, reverse, units) {

	lower_threshold <- ifelse(is.na(lower_threshold), -Inf, lower_threshold)
	upper_threshold <- ifelse(is.na(upper_threshold), Inf, upper_threshold)

	case_selection <- log %>%
		processing_time(level = "case", units = units) %>%
		mutate("processing_time" = as.numeric(.data[["processing_time"]])) %>%
		filter(between(processing_time, lower_threshold, upper_threshold)) %>%
		pull(1)

	filter_case(log, cases = case_selection, reverse = reverse)
}

Try the edeaR package in your browser

Any scripts or data that you put into this service are public.

edeaR documentation built on April 27, 2023, 9:07 a.m.