date_decimal

0th

Percentile

Converts a decimal to a date.

Converts a decimal to a date.

Keywords
manip, methods, chron
Usage
date_decimal(decimal, tz = NULL)
Arguments
decimal
a numeric object
tz
the time zone required
Value

a POSIXct object, whose year corresponds to the integer part of decimal. The months, days, hours, minutes and seconds elements are picked so the date-time will accurately represent the fraction of the year expressed by decimal.

Aliases
  • date_decimal
Examples
date <- ymd("2009-02-10")
decimal <- decimal_date(date)  # 2009.11
date_decimal(decimal) # "2009-02-10 UTC"
Documentation reproduced from package lubridate, version 1.5.6, License: GPL-2

Community examples

Looks like there are no examples yet.