View source: R/bimets_ts_functions.R
fromBIMETStoTS | R Documentation |
This function transforms a BIMETS compliant time series (as defined in is.bimets
) into a time series of class ts()
. The core R function as.ts() does not satisfy all the compliance control check requirements, so it has been extended. Attributes and description of the input time series will be copied to the output time series (see TIMESERIES
).
fromBIMETStoTS(x = NULL, ...)
x |
Input time series that must satisfy the compliance control check defined in |
... |
Backward compatibility. |
This function returns a time series of class ts()
that has the same observations of the input BIMETS time series.
fromBIMETStoXTS
as.bimets
is.bimets
BIMETS indexing
BIMETS configuration
#work with XTS
setBIMETSconf('BIMETS_CONF_CCT','XTS')
#create yearly time series
xts<-TSERIES(1:10,START=c(2000,1),FREQ='A')
print(is.ts(xts))#FALSE
#convert to ts
ts<-fromBIMETStoTS(xts)
print(is.ts(ts))#TRUE
print(ts)
#create monthly time series
xts<-TSERIES(1:10,START=c(2000,1),FREQ='M')
print(is.ts(xts))#FALSE
#convert to ts
ts<-fromBIMETStoTS(xts)
print(is.ts(ts))#TRUE
print(ts)
#create daily time series
xts<-TSERIES(1:10,START=c(2000,1),FREQ='D')
print(is.ts(xts))#FALSE
#convert to ts
ts<-fromBIMETStoTS(xts)
print(is.ts(ts))#TRUE
print(ts)
#reset default
setBIMETSconf('BIMETS_CONF_CCT','TS')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.