r46737 - in /packages/R/r-cran-misctools/trunk/debian/patches: ./ series skip_ecdat_test.patch
tille at users.alioth.debian.org
tille at users.alioth.debian.org
Mon Jun 23 19:17:29 UTC 2014
Author: tille
Date: Mon Jun 23 19:17:29 2014
New Revision: 46737
URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=46737
Log:
Skip test depending from Ecdat package
Added:
packages/R/r-cran-misctools/trunk/debian/patches/
packages/R/r-cran-misctools/trunk/debian/patches/series
packages/R/r-cran-misctools/trunk/debian/patches/skip_ecdat_test.patch
Added: packages/R/r-cran-misctools/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/debian-science/packages/R/r-cran-misctools/trunk/debian/patches/series?rev=46737&op=file
==============================================================================
--- packages/R/r-cran-misctools/trunk/debian/patches/series (added)
+++ packages/R/r-cran-misctools/trunk/debian/patches/series Mon Jun 23 19:17:29 2014
@@ -0,0 +1 @@
+skip_ecdat_test.patch
Added: packages/R/r-cran-misctools/trunk/debian/patches/skip_ecdat_test.patch
URL: http://svn.debian.org/wsvn/debian-science/packages/R/r-cran-misctools/trunk/debian/patches/skip_ecdat_test.patch?rev=46737&op=file
==============================================================================
--- packages/R/r-cran-misctools/trunk/debian/patches/skip_ecdat_test.patch (added)
+++ packages/R/r-cran-misctools/trunk/debian/patches/skip_ecdat_test.patch Mon Jun 23 19:17:29 2014
@@ -0,0 +1,109 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Mon, 23 Jun 2014 09:24:05 +0200
+Description: The colMediansTest needs data from the Ecdat package from
+ http://cran.r-project.org/web/packages/Ecdat/
+ that in turn needs another package to maintain these data. Since we
+ need to cut the chain of dependencies that are just packaged to run
+ sensible tests this test is left out. If you install these data
+ manually or perhaps use the inofficial and incomplete packaging at
+ svn://anonscm.debian.org/debian-science/packages/R/trunk/packages/r-cran-ecdat/trunk/
+ this patch can be droped for local tests
+
+--- miscTools.orig/tests/colMediansTest.R
++++ miscTools/tests/colMediansTest.R
+@@ -13,29 +13,3 @@
+ all.equal( cm1, rowMedians( t( m ) ) )
+ all.equal( rm1, colMedians( t( m ) ) )
+
+-
+-## data.frame
+-data( "Electricity", package = "Ecdat" )
+-Electricity <- Electricity[ 1:20, ]
+-
+-cm2 <- colMedians( Electricity )
+-print( cm2 )
+-
+-rm2 <- rowMedians( Electricity )
+-print( rm2 )
+-
+-all.equal( cm2, rowMedians( t( Electricity ) ) )
+-all.equal( rm2, colMedians( t( Electricity ) ) )
+-
+-# array (3 dimensions)
+-a3 <- array( 1:24, dim = c(4,3,2),
+- dimnames = list( c("a","b","c","d"), c("A","B","C"), c("x","y") ) )
+-colMedians( a3 )
+-all.equal( median( a3[ , "B", "y" ] ), colMedians( a3 )[ "B", "y" ] )
+-
+-# array (4 dimensions)
+-a4 <- array( 1:120, dim = c(5,4,3,2),
+- dimnames = list( c("a","b","c","d","e"), c("A","B","C","D"),
+- c("x","y","z"), c("Y","Z") ) )
+-colMedians( a4 )
+-all.equal( median( a4[ , "B", "x", "Z" ] ), colMedians( a4 )[ "B", "x", "Z" ] )
+--- miscTools.orig/tests/colMediansTest.Rout.save
++++ miscTools/tests/colMediansTest.Rout.save
+@@ -36,63 +36,3 @@
+ [1] TRUE
+ >
+ >
+-> ## data.frame
+-> data( "Electricity", package = "Ecdat" )
+-> Electricity <- Electricity[ 1:20, ]
+->
+-> cm2 <- colMedians( Electricity )
+-> print( cm2 )
+- cost q pl sl pk sk pf
+- 3.09655 422.50000 7794.10000 0.21090 69.26100 0.24415 25.95070
+- sf
+- 0.59860
+->
+-> rm2 <- rowMedians( Electricity )
+-> print( rm2 )
+- 1 2 3 4 5 6 7 8
+- 4.20985 12.05485 25.04895 14.64980 20.72935 18.42610 16.34295 7.24435
+- 9 10 11 12 13 14 15 16
+-11.32520 8.27460 14.17730 13.01815 22.80935 17.95680 14.06405 15.67750
+- 17 18 19 20
+-15.49855 12.44370 15.61920 21.87700
+->
+-> all.equal( cm2, rowMedians( t( Electricity ) ) )
+-[1] TRUE
+-> all.equal( rm2, colMedians( t( Electricity ) ) )
+-[1] TRUE
+->
+-> # array (3 dimensions)
+-> a3 <- array( 1:24, dim = c(4,3,2),
+-+ dimnames = list( c("a","b","c","d"), c("A","B","C"), c("x","y") ) )
+-> colMedians( a3 )
+- x y
+-A 2.5 14.5
+-B 6.5 18.5
+-C 10.5 22.5
+-> all.equal( median( a3[ , "B", "y" ] ), colMedians( a3 )[ "B", "y" ] )
+-[1] TRUE
+->
+-> # array (4 dimensions)
+-> a4 <- array( 1:120, dim = c(5,4,3,2),
+-+ dimnames = list( c("a","b","c","d","e"), c("A","B","C","D"),
+-+ c("x","y","z"), c("Y","Z") ) )
+-> colMedians( a4 )
+-, , Y
+-
+- x y z
+-A 3 23 43
+-B 8 28 48
+-C 13 33 53
+-D 18 38 58
+-
+-, , Z
+-
+- x y z
+-A 63 83 103
+-B 68 88 108
+-C 73 93 113
+-D 78 98 118
+-
+-> all.equal( median( a4[ , "B", "x", "Z" ] ), colMedians( a4 )[ "B", "x", "Z" ] )
+-[1] TRUE
+->
More information about the debian-science-commits
mailing list