custom_sort | R Documentation |
Returns a sort order after sorting by a vector within another vector.
custom_sort(..., decreasing = FALSE, unique = FALSE)
... |
Sequence of |
decreasing |
Sort order. Passed to |
unique |
If |
numeric
sort order.
a <- c(1, 1, 1, 2, 2)
b <- c(2, 3, 2, 1, 1)
custom_sort(a, b)
custom_sort(b, a)
custom_sort(b, a, unique = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.