Skip to content
Back to formatted view

Raw Message

Message-ID: <CAAmySGOY_Q5w_B-QojNZir_CpW68Fx2gwRAq1SA0=yJFFxhNkA@mail.gmail.com>
Date: 2012-05-31T21:50:51Z
From: R. Michael Weylandt
Subject: RScript.exe and map directory issue
In-Reply-To: <4fc7d6b9.6890700a.60b0.0f1cSMTPIN_ADDED@mx.google.com>

Not on Windows so I can't test, but I imagine you need to escape the
space: try this:

Call Shell(rPath & "\Rscript.exe C:\Work\Latest\ 1\_Test.R", vbHide)

Michael

On Thu, May 31, 2012 at 4:40 PM, Bert Jacobs
<bert.jacobs at figurestofacts.be> wrote:
> Hi,
> I'm trying to run on Windows 7 a scriptfile with Rscript.exe from within
> Excel 2010 with the following code:
> Call Shell(rPath & "\Rscript.exe C:\Work\Latest\_Test.R", vbHide)
>
> The good news is: the above code works perfectly, but ...
>
> If I add white spaces to my map directory, like:
> Call Shell(rPath & "\Rscript.exe C:\Work\Latest 1\_Test.R", vbHide)
>
> In the above case or the RScript.exe doesn't run the file anymore.
> Could someone explain to me how this comes and how I can deal with it?
>
> Kind regards,
> Bert
>
> ______________________________________________
> 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.