Generate a random Directed Acyclic Graph (DAG). The resulting graph is topologically ordered from low to high node numbers.
Number of nodes, N >= 2.
Probability of connecting a node to another node with higher topological ordering.
Lower and upper limit of edge weights, chosen uniformly
at random, i.e., by
n nodes are ordered. Start with first node. Let the
number of nodes with higher order be k. Then, the number of
neighbouring nodes is drawn as Bin(k,
prob). The neighbours are
then drawn without replacement from the nodes with higher order. For
each node, a weight is uniformly sampled from
This procedure is repeated for the next node in the original ordering
and so on.
An object of class
graph-class from package graph, with
named ("1" to "n") nodes and directed edges. The graph is
Each edge has a weight between
Markus Kalisch ([email protected]) and Martin Maechler
randDAG for a more elaborate version of this
rmvDAG for generating data according to a
compareGraphs for comparing the skeleton of a DAG
with some other undirected graph (in terms of TPR, FPR and TDR).
1 2 3 4
Attaching package: 'BiocGenerics' The following objects are masked from 'package:parallel': clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply, parCapply, parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB The following objects are masked from 'package:stats': IQR, mad, xtabs The following objects are masked from 'package:base': Filter, Find, Map, Position, Reduce, anyDuplicated, append, as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table, tapply, union, unique, unsplit, which, which.max, which.min
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.