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
value

A 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
x

A numerical scalar. The range of valid values depends on type. If type is "spring", "summer", "autumn", or "winter", x is ignored.

type

A character scalar. The following values are supported: "spring", "summer", "autumn", "winter", and all English-language months.

ignore_errors

If '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
deep

Whether to make a deep clone.

Examples

if (interactive()) {
x <- Year$new(1520)
x$take(15, type = "june")
}


[Package unstruwwel version 0.2.0 Index]