is.binary: Check if a variable is binary

View source: R/matchMulti-internal.R

is.binaryR Documentation

Check if a variable is binary

Description

Examines a vector that is not coded as a logical to see if it contains only 0s and 1s.

Usage

is.binary(x)

Arguments

x

A vector.

Value

a logical value, TRUE if the vector contains only 0s and 1s and FALSE otherwise.

Author(s)

Luke Keele, Penn State University, ljk20@psu.edu

Sam Pimentel, University of California, Berkeley, spi@berkeley.edu


sdbpimentel/matchMulti documentation built on June 1, 2025, 4:07 p.m.