Re: [Rcpp-devel] C++ issue only spotted by CRAN and not locally or via rhub

2022-12-05 Thread Martyn Plummer
I have good news and bad news. I found the source of the error. In your wrapper function logsumexp <- function(x, a = NULL) { x <- as.matrix(x) a <- if(is.null(a)) rep(double(0), ncol(x)) else as.vector(a) logsumexp_Rcpp(x,a) } the expression rep(double(0), ncol(x)) is not doing what you t

Re: [Rcpp-devel] using SparseSuite and RcppEigen in package

2018-01-17 Thread Martyn Plummer
I think it is worth asking Martin Maechler if he could expose more SuiteSparse functionality through the Matrix package. Martyn On Wed, 2018-01-17 at 15:06 +0100, Simon Barthelmé wrote: > Hi Dirk, > > Thanks for your suggestion - I had thought of doing that but it requires > tracking the versio

Re: [Rcpp-devel] Timings for a program

2017-01-05 Thread Martyn Plummer
On Thu, 2017-01-05 at 05:39 -0700, Christian Gunning wrote: > > > > I am new to Rcpp. I have converted my R program into an Rcpp program. > > I want to ask a general question. Using Rcpp, my code is taking about 3 > > minutes to produce output for 100 observations. But it is taking about 2.45 > >

Re: [Rcpp-devel] Rcpp C++11 on Windows

2016-01-27 Thread Martyn Plummer
On Wed, 2016-01-27 at 11:35 +0100, Peter Meissner wrote: > Hey Listeners, > > I am quite solid in R but a complete noob to C++ and Rcpp so please excuse > if do not get it right ... > > My problem is that I would like to have a package using Rcpp AND using > C++11 features AND working on both

Re: [Rcpp-devel] Windows set C++11 flag for new compiler

2015-11-10 Thread Martyn Plummer
evars.win but it doesn't appear to register. The build proceeds as > if I never set the variable. Are the any packages that accomplish > this? > > > Charles > > On Tue, Nov 10, 2015 at 10:42 AM, Martyn Plummer > wrote: > On Tue, 2015-11-10 at 10:30 -0600,

Re: [Rcpp-devel] Windows set C++11 flag for new compiler

2015-11-10 Thread Martyn Plummer
On Tue, 2015-11-10 at 10:30 -0600, Dirk Eddelbuettel wrote: > On 10 November 2015 at 10:18, Charles Determan wrote: > | Okay, is there a way for me to use the newer compiler for building the > package > | on Windows? I've tried everything I can think of and fail to get the new > one > | to regis

Re: [Rcpp-devel] RcppParallel on Solaris

2015-04-02 Thread Martyn Plummer
On Thu, 2015-04-02 at 10:03 -0500, Dirk Eddelbuettel wrote: > On 2 April 2015 at 16:31, Romain Francois wrote: > | Would be useful to have a solaris machine on aws or whatever with R all > these toils installed. > | > | I once had a virtual machine set up thanks to martyn but the user > experie

Re: [Rcpp-devel] Windows gcc toolchain for R 3.2.0

2015-03-18 Thread Martyn Plummer
On Wed, 2015-03-18 at 07:55 -0700, Dan Tenenbaum wrote: > Is it not considered a "known problem" that C++ libraries linked > against by R packages need to be rebuilt with g++ 4.9.2 in order for > the R packages to install/load? This could well be due to incompatible thread models (win32 vs posix).

Re: [Rcpp-devel] Using "Rcpp Modules" under Solaris fails to load.

2015-03-18 Thread Martyn Plummer
odule=TRUE" compiles just fine (except for one warning) and can be > | loaded: > > [...] > > | If you need any further informations to help me please feel free to ask. > > > It is a tricky situation. I don't quite know how to say this -- nobody > activ

Re: [Rcpp-devel] Report on building Bioconductor with the new toolchain

2015-03-17 Thread Martyn Plummer
On Mon, 2015-03-16 at 12:08 -0700, Dan Tenenbaum wrote: > Hi, > > Pardon me if this is off-topic but it looks from recent discussion > like several people here are working on helping Duncan with the new > toolchain and I thought some reports about issues with it might be > welcome/helpful. If not,

Re: [Rcpp-devel] Returning an arma vec

2014-12-05 Thread Martyn Plummer
arma::mat first and then copy that across to an > Rcpp::Matrix … > > Romain > > > Le 3 déc. 2014 à 22:41, Martyn Plummer a écrit : > > > > You just need to put a new template specialization of "wrap" for the > > subview_col class in RcppArmadillo

Re: [Rcpp-devel] Returning an arma vec

2014-12-03 Thread Martyn Plummer
You just need to put a new template specialization of "wrap" for the subview_col class in RcppArmadilloWrap.h based on the existing one for the subview class. And throw in one for subview_row for good measure. Martyn From: rcpp-devel-boun...@lists.r-forge

Re: [Rcpp-devel] Const correctness of NumericVector iterators

2014-11-26 Thread Martyn Plummer
On Wed, 2014-11-26 at 11:20 -0600, Dirk Eddelbuettel wrote: > On 26 November 2014 at 10:15, Dirk Eddelbuettel wrote: > | > | Hi Martyn, > | > | On 26 November 2014 at 13:20, Martyn Plummer wrote: > | | This is related to David Shih's thread about modifying input argumen

[Rcpp-devel] Const correctness of NumericVector iterators

2014-11-26 Thread Martyn Plummer
This is related to David Shih's thread about modifying input arguments but I think it needs its own thread. I found a problem when I tried porting some Rcpp code to run outside of Rcpp by providing my own NumericVector implementation based on STL vectors. In Rcpp it is possible to obtain a non-con

Re: [Rcpp-devel] Fwd: Re: Making objects in the C++ "side" persistent

2014-06-18 Thread Martyn Plummer
On Wed, 2014-06-18 at 09:09 +0900, Martin Jakt wrote: > On Tuesday 17 Jun 2014 19:34:59 Krzysztof Sakrejda wrote: > > On Tue, Jun 17, 2014 at 7:30 PM, Martin Jakt wrote: > > >> if (identical(data_ptr, new('externalptr'))) return("No data available > > >> to retrieve.") > > > > > > thanks. I think

Re: [Rcpp-devel] C++11 in Windows R package

2014-05-29 Thread Martyn Plummer
Thanks John. I learned something new today. It is probably worth mentioning this in the manual. Martyn From: rcpp-devel-boun...@lists.r-forge.r-project.org [rcpp-devel-boun...@lists.r-forge.r-project.org] on behalf of Dirk Eddelbuettel [e...@debian.org]

Re: [Rcpp-devel] g++ flags

2014-05-07 Thread Martyn Plummer
On Wed, 2014-05-07 at 08:59 -0400, Gabor Grothendieck wrote: > I did read it but his theory must be wrong I'm right here you know. > since it failed as > described before Kevin's fix and worked afterwards. It is a Windows-specific issue. The help page for Sys.setenv reveals all: "Most platform

Re: [Rcpp-devel] g++ flags

2014-05-07 Thread Martyn Plummer
On Tue, 2014-05-06 at 22:50 -0700, Kevin Ushey wrote: > Hi Gabor, > > Looks like it was a bug on our end -- R-exts specifies that USE_CXX1X > should be set to any value; we try to set it to nothing (ie, define it > but leave it empty) but apparently that is not accepted. Yes it is. We use Sys.get

Re: [Rcpp-devel] Distribution of Rcpp11 codebase

2014-04-08 Thread Martyn Plummer
On Tue, 2014-04-08 at 10:48 +0200, Romain François wrote: > Hello Martyn, > > Thanks for joining the discussion; > > Le 8 avr. 2014 à 10:36, Martyn Plummer a écrit : > > > And another 2 cents from me. > > > > A package is the basic unit of functionality

Re: [Rcpp-devel] Distribution of Rcpp codebase

2014-04-08 Thread Martyn Plummer
And another 2 cents from me. A package is the basic unit of functionality in R. Whatever functionality you are providing, I think a package is the best way to deliver it. There is a well developed framework for versioning, dependency resolution, testing, and distribution. If you choose some other

Re: [Rcpp-devel] Calling an internal do_* C level function

2013-10-15 Thread Martyn Plummer
On Tue, 2013-10-15 at 08:46 +, Martyn Plummer wrote: > On Mon, 2013-10-14 at 22:24 +0200, Romain Francois wrote: > > Le 14/10/13 21:47, Mark Fredrickson a écrit : > > > Thank you to Romain and Dirk. I've seen some C++ rank implementations, > > > and

Re: [Rcpp-devel] Calling an internal do_* C level function

2013-10-15 Thread Martyn Plummer
On Mon, 2013-10-14 at 22:24 +0200, Romain Francois wrote: > Le 14/10/13 21:47, Mark Fredrickson a écrit : > > Thank you to Romain and Dirk. I've seen some C++ rank implementations, > > and I'll probably copy one of those. > > > > Lastly, not a milligram of Rcpp in this question. Plain R program

Re: [Rcpp-devel] RcppEigen not compiling under Solaris 10 INTEL

2013-09-30 Thread Martyn Plummer
-- none of the core member of the Rcpp group has access to either Solaris variant (though as I recall Martyn Plummer has a solaris x86 and provided Romain access to this in the past) -- so we cannot fix Rcpp, nor can we fix packages building on top of Rcpp -- and as "we" d

Re: [Rcpp-devel] R vectorisation vs. C++ vectorisation

2012-11-21 Thread Martyn Plummer
I believe that such a function is normally called "clamp". Martyn Quoting Romain Francois : > clip it is, with this order: > > p = clip( 0.0, p, 1.0 ) ; > > which I found more natural. > > For now, I implemented only a version with primitives for the first and > last argument and sugar expression