R/andor.R

Defines functions or and

Documented in and or

##
##  a n d o r . R  Logical AND, OR
##


and <- function(l, k) {
    return((l & k) + 0)
}


or <- function(l, k) {
    return((l | k) + 0)
}


# and <- function(...) {
# 	all(sapply(as.list(...), as.logical))
# }
# 
# or <- function(...)  {
# 	any(sapply(as.list(...), as.logical))
# }

Try the pracma package in your browser

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

pracma documentation built on March 19, 2024, 3:05 a.m.