CRAN Package Check Results for Package partools

Last updated on 2018-08-16 16:52:40 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.6 3.75 48.58 52.33 OK
r-devel-linux-x86_64-debian-gcc 1.1.6 3.79 38.12 41.91 OK
r-devel-linux-x86_64-fedora-clang 1.1.6 61.00 OK
r-devel-linux-x86_64-fedora-gcc 1.1.6 58.54 OK
r-devel-windows-ix86+x86_64 1.1.6 17.00 105.00 122.00 ERROR
r-patched-linux-x86_64 1.1.6 4.02 43.02 47.04 OK
r-patched-solaris-x86 1.1.6 111.90 OK
r-release-linux-x86_64 1.1.6 3.97 42.67 46.64 OK
r-release-windows-ix86+x86_64 1.1.6 11.00 91.00 102.00 OK
r-release-osx-x86_64 1.1.6 OK
r-oldrel-windows-ix86+x86_64 1.1.6 13.00 68.00 81.00 OK
r-oldrel-osx-x86_64 1.1.6 OK

Check Details

Version: 1.1.6
Check: examples
Result: ERROR
    Running examples in 'partools-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: snowdoop,filechunkname, etc...
    > ### Title: Snowdoop.
    > ### Aliases: snowdoop filechunkname filesort filesplit filesplitrand
    > ### fileshuffle filecat readnscramble linecount getnumdigs filesave
    > ### fileread fileagg dfileagg filegetrows dfilegetrows
    >
    > ### ** Examples
    >
    > cls <- makeCluster(2)
    > setclsinfo(cls)
    [[1]]
     [1] "partools" "pdist" "data.table" "parallel" "regtools"
     [6] "car" "carData" "dummies" "mvtnorm" "FNN"
    [11] "stats" "graphics" "grDevices" "utils" "datasets"
    [16] "methods" "base"
    
    [[2]]
     [1] "partools" "pdist" "data.table" "parallel" "regtools"
     [6] "car" "carData" "dummies" "mvtnorm" "FNN"
    [11] "stats" "graphics" "grDevices" "utils" "datasets"
    [16] "methods" "base"
    
    >
    > # example of filesplit()
    > # make test input file
    > m <- rbind(1:2,3:4,5:6)
    > write.table(m,"m",row.names=FALSE,col.names=FALSE)
    > # apply the function
    > filesplit(2,"m",seqnums=TRUE)
    > # file m.1 and m.2 created, with contents c(1,1,2) and
    > # rbind(c(2,3,4),c(3,5,6)), respectively
    > # check it
    > read.table("m.1",header=FALSE,row.names=1)
     V2 V3
    1 1 2
    > read.table("m.2",header=FALSE,row.names=1)
     V2 V3
    2 3 4
    3 5 6
    > m
     [,1] [,2]
    [1,] 1 2
    [2,] 3 4
    [3,] 5 6
    >
    > # example of filecat(); assumes filesplit() example above already done
    > # delete file m so we can make sure we are re-creating it
    > unlink("m")
    > filecat(cls,"m")
    Warning in file.remove(basenm) :
     cannot remove file 'm', reason 'Permission denied'
    > # check that file m is back
    > read.table("m",row.names=1)
     V2 V3
    1 1 2
    2 3 4
    3 5 6
    >
    > # example of filesave(), fileread()
    > # make test distributed data frame
    > clusterEvalQ(cls,x <- data.frame(u = runif(5),v = runif(5)))
    [[1]]
     u v
    1 0.9724775 0.3065939
    2 0.9738546 0.1975388
    3 0.9588368 0.1554624
    4 0.6135776 0.4998881
    5 0.1501634 0.3830948
    
    [[2]]
     u v
    1 0.7608946 0.84513432
    2 0.7396298 0.65900631
    3 0.5899197 0.17921058
    4 0.4813565 0.08144188
    5 0.4204480 0.17951220
    
    > # apply filesave()
    > filesave(cls,'x','xfile',1,' ')
    [[1]]
    NULL
    
    [[2]]
    NULL
    
    > # check it
    > fileread(cls,'xfile','xx',1,header=TRUE,sep=' ')
    > clusterEvalQ(cls,xx)
    [[1]]
     u v
    1 0.9724775 0.3065939
    2 0.9738546 0.1975388
    3 0.9588368 0.1554624
    4 0.6135776 0.4998881
    5 0.1501634 0.3830948
    
    [[2]]
     u v
    1 0.7608946 0.84513432
    2 0.7396298 0.65900631
    3 0.5899197 0.17921058
    4 0.4813565 0.08144188
    5 0.4204480 0.17951220
    
    > clusterEvalQ(cls,x)
    [[1]]
     u v
    1 0.9724775 0.3065939
    2 0.9738546 0.1975388
    3 0.9588368 0.1554624
    4 0.6135776 0.4998881
    5 0.1501634 0.3830948
    
    [[2]]
     u v
    1 0.7608946 0.84513432
    2 0.7396298 0.65900631
    3 0.5899197 0.17921058
    4 0.4813565 0.08144188
    5 0.4204480 0.17951220
    
    >
    >
    > # example of filesort()
    > # make test distributed input file
    > m1 <- matrix(c(5,12,13,3,4,5,8,8,8,1,2,3,6,5,4),byrow=TRUE,ncol=3)
    > m2 <- matrix(c(0,22,88,44,5,5,2,6,10,7,7,7),byrow=TRUE,ncol=3)
    > write.table(m1,"m.1",row.names=FALSE)
    > write.table(m2,"m.2",row.names=FALSE)
    > # sort on column 2 and check result
    > filesort(cls,"m",2,"msort",infiledst=TRUE,ndigs=1,nsamp=3,header=TRUE)
    > clusterEvalQ(cls,msort) # data should be sorted on V2
    [[1]]
     V1 V2 V3
    4 1 2 3
    2 3 4 5
    5 6 5 4
    21 44 5 5
    31 2 6 10
    41 7 7 7
    3 8 8 8
    
    [[2]]
     V1 V2 V3
    1 5 12 13
    2 0 22 88
    
    > # check by comparing to input
    > m1
     [,1] [,2] [,3]
    [1,] 5 12 13
    [2,] 3 4 5
    [3,] 8 8 8
    [4,] 1 2 3
    [5,] 6 5 4
    > m2
     [,1] [,2] [,3]
    [1,] 0 22 88
    [2,] 44 5 5
    [3,] 2 6 10
    [4,] 7 7 7
    > m <- rbind(m1,m2)
    > write.table(m,"m",row.names=FALSE)
    > clusterEvalQ(cls,rm(msort))
    [[1]]
    NULL
    
    [[2]]
    NULL
    
    > filesort(cls,"m",2,"msort",infiledst=FALSE,nsamp=3,header=TRUE)
    > clusterEvalQ(cls,msort) # data should be sorted on V2
    [[1]]
     V1 V2 V3
    4 1 2 3
    2 3 4 5
    5 6 5 4
    7 44 5 5
    8 2 6 10
    9 7 7 7
    3 8 8 8
    
    [[2]]
     V1 V2 V3
    1 5 12 13
    6 0 22 88
    
    >
    > # example of readnscramble()
    > co2 <- head(CO2,25)
    > write.table(co2,"co2",row.names=FALSE) # creates file 'co2'
    > filesplit(2,"co2",header=TRUE) # creates files 'co2.1', 'co2.2'
    > readnscramble(cls,"co2",header=TRUE) # now have distrib. d.f.
    > # save the scrambled version to disk
    > filesave(cls,'co2','co2s',1,sep=',')
    [[1]]
    NULL
    
    [[2]]
    NULL
    
    >
    > # example of fileshuffle()
    > # make test file, 'test'
    > cat('a','bc','def','i','j','k',file='test',sep='\n')
    > filesplit(2,'test') # creates files 'test.1','test.2'
    > fileshuffle('test',2,'testa') # creates shuffled files 'testa.1','testa.2'
    NULL
    >
    > # example of filechunkname()
    > clusterEvalQ(cls,filechunkname("x",3)) # returns "x.001", "x.002"
    [[1]]
    [1] "x.001"
    
    [[2]]
    [1] "x.002"
    
    >
    > # example of getnumdigs()
    > getnumdigs(156) # should be 3
    [1] 3
    >
    > # examples of filesave() and fileread()
    > mtc <- mtcars
    > distribsplit(cls,"mtc")
    > # save distributed data frame to distributed file
    > filesave(cls,'mtc','ctm',1,',')
    [[1]]
    NULL
    
    [[2]]
    NULL
    
    > # read it back in to a new distributed data frame
    > fileread(cls,'ctm','ctmnew',1,header=TRUE,sep=',')
    > # check it
    > clusterEvalQ(cls,ctmnew)
    [[1]]
     mpg cyl disp hp drat wt qsec vs am gear carb
    1 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4
    2 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4
    3 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1
    4 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1
    5 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2
    6 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1
    7 14.3 8 360.0 245 3.21 3.570 15.84 0 0 3 4
    8 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2
    9 22.8 4 140.8 95 3.92 3.150 22.90 1 0 4 2
    10 19.2 6 167.6 123 3.92 3.440 18.30 1 0 4 4
    11 17.8 6 167.6 123 3.92 3.440 18.90 1 0 4 4
    12 16.4 8 275.8 180 3.07 4.070 17.40 0 0 3 3
    13 17.3 8 275.8 180 3.07 3.730 17.60 0 0 3 3
    14 15.2 8 275.8 180 3.07 3.780 18.00 0 0 3 3
    15 10.4 8 472.0 205 2.93 5.250 17.98 0 0 3 4
    16 10.4 8 460.0 215 3.00 5.424 17.82 0 0 3 4
    
    [[2]]
     mpg cyl disp hp drat wt qsec vs am gear carb
    1 14.7 8 440.0 230 3.23 5.345 17.42 0 0 3 4
    2 32.4 4 78.7 66 4.08 2.200 19.47 1 1 4 1
    3 30.4 4 75.7 52 4.93 1.615 18.52 1 1 4 2
    4 33.9 4 71.1 65 4.22 1.835 19.90 1 1 4 1
    5 21.5 4 120.1 97 3.70 2.465 20.01 1 0 3 1
    6 15.5 8 318.0 150 2.76 3.520 16.87 0 0 3 2
    7 15.2 8 304.0 150 3.15 3.435 17.30 0 0 3 2
    8 13.3 8 350.0 245 3.73 3.840 15.41 0 0 3 4
    9 19.2 8 400.0 175 3.08 3.845 17.05 0 0 3 2
    10 27.3 4 79.0 66 4.08 1.935 18.90 1 1 4 1
    11 26.0 4 120.3 91 4.43 2.140 16.70 0 1 5 2
    12 30.4 4 95.1 113 3.77 1.513 16.90 1 1 5 2
    13 15.8 8 351.0 264 4.22 3.170 14.50 0 1 5 4
    14 19.7 6 145.0 175 3.62 2.770 15.50 0 1 5 6
    15 15.0 8 301.0 335 3.54 3.570 14.60 0 1 5 8
    16 21.4 4 121.0 109 4.11 2.780 18.60 1 1 4 2
    
    > # try dfileagg() on it (not same as distribagg())
    > dfileagg(cls,c('ctm.1','ctm.2'),c("mpg","disp","hp"),c("cyl","gear"),header=TRUE,sep=",","max")
     cyl gear mpg disp hp
    1 4 3 21.5 120.1 97
    2 6 3 21.4 258.0 110
    3 8 3 19.2 472.0 245
    4 4 4 33.9 146.7 109
    5 6 4 21.0 167.6 123
    6 4 5 30.4 120.3 113
    7 6 5 19.7 145.0 175
    8 8 5 15.8 351.0 335
    > # check
    > aggregate(cbind(mpg,disp,hp) ~ cyl+gear,data=mtcars,FUN=max)
     cyl gear mpg disp hp
    1 4 3 21.5 120.1 97
    2 6 3 21.4 258.0 110
    3 8 3 19.2 472.0 245
    4 4 4 33.9 146.7 109
    5 6 4 21.0 167.6 123
    6 4 5 30.4 120.3 113
    7 6 5 19.7 145.0 175
    8 8 5 15.8 351.0 335
    > # extract the records with 4 cylinders and 4 gears (again, different
    > # from distribgetrows())
    > cmd <- 'tmpdata[tmpdata$cyl == 4 & tmpdata$gear == 4,]'
    > dfilegetrows(cls,c('ctm.1','ctm.2'),cmd,header=TRUE,sep=',')
     mpg cyl disp hp drat wt qsec vs am gear carb
    3 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1
    8 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2
    9 22.8 4 140.8 95 3.92 3.150 22.90 1 0 4 2
    2 32.4 4 78.7 66 4.08 2.200 19.47 1 1 4 1
    31 30.4 4 75.7 52 4.93 1.615 18.52 1 1 4 2
    4 33.9 4 71.1 65 4.22 1.835 19.90 1 1 4 1
    10 27.3 4 79.0 66 4.08 1.935 18.90 1 1 4 1
    16 21.4 4 121.0 109 4.11 2.780 18.60 1 1 4 2
    > # check
    > mtc[mtc$cyl == 4 & mtc$gear == 4,]
     mpg cyl disp hp drat wt qsec vs am gear carb
    Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1
    Merc 240D 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2
    Merc 230 22.8 4 140.8 95 3.92 3.150 22.90 1 0 4 2
    Fiat 128 32.4 4 78.7 66 4.08 2.200 19.47 1 1 4 1
    Honda Civic 30.4 4 75.7 52 4.93 1.615 18.52 1 1 4 2
    Toyota Corolla 33.9 4 71.1 65 4.22 1.835 19.90 1 1 4 1
    Fiat X1-9 27.3 4 79.0 66 4.08 1.935 18.90 1 1 4 1
    Volvo 142E 21.4 4 121.0 109 4.11 2.780 18.60 1 1 4 2
    >
    > stopCluster(cls)
    >
    >
    >
    >
    >
    > ### * <FOOTER>
    > ###
    > cleanEx()
    Error: connections left open:
     m (file)
     m (file)
     co2 (file)
     m.1 (file)
     m.2 (file)
     co2 (file)
     co2.1 (file)
     co2.2 (file)
     test (file)
     test (file)
    Execution halted
Flavor: r-devel-windows-ix86+x86_64