I\'m trying to output a dataframe of about 40 rows and 5 columns to a .pdf file using grid.table in gridExtra package of R.
However, 40 rows is too long for a page
One way is to shrink the font the font size and the horizontal/vertical padding.
grid.table(mtcars, gpar.coretext = gpar(fontsize=6), gpar.coltext = gpar(fontsize=6), padding.h=unit(2, "mm"), padding.v=unit(2, "mm"), show.rownames = TRUE)