How To Generate Heatmap With Multiple Sidebars From Dataset In Format Of .Csv Using Heatmap.3
I find an example here using heatmap.3 function to generate heatmap with multiple sidebars. But the example dataset is not in the format of .csv. All my data is saved as .csv file with row and column names already. Thus, I wanna know how to generate heatmap with multiple sidebars from a .csv file. Any prompt response will be highly appreciated.
Best wishes
Jeff
• 4,688 views
•
link
0 answers
No answers yet.
Log in to answer this question.
You should read the documentation on ?read.csv first before asking multiple almost similar questions on the same topic. In your other post A: How to cluster .csv raw data and generate heatmap using heatmap.2 function in package gplots? you state that you solved your problem, but did not validate an answer nor wrote how you solved it. I am closing this as a duplicate.
Hi,
This question is different from the previous one because I am seeking a way to generate heatmap with multiple sidebars. The previous question is to find a way to simply generate a heatmap. With the response for the previous question, I do know how to generate a heatmap from a .csv file. But now, I wanna add sidebars to the map. I want to know how. The present question is different from the previous one absolutely, but they are related. Thanks.
Jeff
Ok, I see, but then it's possibly a duplicate of this: How do I draw a heatmap in R with both a color key and multiple color side bars? In fact it seems like Obi has created exactly what you need. So when you combine your first question with code using read.csv and the answer by Obi, you should be just fine.
Still, please validate an answer, also when a question is a follow up, it would be nice to state it in the question, a good habit because it gives hints about data and context.
Thanks for letting me know those good habits or rules here.
In the Obi's example, he used a dataset created using R and gave the row and column names of the matrix using paste function. But my data is saved in .csv files with row and column names already. I wanna know how I can adapt the method for my datasets because it will be great to show my original row and column names on the heatmap. Thanks.
So your question reduces to "how to read a csv file into R"? You did that already.