powered by
This is a method for the dplyr::relocate() generic. See "Fallbacks" section for differences in implementation. Use relocate() to change column positions, using the same syntax as select() to make it easy to move blocks of columns at once.
dplyr::relocate()
relocate()
select()
# S3 method for duckplyr_df relocate(.data, ..., .before = NULL, .after = NULL)
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.
<tidy-select> Columns to move.
tidy-select
<tidy-select> Destination of columns selected by .... Supplying neither will move columns to the left-hand side; specifying both is an error.
...
There is no DuckDB translation in relocate.duckplyr_df()
relocate.duckplyr_df()
with a selection that returns no columns.
These features fall back to dplyr::relocate(), see vignette("fallback") for details.
vignette("fallback")
df <- duckdb_tibble(a = 1, b = 1, c = 1, d = "a", e = "a", f = "a") relocate(df, f)
Run the code above in your browser using DataLab