Skip to contents

Gets decimal minute values for date/time vectors.

Usage

dtt_minute_decimal(x, ...)

# S3 method for class 'Date'
dtt_minute_decimal(x, ...)

# S3 method for class 'POSIXct'
dtt_minute_decimal(x, ...)

# S3 method for class 'hms'
dtt_minute_decimal(x, ...)

Arguments

x

A date/time vector.

...

Unused.

Value

A numeric vector.

Methods (by class)

  • dtt_minute_decimal(Date): Get numeric vector of decimal minute values for a Date vector

  • dtt_minute_decimal(POSIXct): Get numeric vector of decimal minute values for a POSIXct vector

  • dtt_minute_decimal(hms): Get numeric vector of decimal minute values for a hms vector

Examples

x <- as.POSIXct("1990-01-02 23:40:51")
dtt_minute_decimal(x)
#> [1] 40.85
x <- hms::as_hms("23:40:51")
dtt_minute_decimal(x)
#> [1] 40.85