Use package gridExtra
which has a function grid.table
, and add \n
into your data frame where you want the breaks:
A=data.frame(name=c("ABC","XYZ","DEF"),description=c(rep("This is an example for text wrap \nusing grid.draw in package gridExtra",3))
grid.newpage()
grid.table(A)
You can tune up the table pretty nicely using the various arguments.