fix_missing_alphanumeric_values {fixr}R Documentation

Fill missing values in alphanumeric columns

Description

This function imputes missing values in alphanumeric columns of a data frame. If a column is numeric, missing values are imputed with the column mean. Otherwise, missing values are imputed with the column mode (most common value).

Usage

fix_missing_alphanumeric_values(df)

Arguments

df

A data frame with missing values.

Value

A data frame with imputed missing values.

Examples

df <- data.frame(w = c(7, 8, 180, 7), x = c("a", "b", "c", NA),
                 y = c(4, 5, -6, 4), z = c(7, 8, NA, 7))
fix_missing_alphanumeric_values(df)


[Package fixr version 0.1.0 Index]