#' Compare the salary for a group with the others.
#' @param df the team
#' @return a graph
#' @examples team(Spurs), team(Mavericks), team(Rockets)
#' @export
team <- function(df){
library(tidyverse)
library(ggplot2)
ggplot(new_NBA_salary, aes(x=Season, y=Total_Salary, group = Team)) +
geom_line(color="gray66", alpha=.25) +
geom_line(data=df, color="firebrick", lwd=1)+
theme(legend.position="none") +
theme_classic() +
ggtitle(paste0(df$Team[1]," vs Other NBA teams"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.