Intermediate R
Q57 / 100

What does "Reduce(function(a, b) a + b, c(1,2,3,4))" compute?

Correct! Well done.

Incorrect.

The correct answer is B) The cumulative sum applied successively, resulting in 10

B

Correct Answer

The cumulative sum applied successively, resulting in 10

Explanation

Reduce() successively applies a binary function to combine elements of a vector into a single value; here it sums 1+2+3+4 = 10.

Progress
57/100