dt_inspect_types: Inspect column types

View source: R/utils_data.table.R

dt_inspect_typesR Documentation

Inspect column types

Description

Will attempt to identify columns that should be numeric but are either character or factor by running inspect_type on each column.

Usage

dt_inspect_types(x, cols = NULL, verbosity = 1L)

Arguments

x

data.table: Input data.table.

cols

Character vector: columns to inspect.

verbosity

Integer: Verbosity level.

Value

Character vector.

Author(s)

EDG

Examples

library(data.table)
x <- data.table(
  id = 8001:8006,
  a = c("3", "5", "undefined", "21", "4", NA),
  b = c("mango", "banana", "tangerine", NA, "apple", "kiwi"),
  c = c(1, 2, 3, 4, 5, 6)
)
dt_inspect_types(x)

rtemis documentation built on Oct. 20, 2026, 1:06 a.m.