R/utils.R

Defines functions set_names tibble is_try_error sys_time_utc

sys_time_utc <- function() {
  time <- Sys.time()
  attr(time, "tzone") <- "UTC"
  time
}

is_try_error <- function(x) {
  inherits(x, "try-error")
}

tibble <- function(...) {
  data <- data.frame(..., stringsAsFactors = FALSE)
  class(data) <- c("tbl_df", "tbl", "data.frame")
  data
}

set_names <- function(x, names) {
  names(x) <- names
  x
}

Try the batchr package in your browser

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

batchr documentation built on Oct. 3, 2021, 9:06 a.m.