R/column-dt.R

Defines functions pillar_shaft.difftime column_dt

column_dt <- function(x) {
  as.difftime(x / 1000, units = "secs")
}

#' @importFrom pillar pillar_shaft new_pillar_shaft_simple
#' @importFrom prettyunits pretty_dt
#' @export

pillar_shaft.difftime <- function(x, ...) {
  cx <- my_pretty_dt(x)
  new_pillar_shaft_simple(cx, ...)
}

Try the rhub package in your browser

Any scripts or data that you put into this service are public.

rhub documentation built on Aug. 31, 2022, 5:06 p.m.