Closed alansz closed 7 years ago
That's because, by default, the "obvious" row names are removed at https://github.com/Rapporter/pander/blob/master/R/pandoc.R#L1133
If you don't like this behavior, you could add some whitespace to the row names that will be removed anyway:
> pander(table(tst$level,tst$value),row.names = paste('', 1:3))
----------------
N Y
-------- --- ---
**1** 0 2
**2** 1 1
**3** 1 1
----------------
But I'm happy to update the codebase not to remove obvious rownames if that's provided manually. Let me know if that suggestion makes sense to you.
I would have expected that if I gave row names explicitly, they'd be used, even if they were obvious, so I agree with your suggestion not to remove them when provided manually. Thanks!
Using: pander 0.6.1 under R3.3.1
When table row names are 1:nrow(x), they are not rendered by pandoc.table even when explicitly given by row.names.
To replicate:
I have found no way to force pandoc.table to show row names when they happen to be 1:nrow(x).