> ifelse(ChooseFn, lapply, sfLapply)(MyList, function(x) {
> ...
> return())
Use 'if', not 'ifelse', and wrap it in parentheses to get the precendence right
(if (ChooseFn) lapply else sfLapply)(MyList, function(x){...})
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
>
Hi,
On Sun, Aug 11, 2013 at 1:18 PM, Ron Michael wrote:
> 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 repeatatio
2 matches
Mail list logo