[Rcpp-commits] r973 - in pkg: . RcppGsl RcppGsl/R RcppGsl/inst RcppGsl/inst/include RcppGsl/man RcppGsl/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Apr 4 10:00:18 CEST 2010


Author: romain
Date: 2010-04-04 10:00:18 +0200 (Sun, 04 Apr 2010)
New Revision: 973

Added:
   pkg/RcppGsl/
   pkg/RcppGsl/DESCRIPTION
   pkg/RcppGsl/NAMESPACE
   pkg/RcppGsl/R/
   pkg/RcppGsl/R/zzz.R
   pkg/RcppGsl/inst/
   pkg/RcppGsl/inst/include/
   pkg/RcppGsl/inst/include/RcppGsl.h
   pkg/RcppGsl/man/
   pkg/RcppGsl/man/RcppGsl-package.Rd
   pkg/RcppGsl/src/
   pkg/RcppGsl/src/Makevars
   pkg/RcppGsl/src/Makevars.win
Log:
skeleton for RcppGsl package following the same pattern as RcppArmadillo

Added: pkg/RcppGsl/DESCRIPTION
===================================================================
--- pkg/RcppGsl/DESCRIPTION	                        (rev 0)
+++ pkg/RcppGsl/DESCRIPTION	2010-04-04 08:00:18 UTC (rev 973)
@@ -0,0 +1,11 @@
+Package: RcppGsl
+Type: Package
+Title: glue between Rcpp and gsl
+Version: 0.0
+Date: 2010-04-04
+Author: Romain Francois and Dirk Eddelbuettel
+Maintainer: Romain and Dirk <RomainAndDirk at r-enthusiasts.com>
+Description: glue between Rcpp and gsl
+License: GPL (>=2)
+LazyLoad: yes
+Depends: Rcpp (>= 0.7.11)

Added: pkg/RcppGsl/NAMESPACE
===================================================================
--- pkg/RcppGsl/NAMESPACE	                        (rev 0)
+++ pkg/RcppGsl/NAMESPACE	2010-04-04 08:00:18 UTC (rev 973)
@@ -0,0 +1,2 @@
+useDynLib(RcppGsl)
+exportPattern("^[[:alpha:]]+")

Added: pkg/RcppGsl/R/zzz.R
===================================================================
--- pkg/RcppGsl/R/zzz.R	                        (rev 0)
+++ pkg/RcppGsl/R/zzz.R	2010-04-04 08:00:18 UTC (rev 973)
@@ -0,0 +1 @@
+.onLoad <- function(libname,pkgname){}

Added: pkg/RcppGsl/inst/include/RcppGsl.h
===================================================================
--- pkg/RcppGsl/inst/include/RcppGsl.h	                        (rev 0)
+++ pkg/RcppGsl/inst/include/RcppGsl.h	2010-04-04 08:00:18 UTC (rev 973)
@@ -0,0 +1,53 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// RcppGsl.h: Rcpp/gsl glue
+//
+// Copyright (C)  2010 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of RcppGsl.
+//
+// RcppGsl 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.
+//
+// RcppGsl 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 RcppGsl.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPPGSL__RCPPGSL_H
+#define RCPPGSL__RCPPGSL_H
+
+#include <RcppCommon.h>
+#include <gsl_vector.h>
+
+/* forward declarations */
+namespace Rcpp{
+	template <> SEXP wrap( const gsl_vector& ) ;
+}
+
+/* implementations */
+#include <Rcpp.h>
+
+namespace Rcpp{
+	
+// namespace RcppGsl{
+// 
+// template <typename T> struct gsl_vector_type_traits ;
+// template <> struct gsl_vector_type_traits<gsl_vector> {
+// 	typedef double type ;
+// } ;
+// 
+// } // namespace RcppGsl
+
+template <> SEXP wrap( const gsl_vector& x){
+	return wrap( x.data, x.data + x.size ) ;
+}
+
+} 
+
+#endif

Added: pkg/RcppGsl/man/RcppGsl-package.Rd
===================================================================
--- pkg/RcppGsl/man/RcppGsl-package.Rd	                        (rev 0)
+++ pkg/RcppGsl/man/RcppGsl-package.Rd	2010-04-04 08:00:18 UTC (rev 973)
@@ -0,0 +1,30 @@
+\name{RcppGsl-package}
+\alias{RcppGsl-package}
+\alias{RcppGsl}
+\docType{package}
+\title{
+glue between Rcpp and gsl
+}
+\description{
+glue between Rcpp and gsl
+}
+\details{
+\tabular{ll}{
+Package: \tab RcppGsl\cr
+Type: \tab Package\cr
+Version: \tab 0.0\cr
+Date: \tab 2010-04-04\cr
+License: \tab GPL (>= 2)\cr
+LazyLoad: \tab yes\cr
+}
+}
+\author{
+ Romain Francois and Dirk Eddelbuettel
+
+Maintainer: Romain and Dirk <RomainAndDirk at r-enthusiasts.com>
+}
+\references{
+	GSL: Gnu scientific library: \url{http://www.gnu.org/software/gsl/}
+}
+\keyword{ package }
+

Added: pkg/RcppGsl/src/Makevars
===================================================================
--- pkg/RcppGsl/src/Makevars	                        (rev 0)
+++ pkg/RcppGsl/src/Makevars	2010-04-04 08:00:18 UTC (rev 973)
@@ -0,0 +1,5 @@
+## Use the R_HOME indirection to support installations of multiple R version
+PKG_CPPFLAGS=$(shell $(R_HOME)/bin/Rscript --vanilla -e "Rcpp:::CxxFlags()" )
+PKG_LIBS = $(shell $(R_HOME)/bin/Rscript --vanilla -e "Rcpp:::LdFlags()" )
+
+

Added: pkg/RcppGsl/src/Makevars.win
===================================================================
--- pkg/RcppGsl/src/Makevars.win	                        (rev 0)
+++ pkg/RcppGsl/src/Makevars.win	2010-04-04 08:00:18 UTC (rev 973)
@@ -0,0 +1,5 @@
+## 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_CPPFLAGS=$(shell $(R_HOME)/bin/Rscript --vanilla -e "Rcpp:::CxxFlags()" )
+PKG_LIBS = $(shell $(R_HOME)/bin/Rscript --vanilla -e "Rcpp:::LdFlags()" )
+



More information about the Rcpp-commits mailing list