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

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

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

Thanks so much Michael!

ADD REPLY

Login before adding your answer.

Traffic: 1912 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