randomDAG: Generate a Directed Acyclic Graph (DAG) randomly.

Usage

randomDAG(n, prob, lB = 0.1, uB = 1, V = as.character(1:n))

Arguments

n Number of nodes, n ≥ 2.

prob Probability of connecting a node to another node with higher topological ordering.

lB, uB Lower and upper limit of edge weights, chosen uniformly at random, i.e., by

runif(., min=lB, max=uB).

V character vector length n of node names.

```
library(pcalg)
myDAG <- randomDAG(n = 20, prob= 0.2, lB = 0.1, uB = 1)
```

Now I want to assign edge weights sampled uniformly from [-2,-0.5] U [0.5,2]. How to adjust the code?