So the only advantage to ggplot2 over heatmap.2 in terms of making a nice looking heatmap is if you're already using ggplot2 somewhere else in your R script? This would make sense from a code reuse statement and keeping things as simple as possible.
I have read that "There is no specific heatmap plotting function in ggplot2" on http://learnr.wordpress.com/2010/01/26/ggplot2-quick-heatmap-plotting/
I usually use heatmap.2 in my work after loading in the required gplots package, but I am wondering if ggplots2 is more powerful to use (or the same, or worse than heatmap.2)...
Also, a heatmap.3 option came out not too long ago, but from first inspection I couldn't find anything that heatmap.3 could do that heatmap.2 couldn't. I am probably wrong though. Any input on this issue is appreciated.
2 answers
The only big benefit to using ggplot2 is if you already have your data formatted for it (e.g., you're using ggplot2 elsewhere in a given workflow). Otherwise, it's often simpler to just use heatmap.2 on a matrix. I suppose you can prettify a ggplot2 heatmap a bit more, but whether that constitutes "better" or not will be really situation dependent.
You mean something like this? https://blog.rstudio.org/2015/06/24/d3heatmap/
Something like that, but not limited to an R session.
Log in to answer this question.
Is there something heatmap.2 doesn't do, that you need it to do?
Not necessarily, which is also part of the reason for my question...
I can't speak for heatmap.2 since I never used it, but in my experience ggplot2's geom_tile() can be used to make very nice heatmaps.
I looked at the geomtile() feature and, even though this may be a matter of personal taste, heatmap.2 seems "nicer" looking, it seems that heatmap.2 was natively built for performing such tasks, whereas ggplot2 was built as a universal graphics tool (where making a heatmap is just one of the features, but not its specialty). Do you agree with this? Also, does the geomtile() feature have all the extra options capabilities that heatmap.2() has natively included (e.g., dendrograms, color keys, etc.)?