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

Pierre Lafaye de Micheaux lafaye at dms.umontreal.ca
Mon Jan 4 14:21:53 CET 2016

Dear Dirk,

I understand that you do not want to spend too much time on this.
And I thank you for the time you already spent fr this specific 
question, and also on others in the past.

As far as I am concerned, I was just trying, spending as less time as 
possible, to make two of my packages work (i.e., compile)
for Microsoft Windows (I work under Ubuntu or Debian). I found a (not 
clean) workaround to it using the RcppFaddeeva source files.
When I will have time (and I also have tons of other obligations), I 
will try to simplify my approach. But for now, it is working, so it 
satisfies me.
At this point, my time is better employed in developing the statistical 
tools and theory than on R/C technicalities.

My comment about reproducibility was not to mention a bug in Rcpp, which 
is really a great tool. It was more about the fact that I tried to make 
(parts of) my code as reusable as possible.
And I feel (with what I know about Rcpp now and how it can interact with 
R, or with what I know about .Call()) that this is possible in a simple 
way with .C().

Have a nice day and a happy new year.

Pierre L.

Le 04/01/2016 13:25, Dirk Eddelbuettel a écrit :
> Baptiste,
> You and I started RcppFaddeeva following this thread of yours on SO
>     http://stackoverflow.com/a/30677939/143305
> where you had basic troubles creating an R package.  So that got solved, and
> RcppFaddeeva is on CRAN etc.
> We never set it up to export headers. Doing so is trivial, but that is work
> at your end. I can't commit to this now due to other obligations. Minimally
> this involves simply creating inst/include/ to contain the headers, and
> telling your src/Makevars{,.win} about it via PKG_CXXFLAGS=-I../inst/include
> Then other packages can use LnkingTo: to get the headers.  Now, getting C(++)
> code that needs linking is another ball game but I also cover that in a few
> pairs of packages.  RApiSerialize and RcppRedis is one.
> If and when you (or Pierre) identify an actual reproducible bug in Rcpp.h let
> me know, and I'll take it on.  Otherwise I stay out of this. From what I can
> tell Pierre is simply stuck in ways that are discouraged but insists on them
> anyway.  Which is his choice, but it also not something I need to spend my
> time helping him on.
> Dirk

Pierre Lafaye de Micheaux

Adresse courrier:
Université de Montréal
Pavillon André-Aisenstadt
Département de Mathématiques et Statistique
CP 6128 Succursale Centre-ville
Montréal Qc H3C 3J7

Adresse physique:
Département de Mathématiques et Statistique
Bureau 4249, Pavillon André-Aisenstadt
2920, chemin de la Tour
Montréal, Québec H3T 1J4

Tél.: (00-1) 514-343-6607 / Fax: (00-1) 514-343-5700
lafaye at dms.umontreal.ca

More information about the Rcpp-devel mailing list