shuffle_deck creates n-decks, shuffles them, and stores the result in the global environment. In broad strokes, the code does the following. It most likely works with different versions as well, but the versions shown here were used: The RMarkdown file containing the paper and analysis expects the following packages.
To simulate many games using run_ir_games and to statistically analyse them, dplyr is required for some basic data wrangling. The simulation of a single game only requires base R. Simulating Independent Blackjack Games in R Requirements