Skip to content

Commit faa001a

Browse files
JBrandenburg02DavisVaughan
authored andcommitted
Updating the examples for across() to include an example for everything()
Fixes #7621
1 parent af481ab commit faa001a

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# dplyr (development version)
22

3+
* Updated `across()` examples to include an example using `everything()` (#7621, @JBrandenburg02).
4+
35
* Clarified how `slice_min()` and `slice_max()` work in the introduction vignette (#7717, @ccani007).
46

57
* `reframe()` has moved from experimental to stable (#7713, @VisruthSK).

R/across.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@
105105
#' iris <- as_tibble(iris)
106106
#'
107107
#' # across() -----------------------------------------------------------------
108+
#' # Using everything() to apply the same function to all columns
109+
#' iris |>
110+
#' mutate(across(everything(), as.character))
111+
#'
108112
#' # Different ways to select the same set of columns
109113
#' # See <https://tidyselect.r-lib.org/articles/syntax.html> for details
110114
#' iris |>

man/across.Rd

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)