I am having an odd problem when it comes to emphasizing multiple rows in a table using pandoc.table. Specifically, the values in the table seem to be filled in inappropriately when more than 1 row is specified. For example, if I do not emphasize a row or only emphasize 1 row
library(pander)
A <- matrix(1:25, nrow=5)
pandoc.table(A)
1 6 11 16 21
2 7 12 17 22
3 8 13 18 23
4 9 14 19 24
5 10 15 20 25
bold <- c(4)
pandoc.table(A, emphasize.strong.rows=bold)
1 6 11 16 21
2 7 12 17 22
3 8 13 18 23
4 9 14 19 24
5 10 15 20 25
everything works beautifully, but when I specify multiple rows, the bolding occurs on the correct rows but the wrong values are placed in the cells
bold <- c(2, 4)
pandoc.table(A, emphasize.strong.rows=bold)
1 6 11 16 21
2 12 22 9 19
3 8 13 18 23
7 17 4 14 24
5 10 15 20 25
Any ideas what I am doing wrong? Thanks
Robert
R version 3.2.1 (2015-06-18) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] pander_0.5.2 HTGPackage_0.0.1
loaded via a namespace (and not attached): [1] tools_3.2.1 Rcpp_0.12.0 digest_0.6.8