Description Usage Arguments Details Value Author(s) References See Also Examples
The function tests to see whether a set of nodes, S1
, separates
all nodes in a
from all nodes in b
.
1 | separates(a, b, S1, g)
|
a |
The names of the nodes in the from set. |
b |
The names of the nodes in the to set. |
S1 |
The names of the nodes in the separation set. |
g |
An instance of the |
The algorithm is quite simple. A subgraph is created by removing the
nodes named in S1
from g
. Then all paths between
elements of a
to elements of b
are tested for. If any
path exists the function returns FALSE
, otherwise it returns
TRUE
.
Either TRUE
or FALSE
depending on whether S1
separates
a
from b
in g1
.
R. Gentleman
S. Lauritzen, Graphical Models, OUP.
1 2 3 4 5 6 | con <- file(system.file("XML/kmstEx.gxl",package="RBGL"))
km <- fromGXL(con)
close(con)
separates("B", "A", "E", km)
separates("B", "A", "C", km)
|
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, basename, cbind, colnames,
dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which.max, which.min
[1] TRUE
[1] FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.