Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R data.frame to table image for presentation [duplicate]

Tags:

dataframe

r

image

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.

like image 255
BigDataScientist Avatar asked Feb 04 '14 16:02

BigDataScientist


1 Answers

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

like image 53
A5C1D2H2I1M1N2O1R2T1 Avatar answered Nov 12 '22 12:11

A5C1D2H2I1M1N2O1R2T1