[R-SIG-Mac] FastRWeb Questions

Simon Urbanek simon.urbanek at r-project.org
Mon May 7 19:20:17 CEST 2012


On May 7, 2012, at 1:04 PM, Carl pfisterer wrote:

> I have gotten FastRWeb working on Mac OS X 10.5 but I have a few of questions.  Is it possible to send more than one argument to run(...)?


>  How would I parse a range sent as an argument (i.e. run(x=1:20))?



run <- function(x1, x2, ...) {
  x <- seq(as.integer(x1), as.integer(x2))
In theory you could use


run <- function(x, ...) {
  x <- eval(parse(text=x))

but I would not recommend that since it would allow users to inject arbitrary code which is not good for the security ...

>  Finally, what is the syntax to call the R script from within a PERL script?

What do you mean? R scripts are to be run from R, not perl... You could simply run the Rcgi binary, but I'm not sure where you are heading with this ...

>  I have read Simon's paper at: http://urbanek.info/research/pub/urbanek-iasc08.pdf and it has helped, but I didn't see these particular items addressed.  FastRWeb looks very promising, my current implementation initializes R each time and is a bit slow, I am hopeful this will speed things up a lot. 

It certainly will a there is no startup delay.


More information about the R-SIG-Mac mailing list