[R-gregmisc-commits] r2147 - pkg/SASxport/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu May 25 00:09:13 CEST 2017


Author: warnes
Date: 2017-05-25 00:09:12 +0200 (Thu, 25 May 2017)
New Revision: 2147

Removed:
   pkg/SASxport/tests/testFactorAllNA.R
Modified:
   pkg/SASxport/tests/Alfalfa_Test.Rout.save
   pkg/SASxport/tests/Theoph.Rout.save
   pkg/SASxport/tests/cars.Rout.save
   pkg/SASxport/tests/testDates.Rout.save
   pkg/SASxport/tests/testDuplicateNames.Rout.save
   pkg/SASxport/tests/testEmpty.Rout.save
   pkg/SASxport/tests/testExamples.R
   pkg/SASxport/tests/testExamples.Rout.save
   pkg/SASxport/tests/testManyNames.Rout.save
   pkg/SASxport/tests/testNegative.Rout.save
   pkg/SASxport/tests/testNumeric.Rout.save
   pkg/SASxport/tests/testUnnamedComponents.Rout.save
   pkg/SASxport/tests/test_as_is.Rout.save
   pkg/SASxport/tests/test_fields.Rout.save
   pkg/SASxport/tests/xport.Rout.save
   pkg/SASxport/tests/xxx.Rout.save
Log:
Update stored test output.

Modified: pkg/SASxport/tests/Alfalfa_Test.Rout.save
===================================================================
--- pkg/SASxport/tests/Alfalfa_Test.Rout.save	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/Alfalfa_Test.Rout.save	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,7 +1,7 @@
 
-R version 3.1.0 Patched (2014-05-26 r65771) -- "Spring Dance"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-apple-darwin13.1.0 (64-bit)
+R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-apple-darwin13.4.0 (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -19,13 +19,12 @@
 > ## existing SAS xport file "Alfalfa.xpt"
 > 
 > library(SASxport)
-Loading required package: chron
-Loading required package: Hmisc
-Loading required package: grid
-Loading required package: lattice
-Loading required package: survival
-Loading required package: splines
-Loading required package: Formula
+
+Loaded SASxport version 1.5.4 (2017-05-22).
+
+  Type `?SASxport' for usage information.
+
+
 > Sys.setenv("TZ"="GMT")
 > 
 > # existing data file
@@ -849,4 +848,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.518   0.053   0.561 
+  1.454   0.097   1.557 

Modified: pkg/SASxport/tests/Theoph.Rout.save
===================================================================
--- pkg/SASxport/tests/Theoph.Rout.save	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/Theoph.Rout.save	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,7 +1,7 @@
 
-R version 3.1.0 Patched (2014-05-26 r65771) -- "Spring Dance"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-apple-darwin13.1.0 (64-bit)
+R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-apple-darwin13.4.0 (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -21,13 +21,12 @@
 > ####
 > 
 > library(SASxport)
-Loading required package: chron
-Loading required package: Hmisc
-Loading required package: grid
-Loading required package: lattice
-Loading required package: survival
-Loading required package: splines
-Loading required package: Formula
+
+Loaded SASxport version 1.5.4 (2017-05-22).
+
+  Type `?SASxport' for usage information.
+
+
 > Sys.setenv("TZ"="GMT")
 > 
 > write.xport(Theoph,file="theoph.xpt")
@@ -45,4 +44,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.584   0.038   0.610 
+  1.522   0.077   1.606 

Modified: pkg/SASxport/tests/cars.Rout.save
===================================================================
--- pkg/SASxport/tests/cars.Rout.save	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/cars.Rout.save	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,7 +1,7 @@
 
-R version 3.1.0 Patched (2014-05-26 r65771) -- "Spring Dance"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-apple-darwin13.1.0 (64-bit)
+R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-apple-darwin13.4.0 (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -16,13 +16,12 @@
 Type 'q()' to quit R.
 
 > library(SASxport)
-Loading required package: chron
-Loading required package: Hmisc
-Loading required package: grid
-Loading required package: lattice
-Loading required package: survival
-Loading required package: splines
-Loading required package: Formula
+
+Loaded SASxport version 1.5.4 (2017-05-22).
+
+  Type `?SASxport' for usage information.
+
+
 > Sys.setenv("TZ"="GMT")
 > 
 > 
@@ -513,4 +512,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.483   0.048   0.533 
+  1.400   0.086   1.492 

Modified: pkg/SASxport/tests/testDates.Rout.save
===================================================================
--- pkg/SASxport/tests/testDates.Rout.save	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/testDates.Rout.save	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,7 +1,7 @@
 
-R version 3.1.0 Patched (2014-05-26 r65771) -- "Spring Dance"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-apple-darwin13.1.0 (64-bit)
+R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-apple-darwin13.4.0 (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -16,13 +16,12 @@
 Type 'q()' to quit R.
 
 > library(SASxport)
-Loading required package: chron
-Loading required package: Hmisc
-Loading required package: grid
-Loading required package: lattice
-Loading required package: survival
-Loading required package: splines
-Loading required package: Formula
+
+Loaded SASxport version 1.5.4 (2017-05-22).
+
+  Type `?SASxport' for usage information.
+
+
 > Sys.setenv("TZ"="GMT")
 > 
 > ## Create a small data set containing dates, times, and date-times
@@ -64,4 +63,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.472   0.034   0.496 
+  1.458   0.079   1.543 

Modified: pkg/SASxport/tests/testDuplicateNames.Rout.save
===================================================================
--- pkg/SASxport/tests/testDuplicateNames.Rout.save	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/testDuplicateNames.Rout.save	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,7 +1,7 @@
 
-R version 3.1.0 Patched (2014-05-26 r65771) -- "Spring Dance"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-apple-darwin13.1.0 (64-bit)
+R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-apple-darwin13.4.0 (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -16,13 +16,12 @@
 Type 'q()' to quit R.
 
 > library(SASxport)
-Loading required package: chron
-Loading required package: Hmisc
-Loading required package: grid
-Loading required package: lattice
-Loading required package: survival
-Loading required package: splines
-Loading required package: Formula
+
+Loaded SASxport version 1.5.4 (2017-05-22).
+
+  Type `?SASxport' for usage information.
+
+
 > Sys.setenv("TZ"="GMT")
 > 
 > ## Read example dataset from a local file
@@ -35,24 +34,24 @@
 In makeSASNames(dfNames) : Made 3 duplicate names unique.
 > read.xport("dn.a.xpt")
 $AA
-  RACE AGE         D1                    DT1       T1
-1 blue  30 2002-03-03 (03 Mar 2002 09:31:02) 11:13:45
-2       31 2002-06-03 (03 Jun 2002 09:42:07) 11:14:13
+  RACE AGE         D1                 DT1       T1
+1 blue  30 2002-03-03 2002-03-03 09:31:02 11:13:45
+2       31 2002-06-03 2002-06-03 09:42:07 11:14:13
 
 $AA.1
-  RACE AGE         D1                    DT1       T1
-1 blue  30 2002-03-03 (03 Mar 2002 09:31:02) 11:13:45
-2       31 2002-06-03 (03 Jun 2002 09:42:07) 11:14:13
+  RACE AGE         D1                 DT1       T1
+1 blue  30 2002-03-03 2002-03-03 09:31:02 11:13:45
+2       31 2002-06-03 2002-06-03 09:42:07 11:14:13
 
 $AA.2
-  RACE AGE         D1                    DT1       T1
-1 blue  30 2002-03-03 (03 Mar 2002 09:31:02) 11:13:45
-2       31 2002-06-03 (03 Jun 2002 09:42:07) 11:14:13
+  RACE AGE         D1                 DT1       T1
+1 blue  30 2002-03-03 2002-03-03 09:31:02 11:13:45
+2       31 2002-06-03 2002-06-03 09:42:07 11:14:13
 
 $AA.3
-  RACE AGE         D1                    DT1       T1
-1 blue  30 2002-03-03 (03 Mar 2002 09:31:02) 11:13:45
-2       31 2002-06-03 (03 Jun 2002 09:42:07) 11:14:13
+  RACE AGE         D1                 DT1       T1
+1 blue  30 2002-03-03 2002-03-03 09:31:02 11:13:45
+2       31 2002-06-03 2002-06-03 09:42:07 11:14:13
 
 > 
 > # Duplicate column names
@@ -63,13 +62,13 @@
 Warning message:
 In makeSASNames(colnames(df)) : Made 5 duplicate names unique.
 > read.xport("dn.b.xpt")
-  RACE AGE         D1                    DT1       T1 RACE.1 AGE.1       D1.1
-1 blue  30 2002-03-03 (03 Mar 2002 09:31:02) 11:13:45   blue    30 2002-03-03
-2       31 2002-06-03 (03 Jun 2002 09:42:07) 11:14:13           31 2002-06-03
-                   DT1.1     T1.1
-1 (03 Mar 2002 09:31:02) 11:13:45
-2 (03 Jun 2002 09:42:07) 11:14:13
+  RACE AGE         D1                 DT1       T1 RACE.1 AGE.1       D1.1
+1 blue  30 2002-03-03 2002-03-03 09:31:02 11:13:45   blue    30 2002-03-03
+2       31 2002-06-03 2002-06-03 09:42:07 11:14:13           31 2002-06-03
+                DT1.1     T1.1
+1 2002-03-03 09:31:02 11:13:45
+2 2002-06-03 09:42:07 11:14:13
 > 
 > proc.time()
    user  system elapsed 
-  0.493   0.036   0.518 
+  1.479   0.083   1.577 

Modified: pkg/SASxport/tests/testEmpty.Rout.save
===================================================================
--- pkg/SASxport/tests/testEmpty.Rout.save	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/testEmpty.Rout.save	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,7 +1,7 @@
 
-R version 3.1.0 Patched (2014-05-26 r65771) -- "Spring Dance"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-apple-darwin13.1.0 (64-bit)
+R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-apple-darwin13.4.0 (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -16,13 +16,12 @@
 Type 'q()' to quit R.
 
 > library(SASxport)
-Loading required package: chron
-Loading required package: Hmisc
-Loading required package: grid
-Loading required package: lattice
-Loading required package: survival
-Loading required package: splines
-Loading required package: Formula
+
+Loaded SASxport version 1.5.4 (2017-05-22).
+
+  Type `?SASxport' for usage information.
+
+
 > 
 > data(iris)
 > write.xport(Iris1=iris[1:2,],
@@ -72,4 +71,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.515   0.038   0.541 
+  1.453   0.078   1.538 

Modified: pkg/SASxport/tests/testExamples.R
===================================================================
--- pkg/SASxport/tests/testExamples.R	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/testExamples.R	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,5 +1,4 @@
 library(SASxport)
-library(Hmisc)
 Sys.setenv("TZ"="GMT")
 
 set.seed(42)

Modified: pkg/SASxport/tests/testExamples.Rout.save
===================================================================
--- pkg/SASxport/tests/testExamples.Rout.save	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/testExamples.Rout.save	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,5 +1,5 @@
 
-R version 3.2.4 (2016-03-10) -- "Very Secure Dishes"
+R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
 Copyright (C) 2016 The R Foundation for Statistical Computing
 Platform: x86_64-apple-darwin13.4.0 (64-bit)
 
@@ -16,17 +16,11 @@
 Type 'q()' to quit R.
 
 > library(SASxport)
-> library(Hmisc)
-Loading required package: lattice
-Loading required package: survival
-Loading required package: Formula
-Loading required package: ggplot2
 
-Attaching package: 'Hmisc'
+Loaded SASxport version 1.5.4 (2017-05-22).
 
-The following objects are masked from 'package:base':
+  Type `?SASxport' for usage information.
 
-    format.pval, round.POSIXt, trunc.POSIXt, units
 
 > Sys.setenv("TZ"="GMT")
 > 
@@ -178,4 +172,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.626   0.040   0.656 
+  1.428   0.078   1.519 

Deleted: pkg/SASxport/tests/testFactorAllNA.R
===================================================================
--- pkg/SASxport/tests/testFactorAllNA.R	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/testFactorAllNA.R	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,17 +0,0 @@
-library(SASxport)
-Sys.setenv("TZ"="GMT")
-
-x <- data.frame(A=1:10,
-                B=letters[1:10],
-                C=factor(rep(NA,10)),
-                D=factor(rep(NA,10), levels=c("A","B","C")),
-                E=as.numeric(rep(NA,10)),
-                stringsAsFactors=FALSE                
-                )
-write.xport(x,file='testFactorAllNA.out.xpt')
-
-y <- read.xport(file='testFactorAllNA.out.xpt')
-
-stopifnot( all.equal(x,y, check.attributes = FALSE) )
-stopifnot( all.equal(levels(x$C), levels(y$C) ) )
-stopifnot( all.equal(levels(x$D), levels(y$D) ) )

Modified: pkg/SASxport/tests/testManyNames.Rout.save
===================================================================
--- pkg/SASxport/tests/testManyNames.Rout.save	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/testManyNames.Rout.save	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,7 +1,7 @@
 
-R version 3.1.0 Patched (2014-05-26 r65771) -- "Spring Dance"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-apple-darwin13.1.0 (64-bit)
+R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-apple-darwin13.4.0 (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -16,13 +16,12 @@
 Type 'q()' to quit R.
 
 > library(SASxport)
-Loading required package: chron
-Loading required package: Hmisc
-Loading required package: grid
-Loading required package: lattice
-Loading required package: survival
-Loading required package: splines
-Loading required package: Formula
+
+Loaded SASxport version 1.5.4 (2017-05-22).
+
+  Type `?SASxport' for usage information.
+
+
 > Sys.setenv("TZ"="GMT")
 > 
 > data(iris)
@@ -97,4 +96,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  4.290   0.056   4.341 
+  4.495   0.116   4.636 

Modified: pkg/SASxport/tests/testNegative.Rout.save
===================================================================
--- pkg/SASxport/tests/testNegative.Rout.save	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/testNegative.Rout.save	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,7 +1,7 @@
 
-R version 3.1.0 Patched (2014-05-26 r65771) -- "Spring Dance"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-apple-darwin13.1.0 (64-bit)
+R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-apple-darwin13.4.0 (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -16,13 +16,12 @@
 Type 'q()' to quit R.
 
 > library(SASxport)
-Loading required package: chron
-Loading required package: Hmisc
-Loading required package: grid
-Loading required package: lattice
-Loading required package: survival
-Loading required package: splines
-Loading required package: Formula
+
+Loaded SASxport version 1.5.4 (2017-05-22).
+
+  Type `?SASxport' for usage information.
+
+
 > Sys.setenv("TZ"="GMT")
 > 
 > df1 <- data.frame( f=c(1.0, -1.0), d=as.integer(c(-1,1) )  )
@@ -50,4 +49,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.513   0.036   0.538 
+  1.547   0.086   1.652 

Modified: pkg/SASxport/tests/testNumeric.Rout.save
===================================================================
--- pkg/SASxport/tests/testNumeric.Rout.save	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/testNumeric.Rout.save	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,7 +1,7 @@
 
-R version 3.1.0 Patched (2014-05-26 r65771) -- "Spring Dance"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-apple-darwin13.1.0 (64-bit)
+R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-apple-darwin13.4.0 (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -16,13 +16,12 @@
 Type 'q()' to quit R.
 
 > library(SASxport)
-Loading required package: chron
-Loading required package: Hmisc
-Loading required package: grid
-Loading required package: lattice
-Loading required package: survival
-Loading required package: splines
-Loading required package: Formula
+
+Loaded SASxport version 1.5.4 (2017-05-22).
+
+  Type `?SASxport' for usage information.
+
+
 > Sys.setenv("TZ"="GMT")
 > 
 > ##
@@ -89,4 +88,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.560   0.034   0.584 
+  1.520   0.080   1.609 

Modified: pkg/SASxport/tests/testUnnamedComponents.Rout.save
===================================================================
--- pkg/SASxport/tests/testUnnamedComponents.Rout.save	2017-05-24 21:40:13 UTC (rev 2146)
+++ pkg/SASxport/tests/testUnnamedComponents.Rout.save	2017-05-24 22:09:12 UTC (rev 2147)
@@ -1,7 +1,7 @@
 
-R version 3.1.0 Patched (2014-05-26 r65771) -- "Spring Dance"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-apple-darwin13.1.0 (64-bit)
+R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-apple-darwin13.4.0 (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -16,25 +16,12 @@
 Type 'q()' to quit R.
 
 > library(SASxport)
-Loading required package: chron
-Loading required package: Hmisc
-Loading required package: grid
-Loading required package: lattice
-Loading required package: survival
-Loading required package: splines
-Loading required package: Formula
 
-Attaching package: 'Hmisc'
+Loaded SASxport version 1.5.4 (2017-05-22).
 
-The following objects are masked from 'package:base':
-
-    format.pval, round.POSIXt, trunc.POSIXt, units
-
-
-Loaded SASxport version 1.5.0 (2014-07-21).
-
   Type `?SASxport' for usage information.
 
+
 > Sys.setenv("TZ"="GMT")
 > 
 > ##tests
@@ -90,9 +77,9 @@
 
 rd.xpr> sapply(w, head)
 $TEST
-  RACE AGE         D1                    DT1       T1
-1 blue  30 2002-03-03 (03 Mar 2002 09:31:02) 11:13:45
-2 <NA>  31 2002-06-03 (03 Jun 2002 09:42:07) 11:14:13
+  RACE AGE         D1                 DT1       T1
+1 blue  30 2002-03-03 2002-03-03 09:31:02 11:13:45
+2 <NA>  31 2002-06-03 2002-06-03 09:42:07 11:14:13
 
 $Z
          X3        X4         X5        X6        X7         X8
@@ -118,9 +105,9 @@
 
 rd.xpr> sapply(w, head)
 $TEST
-  RACE AGE         D1                    DT1       T1
-1 blue  30 2002-03-03 (03 Mar 2002 09:31:02) 11:13:45
-2 <NA>  31 2002-06-03 (03 Jun 2002 09:42:07) 11:14:13
+  RACE AGE         D1                 DT1       T1
+1 blue  30 2002-03-03 2002-03-03 09:31:02 11:13:45
+2 <NA>  31 2002-06-03 2002-06-03 09:42:07 11:14:13
 
 $Z
          X3        X4         X5        X6        X7         X8
@@ -140,9 +127,9 @@
 
 rd.xpr> sapply(w, head)
 $TEST
-  RACE AGE         D1                    DT1       T1
-1 blue  30 2002-03-03 (03 Mar 2002 09:31:02) 11:13:45
-2 <NA>  31 2002-06-03 (03 Jun 2002 09:42:07) 11:14:13
+  RACE AGE         D1                 DT1       T1
+1 blue  30 2002-03-03 2002-03-03 09:31:02 11:13:45
+2 <NA>  31 2002-06-03 2002-06-03 09:42:07 11:14:13
 
 $Z
          X3        X4         X5        X6        X7         X8
@@ -167,300 +154,24 @@
 rd.xpr> ## Don't show: 
 rd.xpr> stopifnot( is.data.frame(w)==FALSE && is.list(w)==TRUE )
 
-rd.xpr> ## End Don't show
+rd.xpr> ## End(Don't show)
 rd.xpr> 
-rd.xpr> 
 rd.xpr> #### The Hmisc library provides many useful functions for interacting with
 rd.xpr> #### data imported from SAS via read.xport()
-rd.xpr> library(Hmisc)
-
-rd.xpr> describe(w$TEST)   # see labels, format names for dataset test
-w$TEST 
-
- 5  Variables      2  Observations
---------------------------------------------------------------------------------
-RACE 
-      n missing  unique   value 
-      1       1       1    blue 
---------------------------------------------------------------------------------
-AGE : Age at Beginning of Study 
-      n missing  unique    Info    Mean 
-      2       0       2       1    30.5 
-
-30 (1, 50%), 31 (1, 50%) 
---------------------------------------------------------------------------------
-D1 
-      n missing  unique 
-      2       0       2 
-
-2002-03-03 (1, 50%), 2002-06-03 (1, 50%) 
---------------------------------------------------------------------------------
-DT1  Format:day mon year h:m:s 
-                     n                missing                 unique 
-                     2                      0                      2 
-                  Info                   Mean 
-                     1 (18 Apr 2002 09:36:35) 
-
-(03 Jun 2002 09:42:07) (1, 50%) 
-(03 Mar 2002 09:31:02) (1, 50%) 
---------------------------------------------------------------------------------
-T1  Format:h:m:s 
-      n missing  unique    Info    Mean 
-      2       0       2       1    :01: 
-
-11:13:45 (1, 50%), 11:14:13 (1, 50%) 
---------------------------------------------------------------------------------
-
-rd.xpr> lapply(w, describe)# see descriptive stats in more detail for each variable
-$TEST
-X[[1]] 
-
- 5  Variables      2  Observations
---------------------------------------------------------------------------------
-RACE 
-      n missing  unique   value 
-      1       1       1    blue 
---------------------------------------------------------------------------------
-AGE : Age at Beginning of Study 
-      n missing  unique    Info    Mean 
-      2       0       2       1    30.5 
-
-30 (1, 50%), 31 (1, 50%) 
---------------------------------------------------------------------------------
-D1 
-      n missing  unique 
-      2       0       2 
-
-2002-03-03 (1, 50%), 2002-06-03 (1, 50%) 
---------------------------------------------------------------------------------
-DT1  Format:day mon year h:m:s 
-                     n                missing                 unique 
-                     2                      0                      2 
-                  Info                   Mean 
-                     1 (18 Apr 2002 09:36:35) 
-
-(03 Jun 2002 09:42:07) (1, 50%) 
-(03 Mar 2002 09:31:02) (1, 50%) 
---------------------------------------------------------------------------------
-T1  Format:h:m:s 
-      n missing  unique    Info    Mean 
-      2       0       2       1    :01: 
-
-11:13:45 (1, 50%), 11:14:13 (1, 50%) 
---------------------------------------------------------------------------------
-
-$Z
-X[[2]] 
-
- 6  Variables      100  Observations
---------------------------------------------------------------------------------
-X3 
-      n missing  unique    Info    Mean     .05     .10     .25     .50     .75 
-    100       0     100       1  0.5131 0.05585 0.13304 0.26428 0.51257 0.80719 
-    .90     .95 
-0.93059 0.96426 
-
-lowest : 0.00576 0.01524 0.02380 0.02627 0.05351
-highest: 0.96948 0.97473 0.98010 0.98096 0.99390 
---------------------------------------------------------------------------------
-X4 
-      n missing  unique    Info    Mean     .05     .10     .25     .50     .75 
-    100       0     100       1  0.5119 0.06694 0.09393 0.22310 0.49638 0.82109 
-    .90     .95 
-0.92206 0.94963 
-
-lowest : 0.02636 0.02890 0.02926 0.03010 0.05395
-highest: 0.95790 0.96828 0.97047 0.97466 0.98267 
---------------------------------------------------------------------------------
-X5 
-      n missing  unique    Info    Mean     .05     .10     .25     .50     .75 
-    100       0     100       1  0.4888 0.04286 0.06765 0.19898 0.46766 0.77899 
-    .90     .95 
-0.89237 0.91886 
-
-lowest : 0.004134 0.007872 0.008811 0.038577 0.039260
-highest: 0.933789 0.975597 0.984074 0.996114 0.997253 
---------------------------------------------------------------------------------
-X6 
-      n missing  unique    Info    Mean     .05     .10     .25     .50     .75 
-    100       0     100       1  0.4987 0.09022 0.18649 0.26865 0.46423 0.72667 
-    .90     .95 
-0.85553 0.93149 
-
-lowest : 0.01010 0.01943 0.03064 0.05931 0.08775
-highest: 0.93330 0.96090 0.97310 0.97840 0.99511 
---------------------------------------------------------------------------------
-X7 
-      n missing  unique    Info    Mean     .05     .10     .25     .50     .75 
-    100       0     100       1  0.5533  0.0850  0.1474  0.3313  0.5666  0.8120 
-    .90     .95 
- 0.9176  0.9517 
-
-lowest : 0.04201 0.04716 0.04986 0.05864 0.07641
-highest: 0.96377 0.97244 0.97413 0.99318 0.99791 
---------------------------------------------------------------------------------
-X8 
-      n missing  unique    Info    Mean     .05     .10     .25     .50     .75 
-    100       0     100       1  0.4809 0.04251 0.06831 0.27122 0.49223 0.71333 
-    .90     .95 
-0.87322 0.91886 
-
-lowest : 0.007269 0.010586 0.013044 0.018595 0.039906
-highest: 0.930491 0.935669 0.936941 0.958679 0.959636 
---------------------------------------------------------------------------------
-
-$FORMATS
-X[[3]] 
-
- 21  Variables      3  Observations
---------------------------------------------------------------------------------
-FMTNAME 
-      n missing  unique   value 
-      3       0       1    RACE 
---------------------------------------------------------------------------------
-START 
-      n missing  unique 
-      3       0       3 
-
-               1 (1, 33%),                2 (1, 33%) 
-               3 (1, 33%) 
---------------------------------------------------------------------------------
-END 
-      n missing  unique 
-      3       0       3 
-
-               1 (1, 33%),                2 (1, 33%) 
-               3 (1, 33%) 
---------------------------------------------------------------------------------
-LABEL 
-      n missing  unique 
-      3       0       3 
-
-blue (1, 33%), green (1, 33%), purple (1, 33%) 
---------------------------------------------------------------------------------
-MIN 
-      n missing  unique    Info    Mean 
-      3       0       1       0       1 
---------------------------------------------------------------------------------
-MAX 
-      n missing  unique    Info    Mean 
-      3       0       1       0      40 
---------------------------------------------------------------------------------
-DEFAULT 
-      n missing  unique    Info    Mean 
-      3       0       1       0       6 
---------------------------------------------------------------------------------
-LENGTH 
-      n missing  unique    Info    Mean 
-      3       0       1       0       6 
---------------------------------------------------------------------------------
-FUZZ 
-      n missing  unique    Info    Mean 
-      3       0       1       0   1e-12 
---------------------------------------------------------------------------------
-MULT 
-      n missing  unique    Info    Mean 
-      3       0       1       0       0 
---------------------------------------------------------------------------------
-NOEDIT 
-      n missing  unique    Info    Mean 
-      3       0       1       0       0 
---------------------------------------------------------------------------------
-TYPE 
-      n missing  unique   value 
-      3       0       1       N 
---------------------------------------------------------------------------------
-SEXCL 
-      n missing  unique   value 
-      3       0       1       N 
---------------------------------------------------------------------------------
-EEXCL 
-      n missing  unique   value 
-      3       0       1       N 
---------------------------------------------------------------------------------
-
-Variables with all observations missing:
-
-[1] PREFIX   FILL     HLO      DECSEP   DIG3SEP  DATATYPE LANGUAGE
-
-
-rd.xpr> contents(w$TEST)   # another way to see variable attributes
-
-Data frame:w$TEST	2 observations and 5 variables    Maximum # NAs:1
-
-                        Labels Levels   Class Storage NAs
-RACE                                3         integer   1
-AGE  Age at Beginning of Study        integer integer   0
-D1                                       Date  double   0
-DT1                                     chron  double   0
-T1                                      times  double   0
-
-+--------+-----------------+
-|Variable|Levels           |
-+--------+-----------------+
-|  RACE  |green,blue,purple|
-+--------+-----------------+
-
-rd.xpr> lapply(w, contents)# show contents of individual items in more detail
-$TEST
-
-Data frame:X[[1L]]	2 observations and 5 variables    Maximum # NAs:1
-
-                        Labels Levels   Class Storage NAs
-RACE                                3         integer   1
-AGE  Age at Beginning of Study        integer integer   0
-D1                                       Date  double   0
-DT1                                     chron  double   0
-T1                                      times  double   0
-
-+--------+-----------------+
-|Variable|Levels           |
-+--------+-----------------+
-|  RACE  |green,blue,purple|
-+--------+-----------------+
-
-$Z
-
-Data frame:X[[2L]]	100 observations and 6 variables    Maximum # NAs:0
-
-   Storage
-X3  double
-X4  double
-X5  double
-X6  double
-X7  double
-X8  double
-
-$FORMATS
-
-Data frame:X[[3L]]	3 observations and 21 variables    Maximum # NAs:0
-
-           Storage
-FMTNAME  character
-START    character
-END      character
-LABEL    character
-MIN         double
-MAX         double
-DEFAULT     double
-LENGTH      double
-FUZZ        double
-PREFIX   character
-MULT        double
-FILL     character
-NOEDIT      double
-TYPE     character
-SEXCL    character
-EEXCL    character
-HLO      character
-DECSEP   character
-DIG3SEP  character
-DATATYPE character
-LANGUAGE character
-
-
-rd.xpr> options(digits=7)  # compare the following matrix with PROC MEANS output
-
+rd.xpr> 
+rd.xpr> ## Not run: 
+rd.xpr> ##D ## For Hmisc version 3.14-5 (and presumably prior to that one) you will need to 
+rd.xpr> ##D ## attach Hmisc. This is because describe and contents S3 methods' are not exported
+rd.xpr> ##D ## Newer version of Hmisc fix the issue
+rd.xpr> ##D 
+rd.xpr> ##D Hmisc::describe(w$TEST)   # see labels, format names for dataset test
+rd.xpr> ##D lapply(w, Hmisc::describe)# see descriptive stats in more detail for each variable
+rd.xpr> ##D 
+rd.xpr> ##D Hmisc::contents(w$TEST)   # another way to see variable attributes
+rd.xpr> ##D lapply(w, Hmisc::contents)# show contents of individual items in more detail
+rd.xpr> ## End(Not run)
+rd.xpr> 
+rd.xpr> ## compare the following matrix with PROC MEANS output
 rd.xpr> t(sapply(w$Z, function(x)
 rd.xpr+  c(Mean=mean(x),SD=sqrt(var(x)),Min=min(x),Max=max(x))))
         Mean        SD         Min       Max
@@ -487,7 +198,7 @@
   W$TEST  AGE character                0       0                0        0
   W$TEST   D1   numeric   MMDDYY      10       0                0        0
   W$TEST  DT1   numeric DATETIME       0       0                0        0
-  W$TEST   T1 character     TIME       0       0                0        0
+  W$TEST   T1   numeric     TIME       0       0                0        0
                      label nobs
                               2
  Age at Beginning of Study    2
@@ -496,9 +207,9 @@
                               2
 
 > (tmp <- read.xport("a.xpt"))     #1.c
-  RACE AGE         D1                    DT1       T1
-1 blue  30 2002-03-03 (03 Mar 2002 09:31:02) 11:13:45
-2       31 2002-06-03 (03 Jun 2002 09:42:07) 11:14:13
+  RACE AGE         D1                 DT1       T1
+1 blue  30 2002-03-03 2002-03-03 09:31:02 11:13:45
+2       31 2002-06-03 2002-06-03 09:42:07 11:14:13
 > 
 > b <- w$test
 > write.xport(b,file="a.xpt")      #2.a
@@ -514,7 +225,7 @@
        B  AGE character                0       0                0        0
        B   D1   numeric   MMDDYY      10       0                0        0
        B  DT1   numeric DATETIME       0       0                0        0
-       B   T1 character     TIME       0       0                0        0
+       B   T1   numeric     TIME       0       0                0        0
                      label nobs
                               2
  Age at Beginning of Study    2
@@ -523,9 +234,9 @@
                               2
 
 > (tmp <- read.xport("a.xpt"))     #2.c
-  RACE AGE         D1                    DT1       T1
-1 blue  30 2002-03-03 (03 Mar 2002 09:31:02) 11:13:45
-2       31 2002-06-03 (03 Jun 2002 09:42:07) 11:14:13
+  RACE AGE         D1                 DT1       T1
+1 blue  30 2002-03-03 2002-03-03 09:31:02 11:13:45
+2       31 2002-06-03 2002-06-03 09:42:07 11:14:13
 > 
 > write.xport(test=w$test,file="a.xpt") #3.a
 > lookup.xport("a.xpt")                 #3.b
@@ -540,7 +251,7 @@
     TEST  AGE character                0       0                0        0
     TEST   D1   numeric   MMDDYY      10       0                0        0
     TEST  DT1   numeric DATETIME       0       0                0        0
-    TEST   T1 character     TIME       0       0                0        0
+    TEST   T1   numeric     TIME       0       0                0        0
                      label nobs
                               2
  Age at Beginning of Study    2
@@ -549,9 +260,9 @@
                               2
 
 > (tmp <- read.xport("a.xpt"))          #3.c
-  RACE AGE         D1                    DT1       T1
-1 blue  30 2002-03-03 (03 Mar 2002 09:31:02) 11:13:45
-2       31 2002-06-03 (03 Jun 2002 09:42:07) 11:14:13
+  RACE AGE         D1                 DT1       T1
+1 blue  30 2002-03-03 2002-03-03 09:31:02 11:13:45
+2       31 2002-06-03 2002-06-03 09:42:07 11:14:13
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/r-gregmisc -r 2147


More information about the R-gregmisc-commits mailing list