I have a dataset named bridge with columns: agg, col, FACTOR. All are character values I have a variable named var which is character but contain the name of a dimension that is used in another table. here for example var <- "accounting_entry" I want to rename the column "col" of my bridge table to accounting_entry. I try this
bridge <- bridge %>%
dplyr::rename(!!as.symbol(var) = col)
but i get the error message
Error: object 'ACCOUNTING_ENTRY' not found
Run `rlang::last_error()` to see where the error occurred.
Could you advice please. thanks