The xts_API for C provided by xts-0.9-1 package cannot be directly used in C++.
For example, if one write
#include <Rcpp.h>
extern "C" {
#include <xts.h>
}
using namespace Rcpp;
RcppExport SEXP get_xts_index(SEXP x, SEXP value) {
BEGIN_RCPP
return SET_xtsIndexClass(x, value);
END_RCPP
}
There will be following compiler time error:
error: expected identifier before ‘)’ token
error: ‘install’ was not declared in this scope
error: ‘getAttrib’ was not declared in this scope
error: ‘setAttrib’ was not declared in this scope
error: ‘xts_IndexvalueSymbol’ was not declared in this scope
How to invoke xts_API for C?