[Rcpp-commits] r4299 - scripts

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Apr 2 16:19:55 CEST 2013


Author: romain
Date: 2013-04-02 16:19:55 +0200 (Tue, 02 Apr 2013)
New Revision: 4299

Modified:
   scripts/DataFrame.R
Log:
changed script to generate DataFrame::create

Modified: scripts/DataFrame.R
===================================================================
--- scripts/DataFrame.R	2013-03-31 15:53:18 UTC (rev 4298)
+++ scripts/DataFrame.R	2013-04-02 14:19:55 UTC (rev 4299)
@@ -8,11 +8,7 @@
     sprintf('
 template <%s>
 static DataFrame create( %s ) {
-    try{
-        return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( %s ) )));
-    } catch( eval_error& __ex__){
-        throw not_compatible("error calling the data.frame function") ;
-    }
+    return DataFrame( List::create( %s ) ) ;
 } ',
             paste( sprintf( "typename T%d", 1:i ), collapse = ", "),
             paste( sprintf( "const T%d& t%d", 1:i, 1:i ), collapse = ", "),
@@ -25,7 +21,7 @@
 //
 // DataFrame_generated.h: Rcpp R/C++ interface class library -- data frames
 //
-// Copyright (C) 2010 - 2011  Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2010 - 2013  Dirk Eddelbuettel and Romain Francois
 //
 // This file is part of Rcpp.
 //
@@ -52,5 +48,5 @@
 ' ,
 paste( sapply( 1:20, DataFrame_generator ), collapse = "\n\n" )
 )
-writeLines( content, "Rcpp/inst/include/Rcpp/DataFrame_generated.h" )
+writeLines( content, "Rcpp/inst/include/Rcpp/generated/DataFrame_generated.h" )
 



More information about the Rcpp-commits mailing list