Skip to content
Prev 135504 / 398498 Next

Manipulating the "..." args.

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?
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.