Inverse of which. Converts an array of numeric or character indices to a logical index array. This function is useful if you need to perform logical operation on an index array but are only given numeric indices.
l_which(idx, nms = seq_len(len), len = length(nms), useNames = TRUE)
| idx | Numeric or character indices. |
|---|---|
| nms | Array of names or a sequence. Required if |
| len | Length of output array. Alternative to |
| useNames | Use the names of nms or idx |
Logical vector of length len or the same length as nms
Either nms or len has to be specified.
#> [1] TRUE#> [1] TRUE