doy2date: Converts from doy to date

View source: R/unit_conv.R

doy2dateR Documentation

Converts from doy to date

Description

Given a day of the year as julian (1-366) it converts to ‘Date’

Given a ‘Date’ it converts to julian day (1-366) or day of the year

Usage

doy2date(x, year = 2001, inverse = FALSE)

date2doy(x, year = 2001, inverse = FALSE)

Arguments

x

either an integer 1-366 or a ‘Date’

year

year

inverse

if TRUE it goes from doy to ‘Date’

Value

an object of class ‘Date’ or a numeric if inverse equals TRUE.

an numeric or an object of class ‘Date’ if inverse equals TRUE.

Examples

doy2date(120)
date2doy("04-30")


apsimx documentation built on Sept. 11, 2024, 5:42 p.m.