[Rcpp-devel] On mailing list defaults, and suggested patch submission

Romain Francois romain at r-enthusiasts.com
Sat Aug 21 20:40:09 CEST 2010


Dominick,

I've commited a variation of your patch in Rcpp now. Let me know if that 
works for you.

I've put the new headers in inst/include/Rcpp/msvc instead of 
inst/include/msvc to lower chances of clashes with other software.

I've also modified msvcmath.cpp so that when this is not used in MSVC, 
there is some dummy symbol compiled, otherwise R CMD INSTALL complains. 
I'm surprised you did not see that when you tested it.

Not that I care, but I'm slightly surprised at the implementation of 
log1p :

double log1p(double x) {
     if(x <= -1.0)
	throw std::range_error("log1p: arg <= -1");
     if(fabs(x) > 1.e-4)
	return log(1.0 + x);
     return (-0.5*x + 1.0)*x;
}

specifically that it throws an exception

Romain

Le 20/08/10 17:38, Dominick Samperi a écrit :
> On Fri, Aug 20, 2010 at 2:27 AM, Romain Francois
> <romain at r-enthusiasts.com <mailto:romain at r-enthusiasts.com>> wrote:
>
>     I have not seen any of these files. But note that, as Dirk said
>     before, please send patches rather than full copy of modified files.
>
>      >From some directory of your modified Rcpp tree, just do :
>
>     $ svn diff > mypatch.diff
>
>     and send that file, that should be ok.
>
>     If you want to add files with this mechanism, you can. Just do
>
>     $ svn add whatever/file
>     $ svn diff > mypatch.diff
>
>     The only thing you cannot do is svn commit.
>
>
> The diff file msvc.patch.txt is attached, along with the three new .h
> files that
> should go into Rcpp/inst/include/msvc (or something else if you prefer).
>
> While I could 'svn add Rcpp/src/msvcmath.cpp' I could not do this
> for the .h files because the directory Rcpp/inst/include/msvc does not
> exist,
> and I couldn't create it.
>
> These changes will permit compilation with Visual C++. The warning level
> needs to be changed from the default to prevent a large number of
> warning messages. The main purpose would be to check that the
> C++ code is portable. If these changes are added you probably want to
> note that MSVC is not officially (or even unofficially) supported.
>
> On the tags/branches question, it appears that all projects on R-Forge are
> laid out without the usual tags and branches subdirectories.Is this due to
> restrictions at R-Forge? I guess the way to fetch files corresponding to
> a particular CRAN release is to get versions that were current at the
> time that the CRAN release happened, right?
>
> Thanks,
> Dominick

-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://bit.ly/bzoWrs : Rcpp svn revision 2000
|- http://bit.ly/b8VNE2 : Rcpp at LondonR, oct 5th
`- http://bit.ly/aAyra4 : highlight 0.2-2



More information about the Rcpp-devel mailing list