Compute the index of the maximum defined element for each row and col in a 3D array

stack_which_max(v)

Arguments

v

3D array that may contain NA values

Value

a matrix with the maximum index for each [row, col, ]