6 Flashcards
1
Q
e^x?
A
exp(x)
2
Q
na.rm = TRUE?
A
Ignore missing values in a vector
3
Q
Find max and min one by one between two vectors (pairwise)?
A
pmax(x, y)
4
Q
Index of largest or smallest value?
A
which.max(x)
5
Q
Cumulative sum?
A
cumsum(x)
6
Q
Product of each element in a vector?
A
prod(x)
7
Q
Cumulative product?
A
cumprod(x)
8
Q
Sorting R?
A
sort(x, decreasing = TRUE/FALSE)
9
Q
The element of a vector that corresponds with sorting the vector from smallest to largest?
A
rank(x)
10
Q
Change a vector in order?
A
order(x)