R/find_nn_eps.R

find_nn_eps <-
function(X,eps){
	
	#calculate distance matrix
	nns <- as.matrix(dist(X))

	#choose neighbours using eps environment
	nns <- nns<eps
	diag(nns) <- FALSE
	
	return(nns)
}

Try the lle package in your browser

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

lle documentation built on May 2, 2019, 2:49 p.m.