R/most_recent_changes.R

Defines functions most_recent_changes

#' Most recent changes
#' 
#' Returns a table with the most recently changed municipalities.
#' 
#' @param mutations A tibble with municipality mutations (as created by
#'   \code{\link{import_CH_municipality_inventory}})
#'
#' @export
#' 
most_recent_changes <- function(mutations) {
  
  mutations_most_recent <- filter(mutations, change_date == date_of_last_update(mutations))
  
  return(mutations_most_recent)
}
ValValetl/SMMT documentation built on May 22, 2024, 6:51 p.m.