Is there a way to allow duplicates in your data? I am creating multivariate graphs and need to change the names for one of the graphs to values that range 1-4. My code and error message is below:
Error in .rowNamesDF<-(x, value = value) :
duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique values when setting 'row.names': ‘1’, ‘2’, ‘3’, ‘4’
It is not possible to have duplicate row names, but a simple workaround is creating an extra column (e.g. label) that holds the name that you would assign to your rows. You can then use this column for the names in the graph instead.
The excel file I am pulling from is using a separate sheet that only contains these names and no data in order to do just this, however, the code I provided above is not functioning as intended.
Maybe it's best to create a reprex. A reprex consists of the minimal code and data needed to recreate the issue/question you're having. You can find instructions how to build and share one here: