sub2ind | R Documentation |
MATLAB style sub2ind function in R physical essence. Provides the one dim matrix index of row-column locations in matrix
(RIP matlab)
sub2ind(dim, r, c, byrow = F)
dim |
dimension of matrix to return index for |
r |
integer vector of row index to look up |
c |
length(r) integer vector of column index to look up |
byrow |
whether to calculate indices by row or column (= FALSE) |
length(r) vector of 1D indices into matrix with dim "dim"
Marcin Imielinski
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.