[Rcpp-commits] r1430 - in pkg/Rcpp/inst: doc doc/Rcpp-package skeleton

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jun 5 07:40:43 CEST 2010


Author: romain
Date: 2010-06-05 07:40:42 +0200 (Sat, 05 Jun 2010)
New Revision: 1430

Modified:
   pkg/Rcpp/inst/doc/Rcpp-modules.bib
   pkg/Rcpp/inst/doc/Rcpp-package/Rcpp-package.Rnw
   pkg/Rcpp/inst/skeleton/rcpp_hello_world.cpp
Log:
cosmetics

Modified: pkg/Rcpp/inst/doc/Rcpp-modules.bib
===================================================================
--- pkg/Rcpp/inst/doc/Rcpp-modules.bib	2010-06-05 05:17:05 UTC (rev 1429)
+++ pkg/Rcpp/inst/doc/Rcpp-modules.bib	2010-06-05 05:40:42 UTC (rev 1430)
@@ -25,7 +25,32 @@
   title = 	{Rcpp {R/C++} interface package},
   author = 	{Dirk Eddelbuettel and Romain Fran\c{c}ois},
   year = 	{2010},
-  note = 	{R package version 0.8.0},
+  note = 	{R package version 0.8.1},
   url = 	{http://CRAN.R-project.org/package=Rcpp}
 }
 
+ at Manual{CRAN:RcppExamples,
+  title = {RcppExamples: Examples using Rcpp to interface R and C++},
+  author = {Dirk Eddelbuettel and Romain Fran\c{c}ois},
+  year = {2010},
+  note = {R package version 0.1.1},
+  url = {http://CRAN.R-project.org/package=RcppExamples},
+}
+
+ at Manual{CRAN:highlight,
+  title = {highlight: Syntax highlighter},
+  author = {Romain Fran\c{c}ois},
+  year = {2010},
+  note = {R package version 0.2-1},
+  url = {http://romainfrancois.blog.free.fr/index.php?category/R-package/highlight},
+}
+
+ at Manual{CRAN:minqa,
+    title = {minqa: Derivative-free optimization algorithms by quadratic
+approximation},
+    author = {Douglas Bates and Katharine M. Mullen and John C. Nash and Ravi Varadhan},
+    year = {2010},
+    note = {R package version 1.1.5},
+    url = {http://CRAN.R-project.org/package=minqa},
+}
+

Modified: pkg/Rcpp/inst/doc/Rcpp-package/Rcpp-package.Rnw
===================================================================
--- pkg/Rcpp/inst/doc/Rcpp-package/Rcpp-package.Rnw	2010-06-05 05:17:05 UTC (rev 1429)
+++ pkg/Rcpp/inst/doc/Rcpp-package/Rcpp-package.Rnw	2010-06-05 05:40:42 UTC (rev 1430)
@@ -166,8 +166,19 @@
 
 \section{Examples}
 
-CRAN contains several packages that use \pkg{Rcpp} ... TODO
+The canonical example of a package that uses \pkg{Rcpp} is the \pkg{RcppExamples}
+\citep{CRAN:RcppExamples} package. 
+\pkg{RcppExamples} contains various examples of using \pkg{Rcpp}, through 
+both the current API and the older API. \pkg{RcppExamples} may be used as a model.
 
+Other CRAN packages connect to \pkg{Rcpp}, packages \pkg{highlight} 
+\citep{CRAN:highlight} and \pkg{minqa} \citep{CRAN:minqa} both follow
+precisely the guidelines of this document, while other packages follow
+older (but still supported and appropriate) instructions. The full list 
+of packages using \pkg{Rcpp} can be found at the
+\href{http://CRAN.R-project.org/package=Rcpp}{CRAN page} of \pkg{Rcpp}.
+
+
 \section{References}
 
 \bibliographystyle{abbrvnat}

Modified: pkg/Rcpp/inst/skeleton/rcpp_hello_world.cpp
===================================================================
--- pkg/Rcpp/inst/skeleton/rcpp_hello_world.cpp	2010-06-05 05:17:05 UTC (rev 1429)
+++ pkg/Rcpp/inst/skeleton/rcpp_hello_world.cpp	2010-06-05 05:40:42 UTC (rev 1430)
@@ -1,11 +1,11 @@
 #include "rcpp_hello_world.h"
 
 SEXP rcpp_hello_world(){
-	using namespace Rcpp ;
-	
-	CharacterVector x = CharacterVector::create( "foo", "bar" )  ;
-	NumericVector y   = NumericVector::create( 0.0, 1.0 ) ;
-	List z            = List::create( x, y ) ;
-	
-	return z ;
+    using namespace Rcpp ;
+    
+    CharacterVector x = CharacterVector::create( "foo", "bar" )  ;
+    NumericVector y   = NumericVector::create( 0.0, 1.0 ) ;
+    List z            = List::create( x, y ) ;
+    
+    return z ;
 }



More information about the Rcpp-commits mailing list