R/edgeRetention.R

Defines functions edgeRetention

edgeRetention <- function(matrixAList, threshold, p){
  Ahata <- array( unlist(matrixAList), 
                  dim=c( nrow(matrixAList[[1]]), ncol(matrixAList[[1]]), length(matrixAList)))
  adjacencyMean <- apply(Ahata, c(1,2), function(x) mean(x!=0))
  adjacencyMean[adjacencyMean < threshold] <- 0
  round(100*adjacencyMean)
}

Try the backShift package in your browser

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

backShift documentation built on July 2, 2020, 4:01 a.m.