I need some guidance on what is the best way to automate R I am aware of Rterm. First question: Is it true that R is not currently OLE accessible under Windows 2000? Second question: Is there an R command that echoes all R Console results to a run log system file? My first attempt to write a run log file is the example from the R Data Inport/Export documentation.> zz<- "textConnection("ex.lm.out","w") > example(lm, prompt.echo = ">") > sink() > close(zz)I can't find the file "ex.lm.out" anywhere on my system's drive. But the file exists in R as confirmed by the next command:> cat(ex.lm.out, sep="\n")Rex
Not sure about your first question. Regarding your second question, maybe you should just sink to a file: sink("ex.lm.out") example(lm) sink() -roger _______________________________ UCLA Department of Statistics rpeng at stat.ucla.edu http://www.stat.ucla.edu/~rpeng On Sun, 12 Jan 2003, Rex_Bryan at urscorp.com wrote:> I need some guidance on what is the best way to automate R I am aware of > Rterm. > > First question: Is it true that R is not currently OLE accessible under > Windows 2000? > Second question: Is there an R command that echoes all R Console results to > a run log system file? > > My first attempt to write a run log file is the example from the R Data > Inport/Export documentation. > > > zz<- "textConnection("ex.lm.out","w") > > example(lm, prompt.echo = ">") > > sink() > > close(zz) > > I can't find the file "ex.lm.out" anywhere on my system's drive. But the > file exists in R as confirmed by the next command: > > > cat(ex.lm.out, sep="\n") > > Rex > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help >
On Sun, 12 Jan 2003, Rex_Bryan at urscorp.com wrote:> I need some guidance on what is the best way to automate R I am aware of > Rterm. > > First question: Is it true that R is not currently OLE accessible under > Windows 2000?True. No one has announced an intention to contribute such functionality, either.> Second question: Is there an R command that echoes all R Console results to > a run log system file?No. Why do you want to use the `R console' (presumably RGui) to do that? Rterms is provided.> My first attempt to write a run log file is the example from the R Data > Inport/Export documentation. > > > zz<- "textConnection("ex.lm.out","w")^ is an error> > example(lm, prompt.echo = ">") > > sink() > > close(zz) > > I can't find the file "ex.lm.out" anywhere on my system's drive. But the > file exists in R as confirmed by the next command: > > > cat(ex.lm.out, sep="\n")No, ex.lm.out is an R object: please do read the help for textConnection(). You can sink directly to a file. -- 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
Rex, Maybe RPy (Python interface to R) could be of help in automating R? Logging is then made very flexible using Python. - http://rpy.sourceforge.net/ - http://gestalt-system.sourceforge.net/rpy_demo.html If you combine it with py2exe you could possibly create an windows-executable file that controls R. Then you can also use Win2K's (scheduled) service functionality for running the application. (This is untried though, but assumed to work). - http://starship.python.net/crew/theller/py2exe/ Hope this helps. Best regards, Amund Tveit http://www.idi.ntnu.no/~amundt/ - http://gamemining.net/ ----- Original Message ----- From: "Rex_Bryan at urscorp.com" <RexBryan1 at attbi.com> To: <r-help at stat.math.ethz.ch> Sent: Monday, January 13, 2003 12:05 AM Subject: [R] Ideas needed on automation of R> I need some guidance on what is the best way to automate R I am aware of > Rterm. > > First question: Is it true that R is not currently OLE accessible under > Windows 2000? > Second question: Is there an R command that echoes all R Console resultsto> a run log system file? > > My first attempt to write a run log file is the example from the R Data > Inport/Export documentation. > > > zz<- "textConnection("ex.lm.out","w") > > example(lm, prompt.echo = ">") > > sink() > > close(zz) > > I can't find the file "ex.lm.out" anywhere on my system's drive. But the > file exists in R as confirmed by the next command: > > > cat(ex.lm.out, sep="\n") > > Rex > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Rex_Bryan at urscorp.com wrote:> I need some guidance on what is the best way to automate R I am aware of > Rterm. > > First question: Is it true that R is not currently OLE accessible under > Windows 2000?You will find a (D)Com server for R at http://cran.r-project.org/contrib/extra/dcom. Otherwise, there will be a sligthly more complex (asynchronous communication, time out management,...) OLE server in SciViews, http://www.sciviews.org. It is not distributed yet, but I plan to release it before mid-March or so.>...Best, Philippe Grosjean ...........]<(({?<...............<?}))><............................... ) ) ) ) ) ( ( ( ( ( Dr. Philippe Grosjean ) ) ) ) ) ( ( ( ( ( LOV, UMR 7093 ) ) ) ) ) Station Zoologique ( ( ( ( ( Observatoire Oceanologique ) ) ) ) ) BP 28 ( ( ( ( ( 06234 Villefranche sur mer cedex ) ) ) ) ) France ( ( ( ( ( ) ) ) ) ) tel: +33.4.93.76.38.16, fax: +33.4.93.76.38.34 ( ( ( ( ( ) ) ) ) ) e-mail: phgrosjean at sciviews.org ( ( ( ( ( SciViews project coordinator (http://www.sciviews.org) ) ) ) ) ) .......................................................................