rename.duckplyr_df: Rename columns

View source: R/rename.R

rename.duckplyr_dfR Documentation

Rename columns

Description

This is a method for the dplyr::rename() generic. See "Fallbacks" section for differences in implementation. rename() changes the names of individual variables using new_name = old_name syntax.

Usage

## S3 method for class 'duckplyr_df'
rename(.data, ...)

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.

...

For rename(): <tidy-select> Use new_name = old_name to rename selected variables.

For rename_with(): additional arguments passed onto .fn.

Fallbacks

There is no DuckDB translation in rename.duckplyr_df()

  • with a selection that returns no columns.

These features fall back to dplyr::rename(), see vignette("fallback") for details.

See Also

dplyr::rename()

Examples

library(duckplyr)
rename(mtcars, thing = mpg)

duckdblabs/duckplyr documentation built on March 5, 2025, 3:46 a.m.