Skip to contents

year() is a constructor for <grates_year> objects.

Usage

year(x = integer())

is_year(object)

Arguments

x

[integer]

Vector representing the years.

double vectors will be converted via as.integer(floor(x)).

object

R object.

Value

A <grates_year> object.

Examples

year(2011:2020)
#> <grates_year[10]>
#>  [1] 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020