You can also just pass the ... to the next function. E.g., the following two functions do the same thing:
> myPaste1 <- function(...) paste(...) > myPaste2 <- function(...) do.call(paste, list(...)) > myPaste1(1,2:3,4) [1] "1 2 4" "1 3 4" > myPaste2(1,2:3,4) [1] "1 2 4" "1 3 4" Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Steve Lianoglou > Sent: Tuesday, May 15, 2012 10:49 AM > To: Ben quant > Cc: r-help@r-project.org > Subject: Re: [R] pass objects into "..." (dot dot dot) > > Hi, > > On Tue, May 15, 2012 at 1:38 PM, Ben quant <ccqu...@gmail.com> wrote: > > Thank you for that. Sorry, I don't know how to use that to solve the issue. > > I need to pass a handful (an unknown length) of objects into "...". I see > > how you can get the count of what is in "...", but I'm not seeing how > > knowing the length in "..." will help me. > > Hmm ... ok, I see. The interval_intersection function signature > suggests that this should work: > > myIntersection <- function(...) { > do.call(interval_intersection, unname(list(...))) > } > > Or you can just make a list of intervals and do the same do.call mojo, ie: > > do.call(interval_intersection, my.interval.list) > > yay/nay? > > -steve > > > -- > Steve Lianoglou > Graduate Student: Computational Systems Biology > | Memorial Sloan-Kettering Cancer Center > | Weill Medical College of Cornell University > Contact Info: http://cbio.mskcc.org/~lianos/contact > > ______________________________________________ > 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. ______________________________________________ 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.