- start_date
The start date
A date or date-time object is expected.
Refer to derive_vars_dt()
to impute and derive a date from a date
character vector to a date object.
Refer to convert_dtc_to_dt()
to obtain a vector of imputed dates.
- end_date
The end date
A date or date-time object is expected.
Refer to derive_vars_dt()
to impute and derive a date from a date
character vector to a date object.
Refer to convert_dtc_to_dt()
to obtain a vector of imputed dates.
- in_unit
Input unit
See floor_in and add_one parameter for details.
Permitted Values (case-insensitive):
For years: "year"
, "years"
, "yr"
, "yrs"
, "y"
For months: "month"
, "months"
, "mo"
, "mos"
For days: "day"
, "days"
, "d"
For hours: "hour"
, "hours"
, "hr"
, "hrs"
, "h"
For minutes: "minute"
, "minutes"
, "min"
, "mins"
For seconds: "second"
, "seconds"
, "sec"
, "secs"
, "s"
- out_unit
Output unit
The duration is derived in the specified unit
Permitted Values (case-insensitive):
For years: "year"
, "years"
, "yr"
, "yrs"
, "y"
For months: "month"
, "months"
, "mo"
, "mos"
For weeks: "week"
, "weeks"
, "wk"
, "wks"
, "w"
For days: "day"
, "days"
, "d"
For hours: "hour"
, "hours"
, "hr"
, "hrs"
, "h"
For minutes: "minute"
, "minutes"
, "min"
, "mins"
For seconds: "second"
, "seconds"
, "sec"
, "secs"
, "s"
- floor_in
Round down input dates?
The input dates are round down with respect to the input unit, e.g., if the
input unit is 'days', the time of the input dates is ignored.
Default: TRUE
Permitted Values: TRUE
, FALSE
- add_one
Add one input unit?
If the duration is non-negative, one input unit is added. i.e., the
duration can not be zero.
Default: TRUE
Permitted Values: TRUE
, FALSE
- trunc_out
Return integer part
The fractional part of the duration (in output unit) is removed, i.e., the
integer part is returned.
Default: FALSE
Permitted Values: TRUE
, FALSE
- type
lubridate duration type.
See below for details.
Default: "duration"
Permitted Values: "duration"
, "interval"