Re: [Rcpp-devel] Error installing 1.0.13

2024-07-25 Thread Avraham Adler
h#L27-L37 > > Thanks, > Kevin > > On Thu, Jul 25, 2024 at 8:29 AM Dirk Eddelbuettel wrote: > > > > > > On 24 July 2024 at 20:02, Avraham Adler wrote: > > | Let me rebuild R from scratch and I'll try again. I'll report back (in > > | a day or so) if

Re: [Rcpp-devel] Error installing 1.0.13

2024-07-24 Thread Avraham Adler
lbuettel wrote: > > > On 24 July 2024 at 19:21, Avraham Adler wrote: > | I get the following error when trying to install. > | > | Thanks, > | > | Avi > | > | * installing *source* package 'Rcpp' ... > | ** package 'Rcpp' successfully unpacked and MD5 s

[Rcpp-devel] Error installing 1.0.13

2024-07-24 Thread Avraham Adler
I get the following error when trying to install. Thanks, Avi * installing *source* package 'Rcpp' ... ** package 'Rcpp' successfully unpacked and MD5 sums checked ** using staged installation ** libs using C++ compiler: 'G__~1.EXE (GCC) 13.2.0' g++ -std=gnu++17 -I"C:/R/RCurrent/R-devel/include

Re: [Rcpp-devel] cost of .Call

2022-08-10 Thread Avraham Adler
Hi Konrad. As Dirk said, Rcpp makes life easy for the programmer by taking care of some of the background work automatically. So there may be a time vs. speed trade off against bespoke handwritten code. I have a comparison between a few implementations (base, C,Rcpp, Fortran) of a relatively s

Re: [Rcpp-devel] Please help in testing what will be Rcpp 1.0.5

2020-06-16 Thread Avraham Adler
R Under development (unstable) (2020-06-07 r78653) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18362) It's R 4.0.1 using Jeroen rtools40 scripts on Win 10 64bit. 1513 OK, not sure why sessionInfo() went nuts though per below. Restarting R worked to provide the s

[Rcpp-devel] Rcpp::traits::is_inifinite - PosInf vs. NegInf

2020-05-24 Thread Avraham Adler
As I was updating one of my packages (lamW), CRAN's reverse dependency tests caught an error of my own making. For consistency, I was trying to remove calls to std::numeric_limits and replace them with R magic words (like R_NaN instead of std::numeric_limits::quiet_NaN()). One of the changes I mad

Re: [Rcpp-devel] Create scalar values in Rcpp

2018-12-10 Thread Avraham Adler
There are no scalars in R; there are vectors of length 1. https://stat.ethz.ch/pipermail/r-help/2003-April/032010.html Avi On Mon, Dec 10, 2018 at 11:14 AM Wolf Vollprecht wrote: > Hi, > > What's the canonical way of creating a scalar SEXP in Rcpp? E.g. I would > like to store a single numeric

Re: [Rcpp-devel] Speed of RCppEigen Cholesky decomposition on sparse matrix

2018-11-26 Thread Avraham Adler
If I recall correctly, Eigen does not use the BLAS, but has reprogrammed the operations in C++. If you want to take advantage of a fast system BLAS, try Armadillo, or in this case RcppArmadillo. Thanks, Avi On Mon, Nov 26, 2018 at 12:23 PM Hoffman, Gabriel wrote: > I am developing a statistica

Re: [Rcpp-devel] 4-dimensional array

2018-04-17 Thread Avraham Adler
May not be possible. See https://stackoverflow.com/questions/16105548/4-dimensional-matrix-in-armadillo Avi On Tue, Apr 17, 2018 at 8:38 PM Shaami wrote: > Dear Prof. > > I am not finding how to introduce a 4-dimensional array using > RcppArmadillo. Could you please provide a simple example of

Re: [Rcpp-devel] Question regarding new pacakge registration requirements

2017-03-30 Thread Avraham Adler
On Thu, Mar 30, 2017 at 4:06 PM, Tim Keitt wrote: > > On Thu, Mar 30, 2017 at 2:55 PM, Avraham Adler > wrote: > >> If so, do I add >> them asa regards the functions *I* wrote in lamw.cpp or as regards the >> function wrappers that Rcpp wrote and the .R files call i

[Rcpp-devel] Question regarding new pacakge registration requirements

2017-03-30 Thread Avraham Adler
With the changes to requested form of package registration, I want to ensure that my packages comply. One of them, lamW [1], uses Rcpp—actually RcppParallel. When looking through the source created by Rcpp, I can find the RRegisterCallable calls in RcppExports.src. However, I cannot find any refere

Re: [Rcpp-devel] a variable for loop

2016-12-14 Thread Avraham Adler
> [9,] 362880 33522128640 3.634245e+12 > [10,] 3628800 60949324800 5.191779e+12 > > , , 10 > > [,1] [,2] [,3] > [1,] 0 0 0.00e+00 > [2,] 00 0.00e+00 > [3,] 00 0.00e+00 > [

Re: [Rcpp-devel] a variable for loop

2016-12-13 Thread Avraham Adler
that if a is a vector of size 3, Then b must be 2 x 3 or > 3 X 3 etc. > > Thank you Avraham for quick response. I hope this will make my question > more clear. > > Best regards > > > On Wed, Dec 14, 2016 at 4:46 PM, Avraham Adler > wrote: > > On Tue, Dec 13, 2016 a

Re: [Rcpp-devel] a variable for loop

2016-12-13 Thread Avraham Adler
On Tue, Dec 13, 2016 at 9:51 PM, Amina Shahzadi wrote: > Hello Friends and Prof. Dirk > > I am pasting here a code which has a for loop depending on another for > loop. > I am getting zeros for cube c. I tried and searched a lot but did not get > an example of this type. Would you please help in

Re: [Rcpp-devel] Can an Rcpp package include Fortran code?

2016-10-06 Thread Avraham Adler
, setting > one of: > >SHLIB_LD = $(CXX) >SHLIB_FCLD = $(CXX) >DYLIB_LD = $(CXX) > > in your src/Makevars[.win] will be sufficient, but no guarantees... > > Kevin > > On Thu, Oct 6, 2016 at 9:37 AM, Dirk Eddelbuettel wrote: >> >> >> O

[Rcpp-devel] Can an Rcpp package include Fortran code?

2016-10-06 Thread Avraham Adler
Has anyone successfully created a package that uses Rcpp for C++ code and which also has Fortran code? I'm experimenting with comparing Fortran and C++ and if I could use Rcpp to handle the C++ portion, it would reduce the steepness of the learning curve. However, I haven't had success. The follow

Re: [Rcpp-devel] Variable for loop

2016-09-26 Thread Avraham Adler
b[i, j, q] = a[i, j]; > } > else{ > b[i, j, q] = b[i-1, j, q-1] * a[i, j]; > } > } > } > } > > > On Tue, Sep 27, 2016 at 3:22 PM, Avraham Adler > wrote: >> >> Please give a simple example of an input and its expected

Re: [Rcpp-devel] Variable for loop

2016-09-26 Thread Avraham Adler
if(q==0){ >b(i, j, q) = a(i, j); > } > else{ >b(i, j, q) = b(i-1, j, q-1) * a(i, j); > } > } > } > } > return b; > } > > On Tue, Sep 27, 2016 at 2:51 PM, Avraham Adler > wrote: >> >

Re: [Rcpp-devel] Variable for loop

2016-09-26 Thread Avraham Adler
Hello. Once again, it is very unclear what you want to do. Can you please explain, in English not code what your procedure intends to do, the input you expect, and the output you expect? What it LOOKS like you want to do is to create an N x M x N cube where the first slice is your matrix and the

Re: [Rcpp-devel] Error still there

2016-09-14 Thread Avraham Adler
Amina and I continued the conversation off list, but for closure purposes, the "multiple" version was tweaked a bit as there was comparison between signed and unsigned ints which did not throw an error for me, but did for Amina. Final multiple version posted below. Thanks, Avi #include using n

Re: [Rcpp-devel] Error still there

2016-09-12 Thread Avraham Adler
} return(answers); } On Mon, Sep 12, 2016 at 8:21 PM, Dirk Eddelbuettel wrote: > > On 12 September 2016 at 19:05, Avraham Adler wrote: > | What exactly is it that you are trying to do? > > Also review some resources on 'minimally reproducible example' as eg > > http://

Re: [Rcpp-devel] Error still there

2016-09-12 Thread Avraham Adler
Hello, Amina. I am having trouble understanding your code, however,one thing that stands out is that your return statement is inside your for loop which looks strange. Secondly in your first branch, you seem to want to return a scalar and in your second branch, you seem to want to return a vector

Re: [Rcpp-devel] Optimization flag may be needed in Makevars.win for 4.9.2 toolchain

2015-08-25 Thread Avraham Adler
17:39, Avraham Adler wrote: > | I've been testing a GCC 4.9.2-based toolchain for Windows for the last > | week or so, and today fell afoul of the error uncovered here > | <https://stat.ethz.ch/pipermail/r-devel/2015-March/070814.html>. I've > | been passing different opt

[Rcpp-devel] Optimization flag may be needed in Makevars.win for 4.9.2 toolchain

2015-08-25 Thread Avraham Adler
I've been testing a GCC 4.9.2-based toolchain for Windows for the last week or so, and today fell afoul of the error uncovered here . I've been passing different optimization flags, and Rcpp compiled properly under every one EXCEPT when

Re: [Rcpp-devel] V8 crashes on 32bit windows when built with new Rtools

2015-03-12 Thread Avraham Adler
Why would posix be enabled for a Windows target? Avi On Thu, Mar 12, 2015 at 6:49 PM, Duncan Murdoch wrote: > On 12/03/2015 5:51 PM, Jeroen Ooms wrote: > > On Thu, Mar 12, 2015 at 2:40 PM, JJ Allaire > > wrote: > > > > I had an issue like this in RcppParallel t

Re: [Rcpp-devel] Rcpp bug (was: [Rd] Notes on building a gcc toolchain for Rtools (but not multilib))

2015-03-12 Thread Avraham Adler
I believe the new toolchain uses SJLJ and not SEH specifically for backwards compatibility. Avi On Thu, Mar 12, 2015 at 4:24 PM, JJ Allaire wrote: > Just a note that Rf_error is actually not technically allowed in Rcpp > (it's a longjmp which bypasses all C++ destructors on the stack). We > do

Re: [Rcpp-devel] Best Practice for Optimize Functions in RCPP

2014-12-22 Thread Avraham Adler
Hello, Simon. I ran into a similar problem before (with uniroot ), and what I found was that the function in R is actually written in C. I found the original code, but not being a real programmer, I stopped working on what I wa

Re: [Rcpp-devel] Errors while compiling a script (seems to be related to Fortran)

2014-09-04 Thread Avraham Adler
I'm no expert here, but Armadillo does have built in QR decomposition < http://arma.sourceforge.net/docs.html#qr> and sorting < http://arma.sourceforge.net/docs.html#sort> routines. Perhaps you can use those and dispense with the need for importing anything else? Avi On Thu, Sep 4, 2014 at 3:30

[Rcpp-devel] Can one use both RcppArmadillo and RcppEigen in the same package?

2014-08-27 Thread Avraham Adler
Good afternoon. Can one use both RcppArmadillo and RcppEigen in the same package?I can "source" both in RStudio and get the code to work, but when I try and build, I get errors, probably because RcppEigen imports Rcpp and RcppArmadillo complains about that. The reason I am interested is to compa

Re: [Rcpp-devel] Significant difference in performance when computing Ax

2014-04-27 Thread Avraham Adler
o. Oh well. Thanks, Avi On Sun, Apr 27, 2014 at 3:01 PM, Dirk Eddelbuettel wrote: > > On 27 April 2014 at 14:34, Avraham Adler wrote: > | I feel foolish now. I forgot to note that I build R using a Win64 > | version of OpenBLAS (see > | <http://www.avrahamadler.com/2014/04/20/r-3-1-

Re: [Rcpp-devel] Significant difference in performance when computing Ax

2014-04-27 Thread Avraham Adler
gt; > > other attached packages: > > [1] microbenchmark_1.3-0RcppArmadillo_0.4.200.0 Rcpp_0.11.1 > devtools_1.5 > > [5] shTools_1.0 markdown_0.6.5 knitr_1.5 > > > > loaded via a namespace (and not attached): > > [1] compiler_3.1.0 digest_0.6.4 eva

Re: [Rcpp-devel] Significant difference in performance when computing Ax

2014-04-25 Thread Avraham Adler
There is actually one other command to test, `crossprod`, or in this case `tcrossprod(x, A)`. Following your code, first run and ensure TRUE is returned. d <- 2000 A <- matrix(1.0*(1:d^2),nrow=d) x <- 1.0*(1:d) all.equal(A%*%x, tcrossprod(x, A), mvprod1(A,x), mvprod2(A,x)) Now, using an i7-3740Q

Re: [Rcpp-devel] RcppArmadillo: Linking to OpenBLAS under Windows

2014-02-06 Thread Avraham Adler
On Thu, Feb 6, 2014 at 10:09 PM, Dirk Eddelbuettel wrote: > > RcppArmadillo uses whatever R uses. If you tell R to use different BLAS + > LAPACK, then RcppArmadillo will use then. Great! Unfortunately, under Windows, there is no "easy" way to feed in a different LAPACK as there is a BLAS (by foo

[Rcpp-devel] RcppArmadillo: Linking to OpenBLAS under Windows

2014-02-06 Thread Avraham Adler
If I have compiled my installation of R linking to OpenBLAS so that Rblas.dll is fast and not reference, if I install RcppArmadillo from source, will it take advantage of that Fast Blas? Thank you, Avraham ___ Rcpp-devel mailing list Rcpp-devel@lists.r-

Re: [Rcpp-devel] 0.11.0 error concerning enterRNGScope

2014-02-06 Thread Avraham Adler
You probably have the same issues some of has as well due to the change in importing and libraries. Please see this thread: < http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2014-February/007120.html > Avraham On Thu, Feb 6, 2014 at 6:50 AM, Gregor Kastner wrote: > Hi again, > > I am af

Re: [Rcpp-devel] dataptr / char_get_string_elt not provided by package 'Rcpp'

2014-02-05 Thread Avraham Adler
I had the same issue (RNGScope) and what worked for me (besides Dirk's clear explanations which I somehow missed) was to run Rcpp.package.skeleton() and compare what changed, which is exactly what Dirk mentioned above (the changes to NAMESPACE and DESCRIPTION). LinkingTo is still necessary (togethe