Skip to contents

Calculate frequencies of groups per month

Usage

calc_monthly_freq(
  data,
  by,
  date_var_name,
  .drop_latest_month = TRUE,
  .calc_year_month_day_vars = TRUE
)

Arguments

data

Data

by

Grouping variables used in group_by

date_var_name

String specifying date variable, needs to be class date

.drop_latest_month

Logical, specifying whether or not to drop the most recent month

.calc_year_month_day_vars

Logical, specifying whether to calculate separate year, month, and day variable