Skip to content
Prev 308739 / 398503 Next

vector indexing

On 12-10-23 5:39 AM, Rui Barradas wrote:
Be careful with this:  it fails if the condition is FALSE for every 
element, e.g.

 > first(y > 10)
[1] Inf
Warning message:
In min(which(x)) : no non-missing arguments to min; returning Inf

I don't know if this is possible in the original context, or what the 
desired result would be if it happens:  but it's something to look out for.

Duncan Murdoch