[Rcpp-commits] r1879 - in pkg/RcppExamples: . inst src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 28 23:41:14 CEST 2010


Author: edd
Date: 2010-07-28 23:41:14 +0200 (Wed, 28 Jul 2010)
New Revision: 1879

Modified:
   pkg/RcppExamples/DESCRIPTION
   pkg/RcppExamples/inst/ChangeLog
   pkg/RcppExamples/src/Makevars
   pkg/RcppExamples/src/RcppMatrixExample.cpp
Log:
a small first update of the package:
 -- uses LinkingTom
 -- which simplifies Makevars (and Makevars.win was already fixed it seems)
 -- use ::sqrt() to pick the top-level sqrt


Modified: pkg/RcppExamples/DESCRIPTION
===================================================================
--- pkg/RcppExamples/DESCRIPTION	2010-07-28 21:30:11 UTC (rev 1878)
+++ pkg/RcppExamples/DESCRIPTION	2010-07-28 21:41:14 UTC (rev 1879)
@@ -1,6 +1,6 @@
 Package: RcppExamples
 Title: Examples using Rcpp to interface R and C++ 
-Version: 0.1.1
+Version: 0.1.2
 Date: $Date$
 Author: Dirk Eddelbuettel and Romain Francois, based on code written 
  during 2005 and 2006 by Dominick Samperi 
@@ -8,7 +8,11 @@
 Description: Examples for Seamless R and C++ integration
  The Rcpp package contains a C++ library that facilitates the integration of
  R and C++ in various ways. This package provides examples.
-Depends: R (>= 2.10.0), Rcpp (>= 0.8.0)
+ .
+ Note that the documentation in this package currently does not all the
+ features in the package.
+Depends: R (>= 2.11.0), Rcpp (>= 0.8.4)
+LinkingTo: 
 Suggests: RUnit 
 SystemRequirements: GNU make
 LinkingTo: Rcpp

Modified: pkg/RcppExamples/inst/ChangeLog
===================================================================
--- pkg/RcppExamples/inst/ChangeLog	2010-07-28 21:30:11 UTC (rev 1878)
+++ pkg/RcppExamples/inst/ChangeLog	2010-07-28 21:41:14 UTC (rev 1879)
@@ -1,3 +1,10 @@
+2010-07-28  Dirk Eddelbuettel  <edd at debian.org>
+
+	* DESCRIPTION: Use LinkingTo: Rcpp
+	* DESCRIPTION: Update Depends: on R and Rcpp to newer version
+
+	* src/Makevars: Simplified thanks to 'LinkingTo: Rcpp'
+
 2010-05-25  Romain Francois <romain at r-enthusiasts.com>
 
 	* src/*.cpp: use BEGIN_RCPP/END_RCPP in new api examples and use

Modified: pkg/RcppExamples/src/Makevars
===================================================================
--- pkg/RcppExamples/src/Makevars	2010-07-28 21:30:11 UTC (rev 1878)
+++ pkg/RcppExamples/src/Makevars	2010-07-28 21:41:14 UTC (rev 1879)
@@ -2,22 +2,20 @@
 ##
 ## Use the R_HOME indirection to support installations of multiple R version
 PKG_LIBS = $(shell $(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()" )
+
 ## Uncomment this if you want to use C++0x features -- which are not currently portable
 ## CLINK_CPPFLAGS=$(shell Rscript -e "Rcpp:::Cxx0xFlags()" )
 
 ## As an alternative, one can also add this code in a file 'configure'
 ##
-##    PKG_CPPFLAGS=`${R_HOME}/bin/Rscript -e "Rcpp:::CxxFlags()"`
 ##    PKG_LIBS=`${R_HOME}/bin/Rscript -e "Rcpp:::LdFlags()"`
 ## 
 ##    sed -e "s|@PKG_LIBS@|${PKG_LIBS}|" \
-##        -e "s|@PKG_CPPFLAGS@|${PKG_CPPFLAGS}|" \
 ##        src/Makevars.in > src/Makevars
 ## 
 ## which together with the following file 'src/Makevars.in'
 ##
 ##    PKG_LIBS = @PKG_LIBS@
-##    PKG_CPPFLAGS = @PKG_CPPFLAGS@
 ##
 ## can be used to create src/Makevars dynamically. This scheme is more
 ## powerful and can be expanded to also check for and link with other

Modified: pkg/RcppExamples/src/RcppMatrixExample.cpp
===================================================================
--- pkg/RcppExamples/src/RcppMatrixExample.cpp	2010-07-28 21:30:11 UTC (rev 1878)
+++ pkg/RcppExamples/src/RcppMatrixExample.cpp	2010-07-28 21:41:14 UTC (rev 1879)
@@ -34,7 +34,7 @@
     //   int n = mat.nrow(), k=mat.ncol();
     // and loop over the elements, but using the STL is so much nicer
     // so we use a STL transform() algorithm on each element
-    std::transform(orig.begin(), orig.end(), mat.begin(), std::sqrt);
+    std::transform(orig.begin(), orig.end(), mat.begin(), ::sqrt);
 
     return Rcpp::List::create( 
     	Rcpp::Named( "result" ) = mat, 



More information about the Rcpp-commits mailing list