XTS_API dla C dostarczonego przez pakiet xts-0.9-1 nie może być bezpośrednio użyty w C++.Jak używać pakietu C api xts w Rcpp
Na przykład, jeśli ktoś napisać
#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
}
Nie będzie następujący błąd czas kompilator:
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
Jak wywołać xts_API dla C?
+1 za aktywność pozaszkolną – GSee