[R] run R script automatically by double-clicking WinXP desktop icon

cryan at binghamton.edu cryan at binghamton.edu
Tue Sep 22 17:32:23 CEST 2009

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

More information about the R-help mailing list