R - Conditional row highlighting in HTML table created using xtable or kable
问题 I'm pretty much a beginner at programmatically formatting R output, but I've got a basic understanding of knitr , xtable , Markdown, and Pandoc's ability to convert one markup format to another. What I want to do is write an R dataframe df to an HTML table, and apply a particular color to each row that meets a condition (e.g., df$outcome == 1 ). However, I'm not sure which package would accomplish this in a simple and efficient way, but from browsing a few table formatting threads (xtable