50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


dttr2 (version 0.5.2)

dtt_year_decimal: Get Decimal Year Values

Description

Gets decimal year values for date/time vectors.

Usage

dtt_year_decimal(x, ...)

# S3 method for Date dtt_year_decimal(x, ...)

# S3 method for POSIXct dtt_year_decimal(x, ...)

Value

A numeric vector.

Arguments

x

A date/time vector.

...

Unused.

Methods (by class)

  • dtt_year_decimal(Date): Get numeric vector of decimal year values for a Date vector

  • dtt_year_decimal(POSIXct): Get numeric vector of decimal year values for a POSIXct vector

See Also

dtt_year()

Other decimal: dtt_day_decimal(), dtt_doy_decimal(), dtt_hour_decimal(), dtt_minute_decimal(), dtt_month_decimal()

Examples

Run this code
x <- as.Date("1990-01-02")
dtt_year_decimal(x)

Run the code above in your browser using DataLab