ts_to_df: ts() data to a dataframe

Description Usage Arguments Value Examples

View source: R/seas_utils.R

Description

Transform monthly or quarterly ts() data to a dataframe

Usage

1
ts_to_df(x, end_period = TRUE)

Arguments

x

ts() format data which is either monthly or quarterly

end_period

T/F, for monthly or quarterly data, should dates be indexed to the end of the period?

Value

Data in dataframe format

Examples

1
2
x <- ts(c(1,2,3,4), start=c(2020,1), end=c(2020,4), frequency=4) 
ts_to_df(x)

dateutils documentation built on Nov. 10, 2021, 5:09 p.m.