Re: [Rcpp-devel] Using complex numbers and functions in Rcpp

2017-02-21 Thread Baptiste Auguie
Hi, I think you can/should use std::complex, see for example the types used in https://github.com/baptiste/rcppfaddeeva/blob/master/src/callFaddeeva.cpp In general I prefer to work with RcppArmadillo for numerical (including complex) computations, its syntax closely follows R and Matlab. See for

Re: [Rcpp-devel] Parallel R::bessel_k function in Rcpp

2016-03-23 Thread Baptiste Auguie
Hi, Check also the Bessel package from Martin M., https://cran.r-project.org/web/packages/Bessel/index.html It wraps some C code; maybe a C++ interface wouldn't be too hard to write. There's also the GSL package apparently. Cheers, baptiste On 24 March 2016 at 13:20, Hoang Nguyen wrote: > Tha

Re: [Rcpp-devel] lighter source package

2016-02-29 Thread Baptiste Auguie
02f09472fd5e268f/src/clencurt.h). Running bzip2 -z clencurt.h brings it down from 40Mb to 14Mb, which is an improvement. I'm sure I'll use this tip in the future, thanks! baptiste > | > | assuming that compression is enough (the referred file doesn't exist in > the sources ...)

Re: [Rcpp-devel] lighter source package

2016-02-28 Thread Baptiste Auguie
2016 at 08:59, Kevin Ushey wrote: > What about having a 'configure' script that generates this header file > on package install? > > https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Configure-and-cleanup > > On Sun, Feb 28, 2016 at 11:18 AM, Baptiste Augu

[Rcpp-devel] lighter source package

2016-02-28 Thread Baptiste Auguie
Dear Rcpp gurus, In the process of updating my planar package < https://github.com/baptiste/planar>, CRAN has mentioned their concern with the size of the source package (20Mb compressed tar.gz). This puzzled me until I found the culprit: a 40Mb header file < https://github.com/baptiste/planar/blo

Re: [Rcpp-devel] Using complex numbers in a C program called by R

2016-01-04 Thread Baptiste Auguie
uld look at it if you get stuck. As I remember, Dirk fixed my RcppFaddeeva package faster than I was committing to it. HTH, baptiste and call the resulting package EnableC and then add this to > LinkingTo/Depends/Export fields? > I hope I made myself clear ... > > Thank you again f

Re: [Rcpp-devel] Using complex numbers in a C program called by R

2016-01-03 Thread Baptiste Auguie
Hi, Just to clarify: did you include files from RcppFaddeeva because you need some of its functionality (special complex error functions), or was it only a workaround to get access to complex numbers? In the latter case, I recommend you try making a minimal Rcpp package to see how easy it is to in

Re: [Rcpp-devel] RcppArmadillo, solve always requires zgels?

2015-05-31 Thread Baptiste Auguie
p the list of symbol names, although in actuality it would never be used. Does that make sense? How could I specialise the code to restrict solve to square systems? Thanks, baptiste On 1 June 2015 at 10:13, Dirk Eddelbuettel wrote: > > On 1 June 2015 at 09:06, Baptiste Auguie wrote: >

Re: [Rcpp-devel] RcppArmadillo, solve always requires zgels?

2015-05-31 Thread Baptiste Auguie
need to give a hint of the square size, and armadillo will pick the right function/template/glue (I don't know the mechanism at play). On 1 June 2015 at 01:12, Dirk Eddelbuettel wrote: > > Hi Baptiste, > > On 31 May 2015 at 20:47, Baptiste Auguie wrote: > | Dear list, &

[Rcpp-devel] RcppArmadillo, solve always requires zgels?

2015-05-31 Thread Baptiste Auguie
Dear list, My cda package (https://github.com/baptiste/cda) solves a linear system Ax=b with Armadillo; win-builder and CRAN complain about a missing "zgels_" when trying to build on windows or mac, as it's not part of the subset of LAPACK provided by R libraries (I asked about this in 2011). I ha

Re: [Rcpp-devel] Integrals with Rcpp

2015-01-14 Thread Baptiste Auguie
On 14 January 2015 at 10:01, Dirk Eddelbuettel wrote: > > On 13 January 2015 at 15:14, Baptiste Auguie wrote: > | Hi, > | > | I might be the author of the SO question you refer to. In the planar > package > | I've tried a number of different strategies for numeri

Re: [Rcpp-devel] Integrals with Rcpp

2015-01-13 Thread Baptiste Auguie
Hi, I might be the author of the SO question you refer to. In the planar package I've tried a number of different strategies for numerical integration, but the most efficient I managed was at the C++ level, with direct call to the cubature library, https://github.com/baptiste/planar/blob/master/sr

Re: [Rcpp-devel] Rf_integrate?

2014-07-31 Thread Baptiste Auguie
Nice, thanks for sharing! FWIW, I wrote a wrapper for cubature to work at the C++ level with armadillo objects, but cubature is not particularly efficient in 1D. It has some nice features though, such as vector-valued integrals. https://github.com/baptiste/cubature/blob/master/minimal.c (probabl

Re: [Rcpp-devel] linking external libraries in a package

2014-01-02 Thread baptiste auguie
g now :) Thanks, baptiste On 1 January 2014 17:33, Dirk Eddelbuettel wrote: > > On 1 January 2014 at 17:30, baptiste auguie wrote: > | Hi list, and happy new year, > > Thanks, and Happy New Year from here too! > > | The command I'm using to create an executable is >

[Rcpp-devel] linking external libraries in a package

2014-01-01 Thread baptiste auguie
Hi list, and happy new year, This is a follow-up to a previous query I made on Stack Overflow, http://stackoverflow.com/questions/20474303/using-c-function-from-other-package-in-rcpp where my goal is to use an existing library for numerical integration together with my existing functions using Rcp

Re: [Rcpp-devel] Fwd: CRAN packages with C++ compilation errors on OS X 10.9

2013-11-27 Thread baptiste auguie
-project.org/nosvn/R.check/r-devel-macosx-x86_64/cda-00check.html Thanks, baptiste On 31 October 2013 13:15, Romain Francois wrote: > Le 31/10/2013 15:59, baptiste auguie a écrit : > >> Dear Rcpp gurus, >> >> >> Today a CRAN maintainer informed us of the failure of a f

Re: [Rcpp-devel] Fwd: CRAN packages with C++ compilation errors on OS X 10.9

2013-10-31 Thread baptiste auguie
On 31 October 2013 13:15, Romain Francois wrote: > Le 31/10/2013 15:59, baptiste auguie a écrit : > >> Dear Rcpp gurus, >> >> >> Today a CRAN maintainer informed us of the failure of a few Rcpp-related >> packages to build under the new version of the Ma

[Rcpp-devel] Fwd: CRAN packages with C++ compilation errors on OS X 10.9

2013-10-31 Thread baptiste auguie
Dear Rcpp gurus, Today a CRAN maintainer informed us of the failure of a few Rcpp-related packages to build under the new version of the Mac operating system, OS X 10.9 aka Mavericks. I do have access to a Mac, but I'm reluctant (in fact, unable) to update to Mavericks, therefore I'm in the dark w

Re: [Rcpp-devel] Forcing a shallow versus deep copy

2013-07-11 Thread baptiste auguie
Hi, That's great, thanks for considering this! Following this discussion, I went to browse through my code looking for wrap() and as() statements that could benefit from a speed-up of memory reuse. Of course I didn't find any. I switched to using Modules when they were introduced, the code being

Re: [Rcpp-devel] Pass a function name as an argument.

2013-05-18 Thread baptiste auguie
Hi, I asked the same thing once, and Dirk came up with some helpful ideas and a whipped up a demo for the gallery http://stackoverflow.com/questions/14428687/rcpparmadillo-pass-user-defined-function http://gallery.rcpp.org/articles/passing-cpp-function-pointers/ HTH, baptiste On 18 May 2013 1

Re: [Rcpp-devel] an error message from RcppArmadillo: sourceRcpp

2013-01-28 Thread baptiste auguie
Hi, I believe you're missing this line: // [[Rcpp::depends("RcppArmadillo")]] HTH, baptiste On 29 January 2013 19:08, Aileen Lin wrote: > Hi there, > > I get RcppArmadillo running, but still has a problem > with Rcpp::sourceCpp(). My code is here: > > #include > #include > using namespace

Re: [Rcpp-devel] broken package after udpate

2012-11-16 Thread baptiste auguie
responsive help, baptiste On 17 November 2012 13:13, Dirk Eddelbuettel wrote: > > On 17 November 2012 at 01:06, Romain Francois wrote: > | > | Le 17/11/12 00:59, baptiste auguie a écrit : > | > I see, thanks a lot for tracking this down. > > Seconded -- nicely don

Re: [Rcpp-devel] broken package after udpate

2012-11-16 Thread baptiste auguie
gt; Rot(2,0) = sinphi*sintheta; > Rot(2,1) = -cosphi*sintheta; > Rot(2,2) = costheta; > > return wrap(Rot); > } > > because there you call the right "wrap". > > Of course, the desired behaviour of having arma::mat as returned type will > be brou

Re: [Rcpp-devel] Fwd: latest incompatible changes for package developers?

2012-11-16 Thread baptiste auguie
ly(params, onedimer, .progress="none") > > Not sure what the next steps are ... > > Romain > > Le 16/11/12 22:56, baptiste auguie a écrit : > >> Hi, >> >> Forwarded to you directly just in case it never makes it to the list for >> wha

Re: [Rcpp-devel] [OT] Rcpp CRAN usage milestone

2012-04-12 Thread baptiste auguie
A big thanks from me too, to the Rcpp team for a great piece of software. (there was a summery Easter break, during which I did not keep up with list emails -- thanks for reviving it) Cheers, baptiste On 13 April 2012 14:33, Michael Hannon wrote: > On Sunday, April 8, 2012 at 10:50 AM Dirk Ed

Re: [Rcpp-devel] Optimising 2d convolution

2012-01-06 Thread baptiste auguie
On 7 January 2012 11:40, baptiste auguie wrote: > Hi, > > (Rcpp)Armadillo has a 1D convolution function < > http://arma.sourceforge.net/docs.html#conv >. It might be a very > inefficient way, to use it sequentially for 2D; I haven't tried. Also, it only works for se

Re: [Rcpp-devel] Optimising 2d convolution

2012-01-06 Thread baptiste auguie
Hi, (Rcpp)Armadillo has a 1D convolution function < http://arma.sourceforge.net/docs.html#conv >. It might be a very inefficient way, to use it sequentially for 2D; I haven't tried. HTH, baptiste On 7 January 2012 07:43, Hadley Wickham wrote: > Hi all, > > The rcpp-devel list has been very h

Re: [Rcpp-devel] as(x)

2011-10-26 Thread baptiste auguie
Hi, On 27 October 2011 02:27, Dirk Eddelbuettel wrote: > > Doh. Never mind the last post.  Meant to grep -r in Armadillo, of course: > > edd@max:~/svn/rcpp/pkg/RcppArmadillo/inst/include$ grep -rin cx_double . | > grep -v svn-base > ./armadillo_bits/typedef.hpp:81:typedef std::complex cx_doubl

[Rcpp-devel] as(x)

2011-10-25 Thread baptiste auguie
Dear list, I'm probably missing something basic, but I expected the following to work, library(RcppArmadillo) library(inline) fx <- cxxfunction(signature(x = "Rcomplex") , ' arma::cx_double y = as(x); return wrap( y ) ; ', plugin = "RcppArmadillo" ) fx( 1+2i ) yet it

[Rcpp-devel] Armadillo reshape

2011-10-25 Thread baptiste auguie
Dear list, My question isn't directly related to RcppArmadillo, rather to Armadillo itself, but I thought someone on this list might have come across my problem with arma::reshape. Consider the following example, where I want to reshape a vector into a 3x2 matrix filled by rows, library(RcppArmad

Re: [Rcpp-devel] Fwd: Building and Installing an R package built under RcppArmadillo on Mac OS X

2011-10-14 Thread baptiste auguie
Same here, fun(matrix(rnorm(9),3,3)) [,1] [,2] [,3] [1,] 1.3709584 -0.5646982 0.3631284 [2,] -0.5646982 0.4042683 -0.1061245 [3,] 0.3631284 -0.1061245 2.0184237 > sessionInfo() R version 2.13.1 (2011-07-08) Platform: i386-apple-darwin9.8.0/i386 (32-bit) locale: [1] en_

Re: [Rcpp-devel] Now 38 CRAN packages using Rcpp

2011-09-16 Thread baptiste auguie
Awesome indeed, congratulations! RcppArmadillo has 8 offsprings on CRAN, RcppEigen and RcppGSL none so far. AP <- available.packages(contrib.url("http://cran.r-project.org";)) ## more concise count ## length(grep("Rcpp", AP[,"Depends"])) ## sum(grepl("Rcpp", AP[,"Depends"])) depends = data.fram

Re: [Rcpp-devel] Question about compile package to .zip for windows

2011-07-31 Thread baptiste auguie
http://win-builder.r-project.org/ is very handy. HTH, baptiste On 1 August 2011 15:14, Yi Zhao wrote: > Dear all, > > I am trying to compile a package that I developed on Linux. I want to > compile it to .zip package for windows. > > However, "Rcmd build --binary " doesn't work well. The compi

[Rcpp-devel] package: cda

2011-07-25 Thread baptiste auguie
Dear list, I have just released a new package on CRAN . It uses RcppArmadillo to solve a complex linear system of equations that describes the self-consistent electromagnetic interaction between small metallic nanoparticles illuminated by lig

Re: [Rcpp-devel] RcppEigen now on CRAN

2011-06-27 Thread baptiste auguie
Hi, Another august piece work, thanks. As a happy user of Armadillo (guess what, this week my packages even passed win-builder! Yeah!) I have a general question: between (Rcpp), RcppGSL, RcppArmadillo, RcppEigen, we now have so much choice that it may be difficult to decide which framework to use

Re: [Rcpp-devel] package .onLoad multiple modules

2011-06-24 Thread baptiste auguie
Rcpp release, looking forward to that. Best regards, baptiste On 25 June 2011 05:45, Dirk Eddelbuettel wrote: > > On 24 June 2011 at 10:16, Davor Cubranic wrote: > | On June 23, 2011 08:16:59 PM baptiste auguie wrote: > | > - could we expect a CRAN release of Rcpp soon? (I am relyi

Re: [Rcpp-devel] package .onLoad multiple modules

2011-06-23 Thread baptiste auguie
Oops, please ignore the second request; it is documented in Rcpp-modules. Thanks, baptiste On 24 June 2011 15:16, baptiste auguie wrote: > Hi, > > I have a couple of follow-up questions re: this old thread: > > - could we expect a CRAN release of Rcpp soon? (I am relying on this

Re: [Rcpp-devel] package .onLoad multiple modules

2011-06-23 Thread baptiste auguie
Devices utils datasets grid methods base other attached packages: [1] cda_1.0 statmod_1.4.10 RcppArmadillo_0.2.23 Rcpp_0.9.4.2 ggplot2_0.8.9proto_0.3-9.2 [7] reshape_0.8.4plyr_1.5.2 On 1 June 2011 15:43, baptiste auguie wrote: > On 31 May 2011

Re: [Rcpp-devel] RcppArmadillo inv() depends on Lapack, zgetri_ not available on CRAN / R-forge?

2011-06-22 Thread baptiste auguie
On 8 June 2011 10:13, Douglas Bates wrote: > On Tue, Jun 7, 2011 at 4:20 PM, baptiste auguie > wrote: >> On 8 June 2011 09:04, Douglas Bates wrote: >>> On Tue, Jun 7, 2011 at 3:47 PM, baptiste auguie >>> wrote: >>>> On 8 June 2011 08:03, Douglas Bat

Re: [Rcpp-devel] RcppArmadillo inv() depends on Lapack, zgetri_ not available on CRAN / R-forge?

2011-06-07 Thread baptiste auguie
On 8 June 2011 10:13, Douglas Bates wrote: > On Tue, Jun 7, 2011 at 4:20 PM, baptiste auguie > wrote: >> On 8 June 2011 09:04, Douglas Bates wrote: >>> On Tue, Jun 7, 2011 at 3:47 PM, baptiste auguie >>> wrote: >>>> On 8 June 2011 08:03, Douglas Bates

Re: [Rcpp-devel] RcppArmadillo inv() depends on Lapack, zgetri_ not available on CRAN / R-forge?

2011-06-07 Thread baptiste auguie
On 8 June 2011 09:04, Douglas Bates wrote: > On Tue, Jun 7, 2011 at 3:47 PM, baptiste auguie > wrote: >> On 8 June 2011 08:03, Douglas Bates wrote: >>> On Tue, Jun 7, 2011 at 2:34 PM, baptiste auguie >>> wrote: >>>> Hi Doug, >>>> >>&

Re: [Rcpp-devel] RcppArmadillo inv() depends on Lapack, zgetri_ not available on CRAN / R-forge?

2011-06-07 Thread baptiste auguie
On 8 June 2011 08:03, Douglas Bates wrote: > On Tue, Jun 7, 2011 at 2:34 PM, baptiste auguie > wrote: >> Hi Doug, >> >> On 8 June 2011 03:43, Douglas Bates wrote: >>> >>> On Jun 6, 2011 4:17 AM, "baptiste auguie" >>> wrote: >&g

Re: [Rcpp-devel] RcppArmadillo inv() depends on Lapack, zgetri_ not available on CRAN / R-forge?

2011-06-07 Thread baptiste auguie
Hi Doug, On 8 June 2011 03:43, Douglas Bates wrote: > > On Jun 6, 2011 4:17 AM, "baptiste auguie" > wrote: >> >> Thank you for the explanations below. >> >> On 5 June 2011 10:40, Dirk Eddelbuettel wrote: >> > >> > On 5 June

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-06-06 Thread baptiste auguie
an updated version > (1.99.4).  Dirk has wrapped it up in RcppArmadillo 0.2.22, which > should be hitting the mirrors soon. > > Could you try your code again and let me know if you encounter any problems ? > > With regards, > Conrad > > > On 1 June 2011 05:58, baptiste augu

Re: [Rcpp-devel] RcppArmadillo inv() depends on Lapack, zgetri_ not available on CRAN / R-forge?

2011-06-06 Thread baptiste auguie
Thank you for the explanations below. On 5 June 2011 10:40, Dirk Eddelbuettel wrote: > > On 5 June 2011 at 10:12, baptiste auguie wrote: > | Hi Dirk and all, > | > | On 4 June 2011 12:04, Dirk Eddelbuettel wrote: > | > > | > Baptiste, > | > > | > On 4 Ju

Re: [Rcpp-devel] RcppArmadillo inv() depends on Lapack, zgetri_ not available on CRAN / R-forge?

2011-06-04 Thread baptiste auguie
Hi Dirk and all, On 4 June 2011 12:04, Dirk Eddelbuettel wrote: > > Baptiste, > > On 4 June 2011 at 11:45, baptiste auguie wrote: > | Dear list, > | > | My package cda, which I was hoping to release on CRAN, fails to > | compile on R-forge with error, > | > | ** te

[Rcpp-devel] RcppArmadillo inv() depends on Lapack, zgetri_ not available on CRAN / R-forge?

2011-06-03 Thread baptiste auguie
Dear list, My package cda, which I was hoping to release on CRAN, fails to compile on R-forge with error, ** testing if installed package can be loaded Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/tmp/RtmpbztUMm/Rinst1829c04c/cda/libs/cda.so': /tmp/RtmpbztU

Re: [Rcpp-devel] package .onLoad multiple modules

2011-05-31 Thread baptiste auguie
On 31 May 2011 23:19, wrote: > > Le 31 mai 2011 à 13:11, Christian Gunning a écrit : > >> On Tue, May 31, 2011 at 3:00 AM, >> wrote: >>> When FALSE it does what you want. Fantastic, thanks a lot. baptiste >> >> I can't begin to describe how long I've waited for such a function. >> -x > > :-)

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-31 Thread baptiste auguie
I recommend using the dot() and cdot() functions > -- they're generally faster than going through the multiplication > operator. > > > On 31 May 2011 11:39, Conrad Sand wrote: >> Hi Baptiste, >> >> Thanks for the bug report.  I'll take a look at the underlying issu

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-30 Thread baptiste auguie
ma::cx_colvec A = "(-1,-1) (+1,-1);", B = "(+0,1) (+0,-1);" ; arma::cx_colvec res = strans(A) * B; return wrap( res ) ; ', plugin = "RcppArmadillo" ) fx() ## 1-1i On 31 May 2011 11:42, baptiste auguie wrote: > After a couple h

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-30 Thread baptiste auguie
0-2i ## strans() with v0.2.21 fx <- cxxfunction( signature() , ' arma::cx_colvec A = " (-1,-1)(+1,-1) ;", B = "(+0,1) (+0,-1) ;" ; arma::cx_colvec res = strans(A) *B; return wrap( res ) ; ', plugin = "RcppArmadillo&quo

Re: [Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-30 Thread baptiste auguie
I was a bit optimistic yesterday; I have not yet been able to produce a minimal example but it seems trans/strans was not the end of the story in my code. Something else was broken with the change to 0.2.21.Thankfully the end results are very visibly wrong. Best regards, Baptiste On 31 May 2011

Re: [Rcpp-devel] package .onLoad multiple modules

2011-05-30 Thread baptiste auguie
Hi, On 31 May 2011 07:55, Romain Francois wrote: > Le 30/05/11 01:56, baptiste auguie a écrit : >> >> Thanks, that is helpful. I think I have nailed down the problem. >> >> I defined a wrapper at R level that used a C++ function from a module >> named "

Re: [Rcpp-devel] package .onLoad multiple modules

2011-05-29 Thread baptiste auguie
ddelbuettel wrote: > > On 30 May 2011 at 10:29, baptiste auguie wrote: > | Hi, > | > | On 30 May 2011 04:28, Dirk Eddelbuettel wrote: > | > > | > On 29 May 2011 at 18:56, baptiste auguie wrote: > | > | Dear list, > | > | > | > | [Disclaimer: I am not ver

Re: [Rcpp-devel] package .onLoad multiple modules

2011-05-29 Thread baptiste auguie
Hi, On 30 May 2011 04:28, Dirk Eddelbuettel wrote: > > On 29 May 2011 at 18:56, baptiste auguie wrote: > | Dear list, > | > | [Disclaimer: I am not very familiar with Rcpp/C++, and probably > | haven't followed all the relevant discussions on this list.] > | >

[Rcpp-devel] trans() changed in latest RcppArmadillo

2011-05-29 Thread baptiste auguie
Dear list, The latest RcppArmadillo broke some code that worked for me before, and produces erroneous results. I have just tracked down the origin of the problem to a change in the armadillo library: applying trans() to complex matrices now takes the complex conjugate as well as transposing. Using

[Rcpp-devel] package .onLoad multiple modules

2011-05-28 Thread baptiste auguie
Dear list, [Disclaimer: I am not very familiar with Rcpp/C++, and probably haven't followed all the relevant discussions on this list.] I'm trying to tidy up two packages on r-forge [*] before submitting them to CRAN. In "cda/zzz.r", I have the following code, NAMESPACE <- environment() cda <- n

Re: [Rcpp-devel] R.e. loadRcppModules

2011-05-25 Thread baptiste auguie
On 26 May 2011 10:30, Romain Francois wrote: > > I think R-ints has the answers to the questions I'm not asking myself yet. This ought to be a fortune()! baptiste ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.

Re: [Rcpp-devel] Favourite Rcpp examples?

2011-04-26 Thread baptiste auguie
On 27 April 2011 10:56, Dirk Eddelbuettel wrote: > > On 27 April 2011 at 10:29, baptiste auguie wrote: > | Would RcppArmadillo be OK? I have a couple of functions / packages > | using it with basic complex linear algebra calculations, together with > | the original, slower R

Re: [Rcpp-devel] Favourite Rcpp examples?

2011-04-26 Thread baptiste auguie
Hi, Would RcppArmadillo be OK? I have a couple of functions / packages using it with basic complex linear algebra calculations, together with the original, slower R implementation. Cheers, baptiste On 22 April 2011 04:15, Dirk Eddelbuettel wrote: > > Finishing up slides for next week's one-d

Re: [Rcpp-devel] Problem passing Armadillo objects back to R

2011-03-07 Thread baptiste auguie
Hi, I get the same incorrect results as Günter for both the and versions. Cheers, baptiste sessionInfo() R version 2.12.2 Patched (2011-03-02 r54645) Platform: i386-apple-darwin9.8.0/i386 (32-bit) locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets gr

Re: [Rcpp-devel] Release candidate (Was: Ancient Rcpp for OS X on CRAN)

2011-02-23 Thread baptiste auguie
On 23 February 2011 16:32, Dirk Eddelbuettel wrote: > > On 23 February 2011 at 09:27, ken.willi...@thomsonreuters.com wrote: > | > | > | On 2/23/11 8:05 AM, "Dirk Eddelbuettel" wrote: > | > | > > | >Thanks again to Simon, Ken and Baptiste for help yesterday. I have put a > | >release candidate he

Re: [Rcpp-devel] Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()]

2011-02-22 Thread baptiste auguie
Oops, just realised the silliness of my having renamed .badOSX a good one. Oh well, never mind that, I guess it's a matter of opinion ;) baptiste On 23 February 2011 01:08, baptiste auguie wrote: > R CMD check now successfully completes on my machine with > > .badOSX <-  !( Sy

Re: [Rcpp-devel] Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()]

2011-02-22 Thread baptiste auguie
R CMD check now successfully completes on my machine with .badOSX <- !( Sys.info()['sysname'] == "Darwin" && isTRUE(as.integer(gsub("\\..*","",Sys.info()['release'])) < 10L) ) if( Rcpp:::capabilities()[["Rcpp modules"]] && .badOSX ) { Cheers, baptiste On 23 February 2011 00:56, Simon Urbane

Re: [Rcpp-devel] Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()]

2011-02-22 Thread baptiste auguie
On 23 February 2011 00:28, Dirk Eddelbuettel wrote: > > +if( Rcpp:::capabilities()[["Rcpp modules"]] && ! .basOSX() ) { You probably meant, +if( Rcpp:::capabilities()[["Rcpp modules"]] && ! .badOSX() ) { (check in progress...) baptiste ___ Rcpp-devel

Re: [Rcpp-devel] Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()]

2011-02-22 Thread baptiste auguie
Hi, Out of curiosity I also ran a R CMD check on the CRAN version of Rcpp, and it failed on my machine (10.5): Running the tests in ‘tests/doRUnit.R’ failed. Error in eval.with.vis(expr, envir, enclos) : unit test problems: 0 failures, 1 errors Error in func() : object 'stdVector' not fo

Re: [Rcpp-devel] split the c++ code in several files

2010-09-16 Thread baptiste auguie
Thanks, spot on! On 16 September 2010 19:36, Romain Francois wrote: > Le 16/09/10 18:32, baptiste auguie a écrit : >> >> Hi, >> >> Thanks for the valuable information and advice. Some comments / questions >> below. >> >> On 16 September 2010 15:49, R

Re: [Rcpp-devel] split the c++ code in several files

2010-09-16 Thread baptiste auguie
Hi, Thanks for the valuable information and advice. Some comments / questions below. On 16 September 2010 15:49, Romain Francois wrote: > Le 16/09/10 15:24, baptiste auguie a écrit : >> >> Dear list, >> >> >> This is probably not specific to Rcpp but I couldn&#

[Rcpp-devel] split the c++ code in several files

2010-09-16 Thread baptiste auguie
Dear list, This is probably not specific to Rcpp but I couldn't find any advice in the R-exts manual. I am using RcppArmadillo in a package to do some linear algebra. The C++ code is getting a bit too large to manage in one file only, I would like to split its content in several files. It seems p

Re: [Rcpp-devel] r-forge error: undefined symbol: zgetri_

2010-08-21 Thread baptiste auguie
On 20 August 2010 22:33, Douglas Bates wrote: > On Fri, Aug 20, 2010 at 12:35 PM, baptiste auguie > wrote: >> Hi, >> >> On 20 August 2010 19:09, Romain Francois wrote: >>> Le 20/08/10 16:07, Dirk Eddelbuettel a écrit : >>>> >>>> On 20 A

Re: [Rcpp-devel] r-forge error: undefined symbol: zgetri_

2010-08-20 Thread baptiste auguie
Hi, On 20 August 2010 19:09, Romain Francois wrote: > Le 20/08/10 16:07, Dirk Eddelbuettel a écrit : >> >> On 20 August 2010 at 09:41, baptiste auguie wrote: >> | Indeed, I had forgotten to rerun roxygen before my last commit, sorry. >> | It should be OK now. >>

Re: [Rcpp-devel] r-forge error: undefined symbol: zgetri_

2010-08-20 Thread baptiste auguie
10 07:36, baptiste auguie a écrit : >> >> Hi, >> >> My Makevars contains the following line, >> >> ## Use the R_HOME indirection to support installations of multiple R >> version >> PKG_LIBS = $(shell $(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"

Re: [Rcpp-devel] r-forge error: undefined symbol: zgetri_

2010-08-19 Thread baptiste auguie
generated from package.skeleton, I don't remember. It's worked for me on two different machines (both Macs, though). Best regards, baptiste On 19 August 2010 23:50, Douglas Bates wrote: > On Thu, Aug 19, 2010 at 3:06 PM, baptiste auguie > wrote: >> Dear all, >> &

[Rcpp-devel] r-forge error: undefined symbol: zgetri_

2010-08-19 Thread baptiste auguie
Dear all, I'm stumped by this error for my cda package on r-forge: Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/tmp/Rinst2710053821/cda/libs/cda.so': /tmp/Rinst2710053821/cda/libs/cda.so: undefined symbol: zgetri_ https://r-forge.r-project.org/R/?group_id

Re: [Rcpp-devel] Multiplication of ComplexVector?

2010-08-17 Thread baptiste auguie
Hi, On 17 August 2010 10:04, Romain Francois wrote: > Le 17/08/10 10:00, baptiste auguie a écrit : >> >> On 17 August 2010 09:20, Romain Francois  wrote: >>> >>> Le 17/08/10 07:43, baptiste auguie a écrit : >>>> >>>> Hi, >

Re: [Rcpp-devel] Multiplication of ComplexVector?

2010-08-17 Thread baptiste auguie
On 17 August 2010 09:20, Romain Francois wrote: > Le 17/08/10 07:43, baptiste auguie a écrit : >> >> Hi, >> >> On 17 August 2010 03:24, Dirk Eddelbuettel  wrote: >>> >>> On 16 August 2010 at 19:43, Dirk Eddelbuettel wrote: >> >> [..

Re: [Rcpp-devel] Multiplication of ComplexVector?

2010-08-16 Thread baptiste auguie
Hi, On 17 August 2010 03:24, Dirk Eddelbuettel wrote: > > On 16 August 2010 at 19:43, Dirk Eddelbuettel wrote: [...] > The only trouble is that nobody has written the corresponding 'glue' code to > make > >      arma::cx_vec a1(y1.begin(), y1.size(), false); > > happen: create an Armadillo comp

Re: [Rcpp-devel] use of auxiliary functions

2010-08-14 Thread baptiste auguie
Thanks for the conclusive example :) baptiste On 12 August 2010 21:53, Dirk Eddelbuettel wrote: > > On 12 August 2010 at 20:59, baptiste auguie wrote: > | Point well taken, l'll try to use const and const& wherever appropriate. > > I am coming to this late (sorry, to

Re: [Rcpp-devel] use of auxiliary functions

2010-08-12 Thread baptiste auguie
ble with using references, it's just > another small bit of help from the compiler. > > Davor > > > On August 11, 2010 12:30:05 pm baptiste auguie wrote: >> I think I understand the principle, however with my best effort I >> cannot find a test case. Her

Re: [Rcpp-devel] use of auxiliary functions

2010-08-11 Thread baptiste auguie
avoid some of these unnecessary copies. Not sure borrow is the > right verb though. > > Also, the compiler might implicitely inline dum1 and dum2 because they are > so simple, so the performance might be the same, I'm not sure about that > though ... > > Romain > > > &

Re: [Rcpp-devel] use of auxiliary functions

2010-08-11 Thread baptiste auguie
: > On August 11, 2010 02:48:23 am rom...@r-enthusiasts.com wrote: >> Le 10 août 2010 à 22:10, baptiste auguie > a écrit : >> > OK, thanks. I have not been able to produce a minimal code that >> > would exhibit an improved performance using this >> > passing

Re: [Rcpp-devel] use of auxiliary functions

2010-08-10 Thread baptiste auguie
Hi, On 10 August 2010 07:51, Romain Francois wrote: > Le 10/08/10 07:35, baptiste auguie a écrit : >> >> I see –– thanks for the clarification (it is indeed what Dirk really >> had suggested, the accidental shortcut was mine). This passing by >> reference seems very

Re: [Rcpp-devel] use of auxiliary functions

2010-08-09 Thread baptiste auguie
again for the precious comments, baptiste PS: my package is now on r-forge, hoping to see if it compiles there too: https://r-forge.r-project.org/scm/viewvc.php/pkg/cda/?root=photonics On 10 August 2010 01:38, Davor Cubranic wrote: > On 2010-08-07, at 7:03 PM, baptiste auguie wr

Re: [Rcpp-devel] progress bar in for loop

2010-08-08 Thread baptiste auguie
(spaces) for ( ; ii < totaldotz;ii++) { printf(" "); } // and back to line begin - do not forget the fflush to avoid output buffering problems! printf("]\r"); fflush(stdout); } Sorry for the noise, baptiste On 8 August 2010 16:37, baptiste auguie

[Rcpp-devel] progress bar in for loop

2010-08-08 Thread baptiste auguie
Dear list, There's one feature that I miss after porting a for loop from R to C++ : the possibility to add a progress bar. I used to write, library(plyr) l_ply(seq(1,10), function(ii) Sys.sleep(0.2), .progress = "text") My naive attempt in C++ was unsuccessful, using namespace std; cout << "

Re: [Rcpp-devel] use of auxiliary functions

2010-08-07 Thread baptiste auguie
e net). All the best, baptiste On 8 August 2010 03:21, Davor Cubranic wrote: > On August 6, 2010 02:44:00 pm Douglas Bates wrote: >> On Fri, Aug 6, 2010 at 3:14 PM, baptiste auguie >> >> >  arma::mat euler(double phi, double theta, double psi) >> >  { >> >

[Rcpp-devel] use of auxiliary functions

2010-08-06 Thread baptiste auguie
Dear all, In a package using RcppArmadillo I define several functions that use the same piece of c++ code. For instance, several functions use a rotation matrix constructed from 3 angles. I am considering the following idea: 1) define a routine that performs the calculations; 2) create a wrapper i

Re: [Rcpp-devel] RcppArmadillo: passing complex matrices

2010-08-06 Thread baptiste auguie
Amazing, it works! thanks a lot, baptiste On 6 August 2010 17:47, wrote: > Hi, > > I cannot check this right now (being out) but i think you can just yse "as" : > > > arma::cx_mat B = Rcpp::as< arma::cx_mat >( beta ) ; > > where beta is your complex matrix from the R side. > > Romain > > Le 6 a

[Rcpp-devel] armadillo mailing list?

2010-07-29 Thread baptiste auguie
Dear all, I'm porting some R code to C++ using the armadillo framework (I'm using operations on complex matrices, etc.). The final goal is of course to wrap the code using RcppArmadillo. Currently, I'm still struggling with my little C++ knowledge. Does anyone know of an Armadillo mailing list whe

Re: [Rcpp-devel] RcppMAtrix ?

2010-04-27 Thread baptiste auguie
trices are real, not complex. but I believe simply >> replacing 'arma::mat' with 'arma::cx_mat' and 'NumericMatrix' with >> 'ComplexMatrix' will work for the complex case. >> >> Davor >> >> >> On April 22, 2010 01:22:

Re: [Rcpp-devel] RcppMAtrix ?

2010-04-22 Thread baptiste auguie
e. Thanks, baptiste On 22 April 2010 18:42, Romain Francois wrote: > Le 22/04/10 18:19, baptiste auguie a écrit : >> >> Thanks for the example, it is useful indeed. However, I am having >> difficulties with operations involving whole matrices, rather than >> matrix elemen

Re: [Rcpp-devel] RcppMAtrix ?

2010-04-22 Thread baptiste auguie
     im_sum += m(i,i).i ; >        } >        return List::create( >                _["sum real part"] = re_sum, >                _["sum imag part"] = im_sum >                ) ; > > ', Rcpp = TRUE, includes = "using namespace Rcpp;" ) > > x <- diag(

[Rcpp-devel] RcppMAtrix ?

2010-04-22 Thread baptiste auguie
Dear all, I'm hoping to port some R code to C++ to make it faster. The code makes heavy use of matrices of complex numbers, and playing with the RcppExamples package this morning I got the impression that it's not currently implemented in Rcpp. I basically took the example from classicRcppMatrixEx