I\'d like to print nicely-formatted data frames to paper, ideally from within a script. (I am trying to collect data using an instrument and automatically process and print
The printr package is a good option for printing data.frames
, help pages, vignette listings, and dataset listings in knitr documents.
From the documentation page:
options(digits = 4)
set.seed(123)
x = matrix(rnorm(40), 5)
dimnames(x) = list(NULL, head(LETTERS, ncol(x)))
knitr::kable(x, digits = 2, caption = "A table produced by printr.")