R/indegree2.R

indegree2 <- function(y){
	
	stopifnot(is.adjacency(y))
	
	indegree <- numeric(nrow(y))
	tabcs <- table(colSums(y))
	not0 <-  as.numeric(names(tabcs))
	indegree[not0 + 1] <- tabcs
	
	indegree
}

Try the lvm4net package in your browser

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

lvm4net documentation built on June 13, 2019, 5:03 p.m.