7

I have a data.frame df

 Name            Count
 Apples           12
 Oranges          22
 Bananas          14

Would like to convert this to a table like an image file so that I can use it in my presentation.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
BigDataScientist
  • 1,045
  • 5
  • 17
  • 37

1 Answers1

25

The most direct option is to probably use grid.table from the "gridExtra" package. Assuming your data.frame is called "mydf", it's as easy as doing:

library(gridExtra)
grid.table(mydf)

which should yield something that looks like:

enter image description here

A5C1D2H2I1M1N2O1R2T1
  • 190,393
  • 28
  • 405
  • 485