list_to_path: Recursive function to translate an effect list to a path...

View source: R/utils.R

list_to_pathR Documentation

Recursive function to translate an effect list to a path sequence

Description

Recursive function to translate an effect list to a path sequence

Usage

list_to_path(x, name = NULL)

Arguments

x

A list of vars as returned by parse_effect

name

The name of the outcome variable

Value

a list of characters describing the path sequence

Examples

nofill <- "p{Y(X = 1, M1 = 1, M2(X = 1, M1 = 1)) = 1}"
eff2 <- parse_effect(nofill)$vars[[1]][[1]]
list_to_path(eff2, "Y")


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