perm | R Documentation |
Enumerates the possible permutations of a specified size from the elements of a vector having the same size.
perm(n, r, v = 1:n)
n |
Size of the source vector. |
r |
Size of the target vector. |
v |
Source vector. Must be a vector of length |
This function is called by segregmixEM
and the associated internal functions. This is also a simplified version of the function permutations
found in the package gtools
.
perm
returns a matrix where each row contains one of the permutations of length r
.
segregmixEM
perm(3, 3, 2:4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.