Lecture 2 Flashcards
Logical Operators
< less than
> greater than
<= less than or equal to
>= greater than or equal to
== exactly equal to
!= not equal to
!x not x
x|y x or y
x&y x and y
isTRUE(x) test if x is TRUE
isTRUE() returns TRUE if its argument value is equivalent to TRUE, and returns FALSE otherwise. isTRUE() makes R programming much easier.
abs(…)
Used to get absolute values.
sqrt(…)
Square root.
exp(…)
Used to calculate the power of e.
The exponential constant is an important mathematical constant and is given the symbol e. Its value is approximately 2.718.
log(…)
Natural log.
log(v,b)
v - value for which you must take log
b - specified base
round(v,s)
Round v to s digits.
factorial(n)
Factorial of a whole number ‘n’ is defined as the product of that number with every whole number less than or equal to ‘n’ till 1. For example, the factorial of 4 is 4 × 3 × 2 × 1, which is equal to 24.