Hi,
How can I attach chart/plot to a excel file? I would like to create a
plot in R eg.
plot(1)
and save it into a Excel file, eg. test.xls in a same working directory.
Regrads,
-J
__
R-help@r-project.org mailing list
Try this:
library(RDCOMClient) # from omegahat.org
xl - COMCreate(Excel.Application)
xl[[Visible]] - TRUE
xl[[DisplayAlerts]] - FALSE
wk - xl$Workbooks()$Add()
tf - tempfile()
png(tf)
plot(rnorm(100), type = 'l')
dev.off()
wk$ActiveSheet()$Pictures()$Insert(tf)
wk$SaveAs(gsub(/, ,
2 matches
Mail list logo