📜  基于变量重命名列 - R 编程语言代码示例

📅  最后修改于: 2022-03-11 14:51:58.413000             🧑  作者: Mango

代码示例3
df <- rename(df, new_name = old_name) #For renaming dataframe column
 
tbl <- rename(tbl, new_name = old_name) #For renaming tibble column
 
tbl <- tbl %>% rename(new_name = old_name) #For renaming tibble column using dplyrpipe 
                                           #operator