Export both Image and Data from R to an Excel spreadsheet

excel, r

Solution

I would use the `xlsx` package. Check out the `addPicture` function and the `addDataFrame` function. I found this package fairly easy to work with.

Problem

It is simple to print an image and save it on disk just: ``` fit <- lm(some ~ model) png(filename="your/file/location/name.png") plot(fit) dev.off() ``` Write some data to a excel spreadsheet just ``` write.csv(rnorm(10),"some file",sep=",") ``` My question is how would one redirect both the above in to a spreadsheet. Another word, output a graph paired withs some image/plot on to a excel workbook? Thanks,

Original source