Replace `which` operations by `vapply` to exploit vectorization
R which
operation is not efficient in all cases.
We should use the R function vapply
to exploit vectorized processing.
R which
operation is not efficient in all cases.
We should use the R function vapply
to exploit vectorized processing.