[EMAIL PROTECTED] wrote:
Hi,
I am working on a shell script where i need to start a R function defined in a
script. I know how to run the script; with R CMD BATCH script which would be equal to source("script") in R. But how do I run a function(param) of that script in the BATCH mode? Thanks in advance.
______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Say you have a function MyFoo defined in foo.R then you create a file call.R that sources foo.r (source("foo.R")) and calls your function by, e.g., MyFoo(a, b, x).
Then just say "R CMD BATCH call.R" ...
Uwe Ligges
______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
