Basic Arithmetic Operations
Basic Arithmetic Operations
Basic Arithmetic Operations
+ (addition)
- (subtraction)
* (multiplication)
/ (division)
and ^ (exponentiation).
# Addition
3 + 7
[1] 10
# Substraction
7 - 3
[1] 4
# Multiplication
3 * 7
[1] 21
# Divison
7/3
[1] 2.333333
# Exponentiation
2^3
[1] 8
[1] 2
Note that, in R, �#� is used for adding comments to explain what the R code is
about.