I have a df with columns "home team name", "away team name" and game data for each game, I am then creating 2 seperate df for home and away stats for each team. When using for the new df ..
new_df <- df %>%
group_by(home_team_name) %>%
summarize (stat1 = mean(stat1), games played = ???)
I am trying to get how many games each team played as a home team and as an away team.
Thanks