[R] dots expansion

Duncan Murdoch murdoch at stats.uwo.ca
Tue Aug 3 07:41:04 CEST 2004

On Tue, 03 Aug 2004 14:37:56 +1000, Viet Nguyen
<vietnguyen at fastmail.fm> wrote:

>Hi list,
>I'm trying to write a function similar to rbind, except that needs to 
>add a factor to each component array before rbinding them together so 
>that the rows from different arrays are distinguishable.
>The problem that arose is how to loop through arguments in the dots 
>"..." list. I need to get a hand on each of them but don't know how many 
>of them there are and what their names are.
>It'd be useful if I could look at how rbind(...) or c(...) do this but 
>they are both Internal functions.

list(...) will create a list, one item per argument.  If the args are
named then the corresponding list item will be named.

Duncan Murdoch

More information about the R-help mailing list