GetShortestPathsFromCCG: get shortest paths from CCG

Description Usage Arguments Value Examples

View source: R/GetShortestPathsFromCCG.r

Description

Gets the node names in the shortest path from one node in a CCG to another

Usage

1
2
GetShortestPathsFromCCG(network, hypothesisnode, targetnode,
  showbothdirs = FALSE, quiet = FALSE)

Arguments

network

built from iGraph

hypothesisnode

hypothesis node ID

targetnode

target node ID

showbothdirs

where multiple paths from a positive and negative node, FALSE returns only the shortest. Otherwise both are returned.

quiet

a flag to suppress output to console. FALSE by default.

Value

a list of vectors containing the nodes of individual paths

Examples

1
2
3
4
5
network <- system.file(package='CausalR', 'extdata', 'testNetwork.sif')
ccg = CreateCCG(network)
hypothesisnode = 1
targetnode = 10
GetShortestPathsFromCCG (ccg, hypothesisnode, targetnode)

CausalR documentation built on Nov. 8, 2020, 5:25 p.m.