[Rcpp-commits] r2729 - in pkg/RcppClassic: . inst/doc

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 6 03:45:48 CET 2010


Author: edd
Date: 2010-12-06 03:45:44 +0100 (Mon, 06 Dec 2010)
New Revision: 2729

Added:
   pkg/RcppClassic/ChangeLog
Modified:
   pkg/RcppClassic/inst/doc/Makefile
   pkg/RcppClassic/inst/doc/RcppClassic.Rnw
Log:
standardize vignette a little
added a ChangeLog


Added: pkg/RcppClassic/ChangeLog
===================================================================
--- pkg/RcppClassic/ChangeLog	                        (rev 0)
+++ pkg/RcppClassic/ChangeLog	2010-12-06 02:45:44 UTC (rev 2729)
@@ -0,0 +1,8 @@
+2010-12-05  Dirk Eddelbuettel  <edd at debian.org>
+
+	* inst/doc/RcppClassic.Rnw: Aligned a little with Rcpp vignettes
+
+2010-12-02  Romain Francois <romain at r-enthusiasts.com>
+
+	* Create new package for deprecated 'classic Rcpp' API by carving it
+	out of the current Rcpp package

Modified: pkg/RcppClassic/inst/doc/Makefile
===================================================================
--- pkg/RcppClassic/inst/doc/Makefile	2010-12-06 02:27:37 UTC (rev 2728)
+++ pkg/RcppClassic/inst/doc/Makefile	2010-12-06 02:45:44 UTC (rev 2729)
@@ -18,6 +18,13 @@
 
 RcppClassic.pdf: RcppClassic.Rnw
 	R CMD Sweave RcppClassic.Rnw
+ifneq (,$(findstring edd,$(whoami)))
+	pdflatex RcppClassic.tex
+	bibtex RcppClassic
+	pdflatex RcppClassic.tex
+	pdflatex RcppClassic.tex
+else
 	Rscript --vanilla -e "tools::texi2dvi( 'RcppClassic.tex', pdf = TRUE, clean = FALSE )"
+endif
 	rm -fr RcppClassic.tex
 

Modified: pkg/RcppClassic/inst/doc/RcppClassic.Rnw
===================================================================
--- pkg/RcppClassic/inst/doc/RcppClassic.Rnw	2010-12-06 02:27:37 UTC (rev 2728)
+++ pkg/RcppClassic/inst/doc/RcppClassic.Rnw	2010-12-06 02:45:44 UTC (rev 2729)
@@ -1,48 +1,64 @@
-\documentclass[a4paper]{article}
+\documentclass[10pt]{article}
 %\VignetteIndexEntry{RcppClassic}
 %\VignettePackage{RcppClassic}
 
-\usepackage{a4wide,graphicx,color}
+\usepackage{vmargin}
+\setmargrb{0.75in}{0.75in}{0.75in}{0.75in}
+\usepackage{graphicx,color}
+
+\usepackage[colorlinks]{hyperref}
+\definecolor{link}{rgb}{0,0,0.3}	%% next few lines courtesy of RJournal.sty
+\hypersetup{
+    colorlinks,%
+    citecolor=link,%
+    filecolor=link,%
+    linkcolor=link,%
+    urlcolor=link
+}
+
+\newcommand{\proglang}[1]{\textsf{#1}}
+\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+
 \usepackage[authoryear,round,longnamesfirst]{natbib}
-\bibliographystyle{abbrvnat}
 
-\usepackage{booktabs}           % fancier \hrule
-\usepackage{float}		% float 'here' -- but not with multicol?
-\restylefloat{figure}
-
 \RequirePackage{ae,mathpple}    % ae as a default font pkg works with Sweave
 \RequirePackage[T1]{fontenc}
 
-\newcommand{\proglang}[1]{\textsf{#1}}
-\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+<<echo=FALSE,print=FALSE>>=
+require( RcppClassic )
+prettyVersion <- packageDescription("RcppClassic")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+@
 
-\title{RcppClassic: Deprecated Rcpp API}
-\author{by Dirk Eddelbuettel and Romain Fran\c{c}ois}
+\title{\pkg{RcppClassic}: Deprecated Rcpp API}
+\author{Dirk Eddelbuettel \and Romain Fran\c{c}ois}
+\date{\pkg{RcppClassic} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}}
 
 \begin{document}
 
 \maketitle
 
-This document presents the \texttt{RcppClassic} package. This package 
-has been factored out of \texttt{Rcpp} \citep{CRAN:Rcpp} 
-and only contains code that is 
-considered deprecated. 
+\noindent
+This document presents the \pkg{RcppClassic} package. This package
+has been factored out of \pkg{Rcpp} \citep{CRAN:Rcpp}
+and only contains code that is
+considered deprecated.
 
 This package is released for the sole purpose of allowing package authors
-that are still using the classic \texttt{Rcpp} API to keep 
+that are still using the classic \pkg{Rcpp} API to keep
 their package buildable. This document explains the changes needed in
-a package to use both the current and classic Rcpp APIs. 
+a package to use both the current and classic Rcpp APIs.
 
-\section{Using RcppClassic}
+\section{If you must use \pkg{RcppClassic}}
 
-A few changes are needed in packages that want to use the classic Rcpp API 
-that is contained in RcppClassic. RcppClassic contains a sample package called
-RcppClassicExample that can be used as a template.
+A few changes are needed in packages that want to use the classic Rcpp API
+that is contained in RcppClassic. RcppClassic contains a sample package
+called RcppClassicExample that can be used as a template.
 
 \subsection{The DESCRIPTION file}
 
-The client package must declare that it depends on both Rcpp and RcppClassic, 
-in the Depends field and the LinkingTo field, so it must contain this: 
+The client package must declare that it depends on both Rcpp and RcppClassic,
+in the Depends field and the LinkingTo field, so it must contain this:
 
 \begin{verbatim}
 Depends: RcppClassic, Rcpp
@@ -52,17 +68,17 @@
 \subsection{Makevars}
 
 The Makevars file must be updated so that user libraries for both Rcpp
-and RcppClassic are used: 
+and RcppClassic are used:
 
 \begin{verbatim}
 PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` \
-           `$(R_HOME)/bin/Rscript -e "RcppClassic:::LdFlags()"` 
+           `$(R_HOME)/bin/Rscript -e "RcppClassic:::LdFlags()"`
 
 \end{verbatim}
 
 \subsection{Makevars.win}
 
-The Makevars.win must also be updated for the same reason: 
+The Makevars.win must also be updated for the same reason:
 
 \begin{verbatim}
 PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()")
@@ -71,36 +87,37 @@
 
 \subsection{include RcppClassic.h instead of Rcpp.h}
 
-Finally, all instances of this line : 
+Finally, all instances of this line :
 
 \begin{verbatim}
 #include <Rcpp.h>
 \end{verbatim}
 
-need to be replaced by: 
+need to be replaced by:
 
 \begin{verbatim}
 #include <RcppClassic.h>
 \end{verbatim}
 
 
-\section{Not Using RcppClassic}
+\section{You should not use RcppClassic}
 
-The previous section discusses the set of changes required to update a package
-so that it uses the classic API from RcppClassic since it has been removed 
-from Rcpp. 
+The previous section discusses the set of changes required to update a
+package so that it uses the classic API from RcppClassic since it has been
+removed from Rcpp.
 
-We do, however, recommend that package authors stop using the classic API, which 
-is largely superseded by the current Rcpp API, in terms of performance, design, 
-maintainance and ease of use. 
+We do, however, recommend that package authors stop using the classic API, which
+is largely superseded by the current Rcpp API, in terms of performance, design,
+maintainance and ease of use.
 
 % TODO: add some more content, or just point to the Rcpp vignettes ?
 
+\bibliographystyle{plainnat}
 \bibliography{\Sexpr{Rcpp:::bib()}}
 
 \end{document}
 
-%%% Local Variables: 
+%%% Local Variables:
 %%% mode: latex
 %%% TeX-master: t
-%%% End: 
+%%% End:



More information about the Rcpp-commits mailing list