Return ordering for PANGO lineages based upon a provided list of names which
may include aliases.
Usage
sort_pangoro(pangoro, x, index_only = FALSE, na.last = FALSE, ...)
Arguments
- pangoro
Pangoro class object
- x
Vector of pango lineages
- index_only
Boolean value, to return index or sorted values (default: FALSE
).
- na.last
Sort NAs top or bottom (default: TRUE, sort to top)
- ...
Additional parameters to order
.
Examples
if (FALSE) {
my_pangoro <- pangoro()
x <- c('BL.2', 'BA.1', 'BA.1.2.3', 'BA.1.223.3', 'BA.1.4.3','BL.2', 'BA.1')
sort_pangoro(my_pangoro, x)
sort_pangoro(my_pangoro, x, index_only = TRUE)
sort_pangoro(my_pangoro, x, na.last = TRUE)
sort(x) # Compare to normal sort in base R
}