Learn R Programming

useful (version 1.2.6)

fortify.ts: fortify.ts

Description

Fortify a ts object.

Usage

# S3 method for ts
fortify(model, data = NULL, name = as.character(m[[2]]),
  ...)

Value

data.frame for plotting with ggplot.

Arguments

model

A ts object.

data

A vector of the same length of x that specifies the time component of each element of x.

name

Character specifying the name of x if it is to be different than the variable being inputed.

...

Further arguments.

Author

Jared P. Lander

Details

Prepares a ts object for plotting with ggplot.

Examples

Run this code

fortify(sunspot.year)

Run the code above in your browser using DataLab