I meant that the machine has Excel on it. Excel does not have to be running prior to running the R code as the R code will start up and shut down Excel itself.
On 2/8/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Its not entirely clear to me what it is that you are looking > for. Maybe you want to create an Excel spreadsheet with a hyperlink > to a web page? This R code will do that. It requires a Windows machine that > has Excel running on it. > > > library(RDCOMClient) > xl <- COMCreate("Excel.Application") > xl[["Visible"]] <- TRUE > wkbk <- xl$Workbooks()$Add() > > sh <- xl$ActiveSheet() > > B2R <- sh$Range("B3") > B2R[["Formula"]] <- '=HYPERLINK("http://www.r-project.org")' > > wkbk$SaveAs("\\test-url.xls") > xl$Quit() > > > > > On 2/8/07, Mark W Kimpel <[EMAIL PROTECTED]> wrote: > > Hans-Peter and other R developers, > > > > How are you? Have you made any progess with embedding Url's in Excel? > > > > Well, I have been busy thinking of more things for you to do;) > > > > My colleagues in the lab are not R literate, and some are barely > > computer literate, so I give them everything in Excel workbooks. I have > > gradually evolved a system such that these workbooks have become > > compendia of my data, output, and methods. That, in fact, is why I > > bought the Pro version of xlsReadWritePro. I have been saving graphics > > as PDF files, then inserting them as object in Excel sheets. > > > > What I would like to be able to do is to embed objects (files) in sheets > > of a workbook directly from within R. I would also like to be able to > > save my current R workspace as an object embedded in a sheet so that in > > the future, if packages change, I could go back and recreate the > > analysis. I do not need to be able to manuipulate files that R has not > > created, like a PDF file from another user. I would, however, like to be > > able to save my graphics as PDF files inside a worksheet, even if it > > meant creating a temp file or something. > > > > Before people begin talking about how MySQL or some other database could > > handle all that archiving, let me say that that is not what my > > colleagues want. They want a nice Excel file that they can take home on > > there laptops. One thing I like about worksheets is that they themselves > > can contain many embedded files, so it keeps our virtual desks neater > > and less confusing. > > > > Hans, if you could do this, it would be of tremendous benefit to me and > > hopefully a lot of people. R developers tend to think that all > > scientists are running Linux on 64-bit computers, but most biomedical > > researches still store date in Excel files. This won't solve everybody's > > needs, but it could be a start. > > > > Well, let me know what you think. I am cc'ing R-devel to see if any of > > those guys have ideas as well. > > > > Thanks, > > Mark > > > > > > > > -- > > Mark W. Kimpel MD > > Neuroinformatics > > Department of Psychiatry > > Indiana University School of Medicine > > > > ______________________________________________ > > R-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > > ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel