Lecture 2 Flashcards

1
Q

Logical Operators

A

< 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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

abs(…)

A

Used to get absolute values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

sqrt(…)

A

Square root.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

exp(…)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

log(…)

A

Natural log.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

log(v,b)

A

v - value for which you must take log
b - specified base

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

round(v,s)

A

Round v to s digits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

factorial(n)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly