Hi David,
I didn't have time to study this in detail but it smells like a tricky issue
one which has been discussed here. It has to do with whether
-- your argument vector is integer (x <- 1:20 or even x <- 1L:20L) or
numeric (seq(1.0, 20.0., by=1.0)
-- because you use a NumericVector
Hi David,
Interesting problem.
You'll find that if you change how you initialize your `res` vector,
you will sidestep this problem, eg. from this:
NumericVector res(x);
to:
NumericVector res(A.size());
Why? Because in your original instantiation, as you "save" your
results in `res`, y
Hi all
I'm new to Rcpp ... and C++, but I am keen to use it to speed up simple parts
of my R package and to learn more. I thought I had made a good start, but I
have encountered a strange problem. Now, this may well be due to my poor
knowledge of C++, but I can't find where the problem is and