[R] Running rscript in windows

Dieter Menne dieter.menne at menne-biomed.de
Thu Feb 11 08:50:10 CET 2010

vikrant wrote:
> Hi,
> I saved the function in test.R file on Desktop. Then after starting R I
> changed my directory to desktop.
> and tried the command source("test.R") it gave me following error
> Error in file(file, "r", encoding = encoding) : 
>   cannot open the connection

It's on the Desktop, and either must set the working directory to the
Desktop, or give the full (rather messy) file name. I usually start my RGui
with the following method


and put all auxiliary files into that directory.


View this message in context: http://n4.nabble.com/Running-rscript-in-windows-tp1475671p1476933.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list