[R] run R script automatically by double-clicking WinXP desktop icon
Cedrick Johnson
cedrick at cedrickjohnson.com
Tue Sep 22 17:41:50 CEST 2009
Here's something I use (in a batch file):
Rterm --no-restore --file=EveningStartup.r
Change EveningStartup.r to your particular file. When you create the
shortcut, make sure to set the working directory to where your R script
is located. Then in your file, you could have the graphs write out to a
png file in a specified directory.
hth
c
cryan at binghamton.edu wrote:
> I've written a simple script that does some surveillance analysis on daily counts of walk-in clinic visits, for our county health department. (Actually, Michael Hohle's surveillance package does all the work; I just customized it a little to work with the way our data are recorded.) The output consists of a graph and a little table.
>
> My colleague will run it once in a while, on continuously updated data. She knows nothing about R, at least not yet. I want to make it as simple as possible. Rather than have her open R and type source("filename"), I want to be able to put an icon on her WinXP desktop, so that when she double-clicks it, R will open, run the script, and up pops the graph.
>
> I've been trying to learn about R CMD BATCH, playing with the dialogue boxes for WinXP desktop shortcuts, etc, but no luck so far. I guess I don't know enough about Windows.
>
> Can anyone tell me how to do this? Thanks.
>
> --Chris Ryan
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list