Description Usage Arguments Value Examples
Convert a data.frame with dates and numeric values into a new one including year, month, day, minute and second generated trough the dateformat
applied to the original dates.
1 | TimeSeries(dates, dateformat, data = NULL, tz = "GMT")
|
dates |
char vector of dates same length of data |
dateformat |
date format. See |
data |
data numeric vector, matrix or data.frame containing time series data |
tz |
time zone. It gets the system date |
data.frame with split dates and values
1 2 3 4 | dates <- as.character(as.POSIXct(as.Date(time(AirPassengers))+1))
value <- as.numeric(AirPassengers)
dateformat <- "%Y-%m-%d"
y <- TimeSeries(dates, dateformat, value)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.