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

Quality-of-life request: Invisibly return table in pander.data.frame and pandoc.table #353

Closed dhicks closed 2 years ago

dhicks commented 3 years ago

pander.data.frame() returns NULL, and from its documentation it's not obvious that this is intended and that the call needs to be replaced with pandoc.table.return() to return the table. I spent a very confusing half-hour this morning trying to figure out why a bit of debugging code appeared to generate the table but didn't write anything to disk.

daroczig commented 2 years ago

I'm sorry that this is confusing, but the original design of the package and the generic pander S3 approach was designed this way. From its documentation:

image

I hope this helps -- closing the issue, but please reopen if you have any further concerns or create a PR to update/fix docs.