[Rcpp-commits] r2552 - in pkg/RcppGSL/inst/doc: . RcppGSL

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Nov 27 17:15:08 CET 2010


Author: edd
Date: 2010-11-27 17:15:08 +0100 (Sat, 27 Nov 2010)
New Revision: 2552

Modified:
   pkg/RcppGSL/inst/doc/Makefile
   pkg/RcppGSL/inst/doc/RcppGSL.bib
   pkg/RcppGSL/inst/doc/RcppGSL/RcppGSL.Rnw
Log:
added a complete section 1: introduction


Modified: pkg/RcppGSL/inst/doc/Makefile
===================================================================
--- pkg/RcppGSL/inst/doc/Makefile	2010-11-27 15:47:59 UTC (rev 2551)
+++ pkg/RcppGSL/inst/doc/Makefile	2010-11-27 16:15:08 UTC (rev 2552)
@@ -15,7 +15,7 @@
 
 RcppGSL.pdf: RcppGSL/RcppGSL.Rnw
 	cp -f RcppGSL/RcppGSL.Rnw .
-	Rscript -e "require(highlight); driver <- HighlightWeaveLatex(boxes = TRUE, bg = 'white' ); Sweave( 'RcppGSL.Rnw', driver = driver ); "
+	Rscript --vanilla -e "require(highlight); driver <- HighlightWeaveLatex(boxes = TRUE, bg = 'white' ); Sweave( 'RcppGSL.Rnw', driver = driver ); "
 ifneq (,$(findstring edd,$(whoami)))
 	pdflatex RcppGSL
 else
@@ -24,9 +24,9 @@
 	bibtex RcppGSL
 ifneq (,$(findstring edd,$(whoami)))
 	pdflatex RcppGSL
+	pdflatex RcppGSL
 else
 	Rscript -e "tools::texi2dvi( 'RcppGSL.tex', pdf = TRUE, clean = TRUE )"
 endif
-        # rm -fr RcppGSL.tex
-	rm -fr RcppGSL.bbl RcppGSL.blg RcppGSL.aux RcppGSL.out RcppGSL.log rm RcppGSL.Rnw
+        # rm -fr RcppGSL.tex RcppGSL.bbl RcppGSL.blg RcppGSL.aux RcppGSL.out RcppGSL.log 
 	cp RcppGSL/RcppGSL-fake.Rnw RcppGSL.Rnw

Modified: pkg/RcppGSL/inst/doc/RcppGSL/RcppGSL.Rnw
===================================================================
--- pkg/RcppGSL/inst/doc/RcppGSL/RcppGSL.Rnw	2010-11-27 15:47:59 UTC (rev 2551)
+++ pkg/RcppGSL/inst/doc/RcppGSL/RcppGSL.Rnw	2010-11-27 16:15:08 UTC (rev 2552)
@@ -12,10 +12,9 @@
     linkcolor=link,%
     urlcolor=link
 }
+\usepackage{vmargin}
+\setmargrb{0.75in}{0.75in}{0.75in}{0.75in}
 
-\setlength{\oddsidemargin}{0pt}
-\setlength{\textwidth}{17cm} % uh-oh, I use letter :)
-
 \newcommand{\proglang}[1]{\textsf{#1}}
 \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
 
@@ -28,21 +27,26 @@
 % closing $ needed here
 
 \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois}
-\title{RcppGSL}
+\title{\pkg{RcppGSL}: Easier \pkg{GSL} use from \proglang{R} via \pkg{Rcpp}}
 \date{Version \Sexpr{rcppgsl.version} as of \Sexpr{prettyDate}}
 
 \begin{document}
 \maketitle
 
 \abstract{
+  \shortcites{GSL} %% so that we get Galassi et al instead of all names
   \noindent
-  \shortcites{GSL} %% so that we get Galassi et instead of all names
-  The GNU Scientific Library, or \pkg{GSL}, is a collection of numer ical
+  The GNU Scientific Library, or \pkg{GSL}, is a collection of numerical
   routines for scientifc computing \citep{GSL}. It is particularly useful for
-  \proglang{C} and \proglang{C++} programs.  The \pkg{GSL} provides a wide
-  range of mathematical routines such as random number generators, special
-  functions and least-squares fitting.  There are over 1000 functions in
-  total with an extensive test suite.
+  \proglang{C} and \proglang{C++} programs as it provides a standard
+  \proglang{C} interface to a wide range of mathematical routines such as
+  special functions, permutations, combinations, fast fourier transforms,
+  eigensystems, random numbers, quadrature, random distributions,
+  quasi-random sequences, Monte Carlo integration, N-tuples, differential
+  equations, simulated annealing, numerical differentiation, interpolation,
+  series acceleration, Chebyshev approximations, root-finding, discrete
+  Hankel transforms physical constants, basis splines and wavelets.  There
+  are over 1000 functions in total with an extensive test suite.
 
   The \pkg{RcppGSL} package provides an easy-to-use interface between
   \pkg{GSL} data structures and \proglang{R} using concepts from \pkg{Rcpp}
@@ -52,8 +56,66 @@
 
 \section{Introduction}
 
-TODO
+The GNU Scientific Library, or \pkg{GSL}, is a collection of numerical
+routines for scientifc computing \citep{GSL}. It is a rigourously developed
+and tested library providing support for a wide range of scientific or
+numerical tasks. Among the topics covered in the GSL are
+%% from the GSL manual
+complex numbers, roots of polynomials,
+special functions, vector and matrix data structures,
+permutations, combinations, sorting, BLAS support,
+linear algebra, fast fourier transforms, eigensystems,
+random numbers,	quadrature, random distributions, quasi-random sequences,
+Monte Carlo integration, N-tuples,
+differential equations,	simulated annealing,
+numerical differentiation, interpolation,
+series acceleration, Chebyshev approximations,
+root-finding, discrete Hankel transforms
+least-squares fitting,	minimization,
+physical constants, basis splines and wavelets.
 
+Support for \proglang{C} programming with the GSL is readily available: the GSL itself is written in \proglang{C}
+and provides a \proglang{C}-language Application Programming Interface
+(API). Access from \proglang{C++} is therefore possible, albeit not at the
+abstraction level that can be offered by dedicated \proglang{C++}
+implementations.\footnote{Several \proglang{C++} wrappers for the GSL have
+  been written over the years yet none reached a state of completion
+  comparable to the GSL itself. Three such wrapping library are
+  \url{http://cholm.home.cern.ch/cholm/misc/gslmm/},
+  \url{http://gslwrap.sourceforge.net/} and
+  \url{http://code.google.com/p/gslcpp/}.}
+
+The GSL is somewhat unique among numerical libraries. Its combination of
+broad coverage of scientific topics, serious implementation effort and the
+use of a FLOSS license have lead to a fairly wide usage of the library.  As a
+concrete example, we can consider the the CRAN repository network for the
+\proglang{R} language and environment \citep{R:Main}.  CRAN contains over a
+dozen packages interfacing the GSL: \pkg{copula}, \pkg{dynamo}, \pkg{gsl},
+\pkg{gstat}, \pkg{magnets}, \pkg{mvabund}, \pkg{QRMlib}, \pkg{RBrownie},
+\pkg{RDieHarder}, \pkg{RHmm}, \pkg{segclust}, \pkg{surveillance}, and
+\pkg{topicmodels}.  This is a clear indication that the GSL is popular among
+programmers using either the \proglang{C} or \proglang{C++} language for
+solving problems applied science.
+
+At the same time, the \pkg{Rcpp} package \citep{CRAN:Rcpp} offers a
+higher-level abstraction between \proglang{R} and underlying \proglang{C++}
+(or \proglang{C}) code.  \pkg{Rcpp} permits \proglang{R} objects like
+vectors, matrices, lists, functions, environments, $\ldots$, to be
+manipulated directly at the \proglang{C++} level, alleviates the needs for
+complicated and error-prone parameter passing and memory allocation. It also
+permits compact vectorised expressions similar to what can be written in
+\proglang{R} directly at the \proglang{C++} level.
+
+The \pkg{RcppGSL} package discussed here aims the help close the gap. It
+tries to offer access to GSL functions, in particular via the vector and
+matrix data structures used throughout the GSL, while staying closer to the
+`whole object model' familar to the \proglang{R} programmer.
+
+The rest of paper is organised as follows. The next section shows a
+motivating example of a fast linear model fit routine using \pkg{GSL} functions.
+The following section discusses support for \pkg{GSL} vector types, which is
+followed by a section on matrices.
+
 \section{Motivation: FastLm}
 
 TODO: Show FastLm() to show what this can be used for.
@@ -227,7 +289,7 @@
 in \pkg{RcppGSL}.}
 \end{table}
 
-\section{ Vector Views}
+\subsection{ Vector Views}
 
 Several \pkg{GSL} algorithms return \pkg{GSL} vector views as result. \pkg{RcppGSL}
 defines the template class \texttt{RcppGSL::vector\_view} to handle
@@ -355,7 +417,7 @@
 
 \section{References}
 
-\bibliographystyle{abbrvnat}
+\bibliographystyle{plainnat}
 \bibliography{RcppGSL}
 
 \end{document}

Modified: pkg/RcppGSL/inst/doc/RcppGSL.bib
===================================================================
--- pkg/RcppGSL/inst/doc/RcppGSL.bib	2010-11-27 15:47:59 UTC (rev 2551)
+++ pkg/RcppGSL/inst/doc/RcppGSL.bib	2010-11-27 16:15:08 UTC (rev 2552)
@@ -13,11 +13,22 @@
   url =		 manuals # "R-exts.html"
 }
 
+ at Manual{R:Main,
+  title =	 {R: A Language and Environment for Statistical
+                  Computing},
+  author =	 RCoreTeam,
+  organization = RFoundation,
+  address =	 {Vienna, Austria},
+  year =	 2010,
+  note =	 {{ISBN} 3-900051-07-0},
+  url =		 {http://www.R-project.org/},
+}
+
 @Manual{CRAN:Rcpp,
   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.8},
   url = 	{http://CRAN.R-project.org/package=Rcpp}
 }
 



More information about the Rcpp-commits mailing list