I am trying to add the team winning percentage into Teams2015 but am unsure how to do so. The calculation is WinPercent = W/(W+L). How would I add this to the code below?
Teams2015 <- Teams %>%
select(yearID, teamID, name, G, W, L,attendance) %>%
filter(yearID >= 2015) %>%
mutate(teamID = droplevels(teamID)