R/test_util.R

Defines functions is_pos_number is_nonneg_number is_number isnt_karl

# used to skip tests when not on *my* computer in interactive mode
# needed for testing mult-core code, which isn't allowed within R CMD check
isnt_karl <-
    function()
{
    !(interactive() &&
      identical(Sys.getenv("KARL_LOCAL"), "true"))
}

# is a number? (from assertthat)
is_number <- function(x) is.numeric(x) && length(x)==1
is_nonneg_number <- function(x) is_number(x) && x >= 0
is_pos_number <- function(x) is_number(x) && x > 0

Try the qtl2 package in your browser

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

qtl2 documentation built on April 22, 2023, 1:10 a.m.