twoLevelGraph | R Documentation |
Initially, edges are added from the first vertex to all the other
vertices. Thereafter, the first vertex is drawn from a Beta(shape1,
1.0) distribution and the second vertex is drawn from a
Beta(shape2, 1.0) distribution. The idea is that the edges will
tend to connect a small subset of vertices from the top of the tree
to leaf vertices. These vertex connections are similar to the pairs
that you might observe in an elimination tournament. The selected
vertices are sorted so it doesn't matter whether shape1 >
shape2
or shape1 < shape2
.
twoLevelGraph(name, N, shape1 = 0.8, shape2 = 0.5)
name |
vector of vertex names |
N |
number of comparisons |
shape1 |
beta distribution parameter for first edge |
shape2 |
beta distribution parameter for second edge |
An undirected graph represented as a data frame with each row describing an edge.
Other graph generators:
roundRobinGraph()
twoLevelGraph(letters[1:5], 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.