Rename variables from a data.table.

rename(.df, ...)

Arguments

.df

A data.frame or data.table

...

new_name = old_name pairs to rename columns

Examples

df <- data.table(x = 1:3, y = 4:6)

df %>%
  rename(new_x = x,
         new_y = y)
#> # A tidytable: 3 × 2
#>   new_x new_y
#>   <int> <int>
#> 1     1     4
#> 2     2     5
#> 3     3     6