Set a Period and Get its Time Interval
Set a Period and Get its Time Interval
.intervalStores a time interval.
fuzzyEither `-1` (approximate) or `1` (uncertain).
expressEither `-1` (before) or `1` (after).
.intervalStores a time interval.
intervalConvert and return a POSIXt time interval.
time_spanConvert and return a time span in years.
iso_formatConvert and return a date in ISO 8601.
new()Helper function to specify a time period.
Create a time period.
Periods$new(...)...Intervals, numerical scalars, or objects of
class Period.
xA numerical scalar. The range of valid values
depends on type. If type is "early",
"mid", or "late", x is ignored.
typeA character scalar. The following values
are supported: "early", "mid", "late",
"quarter", "third", and "half". If
type is `NULL`, x defines a year or decade.
set_additions()Set additions for a time period.
Periods$set_additions(x)xA character vector.
take()Specify a period.
Periods$take(x = NA, type = NA, ignore_errors = FALSE)xA numerical scalar. The range of valid values
depends on type. If type is "early",
"mid", or "late", x is ignored.
typeA character scalar. The following values
are supported: "early", "mid", "late",
"quarter", "third", and "half". If
type is `NULL`, x defines a year or decade.
ignore_errorsIf `TRUE`, error messages are ignored.
Object of R6Class with methods to set
common time periods and specifications for time periods.
clone()The objects of this class are cloneable with this method.
Periods$clone(deep = FALSE)deepWhether to make a deep clone.
An Object of R6Class with methods to set
common time periods and specifications for time periods.