0

This probably has a simple fix, but I'm relatively new to using R and could use some assistance.

The toy data I'm using for a gene network analysis has rows that look like this:

1

whereas the data that I've uploaded has rows that look like this:

2.

The code I'm using refers to the row names to map on as gene names. I am able to successfully run this analysis, however, the output I end up with has lists of row numbers where there should be lists of gene names.

Is there a simple way that I can convert my data into the toy data format so that the row names are gene names instead of numbers?

MLavoie
  • 9,277
  • 40
  • 37
  • 54
swin5
  • 1
  • It's always easier to help if you can share a sample of data in the format you're working with. Screenshots leave a lot of ambiguity, unfortunately. Please include in the body of your question the output of `dput(head(TABLE1))` and `dput(head(TABLE2))` so that we can understand exactly what form your data is in and try out solutions. – Jon Spring Oct 21 '21 at 16:02
  • you will need to share a sample of the code you are using to get help with this. Otherwise we can't diagnose at what point the row names were lost. In the mean time, you could consider just converting the row names into a column https://stackoverflow.com/questions/29511215/convert-row-names-into-first-column – dww Oct 21 '21 at 16:03
  • Given the dearth of information, I'll go out on a limb and suggest `rownames(yourdata) – r2evans Oct 21 '21 at 16:38
  • @r2evans that suggestion resolved my issue! I'll make sure to include more context and sample code for future questions. Thanks for all of the replies! – swin5 Oct 21 '21 at 17:47

0 Answers0