[R] Pasting a list of parameters into a function

bsm2 bsm2 at rice.edu
Wed Jan 23 20:59:41 CET 2013


I need to repeat a function many times, with differing parameters held
constant across iterations.  To accomplish this, I would like to create a
list (or vector) of parameters, and then insert that list into the function.

For example:

q<-("l,a,b,s")

genericfunction<-function(q){
}

######
The equivalent code would of course be

genericfunction<-function(l,a,b,s){
}

Any help or suggestions would be much appreciated.



--
View this message in context: http://r.789695.n4.nabble.com/Pasting-a-list-of-parameters-into-a-function-tp4656445.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list