inspect_type: Inspect character and factor vector

View source: R/dt_ops.R

inspect_typeR Documentation

Inspect character and factor vector

Description

Checks character or factor vector to determine whether it might be best to convert to numeric.

Usage

inspect_type(x, xname = NULL, verbose = TRUE, thresh = 0.5, na.omit = TRUE)

Arguments

x

Character or factor vector.

xname

Character: Name of input vector x.

verbose

Logical: If TRUE, print messages to console.

thresh

Numeric: Threshold for determining whether to convert to numeric.

na.omit

Logical: If TRUE, remove NA values before checking.

Author(s)

E.D. Gennatas

Examples

## Not run: 
x <- c("3", "5", "undefined", "21", "4", NA)
inspect_type(x)
z <- c("mango", "banana", "tangerine", NA)
inspect_type(z)

## End(Not run)

egenn/rtemis documentation built on May 4, 2024, 7:40 p.m.