View source: R/tr_sort_alphanum.R
tr_sort_alphanum | R Documentation |
Function to sort a column of alphanumeric strings (e.g. c("a1",
"a11", "a2")) in numeric order (e.g. c("a1", "a2", "a11")). It works with
pipes, and you can provide column name or index as argument sort_col
.
tr_sort_alphanum(input_df, sort_col)
input_df |
Input data frame or tibble to be sorted |
sort_col |
Column to be used in sorting as an index or quoted name |
Sorted data frame
None.
https://www.github.com/travis-m-blimkie/tRavis
tr_sort_alphanum(
input_df = data.frame(
colA = c("a11", "a1", "b1", "a2"),
colB = c(3, 1, 4, 2)
),
sort_col = "colA"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.