On Sep 21, 2009, at 11:52 AM, Sergey Goriatchev wrote:

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")

The source function is for reading files that are valid R code, not for reading data files.


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?

"source" would be the way, but you should be offering it .R files, rather than .xls files.

There are other functions designed for reading external data files. See the Import/Export Manual.

--

David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
R-help@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.

Reply via email to