R/wb_repo_url.R

Defines functions wb_repo_url

Documented in wb_repo_url

#' wb_repo_url
#'
#' @param date date for which to get repo url
#'
#'
wb_repo_url <-
  function(date) {
  # available checkpoints
  checkpoint_dates <- checkpoint::getValidSnapshots()

  # determine nearest available date
  min_date <- min(checkpoint_dates[checkpoint_dates > date])

  repo_url <- paste0(checkpoint::mranUrl(), min_date)
}

Try the wayback package in your browser

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

wayback documentation built on Oct. 23, 2020, 5:47 p.m.