I am using dagitty::randomDAG() to generate random directed acyclic graphs (DAGs). I would like to be able to reproduce the same random DAG but randomDAG() doesn't seem to respect the random seed in R.
For example, the following code produces a different random DAG on each run:
set.seed(1234)
dagitty::randomDAG(4, .5)
dagitty::randomDAG calls some JS code and I suspect those JS functions are using a different random seed, not the random seed in R. So I wonder if a solution would be to fix whatever seed those JS functions defer to, but not sure how I would go about that.
Thank you for any suggestions.