ddate: Decimal Date

View source: R/ddate.R

ddateR Documentation

Decimal Date

Description

Convert a vector containing year, month, day or individual year, month, day arguments into a decimal date in years.

Usage

	ddate(year, month, day)

Arguments

year

Either a numeric year OR a vector in the form of c(year, month, day). The latter option is so that ddate() can be conveniently used with apply().

month

If year is a single value, must contain the number of the month.

day

If year is a single value, must contain the number of the day.

Details

ddate() will accept a vector with the three date components so that it can be conveniently used with apply() on a data frame containing columns for year, month and day.

Value

The decimal date in years.

Author(s)

Sarah Goslee

Examples

	ddate(2001, 5, 15)

landsat documentation built on Aug. 25, 2023, 1:07 a.m.