Learn R Programming

qgraph (version 1.9.8)

getWmat: Obtain a weights matrix

Description

This function extracts a weights matrix from various kinds of objects.

Usage

# 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,...)

Value

A weights matrix

Arguments

x

An input object

nNodes

Number of Nodes

labels

A vector specifying the labels of each node

directed

Logical indicating if the graph should be directed

...

Ignored

Author

Sacha Epskamp <mail@sachaepskamp.com>