R/most_recent_changes.R

Defines functions most_recent_changes

Documented in 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)
}

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.