querygraph {gRbase}R Documentation

Query a graph

Description

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

Usage

querygraph(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

Details

The type can be:

Value

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

Author(s)

Søren Højsgaard, sorenh@agrsci.dk

See Also

newUG, newDAG

Examples


ug0 <- newUG(~a:b, ~b:c:d, ~e)

querygraph(ug0, "nodes")
querygraph(ug0, "edges")

querygraph(ug0, "subgraph", c("b","c","d","e"))

querygraph(ug0, "adj", "c")
querygraph(ug0, "cl", "c") 
querygraph(ug0, "is.simplicial", "b")
querygraph(ug0, "simplicialNodes")

querygraph(ug0, "is.complete")
querygraph(ug0, "is.complete", c("b","c","d"))
querygraph(ug0, "cliques")

querygraph(ug0, "is.triangulated")

querygraph(ug0, "is.decomposition", "a","d",c("b","c"))


[Package gRbase version 0.6.0 Index]