search for: connectlist

Displaying 1 result from an estimated 1 matches for "connectlist".

2011 Jul 14
1
recursive function - finding connections
...quely connected subgraphs. So the sub-network is only connected by itself and not to other nodes. If everything is connected then the list (connectedList) should be length of 1 and have every index in the 1st slot. cheers, Paul findconnection<-function(mat, cutoff){ toList<-function(mat, connectList, cutoff, i, idx){ idx<-which(mat[,idx] < cutoff) if(length(idx) >= 1){ connectList[[i]]<-idx for(z in 1:length(idx)){ connectList<-toList(mat, connectList, cutoff, i, idx[z]) } }else{ return(connectList) } } connectList<-list() for(i in 1:ncol(mat)){...