R/messageDateRange.R

Defines functions messageDateRange

Documented in messageDateRange

#' Display date range of a vector
#'
#' @description Utility function to display the range of dates in a vector.
#'
#' @param prefix string to print before outputting range.
#' @param d vector of values.
#'
#' @return Nothing, called for the side effect.
#' 
#' @export
messageDateRange <- function(prefix, d) {
  r <- range(d)
  messagef("%s: %s - %s", prefix, r[1], r[2])
}

Try the babsim.hospital package in your browser

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

babsim.hospital documentation built on May 30, 2022, 9:05 a.m.