get_edges: Get edge index of one or two networks

View source: R/get_edges.R

get_edgesR Documentation

Get edge index of one or two networks

Description

Get edge index of one or two networks

Usage

get_edges(net1, net2 = NULL, method = "union")

Arguments

net1

a network. Should be either the product of qgraph or quickNet.

net2

alternative. a network. Should be either the product of qgraph or quickNet.

method

only works when net2 is provided.

  • "union": return the edges that exist in net1 or net2, default.

  • "intersect": return the edges that both exist in net1 and net2.

Value

a list with n vectors of length 2. The vectors represent the node index. n is the number of edges. The result can be provided to the edges parameter of NetCompare or NCT to specify the edges that you want to test.

Examples


data("mtcars")
net1 <- quickNet(mtcars)
net2 <- quickNet(mtcars^3)
edges1 <- get_edges(net1)
edges2 <- get_edges(net1, net2, method = 'intersect')


LeiGuo0812/quickNet documentation built on May 1, 2024, 10:42 p.m.