R/calculateGamesCorrelations.R

Defines functions gameCorrelations

# gives the correlation value for home and away goals and assits in a set of games
# it must be in the format of a "spread" games dataframe
gameCorrelations <- function(games_df) {
  cors = cor(games_df %>% drop_na() %>% select_if(is.numeric) %>% as.matrix())
  return(cors)
}
dcaribou/pScores documentation built on May 23, 2019, 8:20 p.m.