&,&& You can use the `&` operator to evaluate AND across a vector. The `&&` version of AND only evaluates the first member of a vector.
> TRUE & c(TRUE,FALSE,FALSE)
[1] TRUE FALSE FALSE
> TRUE && c(TRUE,FALSE,FALSE)
[1] TRUE
I,II The `|` version of OR evaluates OR across an entire vector, while the `||` version of OR only evaluates the first member of a vector.
TRUE() The function isTRUE() takes one argument. If that argument evaluates to TRUE, the function will return TRUE. Otherwise, the function will return FALSE.
identical() The function identical() will return TRUE if the two R objects passed to it as arguments are identical.
xor() You should also be aware of the xor() function, which takes two arguments. The xor() function stands for exclusive OR. If one argument evaluates to TRUE and one argument evaluates to FALSE, then this function will return TRUE, otherwise it will return FALSE.
which() The which() function takes a logical vector as an argument and returns the indices of the vector that are TRUE. For example which(c(TRUE, FALSE, TRUE)) would return the vector c(1, 3).
any() and all() the functions any() and all() take logical vectors as their argument. The any() function will return TRUE if one or more of the elements in the logical vector is TRUE. The all() function will return TRUE if every element in the logical vector is TRUE.