initialize_df | R Documentation |
This function initializes missing values in a data frame using mean imputation.
initialize_df(x, method = "mean", seed = NULL)
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. |
Missing values are replaced with the column means.
A data frame or matrix with missing values initialized using the mean of each column.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.