View source: R/add_rank_indices.R
add_rank_indices | R Documentation |
Arrange a data frame and rank indexes.
add_rank_indices(.data, ..., arrangeTerms = NULL, orderColumn)
.data |
data.frame |
... |
force later arguments to bind by name. |
arrangeTerms |
character vector of column expressions to arrange by. |
orderColumn |
character name of column to add in-group order marks to. |
.data with order indices added (no ties).
datasets::mtcars %.>% # tibble::rownames_to_column() not currently re-exported by dplyr mutate_se(., "CarName" := "rownames(.)" ) %.>% select_se(., c('CarName', 'hp', 'wt')) %.>% add_rank_indices(., arrangeTerms = c('desc(hp)', 'wt'), orderColumn = 'rankID') %.>% arrange_se(., 'rankID')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.