#> [1] "---\noutput: md_document\nparams:\n filename: gamedate.md\n---\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n collapse = TRUE,\n comment = \"#>\"\n)\n```\n```{r setup, include=FALSE, echo=FALSE}\nlibrary(HockeyModel)\ngames<-HockeyModel::schedule\ngames<-games[games$Date == Sys.Date(), ]\nif(nrow(games) == 0){\n knitr::knit_exit()\n}\n```\nA list of today's games are shown here:\n\n```{r gametable, echo=FALSE}\nHockeyModel::daily_odds_table()\n```\nIncluding draws, the outcomes today's teams are:\n\n```{r gameodds, echo=FALSE, fig.width=8, fig.height=5}\nHockeyModel::plot_odds_today()\n```\n\nThe expected goals plots for today's games:\n\n```{r xGplots, echo=FALSE, fig.width=8, fig.height=5, fig.show=\"hold\"}\nfor(g in 1:nrow(games)){\n home<-as.character(games[g,\"HomeTeam\"])\n away<-as.character(games[g,\"AwayTeam\"])\n p<-HockeyModel::plot_game(home = home, away = away)\n print(p)\n}\n```"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.