time_range: Set up time periods.

View source: R/time_range.R

time_rangeR Documentation

Set up time periods.

Description

time_range creates vectors of start and end dates to count over

Usage

time_range(yearmin = 2012, yearmax = 2017, period = "year", date = "-12-31")

Arguments

yearmin

An integer that sets the starting point for the time range.

yearmax

An integer that sets the end point for the time range.

period

A string of either date, month, quarter, or year the determines the length of time to count over. Default is year.

date

A string that can be used to set the specific date to look at. Must be used with period set to date. Takes the format "-MM-DD". Non-valid dates will produce a charToDate(x) error.

Details

This function sets up the vectors for which we want to count PHA enrollment. Its output is a list of start and end vectors, plus a string showing the period of time being counted in each start/end combo.

Examples

## Not run: 
time_range()
time_range(yearmin = 2014, yearmax = 2015, period = "quarter")
time_range(period = "date", date = "-06-30")

time_range(yearmin = 2017, yearmax = 2016)

## End(Not run)


PHSKC-APDE/Housing documentation built on Feb. 6, 2024, 3:27 a.m.