Closed flyaflya closed 4 years ago
following code should give more useful error message (pB is undefined):
dag_create() %>% dag_node("Demand for A","dA", rhs = normal(15,4)) %>% dag_node("Demand for B","dB", rhs = normal(20,8)) %>% dag_node("Supply for A","sA", rhs = uniform(0,100)) %>% dag_node("Supply for B","sB", rhs = uniform(0,100)) %>% dag_node("Profit for A","pA", rhs = min(sA,dA)) %>% dag_edge(from = c("dA","sA"),to = c("pA")) %>% dag_edge(from = c("dB","sB"),to = c("pB")) %>% dag_render()
Currently, the causact package has zero error messaging. It would be nice to have some defensive programming built into the system.
See here: http://adv-r.had.co.nz/Exceptions-Debugging.html