Rapporter / pander

An R Pandoc Writer: Convert arbitrary R objects into markdown
http://rapporter.github.io/pander/
Open Software License 3.0
294 stars 66 forks source link

emphasize.rows scrambles table contents #226

Closed pteetor closed 9 years ago

pteetor commented 9 years ago

This code demonstrates that emphasize.rows can scramble the contents of a table. Please notice that the contents of the formatted table are out of order. (This is version 0.5.2 of pander.)

> library(pander)
> mat = matrix(1:10, 5, 2)
> mat
     [,1] [,2]
[1,]    1    6
[2,]    2    7
[3,]    3    8
[4,]    4    9
[5,]    5   10
> pandoc.table(mat, emphasize.rows=1:5)
--- ----
*1* *8* 
*6* *4* 
*2* *9* 
*7* *5* 
*3* *10*
--- ----
daroczig commented 9 years ago

Thank you very much for reporting this, but hopefully this was already fixed in the dev version at #177:

> devtools::install_github('rapporter/pander')
> pander::pandoc.table(mat, emphasize.rows=1:5)

--- ----
*1* *6* 

*2* *7* 

*3* *8* 

*4* *9* 

*5* *10*
--- ----
pteetor commented 9 years ago

Gergely:

Thank you for responding so quickly! I apologize for raising an issue that was already solved.

Congratulations on creating pander. It's a wonderful package.

Paul

daroczig commented 9 years ago

Hi Paul,

it's better to report an issue twice than never :) And thank you very much for your kind words, highly appreciated.

Best, Gergely