dtt_study_year: Study Year

View source: R/study-year.R

dtt_study_yearR Documentation

Study Year

Description

Study Year

Usage

dtt_study_year(x, start = 1L, full = TRUE)

Arguments

x

A Date or POSIXct vector.

start

An integer vector of the starting month or a Date vector of the starting date.

full

A flag specifying whether to return a character vector of the study years (or an integer vector of the first year)

Value

A character vector of the study year or an integer vector of the first year.

Examples

dtt_study_year(
  as.Date(c("2000-03-31", "2000-04-01", "2001-04-01")),
  start = 4L
)
dtt_study_year(
  as.Date(c("2000-03-31", "2000-04-01", "2001-04-01")),
  start = 4L,
  full = FALSE
)

dttr2 documentation built on Sept. 26, 2024, 1:06 a.m.