tsplot: Time Series Plot

View source: R/identification.R

tsplotR Documentation

Time Series Plot

Description

tsplot creates a ggplot object showing the main plot of a time series.

Usage

tsplot(x, y, n.unlabel = 9)

Arguments

x

a vector or an array with the dates as character of each observation of the time series. This vector can be generated using the function dateSeq.

y

a vector or an array with the values of the time series.

n.unlabel

number of unlabeled dates between labeled dates in the plot.

Value

A ggplot object.

Examples

# Easy example with AirPassengers time series
dates <- dateSeq(from = time(AirPassengers)[1], length.out = length(AirPassengers), 
                 by = "month")
tsplot(dates, as.vector(AirPassengers))

danipequelangos/CBJTSA documentation built on Oct. 16, 2022, 7:19 p.m.