Interactive heatmap in R

Viewed 1510

My dataframe looks like:

      rankA      rankB     V1       V2
1     0-1 w      1-2 t     8.636042 10.43002
2     0-1 w      3-5 t     6.495266 10.52126
3     0-1 w      6-10 t    5.480639 10.56230
4     0-1 w      +10 t     4.897840 10.64759
5     2-3 w      1-2 t     7.677400 10.45409
6     2-3 w      3-5 t     5.420535 10.47965
7     2-3 w      6-10 t    4.499810 10.51640
8     2-3 w      +10 t     3.496508 10.44883

I need an interactive heatmap. I say interactive because of:

  • I need to plot rank A on X-axis
  • I need to plot rank B on Y-axis
  • I need to colour squares by V1
  • When the mouse pointer is over one square, a message box must show the V2 value.

I have just seen the heatmaply documentation, but I don't know how reproducing mtcars heatmaply to my case (tidyverse library?).

Any ideas? Are there other packages?

1 Answers
Related