xmas2018galton {christmas}R Documentation

Christmas card 2018.

Description

Christmas 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).

Usage

xmas2018galton(year = 2019, language = c("english", "spanish",
  "catalan"), balls = 240, layers = 15, onlyBoard = FALSE,
  treeballs = 15, time = 0.02, seed = NULL)

Arguments

year

Year to be printed. Default is 2019.

language

Language to be used in the card. One of c("english", "spanish", "catalan"). Default is "english".

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 FALSE (default), an empirical Christmas normal tree estimated from data is added to the histogram.

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 NULL (no seed).

Value

A Christmas tree in a Galton board.

Author(s)

Jose Barrera-Gomez.

Examples


xmas2018galton()
# more balls, less layers:
xmas2018galton(balls = 300, layers = 9)
# no balls in the gaussian christmas tree:
xmas2018galton(balls = 400, layers = 11, time = 0.005, treeballs = 0)


[Package christmas version 1.0.0 Index]