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.

ben

On Tue, May 15, 2012 at 10:53 AM, Steve Lianoglou <
mailinglist.honeypot@gmail.com> wrote:

> Hi,
>
> On Tue, May 15, 2012 at 12:46 PM, Ben quant <ccquant@gmail.com> wrote:
> > Hello,
> >
> > Thanks in advance for any help!
> >
> > How do I pass an unknown number of objects into the "..." (dot dot dot)
> > parameter? Put another way, is there some standard way to pass multiple
> > objects into "..." to "fool" the function into thinking the objects are
> > passed in separately/explicitly with common separation (like "x,y,z" when
> > x, y and z are objects to be passed into "...")?
>
> Calling `list(...)` will return a list as long as there are elements
> caught in `...`
>
> Does this help?
>
> R> howMany <- function(...) {
>  args <- list(...)
>  cat("There are", length(args), "items passed in here\n")
> }
>
> R> howMany(1, 2, 3, 4)
> There are 4 items passed in here
>
> R> howMany(10, list(1:10))
> There are 2 items passed in here
>
> -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
>

	[[alternative HTML version deleted]]

