View source: R/bimets_ts_functions.R
CUMPROD | R Documentation |
This function returns the cumulative product of the elements of the input array or time series. The result is an object of the same class of the input, and its elements are the cumulative product of the current and the previous elements of the input.
If the input is a time series, users can provide the argument TSRANGE
in order to project the input time series before the cumulative product.
CUMPROD(x=NULL, TSRANGE=NULL, ignoreNA=FALSE, avoidCompliance=FALSE, ...)
x |
Input numerical array or time series that must satisfy the compliance control check defined in |
TSRANGE |
Optional date range of operations that process the input time series. |
ignoreNA |
Ignore missing values. |
avoidCompliance |
If |
... |
Backward compatibility. |
This function returns an object of the same class of the input, i.e. an array or a BIMETS time series.
TSPROJECT
MOVAVG
TSDELTA
TSLAG
TSPROJECT
TSEXTEND
TSLEAD
INDEXNUM
VERIFY_MAGNITUDE
#create ts
ts1<-TSERIES(INTS(1,10),START=c(2000,1),FREQ='M')
out_CUMPROD<-CUMPROD(ts1)
TABIT(out_CUMPROD)
out_CUMPROD<-CUMPROD(ts1,TSRANGE=c(2000,4,2001,1))
TABIT(ts1,out_CUMPROD)
#define an array
arr1<-c(INTS(1,5),INTS(-1,-5))
out_CUMPROD<-CUMPROD(arr1)
print(out_CUMPROD)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.