years: Get the year of a Date object

View source: R/Date.R

yearsR Documentation

Get the year of a Date object

Description

Works like 'months', 'weekdays', etc. for years.

Usage

years(x, ...)

## S3 method for class 'Date'
years(x, ...)

## Default S3 method:
years(x, ...)

Arguments

x

a Date object

date

an object that can be converted to a 'Date'

Value

the year as an integer

Methods (by class)

  • years(Date): method for Date objects

  • years(default): default method


gmonette/spida2 documentation built on July 14, 2024, 12:45 p.m.