dm
tableRename columns of your dm
with a similar syntax to dplyr::rename()
.
cdm_rename(dm, table, ...)
A dm
object.
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(), ...
If key columns are renamed the meta-information of the dm
is updated accordingly
# NOT RUN {
cdm_nycflights13() %>%
cdm_rename(airports, code = faa, altitude = alt)
# }
Run the code above in your browser using DataLab