Skip to contents

Imputation function for a boolean column

Usage

bol_imputer(x, c, method = "mode")

Arguments

x

input data tibble

c

name of the logical class or boolean column to modify

method

name of the imputing strategy.

Value

output data tibble after imputation

Examples

input_df <- data.frame(a = c(TRUE,FALSE, TRUE), b = c(TRUE,FALSE, NA))
bol_imputer(input_df, "b", "mode")
#>       a     b
#> 1  TRUE  TRUE
#> 2 FALSE FALSE
#> 3  TRUE  TRUE