dtt_set_time {dttr2}R Documentation

Floor Time

Description

Coerces vectors to floored (and wrapped) hms vectors.

Usage

dtt_set_time(x, value)

dtt_time(x, ...)

dtt_time(x) <- value

## S3 method for class 'integer'
dtt_time(x, ...)

## S3 method for class 'double'
dtt_time(x, ...)

## S3 method for class 'character'
dtt_time(x, ...)

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

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

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

## S3 method for class 'POSIXlt'
dtt_time(x, ...)

## S3 replacement method for class 'Date'
dtt_time(x) <- value

## S3 replacement method for class 'POSIXct'
dtt_time(x) <- value

Arguments

x

A vector.

value

A time vector.

...

Unused.

Value

A floored hms vector.

Methods (by class)

Functions

See Also

Other floor: dtt_date_time(), dtt_date(), dtt_excel_to_date(), dtt_floored(), dtt_floor()

Examples

dtt_time(1L)
dtt_time(1.999)
dtt_time(-0.001)
dtt_time(Sys.Date())
dtt_time(as.POSIXct("2001-01-01 02:30:40"))
dtt_time(as.POSIXct("2001-01-01 02:30:40", tz = "Etc/GMT-8"))

[Package dttr2 version 0.5.0 Index]