nba_boxplot: Creating Boxplot for NBA Stats

Description Usage Arguments Value Examples

View source: R/nba_boxplot.R

Description

Creates a boxplot of the categorical variable of interest on the y-axis and the stat of interest on the x-axis.

Usage

1
nba_boxplot(dataset, position = NULL, teams = c(NULL), stats)

Arguments

dataset

dataframe This dataframe is created after using the nba_scraper.R function or if the csv has already been loaded, read the csv in and pass it as the parameter.

position

string To specify as "POS" if you want to look at Position boxplot.

teams

string The names of teams you want to create boxplot for. *Note you can only choose one of position or teams as a variable to vizualize

stats

string The numeric variable of interest examples: Points, 3_Pointers, Turnovers

Value

ggplot boxplot

Examples

1
2
nba_2018 <- data.frame(POS= c("C", "FOR", "PO","FOR", "C"), Team = c("ORL", "UTAH", "LAC", "MIN", "BOS"), GP = c(3, 5, 5, 2, 1))
nba_boxplot(nba_2018, position= "POS", teams= NULL, stats= "GP")

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