Convert a ts object to data.frame with columns for time period and the original data
Usage
tsdf(timeseries, colname = "x")
Arguments
timeseries
an object of class ts or mts
colname
Column name to give to the time period column
Value
a data.frame with the same number of rows as the original time series
Details
A convenience function to create a data frame from a time series or
multiple time series object. The motivation is to make it easy to pass time
series data to functions that need data frames such as ggplot2.