Skip to contents

Imputation function for a numerical column

Usage

num_imputer(x, col)

Arguments

x

input data tibble

col

name of the column to modify and that should be a string or charactor

Value

output data tibble after imputation

Examples

input_df <- data.frame(a = c(1,2,3,4,5,6, NA))
num_imputer(input_df, "a")
#>     a
#> 1 1.0
#> 2 2.0
#> 3 3.0
#> 4 4.0
#> 5 5.0
#> 6 6.0
#> 7 3.5