plots: An informative array plots on a numeric vector

Description Usage Arguments Details Source Examples

View source: R/plot_functions.R

Description

Produces an array of interesting plots to illustrate the values in the numeric vector x. Includes several summary statistics.

Usage

1
plots(x, na.rm = !is.ts(x), title = NULL)

Arguments

x

a numeric vector.

na.rm

logical; should NA values be removed?

title

main title for the array of plots (derived from name of x)

Details

The following plots are produced in a 2x3 array:

(1) Box Plot, with summary stats for number of observations, missing/valid values, minimum, maximum, quartiles

(2) Histogram and Density, including overlayed Normal density

(3) Auto-correlation correlogram

(4) Normal Q-Q plot, with stats for mean, SD, skewness and excess kurtosis

(5) Association of values at lag=1

(6) Run plot, with loess curve.

Source

Thanks to Paul Murrell for the original idea.

Examples

1
2
3
# Requires a reasonably large plotting window:
plots(rnorm(1000))
plots(cumsum(rnorm(200)))

stevetnz/stevesRfunctions documentation built on May 28, 2019, 8:21 a.m.