2 Operators

2.1 Mathematical operations

2.1.1 Sum (+)

159+789
## [1] 948

2.1.2 Subtraction (-)

789-159
## [1] 630

2.1.3 Division (/)

753/2
## [1] 376.5

2.1.4 Multiplication (*)

456*3
## [1] 1368

2.1.5 Exponential \((a^{x})\)

2^10
## [1] 1024

2.1.6 Log

log(10)
## [1] 2.302585

2.1.7 Exponential function

exp(2.302585)
## [1] 9.999999

2.1.8 Square root (sqrt)

sqrt(9)
## [1] 3

2.2 Logical operators

2.2.1 Less than (<)

1 < 2
## [1] TRUE

2.2.2 Less than or equal to (<=)

1 <= 1
## [1] TRUE

2.2.3 Greater than (>)

1 > 2
## [1] FALSE

2.2.4 Greater than or equal to (>=)

2 >= 2
## [1] TRUE

2.2.5 Exactly equal to (==)

2 == 3
## [1] FALSE

2.2.6 Not equal to (!=)

3 != 3
## [1] FALSE

2.2.7 x OR y (x | y)

4 > 3 |  4 > 2
## [1] TRUE

2.2.8 x AND y (x & y)

4 > 3 & 4 > 5
## [1] FALSE