R/is_true_or_false.R

#' Is true or false
#'
#' Throws an error if the argument is not TRUE or FALSE
#'
#' @param arg_in argument
#' @author Andrew Pfeiffer <andrew.j.pfeiffer@@gmail.com>
#' @export
#' @note 22 June 2017

is_true_or_false <- function(arg_in){
    if (!identical(arg_in, TRUE) & !identical(arg_in, FALSE))
        stop("Argument must be TRUE or FALSE")
}
andrewjpfeiffer/rutilities documentation built on May 11, 2019, 6:26 p.m.