Description Usage Arguments Value Examples
This internal function create a randomized vector of paired node numbers of a given length without repeat.
1 | 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.
1 2 3 4 5 6 7 8 9 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.