# NOT RUN {
if (!requireNamespace("furrr", quietly = TRUE)) {
stop("Please install the furrr package to run these following examples.")
}
# }
# NOT RUN {
library(furrr)
plan(multiprocess)
my_diag <- function(...) {
data <- list(...)
fit <- lm(Count ~ Time, data = data)
tibble(fitted = fitted(fit), resid = residuals(fit))
}
pedestrian %>%
group_by_key() %>%
nest() %>%
mutate(diag = future_map(data, ~ future_pslide_dfr(., my_diag, .size = 48)))
# }
# NOT RUN {
# nocov start
# }
Run the code above in your browser using DataLab