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,438
  • 68
  • 55
  • 126
BigDataScientist
  • 955
  • 4
  • 16
  • 36

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
  • 184,536
  • 28
  • 389
  • 466