getConnectedNodes: Get all connected nodes in a network

View source: R/subnetworks.R

getConnectedNodesR Documentation

Get all connected nodes in a network

Description

Get all connected nodes in a network

Usage

getConnectedNodes(
  mat = NULL,
  net = NULL,
  node = NULL,
  ignore.selfloops = TRUE,
  ignore.negative = FALSE,
  components = c("all", "largest")
)

pruneUnconnectedNodes(
  mat = NULL,
  node = NULL,
  ignore.selfloops = TRUE,
  ignore.negative = FALSE,
  components = c("all", "largest")
)

Arguments

mat

An adjacency matrix.

net

A qgraph object. One of mat or net must be given.

node

A node name. If given, the function only returns nodes that are connected to this node, directly or indirectly.

ignore.selfloops

Should self-loops be ignored when determining if a node is unconnected?

ignore.negative

Should negative edges be ignored when determining if a node is unconnected?

components

If "largest", this function only returns nodes that are part of the largest component of the network. If "all", no such subsetting is performed.

Value

A vector of node names that are connected to other nodes according to the rules provided in this function's arguments.

Author(s)

Sercan Kahveci


Spiritspeak/skMisc documentation built on April 12, 2025, 5:40 a.m.