Re: [Rcpp-devel] error handling for computational singularity

2013-07-07 Thread Xiao He
Thanks for the reply. I tried the following: # RcppExport SEXP foo( SEXP X, SEXP Y) { try { arma::mat x=Rcpp::as(X), y=Rcpp::as(Y); arma::mat output; output = arma::solve( x, y ); return(wrap( output) ); } catch( std::exception& __ex__ )

Re: [Rcpp-devel] error handling for computational singularity

2013-07-06 Thread Dirk Eddelbuettel
On 6 July 2013 at 18:56, Xiao He wrote: | Hi dear listers, | | Take the mock function below for an example. What would be the best way to | handle computational singularity? That is essentially a _statistical_ issue and not a Rcpp problem so that is not really the right forum. | #include | #in