Column to rowname

Trying to make the first column in the data set below become a rowname:

head(data, 4)

R_Saúde             Ano `Baixo peso` Eutrófico Sobrepeso Obesidade
  <chr>             <dbl>        <dbl>     <dbl>     <dbl>     <dbl>
1 Baixada Litorânea  2018          303       602       453       365
2 Noroeste           2018          370       829       609       515
3 Metropolitana I    2018         2137      4141      3376      3261
4 Norte              2018          325       733       612       474

but whatever I try, I get :

Erro: Column name `R_Saúde` must not be duplicated.

Any suggestion?

Do you want to pivot the data? What do you want it to look like?

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.