Hi, I have some questions about Excel-to-R interface and I hope somebody can help me. Is it possible to call functions in a self-defined package from Excel using the Excel-to-R interface? We created the package successfully and can run all the functions inside R. But when we tried to run them from Excel, we kept running into problems. It seems we can not run anything that is not in the base package. I know that the DCOM server is communicating with R compiled as DLL. Is it possible to compile our self defined package into DLL? Any help will be appreciated. Hengyi Xue -------------- next part -------------- An HTML attachment was scrubbed... URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010108/6176989a/attachment.html
On Mon, 8 Jan 2001, Hengyi Xue wrote:> Hi, > > I have some questions about Excel-to-R interface and I hope somebodycan help me. Is it possible to call functions in a self-defined package from Excel using the Excel-to-R interface? We created the package successfully and can run all the functions inside R. But when we tried to run them from Excel, we kept running into problems. It seems we can not run anything that is not in the base package. I know that the DCOM server is communicating with R compiled as DLL. Is it possible to compile our self defined package into DLL? Is this about Erich Neuwirth's RServer Excel add-in on Windows? It's not very obvious, and on CRAN that is called an R-Excel Interface. With addons to R it is often most effective to ask the author direct. Let me pick up on the last point. The DCOM server communicates with R, period. The base package is not in the DLL, and it is exactly the same R as used by the GUI and terminal front-ends. So if you send "library(foo)" via the DCOM execute method, it works just as if you typed it at the command line. It makes no sense (to me) to `compile our self defined package into DLL': packages are mainly interpreted code. The extras in the DCOM interface are means to transfer simple R objects to and fro. As far as I recall you have access to the full DCOM interface from RServer via writing VBA. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Is there an easy way to automatically run an R function at fixed intervals of time? For example, if I have a file, mydata.txt, which is updated every minute or so, is there an R or an S function which would execute the command mydata <- read.table("mydata.txt") each minute? Basically I just want "mydata" to be constantly updated without my having to bother with it. Thanks in advance, Jeff Miller -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi! I can only speak for the Linux/Unix enviroment: Try while(TRUE) { system("sleep 60") mydata <- read.table(...) } to update mydata after a 60 second break. An alternative is to use "cron" or "at". Both allow the specification of exact execution times, while the "while" approach tries to imitate a real time system. Have a nice day Detlef Detlef Steuer ** Universität der Bw ** 22043 Hamburg Tel: (0049) (0)40/6541-2819 steuer at unibw-hamburg.de On 09-Jan-01 Jeff Miller wrote:> > Is there an easy way to automatically run an R function at fixed > intervals of time? > > For example, if I have a file, mydata.txt, which is updated every > minute or so, > is there an R or an S function which would execute the command > > mydata <- read.table("mydata.txt") > > each minute? Basically I just want "mydata" to be constantly updated > without > my having to bother with it. > > Thanks in advance, > > Jeff Miller > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. > - > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. > _-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._