[R] run R script automatically by double-clicking WinXP desktop icon
cryan at binghamton.edu
cryan at binghamton.edu
Tue Sep 22 19:37:01 CEST 2009
that helps, thanks. I can put a final line in my batch file that opens a viewer for the png graph.
I was hoping to find a way to do make it run in the Rgui (picky, I know.) My graph is clearer in the default graph device that pops up in the Rgui; it's blurry in the Windows viewer for png files. I should probably play around with the resolution in R's png device. Or maybe it's a function of the viewer I'm stuck using.
Thanks.
--Chris
---- Original message ----
>Date: Tue, 22 Sep 2009 11:41:50 -0400
>From: Cedrick Johnson <cedrick at cedrickjohnson.com>
>Subject: Re: [R] run R script automatically by double-clicking WinXP desktop icon
>To: cryan at binghamton.edu
>Cc: r-help at r-project.org
>
>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