[Rcpp-commits] r4179 - in pkg/RcppExamples: . R man src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Dec 28 05:00:15 CET 2012
Author: edd
Date: 2012-12-28 05:00:15 +0100 (Fri, 28 Dec 2012)
New Revision: 4179
Modified:
pkg/RcppExamples/ChangeLog
pkg/RcppExamples/DESCRIPTION
pkg/RcppExamples/NAMESPACE
pkg/RcppExamples/R/RcppDateExample.R
pkg/RcppExamples/R/RcppMatrixExample.R
pkg/RcppExamples/R/RcppParamsExample.R
pkg/RcppExamples/R/RcppRNGs.R
pkg/RcppExamples/R/RcppStringVectorExample.R
pkg/RcppExamples/R/RcppVectorExample.R
pkg/RcppExamples/man/RcppExamples-package.Rd
pkg/RcppExamples/src/Makevars
pkg/RcppExamples/src/Makevars.win
pkg/RcppExamples/src/newRcppMatrixExample.cpp
pkg/RcppExamples/src/newRcppVectorExample.cpp
Log:
Release 0.1.5, removing all traces of RcppClassic which will reappear in a new package RcppClassicExamples
Modified: pkg/RcppExamples/ChangeLog
===================================================================
--- pkg/RcppExamples/ChangeLog 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/ChangeLog 2012-12-28 04:00:15 UTC (rev 4179)
@@ -1,3 +1,25 @@
+2012-12-27 Dirk Eddelbuettel <edd at debian.org>
+
+ * DESCRIPTION (Version): New version 0.1.5
+
+ * DESCRIPTION (Depends, Imports): No longer use RcppClassic
+ * NAMESPACE: Updated accordingly
+
+ * R/RcppDateExample.R (RcppDateExample): No longer call 'classic'
+ example moved to new package RcppClassicExamples
+ * R/RcppMatrixExample.R (RcppMatrixExample): Idem
+ * R/RcppParamsExample.R (RcppParamsExample): Idem
+ * R/RcppStringVectorExample.R (RcppStringVectorExample): Idem
+ * R/RcppVectorExample.R (RcppVectorExample): Idem
+
+ * man/RcppExamples-package.Rd: Update Description:
+
+ * src/Makevars (PKG_LIBS): Remove RcppClassic use
+ * src/Makevars.win (PKG_LIBS): Idem
+
+ * src/newRcppMatrixExample.cpp: Corrected header use
+ * src/newRcppVectorExample.cpp: Idem
+
2012-08-09 Dirk Eddelbuettel <edd at dexter>
* DESCRIPTION: Release 0.1.4
Modified: pkg/RcppExamples/DESCRIPTION
===================================================================
--- pkg/RcppExamples/DESCRIPTION 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/DESCRIPTION 2012-12-28 04:00:15 UTC (rev 4179)
@@ -1,9 +1,8 @@
Package: RcppExamples
Title: Examples using Rcpp to interface R and C++
-Version: 0.1.4
+Version: 0.1.5
Date: $Date$
-Author: Dirk Eddelbuettel and Romain Francois, based on code written
- during 2005 and 2006 by Dominick Samperi
+Author: Dirk Eddelbuettel and Romain Francois
Maintainer: Dirk Eddelbuettel <edd at debian.org>
Description: Examples for Seamless R and C++ integration
The Rcpp package contains a C++ library that facilitates the integration of
@@ -11,12 +10,8 @@
.
Note that the documentation in this package currently does not cover all the
features in the package. It is not even close.
- .
- It does however provide a few example based on both the (deprecated)
- `classic' API and the current Rcpp API which supercedes it. As such, it
- can help in porting from the older API to the newer API.
-Depends: R (>= 2.11.0), Rcpp (>= 0.9.9), RcppClassic
-LinkingTo: RcppClassic, Rcpp
+Depends: R (>= 2.11.0), Rcpp (>= 0.9.9)
+LinkingTo: Rcpp
Suggests: RUnit
URL: http://dirk.eddelbuettel.com/code/rcpp.html, http://romainfrancois.blog.free.fr/index.php?category/R-package/Rcpp
License: GPL (>= 2)
Modified: pkg/RcppExamples/NAMESPACE
===================================================================
--- pkg/RcppExamples/NAMESPACE 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/NAMESPACE 2012-12-28 04:00:15 UTC (rev 4179)
@@ -1,7 +1,7 @@
useDynLib(RcppExamples)
-export(RcppExample,
- print.RcppExample,
+export(#RcppExample,
+ #print.RcppExample,
RcppDataFrame,
RcppDateExample,
RcppParamsExample,
@@ -11,5 +11,4 @@
RcppStringVectorExample
)
-#importFrom( utils, capture.output )
Modified: pkg/RcppExamples/R/RcppDateExample.R
===================================================================
--- pkg/RcppExamples/R/RcppDateExample.R 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/R/RcppDateExample.R 2012-12-28 04:00:15 UTC (rev 4179)
@@ -2,7 +2,7 @@
## RcppDateExample.R: Rcpp R/C++ interface class library RcppDate example
##
## Copyright (C) 2008 Dirk Eddelbuettel
-## Copyright (C) 2009 - 2010 Dirk Eddelbuettel and Romain Francois
+## Copyright (C) 2009 - 2012 Dirk Eddelbuettel and Romain Francois
##
## This file is part of Rcpp.
##
@@ -19,12 +19,8 @@
## You should have received a copy of the GNU General Public License
## along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
-RcppDateExample <- function(dv, dtv,
- api=c("classic", "new")) {
+RcppDateExample <- function(dv, dtv) {
- api <- match.arg(api) # match to classic or new
- fun <- paste(api, "RcppDateExample", sep="")
-
## Check that params is properly set.
if (missing(dv)) {
cat("\nIn R, setting default argument for dv\n")
@@ -37,10 +33,7 @@
}
## Make the call...
- val <- .Call(fun, # either new or classic
- dv, dtv,
- PACKAGE="RcppExamples")
-
+ val <- .Call("newRcppDateExample", dv, dtv, PACKAGE="RcppExamples")
val
}
Modified: pkg/RcppExamples/R/RcppMatrixExample.R
===================================================================
--- pkg/RcppExamples/R/RcppMatrixExample.R 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/R/RcppMatrixExample.R 2012-12-28 04:00:15 UTC (rev 4179)
@@ -2,7 +2,7 @@
## RcppMatrixExample.R: Rcpp R/C++ interface class library RcppMatrix example
##
## Copyright (C) 2008 Dirk Eddelbuettel
-## Copyright (C) 2009 - 2010 Dirk Eddelbuettel and Romain Francois
+## Copyright (C) 2009 - 2012 Dirk Eddelbuettel and Romain Francois
##
## This file is part of Rcpp.
##
@@ -19,16 +19,8 @@
## You should have received a copy of the GNU General Public License
## along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
-RcppMatrixExample <- function(mat=matrix(seq(1,9)^2, ncol=3),
- api=c("classic", "new")) {
-
- api <- match.arg(api) # match to classic or new
- fun <- paste(api, "RcppMatrixExample", sep="")
-
+RcppMatrixExample <- function(mat=matrix(seq(1,9)^2, ncol=3)) {
## Make the call...
- val <- .Call(fun, # either new or classic
- mat,
- PACKAGE="RcppExamples")
-
+ val <- .Call("newRcppMatrixExample", mat, PACKAGE="RcppExamples")
val
}
Modified: pkg/RcppExamples/R/RcppParamsExample.R
===================================================================
--- pkg/RcppExamples/R/RcppParamsExample.R 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/R/RcppParamsExample.R 2012-12-28 04:00:15 UTC (rev 4179)
@@ -2,7 +2,7 @@
## RcppParamsExample.R: Rcpp R/C++ interface class library RcppParams example
##
## Copyright (C) 2008 Dirk Eddelbuettel
-## Copyright (C) 2009 - 2010 Dirk Eddelbuettel and Romain Francois
+## Copyright (C) 2009 - 2012 Dirk Eddelbuettel and Romain Francois
##
## This file is part of Rcpp.
##
@@ -19,12 +19,8 @@
## You should have received a copy of the GNU General Public License
## along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
-RcppParamsExample <- function(params,
- api=c("classic", "new")) {
+RcppParamsExample <- function(params) {
- api <- match.arg(api) # match to classic or new
- fun <- paste(api, "RcppParamsExample", sep="")
-
## Check that params is properly set.
if (missing(params)) {
cat("\nIn R, setting default argument for params\n")
@@ -35,10 +31,7 @@
}
## Make the call...
- val <- .Call(fun,
- params,
- PACKAGE="RcppExamples")
-
+ val <- .Call("newRcppParamsExample", params, PACKAGE="RcppExamples")
val
}
Modified: pkg/RcppExamples/R/RcppRNGs.R
===================================================================
--- pkg/RcppExamples/R/RcppRNGs.R 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/R/RcppRNGs.R 2012-12-28 04:00:15 UTC (rev 4179)
@@ -18,10 +18,8 @@
## along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
RcppRNGs <- function(n) {
-
## Make the call...
df <- .Call("RcppRNGs", n, PACKAGE="RcppExamples")
-
df
}
Modified: pkg/RcppExamples/R/RcppStringVectorExample.R
===================================================================
--- pkg/RcppExamples/R/RcppStringVectorExample.R 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/R/RcppStringVectorExample.R 2012-12-28 04:00:15 UTC (rev 4179)
@@ -2,7 +2,7 @@
## RcppStringVectorExample.R: Rcpp R/C++ interface class library
##
## Copyright (C) 2008 Dirk Eddelbuettel
-## Copyright (C) 2009 - 2010 Dirk Eddelbuettel and Romain Francois
+## Copyright (C) 2009 - 2012 Dirk Eddelbuettel and Romain Francois
##
## This file is part of Rcpp.
##
@@ -19,16 +19,8 @@
## You should have received a copy of the GNU General Public License
## along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
-RcppStringVectorExample <- function(vec=c("Tick", "Tack", "Tock"),
- api=c("classic", "new")) {
-
- api <- match.arg(api) # match to classic or new
- fun <- paste(api, "RcppStringVectorExample", sep="")
-
+RcppStringVectorExample <- function(vec=c("Tick", "Tack", "Tock")) {
## Make the call...
- val <- .Call(fun, # either new or classic
- vec,
- PACKAGE="RcppExamples")
-
+ val <- .Call("newRcppStringVectorExample", vec, PACKAGE="RcppExamples")
val
}
Modified: pkg/RcppExamples/R/RcppVectorExample.R
===================================================================
--- pkg/RcppExamples/R/RcppVectorExample.R 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/R/RcppVectorExample.R 2012-12-28 04:00:15 UTC (rev 4179)
@@ -2,7 +2,7 @@
## RcppVectorExample.R: Rcpp R/C++ interface class library RcppVector example
##
## Copyright (C) 2008 Dirk Eddelbuettel
-## Copyright (C) 2009 - 2010 Dirk Eddelbuettel and Romain Francois
+## Copyright (C) 2009 - 2012 Dirk Eddelbuettel and Romain Francois
##
## This file is part of Rcpp.
##
@@ -19,15 +19,9 @@
## You should have received a copy of the GNU General Public License
## along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
-RcppVectorExample <- function(vec=seq(1,9)^2, api=c("classic", "new")) {
+RcppVectorExample <- function(vec=seq(1,9)^2) {
- api <- match.arg(api) # match to classic or new
- fun <- paste(api, "RcppVectorExample", sep="")
-
## Make the call...
- val <- .Call(fun, # either new or classic
- vec,
- PACKAGE="RcppExamples")
-
+ val <- .Call("newRcppVectorExample", vec, PACKAGE="RcppExamples")
val
}
Modified: pkg/RcppExamples/man/RcppExamples-package.Rd
===================================================================
--- pkg/RcppExamples/man/RcppExamples-package.Rd 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/man/RcppExamples-package.Rd 2012-12-28 04:00:15 UTC (rev 4179)
@@ -7,10 +7,14 @@
}
\description{
This package shows some simple examples for the use of \pkg{Rcpp}.
- Both the older ('classic') and new API are documented.
It can also serve as a working template to create packages that use
\pkg{Rcpp} to interface C++ code or libraries.
+
+ A sibbling package \pkg{RcppClassicExamples} provides some examples
+ for the deprecated older API still being made available via the
+ \pkg{RcppClassic} package. New development should use \pkg{Rcpp}
+ instead.
}
\details{
The \pkg{Rcpp} package provides a number of C++ classes that ease
@@ -18,10 +22,10 @@
functions, as well as returning results back from C++ to R.
Two APIs are supported. The first is an older API which was first
- introduced mostly in 2006 and extended in 2008. This interface is used
- by a few other packages and will be supported going forward.,
- A second and newer API that was started in 2009 offers more
- functionality.
+ introduced mostly in 2006, extended in 2008 and deprecated in
+ 2009. This interface is used by a few other packages and will be
+ supported going forward, but not extended. A second and newer API
+ was started in 2009 offers more functionality: \pkg{Rcpp}
The \pkg{RcppExamples} package provides some simple examples for use
of \pkg{Rcpp}. At this point the documentation is not complete in the
Modified: pkg/RcppExamples/src/Makevars
===================================================================
--- pkg/RcppExamples/src/Makevars 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/src/Makevars 2012-12-28 04:00:15 UTC (rev 4179)
@@ -1,5 +1,5 @@
## Emacs please make this a -*- mode: Makefile; -*-
##
## Use the R_HOME indirection to support installations of multiple R version
-PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()" ` `$(R_HOME)/bin/Rscript -e "RcppClassic:::LdFlags()" `
+PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()" `
Modified: pkg/RcppExamples/src/Makevars.win
===================================================================
--- pkg/RcppExamples/src/Makevars.win 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/src/Makevars.win 2012-12-28 04:00:15 UTC (rev 4179)
@@ -2,5 +2,4 @@
## This assume that we can call Rscript to ask Rcpp about its locations
## Use the R_HOME indirection to support installations of multiple R version
PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()")
-PKG_LIBS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "RcppClassic:::LdFlags()")
Modified: pkg/RcppExamples/src/newRcppMatrixExample.cpp
===================================================================
--- pkg/RcppExamples/src/newRcppMatrixExample.cpp 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/src/newRcppMatrixExample.cpp 2012-12-28 04:00:15 UTC (rev 4179)
@@ -2,7 +2,7 @@
//
// RcppMatrixExample.cpp: Rcpp R/C++ interface class library RcppMatrix example
//
-// Copyright (C) 2009 - 2010 Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2009 - 2012 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
@@ -19,7 +19,7 @@
// You should have received a copy of the GNU General Public License
// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
-#include <RcppClassic.h>
+#include <Rcpp.h>
#include <cmath>
/* suncc needs help to disambiguate between sqrt( float ) and sqrt(double) */
Modified: pkg/RcppExamples/src/newRcppVectorExample.cpp
===================================================================
--- pkg/RcppExamples/src/newRcppVectorExample.cpp 2012-12-28 03:10:31 UTC (rev 4178)
+++ pkg/RcppExamples/src/newRcppVectorExample.cpp 2012-12-28 04:00:15 UTC (rev 4179)
@@ -4,7 +4,7 @@
//
// Copyright (C) 2005 - 2006 Dominick Samperi
// Copyright (C) 2008 Dirk Eddelbuettel
-// Copyright (C) 2009 - 2010 Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2009 - 2012 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
@@ -21,7 +21,7 @@
// You should have received a copy of the GNU General Public License
// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
-#include <RcppClassic.h>
+#include <Rcpp.h>
#include <cmath>
RcppExport SEXP newRcppVectorExample(SEXP vector) {
More information about the Rcpp-commits
mailing list