Operands should be logical, although numerical operands are accepted.
Numerical operands are interpreted as FALSE
when 0
and
TRUE
for any other number.
and_byname(...)
... | operands to the logical |
---|
logical and
applied to the operands
and_byname(TRUE)#> [1] TRUEand_byname(FALSE)#> [1] FALSE#> [[1]] #> [1] TRUE #> #> [[2]] #> [1] FALSE #>m1 <- matrix(c(TRUE, TRUE, TRUE, FALSE), nrow = 2, ncol = 2, dimnames = list(c("r1", "r2"), c("c1", "c2"))) m2 <- matrix(c(TRUE, FALSE, TRUE, TRUE), nrow = 2, ncol = 2, dimnames = list(c("r1", "r2"), c("c1", "c2"))) and_byname(m1, m1)#> c1 c2 #> r1 TRUE TRUE #> r2 TRUE FALSEand_byname(m1, m2)#> c1 c2 #> r1 TRUE TRUE #> r2 FALSE FALSE#> [[1]] #> c1 c2 #> r1 TRUE TRUE #> r2 FALSE FALSE #> #> [[2]] #> c1 c2 #> r1 TRUE TRUE #> r2 FALSE FALSE #>