| setOrderList | R Documentation |
Moves specified elements to the front and/or back of a list while preserving the relative order of all other elements.
setOrderList(l, first = NULL, last = NULL)
l |
A named list. |
first |
A character vector of names to move to the front. |
last |
A character vector of names to move to the back. |
A list with reordered elements. Names that do not exist
in l are silently ignored.
my_list <- list(c = 3, a = 1, d = 4, b = 2)
setOrderList(my_list, first = c("a", "b"), last = "c")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.