Intermediate
R
Q69 / 100
What is the purpose of the "apply(m, 1, sum)" call on a matrix m?
Correct! Well done.
Incorrect.
The correct answer is B) Computes the sum of each row of the matrix, returning a vector of row sums
B
Correct Answer
Computes the sum of each row of the matrix, returning a vector of row sums
Explanation
apply(X, MARGIN, FUN) applies FUN over rows when MARGIN = 1, and over columns when MARGIN = 2.
Progress
69/100