c++ - Reading in an R list for a constructor throws error: expecting a single value -


I'm compiling a package with Rcpp / RcppArmadillo and I'm getting an error that I believe is Rcpp as The header is from .h I have written a constructor who takes the list from R and makes the appropriate class. The function calling the constructor and the actual constructor is shown below. I am trying to follow the code shown here on the lists and data frames.

#include "varInf.h" // [[RCPP: Dependent (RCPARMDRLO)] [/ / [RCPP :: Exports]] zero varInfInput (Rcpp :: list model_r) {mm_model Model = mm_model (model_r); VarInfC (model); }

This creator is mm_model.h which is included in varInf.h

  using namespace RCPP; Using Namespace ARMA; Class mm_model {public: int T; Int J; Round counter RJ; Int maxr; Integer Vector Notice; Int maxN; Int kashmir; Integer vector power; Int maxV; Numerical vector alpha; Numerical vector theta; Integer z; Numerical vector lambda; NumericVector phi; NumericWitch delta; Numeric vector ob; Int Dish; Mm_model (catalog model) {t = (int) model [0]; J = (int) model [1]; As RJ = & lt; IntegerVector & gt; (Model [2]); MaxR = Max (RJ); As the absolute = & lt; IntegerVector & gt; (Model [3]); MaxN = Max (NIZAR); K = Model [4]; As VJ = & lt; IntegerVector & gt; (Model [5]); Maximum V = Maximum (VJ); Alpha = & lt; Numerical vector & gt; (Model [6]); As theta = & lt; NumericVector & gt; (Model [7]); As Z = & lt; IntegerVector & gt; (Model [8]); As Lambda = & lt; Numerical vector & gt; (Model [9]); As Fee = & lt; NumericVector & gt; (Model [10]); Delta = & lt; NumericVector & gt; (Model [11]); As the obs = & lt; Numerical vector & gt; (Model [12]); Dist = (int) model [13]; }}  

When I call varOfInput (for autogenerated wrapper) from REO, it throws the following error.

  Error: Expect a single value of 3 ("Message", "Call", "CPstack"), class = C ("RCPP:" (structure (list (message = "single Value Expected ", call = faucet, CPstack = faucet). VarInfFit.R # 14 1 varMinfo (test_model) 2 varInfInput (output)  

I'm doing something new And trying to read as much as possible, so a reference to what can be helpful is greatly appreciated.

I think I have my problem It's fixed when I read in int, they are being read as SEXp objects and I just can not type them to int when I

  T = like  

It works as expected


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -