dt_set_autotypes: Set column types automatically

View source: R/utils_data.table.R

dt_set_autotypesR Documentation

Set column types automatically

Description

This function inspects a data.table and attempts to identify columns that should be numeric but have been read in as character, and changes types in-place. This can happen when one or more fields contain non-numeric characters.

Usage

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

Arguments

x

data.table

cols

Character vector: columns to work on. If not defined, will work on all columns

verbosity

Integer: Verbosity level.

Value

data.table, invisibly.

Author(s)

EDG


egenn/rtemis documentation built on June 14, 2025, 11:54 p.m.