encode_YN: Encode character vectors as logicals

Description Usage Arguments Value

View source: R/EncodeYN.R

Description

Encode character vectors as logicals

Usage

1
2
3

Arguments

x

A character vector.

Value

A logical vector with TRUE and FALSE matching Y/Yes and N/No. Other values mapped to NA.

isEssentiallyLogical Returns TRUE or FALSE based on whether the input numeric vector is comprised only of 0 and 1 (and NA).


HughParsonage/dhhs documentation built on Dec. 17, 2021, 11:22 p.m.