which()
match(a, b)
An example
x=1 ; y=3 ; z= x > y print(z)
class(z)
## [1] "logical"
Standard Logical operations
u=TRUE; v=FALSE u & v # u and v
## [1] FALSE
u | v # u or v
## [1] TRUE
!u # negation