[R] Error message on script execution

Bartjoosen bartjoosen at hotmail.com
Wed Oct 31 09:24:03 CET 2007

Maybe you can make a simple r-script (for example a jpg-plot of random
numbers, ....) and run this.
This should indicate wether its due to the script or to the call to R.
>From this you can work your way further down to the problem:
-if it's the script, alter your script step by step until you found the
-if its the call to R: try to fix this first


Sébastien-18 wrote:
> Dear R_users,
> I am coming back to you about this problem, since I could not solve it 
> by myself and because I did not receive any reply the first time I put 
> the post on the list.
> Thanks in advance for any help you could provide.
> Sebastien
> Sébastien a écrit :
>> Dear R_users,
>> I have some troubles with a visual basic application I have recently 
>> created. This application automatically creates and executes an R 
>> script based on a dataset and settings defined by the user. The .r 
>> file (Create_Diagnostic_plots.r) is saved first in a given folder and 
>> then call using a CMD BATCH instruction in the shell. The problem is 
>> that the script is not executed on all the computers where this 
>> application has been "installed" (it is a simple .exe) - see the error 
>> message below. Please, note that the script runs fine on all computers 
>> when it is executed from the RGUI interface. My guess is that my CMD 
>> BATCH call is somehow wrong.
>> ### This is the error message found at the end of a so-called 
>> 'Create_Diagnostic_plots.r.Rout' file
>> Error: syntax error, unexpected $undefined in "
>> "
>> Execution halted
>> ### This call is working fine
>> "D:\Program Files\R\R-2.5.1\bin\R.exe" CMD BATCH "E:\My 
>> Documents\3_MyExample\WFEV_Multiple_Model\Create_Diagnostic_plots.r"
>> ### This one is not
>> "C:\Program Files (x86)\R\R-2.5.0\bin\R.exe" CMD BATCH 
>> "D:\SKB\3_MyExample\WFEV_Multiple_Model\Create_Diagnostic_plots.r"
>> I wonder if the problem comes from the brackets in Program Files (x86) 
>> but I could not find anything relevant about that in the help files.
>> As usual, your help will be greaty appreciated.
>> Sebastien
> ______________________________________________
> 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.

View this message in context: http://www.nabble.com/Error-message-on-script-execution-tf4589215.html#a13504648
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list