[R] Re: variable argument lists

Brad Buchsbaum brad at aris.ss.uci.edu
Tue Apr 2 20:11:46 CEST 2002


Is it possible to make a function treat an R list as if it were a sequence

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

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

More information about the R-help mailing list