dtt_hour_decimal: Get Decimal Hour Values

Description Usage Arguments Value Methods (by class) See Also Examples

View source: R/hour-decimal.R

Description

Gets decimal hour values for date/time vectors.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
dtt_hour_decimal(x, ...)

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

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

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

Arguments

x

A date/time vector.

...

Unused.

Value

A numeric vector.

Methods (by class)

See Also

dtt_hour()

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

Examples

1
2
3
4
x <- as.POSIXct("1990-01-02 23:40:51")
dtt_hour_decimal(x)
x <- hms::as_hms("23:40:51")
dtt_hour_decimal(x)

dttr2 documentation built on Sept. 19, 2021, 9:06 a.m.