fdk_impute_knn: Impute with KNN

View source: R/helper_functions.R

fdk_impute_knnR Documentation

Impute with KNN

Description

Impute missing values with a K-nearest neighbour

Usage

fdk_impute_knn(df, target, pred1, pred2 = NULL, pred3 = NULL, k)

Arguments

df

a data frame containing columns corresponding to the target and predictor variable names

target

a string specifying the target variable (column) name

pred1

a string specifying the first predictor variable (column) name

pred2

a string specifying the second predictor variable (column) name

pred3

a string specifying the third predictor variable (column) name

k

an integer specifying the number of neighbours to consider

Value

a gap filled data frame


computationales/flux_data_kit documentation built on Feb. 23, 2025, 8:19 p.m.