[R] how to make row.names based on column1 with duplicated values

Stephen HonKit Wong stephen66 at gmail.com
Thu Mar 1 07:18:48 CET 2018

Dear All,
Suppose I have a dataframe like this with many thousands rows all with
different names:

I want to set column "gene" as row.names, but there are duplicates (c, d),
which I want to transform into this as row names: a, b, c-1, d-1, c-2, d-2,
c-3, f

Many thanks!


	[[alternative HTML version deleted]]

More information about the R-help mailing list