[Rcpp-commits] r2732 - pkg/RcppGSL/inst/doc/RcppGSL

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 6 20:36:11 CET 2010


Author: romain
Date: 2010-12-06 20:36:10 +0100 (Mon, 06 Dec 2010)
New Revision: 2732

Modified:
   pkg/RcppGSL/inst/doc/RcppGSL/RcppGSL.Rnw
Log:
now we can use multiple lines in the highlight sweave driver

Modified: pkg/RcppGSL/inst/doc/RcppGSL/RcppGSL.Rnw
===================================================================
--- pkg/RcppGSL/inst/doc/RcppGSL/RcppGSL.Rnw	2010-12-06 17:44:17 UTC (rev 2731)
+++ pkg/RcppGSL/inst/doc/RcppGSL/RcppGSL.Rnw	2010-12-06 19:36:10 UTC (rev 2732)
@@ -682,8 +682,7 @@
 
 The \proglang{R} source is very simply: a single matrix is passed to \proglang{C++}:
 
-<<lang=R,size=small>>=
-
+<<size=small>>=
 colNorm <- function(M) {
     stopifnot(is.matrix(M))
     res <- .Call("colNorm", M, package="RcppGSLExample")
@@ -705,7 +704,7 @@
 then communicates with \pkg{inline} to tell it about the location and names
 of libraries used to build code against \pkg{GSL}.
 
-<<lang=R,size=small>>=
+<<size=small>>=
 require(inline)
 
 inctxt='
@@ -726,11 +725,13 @@
   return n;                           // return vector
 '
 
-foo <- cxxfunction(signature(sM="numeric"), body=bodytxt, inc=inctxt, plugin="RcppGSL")
+foo <- cxxfunction(
+    signature(sM="numeric"), 
+    body=bodytxt, inc=inctxt, plugin="RcppGSL")
 
 ## see Section 8.4.13 of the GSL manual: create M as a sum of two outer products
 M <- outer(sin(0:9), rep(1,10), "*") + outer(rep(1, 10), cos(0:9), "*")
-print(foo(M))
+foo(M)
 @
 
 The \texttt{RcppGSL} inline plugin supports creation of a package skeleton



More information about the Rcpp-commits mailing list