nba_ranking: Generates a ranking and a visualization based on a column of...

Description Usage Arguments Value Examples

View source: R/nba_ranking.R

Description

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.

Usage

1
nba_ranking(data, column, by, top, descending = TRUE, FUN)

Arguments

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

Value

ggplot visualization with the ranking

Examples

1
nba_ranking(data.frame(ranked = c("1", "2", "3"), by = c(3, 2, 1)), ranked, by, 2, TRUE, mean)

kfoofw/test_githubactions documentation built on March 14, 2020, 12:05 a.m.