[Rcpp-devel] Rcpp::binding_not_found error

Alessandro Torrisi alessandro.torrisi at gmail.com
Fri Sep 24 13:07:41 CEST 2010


Hi!

I'm new to the group, to rcpp and to C++ also :-P

I'm trying to embed R in a little program which loads a txt file, parses it
into an object and calls a function developed by our R coders.

What I aim to do is to move one of our actual Java procedures (built on
Java/Rserve architecture) to C++/RInside/Rcpp, I think we could have lot of
improvements in this way.

This is a snippet of the procedure:

    R["nav_in"] = Rcpp::wrap(input.nav);
    R["cashFlows_in"] = Rcpp::wrap(input.cashFlows);
    R["dates_in"] = Rcpp::wrap(input.dates);
    R["indexesBmk_in"] = Rcpp::wrap(input.indexesBmk);
    R["weightsBmk_in"] = Rcpp::wrap(input.weightsBmk);
    R["benchmark_in"] = Rcpp::wrap(input.benchmark);
    R["datesBmk_in"] = Rcpp::wrap(input.datesBmk);
    R["creationDate_in"] = Rcpp::wrap(input.creationDate);
    R["activationDate_in"] = Rcpp::wrap(input.activationDate);
    R["finalDate_in"] = Rcpp::wrap(input.finalDate);
    R["start_in"] = Rcpp::wrap(input.start);
    R["type_in"] = Rcpp::wrap(input.type);

    SEXP res;

    string evalstr = "res <- portfolioBenchmark(nav_in, cashFlows_in,
dates_in, indexesBmk_in, weightsBmk_in, benchmark_in, datesBmk_in,
creationDate_in, activationDate_in, finalDate_in, start_in, type_in); res";
    res = R.parseEval(evalstr);

What I obtain is the following:

Errore in .Call("R_isMethodsDispatchOn", onOff, PACKAGE = "base");
   Numero di argomenti errato (2), ce ne vogliono 1 per
R_isMethodsDispatchOn
terminate called after throwing an instance of 'Rcpp::binding_not_found'
what(): binding not found: '.AutoloadEnv'
Aborted

Excuse for the message, which is an Italian/English mix...
What is this error about ? And then... the result of the
"portfolioBenchmark" function should be a list..How can I convert the
returned SEXP res into a list ?

Thanks in advance,
Alessandro Torrisi.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20100924/35ec3b1b/attachment.htm>


More information about the Rcpp-devel mailing list