plotTimesSeries: plotTimesSeries

View source: R/tsPlot.r

plotTimesSeriesR Documentation

plotTimesSeries

Description

Plot ts object

Usage

plotTimesSeries(
  x,
  time = NULL,
  acf = FALSE,
  lag.max = NULL,
  na.action = na.fail,
  demean = TRUE,
  title = sprintf("%s Plot", name),
  xlab = "Time",
  ylab = name,
  ...
)

Arguments

x

a ts object.

time

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

acf

Logical indicating if the acf and pacf should be plotted.

lag.max

maximum lag at which to calculate the acf. Default is 10*log10(N/m) where N is the number of observations and m the number of series. Will be automatically limited to one less than the number of observations in the series.

na.action

function to be called to handle missing values. na.pass can be used.

demean

logical. Should the covariances be about the sample means?

title

Graph title.

xlab

X-axis label.

ylab

Y-axis label.

...

Further arguments.

Details

Plot a ts object and, if desired, it's acf and pacf.

Value

A ggplot object if acf is FALSE, otherwise TRUE indicating success.

Author(s)

Jared P. Lander

See Also

ts.plotter plot.acf fortify.ts

Examples


plot(sunspot.year)
plot(sunspot.year, acf=TRUE)


jaredlander/useful documentation built on Nov. 4, 2023, 10:56 a.m.