pull.duckplyr_df {duckplyr} | R Documentation |
Extract a single column
Description
This is a method for the dplyr::pull()
generic.
See "Fallbacks" section for differences in implementation.
pull()
is similar to $
.
It's mostly useful because it looks a little nicer in pipes,
it also works with remote data frames, and it can optionally name the output.
Usage
## S3 method for class 'duckplyr_df'
pull(.data, var = -1, name = NULL, ...)
Arguments
.data |
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details. |
var |
A variable specified as:
The default returns the last column (on the assumption that's the column you've created most recently). This argument is taken by expression and supports quasiquotation (you can unquote column names and column locations). |
name |
An optional parameter that specifies the column to be used
as names for a named vector. Specified in a similar manner as |
... |
For use by methods. |
Fallbacks
There is no DuckDB translation in pull.duckplyr_df()
with a selection that returns no columns.
These features fall back to dplyr::pull()
, see vignette("fallback")
for details.
See Also
Examples
library(duckplyr)
pull(mtcars, cyl)
pull(mtcars, 1)