| Periods {unstruwwel} | R Documentation |
Set a Period and Get its Time Interval
Description
Set a Period and Get its Time Interval
Set a Period and Get its Time Interval
Details
An Object of R6Class with methods to set
common time periods and specifications for time periods.
Public fields
.intervalStores a time interval.
fuzzyEither '-1' (approximate) or '1' (uncertain).
expressEither '-1' (before) or '1' (after).
Active bindings
.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.
Methods
Public methods
Method new()
Helper function to specify a time period.
Create a time period.
Usage
Periods$new(...)
Arguments
...Intervals, numerical scalars, or objects of class
Period.xA numerical scalar. The range of valid values depends on
type. Iftypeis"early","mid", or"late",xis ignored.typeA character scalar. The following values are supported:
"early","mid","late","quarter","third", and"half". Iftypeis 'NULL',xdefines a year or decade.
Method set_additions()
Set additions for a time period.
Usage
Periods$set_additions(x)
Arguments
xA character vector.
Method take()
Specify a period.
Usage
Periods$take(x = NA, type = NA, ignore_errors = FALSE)
Arguments
xA numerical scalar. The range of valid values depends on
type. Iftypeis"early","mid", or"late",xis ignored.typeA character scalar. The following values are supported:
"early","mid","late","quarter","third", and"half". Iftypeis 'NULL',xdefines a year or decade.ignore_errorsIf 'TRUE', error messages are ignored.
Returns
Object of R6Class with methods to set
common time periods and specifications for time periods.
Method clone()
The objects of this class are cloneable with this method.
Usage
Periods$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.