I'm using the excellent htmlTable
package for printing some results in rmarkdown. One of my tables shows values between 0 to 1. I have generated a vector of a 100 colors interpolated between white (#FFFFFF) and red (#FF5555) that I'd like to match to each cell's background depending on it's value.
The logical part is clear to me (multiply the cell's value by 100, than round and extract color from the corresponding index of the color vector).
What I'm not sure about is, having a matched a color for each cell, how do I make htmlTable
to paint it?
Thanks!