Questioning lifecycle

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

units_since(x = yearmonth(2012 + (0:11) / 12))
#> [1] 504 505 506 507 508 509 510 511 512 513 514 515