Description Usage Arguments Details Value Author(s) See Also Examples

A function to create random graphs according to a random edge model.
The user supplies the set of nodes for the graph as `V`

and
either a probability, `p`

, that is used for each edge or the
number of edges, `edges`

they want to have in the resulting graph.

1 | ```
randomEGraph(V, p, edges)
``` |

`V` |
The nodes for the graph. |

`p` |
The probability of an edge being selected. |

`edges` |
The number of edges wanted. |

The user must specify the set of nodes and either a probability for
edge selection or the number of edges wanted, but not both.
Let `nV`

denote the
number of nodes. There are `choose(nV, 2)`

edges in the complete
graph. If `p`

is specified then a biased coin (probability of
heads being `p`

) is tossed for each edge and if it is heads that
edge is selected. If `edges`

is specified then that many edges
are sampled without replacement from the set of possible edges.

An object of class `graphNEL-class`

that contains the nodes and
edges.

R. Gentleman

1 2 3 4 5 | ```
set.seed(123)
V <- letters[14:22]
g1 <- randomEGraph(V, .2)
g2 <- randomEGraph(V, edges=30)
``` |

```
Loading required package: BiocGenerics
Loading required package: parallel
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, sd, var, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, basename, cbind, colMeans, colSums, colnames,
dirname, 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,
rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which, which.max, which.min
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.