Gets and sets minute values for date/time vectors.

dtt_minutes(x, ...)

dtt_minutes(x) <- value

dtt_minute(x, ...)

dtt_minute(x) <- value

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

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

# S3 method for hms
dtt_minute(x, ...)

# S3 method for POSIXct
dtt_minute(x) <- value

# S3 method for hms
dtt_minute(x) <- value

dtt_set_minute(x, value)

Arguments

x

A date/time vector.

...

Unused.

value

A integer vector of the minute value(s).

Value

An integer vector (or the modified date/time vector).

Methods (by class)

  • dtt_minute(Date): Get integer vector of minute values for a Date vector

  • dtt_minute(POSIXct): Get integer vector of minute values for a POSIXct vector

  • dtt_minute(hms): Get integer vector of minute values for a hms vector

Functions

  • dtt_minute(POSIXct) <- value: Set minute values for a POSIXct vector

  • dtt_minute(hms) <- value: Set minute values for a hms vector

See also

Examples

x <- as.POSIXct("1990-01-02 23:40:51")
dtt_minute(x)
#> [1] 40
dtt_minute(x) <- 27L
x
#> [1] "1990-01-02 23:27:51 UTC"

x <- hms::as_hms("23:40:51")
dtt_minute(x)
#> [1] 40
dtt_minute(x) <- 27L
x
#> 23:27:51