Hi,

I have a list of vectors (of varying lengths).  I'd like to sort this
list by applying a function to each pair of vectors in the list and
returning information to sorting routine that let's it know which one
is larger.

To solve problems like this in Common Lisp, the sort function accepts
a function as an argument.  The arguments to this function are two
elements of the list which is being sorted.  The writer of the
function returns t (TRUE in R) when the first argument to the function
is larger than the second and nil (FALSE in R) otherwise.

I'm wondering if there is some way to accomplish this in R.

Many thanks for any help!

Cheers,
David

______________________________________________
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.

Reply via email to