Learn R Programming

vectra (version 0.6.2)

relocate: Relocate columns

Description

Relocate columns

Usage

relocate(.data, ..., .before = NULL, .after = NULL)

Value

A new vectra_node with reordered columns.

Arguments

.data

A vectra_node object.

...

Column names to move.

.before

Column name to place before (unquoted).

.after

Column name to place after (unquoted).

Examples

Run this code
f <- tempfile(fileext = ".vtr")
write_vtr(mtcars, f)
tbl(f) |> relocate(hp, wt, .before = cyl) |> collect() |> head()
unlink(f)

Run the code above in your browser using DataLab