Description Usage Arguments Details Value Examples
Creates or coerces objects of type year
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | as.year(x)
## S3 method for class 'Date'
as.year(x)
## Default S3 method:
as.year(x)
is.year(x)
## S3 method for class 'year'
a - b
width.year(x)
|
x |
object to be coerced or tested |
a, b |
years to be added or subtracted |
The year class also inherits methods from the character class but not from numeric. (It does not make any sence to, for example, multiply two years with each other). There are however methods for subtraction and it is also possible to add a integer to a year etcetera.
Vector of class year
and "AsIs" (see function I
).
1 2 3 |
[1] "2012"
[1] "2020"
[1] 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.