View source: R/identification.R
| tsplot | R Documentation |
tsplot creates a ggplot object showing the main plot of a time series.
tsplot(x, y, n.unlabel = 9)
x |
a vector or an array with the dates as |
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. |
A ggplot object.
# Easy example with AirPassengers time series
dates <- dateSeq(from = time(AirPassengers)[1], length.out = length(AirPassengers),
by = "month")
tsplot(dates, as.vector(AirPassengers))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.