Learn R Programming

hutilscpp (version 0.3.0)

which3: which of three vectors are the elements (all, any) true?

Description

which of three vectors are the elements (all, any) true?

Usage

which3(x, y, z, And = TRUE, anyNAx = anyNA(x), anyNAy = anyNA(y),
  anyNAz = anyNA(z))

Arguments

x, y, z

Logical vectors. Either the same length or length-1

And

Boolean. If TRUE, only indices where all of x, y, z are TRUE are returned; if FALSE, any index where x, y, z are TRUE are returned.

anyNAx, anyNAy, anyNAz

Whether or not the inputs have NA.