R/assertions.R

Defines functions is_timeout is_flag is_string

is_string <- function(x) {
  is.character(x) && length(x) == 1 && !is.na(x)
}

is_flag <- function(x) {
  is.logical(x) && length(x) == 1 && !is.na(x)
}

is_timeout <- function(x) {
  is.numeric(x) && length(x) == 1 && !is.na(x) && x >= 0
}

Try the filelock package in your browser

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

filelock documentation built on May 29, 2024, 1:41 a.m.