Open charliejhadley opened 7 months ago
I find the docs for c_across() imply the requirement for a rowwise() call which isn't required.
c_across()
rowwise()
Here's a reprex using {palmerpenguins} and another using base R's mtcars
library("tidyverse") library("palmerpenguins") penguins %>% group_by(island) %>% summarise(max_dimension = max(c_across(ends_with("mm")), na.rm = TRUE)) #> # A tibble: 3 × 2 #> island max_dimension #> <fct> <dbl> #> 1 Biscoe 231 #> 2 Dream 212 #> 3 Torgersen 210 mtcars %>% select(wt, drat, carb, gear) %>% group_by(gear) %>% summarise(max_value = max(c_across(where(is.numeric)))) #> # A tibble: 3 × 2 #> gear max_value #> <dbl> <dbl> #> 1 3 5.42 #> 2 4 4.93 #> 3 5 8
I haven't got a good idea of what I think could be added to the docs so I'm logging the issue now and will try to come back later
I find the docs for
c_across()
imply the requirement for arowwise()
call which isn't required.Here's a reprex using {palmerpenguins} and another using base R's mtcars
I haven't got a good idea of what I think could be added to the docs so I'm logging the issue now and will try to come back later