detect_na_intro: Check for coercion's NA introduction

Description Usage Arguments Value Examples

View source: R/detect_na_intro.R

Description

Detect where coercing a vector introduces NAs.

Usage

1

Arguments

x

a vector.

FUN

a function for type coercion.

Value

A logical vector indicating where NAs were introduced.

Examples

1
2
3
x <-  c("5", "12", "zero", NA, "0")
check <- detect_na_intro(x, as.numeric)
data.frame(x, check)

coletl/coler documentation built on May 12, 2021, 9:44 p.m.