R/xor2.R

Defines functions xor2

Documented in xor2

#' Exclusive or
#' @param x,y Logical vectors.
#' @param anyNAx,anyNAy Could \code{x} and \code{y} possibly contain \code{NA} values?
#' Only set to \code{FALSE} if known to be free of \code{NA}.
#' @export xor2

xor2 <- function(x, y, anyNAx = TRUE, anyNAy = TRUE) {
  stopifnot(length(x) == length(y))
  x != y
}

Try the hutilscpp package in your browser

Any scripts or data that you put into this service are public.

hutilscpp documentation built on Oct. 11, 2023, 9:06 a.m.