Conditionally formatting cells in one column by comparing it with the value from another column using Kable
问题 I am new to R and we know in Excel it is very easy to conditionally format a cell (change the background colour) by comparing with another column. I tried to do this in R using KableExtra. But I could not succeed in fetching value from another row and comparing it. My task was making a cell to appear green, yellow or red by comparing a cell on another column in the same row. library(kableExtra) library(dplyr) library(knitr) multirow_spec <- function(x, rows, ...) { for (row in rows) x <-