Written in C++, this function tends to run much faster than the equivalent
(if maximum is unique) base R solution
which(x == max(x), arr.ind = TRUE).
For optimal speed, choose the version of this function that matches the
class of your
which_max_nv for numeric vector.
which_max_iv for integer vector.
which_max_nm for numeric matrix.
which_max_im for integer matrix.
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.