Create tables with conditional formatting with RMarkdown + knitr
问题 I have a data frame and I want to output this in an HTML file through knitr and RMarkdown as a table with conditional formatting. Example: n <- data.frame(x = c(1,1,1,1,1), y = c(0,1,0,1,0)) > n x y 1 1 0 2 1 1 3 1 0 4 1 1 5 1 0 I want rows with different values of x and y to be highlighted. So in this case, that would be rows 1, 3 and 5. Would be nice if the output in the HTML file would be an HTML table, but failing that an image would be fine as well. 回答1: I always wanted to extend pandoc