Open joshuafayallen opened 2 months ago
Thanks @joshuafayallen, great to hear you found it useful. I have a bunch of changes that I want to make to the website when I get time, so will hold off merging your PR for now. Also, I don’t think you need the lambda syntax for known functions like mean
with the latest dplyr. At least, that’s what I see from the docs, and I also don’t get a warning on my system.
Sorry for the late response! I lost wifi for a few weeks. I checked and I realized the reason dplyr
it will only warn you if you pass additional arguments like na.rm = TRUE
when you use across
.
penguins |>
group_by(species, island) |>
summarize(
across(c(bill_length_mm, bill_depth_mm), mean, na.rm = TRUE)
)
#> Warning: There was 1 warning in `summarize()`.
#> ℹ In argument: `across(c(bill_length_mm, bill_depth_mm), mean, na.rm = TRUE)`.
#> ℹ In group 1: `species = Adelie` and `island = Biscoe`.
#> Caused by warning:
#> ! The `...` argument of `across()` is deprecated as of dplyr 1.1.0.
#> Supply arguments directly to `.fns` through an anonymous function instead.
#>
#> # Previously
#> across(a:b, mean, na.rm = TRUE)
#>
#> # Now
#> across(a:b, \(x) mean(x, na.rm = TRUE))
#> `summarise()` has grouped output by 'species'. You can override using the
penguins |>
group_by(species, island) |>
summarize(
across(c(bill_length_mm, bill_depth_mm),\(x) mean(x, na.rm = TRUE))
)
#> `summarise()` has grouped output by 'species'. You can override using the
<sup>Created on 2024-06-06 with [reprex v2.1.0](https://reprex.tidyverse.org)</sup>
Hi Grant, Thanks for the awesome workshop! I added some updates to the
dplyr::across
syntax to eliminate some of the warnings.