1

In dplyr, how do you calculate the cumulative sum of a variable named sales within each group?

Correct Answer: mutate(cumsum = cumsum(sales))

Make the most of this question

This page focuses on one R Programming MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.

R Programming MCQs MCQ: In dplyr, how do you calculate the cumulative sum of a variable named sales within each group? | Extra Education