greaterThan | R Documentation |
Just a wrapper for comparing numerical values, for use with quicksort.
greaterThan(x, y)
x |
A numeric vector. |
y |
A numeric vector. |
Just returns -1
if x
is less than y
, 1
if
x
is greater, and 0
if they are equal (according to
==
). The vectors wrap as usual if they are of different lengths.
An integer vector.
Robin Evans
`<`
for traditional Boolean operator.
greaterThan(4,6) # Use in sorting algorithm. quickSort(c(5,2,9,7,6), f=greaterThan) order(c(5,2,9,7,6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.