xg_sim_goal | R Documentation |
Simulate the number of goals scored given a vector of shot xG values
xg_sim_goal(shot_xg_list)
shot_xg_list |
List of shot xG values |
The simulated number of goals scored
set.seed(123)
# Create a data frame of shots
shots <- data.frame(shot = seq(1:10), xG = runif(n = 10, max = 1))
# Simulate the number of goals scored
shots |> pull(xG) |> xg_sim_goal()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.