I am a beginner in r and I am currently trying to change the name of my variables. There is a column called "var" and the column has two variables: Índice de volume de vendas no comércio varejista and Índice de receita nominal de vendas no comércio varejista, respectively. I would like to rename the first variable to "volume" and the second one to "receita". In order to do this I already tried to use the rename function, but it is not working. I already tried the following code:
rename(pmc_rvar, volume = Índice de volume de vendas no comércio varejista (Número-índice))
The following answer appears: Erro: unexpected symbol in "rename(pmc_rvar, volume = Índice de"