R/net.neighbors.R

net.neighbors <-
function(theta,index)
{
	#index = (row.names(theta[[1]])==name)
	K = length(theta)
	p = dim(theta[[1]])[1]
	neighbors = list()
	for(k in 1:K)
	{
	  neighbors[[k]] = which(theta[[k]][index,]!=0)
	}
	return(neighbors)
}

Try the fasjem package in your browser

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

fasjem documentation built on May 2, 2019, 9:19 a.m.