The question is in the title. I'd like to do something like this :
myfunc<- pexp
plot(function(x) myfunc(x, 0.5))
I'd like to call several functions given as parameters in my script. I'd like to use a foreach instead of a bunch of if-then-else statement :
Suppose I call my script this way :
R --slave -f script.R --args plnorm pnorm
I'd like to do something like this :
#only get parameters after --args
args<-commandArgs(trailingOnly=TRUE)
for i in args {
plot(function(x) i(x,param1,param2))
}