hi here is my code:
my_function <- function(df, group_var, summary_var) {
df %>%
group_by(!!sym(group_var)) %>%
summarize(total = sum(!!sym(summary_var))) %>%
ungroup()
}
data_loop <- purrr::map(.f = my_function, df = my_data, group_var = var_list[3:4], summary_var = var_list[3:4])
error: argument .x is missing, with no default
anyone can assist me please when I try to run the loop thank you!