mdTable {Pmisc} | R Documentation |
Markdown tables with pandoc-crossref support
mdTable(x, col.just = "r", guessGroup = FALSE, ..., mdToTex = "auto")
x |
a matrix or data frame |
col.just |
horizontal justification of text in cells |
guessGroup |
attempt to guess cgroup and rgroup, for reshape2 output |
... |
|
mdToTex |
if |
latex
is called if mdToTex
is TRUE
. Otherwise,
htmlTable
is called if arguments such as cgroup
are present
and kable
is called to produce a markdown table.
Captions with labels suitable for pandoc-crossref are added. If not provided, the
label is tbl:
followed by the chunk label.
When mdToTex
is 'auto'
(the default), it is set to
any(commandArgs()=='mdToTex', na.rm=TRUE)
character string which knitr prints 'asis'
mytable = as.data.frame(matrix(runif(6),,3)) names(mytable) = month.name[1:ncol(mytable)] cat(mdTable(x=mytable, digits=3, caption = 'the table', caption.loc='bottom', mdToTex=FALSE))