Description Usage Arguments Value
Perform imputation of missing data in a data frame using the k-Nearest Neighbour algorithm. For discrete variables we use the mode, for continuous variables the median value is instead taken.
1 2 3 4 5 6 7 |
data |
a numerical matrix. |
k |
number of neighbours to be used; for categorical variables the mode of the neighbours is used, for continuous variables the median value is used instead. Default: 10. |
cat.var |
vector containing the indices of the variables to be considered as categorical. Default: all variables. |
to.impute |
vector indicating which rows of the dataset are to be imputed. Default: impute all rows. |
using |
vector indicating which rows of the dataset are to be used to search for neighbours. Default: use all rows. |
imputed matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.