kh03_year: Convert KH03-formatted dates to Mandatory data-formatted...

View source: R/kh03_year.R

kh03_yearR Documentation

Convert KH03-formatted dates to Mandatory data-formatted dates.

Description

NHS England provide KH03 data periods as separate columns for financial year and quarter. This converts to a format usable for the mandatory surveillance.

Usage

kh03_year(year, quarter, format)

Arguments

year

The year column from KH03 data. String of 7 characters in format "yyyy-yy"

quarter

A string giving the final month of the quarter, one of March, June, September, December

format

A string giving the format desired for the output, one of fyear or cyear

Value

A numeric variable giving year and quarter

Examples

kh03_year("2010-11", "March", "fyear")
kh03_year("2010-11", "March", "cyear")
kh03_year("2010-11", "June", "cyear")
kh03_year("2010-11", "June", "fyear")
kh03_year("2000-01", "March", "cyear")

PublicHealthEngland/hcaidcs documentation built on Jan. 19, 2024, 8:38 a.m.