View source: R/structuralLearning.R
getChildParentsFromGraph | R Documentation |
Compute the parents of each variable in the graph.
getChildParentsFromGraph(graph, nameVars = NULL)
graph |
A directed acyclic graph of the class |
nameVars |
A character array containing the names of the variables in the graph.
This parameter is only used when |
A list where each element is a vector containing the name of a variable and its parents in the graph.
## Data
data(ecoli)
ecoli <- ecoli[,-1] ## Sequence Name
## DAG1
dag1 <- LearningHC(ecoli)
dag1
plot(dag1)
getChildParentsFromGraph(dag1)
## DAG2
dag2 <- LearningHC(ecoli, numIntervals = 10)
dag2
plot(dag2)
getChildParentsFromGraph(dag2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.