Background
I have a dataset, df. Whenever I try and rename the 'TanishaIsCool' column, I get an error: unexpected string constant. I wish to add spaces within my column name
TanishaIsCool Hello
hi hi
This is what I am doing:
df1 <- df %>% rename(Tanisha Is Cool = `TanishaIsCool` )
Desired output
Tanisha Is Cool Hello
hi hi
dput
structure(list(TanishaIsCool = structure(1L, .Label = "hi", class = "factor"),
Hello = structure(1L, .Label = "hi", class = "factor")), class = "data.frame", row.names = c(NA,
-1L))