date2doy: Convert Dates to DOYs

Description Usage Arguments Value See Also Examples

View source: R/date2doy.R

Description

Used to convert a vector of dates formated as M-D-YYYY to a vector of days of the year, while taking leap years into account.

Usage

1

Arguments

date

a character vector containing the date to convert. June 1, 2018 would be "6/1/2018", and December 25, 1975 would be "12/25/1975". Other date formats are not currently accepted although dates from more than one year can be included.

Value

a numeric vector containing the DOY that was converted from M-D-YYYY format.

See Also

doy2date

Examples

1
2
3
date2doy("6/12/2016")
date2doy(c("6/12/2017", "6/19/2017"))
date2doy(c("6/1/2016", "6/1/2017"))

bstaton1/StatonMisc documentation built on May 18, 2020, 12:06 a.m.