Custom Table

updated on Tue Sep 10 17:04:11 2013

custom css {xtable}

download these two files(right click, “save link”): style.R, custom.css, and put them in the same directory with .Rmd file. Then run

source("style.R")

After that, knit your .Rmd to HTML

library(xtable)
print(xtable(head(iris, 10)), type = "html", include.rownames = F)
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
5.10 3.50 1.40 0.20 setosa
4.90 3.00 1.40 0.20 setosa
4.70 3.20 1.30 0.20 setosa
4.60 3.10 1.50 0.20 setosa
5.00 3.60 1.40 0.20 setosa
5.40 3.90 1.70 0.40 setosa
4.60 3.40 1.40 0.30 setosa
5.00 3.40 1.50 0.20 setosa
4.40 2.90 1.40 0.20 setosa
4.90 3.10 1.50 0.10 setosa

reference