Learn R Programming

naaccr (version 3.1.1)

naaccr_date: Parse NAACCR-formatted dates

Description

Parse NAACCR-formatted dates

Usage

naaccr_date(date)

Value

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

naaccr_encode function.

Arguments

date

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

Examples

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

Run the code above in your browser using DataLab