match_month_day_xts: Match a specific month and day

View source: R/match_month_day_xts.r

match_month_day_xtsR Documentation

Match a specific month and day

Description

Create an indicator variables for a specific month and day.

Usage

match_month_day_xts(x, date_string, return_xts = FALSE)

Arguments

x

Numeric xts object.

date_string

Character string; Month and day of the date (Example - January 1 is '0101').

return_xts

Logical scalar; return matrix as an xts time series object. Default is FALSE.

Value

An indicator variable where the week that contains the date entered = 1, 0 otherwise.

Examples

july4_wed_xts <- match_month_day_xts(ic_week_xts, '0707')

bcmonsell/airutilities documentation built on May 16, 2022, 3:23 p.m.