[Rcpp-commits] r4131 - in pkg/Rcpp: . inst/include inst/include/Rcpp inst/include/Rcpp/generated inst/include/Rcpp/macros src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Dec 10 16:14:43 CET 2012
Author: romain
Date: 2012-12-10 16:14:43 +0100 (Mon, 10 Dec 2012)
New Revision: 4131
Added:
pkg/Rcpp/inst/include/Rcpp/generated/DataFrame_generated.h
Removed:
pkg/Rcpp/inst/include/Rcpp/DataFrame_generated.h
Modified:
pkg/Rcpp/ChangeLog
pkg/Rcpp/inst/include/Rcpp/DataFrame.h
pkg/Rcpp/inst/include/Rcpp/macros/macros.h
pkg/Rcpp/inst/include/RcppCommon.h
pkg/Rcpp/src/api.cpp
Log:
more cleaning
Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog 2012-12-10 14:44:24 UTC (rev 4130)
+++ pkg/Rcpp/ChangeLog 2012-12-10 15:14:43 UTC (rev 4131)
@@ -8,6 +8,7 @@
* src/Rcpp_init.c: export capabilities (renamed rcpp_capabilities)
* include/Rcpp/traits/traits.h: master file for all traits includes
* include/Rcpp/macros/macros.h: master file for all macros includes
+ * include/Rcpp/DataFrame.h: just have declaration for DataFrame
2012-12-09 Romain Francois <romain at r-enthusiasts.com>
Modified: pkg/Rcpp/inst/include/Rcpp/DataFrame.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/DataFrame.h 2012-12-10 14:44:24 UTC (rev 4130)
+++ pkg/Rcpp/inst/include/Rcpp/DataFrame.h 2012-12-10 15:14:43 UTC (rev 4131)
@@ -22,59 +22,32 @@
#ifndef Rcpp__DataFrame_h
#define Rcpp__DataFrame_h
-#include <RcppCommon.h>
-#include <Rcpp/r_cast.h>
-#include <Rcpp/Vector.h>
+#include <Rcpp/RObject.h>
+#include <Rcpp/vector/00_forward_vector.h>
namespace Rcpp{
- namespace internal{
- inline SEXP empty_data_frame(){
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return ::Rf_eval( ::Rf_lang1( dataFrameSym ), R_GlobalEnv ) ;
- }
- }
-
- class DataFrame : public List {
+ class DataFrame : public Vector<VECSXP> {
public:
- DataFrame(): List( internal::empty_data_frame() ){}
+ DataFrame() ;
+ DataFrame(SEXP x) ;
+ DataFrame( const DataFrame& other) ;
+ DataFrame( const RObject::SlotProxy& proxy ) ;
+ DataFrame( const RObject::AttributeProxy& proxy ) ;
- DataFrame(SEXP x) : List(){
- set(x) ;
- }
+ DataFrame& operator=( DataFrame& other) ;
+ DataFrame& operator=( SEXP x) ;
- DataFrame( const DataFrame& other): List(other.asSexp()) {}
-
- DataFrame( const RObject::SlotProxy& proxy ) { set(proxy); }
- DataFrame( const RObject::AttributeProxy& proxy ) { set(proxy); }
-
- DataFrame& operator=( DataFrame& other){
- setSEXP( other.asSexp() ) ;
- return *this ;
- }
-
- DataFrame& operator=( SEXP x) {
- set(x) ;
- return *this ;
- }
-
- ~DataFrame(){}
+ ~DataFrame() ;
- static DataFrame create(){ return DataFrame() ; }
-
- int nrows(){ return Rf_length( VECTOR_ELT(m_sexp, 0) ); }
+ int nrows() const ;
-#include <Rcpp/DataFrame_generated.h>
+ static DataFrame create(){ return DataFrame() ; }
+#include <Rcpp/generated/DataFrame_generated.h>
+
private:
- void set(SEXP x) {
- if( ::Rf_inherits( x, "data.frame" )){
- setSEXP( x ) ;
- } else{
- SEXP y = internal::convert_using_rfunction( x, "as.data.frame" ) ;
- setSEXP( y ) ;
- }
- }
+ void set(SEXP x) ;
} ;
Deleted: pkg/Rcpp/inst/include/Rcpp/DataFrame_generated.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/DataFrame_generated.h 2012-12-10 14:44:24 UTC (rev 4130)
+++ pkg/Rcpp/inst/include/Rcpp/DataFrame_generated.h 2012-12-10 15:14:43 UTC (rev 4131)
@@ -1,227 +0,0 @@
-// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
-//
-// DataFrame_generated.h: Rcpp R/C++ interface class library -- data frames
-//
-// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
-//
-// This file is part of Rcpp.
-//
-// Rcpp 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.
-//
-// Rcpp 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 Rcpp. If not, see <http://www.gnu.org/licenses/>.
-
-
-#ifndef Rcpp__DataFrame_generated_h
-#define Rcpp__DataFrame_generated_h
-
-
-template <typename T1>
-static DataFrame create( const T1& t1 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2>
-static DataFrame create( const T1& t1, const T2& t2 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20 ) {
- try{
- return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20 ) )));
- } catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
- }
-}
-
-#endif
-
Copied: pkg/Rcpp/inst/include/Rcpp/generated/DataFrame_generated.h (from rev 4125, pkg/Rcpp/inst/include/Rcpp/DataFrame_generated.h)
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/generated/DataFrame_generated.h (rev 0)
+++ pkg/Rcpp/inst/include/Rcpp/generated/DataFrame_generated.h 2012-12-10 15:14:43 UTC (rev 4131)
@@ -0,0 +1,227 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// DataFrame_generated.h: Rcpp R/C++ interface class library -- data frames
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp 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.
+//
+// Rcpp 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 Rcpp. If not, see <http://www.gnu.org/licenses/>.
+
+
+#ifndef Rcpp__DataFrame_generated_h
+#define Rcpp__DataFrame_generated_h
+
+
+template <typename T1>
+static DataFrame create( const T1& t1 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2>
+static DataFrame create( const T1& t1, const T2& t2 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20 ) {
+ try{
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20 ) )));
+ } catch( eval_error& __ex__){
+ throw not_compatible("error calling the data.frame function") ;
+ }
+}
+
+#endif
+
Modified: pkg/Rcpp/inst/include/Rcpp/macros/macros.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/macros/macros.h 2012-12-10 14:44:24 UTC (rev 4130)
+++ pkg/Rcpp/inst/include/Rcpp/macros/macros.h 2012-12-10 15:14:43 UTC (rev 4131)
@@ -42,6 +42,8 @@
#define END_RCPP_RETURN_ERROR } catch( std::exception& __ex__ ){ return exception_to_try_error( __ex__ ) ; } catch(...){ return string_to_try_error( "c++ exception (unknown reason)" ) ; } return R_NilValue;
#endif
+#define Rcpp_error(MESSAGE) throw Rcpp::exception( MESSAGE, __FILE__, __LINE__ )
+
#include <Rcpp/macros/debug.h>
#include <Rcpp/macros/unroll.h>
#include <Rcpp/macros/dispatch.h>
Modified: pkg/Rcpp/inst/include/RcppCommon.h
===================================================================
--- pkg/Rcpp/inst/include/RcppCommon.h 2012-12-10 14:44:24 UTC (rev 4130)
+++ pkg/Rcpp/inst/include/RcppCommon.h 2012-12-10 15:14:43 UTC (rev 4131)
@@ -98,16 +98,8 @@
SEXP try_catch( SEXP expr );
} // namespace internal
-
- inline bool Rboolean_to_bool( int x){ return x == TRUE ; }
- inline bool int_to_bool(int x){ return x != 0 ; }
- inline bool double_to_bool(double x){ return x != 0.0 ; }
- inline bool Rbyte_to_bool(Rbyte x){ return x != static_cast<Rbyte>(0) ; }
-
} // namespace Rcpp
-#define Rcpp_error(MESSAGE) throw Rcpp::exception( MESSAGE, __FILE__, __LINE__ )
-
namespace Rcpp {
inline void stop(const std::string& message) { throw Rcpp::exception(message.c_str()); }
} // namespace Rcpp
@@ -151,7 +143,6 @@
#include <Rcpp/cache.h>
-
// "Rcout" iostream class contributed by Jelmer Ypma
#include <Rcpp/iostream/Rstreambuf.h>
#include <Rcpp/iostream/Rostream.h>
Modified: pkg/Rcpp/src/api.cpp
===================================================================
--- pkg/Rcpp/src/api.cpp 2012-12-10 14:44:24 UTC (rev 4130)
+++ pkg/Rcpp/src/api.cpp 2012-12-10 15:14:43 UTC (rev 4131)
@@ -1046,6 +1046,44 @@
}
// }}}
+ // {{{ DataFrame
+ namespace internal{
+ inline SEXP empty_data_frame(){
+ SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
+ return ::Rf_eval( ::Rf_lang1( dataFrameSym ), R_GlobalEnv ) ;
+ }
+ }
+
+ DataFrame::DataFrame(): List( internal::empty_data_frame() ){}
+ DataFrame::DataFrame(SEXP x) : List(){
+ set(x) ;
+ }
+ DataFrame::DataFrame( const DataFrame& other): List(other.asSexp()) {}
+ DataFrame::DataFrame( const RObject::SlotProxy& proxy ) { set(proxy); }
+ DataFrame::DataFrame( const RObject::AttributeProxy& proxy ) { set(proxy); }
+
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/rcpp -r 4131
More information about the Rcpp-commits
mailing list