How to take out a column of a heat-map using R
1
1
Entering edit mode
8.0 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 • 4.5k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
2
Entering edit mode
8.0 years ago
Michael 54k

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
ADD COMMENT
0
Entering edit mode

Thanks so much Michael!

ADD REPLY

Login before adding your answer.

Traffic: 2386 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6