[R] (windows xp) start script on startup / double clicking on the script

Gabor Grothendieck ggrothendieck at gmail.com
Thu Oct 1 01:41:43 CEST 2009

Try creating a Windows batch file along these lines:

set R_PROFILE_USER=C:\tmp\myscript.R
"C:\Program Files\R\R-2.9.x\bin\Rgui.exe"

and double click it.  The set line sets it up to run your script and
the next line runs R.

On Wed, Sep 30, 2009 at 7:12 PM, Martin Batholdy
<batholdy at googlemail.com> wrote:
> hi,
> I am still trying to figure out how it is possible to start an R-script via
> the R-GUI directly by double-clicking on the script file in windows xp.
> On Mac OS I have the option "start script in the editor" in the preferences.
> But on windows XP I always get the "ARGUMENT  'c:\...\...'   ___ignored___"
> error when I try to associate the .R extension with the R program file.
> My problem is that I don't have the possibility to install any other
> programs.
> And the people using the script don't know R.
> So its really important to find a way to start a script just by double
> clicking on the file.
> Now I was wondering if it is possible to make a shortcut of the R script and
> change the start options.
> I am not familiar with windows - does someone know if that is a possible way
> to get R code to the R console (in the R gui) on startup?
> Or any other clues / tips?
> thanks for any help!
> ______________________________________________
> 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