inst/roxygen-examples/create_adj_matrix_from_list_from_adj-example.R

# List
in_edges <- list(
  X = integer(0),
  Y = c(1L),
  Z = c(1L, 2L)
)

# Adjacency matrix
adj <- create_adj_matrix_from_list(in_edges)

# Convert back
in_edges_back <- create_list_from_adj_matrix(adj)
identical(in_edges_back, in_edges) # TRUE

Try the causalDisco package in your browser

Any scripts or data that you put into this service are public.

causalDisco documentation built on April 13, 2026, 5:06 p.m.