Learn R Programming

qgraph (version 1.3.1)

getWmat: Obtain a weights matrix

Description

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

Usage

## S3 method for class 'matrix':
getWmat(x,nNodes,labels, directed = TRUE,\dots)
## S3 method for class 'data.frame':
getWmat(x,nNodes,labels, directed = TRUE,\dots)
## S3 method for class 'igraph':
getWmat(x,labels,\dots)
## S3 method for class 'qgraph':
getWmat(x,directed,\dots)

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

Value

  • A weights matrix