Description Usage Arguments Value Examples
View source: R/add_rank_indices.R
Arrange a data frame and rank indexes.
1 | 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).
1 2 3 4 5 6 7 | 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.