Description Usage Arguments Examples
View source: R/bipartite.from.distribution.R
'bipartite.from.distribution' returns a bipartite graph, as an object of the requested class, with row and column degree distributions that approximately follow beta distributions with given parameters.
1 2 3 4 5 6 7 8 | bipartite.from.distribution(
R,
C,
P,
rowdist = c(1, 1),
coldist = c(1, 1),
class = "matrix"
)
|
R |
integer: number of rows |
C |
integer: number of columns |
P |
numeric: probability of an edge |
rowdist |
vector length 2: Row degrees will approximately follow a Beta(a,b) distribution |
coldist |
vector length 2: Column degrees will approximately follow a Beta(a,b) distribution |
class |
string: the class of the returned backbone graph, one of c("matrix", "Matrix", "sparseMatrix", "igraph", "network") |
1 2 3 4 5 6 7 8 9 10 | B <- bipartite.from.distribution(R = 100, C = 100, P = 0.1,
rowdist = c(1,1), coldist = c(1,1)) #Uniform
B <- bipartite.from.distribution(R = 100, C = 100, P = 0.1,
rowdist = c(1,10), coldist = c(1,10)) #Right-tailed
B <- bipartite.from.distribution(R = 100, C = 100, P = 0.1,
rowdist = c(10,1), coldist = c(10,1)) #Left-tailed
B <- bipartite.from.distribution(R = 100, C = 100, P = 0.1,
rowdist = c(10,10), coldist = c(10,10)) #Normal
B <- bipartite.from.distribution(R = 100, C = 100, P = 0.1,
rowdist = c(10000,10000), coldist = c(10000,10000)) #Constant
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.