inspect_type: Inspect character and factor vector

View source: R/utils_data.table.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, verbosity = 1L, thresh = 0.5, na.omit = TRUE)

Arguments

x

Character or factor vector.

xname

Character: Name of input vector x.

verbosity

Integer: Verbosity level.

thresh

Numeric: Threshold for determining whether to convert to numeric.

na.omit

Logical: If TRUE, remove NA values before checking.

Value

Character.

Author(s)

EDG

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 June 14, 2025, 11:54 p.m.