Learn R Programming

tsibble (version 0.5.3)

units_since: Time units since Unix Epoch

Description

Time units since Unix Epoch

Usage

units_since(x)

Arguments

x

An object of POSIXct, Date, yearweek, yearmonth, yearquarter.

Details

origin:

  • POSIXct: 1970-01-01 00:00:00

  • Date: 1970-01-01

  • yearweek: 1970 W01 (i.e. 1969-12-29)

  • yearmonth: 1970 Jan

  • yearquarter: 1970 Qtr1

Examples

Run this code
# NOT RUN {
units_since(x = yearmonth(2012 + (0:11) / 12))
# }

Run the code above in your browser using DataLab