Hi,

I have a function myFun which I want to call multiple times, using different 
argument lists.
myFun("v1", "2009", 1)
myFun("v2", "2008", 1)
myFun("q", "2001")

How can I easily do this in R? Should I use mapply?

I unsuccessfully tried something like:
x <- list(c("v1", "2009", 1), c("v2", "2008", 1), c("q", "2001"))
mapply(myFun, x)
 
Eventually, the argument lists will have to be stored in, and read from, an 
external configuration file (I'm thinking about using yaml), although this 
might 
at this point not yet be relevant.

TIA!
Cheers!!
Albert-Jan 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public 
order, irrigation, roads, a fresh water system, and public health, what have 
the 
Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 


      
        [[alternative HTML version deleted]]

______________________________________________
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