#Makes a new variable called totalstats that is a sum of the 3 major stats
nba <- nba %>%
mutate(totalStats = pts+reb+ast)
#Scatterplot with games played on x-axis and games played on y-axis. Shows
#that as games played increases for a player so does the total stats per game
nba %>%
ggplot(aes(gp, totalStats))+
geom_point()+
geom_smooth(method = lm)+
labs(title = "total stats per game played",
x = "games played",
y = "total stats per game")`geom_smooth()` using formula = 'y ~ x'