-
Notifications
You must be signed in to change notification settings - Fork 0
plotMethods_utils.R
Dion Detterer edited this page Jan 13, 2020
·
1 revision
This function contains only one function: splitMatrix()
, used in support of the plot method plot.EpiNet()
.
Summary: This function takes an incidence matrix for a hypergraph and splits it into a list of incidence matrices per order of interaction.
- mm: an incidence matrix
splitMatrix()
returns a list of matrices, one per order of interaction.
- Set all elements in mm to 0 or 1
- Get a vector of the number of nodes for each column of mm
- Reduce the vector to a sorted vector of unique values greater than 1
- For each value in the vector
- Create a matrix from the columns of mm that contain that many nodes
- Store the matrix in a list
- Return the list