makeGraph.Rd
Creates an igraph object from a square input correlation matrix - only positive correlations are used. Based on the graph.adjacency function of igraph. gplot is helpful for visualization.
makeGraph(
mat,
graphdensity = 1,
communityMethod = NA,
getEfficiency = FALSE,
inverseValuesAsWeights = FALSE
)
input matrix
fraction of edges to keep
see igraph's community detection
boolean, this is slow to compute
if TRUE, high correlations produce small
edge weights. This detail is important when using igraph algorithms as
different methods use weights in different ways. See igraph for its
is_weighted
documentation which notes that weights are used as
distances in shortest path calculations and as strength (similar to degree)
for community methods.
a named list is output including the graph object, adjacency matrix and several graph metrics