xmasgalton | R Documentation |
Christmas Galton card (2018). A Christmas tree in the Galton
board. This is an adaptation of quincunx()
in package
animation
, which simulates the Galton board
(https://en.wikipedia.org/wiki/Bean_machine).
xmasgalton(
year = 2019,
language = c("english", "spanish", "catalan"),
balls = 240,
layers = 15,
onlyBoard = FALSE,
treeballs = 15,
time = 0.02,
seed = NULL
)
year |
Year to be printed. Default is |
language |
Language to be used in the card. One of |
balls |
The number of balls in the board. Default is 240. |
layers |
The number of layers in the board. Default is 15. |
onlyBoard |
Logical. If |
treeballs |
The number of balls to be added to the Christmas normal tree. Default is 15. |
time |
Elapsed time, in seconds, between two consecutive balls in the board. Default is 0.02. |
seed |
Seed for reproducibility of the card. Default is |
A Christmas tree in a Galton board.
Jose Barrera-Gomez.
# more balls, less layers:
xmasgalton(balls = 300, layers = 9, time = 0.01)
# no balls in the gaussian christmas tree:
xmasgalton(balls = 400, layers = 11, time = 0.005, treeballs = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.