Learn R Programming

christmas (version 1.0.0)

xmas2017trees: Christmas card 2017.

Description

Christmas card 2017: Christmas trees with different shapes.

Usage

xmas2017trees(year = 2018, language = c("english", "spanish",
  "catalan"), shape = c("piramidal", "oval", "vshaped", "round",
  "columnar"), nballs = 15, ballscolor = NULL, seed = NULL)

Arguments

year

Year to be printed. Default is 2018.

language

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

shape

The shape of the tree. One of c("piramidal", "oval", "vshaped", "round", "columnar"). Default is "piramidal".

nballs

The number of balls in the tree. Default is 15.

ballscolor

The colors to be used for the balls in the tree. It must be a vector with names of colors included in colors(), or NULL (default). If NULL, then colors are randomly selected.

seed

Seed for reproducibility of the card. Default is NULL (no seed).

Value

A Christmas card plot including a christmas tree.

Examples

Run this code
# NOT RUN {
xmas2017trees()
xmas2017trees(shape = "oval", language = "catalan", ballscolor = "blue")
xmas2017trees(shape = "vshaped", nballs = 15, ballscolor = c("sienna2", "yellow2", "tomato"),
              seed = 1111)
xmas2017trees(shape = "round", language = "spanish")
xmas2017trees(shape = "columnar", nballs = 20, ballscolor = "red")
# }

Run the code above in your browser using DataLab