[Rinside-commits] r241 - in pkg: . inst inst/examples/standard inst/examples/wt

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Aug 11 02:36:49 CEST 2012


Author: edd
Date: 2012-08-11 02:36:49 +0200 (Sat, 11 Aug 2012)
New Revision: 241

Modified:
   pkg/ChangeLog
   pkg/DESCRIPTION
   pkg/cleanup
   pkg/inst/NEWS.Rd
   pkg/inst/examples/standard/rinside_sample12.cpp
   pkg/inst/examples/standard/rinside_sample4.cpp
   pkg/inst/examples/wt/Makefile
Log:
converted NEWS to NEWS.Rd, and updated
fixed typo in ChangeLog
extended cleanup to new examples/armadillo directory
minor cosmetic edits in sample_{12,4}
also remove old example in cleanup in wt


Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2012-08-11 00:24:09 UTC (rev 240)
+++ pkg/ChangeLog	2012-08-11 00:36:49 UTC (rev 241)
@@ -24,7 +24,7 @@
 2012-01-15  Dirk Eddelbuettel  <edd at debian.org>
 
 	* inst/examples/standard/cmake/CMakeLists.txt: Added patch by Peter
-	which add CMake build support on Windows
+	which adds CMake build support on Windows
 
 2012-01-11  Dirk Eddelbuettel  <edd at debian.org>
 

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2012-08-11 00:24:09 UTC (rev 240)
+++ pkg/DESCRIPTION	2012-08-11 00:36:49 UTC (rev 241)
@@ -1,9 +1,9 @@
 Package: RInside
 Title: C++ classes to embed R in C++ applications
-Version: 0.2.6
+Version: 0.2.6.1
 Date: $Date$
 Author: Dirk Eddelbuettel and Romain Francois
-Maintainer: Dirk Eddelbuettel and Romain Francois <RomainAndDirk at r-enthusiasts.com>
+Maintainer: Dirk Eddelbuettel <edd at debian.org>
 Description: C++ classes to embed R in C++ applications
  The RInside packages makes it easier to have 'R inside' your C++ application
  by providing a few wrapper classes.

Modified: pkg/cleanup
===================================================================
--- pkg/cleanup	2012-08-11 00:24:09 UTC (rev 240)
+++ pkg/cleanup	2012-08-11 00:36:49 UTC (rev 241)
@@ -7,4 +7,5 @@
 cd inst/examples/mpi && make clean && cd -
 cd inst/examples/qt && qmake && make clean && cd -
 cd inst/examples/wt && make clean && cd -
+cd inst/examples/armadillo && make clean && cd -
 

Modified: pkg/inst/NEWS.Rd
===================================================================
--- pkg/inst/NEWS.Rd	2012-08-11 00:24:09 UTC (rev 240)
+++ pkg/inst/NEWS.Rd	2012-08-11 00:36:49 UTC (rev 241)
@@ -1,146 +1,125 @@
-0.2.7   2012-xx-yy
+\name{NEWS}
+\title{News for Package 'RInside'}
+\newcommand{\cpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
 
-   o    Prettified the Wt example 'web application' with CSS use, also added
-        and XML file with simple headers and description text
-
-0.2.6   2012-01-11
-
-   o    Correct Windows initialization by not using Rprintf in internal
-        console writer, with thanks to both James Bates and John Brzustowski
-
-   o    Update RNG seeding (used by tmpnam et al) to same scheme used by
-        R since 2.14.0: blending both millisecond time and process id
-
-   o    Added CMake build support for all four example directories as kindly 
-   	provided by Peter Aberline; this helps when writing RInside code
-	inside of IDEs such as Eclipse, KDevelop or Code::Blocks
-
-   o    Small update to standard examples Makefile for Windows permitting 
-        to explicitly set i386 or x64 as a build architecture
-
-0.2.5   2011-12-07
-
-   o    Applied (somewhat simplified) patch by James Bates which restores
-        RInside to working on Windows -- with a big Thank You! to James for
-        fixing a long-standing bug we inadvertendly introduced right after
-        0.2.0 almost two years ago
-
-   o    New example embedding R inside a Wt (aka Webtoolkit, pronounced 
-        'witty') application, mirroring the previous Qt application
-
-   o    Qt example qtdensity now uses the new svg() device in base R; removed
-        test for cairoDevice package as well as fallback png code
-
-   o    Very minor fix to qmake.pro file for Qt app correcting link order
-
-0.2.4   2011-04-24
-
-   o    Minor code cleanups in initialization code 
-
-   o    New example embedding R inside a Qt application, along with pro file
-        for Qt's qmake providing a complete simple C++ GUI application
-
-   o    New examples rinside_sample{10,11} based on questions on the
-        r-help and r-devel mailing list
-
-   o    Some improvements and simplifications throughout examples/standard 
-        as well as examples/mpi/
-
-   o    Added this NEWS files -- with entries below summarised from ChangeLog
-        and the corresponding blog posts
-
-0.2.3   2010-08-06
-
-   o    New example rinside_sample9 on how to expose C++ to embedded R
-
-   o    New example rinside_module_sample0 to show module access from RInside
-
-   o    Simplified rinside_sample3 and rinside_sample4
-
-   o    Some code cleanup to help Solaris builds
-
-   o    Implicit use of new Proxy class with operator T(), see rinside_sample8
-
-0.2.2   2010-03-22
-
-   o    New operator[](string) lets RInside act as proxy to R's global
-        environment so that we can R["x"] = 10 to assign; all the actual
- 	work is done by Rcpp::Environment
-
-   o    No longer ship doxygen-generated docs in build
-
-   o    Use std::string for all arguments inside throw() to help Windows build
-
-   o    Default to static linking on OS X and Windows just like Rcpp does
-  
-   o    parseEval() now returns SEXP and has just a string argument for more
-        functional use; it and void sibbling parseEvalQ() now throw exections
-
-   o    rinside_sample{2,4,5} updated accordingly
-
-   o    Two new 'R inside an MPI app' examples contributed by Jianping Hua
-
-   o    Also added two C++ variants of the C examples for RInside and MPI
-
-   o    rinside_sample8 updated with parseEval changes   
-
-   o    Internal MemBuf class simplified via STL std::string
-
-   o    Autoload simplied via the new Rcpp API
-
-   o    Added default constructor for RInside
-
-   o    Retire assign(vector<vector<double> >) via template specialisation
-
-   o    Include Rcpp.h; switch to Rf_ prefixed R API to avoid Redefine macros
-
-   o    Windows version currently segfaults on startup
-
-0.2.1	2010-01-06
-
-   o    Startup now defaults to FALSE, no longer call Rf_KillAllDevices
-
-   o    Some minor build and code fixes for Windows
-
-0.2.0   2009-12-20
-
-   o    Initial Windows support, with thanks to Richard Holbrey for both the
-        initial push and a setenv() implementation
-
-   o    Added Makefile.win for build with the MinGW toolchain to src/ and examples/
-
-   o    Some improvements to destructor per example in Writing R Extensions
-
-   o    New rinside_sample5 based on r-devel post
-
-0.1.1   2009-02-19
-
-   o    The examples/ Makefile now sets $R_HOME via 'R RHOME', and also employs
-        $R_ARCH for arch-dependent headers -- with thanks for Jeff, Jan and Simon
-
-   o 	Added THANKS file to give recognition to those who helped RInside along
-
-   o 	Added rinside_sample4 as another example based on an r-devel question
-
-0.1.0   2009-02-19
-
-   o 	Initial CRAN release
-
-   o 	Improved build process
-
-   o 	Added doxygen generated documentation
-
-   o 	Added two more example
-
-0.0.1   2009-07-19
-
-   o 	Corrected error in memory buffer class with thanks to Miguel Lechón for
-        a finding the issue and sending a patch
-
-   o 	Added two regression test examples to demonstrate bug and fix
-
-   o 	Minor code cleanups
-
-0.0.1   2009-02-10
-
-   o 	Initial version in SVN at R-Forge
+\section{Changes in RInside version 0.2.7 (2012-08-12)}{
+  \itemize{
+    \item New fifth examples subdirectory 'armadillo' with two new
+    examples showing how to combine \cpkg{RInside} with \cpkg{RcppArmadillo}
+    \item Prettified the Wt example 'web application' with CSS use, also added
+    and XML file with simple headers and description text
+    \item New example rinside_sample12 motivated by StackOverflow
+    question on using \code{sample()} from C
+    \item Added CMake build support on Windows for the examples
+  }
+}
+\section{Changes in RInside version 0.2.6 (2012-01-11)}{
+  \itemize{
+    \item Correct Windows initialization by not using Rprintf in internal
+    console writer, with thanks to both James Bates and John Brzustowski
+    \item Update RNG seeding (used by tmpnam et al) to same scheme used by
+    R since 2.14.0: blending both millisecond time and process id
+    \item Added CMake build support for all four example directories as kindly 
+    provided by Peter Aberline; this helps when writing RInside code
+    inside of IDEs such as Eclipse, KDevelop or Code::Blocks
+    \item Small update to standard examples Makefile for Windows permitting 
+    to explicitly set i386 or x64 as a build architecture
+  }
+}
+\section{Changes in RInside version 0.2.5 (2011-12-07)}{
+  \itemize{
+    \item Applied (somewhat simplified) patch by James Bates which restores
+    RInside to working on Windows -- with a big Thank You! to James for
+    fixing a long-standing bug we inadvertendly introduced right after
+    0.2.0 almost two years ago
+    \item New example embedding R inside a Wt (aka Webtoolkit, pronounced 
+    'witty') application, mirroring the previous Qt application
+    \item Qt example qtdensity now uses the new svg() device in base R; removed
+    test for cairoDevice package as well as fallback png code
+    \item Very minor fix to qmake.pro file for Qt app correcting link order
+  }
+}
+\section{Changes in RInside version 0.2.4 (2011-04-24)}{
+  \itemize{
+    \item Minor code cleanups in initialization code 
+    \item New example embedding R inside a Qt application, along with pro file
+    for Qt's qmake providing a complete simple C++ GUI application
+    \item New examples rinside_sample\{10,11\} based on questions on the
+    r-help and r-devel mailing list
+    \item Some improvements and simplifications throughout examples/standard 
+    as well as examples/mpi/
+    \item Added this NEWS files -- with entries below summarised from ChangeLog
+    and the corresponding blog posts
+  }
+}
+\section{Changes in RInside version 0.2.3 (2010-08-06)}{
+  \itemize{
+    \item New example rinside_sample9 on how to expose C++ to embedded R
+    \item New example rinside_module_sample0 to show module access from RInside
+    \item Simplified rinside_sample3 and rinside_sample4
+    \item Some code cleanup to help Solaris builds
+    \item Implicit use of new Proxy class with operator T(), see rinside_sample8
+  }
+}
+\section{Changes in RInside version 0.2.2 (2010-03-22)}{
+  \itemize{
+    \item New operator[](string) lets RInside act as proxy to R's global
+    environment so that we can R["x"] = 10 to assign; all the actual
+    work is done by Rcpp::Environment
+    \item No longer ship doxygen-generated docs in build
+    \item Use std::string for all arguments inside throw() to help Windows build
+    \item Default to static linking on OS X and Windows just like Rcpp does
+    \item parseEval() now returns SEXP and has just a string argument for more
+    functional use; it and void sibbling parseEvalQ() now throw exections
+    \item rinside_sample\{2,4,5\} updated accordingly
+    \item Two new 'R inside an MPI app' examples contributed by Jianping Hua
+    \item Also added two C++ variants of the C examples for RInside and MPI
+    \item rinside_sample8 updated with parseEval changes   
+    \item Internal MemBuf class simplified via STL std::string
+    \item Autoload simplied via the new Rcpp API
+    \item Added default constructor for RInside
+    \item Retire assign(vector<vector<double> >) via template specialisation
+    \item Include Rcpp.h; switch to Rf_ prefixed R API to avoid Redefine macros
+    \item Windows version currently segfaults on startup
+  }
+}
+\section{Changes in RInside version 0.2.1 (2010-01-06)}{
+  \itemize{
+    \item Startup now defaults to FALSE, no longer call Rf_KillAllDevices
+    \item Some minor build and code fixes for Windows
+  }
+}
+\section{Changes in RInside version 0.2.0 (2009-12-20)}{
+  \itemize{
+    \item Initial Windows support, with thanks to Richard Holbrey for both the
+    initial push and a setenv() implementation
+    \item Added Makefile.win for build with the MinGW toolchain to src/ and examples/
+    \item Some improvements to destructor per example in Writing R Extensions
+    \item New rinside_sample5 based on r-devel post
+  }
+}
+\section{Changes in RInside version 0.1.1 (2009-02-19)}{
+  \itemize{
+    \item The examples/ Makefile now sets $R_HOME via 'R RHOME', and also employs
+    $R_ARCH for arch-dependent headers -- with thanks for Jeff, Jan and Simon
+    \item Added THANKS file to give recognition to those who helped RInside along
+    \item Added rinside_sample4 as another example based on an r-devel question
+  }
+}
+\section{Changes in RInside version 0.1.0 (2009-02-19)}{
+  \itemize{
+    \item Initial CRAN release
+    \item Improved build process
+    \item Added doxygen generated documentation
+    \item Added two more example
+  }
+}
+\section{Changes in RInside version 0.0.1 (2009-07-19)}{
+  \itemize{
+    \item Corrected error in memory buffer class with thanks to Miguel Lechón for
+    a finding the issue and sending a patch
+    \item Added two regression test examples to demonstrate bug and fix
+    \item Minor code cleanups
+    \item Initial version in SVN at R-Forge
+  }
+}
\ No newline at end of file

Modified: pkg/inst/examples/standard/rinside_sample12.cpp
===================================================================
--- pkg/inst/examples/standard/rinside_sample12.cpp	2012-08-11 00:24:09 UTC (rev 240)
+++ pkg/inst/examples/standard/rinside_sample12.cpp	2012-08-11 00:36:49 UTC (rev 241)
@@ -1,4 +1,4 @@
-// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4;  tab-width: 8; -*-
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
 //
 // Simple example motivated by StackOverflow question on using sample() from C
 //

Modified: pkg/inst/examples/standard/rinside_sample4.cpp
===================================================================
--- pkg/inst/examples/standard/rinside_sample4.cpp	2012-08-11 00:24:09 UTC (rev 240)
+++ pkg/inst/examples/standard/rinside_sample4.cpp	2012-08-11 00:36:49 UTC (rev 241)
@@ -1,4 +1,4 @@
-// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4;  tab-width: 4; -*-
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
 //
 // Another simple example inspired by an r-devel mail by Abhijit Bera
 //
@@ -13,30 +13,30 @@
     try {
         RInside R(argc, argv);          // create an embedded R instance 
 
-	std::string txt = 
-	    "suppressMessages(library(fPortfolio)); "
-	    "lppData <- 100 * LPP2005.RET[, 1:6]; "
+        std::string txt = 
+            "suppressMessages(library(fPortfolio)); "
+            "lppData <- 100 * LPP2005.RET[, 1:6]; "
             "ewSpec <- portfolioSpec(); " 
             "nAssets <- ncol(lppData); ";
-        R.parseEvalQ(txt);          	// prepare problem
+        R.parseEvalQ(txt);              // prepare problem
         
         const double dvec[6] = { 0.1, 0.1, 0.1, 0.1, 0.3, 0.3 }; // choose any weights
         const std::vector<double> w(dvec, &dvec[6]);
-        R["weightsvec"] = w; 	 	// assign weights
+        R["weightsvec"] = w;            // assign weights
         txt = "setWeights(ewSpec) <- weightsvec";
         R.parseEvalQ(txt);              // evaluate assignment
 
         txt = 
-	    "ewPf <- feasiblePortfolio(data=lppData, spec=ewSpec, constraints=\"LongOnly\");"
+            "ewPf <- feasiblePortfolio(data=lppData, spec=ewSpec, constraints=\"LongOnly\");"
             "print(ewPf); "
             "vec <- getCovRiskBudgets(ewPf at portfolio)";
         Rcpp::NumericVector   V(     (SEXP) R.parseEval(txt) ); 
         Rcpp::CharacterVector names( (SEXP) R.parseEval("names(vec)"));   
 
-	std::cout << "\n\nAnd now from C++\n\n";
+        std::cout << "\n\nAnd now from C++\n\n";
         for (int i=0; i<names.size(); i++) {
-          std::cout << std::setw(16) << names[i] << "\t"
-                    << std::setw(11) << V[i] << "\n";
+            std::cout << std::setw(16) << names[i] << "\t"
+                      << std::setw(11) << V[i] << "\n";
         }
         
     } catch(std::exception& ex) {

Modified: pkg/inst/examples/wt/Makefile
===================================================================
--- pkg/inst/examples/wt/Makefile	2012-08-11 00:24:09 UTC (rev 240)
+++ pkg/inst/examples/wt/Makefile	2012-08-11 00:36:49 UTC (rev 241)
@@ -59,4 +59,4 @@
 			./$< --docroot "." --http-addr 127.0.0.1 --http-port 8081
 
 clean:
-			rm -f wtdensity resources
+			rm -f wtdensity wtdensityPlain resources



More information about the Rinside-commits mailing list