Logic R Documentation

## Logical Operators

### Description

These operators act on logical and number-like vectors.

### Usage

```## S4 method for signature 'fm,fm'
e1 | e2

## S4 method for signature 'fmV,fmV'
e1 | e2

## S4 method for signature 'fm,fmV'
e1 | e2

## S4 method for signature 'fmV,fm'
e1 | e2

## S4 method for signature 'fm,matrix'
e1 | e2

## S4 method for signature 'matrix,fm'
e1 | e2

## S4 method for signature 'fm,ANY'
e1 | e2

## S4 method for signature 'ANY,fm'
e1 | e2

## S4 method for signature 'fmV,ANY'
e1 | e2

## S4 method for signature 'ANY,fmV'
e1 | e2

## S4 method for signature 'fm,fm'
e1 & e2

## S4 method for signature 'fmV,fmV'
e1 & e2

## S4 method for signature 'fm,fmV'
e1 & e2

## S4 method for signature 'fmV,fm'
e1 & e2

## S4 method for signature 'fm,matrix'
e1 & e2

## S4 method for signature 'matrix,fm'
e1 & e2

## S4 method for signature 'fm,ANY'
e1 & e2

## S4 method for signature 'ANY,fm'
e1 & e2

## S4 method for signature 'fmV,ANY'
e1 & e2

## S4 method for signature 'ANY,fmV'
e1 & e2

## S3 method for class 'fm'
!e1

## S3 method for class 'fmV'
!e1
```

### Arguments

 `e1, e2` One of the operands need to be a FlashR object. If one operand is a matrix and the other is a vector, we perform the arithmetic operation on the vector and every column of the matrix. If one operand is a scalar, we perform the operation on the scalar with every element in the matrix or the vector.

### Details

`!` indicates logical negation (NOT). `&` indicates logical AND and `|` indicates logical OR.

### Examples

```tmp1 <- fm.runif.matrix(100, 10)
tmp2 <- fm.runif.matrix(100, 10)
mat1 <- tmp1 > tmp2
mat2 <- tmp1 < tmp2
mat1 | mat2
mat1 & mat2
!mat1
```