1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-11 05:02:06 +02:00

pm_bind_rows

This commit is contained in:
2023-02-11 22:28:48 +01:00
parent b146de6d7f
commit c51fb24363
16 changed files with 282 additions and 275 deletions

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)])