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

Option to prevent row names from appearing in a pander table #301

Closed stevenranney closed 7 years ago

stevenranney commented 7 years ago

This answer on StackOverflow suggests that Pander removes row names automatically when the row names start with 1. When row names don't start with 1, there's no way to remove the row names if the data are in a dataframe:

data.frame(a = sample(LETTERS, 10), 
                  b = sample(LETTERS, 10)) %>%
tail(5) %>% 
pander()

produces

----------------
     a   b 
-------- --- ---
 **6**    Y   B 

 **7**    F   O 

 **8**    B   H 

 **9**    R   Y 

 **10**   W   X 
----------------

Can Pander be updated to include a method for preventing the inclusion of row names in a table?

I'm using Pander v0.6.0 with R 3.3.0 on Windows 7.

daroczig commented 7 years ago

Thanks for opening this ticket and reminding me on about #282 -- please try the dev version installed from GH.