[Rcpp-commits] r4258 - pkg/RcppEigen/vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Feb 18 17:23:16 CET 2013


Author: edd
Date: 2013-02-18 17:23:16 +0100 (Mon, 18 Feb 2013)
New Revision: 4258

Added:
   pkg/RcppEigen/vignettes/jss.bst
Removed:
   pkg/RcppEigen/vignettes/Rcpp.bib
Modified:
   pkg/RcppEigen/vignettes/RcppEigen-Introduction.Rnw
Log:
Updated vignette to version in JSS, with proper short intro referencing paper and citation hint
Removing Rcpp.bib as we now use an Sweave trick to use the Rcpp.bib which ships with Rcpp (and one currently needs the SVN version)


Deleted: pkg/RcppEigen/vignettes/Rcpp.bib
===================================================================
--- pkg/RcppEigen/vignettes/Rcpp.bib	2013-02-18 07:55:23 UTC (rev 4257)
+++ pkg/RcppEigen/vignettes/Rcpp.bib	2013-02-18 16:23:16 UTC (rev 4258)
@@ -1,492 +0,0 @@
- at String{CRAN = "http://CRAN.R-Project.org/" }
- at String{manuals = CRAN # "doc/manuals/" }
- at String{RCoreTeam = "{R Development Core Team}" }
- at String{RFoundation = "R Foundation for Statistical Computing" }
- at String{R-Forge = "http://R-Forge.R-Project.org/" }
-
- at Misc{cpp11,
-  author =       "ISO/IEC",
-  organization = "{International Organization for Standardization}",
-  title =        "\proglang{C++} 2011 Standard Document 14882:2011",
-  howpublished = {ISO/IEC Standard Group for Information Technology / Programming Languages / C++},
-  year =         2011,
-  url =         "http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372",
-  urlansi =     "http://webstore.ansi.org/RecordDetail.aspx?sku=ISO/IEC%2014882:2011"
-}
-
- at manual{Abrahams+Grosse-Kunstleve:2003:Boost.Python,
-  author =	 { David Abrahams and Ralf W. Grosse-Kunstleve },
-  organization = "Boost Consulting",
-  title =	 "Building Hybrid Systems with Boost.Python",
-  year =	 2003,
-  url =		 "http://www.boostpro.com/writing/bpl.pdf"
-}
-
- at Book{Abrahams+Gurtovoy:2004:TemplateMetaprogramming,
-  author =	 {David Abrahams and Aleksey Gurtovoy},
-  title =	 {\proglang{C++} {T}emplate {M}etaprogramming: Concepts, Tools
-                  and Techniques from {B}oost and Beyond},
-  publisher =	 {Addison-Wesley},
-  year =	 2004,
-  address =	 {Boston}
-}
-
- at Manual{Armstrong:2009:RAbstraction,
-  title =	 {\pkg{RAbstraction}: \proglang{C++} abstraction for \proglang{R} objects},
-  author =	 {Whit Armstrong},
-  year =	 2009,
-  note =	 {Code repository last updated 2009-07-22.},
-  url =		 {http://github.com/armstrtw/rabstraction}
-}
-
- at Manual{Armstrong:2009:RObjects,
-  title =	 {\pkg{RObjects}: \proglang{C++} wrapper for \proglang{R} objects (a better
-                  implementation of {RAbstraction}},
-  author =	 {Whit Armstrong},
-  year =	 2009,
-  note =	 {Code repository last updated 2009-11-28.},
-  url =		 {http://github.com/armstrtw/RObjects}
-}
-
- at InProceedings{Bates+DebRoy:2001:C++Classes,
-  author =	 {Douglas M. Bates and Saikat DebRoy},
-  title =	 {\proglang{C++} Classes for \proglang{R} Objects},
-  booktitle =    {Proceedings of the 2nd International Workshop on Distributed
-                  Statistical Computing, March 15--17, 2001, Technische
-		  Universit\"at Wien, Vienna, Austria},
-  editor =       {Kurt Hornik and Friedrich Leisch},
-  year =         {2001},
-  url =          {http://www.ci.tuwien.ac.at/Conferences/DSC-2001/Proceedings/},
-  note =         {ISSN 1609-395X}
-}
-
-
- at Misc{Brokken:2011:Cpp,
-  author = 	 {Frank B. Brokken},
-  title = 	 {\proglang{C++} Annotations},
-  howpublished = {Electronic book, University of Groningen},
-  year = 	 2012,
-  note =         {version 9.4.0},
-  url =          {http://www.icce.rug.nl/documents/cplusplus/}
-}
-
- at Book{Chambers:2008:SoDA,
-  author = 	 {John M. Chambers},
-  title = 	 {Software for Data Analysis: Programming with \proglang{R}},
-  publisher = 	 {Springer-Verlag},
-  year = 	 2008,
-  series = 	 {Statistics and Computing},
-  address = 	 {Heidelberg},
-  note = 	 {{ISBN} 978-0-387-75935-7}
-}
-
- at Manual{CRAN:RInside,
-  title =	 {\pkg{RInside}: \proglang{C++} classes to embed \proglang{R} in \proglang{C++} applications},
-  author =	 {Dirk Eddelbuettel and Romain Fran\c{c}ois},
-  year =	 2012,
-  note =	 {R package version 0.2.8},
-  url =		 CRAN # "package=RInside"
-}
-
- at Manual{CRAN:RProtoBuf,
-  title =	 {\pkg{RProtoBuf}: \proglang{R} Interface to the Protocol Buffers API},
-  author =	 {Romain Fran\c{c}ois and Dirk Eddelbuettel},
-  year =	 2012,
-  note =	 {R package version 0.2.5},
-  url =		 CRAN # "package=RProtoBuf"
-}
-
- at Manual{CRAN:RQuantLib,
-  title =	 {\pkg{RQuantLib}: \proglang{R} interface to the {QuantLib} library},
-  author =	 {Dirk Eddelbuettel and Khanh Nguyen},
-  year =	 2011,
-  note =	 {R package version 0.3.8},
-  url =		 CRAN # "package=RQuantLib"
-}
-
- at Article{JSS:Rcpp,
-  title =	 {\pkg{Rcpp}: Seamless \proglang{R} and \proglang{C++} Integration},
-  author =	 {Dirk Eddelbuettel and Romain Fran\c{c}ois},
-  journal =	 {Journal of Statistical Software},
-  year =	 2011,
-  volume =	 40,
-  number =	 8,
-  pages =	 {1--18},
-  url =		 {http://www.jstatsoft.org/v40/i08/},
-}
-
- at Manual{CRAN:Rcpp,
-  title =	 {\pkg{Rcpp}: Seamless \proglang{R} and \proglang{C++} Integration},
-  author =	 {Dirk Eddelbuettel and Romain Fran\c{c}ois},
-  year =	 2012,
-  note =	 {R package version 0.9.13},
-  url =		 CRAN # "package=Rcpp"
-}
-
- at Manual{CRAN:RcppArmadillo,
-  title =	 {\pkg{RcppArmadillo}: \pkg{Rcpp} integration for Armadillo
-                  templated linear algebra library},
-  author =	 {Romain Fran\c{c}ois and Dirk Eddelbuettel and
-                  Douglas Bates},
-  year =	 2012,
-  note =	 {R package version 0.3.2.4},
-  url =		 CRAN # "package=RcppArmadillo"
-}
-
- at Manual{CRAN:RcppClassic,
-  title =	 {\pkg{RcppClassic}: Deprecated 'classic' \pkg{Rcpp} API},
-  author =	 {Dirk Eddelbuettel and Romain Fran\c{c}ois},
-  year =	 2012,
-  note =	 {R package version 0.9.2},
-  url =		 CRAN # "package=RcppClassic"
-}
-
- at Manual{CRAN:RcppDE,
-  title =	 {\pkg{RcppDE}: Global optimization by differential evolution in \proglang{C++}},
-  author =	 {Dirk Eddelbuettel},
-  year =	 2012,
-  note =	 {R package version 0.1.1},
-  url =		 CRAN # "package=RcppDE"
-}
-
- at Manual{CRAN:RcppExamples,
-  title =	 {\pkg{RcppExamples}: Examples using \pkg{Rcpp} to interface \proglang{R}
-                  and \proglang{C++}},
-  author =	 {Dirk Eddelbuettel and Romain Fran\c{c}ois},
-  year =	 2012,
-  note =	 {R package version 0.1.2},
-  url =		 CRAN # "package=RcppExamples"
-}
-
- at Manual{CRAN:RcppGSL,
-  title =	 {\pkg{RcppGSL}: \pkg{Rcpp} integration for GNU GSL vectors and matrices},
-  author = 	 {Romain Fran\c{c}ois and Dirk Eddelbuettel},
-  year =	 2012,
-  note =	 {R package version 0.2.0},
-  url =		 CRAN # "package=RcppGSL"
-}
-
- at Manual{CRAN:Rserve,
-  title =	 {\pkg{Rserve}: Binary R server},
-  author =	 {Simon Urbanek},
-  year =	 2012,
-  note =	 {R package version 0.6-8},
-  url =		 CRAN # "package=Rserve"
-}
-
- at Manual{CRAN:cxxPack,
-  title =	 {\pkg{cxxpack}: \proglang{R}/\proglang{C++} Tools for Literate Statistical
-                  Practice},
-  author =	 {Dominick Samperi},
-  year =	 2010,
-  note =	 {R package version 7.0.6, now removed from the archive},
-  url =		 CRAN # "package=cxxPack"
-}
-
- at Manual{CRAN:highlight,
-  title =	 {\pkg{highlight}: Syntax highlighter},
-  author =	 {Romain Fran\c{c}ois},
-  year =	 2012,
-  note =	 {R package version 0.3.2},
-  url =		 CRAN # "package=highlight"
-}
-
- at Manual{CRAN:inline,
-  title =	 {\pkg{inline}: Inline \proglang{C}, \proglang{C++},
-                  \proglang{Fortran} function calls from \proglang{R}},
-  author =	 {Oleg Sklyar and Duncan Murdoch and Mike Smith and
-                  Dirk Eddelbuettel and Romain Fran\c{c}ois},
-  year =	 2010,
-  note =	 {R package version 0.3.8},
-  url =		 CRAN # "package=inline"
-}
-
- at Manual{CRAN:Matrix,
-  title =	 {\pkg{Matrix}: Sparse and Dense Matrix Classes and Methods},
-  author =	 {Douglas Bates and Martin Maechler},
-  year =	 2012,
-  note =	 {R package version 1.0-9},
-  url =		 CRAN # "package=Matrix"
-}
-
- at Manual{CRAN:minqa,
-  title =	 {\pkg{minqa}: Derivative-free optimization algorithms by
-                  quadratic approximation},
-  author =	 {Douglas Bates and Katharine M. Mullen and John
-                  C. Nash and Ravi Varadhan},
-  year =	 2012,
-  note =	 {R package version 1.2.1},
-  url =		 CRAN # "package=minqa"
-}
-
- at Manual{CRAN:rbenchmark,
-  title =	 {\pkg{rbenchmark}: Benchmarking routine for \proglang{R}},
-  author =	 {Wacek Kusnierczyk},
-  year =	 2012,
-  note =	 {R package version 1.0.0},
-  url =		 CRAN # "package=rbenchmark"
-}
-
-; see http://eigen.tuxfamily.org/index.php?title=BibTeX
-; replaced 'howpublished' with 'url' and updated year to 2011, and again to 2012
- at MISC{Eigen:Web,
-  author =	 {Ga\"{e}l Guennebaud and Beno\^{i}t Jacob and others},
-  title =	 {Eigen v3},
-  year =	 2012,
-  url =		 {http://eigen.tuxfamily.org},
-}
-
- at Article{Gropp+Lusk+Doss+Skjellum:1996:MPI,
-  author = 	 {William Gropp and Ewing Lusk and Nathan Doss and Anthony Skjellum},
-  title = 	 {A high-performance, portable implementation of the {MPI} message passing interface standard},
-  journal = 	 {Parallel Computing},
-  year = 	 1996,
-  url =          {http://dx.doi.org/10.1016/0167-8191(96)00024-5},
-  volume = 	 22,
-  number = 	 6,
-  pages = 	 {789--828}
-}
-
- at Book{Gropp+Lusk+Skjellum:1999:MPI,
-  author = 	 {William Gropp and Ewing Lusk and Anthony Skjellum},
-  title = 	 {Using {MPI}: Portable Parallel Programming with the Message Passing Interface},
-  publisher = 	 {MIT Press},
-  year = 	 1999,
-  series = 	 {Scientific and Engineering Computation Series},
-  edition = 	 {2nd},
-  month = 	 {November},
-  note = 	 {{ISBN} 978-0-262-57132-6}}
-
- at Manual{GSL,
-  title = 	{{GNU} {S}cientific {L}ibrary {R}eference {M}anual},
-  author = 	{Mark Galassi and Jim Davies and James Theiler and Brian Gough and Gerard Jungman and Patrick Alken and Michael Booth and Fabrice Rossi},
-  year = 	{2010},
-  edition =     {3rd},
-  note = 	{Version 1.14. {ISBN} 0954612078},
-  url = 	{http://www.gnu.org/software/gsl}
-}
-
- at Unpublished{Java+Gaile+Manly:2007:RCpp,
-  author =	 {James J. Java and Daniel P. Gaile and Kenneth
-                  E. Manly},
-  title =	 {{R/Cpp}: Interface Classes to Simplify Using \proglang{R}
-                  Objects in \proglang{C++} Extensions},
-  note =	 {Unpublished manuscript, University at Buffalo},
-  url =
-                  {http://sphhp.buffalo.edu/biostat/research/techreports/UB_Biostatistics_TR0702.pdf},
-  month =	 {July},
-  year =	 2007
-}
-
- at InProceedings{Leisch:2008:Tutorial,
-  author =	 {Friedrich Leisch},
-  title =	 {Tutorial on {C}reating \proglang{R} {P}ackages},
-  booktitle =	 {COMPSTAT 2008 -- Proceedings in Computational
-                  Statistics},
-  year =	 2008,
-  editor =	 {Paula Brito},
-  address =	 {Heidelberg},
-  publisher =	 {Physica Verlag},
-  url =		 CRAN # "doc/contrib/Leisch-CreatingPackages.pdf"
-}
-
- at Manual{Liang:2008:rcppbind,
-  title =	 {\pkg{rcppbind}: {A} template library for \proglang{R}/\proglang{C++} developers},
-  author =	 {Gang Liang},
-  year =	 2008,
-  note =	 {R package version 1.0},
-  url =		 R-Forge # "projects/rcppbind"
-}
-
- at Book{Lippman+Lajoie+Moo:2005:Cpp_Primer,
-  author = 	 {Stanley B. Lippman and Jos\'{e}e Lajoie and Barbara E. Moo},
-  title = 	 {The \proglang{C++} Primer},
-  publisher = 	 {Addison-Wesley},
-  address =	 {Boston},
-  year = 	 2005,
-  edition = 	 {4th}
-}
-
- at book{Meyers:1995:MoreEffectiveC++,
-  author =	 {Scott Meyers},
-  title =	 {More Effective \proglang{C++}: 35 New Ways to Improve Your
-                  Programs and Designs},
-  year =	 1995,
-  note =	 {{ISBN} 020163371X},
-  publisher =	 {Addison-Wesley},
-  address =	 {Boston}
-}
-
- at book{Meyers:2001:EffectiveSTL,
-  author =	 {Scott Meyers},
-  title =	 {Effective STL: 50 specific ways to improve your use
-                  of the standard template library},
-  year =	 2001,
-  note =	 {{ISBN} 0-201-74962-9},
-  publisher =	 {Addison-Wesley},
-  address =	 {Essex}
-}
-
- at book{Meyers:2005:EffectiveC++,
-  author =	 {Scott Meyers},
-  title =	 {Effective \proglang{C++}: 55 Specific Ways to Improve Your
-                  Programs and Designs},
-  year =	 2005,
-  note =	 {{ISBN} 978-0321334879},
-  publisher =	 {Addison-Wesley},
-  address =	 {Boston},
-  edition =	 {3rd},
-}
-
- at Book{Plauger+Et+Al:2000:STL,
-  author =	 {P.J. Plauger and Alexander Stepanov and Meng Lee and
-                  David R. Musser},
-  title =	 {The \proglang{C++} Standard Template Library},
-  publisher =	 {Prentice Hall PTR},
-  year =	 2000,
-  note =	 {{ISBN} 978-0134376332},
-}
-
- at manual{R:Administration,
-  author =	 RCoreTeam,
-  organization = RFoundation,
-  address =	 {Vienna, Austria},
-  year =	 2012,
-  title =	 "\proglang{R} Installation and Administration",
-  note =	 {{ISBN} 3-900051-09-7},
-  url =		 manuals # "R-admin.html"
-}
-
- at manual{R:Extensions,
-  author =	 RCoreTeam,
-  organization = RFoundation,
-  address =	 {Vienna, Austria},
-  year =	 2012,
-  title =	 "Writing \proglang{R} Extensions",
-  note =	 {{ISBN} 3-900051-11-9},
-  url =		 manuals # "R-exts.html"
-}
-
- at manual{R:Internals,
-  author =	 RCoreTeam,
-  organization = RFoundation,
-  address =	 {Vienna, Austria},
-  year =	 2012,
-  title =	 "\proglang{R} Internals",
-  note =	 {{ISBN} 3-900051-14-3},
-  url =		 manuals # "R-ints.html"
-}
-
- at manual{R:Main,
-  title =	 {\proglang{R}: A Language and Environment for Statistical
-                  Computing},
-  author =	 RCoreTeam,
-  organization = RFoundation,
-  address =	 {Vienna, Austria},
-  year =	 2012,
-  note =	 {{ISBN} 3-900051-07-0},
-  url =		 {http://www.R-project.org/},
-}
-
- at manual{R:Language,
-  author =	 RCoreTeam,
-  organization = RFoundation,
-  address =	 {Vienna, Austria},
-  year =	 2012,
-  title =	 "\proglang{R} language",
-  note =	 {{ISBN} 3-900051-13-5},
-  url =		 manuals # "R-lang.html"
-}
-
- at InProceedings{Runnalls:2009:CXXR,
-  author =	 {Andrew Runnalls},
-  title =	 {Aspects of {CXXR} internals},
-  booktitle =	 {Directions in Statistical Computing},
-  address =	 {University of Copenhagen, Denmark},
-  year =	 2009
-}
-
- at Manual{Samperi:2009:RcppTemplate,
-  title =	 {\pkg{RcppTemplate}: Rcpp \proglang{R}/\proglang{C++} Object Mapping Library
-                  and Package Template},
-  author =	 {Dominick Samperi},
-  year =	 2009,
-  note =	 {(Archived) R package version 6.1},
-  url =		 CRAN # "/src/contrib/Archive/RcppTemplate"
-}
-
- at TechReport{Sanderson:2010:Armadillo,
-  author =	 {Conrad Sanderson},
-  title =	 {{Armadillo}: {An} open source \proglang{C++} Algebra Library
-                  for Fast Prototyping and Computationally Intensive
-                  Experiments },
-  institution =	 {{NICTA}},
-  year =	 2010,
-  url =		 "http://arma.sf.net"
-}
-
- at Book{Stroustrup:1997:Cpp,
-  author = 	 {Bjarne Stroustrup},
-  title = 	 {The \proglang{C++} Programming Language},
-  publisher = 	 {Addison-Wesley},
-  address =	 {Boston},
-  year = 	 1997,
-  edition = 	 {3rd}
-}
-
- at Article{TempleLang:2009:ModestProposal,
-  author =	 {Duncan {Temple Lang}},
-  title =	 {A modest proposal: an approach to making the
-                  internal \proglang{R} system extensible},
-  journal =	 {Computational Statistics},
-  year =	 2009,
-  volume =	 24,
-  number =	 2,
-  pages =	 {271-281},
-  month =	 {May}
-}
-
- at Article{TempleLang:2009:RGCCTranslationUnit,
-  author =	 {Duncan {Temple Lang}},
-  title =	 {Working with meta-data from \proglang{C}/\proglang{C++} code in \proglang{R}: the
-                  {RGCCTranslationUnit} package},
-  journal =	 {Computational Statistics},
-  year =	 2009,
-  volume =	 24,
-  number =	 2,
-  pages =	 {283-293},
-  month =	 {May}
-}
-
- at InProceedings{Urbanek:2003:Rserve,
-  author =	 {Simon Urbanek},
-  title =	 {\pkg{Rserve}: A Fast Way to Provide \proglang{R} Functionality to
-                  Applications},
-  booktitle	= {Proceedings of the 3rd International Workshop on Distributed
-                   Statistical Computing, Vienna, Austria},
-  editor	= {Kurt Hornik and Friedrich Leisch and Achim Zeileis},
-  year		= {2003},
-  url		= {http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Proceedings/},
-  note		= {{ISSN 1609-395X}}
-}
-
- at Book{Vandevoorde+Josuttis:2003:Templates,
-  author =	 {David Vandevoorde and Nicolai M. Josuttis},
-  title =	 {\proglang{C++} {T}emplates: The Complete Guide},
-  publisher =	 {Addison-Wesley},
-  year =	 2003,
-  address =	 {Boston}
-}
-
- at inproceedings{Veldhuizen:1998:Blitz,
-  author =	 {Todd L. Veldhuizen},
-  title =	 {Arrays in {Blitz++}},
-  booktitle =	 {ISCOPE '98: Proceedings of the Second International
-                  Symposium on Computing in Object-Oriented Parallel
-                  Environments},
-  note =	 {{ISBN} 3-540-65387-2},
-  year =	 1998,
-  pages =	 {223--230},
-  publisher =	 {Springer-Verlag},
-  address =	 {London},
-}

Modified: pkg/RcppEigen/vignettes/RcppEigen-Introduction.Rnw
===================================================================
--- pkg/RcppEigen/vignettes/RcppEigen-Introduction.Rnw	2013-02-18 07:55:23 UTC (rev 4257)
+++ pkg/RcppEigen/vignettes/RcppEigen-Introduction.Rnw	2013-02-18 16:23:16 UTC (rev 4258)
@@ -1,5 +1,5 @@
 \documentclass[shortnames,article,nojss]{jss}
-\usepackage{booktabs,bm,amsmath}
+\usepackage{booktabs,bm,amsmath,thumbpdf}
 %\VignetteIndexEntry{RcppEigen-intro}
 %\VignetteKeywords{linear algebra, template programming, C++, R, Rcpp}
 %\VignettePackage{RcppEigen}
@@ -13,21 +13,18 @@
 #eigenVersion <- paste(unlist(.Call("eigen_version", FALSE)), collapse=".")
 @
 
-\author{Douglas Bates\\Univ.~of Wisconsin/Madison \And Dirk Eddelbuettel\\Debian Project}
-\title{Fast and Elegant Numerical Linear Algebra\\ Using the \pkg{RcppEigen} Package}
-\date{\pkg{RcppEigen} version 0.3.1 as of September 26, 2012}
-
+\author{Douglas Bates\\University of Wisconsin-Madison \And Dirk Eddelbuettel\\Debian Project}
 \Plainauthor{Douglas Bates, Dirk Eddelbuettel}
+
+\title{Fast and Elegant Numerical Linear Algebra Using the \pkg{RcppEigen} Package}
 \Plaintitle{Fast and Elegant Numerical Linear Algebra Using the RcppEigen Package}
-\Shorttitle{Fast and Elegant Numerical Linear Algebra with RcppEigen}
+\Shorttitle{Fast and Elegant Numerical Linear Algebra with \pkg{RcppEigen}}
 
-
 \Abstract{
-  \noindent
   The \pkg{RcppEigen} package provides access from \proglang{R}
   \citep{R:Main} to the \pkg{Eigen} \citep*{Eigen:Web} \proglang{C++}
   template library for numerical linear algebra. \pkg{Rcpp}
-  \citep{JSS:Rcpp,CRAN:Rcpp} classes and specializations of the
+  \citep{CRAN:Rcpp,Eddelbuettel:2013:Rcpp} classes and specializations of the
   \proglang{C++} templated functions \code{as} and \code{wrap} from
   \pkg{Rcpp} provide the ``glue'' for passing objects from
   \proglang{R} to \proglang{C++} and back.  Several introductory
@@ -37,26 +34,27 @@
   comparison. Last but not least, sparse matrix methods are discussed.
 }
 
-\Keywords{Linear algebra, template programming, \proglang{R}, \proglang{C++}, \pkg{Rcpp}} %% at least one keyword must be supplied
-\Plainkeywords{Linear algebra, template programmig, R, C++, Rcpp} %% without formatting
+\Keywords{linear algebra, template programming, \proglang{R}, \proglang{C++}, \pkg{Rcpp}}
+\Plainkeywords{linear algebra, template programmig, R, C++, Rcpp}
 
 \Address{
   Douglas Bates \\
   Department of Statistics \\
-  University of Wisconsin - Madison \\
-  Madison, WI, USA \\
+  University of Wisconsin-Madison \\
+  Madison, WI, United States of America \\
   E-mail: \email{bates at stat.wisc.edu} \\
   URL: \url{http://www.stat.wisc.edu/~bates/}\\
 
   Dirk Eddelbuettel \\
   Debian Project \\
-  River Forest, IL, USA\\
+  River Forest, IL, United States of America\\
   E-mail: \email{edd at debian.org}\\
   URL: \url{http://dirk.eddelbuettel.com}\\
 }
 
 %% need no \usepackage{Sweave.sty}
 
+\newcommand{\argmin}{\operatorname{argmin}\displaylimits}
 \newcommand{\rank}{\operatorname{rank}}
 
 %% highlights macros
@@ -66,9 +64,7 @@
 \newcommand{\hlnum}[1]{\textcolor[rgb]{0,0,0}{#1}}
 \newcommand{\hlopt}[1]{\textcolor[rgb]{0,0,0}{#1}}
 \newcommand{\hlesc}[1]{\textcolor[rgb]{0.74,0.55,0.55}{#1}}
-%\newcommand{\hlstr}[1]{\textcolor[rgb]{0.74,0.55,0.55}{#1}}
 \newcommand{\hlstr}[1]{\textcolor[rgb]{0.90,0.15,0.15}{#1}}
-%green: \newcommand{\hlstr}[1]{\textcolor[rgb]{0.13,0.67,0.13}{#1}} % 0.74 -> % 0.90; 0.55 -> 0.25
 \newcommand{\hldstr}[1]{\textcolor[rgb]{0.74,0.55,0.55}{#1}}
 \newcommand{\hlslc}[1]{\textcolor[rgb]{0.67,0.13,0.13}{\it{#1}}}
 \newcommand{\hlcom}[1]{\textcolor[rgb]{0.67,0.13,0.13}{\it{#1}}}
@@ -88,11 +84,11 @@
 \SweaveOpts{engine=R,eps=FALSE}
 
 \begin{quote} \footnotesize
-  This vignette corresponds to a paper forthcoming %published
-  in the \textsl{Journal of Statistical Software}. % fill in vol,nb later
-  It is currently still identical to the published paper.  Over time, this
-  vignette version may receive minor
-  updates. %For citations, please use the publication \citep{JSS:RcppEigen}.
+  This vignette corresponds to a
+  \href{http://www.jstatsoft.org/v52/i05/}{paper published} in the
+  \textsl{Journal of Statistical Software}. Currently still identical
+  to the paper, this vignette version may over time receive minor updates.
+  For citations, please use \citet{JSS:RcppEigen} as provided by \code{citation("RcppEigen")}.
 
   This version corresponds to \pkg{RcppEigen} version \Sexpr{pkgVersion} and was
   typeset on \Sexpr{prettyDate}.
@@ -103,7 +99,7 @@
 
 Linear algebra is an essential building block of statistical
 computing.  Operations such as matrix decompositions, linear program
-solvers, and eigenvalue / eigenvector computations are used in many
+solvers, and eigenvalue/eigenvector computations are used in many
 estimation and analysis routines. As such, libraries supporting linear
 algebra have long been provided by statistical programmers for
 different programming languages and environments.  Because it is
@@ -112,10 +108,9 @@
 representing matrices, vectors and decompositions, and numerous class
 libraries providing linear algebra routines have been written over the
 years.
-% Could cite Eddelbuettel (1996) here, but a real survey would be better.
 
 As both the \proglang{C++} language and standards have evolved
-\citep{Meyers:2005:EffectiveC++,Meyers:1995:MoreEffectiveC++,cpp11},
+\citep{Meyers:2005:EffectiveC++,Meyers:1995:MoreEffectiveC++,Cpp11},
 so have the compilers implementing the language.  Relatively modern
 language constructs such as template meta-programming are particularly
 useful because they provide overloading of operations (allowing
@@ -135,28 +130,30 @@
 KDE (a popular Linux desktop environment), initially focussing on fixed-size
 matrices to represent projections in a visualization application. \pkg{Eigen}
 grew from there and has over the course of about a decade produced three
-major releases with ``Eigen3'' being the current major version. To
+major releases with \pkg{Eigen}3 being the current major version. To
 check the minor and patch version numbers, load the \pkg{RcppEigen}
 package and call
-\begin{verbatim}
+\begin{CodeInput}
 R> .Call("eigen_version", FALSE)
-major minor patch
-    3     1     1
-\end{verbatim}
-
+\end{CodeInput}
+\begin{CodeOutput}
+major minor patch 
+    3     1     1 
+\end{CodeOutput}
 \pkg{Eigen} is of interest as the \proglang{R} system for statistical
 computation and graphics \citep{R:Main} is itself easily extensible. This is
 particular true via the \proglang{C} language that most of \proglang{R}'s
 compiled core parts are written in, but also for the \proglang{C++} language
 which can interface with \proglang{C}-based systems rather easily. The manual
-``Writing R Extensions'' \citep{R:Extensions} is the basic reference for
+``Writing \proglang{R} Extensions'' \citep{R:Extensions} is the basic reference for
 extending \proglang{R} with either \proglang{C} or \proglang{C++}.
 
 The \pkg{Rcpp} package by \citet{JSS:Rcpp,CRAN:Rcpp} facilitates extending
 \proglang{R} with \proglang{C++} code by providing seamless object mapping
 between both languages.
 %
-As stated in the \pkg{Rcpp} \citep{CRAN:Rcpp} vignette, ``Extending \pkg{Rcpp}''
+As stated in the \pkg{Rcpp} \citep{CRAN:Rcpp} vignette, ``Extending
+\pkg{Rcpp}'' as well as in \citet{Eddelbuettel:2013:Rcpp}
 \begin{quote}
   \pkg{Rcpp} facilitates data interchange between \proglang{R} and
   \proglang{C++} through the templated functions \code{Rcpp::as} (for
@@ -191,12 +188,13 @@
 \code{typedef}s for common classes that correspond to \proglang{R} matrices and
 vectors, as shown in Table~\ref{tab:REigen}, and this paper will use these
 \code{typedef}s.
-\begin{table}[tb]
+
+\begin{table}[t!]
   \centering
   \begin{tabular}{l l}
-    \toprule
+    \hline
     \multicolumn{1}{c}{\proglang{R} object type} & \multicolumn{1}{c}{\pkg{Eigen} class typedef}\\
-    \midrule
+    \hline
     numeric matrix                          & \code{MatrixXd}\\
     integer matrix                          & \code{MatrixXi}\\
     complex matrix                          & \code{MatrixXcd}\\
@@ -204,10 +202,10 @@
     integer vector                          & \code{VectorXi}\\
     complex vector                          & \code{VectorXcd}\\
     \code{Matrix::dgCMatrix} \phantom{XXX}  & \code{SparseMatrix<double>}\\
-    \bottomrule
+    \hline
   \end{tabular}
-  \caption{Correspondence between \proglang{R} matrix and vector types and classes in the \pkg{Eigen} namespace.}
-  \label{tab:REigen}
+  \caption{Correspondence between \proglang{R} matrix and vector types and classes in the \pkg{Eigen} namespace.
+  \label{tab:REigen}}
 \end{table}
 
 Here, \code{Vector} and \code{Matrix} describe the dimension of the
@@ -221,16 +219,6 @@
 \pkg{Eigen} namespace, which means that they must be written as
 \code{Eigen::MatrixXd}.  However, if one prefaces the use of these class
 names with a declaration like
-
-%% Alternatively, use 'highlight --enclose-pre --no-doc -O latex --syntax=C++'
-%% as the command invoked from C-u M-|
-%% For version 3.5 of highlight this should be
-%%  highlight --enclose-pre --no-doc --out-format=latex --syntax=C++
-%%
-%% keep one copy to redo later
-%%
-%% using Eigen::MatrixXd;
-%%
 \begin{quote}
   \noindent
   \ttfamily
@@ -239,6 +227,9 @@
   \normalfont
   \normalsize
 \end{quote}
+
+\vspace*{-0.4cm}
+
 then one can use these names without the namespace qualifier.
 
 \subsection[Mapped matrices in Eigen]{Mapped matrices in \pkg{Eigen}}
@@ -308,6 +299,9 @@
   \mbox{}
   \normalfont
 \end{quote}
+
+\vspace*{-0.4cm}
+
 where \code{AA} is the name of the \proglang{R} object (of type \code{SEXP} in
 \proglang{C} and \proglang{C++}) passed to the \proglang{C++} function.
 
@@ -324,6 +318,8 @@
   \normalsize
 \end{quote}
 
+\vspace*{-0.4cm}
+
 The \code{cxxfunction} function from the \pkg{inline} package \citep*{CRAN:inline} for
 \proglang{R} and its \pkg{RcppEigen} plugin provide a convenient method of
 developing and debugging the \proglang{C++} code.  For actual production code
@@ -348,24 +344,29 @@
 \label{sec:transpose}
 
 The next \proglang{R} code snippet creates a simple matrix of integers
-\begin{verbatim}
-R> (A <- matrix(1:6, ncol=2))
+\begin{CodeInput}
+R> (A <- matrix(1:6, ncol = 2))
+\end{CodeInput}
+\begin{CodeOutput}
      [,1] [,2]
 [1,]    1    4
 [2,]    2    5
 [3,]    3    6
+\end{CodeOutput}
+\begin{CodeInput}
 R> str(A)
+\end{CodeInput}
+\begin{CodeOutput}
  int [1:3, 1:2] 1 2 3 4 5 6
-\end{verbatim}
+\end{CodeOutput}
 and, in Figure~\ref{trans}, the \code{transpose()} method for the
 \code{Eigen::MatrixXi} class is used to return the transpose of the supplied matrix. The \proglang{R}
 matrix in the \code{SEXP} \code{AA} is first mapped to an
 \code{Eigen::MatrixXi} object, and then the matrix \code{At} is constructed
 from its transpose and returned to \proglang{R}.
 
-\begin{figure}[htb]
+\begin{figure}[t!]
   \hrule \smallskip
-  %\begin{quote}
     \noindent
     \ttfamily
     \hlstd{}\hlkwa{using\ }\hlstd{Eigen}\hlsym{::}\hlstd{Map}\hlsym{;}\hspace*{\fill}\\
@@ -376,10 +377,9 @@
     \hlstd{}\hlkwb{const\ }\hlstd{MatrixXi}\hlstd{\ \ \ \ \ \ }\hlstd{}\hlkwd{At}\hlstd{}\hlsym{(}\hlstd{A}\hlsym{.}\hlstd{}\hlkwd{transpose}\hlstd{}\hlsym{());}\hspace*{\fill}\\
     \hlstd{}\hlkwa{return\ }\hlstd{}\hlkwd{wrap}\hlstd{}\hlsym{(}\hlstd{At}\hlsym{);}\hlstd{}\hspace*{\fill}
     \normalfont
-  %\end{quote}
   \hrule
-  \caption{\code{transCpp}: Transpose a matrix of integers.}
-  \label{trans}
+  \caption{\code{transCpp}: Transpose a matrix of integers.
+  \label{trans}}
 \end{figure}
 
 The \proglang{R} snippet below compiles and links the \proglang{C++} code
@@ -392,15 +392,19 @@
 an executable function which is assigned to \code{ftrans}.  This new function
 is used on the matrix $\bm A$ shown above, and one can check that it works as intended
 by comparing the output to an explicit transpose of the matrix argument.
-\begin{verbatim}
-R> ftrans <- cxxfunction(signature(AA="matrix"), transCpp, plugin="RcppEigen")
+\begin{CodeInput}
+R> ftrans <- cxxfunction(signature(AA = "matrix"), transCpp,
++    plugin = "RcppEigen")
 R> (At <- ftrans(A))
+\end{CodeInput}
+\begin{CodeOutput}
      [,1] [,2] [,3]
 [1,]    1    2    3
 [2,]    4    5    6
+\end{CodeOutput}
+\begin{CodeInput}
 R> stopifnot(all.equal(At, t(A)))
-\end{verbatim}
-
+\end{CodeInput}
 For numeric or integer matrices the \code{adjoint()} method is
 equivalent to the \code{transpose()} method.  For complex matrices,
 the adjoint is the conjugate of the transpose.  In keeping with the
@@ -408,7 +412,6 @@
 method is used in what follows to create the transpose of numeric or
 integer matrices.
 
-\pagebreak                      % Achim may hate me
 \subsection{Products and cross-products}
 \label{sec:products}
 
@@ -417,11 +420,10 @@
 classes in \pkg{Eigen}. The \proglang{C++} code in
 Figure~\ref{prod} produces a list containing both the product and
 cross-product (in the sense of the \proglang{R} function call
-\code{crossproduct(A, B)} evaluating $\bm A^\prime\bm B$) of its two arguments
-
-\begin{figure}[htb]
+\code{crossproduct(A, B)} evaluating $\bm A^\top\bm B$) of its two arguments
+%
+\begin{figure}[t!]
   \hrule \smallskip
-  %\begin{quote}
   \noindent
   \ttfamily
   \hlstd{}\hlkwc{typedef\ }\hlstd{Eigen}\hlopt{::}\hlstd{Map}\hlopt{$<$}\hlstd{Eigen}\hlopt{::}\hlstd{MatrixXi}\hlopt{$>$}\hlstd{\ \ \ }\hlopt{}\hlstd{MapMati}\hlopt{;}\hspace*{\fill}\\
@@ -432,23 +434,27 @@
   \mbox{}
   \normalfont
   \normalsize
-  %\end{quote}
   \hrule
-  \caption{\code{prodCpp}: Product and cross-product of two matrices.}
-  \label{prod}
+  \caption{\code{prodCpp}: Product and cross-product of two matrices.
+  \label{prod}}
 \end{figure}
-
-\begin{verbatim}
+%
+\begin{CodeInput}
 R> fprod <- cxxfunction(signature(BB = "matrix", CC = "matrix"),
-+                       prodCpp, "RcppEigen")
-R> B <- matrix(1:4, ncol=2)
-R> C <- matrix(6:1, nrow=2)
++    prodCpp, "RcppEigen")
+R> B <- matrix(1:4, ncol = 2)
+R> C <- matrix(6:1, nrow = 2)
 R> str(fp <- fprod(B, C))
+\end{CodeInput}
+\begin{CodeOutput}
 List of 2
  $ B %*% C        : int [1:2, 1:3] 21 32 13 20 5 8
  $ crossprod(B, C): int [1:2, 1:3] 16 38 10 24 4 10
+\end{CodeOutput}
+\begin{CodeInput}
 R> stopifnot(all.equal(fp[[1]], B %*% C), all.equal(fp[[2]], crossprod(B, C)))
-\end{verbatim}
+\end{CodeInput}
+%
 Note that the \code{create} class method for \code{Rcpp::List}
 implicitly applies \code{Rcpp::wrap} to its arguments.
 
@@ -458,10 +464,10 @@
 As shown in the last example, the \proglang{R} function
 \code{crossprod} calculates the product of the transpose of its first
 argument with its second argument.  The single argument form,
-\code{crossprod(X)}, evaluates $\bm X^\prime\bm X$.  One could, of
+\code{crossprod(X)}, evaluates $\bm X^\top\bm X$.  One could, of
 course, calculate this product as
 \begin{verbatim}
-t(X) %*% X
+  t(X) %*% X
 \end{verbatim}
 but \code{crossprod(X)} is roughly twice as fast because the result is
 known to be symmetric and only one triangle needs to be calculated.
@@ -485,13 +491,12 @@
 \code{UnitUpper} or \code{StrictlyUpper}.
 
 For self-adjoint views the \code{rankUpdate} method adds a scalar multiple
-of $\bm A\bm A^\prime$ to the current symmetric matrix.  The scalar
+of $\bm A\bm A^\top$ to the current symmetric matrix.  The scalar
 multiple defaults to 1.  The code in Figure~\ref{crossprod} produces
-both $\bm A^\prime\bm A$ and $\bm A\bm A^\prime$ from a matrix $\bm A$.
+both $\bm A^\top\bm A$ and $\bm A\bm A^\top$ from a matrix $\bm A$.
 
-\begin{figure}[htb]
+\begin{figure}[t!]
   \hrule \smallskip
-  %\begin{quote}
     \noindent
     \ttfamily
     \hlstd{}\hlkwa{using\ }\hlstd{Eigen}\hlopt{::}\hlstd{Map}\hlopt{;}\hspace*{\fill}\\
@@ -509,30 +514,32 @@
     \hlstd{}\hlstd{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\hlstd{Named}\hlopt{{(}}\hlstd{}\hlstr{"tcrossprod(A)"}\hlstd{}\hlopt{{)}\ =\ }\hlstd{AAt}\hlopt{);}\hlstd{}\hspace*{\fill}
     \normalfont
     \normalsize
-  %\end{quote}
   \hrule
-  \caption{\code{crossprodCpp}: Cross-product and transposed cross-product of a single matrix.}
-  \label{crossprod}
+  \caption{\code{crossprodCpp}: Cross-product and transposed cross-product of a single matrix.
+  \label{crossprod}}
 \end{figure}
-\begin{verbatim}
+\begin{CodeInput}
 R> fcprd <- cxxfunction(signature(AA = "matrix"), crossprodCpp, "RcppEigen")
 R> str(crp <- fcprd(A))
+\end{CodeInput}
+\begin{CodeOutput}
 List of 2
  $ crossprod(A) : int [1:2, 1:2] 14 32 32 77
  $ tcrossprod(A): int [1:3, 1:3] 17 22 27 22 29 36 27 36 45
+\end{CodeOutput}
+\begin{CodeInput}
 R> stopifnot(all.equal(crp[[1]], crossprod(A)),
-+            all.equal(crp[[2]], tcrossprod(A)))
-\end{verbatim}
-
++    all.equal(crp[[2]], tcrossprod(A)))
+\end{CodeInput}
 To some, the expressions in Figure~\ref{crossprod} to construct
 \code{AtA} and \code{AAt} are compact and elegant.  To others they are
 hopelessly confusing.  If you find yourself in the latter group, you
 just need to read the expression left to right.  So, for example, we
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/rcpp -r 4258


More information about the Rcpp-commits mailing list