rename column with variable

PHOTO EMBED

Tue Apr 16 2024 16:13:11 GMT+0000 (Coordinated Universal Time)

Saved by @vs #r

column_name <- "my_col"
value <- 0
dplyr::mutate(df, !!rlang::sym(column_name) := value)
content_copyCOPY