R/date_of_last_update.R

Defines functions date_of_last_update

Documented in date_of_last_update

#' Get date of last municipal inventory update
#'
#' Obtain the most recent change in the municipal inventory database. Most but
#' not all municipal mutations are made at first of january.
#'
#' @param mutations A tibble with municipality mutations (as created by
#'   \code{\link{import_CH_municipality_inventory}})
#'
#' @return A \code{Date} object of length one.
#'
#' @export

date_of_last_update <- function(mutations) {
  return(max(mutations$change_date))
}

Try the SMMT package in your browser

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

SMMT documentation built on April 4, 2022, 1:07 a.m.