#' Time Series Count
#'
#' Extracts year-month from a date column and counts the mount.
#'
#' @param df The dataframe
#' @param date A date or datetime column to count.
#'
#' @return A ggplot2 object
#' @export
#' @import dplyr
#' @examples
#'
#' dog_month_count(df = pacs_test, date = Study_date_time_PACS)
dog_month_count <- function(df, date = date){
date <- rlang::enquo(date)
df %>%
mutate(year_month = zoo::as.yearmon(!!date)) %>%
count(.data$year_month)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.