This function extracts a weights matrix from various kinds of objects.
# S3 method for matrix
getWmat(x,nNodes,labels, directed = TRUE,…)
# S3 method for data.frame
getWmat(x,nNodes,labels, directed = TRUE,…)
# S3 method for igraph
getWmat(x,labels,…)
# S3 method for qgraph
getWmat(x,directed,…)
An input object
Number of Nodes
A vector specifying the labels of each node
Logical indicating if the graph should be directed
Ignored
A weights matrix