R/utils.R

Defines functions .positive_number .non_na_number .non_na_scalar

.non_na_scalar <- function(val) {
    length(val)==1L && !is.na(val)
}

.non_na_number <- function(val) {
    .non_na_scalar(val) && is.numeric(val)
}

.positive_number <- function(val) {
    .non_na_number(val) && val > 0
}

Try the bluster package in your browser

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

bluster documentation built on Nov. 8, 2020, 8:29 p.m.