landsat (version 1.1.0)

ddate: 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)

Value

The decimal date in years.

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.

Author

Sarah Goslee

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.

Examples

Run this code
	ddate(2001, 5, 15)

Run the code above in your browser using DataLab