get_series_time: Retrieve the time component of a ts/zoo/xts time series...

View source: R/get_series_time.R

get_series_timeR Documentation

Retrieve the time component of a ts/zoo/xts time series object

Description

Function will retrieve the time component of a ts,zoo or xts object. The retrieved time will be converted into one of several possible time classes.

Usage

get_series_time(series, time_class = "Date", time_origin = NULL)

Arguments

series

Either a ts,zoo or xts time series object.

time_class

A string that sets the class for the converted index. Acceptable values are: "Date", "POSIXct", "yearmon", "yearqtr".

time_origin

A character string that sets the origin/start date for calculating the internal elapsed seconds representation of the time. The default in R is January 1, 1970.

Value

A Date/POSIXct/yearmon/yearqtr class object

Author(s)

Rick Dean


deandevl/RtsaPkg documentation built on Oct. 5, 2023, 5:23 p.m.