Skip to contents

Returns the indices of dates that fall within specified months. Useful for subsetting time series data by month.

Usage

find_monthly_indices(date, months, ind = seq_along(date))

Arguments

date

A vector of dates (e.g., Date, POSIXt).

months

A character vector of two-digit month strings (e.g., c("02", "03")).

ind

An optional vector of indices used to subset the input date vector before filtering. Defaults to all indices in the date vector.

Value

An integer vector of indices corresponding to