mid_date: Compute the midpoint between two dates

View source: R/dateFunctions.R

mid_dateR Documentation

Compute the midpoint between two dates

Description

Compute the midpoint between two dates

Usage

mid_date(startdate, enddate)

Arguments

startdate

A vector of class Date containing the beginning date(s)

enddate

A vector of class Date containing the ending date(s)

Value

A vector of class Date containing the midpoint date(s) between startdate and enddate

Author(s)

Steve Gutreuter

See Also

interval

Examples

begin <- ymd("2020-06-21", "2021-06-21")
end <- ymd("2020-12-21", "2021-12-21")
mid_date(begin, end)


sgutreuter/SGmisc documentation built on Aug. 25, 2024, 7:21 p.m.