Hi,
 
How can I apply ifelse function to chose appropriate function?
 
My goal is user will chose lapply() function if "ChooseFn = T" otherwise to 
chose sfLapply() from snowfall package.
 
I am basically trying to avoid repeatation to write all internal steps, if user 
choses lapply or sfLapply. For example, I am wondering if there is any 
posibility to write something like:
 
ifelse(ChooseFn, lapply, sfLapply)(MyList, function(x) {
 
...........
..........
return(....))
 
Really appreciate if someone helps me out.

______________________________________________
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