[R] Problem with duplicates in row.names
J Toll
jctoll at gmail.com
Sat Sep 8 03:44:01 CEST 2012
On Fri, Sep 7, 2012 at 11:04 AM, STADLER Frederic
<frederic.stadler at unifr.ch> wrote:
> Hello,
> I am drawing a heatmap with hundreds of genes. Everything work fine, except when I want to had the name of the genes as the row.names with
>>row.names (a)<-a$Name
> And there's this things that duplicate are not allowed...
>
> How can I do to allow duplicates ??? I don't have the choice I can't just have numbers .
You might consider using make.unique():
row.names (a) <- make.unique(a$Name)
HTH
James
More information about the R-help
mailing list