Learn R Programming

timeperiodsR (version 0.7.3)

as_timeperiod: Convert date or string vector to timeperiod.

Description

Convert any date or string vector to tpr class.

Usage

as_timeperiod(x)

Value

Object of tpr class

Arguments

x

Date or string vector

Author

Alexey Seleznev

See Also

See custom_period()

Examples

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

Run the code above in your browser using DataLab