pm_bind_rows

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2023-02-11 22:28:48 +01:00
1 parent b146de6d7f
commit c51fb24363
16 files changed
+282 -275

No files matched your search

+2 -2
View File
@@ -322,7 +322,7 @@ sir_calc_df <- function(type, # "proportion", "count" or "both"
}
out_new <- cbind(group_values, out_new)
}
out <- bind_rows2(out, out_new)
out <- pm_bind_rows(out, out_new)
}
}
out
@@ -331,7 +331,7 @@ sir_calc_df <- function(type, # "proportion", "count" or "both"
# based on pm_apply_grouped_function
apply_group <- function(.data, fn, groups, drop = FALSE, ...) {
grouped <- pm_split_into_groups(.data, groups, drop)
res <- do.call(bind_rows2, unname(lapply(grouped, fn, ...)))
res <- do.call(pm_bind_rows, unname(lapply(grouped, fn, ...)))
if (any(groups %in% colnames(res))) {
class(res) <- c("grouped_data", class(res))
res <- pm_set_groups(res, groups[groups %in% colnames(res)])