R/utils.R

Defines functions check_date

check_date <- function(string) {
  if(is.na(as.Date(string, format = "%Y-%m-%d"))){
    stop(paste0("The date '", string, "' is not yyyy-mm-dd formatted."),
         call. = FALSE)
  }
}

Try the cranlogs package in your browser

Any scripts or data that you put into this service are public.

cranlogs documentation built on May 2, 2019, 1:05 p.m.