Renames columns of a GPU table, similar to dplyr::rename(). Runs
entirely as a schema-only operation – no GPU work at all, since column
names are R-side metadata, never part of the underlying GPU table data.
Usage
# S3 method for class 'tbl_gpu'
rename(.data, ...)Arguments
- .data
A
tbl_gpuobject created bytbl_gpu().- ...
Use
new_name = old_nameto rename columns. Supports tidyselect renaming helpers, e.g.rename(df, all_of(c(a = "x"))).
Value
A tbl_gpu object with the requested columns renamed. Column
order, data, and types are unchanged. If .data is grouped and a
group column is renamed, group_vars() reflects the new name.
Details
Renaming a column to a name already used by a different, un-renamed
column errors, matching dplyr::rename(). A same-call swap (e.g.
rename(df, x = y, y = x)) is valid, since both original names are
replaced at once.
