Skip to main content
Bumped by Community user
edited title
Link
user438383
  • 6.2k
  • 10
  • 29
  • 47

heatmap.2 rstudio row labels don't show on heatmap

Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
edited tags
Link
Phil
  • 8.1k
  • 3
  • 40
  • 76
Bumped by Community user
Source Link
Gene100
  • 141
  • 2
  • 4
  • 10

heatmap.2 rstudio row labels don't show on heatmap

I have a tab separated data text file (Data.txt) with 13 columns and 90 rows. It has a header row (sample values) and the 1st column is sample names.

When I load my data into a data matrix my 1st column sample names don't show. They are all replaced with NA. I believe this causes the sample names not to show up as column labels on the heatmap.

Here is my simple script:

library(gplots)
y <- data.matrix(Data)
heatmap.2(y, main=K12_Ancient_Calculator, trace="none", 
          margins = c(10,12), cexRow=0.5)

Any ideas what needs to be done so that the sample names in the 1st column of my data file show up in y (data matrix). Currently they show up as NA.

I have noticed that in my version of Rstudio there is no option to declare 1st column of data file as "labels" when using the "import dataset" feature.

All feedback greatly appreciated.