Is there a way to conditional format a column of a tableGrob or gtable object and color (Red, yellow or Green) it based on a conditional format? For instance:
library(gridExtra)
library(grid)
d = head(iris, 20)
d
grob=tableGrob(d)
I wish to change Sepal.Width and color it based on the values of Petal.Length. If Petal.Length = 1.1 then set it to red, if it is 1.4 then set it to yellow and if it is 1.7 set it to green.