as_year: Convert a date into a year

View source: R/utils.R

as_yearR Documentation

Convert a date into a year

Description

Convert a date into a year

Usage

as_year(x)

Arguments

x

an object coercible into a base::Date. See base::as.Date().

Value

A character vector representing the years of the input

Examples

# Retrieve only the year
as_year("1988-01-01")


tidychangepoint documentation built on April 4, 2025, 4:31 a.m.