R/permNodesM2M.R

Defines functions permNodesM2M

Documented in permNodesM2M

#permutes rows and columns in matrix
#equivalent to node permutation in a graph

permNodesM2M<-function(mat){
	
	ord<-sample(dim(mat)[1],dim(mat)[1],replace=FALSE)
	newmat<-mat[ord,ord]
	return(newmat)
}

Try the GraphAT package in your browser

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

GraphAT documentation built on Nov. 8, 2020, 5:01 p.m.