conv_notno: Convert "no" columns to logicals

View source: R/utils-conv.R

conv_notnoR Documentation

Convert "no" columns to logicals

Description

Convert "no" columns to logicals

Usage

conv_notno(vec)

Arguments

vec

a character vector to convert "no" columns

Details

Matches the case-insensitive fixed string "no" and "none" and negates the result. Any string that does not match either of these will return TRUE. NA will return NA.

Value

a logical vector

Examples


x <- data.frame(x = rep("no", 10), y = rep("NO", 10), z = rep("yes", 10),
xx = rep("", 10), yy = rep(NA, 10), zz = rep("NONE", 10))
lapply(x, nsqipr:::conv_notno)


dylanrussellmd/nsqipr documentation built on Oct. 13, 2023, 11:01 a.m.