Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How to convert my first column to the row names

47 views
Skip to first unread message

koushik ayaluri

unread,
Feb 25, 2020, 7:01:56 PM2/25/20
to manipulatr
I have a gene expression dataset

> View (p53genes)


 

Gene symbol

WT1

WT2

WT3

MUT1

MUT2

1

NAT2

2.707238

2.960215

3.554969

2.219525

3.812129

2

NAT2

7.861489

7.128331

7.190403

7.481062

8.034329

3

ADA

6.624238

4.828936

6.467866

6.430245

2.221382

4

CDH2

6.676011

6.015457

6.293267

6.649966

4.123641

5

CDH2

4.508974

6.093028

5.223152

4.579542

6.144728


when I do


>p53genes2 <- rownames(p53genes)




I am getting "1" "2" "3" "4" as my rownames

So I did
rownames(p53genes) <- p53genes[,1]



Error: duplicate 'row.names' are not allowed

So how can I take my rownames as my genesymbols and not the numerics 1,2,3?

Thank you in advance for your responses.

Patrick Kilduff

unread,
Feb 25, 2020, 10:20:40 PM2/25/20
to koushik ayaluri, manipulatr
Hi Koushik,

What does:

> p53genes[,1] 

return?

Thank you,
Patrick





--
You received this message because you are subscribed to the Google Groups "manipulatr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to manipulatr+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/manipulatr/48caffb8-5f80-44db-8be2-cea5c435bd8d%40googlegroups.com.

mohammed imran Khan

unread,
May 12, 2020, 11:29:21 PM5/12/20
to manipulatr
Hi, I am having same issue. Did you find the solution yet? my raws and columns names are numerical by default. 
Thank you  

mohammed imran Khan

unread,
May 12, 2020, 11:35:22 PM5/12/20
to manipulatr
See figure attachment.
2 DF.png
Reply all
Reply to author
Forward
0 new messages