[R] open .r files with double-click

Duncan Murdoch murdoch at stats.uwo.ca
Sat Jun 9 13:29:18 CEST 2007


On 08/06/2007 2:52 PM, stevenmh at muohio.edu wrote:
> Hi Folks,
> On Windows XP, R 2.5.0.
> 
> After reading the Installation for Windows and Windows FAQs,
> I cannot resolve this.
> 
> I set file types so that Rgui.exe will open .r files.
> 
> When I try to open a .r file by double-clicking, R begins to launch,
> but I get an error message saying
> 
> "Argument 'C:\Documents and Settings\Zoology\My Documents\trial.r' _ignored_"
> 
> I click OK, and then R GUI opens, but not the script file.
> 
> Is there a way to change this?

Not currently. See the appendix "Invoking R" of the Introduction manual 
for the current command line parameters, which don't include "open a 
script".  This would be a reasonable addition, and I'll add it at some 
point, sooner if someone else comes up with a convincing argument for 
the "right" command line parameter to do this.

It would be better if clicking on a second script opened a new window in 
the same session, but that takes more work; not sure I'll get to this.

Duncan Murdoch



More information about the R-help mailing list