[R] Re: variable argument lists
ripley@stats.ox.ac.uk
ripley at stats.ox.ac.uk
Tue Apr 2 21:00:27 CEST 2002
See
?do.call
It's a very powerful device, and in some places known as `Bill Venables'
favorite function' (the spelling is a clue) which given Bill's status (not
least as the editor of R-news `Programmer's Niche') tells you all you need
to know.
On Tue, 2 Apr 2002, Brad Buchsbaum wrote:
> Is it possible to make a function treat an R list as if it were a sequence
> arguments?
>
> For instance, the "order" function has a variable length argument list.
> So one could do: x <- order(a,b)
>
> Suppose one does not know in advance the number of arguments to the order
> function and those arguments are stored in a list.
>
> e.g. x <- list(a,b,c)
>
>
> How would one go about ordering the list of vectors contained in x
> (with b, c, etc. representing "tie-breaking" vectors for the order
> function).
>
> thanks for any help on this.
>
> Brad Buchsbaum
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list