gtsplot: Time-series plot using ggplot2.

Description Usage Arguments Value Author(s) Examples

View source: R/gtsplot.R

Description

A simple wrapper function for plotting time-series data with ggplot2.

Usage

1
2
gtsplot(X,dates=NULL,rowdates=FALSE,dates.format,
        save=FALSE,height=13,width=11)

Arguments

X

A matrix or data frame of size T x m containing the relevant time-series data, where m is the number of series.

dates

A T x 1 date or character vector containing the relevant date stamps for the data.

rowdates

A TRUE or FALSE statement indicating whether the row names of the X matrix contain the date stamps for the data.

dates.format

If ‘dates’ is not set to NULL, then indicate what format the dates are in, such as Year-Month-Day.

save

Whether to save the plot(s).

height

The height of the saved plot(s).

width

The width of the saved plot(s).

Value

Returns a plot of the data.

Author(s)

Keith O'Hara

Examples

1
2
3
4
5
## Not run: 
data(BMRVARData)
gtsplot(USMacroData[,2:4],dates=USMacroData[,1])

## End(Not run)

kthohr/BMR documentation built on May 20, 2019, 7:04 p.m.