[Rcpp-commits] r2584 - in pkg/patches: . R inst inst/examples man src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Nov 29 12:04:15 CET 2010


Author: romain
Date: 2010-11-29 12:04:13 +0100 (Mon, 29 Nov 2010)
New Revision: 2584

Added:
   pkg/patches/inst/
   pkg/patches/inst/examples/
   pkg/patches/inst/examples/sequence.R
Modified:
   pkg/patches/DESCRIPTION
   pkg/patches/R/zzz.R
   pkg/patches/man/patches-package.Rd
   pkg/patches/src/Makevars
   pkg/patches/src/Makevars.win
   pkg/patches/src/Module.cpp
   pkg/patches/src/patches.h
   pkg/patches/src/sequence.cpp
Log:
licence headers, etc ...

Modified: pkg/patches/DESCRIPTION
===================================================================
--- pkg/patches/DESCRIPTION	2010-11-29 10:54:51 UTC (rev 2583)
+++ pkg/patches/DESCRIPTION	2010-11-29 11:04:13 UTC (rev 2584)
@@ -5,7 +5,9 @@
 Date: 2010-11-29
 Author: Romain Francois
 Maintainer: Romain Francois <romain at r-enthusiasts.com>
-Description: Collection of hot pacthes for R
+Description: Collection of hot pacthes for R. At the moment the 
+    package installs a faster version of base::sequence back into the 
+    base namespace
 License: GPL (>= 2.0)
 LazyLoad: yes
 Depends: R (>= 2.12.0), Rcpp (>= 0.8.9)

Modified: pkg/patches/R/zzz.R
===================================================================
--- pkg/patches/R/zzz.R	2010-11-29 10:54:51 UTC (rev 2583)
+++ pkg/patches/R/zzz.R	2010-11-29 11:04:13 UTC (rev 2584)
@@ -1,3 +1,23 @@
+# -*- mode: R; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+#
+# zzz.R: install the patches
+#
+# Copyright (C) 2010	Romain Francois
+#
+# This file is part of patches.
+#
+# patches is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# patches is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with patches.  If not, see <http://www.gnu.org/licenses/>.
 
 hijack <- function(name, value, namespace = "base" ){
 	namespace <- asNamespace( namespace )

Added: pkg/patches/inst/examples/sequence.R
===================================================================
--- pkg/patches/inst/examples/sequence.R	                        (rev 0)
+++ pkg/patches/inst/examples/sequence.R	2010-11-29 11:04:13 UTC (rev 2584)
@@ -0,0 +1,28 @@
+# -*- mode: R; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+#
+# Copyright (C) 2010	Romain Francois
+#
+# This file is part of patches.
+#
+# patches is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# patches is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with patches.  If not, see <http://www.gnu.org/licenses/>.
+
+x <- 1:10000
+cat( "base::sequence : \n" )
+system.time( sequence( x ) )
+
+cat( "after loading patches :\n" )
+require( patches )
+system.time( sequence(x) )
+
+

Modified: pkg/patches/man/patches-package.Rd
===================================================================
--- pkg/patches/man/patches-package.Rd	2010-11-29 10:54:51 UTC (rev 2583)
+++ pkg/patches/man/patches-package.Rd	2010-11-29 11:04:13 UTC (rev 2584)
@@ -19,8 +19,12 @@
 }
 
 A faster version of \link[base]{sequence} is installed
-in the base namespace when patches loads. 
+in the base namespace when patches loads. The patch is based on a variation 
+of the code submitted to R-devel in this thread 
+\url{http://article.gmane.org/gmane.comp.lang.r.devel/26157}
 
+More patches will be added
+
 }
 \author{
 Romain Francois

Modified: pkg/patches/src/Makevars
===================================================================
--- pkg/patches/src/Makevars	2010-11-29 10:54:51 UTC (rev 2583)
+++ pkg/patches/src/Makevars	2010-11-29 11:04:13 UTC (rev 2584)
@@ -1,27 +1,2 @@
-## Use the R_HOME indirection to support installations of multiple R version
 PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`
 
-## As an alternative, one can also add this code in a file 'configure'
-##
-##    PKG_LIBS=`${R_HOME}/bin/Rscript -e "Rcpp:::LdFlags()"`
-## 
-##    sed -e "s|@PKG_LIBS@|${PKG_LIBS}|" \
-##        src/Makevars.in > src/Makevars
-## 
-## which together with the following file 'src/Makevars.in'
-##
-##    PKG_LIBS = @PKG_LIBS@
-##
-## can be used to create src/Makevars dynamically. This scheme is more
-## powerful and can be expanded to also check for and link with other
-## libraries.  It should be complemented by a file 'cleanup'
-##
-##    rm src/Makevars
-##
-## which removes the autogenerated file src/Makevars. 
-##
-## Of course, autoconf can also be used to write configure files. This is
-## done by a number of packages, but recommended only for more advanced users
-## comfortable with autoconf and its related tools.
-
-

Modified: pkg/patches/src/Makevars.win
===================================================================
--- pkg/patches/src/Makevars.win	2010-11-29 10:54:51 UTC (rev 2583)
+++ pkg/patches/src/Makevars.win	2010-11-29 11:04:13 UTC (rev 2584)
@@ -1,4 +1,2 @@
-
-## 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()")
 

Modified: pkg/patches/src/Module.cpp
===================================================================
--- pkg/patches/src/Module.cpp	2010-11-29 10:54:51 UTC (rev 2583)
+++ pkg/patches/src/Module.cpp	2010-11-29 11:04:13 UTC (rev 2584)
@@ -1,3 +1,24 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// Module.cpp: Rcpp module that exposes the internal functions
+//
+// Copyright (C) 2010	Romain Francois
+//
+// This file is part of patches.
+//
+// patches is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// patches is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with patches.  If not, see <http://www.gnu.org/licenses/>.
+
 #include "patches.h"
 
 using namespace Rcpp ;

Modified: pkg/patches/src/patches.h
===================================================================
--- pkg/patches/src/patches.h	2010-11-29 10:54:51 UTC (rev 2583)
+++ pkg/patches/src/patches.h	2010-11-29 11:04:13 UTC (rev 2584)
@@ -1,3 +1,24 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// patches.h: Exposed C++ functions
+//
+// Copyright (C) 2010	Romain Francois
+//
+// This file is part of patches.
+//
+// patches is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// patches is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with patches.  If not, see <http://www.gnu.org/licenses/>.
+
 #ifndef _patches_RCPP_HELLO_WORLD_H
 #define _patches_RCPP_HELLO_WORLD_H
 

Modified: pkg/patches/src/sequence.cpp
===================================================================
--- pkg/patches/src/sequence.cpp	2010-11-29 10:54:51 UTC (rev 2583)
+++ pkg/patches/src/sequence.cpp	2010-11-29 11:04:13 UTC (rev 2584)
@@ -1,3 +1,24 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// sequence.cpp: patch for base::sequence
+//
+// Copyright (C) 2010	Romain Francois
+//
+// This file is part of patches.
+//
+// patches is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// patches is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with patches.  If not, see <http://www.gnu.org/licenses/>.
+
 #include "patches.h"
 
 using namespace Rcpp ;



More information about the Rcpp-commits mailing list