naaccr_date {naaccr}R Documentation

Parse NAACCR-formatted dates

Description

Parse NAACCR-formatted dates

Usage

naaccr_date(date)

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

  input <- c("20151031", "201408  ", "99999999")
  d <- naaccr_date(input)
  d
  naaccr_encode(d, "dateOfDiagnosis")

[Package naaccr version 2.0.2 Index]