- x
A vector of dates or datetimes to convert. If not of type Date or POSIXct,
the function attempts to convert it.
- cycle_length
The length of the cycle. Can be a numeric value or a string
specifying the units ('year', 'month', 'day', 'hour', 'minute', 'second').
When numeric, the cycle length is in the same units as time_scale. When a string,
it specifies the time unit of the cycle.
- time_scale
Specifies the time scale for the conversion. Must be one of
'year', 'month', 'day', 'hour', 'minute', 'second'. When cycle_length is a string,
time_scale changes the unit in which the result is expressed.
When cycle_length is numeric, time_scale is used to compute the elapsed time in seconds.
- origin
For numeric cycle_length, the origin must be specified. This is the point
from which the elapsed time is computed. Must be of the same class as x.