convert_chardate: Conversion of Character Vector of Dates

Description Usage Arguments Value Note Author(s) Examples

Description

Converts a character vector into a Date object and checks for missing dates.

Usage

1

Arguments

x

A character vector with dates in format 'yyyymmdd' with no NA's and no duplicates.

Value

A list with two elements:

dates

Date object in format yyyy-mm-dd, chronologically ordered.

missing

Non-occuring dates between chronolocically first and last input date.

Note

If missing is 'None' and no warning is given, the dates in x are complete and in chronological order.

The function is not thoroughly protected against an incorrect input format.

Author(s)

J. Gross, A. Moeller.

Examples

1
2
x <- c('20020105', '20020102', '20020103')
convert_chardate(x)

JuGross/ensAR documentation built on May 10, 2019, 8:23 a.m.