| Year {unstruwwel} | R Documentation |
Set a Year and Get its Time Interval
Description
Set a Year and Get its Time Interval
Set a Year and Get its Time Interval
Details
An Object of R6Class with methods to set
common time periods and specifications for years.
Super class
unstruwwel::Periods -> Year
Methods
Public methods
Inherited methods
Method new()
Helper function to specify a time period.
Helper function to specify a season.
Helper function to specify a month.
Create a year.
Usage
Year$new(value)
Arguments
valueA numerical scalar.
Returns
Object of R6Class with methods to set
common time periods and specifications for years.
Method take()
Specify a year.
Usage
Year$take(x = NA, type = NA, ignore_errors = FALSE)
Arguments
xA numerical scalar. The range of valid values depends on
type. Iftypeis"spring","summer","autumn", or"winter",xis ignored.typeA character scalar. The following values are supported:
"spring","summer","autumn","winter", and all English-language months.ignore_errorsIf 'TRUE', error messages are ignored.
Returns
Object of R6Class with methods to set
common time periods and specifications for years.
Method clone()
The objects of this class are cloneable with this method.
Usage
Year$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
if (interactive()) {
x <- Year$new(1520)
x$take(15, type = "june")
}