Description Usage Arguments Details Value See Also Examples
as.ts.df
transfroms a ts or mts object to a dataframe
1 |
ts_obj |
the ts or mts object to be converted into a dataframe |
date_col |
Flag variable. If TRUE, then the time variable in the new dataframe will be a date object |
The first column of the new dataframe holds the time/date in in a column labeled "time"
Note: If the data are quarterly, the first quarter will be translated to "YYYY-01-01", if monthly the first month will be translated to "YYYY-01-01" and so on
dataframe where a column of class "Date" where the first column is labeled "time"
1 2 3 4 5 6 7 | #USMacrsoSW form the AER package is an "mts" object
library(AER)
data("USMacroSW")
as_ts_df(USMacroSW)
#Using the AirPassengers data
data(AirPassengers)
as_ts_df(AirPassengers)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.