R/outdegree2.R

outdegree2 <- function(y){
	
	stopifnot(is.adjacency(y))
	
	outdegree <- numeric(nrow(y))
	tabrs <- table(rowSums(y))
	not0 <-  as.numeric(names(tabrs))
	outdegree[not0 + 1] <- tabrs
	
	outdegree
	
}
igollini/lvm4net documentation built on June 20, 2019, 4:48 p.m.