Learn R Programming

tsforecast (version 1.3.0)

tsboxplot: Box Plots

Description

Produce box-and-whisker plot of a given univariate time series.

Usage

tsboxplot(
  x,
  title = NULL,
  x.name = NULL,
  x.col = "darkgrey",
  mean.col = "steelblue4"
)

Value

A boxplot of x will be displayed with no further values or objects returned.

Arguments

x

a univariate time series object or a numeric vector or matrix.

title

title of the box plot

x.name

name of the series. If omitted here, the series name found by tsname() will be taken over here. If tsname() is NULL, the variable name will be used instead. Default is NULL.

x.col

line colour of the box plot.

mean.col

colour of the dot indicating the series mean.

Author

Ka Yui Karl Wu

Details

Since x is a univariate time series, no parallel box plots can be plotted here.

Missing values are ignored when forming boxplots.

References

Chambers, J. M., Cleveland, W. S., Kleiner, B., & Tukey, P. A. (1983). Graphical Methods for Data Analysis. Wadsworth & Brooks/Cole.

Examples

Run this code
tsboxplot(airport$Travellers)

Run the code above in your browser using DataLab