naaccr_datetime: Parse NAACCR-formatted datetimes

Description Usage Arguments Value Examples

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

Description

Parse NAACCR-formatted datetimes

Usage

1
naaccr_datetime(datetime)

Arguments

datetime

Character vector of datetimes in NAACCR format ("YYYYMMDDHHMMSS").

Value

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

Examples

1
2
3
4
  input <- c("20151031100856", "20140822    ", "99999999")
  d <- naaccr_datetime(input)
  d
  naaccr_encode(d, "pathDateSpecCollect1")

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