I am using the 'across' function to get the summary statistics for a series of variables (for example, all variables that starts with 'f_'. Since the across function will store the summarised results back to the original variable names, having multiple across functions with different summarising functions would overwrite the results (as shown below). I can think of a work-around by renaming the variables after summarise() and cbind the resulting individual tables. However, that seems cumbersome, and I am wondering if there is a tidy (pun intended) way to store the series of summarised results to new variable names.
var_stats = data %>%
summarise(
across(starts_with('f_'), max, na.rm = T),
across(starts_with('f_'), min, na.rm = T)
)