Skip to content
Prev 327215 / 398502 Next

union of a list of logical values

On 22/07/2013 10:16, Liviu Andronic wrote:
This really only makes sense for a list of logical vectors of the same 
length.  And by 'union' you seem to mean 'or'.

Two approaches

1) Make a logical matrix and use apply(m, 1, any)

2) Use Reduce(`|`, z)