Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

decimal_date

Converts a date to a decimal of its year


Description

Converts a date to a decimal of its year

Usage

decimal_date(date)

Arguments

date

a POSIXt or Date object

Value

a numeric object where the date is expressed as a fraction of its year

Examples

date <- ymd("2009-02-10")
decimal_date(date)  # 2009.11

lubridate

Make Dealing with Dates a Little Easier

v1.7.10
GPL (>= 2)
Authors
Vitalie Spinu [aut, cre], Garrett Grolemund [aut], Hadley Wickham [aut], Ian Lyttle [ctb], Imanuel Costigan [ctb], Jason Law [ctb], Doug Mitarotonda [ctb], Joseph Larmarange [ctb], Jonathan Boiser [ctb], Chel Hee Lee [ctb], Google Inc. [ctb, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.