में xts पैकेज के सी एपीआई का उपयोग कैसे करें xts-0.9-1 पैकेज द्वारा प्रदान किए गए सी के लिए xts_API सीधे सी ++ में उपयोग नहीं किया जा सकता है।आरसीपीपी
उदाहरण के लिए, अगर एक लिखने
#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 आह्वान करने के लिए?
अतिरिक्त बहिर्वाहिक गतिविधि के लिए +1 – GSee