R/as_seconds.R

Defines functions as_seconds

Documented in as_seconds

#' Title
#'
#' @param x  a difftime object
#' @param sql set to TRUE if you're working with remote tables and using dbplyr
#'
#' @return a difftime object in seconds

as_seconds <- function(x, sql = FALSE) {
  # If given as a number, units = "secs" is ignored
  ret <- as.double(x, units = "secs")

  ret
}

Try the funneljoin package in your browser

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

funneljoin documentation built on March 31, 2023, 11:07 p.m.