[Rcpp-commits] r3386 - pkg/int64/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Nov 18 20:46:03 CET 2011


Author: romain
Date: 2011-11-18 20:46:03 +0100 (Fri, 18 Nov 2011)
New Revision: 3386

Modified:
   pkg/int64/R/int64.R
Log:
simple solution for as.data.frame.[u]int64, just use as.data.frame.vector

Modified: pkg/int64/R/int64.R
===================================================================
--- pkg/int64/R/int64.R	2011-11-18 19:25:35 UTC (rev 3385)
+++ pkg/int64/R/int64.R	2011-11-18 19:46:03 UTC (rev 3386)
@@ -214,12 +214,7 @@
   .Call( int64_as_character_int64, x, TRUE)  
 })
 setGeneric("as.data.frame")
-as.data.frame.int64 <- as.data.frame.uint64 <- function(x,row.names = NULL, optional = FALSE, ...){
-   res <- data.frame( x =  seq_len(length(x)) )
-   names(res) <- deparse( substitute(x ) )
-   res[[1L]] <- x
-   res
-}
+as.data.frame.int64 <- as.data.frame.uint64 <- as.data.frame.vector
 setMethod( "as.data.frame", "int64" , as.data.frame.int64  )
 setMethod( "as.data.frame", "uint64", as.data.frame.uint64 )
          



More information about the Rcpp-commits mailing list