data(learning.test)
res = gs(learning.test)
# the Markov blanket of A.
mb(res, "A")
# [1] "B" "D" "C"
# the neighbourhood of F.
nbr(res, "F")
# [1] "B" "E"
# the arcs in the graph.
arcs(res)
# from to
# [1,] "A" "D"
# [2,] "B" "A"
# [3,] "C" "D"
# [4,] "E" "B"
# [5,] "E" "F"
# [6,] "F" "B"
# [7,] "F" "E"
# the nodes of the graph.
nodes(res)
# [1] "A" "B" "C" "D" "E" "F"
# the adjacency matrix for the nodes of the graph.
amat(res)
# A 0 0 0 1 0 0
# B 1 0 0 0 0 0
# C 0 0 0 1 0 0
# D 0 0 0 0 0 0
# E 0 1 0 0 0 1
# F 0 1 0 0 1 0
# the parents of D.
parents(res, "D")
# [1] "A" "C"
Run the code above in your browser using DataLab