InterviewSolution
Saved Bookmarks
| 1. |
which of the following statement gives cumulative sum?(a) cumsum(x,na=rm=TRUE)(b) cumprod(x)(c) cummax(x)(d) cummin(x)I got this question during an internship interview.This is a very interesting question from Commands in section Commands, Packages, Visualizing Data and Linear Regression of R Programming |
|
Answer» RIGHT option is (a) cumsum(x,na=rm=TRUE) The EXPLANATION is: cummax() function RETURNS the cumulative MAXIMA. |
|