Learn R Programming

examly (version 0.2.0)

parse_lc_bin: Parse 1/0 coded data

Description

Validates that a vector contains only 1s, 0s, or NAs.

Usage

parse_lc_bin(x)

Value

An integer vector (1, 0, or NA).

Arguments

x

A vector of potential 1/0 scores.

Examples

Run this code
parse_lc_bin(c(1, 0, "1", "0", 2, "A", NA))

Run the code above in your browser using DataLab