Learn R Programming

christmas (version 1.3.0)

xmastreeshape: Christmas shaped tree.

Description

Christmas trees (2017 card) with different shapes.

Usage

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

Value

A Christmas card plot including a christmas tree.

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

Author

Jose Barrera-Gomez.

Examples

Run this code
# \donttest{
xmastreeshape(shape = "oval", language = "catalan", ballscolor = "blue")
xmastreeshape(shape = "vshaped", nballs = 15, ballscolor = c("sienna2", "yellow2", "tomato"),
              seed = 1111)
xmastreeshape(shape = "columnar", nballs = 20, ballscolor = "red")
# }

Run the code above in your browser using DataLab