Description Usage Arguments Details Value Author(s) Examples
Returns the intersection of the input matrices. Output object is an
adjacency matrix where the edge weight is the average value of the absolute
value of edges in BOTH matrices. Edges not present in either, or below the
cutoff
are removed or set to zero.
1 | netIntersect(matrix1, matrix2, cutoff=NULL, absolute=TRUE, ...)
|
matrix1 |
Square matrix (e.g. correlation or adjacency) containing row/column labels |
matrix2 |
Square matrix (e.g. correlation or adjacency) containing row/column labels |
cutoff |
The cutoff value. Edges less than this value (absolute value considered)are converted to zero. |
absolute |
Logical, should the absolute values be considered for the cutoff value. |
... |
Other parameters. |
Matrices must be square and have row and column labels. Output adjacency matrix can be used directly for creating a graph object.
netIntersect
returns an adjacency matrix containing edged present in
both graphs.
Shannon M. Bell
1 2 3 4 5 6 7 8 | #using the state.x77 and USArrests datasets
arrestCor<-cor(t(USArrests))
stateCor<-cor(t(state.x77))
isect<-netIntersect(stateCor, arrestCor)
isect[1:15,1:5]
#Setting a cutoff to remove any edges that are below 0.6
isect.6<-netIntersect(stateCor, arrestCor, cutoff=0.6)
isect.6[1:15,1:5]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.