R as a calculator
R can be used as a calculator to carry out many different operations. Try each of the following.
## [1] 10
## [1] 2
## [1] 16
## [1] 3.5
## [1] 4
## [1] 9
## [1] 2
8^(1/3) # Use the inverse of 3 to get the cube root
## [1] 2
log(100) # Natural logarithm (base e = 2.71828...)
## [1] 4.605
log(100, base = 10) # You can change the base
## [1] 2
log10(100) # Some bases have their own function
## [1] 2
## [1] 6.644
## [1] 2.718
## [1] 5