ec.knnimp: Imputation using k-nearest neighbors.

Description Usage Arguments Value Author(s) Examples

View source: R/ec.knnimp.R

Description

This function imputes missing values by knn imputation.

Usage

1
ec.knnimp(data, nomatr=0, k=10)

Arguments

data

matrix containing relevant variables and classes

nomatr

list of nominal attributes

k

number of neighbors to use for imputation

Value

r

matrix with missing values imputed

Author(s)

Caroline Rodriguez and Edgar Acuna

Examples

1
2
data(hepatitis)
hepa.knnimp=ec.knnimp(hepatitis,nomatr=c(1,3:14),k=10)

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

dprep documentation built on May 29, 2017, 11:01 a.m.