date_difftime_ | R Documentation |
..
date_difftime_(date_, difftime_, tz = "UTC", tol = sqrt(.Machine$double.eps))
date_ |
an R object containing Date information |
difftime_ |
a difftime object |
tz |
character scalar, time zone, see as.POSIXlt.Date and ISOdatetime |
tol |
numeric scalar, tolerance in finding second.
Default |
Function date_difftime_ returns a POSIXct object.
For now, I do not know how to force function readxl::read_excel
to read a column
as POSIXt.
By default, such column will be read as difftime.
See lubridate:::date.default
for the handling of year and month!
(x = as.Date(c('2022-09-10', '2023-01-01', NA, '2022-12-31')))
y = as.difftime(c(47580.3, NA, 48060, 30660), units = 'secs')
units(y) = 'hours'
y
date_difftime_(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.