naaccr_date: Parse NAACCR-formatted dates

Description Usage Arguments Value Examples

View source: R/data-item-interpreting.R

Description

Parse NAACCR-formatted dates

Usage

1

Arguments

date

Character vector of dates in NAACCR format ("YYYYMMDD").

Value

A Date vector. Any incomplete or invalid dates are converted to NA. The original strings can be retrieved with the naaccr_encode function.

Examples

1
2
3
4
  input <- c("20151031", "201408  ", "99999999")
  d <- naaccr_date(input)
  d
  naaccr_encode(d, "dateOfDiagnosis")

naaccr documentation built on Jan. 11, 2020, 9:17 a.m.