sample_path {SDDE} | R Documentation |
This internal function create a randomized vector of paired node numbers of a given length without repeat.
sample_path(n, max_len, old_path)
n |
the number of pathways |
max_len |
the total number of nodes |
old_path |
vector of already sampled pairs of node numbers |
This function return a randomize vector of 2 x n node numbers.
## Draw 5 samples of 10 pathways out of 100 nodes without repeated pathways ## Not run: old_path <- c(); for (i in 1:5) { r <- sample_path(10,100, old_path); old_path <- c(old_path, r); } ## End(Not run)