If n is a single number, a square matrix of size n with zeros in
the diagonal. Otherwise it returns a list of length(n) square matrices of
sizes equal to those specified in n.
Arguments
n
Integer vector. Size of the graph. If length(n) > 1, then it will
a list of random graphs.
p
Probability of a tie. This may be either a scalar, or a vector of the
same length of n.
# A graph of size 4rbernoulli(4)
# 3 graphs of various sizesrbernoulli(c(3, 4, 2))
# 3 graphs of various sizes and different probabilitiesrbernoulli(c(3, 4, 6), c(.1, .2, .3))