R/near3.R

Defines functions near3

Documented in near3

near3 <-
function (x, data) 
{#find the near row to x in data using manhattan distance
    nd <- length(data[, 1])
    distall <- rep(0, nd)
    for (i in 1:nd) {
        distall[i] <- distancia1(x, data[i, ])
    }
    ind1 <- order(distall)[1]
    near1 <- data[ind1, ]
    near1
}

Try the dprep package in your browser

Any scripts or data that you put into this service are public.

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