reorder.list | R Documentation |
Reorder elements of lists in your custom order of names / indices.
## S3 method for class 'list'
reorder(L, namesOrdered = gtools::mixedsort(names(L)))
L |
A list. |
namesOrdered |
A vector of names or indices in the desired order. |
A list.
mixedsort
L <- list(a = 1, b = 2, c = 3)
namesOrdered <- c("c", "a", "b")
reorder.list(L, namesOrdered)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.