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/easyr documentation built on June 10, 2020, 4:58 p.m.