initialize_df: Initialize Missing Data in Data Frame

View source: R/zzz.R

initialize_dfR Documentation

Initialize Missing Data in Data Frame

Description

This function initializes missing values in a data frame using mean imputation.

Usage

initialize_df(x, method = "mean", seed = NULL)

Arguments

x

A data frame or matrix containing missing values to be initialized.   If a matrix is provided, it will be converted to a data frame internally.

method

A character string specifying the initialization method.   Currently, only "mean" is supported.

seed

An optional integer to set the random seed for reproducibility. Not used in the current implementation.

Details

Missing values are replaced with the column means.

Value

A data frame or matrix with missing values initialized using the   mean of each column.


misaem documentation built on Sept. 12, 2025, 1:08 a.m.