# NOT RUN {
# generate a connected and weighted network
ahn_gen(N = 10, L = 5, mu = 1, lamda = 5)
# }
# NOT RUN {
N <- 10
x <- runif(N, 0, 5)
ql <- sample(LETTERS, N, replace = TRUE)
qn <- sample(1:20, N, replace = TRUE)
# specify the X coordinates, node attributes U and V for a connected and unweighted network
ahn_gen(N, L = 5, mu = 1, lamda = 5, Weighted = FALSE, X = x, U = ql, V = qn)
# specify the Y coordinates, node attributes U and V for a weighted network, no matter if the
# network will be connected or not
ahn_gen(N, L = 5, mu = 1, lamda = 5, Weighted = TRUE, Connected = FALSE, Y = x, U = ql, V = qn)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab