I need to export a data.frame to HTML file and color the backgroud of the table cell based a criteria.
Sample data.frame :
Name Low High Value1 Value2 Value3
Ben 3 10 2 5 8
Cat 3 10 3 9 4
Dan 3 10 5 7 6
Desire output is like :
I used below codes to generate the HTML, thank you for the help
HTMLheaderText ="Sample Report"
HTMLfile =HTMLInitFile(outdir = getwd()
, filename = "sample"
, extension = "html"
, Title = "R Output"
, CSSFile = paste(getwd(), "/html_tables.css", sep="")
, HTMLframe = FALSE
, useGrid = FALSE
, useLaTeX = FALSE)
HTML(HTMLheaderText, file = HTMLfile)
HTML(dataSet, row.names = FALSE)
HTMLEndFile()