r - numbering of split table in pander -
using r + knitr + pander, reason wide table split more 2 subtables gets more 1 table number in resulting pdf.
for example, running r script test.r:
library(pander) dat <- data.frame(a = rep(1:2, 13), b = paste0(letters, "longtext")) pander(table(dat$a, dat$b))
via rmarkdown::render("test.r", "pdf_document")
produces pdf table split 5 pieces, first 4 pieces numbered table 1 table 4, last piece unnumbered. happens when table split more 2 pieces.
since 1 table, have 1 number in output (just when table split 2 pieces). how can accomplished?
regards, henrik
what disabling auto-generated "table continues below" caption?
> panderoptions('table.continues', '') > pander(table(dat$a, dat$b), caption = 'foobar') ----------------------------------------------------------------------- alongtext blongtext clongtext dlongtext elongtext flongtext ----------- ----------- ----------- ----------- ----------- ----------- 1 0 1 0 1 0 0 1 0 1 0 1 ----------------------------------------------------------------------- table: foobar (continued below) ----------------------------------------------------------------------- glongtext hlongtext ilongtext jlongtext klongtext llongtext ----------- ----------- ----------- ----------- ----------- ----------- 1 0 1 0 1 0 0 1 0 1 0 1 ----------------------------------------------------------------------- ----------------------------------------------------------------------- mlongtext nlongtext olongtext plongtext qlongtext rlongtext ----------- ----------- ----------- ----------- ----------- ----------- 1 0 1 0 1 0 0 1 0 1 0 1 ----------------------------------------------------------------------- ----------------------------------------------------------------------- slongtext tlongtext ulongtext vlongtext wlongtext xlongtext ----------- ----------- ----------- ----------- ----------- ----------- 1 0 1 0 1 0 0 1 0 1 0 1 ----------------------------------------------------------------------- ----------------------- ylongtext zlongtext ----------- ----------- 1 0 0 1 -----------------------
Comments
Post a Comment