dm (version 0.0.3.9003)

cdm_rename: Rename one or more columns of a dm table

Description

Rename columns of your dm with a similar syntax to dplyr::rename().

Usage

cdm_rename(dm, table, ...)

Arguments

dm

A dm object.

table

A table in the dm

...

One or more unquoted expressions separated by commas. You can treat variable names like they are positions, so you can use expressions like x:y to select ranges of variables.

Use named arguments, e.g. new_name = old_name, to rename selected variables.

The arguments in ... are automatically quoted and evaluated in a context where column names represent column positions. They also support unquoting and splicing. See vignette("programming", package = "dplyr") for an introduction to these concepts.

See select helpers for more details and examples about tidyselect helpers such as starts_with(), everything(), ...

Details

If key columns are renamed the meta-information of the dm is updated accordingly

Examples

Run this code
# NOT RUN {
cdm_nycflights13() %>%
  cdm_rename(airports, code = faa, altitude = alt)
# }

Run the code above in your browser using DataLab