Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dateCheck

Checks date format.


Description

Checks that the character form of a vector of dates conforms to YYYYMMDDHH or YYYYMMDD.

Usage

dateCheck(YYYYMMDDHH)

Arguments

YYYYMMDDHH

A character vector (or its factor equivalent) of dates which should be in the form YYYYMMDDHH or YYYYMMDD, in which YYYY specifies the year, MM the month, DD the day, and (optionally) HH the hour.

Details

If both YYYYMMDDHH and YYYYMMDD are present, the YYYYMMDD dates are assumed to be in error even if HH == 00 for all of the longer dates.
Requires the chron library.

Value

A logical vector indicating whether or not each element of YYYYMMDDHH has the correct format.

See Also

Examples

dateCheck(c("2008043000", "20080431", "20080501"))

ensembleBMA

Probabilistic Forecasting using Ensembles and Bayesian Model Averaging

v5.1.5
GPL (>= 2)
Authors
Chris Fraley, Adrian E. Raftery, J. McLean Sloughter, Tilmann Gneiting, University of Washington.
Initial release
2018-01-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.