View source: R/graph-functions.R
| make.graph | R Documentation |
This function create a graph object that can be used in other functions in this package.
make.graph(vertices, bi_edges, di_edges, multivariate.variables = NULL)
vertices |
A character vector of vertices in the graph. |
bi_edges |
A list of vectors that record the bidirectional edges in the graph. For example, |
di_edges |
A list of vectors that record the directed edges in the graph. For example, |
multivariate.variables |
A list of variables that are multivariate in the causal graph.
For example, |
A graph object with the following components:
verticesEquivalent to the input argument vertices.
fixedA data frame with a column fixed that indicates whether the vertex is fixed or not. The vertices is not fixed initially.
bi_edgesEquivalent to the input argument bi_edges.
di_edgesEquivalent to the input argument di_edges.
multivariate.variablesA list of variables that are multivariate in the causal graph. For example, multivariate.variables=list(M=c('M1,'M2')) means M is bivariate and the corresponding columns in the dataframe are M1 and M2. Default is NULL.
make.graph(vertices=c('A','M','L','Y','X'),
bi_edges=list(c('A','Y')),
di_edges=list(c('X','A'), c('X','M'), c('X','L'),
c('X','Y'), c('M','Y'), c('A','M'), c('A','L'), c('M','L'), c('L','Y')))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.