Description Usage Arguments Value See Also Examples
This function swaps the values in each row of a matrix by permuting the
columns via the indices provided in the index
matrix. All
swapElements()
-methods use this function internally. The code is extended
to C++
using the packages Rcpp
and RcppArmadillo
.
1 | swap_cc(values, index)
|
values |
A matrix containing the values to be swapped. |
index |
An integer matrix defining how values should be swapped. |
A matrix with swapped values.
swapElements()
for the calling function
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.