Hi,

Say I have

   function(aa,bb,cc) { does something }

and I want to go through all (or a subset) of function arguments to check if
they're missing.  Of course, I can check each one in turn, ie.

      if (missing(aa)) {}
      if (missing(bb)) {}, etc.

But is there a construct like the following to go through all of them and
perform some default action?  Like this (which doesn't work obviously):

   for el in c('aa','bb','cc')
       if missing(el)  {do something}

I was thinking could to eval(parse( <construct string here> )), but was
hoping there was something cleaner.

Thanks

______________________________________________
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