Description Usage Arguments Value Author(s) Examples
Converts an index from the first length to the second length.
For example, assume that c(2, 2)
indexes an element in a matrix with 2 rows and 5 columns.
If the matrix is transformed to a vector,
the same element can be accessed with the index IndexTwoOne(c(2, 2), c(2, 5))
(=4).
1 2 3 | IndexTwoOne(index, dimTwo)
IndexOneFour(index, dimFour)
|
index |
Integer vector of length 2 for
|
dimTwo |
Integer vector of length 2 indicating the dimension of the 2 dimensional array. |
dimFour |
Integer vector of length 4 indicating the dimension of the 4 dimensional array. |
Vector of length 1 for IndexTwoOne()
and
length 4 for IndexOneFour()
.
Florian Gerber, flora.fauna.gerber@gmail.com.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.