swap | R Documentation |
Given a permutation and two position, swap both positions
swap(perm, i, j)
perm |
a permutation |
i |
position of the permutation |
j |
position of the permutation |
The permutation in the input in which the two speicfied items have been swapped
swap(c(1,2,3,4,5),2,5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.