\HeaderA{perms}{Randomly permute edges or node labels in a graph}{perms}
\aliasA{permEdgesM2M}{perms}{permEdgesM2M}
\aliasA{permNodesM2M}{perms}{permNodesM2M}
\keyword{graphs}{perms}
\begin{Description}\relax
Given an adjacency matrix for a graph, \code{permEdgesM2M} will return an adjacency matrix after an Erdos-Renyi random permutation of the edges in the graph.  \code{perNodesM2M} will return an adjacency matrix for a graph with identical structure, but with the node labels permuted.
\end{Description}
\begin{Usage}
\begin{verbatim}
permEdgesM2M(mat)
permNodesM2M(mat)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{mat}] A square adjacency matrix for a graph.
\end{ldescription}
\end{Arguments}
\begin{Value}
A square adjacency matrix for the new graph, subject to a random permutation of the edges or nodes.
\end{Value}
\begin{Author}\relax
Denise Scholtens
\end{Author}
\begin{References}\relax
Balasubramanian, et al. (2004) A graph theoretic approach to integromics - integrating disparate sources of functional genomics data.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{permPower}{permPower}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
g <- matrix(c(0,1,1,1,1,0,0,0,1,0,0,0,1,0,0,0),nrow=4)

g1 <- permEdgesM2M(g)
g2 <- permNodesM2M(g)

\end{ExampleCode}
\end{Examples}

