checkIsBoolean {CASMAP}R Documentation

Check if a variable is boolean or not

Description

Checks if a variable is boolean, if not throws an error, otherwise returns boolean.

Usage

checkIsBoolean(var, name)

Arguments

var

The variable to be checked (if boolean).

name

The name of the variable to appear in any error message.

Value

If not boolean (or NA), throws error. If NA, return FALSE. Otherwise return boolean value of var.


[Package CASMAP version 0.6.0 Index]