View source: R/createTimeSeries.R
createTimeSeries | R Documentation |
This function will create a (empty) character time series. This can be used for creating regular time series of real-world observations that have missing data via merging.
createTimeSeries(start, end, step, type = c("POSIX", "char"))
start |
character string of starting date and time. Needs to be of format "YYYY-mm-dd HH:MM:SS" |
end |
character string of ending date and time. Needs to be of format "YYYY-mm-dd HH:MM:SS" |
step |
the time step of the time series (in seconds) |
type |
character. Determines whether to return an object of class 'POSIXct' (default) or 'character'. |
a character vector of datetimes spaced regularly from start to end
## 24 hrs
createTimeSeries("1990-01-01 00:00:00", "1990-01-01 23:00:00", step = 60 * 60)
## Not run:
## 365 days
createTimeSeries("1990-01-01 00:00:00", "1990-12-31 23:00:00", step = 60 * 60 * 24)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.