Re: [R] Manipulating the "..." args.

From: S Ellison <S.Ellison_at_lgc.co.uk>
Date: Fri, 01 Feb 2008 11:37:54 +0000


I'm no guru, but can you not use do.call here?

i.e. does

foo<-function(...) #Not x(...)
{

   arglist<-list(...)
   #remove bad characters from arglist here.    

   # then
   do.call("bar",arglist)

}

do what you want?

>>> "David Keegan" <david.keegan_at_shenick.com> 01/02/2008 11:00:15 >>>
Hi,

foo<-x(...)
{ # Need to remove bad characters from string arguments "..."

   # here.

   # Pass on the modified string arguments.    bar(...)
}

I need to modify string arguments passed in to function foo as "..." and then pass the modified arguments on to function bar. Is there a way to access the contents of "..." for in-place modification?

I know I can use args <- list(...), but presumably that takes a copy. Unless there is a way to pass the list as "..." in the call to bar?

Regards,
David.

-- 
[David Keegan david.keegan_at_shenick.com 353 1 2710818]

______________________________________________
R-help_at_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.

*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
R-help_at_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.
Received on Fri 01 Feb 2008 - 11:41:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 01 Feb 2008 - 12:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive