On 15 December 2021 at 12:30, Robert J. Hijmans wrote:
| Dirk thanks very much for the help. And sorry, Alex, I misspoke. I meant to
| say that Rcpp will coerce a R "numeric" (vector) to an
| "Rcpp::IntegerVector" if you ask it to do so (and that is what happened in
| the context we were discussin
On 15 December 2021 at 20:10, Balamuta, James Joseph wrote:
| For those interested, the few other instances can be found by looking under
the inst/include/Rcpp/generated/ folder:
|
| https://github.com/RcppCore/Rcpp/tree/master/inst/include/Rcpp/generated
Yup, I mentioned the dir, but thanks f
Thanks Bill. I'm not sure how to set breakpoint on Windows (I found
resources for lldb or gdb which seem to be for Linux), but was able to get
a bit more insight with your Rf_error line and some print statements. For
some reason specifically on the first iteration xw is evaluating to 1:21
(the nu
For those interested, the few other instances can be found by looking under the
inst/include/Rcpp/generated/ folder:
https://github.com/RcppCore/Rcpp/tree/master/inst/include/Rcpp/generated
In the case of Vector__create.h, one would need to do some varidic templating
to abstract away from the
On 15 December 2021 at 10:19, Kevin Ushey wrote:
| I assume we're talking about Vector::create()? Anyone curious poking at it
| can start by looking here:
|
|
https://github.com/RcppCore/Rcpp/blob/940fb23868bf442e587994451e85263baa302d9c/inst/include/Rcpp/vector/Vector.h#L1122-L1126
There is mo
I assume we're talking about Vector::create()? Anyone curious poking at it
can start by looking here:
https://github.com/RcppCore/Rcpp/blob/940fb23868bf442e587994451e85263baa302d9c/inst/include/Rcpp/vector/Vector.h#L1122-L1126
On Wed, Dec 15, 2021 at 8:51 AM Dirk Eddelbuettel wrote:
>
> Joseph,
To make this easier to debug, I added a check that the values in the x
given to C_make_glcm are within bounds:
for(int i=0; i < nr; ++i){
for(int j=0; j < nc; ++j){
int focal_val = x(i,j);
if (focal_val >= n_levels || focal_val < 0) { // sanity check
Rf_error("programme
Thanks, I thought I was onto something there but I guess that wasn't the
issue (that only came up because when I made edits to my function to just
return the actual values as a check, I was converting them in an unsafe way
from int to double). I'm still confused on how the valgrind check Bill was
r
Joseph,
Sorry, can't quote your message as whatever you used confused my mail
handler. (Maybe try text-only next time if you remeber? I have had this
before, albeit very rarely.)
But it is a good idea. Someone with a bit of time should sit down and could do
this as we now have C++11 / C++14 as
On 15 December 2021 at 11:22, Alex Ilich wrote:
| I actually think that the issue may be related to conversions between
| int/IntegerVectors and double/NumericVector/std::vector. I was
| talking with the terra package author to see if the focalCpp function can
| take an IntegerVector instead of a
I actually think that the issue may be related to conversions between
int/IntegerVectors and double/NumericVector/std::vector. I was
talking with the terra package author to see if the focalCpp function can
take an IntegerVector instead of a NumericVector/ /std::vector, as
it seemed initially to be
11 matches
Mail list logo