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
	
}

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.