R/neighbors.R

Defines functions neighbors

neighbors <- function(x,y,...){
  nbh=neighborhood(x,...)
  levs=rep(1:nbh$nu,nbh$size.nbh)
  nbh.list <- split(y[nbh$neighbors],levs)
  list(nbh=nbh,list=nbh.list)
}

Try the prodlim package in your browser

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

prodlim documentation built on June 24, 2024, 5:08 p.m.