Revision 03698027c2d84118bd0c53c4a9a5b5d23676f388 authored by HwB on 01 October 2012, 00:00:00 UTC, committed by Gabor Csardi on 01 October 2012, 00:00:00 UTC
1 parent 9fdea5d
Raw File
andor.R
##
##  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))
# }

back to top