cat_check: Check whether a variable is categorical

View source: R/utils.R

cat_checkR Documentation

Check whether a variable is categorical

Description

cat_check checks whether a vector contains only 0 and 1 and thus is a dummy variable.

Usage

cat_check(x)

Arguments

x

vector containing values of a variable.

Value

TRUE, if the vector only contains 0 and 1, FALSE is the vector contains other values.


bpnreg documentation built on May 29, 2024, 12:35 p.m.