as_timeperiod: Convert date or string vector to timeperiod.

View source: R/methods.R

as_timeperiodR Documentation

Convert date or string vector to timeperiod.

Description

Convert any date or string vector to tpr class.

Usage

as_timeperiod(x)

Arguments

x

Date or string vector

Value

Object of tpr class

Author(s)

Alexey Seleznev

See Also

See custom_period()

Examples

dates <- as.Date(c("2019-09-11", 
                   "2019-09-02", 
				   "2019-10-11", 
				   "2019-08-30"))
				   
dates_tpr <- as_timeperiod(dates)

timeperiodsR documentation built on April 20, 2023, 5:13 p.m.