Pick now in dplyr
This commit is contained in:
@@ -41,14 +41,6 @@ library(tidyverse)
|
||||
library(nycflights13)
|
||||
```
|
||||
|
||||
This chapter also relies on a function that hasn't yet been implemented for dplyr but will be by the time the book is out:
|
||||
|
||||
```{r}
|
||||
pick <- function(cols) {
|
||||
across({{ cols }})
|
||||
}
|
||||
```
|
||||
|
||||
## Vector functions
|
||||
|
||||
We'll begin with vector functions: functions that take one or more vectors and return a vector result.
|
||||
|
||||
@@ -38,14 +38,6 @@ We're going to use just a couple of purrr functions from in this chapter, but it
|
||||
library(tidyverse)
|
||||
```
|
||||
|
||||
This chapter also relies on a function that hasn't yet been implemented for dplyr but will be by the time the book is out:
|
||||
|
||||
```{r}
|
||||
pick <- function(cols) {
|
||||
across({{ cols }})
|
||||
}
|
||||
```
|
||||
|
||||
## Modifying multiple columns {#sec-across}
|
||||
|
||||
Imagine you have this simple tibble:
|
||||
|
||||
Reference in New Issue
Block a user