convert_variables: Convert variables

View source: R/helpfunctions_checks.R

convert_variablesR Documentation

Convert variables

Description

Cleans up the data by

  • changing NaN to NA

  • converting continuous variables with just two values to factor

  • converting logical variables to a factor

  • cleaning factor labels (using make.names())

Usage

convert_variables(data, allvars, mess = TRUE)

Arguments

data

a data.frame

allvars

a character vector of the relevant variables in data

mess

logical, if TRUE messages are printed

Details

used in model_imp (2025-09-07)

Value

the cleaned data.frame


JointAI documentation built on Jan. 30, 2026, 5:07 p.m.