Skip to contents

non_numeric() is designed primarily for interactive checking of numeric conversions. It helps quickly determine what values in a vector cannot be converted to numeric (either directly or via std_num()); this is particularly useful for checking steps of a data cleaning pipeline.

Usage

non_numeric(x, unique = TRUE, sort = unique, std_num = FALSE)

Arguments

x

A vector

unique

Whether unique values should be returned; if FALSE, all values are returned

sort

Whether return values should be sorted; most useful when unique = TRUE

std_num

Whether to use std_num() for numeric conversion; if FALSE, conversion is performed directly by as.numeric() (with warnings suppressed)

Value

The values of x that resulted in NA_real_ after conversion; this includes any NA values in x before conversion