Apologies, I will break it down and tackle one thing at a time...
On Wed, Jan 22, 2014 at 8:13 PM, Dirk Eddelbuettel wrote:
>
> Saurabh,
>
> On 22 January 2014 at 18:04, Saurabh B wrote:
> | I am running into many issues. Here they are ranked in order of
> importance) -
> | 1) When I run this
On 21 January 2014 at 22:02, Søren Højsgaard wrote:
| I have made the following primitive "concatenate" function, because I
couldn't find one in Rcpp:
|
| template
| Vector do_conc_(Vector x, Vector y){
| int nx=x.size(), n=x.size()+y.size(),i,j;
| Vector out=no_init(n);
| for (i=0; i ( X
Saurabh,
On 22 January 2014 at 18:04, Saurabh B wrote:
| I am running into many issues. Here they are ranked in order of importance) -
| 1) When I run this (incorrect) program -
| stochDescCpp(param = rep(0,3), x = X, y = Y, maxit = 100)
|
| I get -
| Error in .Primitive(".Call")(, param, x, :
On 22 January 2014 at 23:07, Søren Højsgaard wrote:
| I am struggeling with checking for NA and Inf in a loop over a numeric
vector. I have created these two helpers:
"If in doubt, check unit tests".
See e.g. inst/unitTests/cpp/sugar.cpp
// [[Rcpp::export]]
LogicalVector runit_isna( NumericV
This is not implemented as members of Vector.
See:
https://github.com/RcppCore/Rcpp/blob/b5ff9b5530e4a82682caab5ddc87ac23a7b8857e/inst/include/Rcpp/traits/is_infinite.h
So, you can use:
traits::is_infinite(x)
Romain
Le 23 janv. 2014 à 00:07, Søren Højsgaard a écrit :
> Dear all,
>
> I am
Dear all,
I am struggeling with checking for NA and Inf in a loop over a numeric vector.
I have created these two helpers:
//[[Rcpp::export]]
bool isna( double x){
return NumericVector::is_na(x) ;
}
//[[Rcpp::export]]
bool isinf( double x){
return NumericVector::is_infinite(x) ;
}
isna wor
Hi there,
I am new to RcppArmadillo and very excited about the sparse matrix
functionality it offers. I have a large optim that I wish to break down
into stochastic descent in Rcpp to speed things up.
To start small, I used a simple logisitic regression function that I have
working in R -
Norm <