doy: Day of Year

Description Usage Arguments Value Examples

View source: R/doy.R

Description

Calculates the day of the year.

Usage

1
doy(date, day1 = "01-01")

Arguments

date

A vector of dates to be converted.

day1

A character scalar specifying what date should equate to day 1, use "01-01", the default, to get the Julian day.

Value

A numeric vector the same length as date giving the day of the year.

Examples

1
2
3
x <- as.Date(c("1963-01-15", "1972-07-20", "1999-03-10"))
doy(x)
doy(x, "03-01")

JVAdams/jvamisc documentation built on Aug. 11, 2021, 6:43 a.m.