Reputation: 638
I am attempting to use grid.table to produce an image of a table for placement in a word document using Rstudio-knitr-pandoc. It is rather large with long column names. The solution I would like to accomplish is rotating the column headings to 90 vertical. Is this possible with grid.table or any other means?
I have tried
toxinsGrob<-tableGrob(cyano.x.t,name='toxins',edits=gEdit(gPath='gpar.coltext',rot=90))
grid.draw(toxinsGrob)
to no avail. Suggetions?
Joel
Upvotes: 1
Views: 1463
Reputation: 77106
it's easy with the new version of grid.table,
tt = ttheme_default(colhead=list(fg_params=list(rot=90)))
grid.newpage()
grid.table(head(iris), theme=tt)
Upvotes: 4