http://qs1969.pair.com?node_id=1074167


in reply to Re: Argument "" Isn't numeric in numeric eq (==)
in thread Argument "" Isn't numeric in numeric eq (==)

The OP's code answers these questions.

Given the OP's dataset:

1,1,,,, 1,2,,,, 3,4,1,1,, 1,1,1,1,, 5,6,3,4,1,2 1,1,,,, 1,1,1,1,1,1

the code indicates that "Success" obtains when at least one of the following tuples is '1,1' and "Fail" obtains when one is '1,2':

(n,n),(n,n),(n,n) ^ ^ ^ | | | | | + - Tuple 3 | + - Tuple 2 + - Tuple 1

Edit: Added the "Fail" condition. Thank you, Jim.

Replies are listed 'Best First'.
Re^3: Argument "" Isn't numeric in numeric eq (==)
by Jim (Curate) on Feb 10, 2014 at 00:04 UTC

    Read the OP again. There's both a "success case" (1,1) and a "fail case" (1,2), and they're independent. There's nothing in the specification of the problem that precludes the possibility of both a success case and a fail case in the same three-tuple record. As it happens, there isn't an example in the OP of a record that has both a success case and a fail case in it. So the record ,,,,, has neither a success case nor a fail case in it, and the record 1,1,1,2,1,2 has one success case and two fail cases in it. However, the specification is to count the number of records that have success cases and fail cases in them, not the number of such cases.