initialize_graph: Initialize an igraph object for use with causaloptim

View source: R/graph-utilities.R

initialize_graphR Documentation

Initialize an igraph object for use with causaloptim

Description

Checks for required attributes and adds defaults if missing

Usage

initialize_graph(graph)

Arguments

graph

An object of class igraph

Value

An igraph with the vertex attributes leftside, latent, and nvals, and edge attributes rlconnect and edge.monotone

Examples

b <- igraph::graph_from_literal(X -+ Y)
b2 <- initialize_graph(b)
V(b2)$nvals


causaloptim documentation built on Oct. 17, 2024, 9:08 a.m.