Question: Using R, write a function that takes in a vector of values and returns the cumulative means (similar to the cumsum() command, which you are
Using R, write a function that takes in a vector of values and returns the cumulative means (similar to the cumsum() command, which you are allowed to use in your function here). Hint: Experiment with vector addition, subtraction, division, etc before you start writing your function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
