[Rcpp-commits] r3398 - in pkg/int64: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Nov 26 19:59:10 CET 2011
Author: romain
Date: 2011-11-26 19:59:09 +0100 (Sat, 26 Nov 2011)
New Revision: 3398
Modified:
pkg/int64/ChangeLog
pkg/int64/NAMESPACE
pkg/int64/R/int64.R
Log:
str.[u]int64 as requested by hadley
Modified: pkg/int64/ChangeLog
===================================================================
--- pkg/int64/ChangeLog 2011-11-24 08:56:39 UTC (rev 3397)
+++ pkg/int64/ChangeLog 2011-11-26 18:59:09 UTC (rev 3398)
@@ -1,5 +1,9 @@
2011-11-23 Romain Francois <romain at r-enthusiasts.com>
+ * R/int64.R: str.[u]int64 as requested by Hadley Wickham
+
+2011-11-23 Romain Francois <romain at r-enthusiasts.com>
+
* inst/unitTests/runit.int64.R: testing read.csv
2011-11-23 Romain Francois <romain at r-enthusiasts.com>
Modified: pkg/int64/NAMESPACE
===================================================================
--- pkg/int64/NAMESPACE 2011-11-24 08:56:39 UTC (rev 3397)
+++ pkg/int64/NAMESPACE 2011-11-26 18:59:09 UTC (rev 3398)
@@ -19,3 +19,6 @@
S3method( as.data.frame , int64 )
S3method( as.data.frame , uint64 )
+S3method( str, int64 )
+S3method( str, uint64 )
+
Modified: pkg/int64/R/int64.R
===================================================================
--- pkg/int64/R/int64.R 2011-11-24 08:56:39 UTC (rev 3397)
+++ pkg/int64/R/int64.R 2011-11-26 18:59:09 UTC (rev 3398)
@@ -323,3 +323,10 @@
setAs("numeric", "int64", function(from) as.int64(from))
setAs("numeric", "uint64", function(from) as.uint64(from))
+str.int64 <- str.uint64 <- function(object, ...){
+ writeLines( sprintf( " %s [1:%d] %s ...", class(object), length(object),
+ paste( as.character( head( object, 3 ) ), collapse = " " )
+ ) )
+}
+
+
More information about the Rcpp-commits
mailing list