Someone had this type of error when is using Rcpp lib for decomposition into eigenvalues and eigenvectors. If yes, how could I fix it? Thanks!
This is the code:
cppFunction('
Rcpp::List eigen_decomp_cpp(const arma::mat& A) {
arma::vec eigval;
arma::mat eigvec;
arma::eig_sym(eigval, eigvec, A);
return Rcpp::List::create(Rcpp::Named("values") = eigval,
Rcpp::Named("vectors") = eigvec);
}', depends = "RcppArmadillo")
This is the error:
Error in sourceCpp(code = code, env = env, rebuild = rebuild,
cacheDir = cacheDir, :
Error 1 occurred building shared library.
Now I'm reading the literature of this lib to understand the correct syntax, because I checked if there are invalid characters, Rtools is installed a restarted the RStudio.
verbose = TRUE
?Rcpp
,RcppArmadillo
, or some other underlying dependency or compilation tool (OS level). The authors have historically (repeatedly) suggested that the best and primary place to ask questions about Rcpp integration is the mailing list. I suggest looking and asking there, though ...sessionInfo()
, and any more console output that may accompany that failure.