Learn R Programming

migraph (version 0.6.6)

generate: Create networks from particular probabilities

Description

Create networks from particular probabilities

Usage

generate_random(n, p, m)

Arguments

n

Integer of length 1 or 2.

p

Number of edges in the network over the number of edges possible

m

Number of edges in the network

Details

Creates a random network. If length(n)==1, then a one-mode network will be returned, equivalent to an Erd<U+00F6>s-Renyi graph. If length(n)==1, then a two-mode network will be returned. The first number is the number of nodes in the first nodeset (rows), and the second number becomes the number of nodes in the second nodeset (columns).

See Also

Other creation: create

Examples

Run this code
# NOT RUN {
plot(generate_random(c(10, 12), 0.25))
# }

Run the code above in your browser using DataLab