1

I am using Pander to get my tables in R markdown, and I would like to add row names to my tables, which are not there by default. here is my script:

age.frequency.table <- xtabs(~age, data=iceland) 
pander(age.frequency.table)

Here is a screenshot of the table I get on R markdown

I would like to have the row names 'age' and 'frequency'. Any tips would be greatly appreciated! I'm very new to R/coding so apologies if this is an obvious question.

Psidom
  • 209,562
  • 33
  • 339
  • 356
Emily
  • 29
  • 1
  • 7
  • Which package is needed for the `iceland` dataset? – daroczig Jun 09 '16 at 11:05
  • Hi! the dataset was provided by a tutor, and i don't think comes with any package. The packages I am using are Hmisc, psych, gmodels, dplyr, knitr, pander and g.data. – Emily Jun 09 '16 at 11:09
  • Can you please post a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)? Without that, it's hard to help. – daroczig Jun 09 '16 at 14:05

0 Answers0