xts_API для C, предоставляемый пакетом xts-0.9-1, нельзя напрямую использовать в C++.
Например, если написать
#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
}
Будет следующая ошибка времени компиляции:
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
Как вызвать xts_API для C?