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.


joliencremers/bpnreg documentation built on Nov. 9, 2023, 4:55 a.m.