Learn R Programming

bpnreg (version 2.0.3)

cat_check: 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)

Value

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

Arguments

x

vector containing values of a variable.