cumgmean {cumstats} | R Documentation |
Returns a vector whose elements are the cumulative geometric mean of the elements of the argument.
cumgmean(x)
x |
a numeric vector. |
A numeric vector of the same length as x
. An NA
value in x
causes the corresponding and following elements of the return value to be NA
.
Arturo Erdely.
Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.
cumgmean(c(9, 1, 4, 0, 3, NA, 8, 5))
z <- cumgmean(rlnorm(10000, 0, 1))
head(z); tail(z)