[R] Executing R scripts from another R script

Sergey Goriatchev sergeyg at gmail.com
Mon Sep 21 17:52:01 CEST 2009


Hello, everyone

I run Eclipse Ganymede and R 2.7.2 at work.
I have one R script file where I open in memory a new xls file (using
xlsReadWritePro), call other R scripts, which are in the same folder
as the main R script,
which get data from an existing xls file, process data, and output
results in the xls file which is in memory.

That is the idea. But I cannot make it work.
First, I do not really know how to call other R scripts from an R script.
I am using function source like this: source(file="G:/data/datafile.xls")
I get a following error (in German, as I work with German Windows):
Converting xls file to csv file... Fehler in system(cmd, intern =
!verbose) : perl nicht gefunden
Fehler in file.exists(tfn) : ungültiges 'file' Argument

Basically it says:
Converting xls file to csv file...Error in system(cmd, intern =
!verbose) : perl not found
Error in file.exists(tfn): invalid 'file' Argument

What is wrong?
How can I call and execute R-scripts from another R-script?

Thanks in advance!

Regards,
Sergey

-- 
Kniven skärpes bara mot stenen.




More information about the R-help mailing list