1
votes

I have data matrix, it's format is dataframe.# I want to add rownames(>2000) to it, but I face with this error:

duplicate 'row.names' are not allowed

but I have to have some row with the same name. how can I overcome this problem ? is it possible to have same row name with different index like A A1, A3 and R add it automatically ?

1

1 Answers

3
votes

You can use make.unique function

make.unique(c('a','a','b','c'))
# [1] "a"   "a.1" "b"   "c"