#' Compare the salary for two groups
#' @param df1 a NBA team
#' @param df2 another NBA team
#' @return a line graph
#' @examples com_team(Spurs, Rockets), com_team(Rockets, Mavericks),com_team(Spurs, Mavericks)
#' @export
com_team<- function(df1,df2){
library(tidyverse)
library(ggplot2)
ggplot(rbind(df1,df2), aes(x=Season, y=Total_Salary, color = Team)) + geom_line(aes(group=Team)) + geom_point(shape = 19)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.