Description Usage Arguments Details Value Examples
base::which()
returns numeric indices of TRUE entries in an array.
This wrapper uses dimnames
to return pairs of row/column names.
1 | which_names(.a, dimnames = NULL, ...)
|
.a |
array |
dimnames |
list of character vectors.
E.g., if |
... |
Additional options passed to |
This was originally created to examine correlation matrices for collinearity.
Then I discovered corrr::stretch()
and that was much better.
a data frame of named indices
1 2 | which_names(mtcars[1:6, c("vs", "am")] == 1)
which_names(matrix(1:20, nrow = 4) %% 3 == 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.