Learn R Programming

gRain (version 0.3.4)

queryg: Query a graph

Description

queryg is a general function for querying a graph object, specifically graphs as created with newug and newdag.

Usage

queryg(object, type, set = NULL, set2 = NULL, set3 = NULL)

Arguments

object
A graph object; i.e. either an unidrected graph (ugsh) or a directed acyclic graph (dagsh)
type
Query type, see 'details' below.
set,set2,set3
Possible arguments to a graph query of type type

Value

  • Depending on the type, the output will be either a new graph or a vector or a list.

Details

The type can be:
  • adj:
Nodes adjacant to set an: Ancestors of set ancestralGraph: Ancestral graph induced by set ancestralSet: Ancestral set of set cl: Closure of set ch: Children of set cliques,maxClique: The cliques connectedComp,concomp: The connected components edges: Edges of graph ne: Neighbours of set nodes: Nodes of graph is.complete: is.simplicial: is.triangulated: pa: Parents of set separates: Is set and set2 separated by set3 simplicialNodes: The simplicial nodes of graph subgraph: Subgraph induced by set

See Also

newug, newdag