How to take out a column of a heat-map using R
1
1
Entering edit mode
5.1 years ago
Vanceed ▴ 30

This might seem like a very basic programming question but I generated a heat map using R but need to remove a column and have 2 columns instead of 3. What is the code to do so? Thanks so much.

R heat-map coding programming • 2.6k views
0
Entering edit mode

Could provide some sample code with which you generated the heatmap?

2
Entering edit mode
5.1 years ago

Say your matrix is called x and you are using heat.map as a function and you want to remove the second column:

heat.map(x[,-2]) # removes 2. col from matrix x

0
Entering edit mode

Thanks so much Michael!