rowwise()
+ c_across()
is generally super slow. You could use pmap()
in combination with across()
for a faster option that is still tidyverse friendly:
library(tidyverse)
mtcars %>%
mutate(maxval = pmap(across(one_of(c("drat", "wt"))), ~max(c(...))))
Though probably still slower than the invoke()
/ exec()
based approach by @akrun...