Nothing
knearest <-
function(D,P,n_clust)
{
if(!requireNamespace("FNN", quietly = TRUE))
{
install.packages("FNN", quiet = TRUE)
}
knD<-FNN::knnx.index(D,P,k=(n_clust+1), algo="kd_tree")
knD=knD*(knD!=row(knD))
que=which(knD[,1]>0)
for (i in que)
{ knD[i,which(knD[i,]==0)]=knD[i,1]
knD[i,1]=0
#print(i)
}
return(knD[,2:(n_clust+1)])
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.