Description Usage Arguments Value Examples
This function generates creates a ranking of a variable 'column' summarizing by a variable 'by' using a function 'FUN'. The result of this function is a visualization with that information.
1 | nba_ranking(data, column, by, top, descending = TRUE, FUN)
|
data |
The dataframe to make the ranking from |
column |
The column from the dataset to rank |
by |
The column from the dataset to rank by |
top |
The number of elements in the ranking |
descending |
Boolean variable for the order of the ranking. TRUE if descending, FALSE otherwise. |
FUN |
function to apply to the values |
ggplot visualization with the ranking
1 | nba_ranking(data.frame(ranked = c("1", "2", "3"), by = c(3, 2, 1)), ranked, by, 2, TRUE, mean)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.