Back to Multiple platform build/check report for BioC 3.6
A[B]CDEFGHIJKLMNOPQRSTUVWXYZ

CHECK report for Biobase on tokay1

This page was generated on 2018-04-12 13:17:04 -0400 (Thu, 12 Apr 2018).

Package 117/1472HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
Biobase 2.38.0
Bioconductor Package Maintainer
Snapshot Date: 2018-04-11 16:45:18 -0400 (Wed, 11 Apr 2018)
URL: https://git.bioconductor.org/packages/Biobase
Branch: RELEASE_3_6
Last Commit: 83f8982
Last Changed Date: 2017-10-30 12:38:06 -0400 (Mon, 30 Oct 2017)
malbec1 Linux (Ubuntu 16.04.1 LTS) / x86_64  OK  OK  OK UNNEEDED, same version exists in internal repository
tokay1 Windows Server 2012 R2 Standard / x64  OK  OK [ OK ] OK UNNEEDED, same version exists in internal repository
veracruz1 OS X 10.11.6 El Capitan / x86_64  OK  OK  OK  OK UNNEEDED, same version exists in internal repository

Summary

Package: Biobase
Version: 2.38.0
Command: rm -rf Biobase.buildbin-libdir Biobase.Rcheck && mkdir Biobase.buildbin-libdir Biobase.Rcheck && C:\Users\biocbuild\bbs-3.6-bioc\R\bin\R.exe CMD INSTALL --build --merge-multiarch --library=Biobase.buildbin-libdir Biobase_2.38.0.tar.gz >Biobase.Rcheck\00install.out 2>&1 && cp Biobase.Rcheck\00install.out Biobase-install.out && C:\Users\biocbuild\bbs-3.6-bioc\R\bin\R.exe CMD check --library=Biobase.buildbin-libdir --install="check:Biobase-install.out" --force-multiarch --no-vignettes --timings Biobase_2.38.0.tar.gz
StartedAt: 2018-04-11 22:27:16 -0400 (Wed, 11 Apr 2018)
EndedAt: 2018-04-11 22:29:52 -0400 (Wed, 11 Apr 2018)
EllapsedTime: 155.5 seconds
RetCode: 0
Status:  OK  
CheckDir: Biobase.Rcheck
Warnings: 0

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   rm -rf Biobase.buildbin-libdir Biobase.Rcheck && mkdir Biobase.buildbin-libdir Biobase.Rcheck && C:\Users\biocbuild\bbs-3.6-bioc\R\bin\R.exe CMD INSTALL --build --merge-multiarch --library=Biobase.buildbin-libdir Biobase_2.38.0.tar.gz >Biobase.Rcheck\00install.out 2>&1 && cp Biobase.Rcheck\00install.out Biobase-install.out  &&  C:\Users\biocbuild\bbs-3.6-bioc\R\bin\R.exe CMD check --library=Biobase.buildbin-libdir --install="check:Biobase-install.out" --force-multiarch --no-vignettes --timings Biobase_2.38.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory 'C:/Users/biocbuild/bbs-3.6-bioc/meat/Biobase.Rcheck'
* using R version 3.4.4 (2018-03-15)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* using option '--no-vignettes'
* checking for file 'Biobase/DESCRIPTION' ... OK
* this is package 'Biobase' version '2.38.0'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'Biobase' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking 'build' directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
* loading checks for arch 'x64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
addVigs2WinMenu: no visible global function definition for
  'winMenuNames'
addVigs2WinMenu: no visible global function definition for 'winMenuAdd'
addVigs2WinMenu: no visible global function definition for
  'winMenuAddItem'
Undefined global functions or variables:
  winMenuAdd winMenuAddItem winMenuNames
Consider adding
  importFrom("utils", "winMenuAdd", "winMenuAddItem", "winMenuNames")
to your NAMESPACE file.
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of 'data' directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking compiled code ... NOTE
Note: information on .o files for i386 is not available
Note: information on .o files for x64 is not available
File 'C:/Users/biocbuild/bbs-3.6-bioc/meat/Biobase.buildbin-libdir/Biobase/libs/i386/Biobase.dll':
  Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs. The detected symbols are linked into the code but
might come from libraries and not actually be called.

See 'Writing portable packages' in the 'Writing R Extensions' manual.
* checking installed files from 'inst/doc' ... OK
* checking files in 'vignettes' ... OK
* checking examples ...
** running examples for arch 'i386' ... OK
** running examples for arch 'x64' ... OK
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ...
  Running 'test-all.R'
  Running 'test-rowMedians.R'
 OK
** running tests for arch 'x64' ...
  Running 'test-all.R'
  Running 'test-rowMedians.R'
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in 'inst/doc' ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE

Status: 2 NOTEs
See
  'C:/Users/biocbuild/bbs-3.6-bioc/meat/Biobase.Rcheck/00check.log'
for details.



Installation output

Biobase.Rcheck/00install.out


install for i386

* installing *source* package 'Biobase' ...
** libs
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/include" -DNDEBUG     -I"C:/local323/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c Rinit.c -o Rinit.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/include" -DNDEBUG     -I"C:/local323/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c anyMissing.c -o anyMissing.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/include" -DNDEBUG     -I"C:/local323/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c envir.c -o envir.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/include" -DNDEBUG     -I"C:/local323/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c matchpt.c -o matchpt.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/include" -DNDEBUG     -I"C:/local323/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c rowMedians.c -o rowMedians.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/include" -DNDEBUG     -I"C:/local323/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c sublist_extract.c -o sublist_extract.o
C:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o Biobase.dll tmp.def Rinit.o anyMissing.o envir.o matchpt.o rowMedians.o sublist_extract.o -LC:/local323/lib/i386 -LC:/local323/lib -LC:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/bin/i386 -lR
installing to C:/Users/biocbuild/bbs-3.6-bioc/meat/Biobase.buildbin-libdir/Biobase/libs/i386
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package 'Biobase'
    finding HTML links ... done
    Aggregate                               html  
    Biobase-package                         html  
    ScalarObject-class                      html  
    abstract                                html  
    addVig2Menu                             html  
    annotatedDataFrameFrom-methods          html  
    anyMissing                              html  
    assayData                               html  
    cache                                   html  
    channel                                 html  
    channelNames                            html  
    class.AnnotatedDataFrame                html  
    finding level-2 HTML links ... done

    class.AssayData                         html  
    class.ExpressionSet                     html  
    class.MIAME                             html  
    class.MIAxE                             html  
    class.MultiSet                          html  
    class.NChannelSet                       html  
    class.SnpSet                            html  
    class.Versioned                         html  
    class.VersionedBiobase                  html  
    class.Versions                          html  
    class.VersionsNull                      html  
    class.aggregator                        html  
    class.characterORmiame                  html  
    class.container                         html  
    class.eSet                              html  
    classVersion                            html  
    contents                                html  
    copyEnv                                 html  
    copySubstitute                          html  
    createPackage                           html  
    data.aaMap                              html  
    data.geneData                           html  
    data.reporter                           html  
    data.sample.ExpressionSet               html  
    data.sample.MultiSet                    html  
    defunct                                 html  
    description                             html  
    dims                                    html  
    dumpPackTxt                             html  
    esApply                                 html  
    exprs                                   html  
    featureData                             html  
    featureNames                            html  
    getPkgVigs                              html  
    internals                               html  
    isCurrent                               html  
    isUnique                                html  
    isVersioned                             html  
    lcSuffix                                html  
    listLen                                 html  
    makeDataPackage                         html  
    matchpt                                 html  
    multiassign                             html  
    note                                    html  
    notes                                   html  
    openPDF                                 html  
    openVignette                            html  
    package.version                         html  
    phenoData                               html  
    protocolData                            html  
    read.AnnotatedDataFrame                 html  
    read.MIAME                              html  
    readExpressionSet                       html  
    reverseSplit                            html  
    rowMedians                              html  
    rowQ                                    html  
    selectChannels                          html  
    selectSome                              html  
    snpCall                                 html  
    storageMode                             html  
    strbreak                                html  
    subListExtract                          html  
    testBioCConnection                      html  
    updateObjectTo                          html  
    updateOldESet                           html  
    userQuery                               html  
    validMsg                                html  
** building package indices
** installing vignettes
** testing if installed package can be loaded
In R CMD INSTALL

install for x64

* installing *source* package 'Biobase' ...
** libs
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/include" -DNDEBUG     -I"C:/local323/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c Rinit.c -o Rinit.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/include" -DNDEBUG     -I"C:/local323/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c anyMissing.c -o anyMissing.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/include" -DNDEBUG     -I"C:/local323/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c envir.c -o envir.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/include" -DNDEBUG     -I"C:/local323/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c matchpt.c -o matchpt.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/include" -DNDEBUG     -I"C:/local323/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c rowMedians.c -o rowMedians.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/include" -DNDEBUG     -I"C:/local323/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c sublist_extract.c -o sublist_extract.o
C:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o Biobase.dll tmp.def Rinit.o anyMissing.o envir.o matchpt.o rowMedians.o sublist_extract.o -LC:/local323/lib/x64 -LC:/local323/lib -LC:/Users/BIOCBU˜1/BBS-3˜1.6-B/R/bin/x64 -lR
installing to C:/Users/biocbuild/bbs-3.6-bioc/meat/Biobase.buildbin-libdir/Biobase/libs/x64
** testing if installed package can be loaded
* MD5 sums
packaged installation of 'Biobase' as Biobase_2.38.0.zip
* DONE (Biobase)
In R CMD INSTALL
In R CMD INSTALL

Tests output

Biobase.Rcheck/tests_i386/test-all.Rout


R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> BiocGenerics:::testPackage("Biobase")

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.



RUNIT TEST PROTOCOL -- Wed Apr 11 22:28:48 2018 
*********************************************** 
Number of test functions: 101 
Number of errors: 0 
Number of failures: 0 

 
1 Test Suite : 
Biobase RUnit Tests - 101 test functions, 0 errors, 0 failures
Number of test functions: 101 
Number of errors: 0 
Number of failures: 0 
> 
> proc.time()
   user  system elapsed 
  18.73    0.18   18.90 

Biobase.Rcheck/tests_x64/test-all.Rout


R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> BiocGenerics:::testPackage("Biobase")

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.



RUNIT TEST PROTOCOL -- Wed Apr 11 22:29:26 2018 
*********************************************** 
Number of test functions: 101 
Number of errors: 0 
Number of failures: 0 

 
1 Test Suite : 
Biobase RUnit Tests - 101 test functions, 0 errors, 0 failures
Number of test functions: 101 
Number of errors: 0 
Number of failures: 0 
> 
> proc.time()
   user  system elapsed 
  18.98    0.17   19.28 

Biobase.Rcheck/tests_i386/test-rowMedians.Rout


R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Biobase)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

> set.seed(1)
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> # Consistency checks
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> 
> # rowMedians() by rowQ()
> rowMedians2 <- function(imat) {
+   nr <- ncol(imat)
+   half <- (nr + 1)/2
+   if (nr%%2 == 1) {
+     return(rowQ(imat, half))
+   } else {
+     return((rowQ(imat, half) + rowQ(imat, half+1))/2)
+   }
+ }
> 
> cat("Consistency checks:\n")
Consistency checks:
> set.seed(1)
> for (kk in 1:20) {
+   cat("Random test #", kk, "\n", sep="")
+ 
+   # Simulate data in a matrix of any shape
+   nrow <- sample(2000, size=1)
+   ncol <- sample(2000, size=1)
+   x <- rnorm(nrow*ncol)
+   dim(x) <- c(nrow, ncol)
+ 
+   # Add NAs?
+   nas <- sample(c(TRUE,FALSE), size=1)
+   if (nas) {
+     nna <- sample(nrow*ncol, size=1)
+     x[sample(length(x), size=nna)] <- NA
+   }
+ 
+   na.rm <- nas
+   t1 <- system.time({
+     y1 <- rowMedians(x, na.rm=na.rm)
+   })
+   t2 <- system.time({
+     y2 <- apply(x, MARGIN=1, FUN=median, na.rm=na.rm)
+   })
+   # When all values of 'y2' are NA, 'y2' is logical
+   if (is.logical(y2)) y2 <- as.double(y2)
+   stopifnot(all.equal(y1,y2))
+   cat(sprintf("rowMedians()/apply(): %.3g\n", (t1/t2)[3]))
+ 
+   if (!nas) {
+     t3 <- system.time({
+       y3 <- rowMedians2(x)
+     })
+     stopifnot(all.equal(y1,y3))
+     cat(sprintf("rowMedians()/rowMedians2(): %.3g\n", (t1/t3)[3]))
+   }
+ }
Random test #1
rowMedians()/apply(): 0
Random test #2
rowMedians()/apply(): 0.276
Random test #3
rowMedians()/apply(): 0.625
rowMedians()/rowMedians2(): 1.43
Random test #4
rowMedians()/apply(): 0.25
Random test #5
rowMedians()/apply(): 0
rowMedians()/rowMedians2(): 0
Random test #6
rowMedians()/apply(): 0.187
Random test #7
rowMedians()/apply(): 0.333
Random test #8
rowMedians()/apply(): 0
Random test #9
rowMedians()/apply(): 0.2
rowMedians()/rowMedians2(): 0.5
Random test #10
rowMedians()/apply(): 0.214
rowMedians()/rowMedians2(): 0.3
Random test #11
rowMedians()/apply(): 0
Random test #12
rowMedians()/apply(): 0.2
Random test #13
rowMedians()/apply(): 0.417
rowMedians()/rowMedians2(): 1.25
Random test #14
rowMedians()/apply(): 0.6
rowMedians()/rowMedians2(): 3
Random test #15
rowMedians()/apply(): 0.333
Random test #16
rowMedians()/apply(): 0
Random test #17
rowMedians()/apply(): 0.25
rowMedians()/rowMedians2(): 0.4
Random test #18
rowMedians()/apply(): 0
Random test #19
rowMedians()/apply(): 0.25
Random test #20
rowMedians()/apply(): NaN
> 
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> # Benchmarking
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> cat("Benchmarking:\n")
Benchmarking:
> 
> # Simulate data in a matrix of any shape
> nrow <- 1000
> ncol <- 1000
> x <- rnorm(nrow*ncol)
> dim(x) <- c(nrow, ncol)
> 
> gc()
          used (Mb) gc trigger (Mb) max used (Mb)
Ncells  516123 13.8     940480 25.2   940480 25.2
Vcells 1568083 12.0    3155303 24.1  5858303 44.7
> t0 <- system.time({
+   for (rr in 1:20)
+     y0 <- apply(x, MARGIN=1, FUN=median, na.rm=FALSE)
+ })
> gc()
          used (Mb) gc trigger (Mb) max used (Mb)
Ncells  516141 13.8     940480 25.2   940480 25.2
Vcells 1569098 12.0    4719635 36.1  5858303 44.7
> t1 <- system.time({
+   for (rr in 1:20)
+     y1 <- rowMedians(x, na.rm=FALSE)
+ })
> gc()
          used (Mb) gc trigger (Mb) max used (Mb)
Ncells  516166 13.8     940480 25.2   940480 25.2
Vcells 1569898 12.0    4719635 36.1  5858303 44.7
> stopifnot(all.equal(y0,y1))
> cat(sprintf("rowMedians()/apply(): %.3g\n", (t1/t0)[3]))
rowMedians()/apply(): 0.324
> 
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> # Consistency checks
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> cat("Consistency checks without NAs:\n")
Consistency checks without NAs:
> for (kk in 1:20) {
+   cat("Random test #", kk, "\n", sep="")
+ 
+   # Simulate data in a matrix of any shape
+   nrow <- sample(1000, size=1)
+   ncol <- sample(1000, size=1)
+   x <- rnorm(nrow*ncol)
+   dim(x) <- c(nrow, ncol)
+ 
+   t0 <- system.time({
+     y0 <- apply(x, MARGIN=1, FUN=median, na.rm=FALSE)
+   })
+   t1 <- system.time({
+     y1 <- rowMedians(x, na.rm=FALSE)
+   })
+   stopifnot(all.equal(y0,y1))
+ } # for (kk in ...)
Random test #1
Random test #2
Random test #3
Random test #4
Random test #5
Random test #6
Random test #7
Random test #8
Random test #9
Random test #10
Random test #11
Random test #12
Random test #13
Random test #14
Random test #15
Random test #16
Random test #17
Random test #18
Random test #19
Random test #20
> 
> 
> 
> cat("Consistency checks with NAs:\n")
Consistency checks with NAs:
> for (kk in 1:20) {
+   cat("Random test #", kk, "\n", sep="")
+ 
+   # Simulate data in a matrix of any shape
+   nrow <- sample(1000, size=1)
+   ncol <- sample(1000, size=1)
+   x <- rnorm(nrow*ncol)
+   dim(x) <- c(nrow, ncol)
+ 
+   # Add NAs
+   nna <- sample(nrow*ncol-1, size=1)
+   x[sample(length(x), size=nna)] <- NA
+ 
+   t0 <- system.time({
+     y0 <- apply(x, MARGIN=1, FUN=median, na.rm=TRUE)
+     y0[is.na(y0)] <- NA
+   })
+   t1 <- system.time({
+     y1 <- rowMedians(x, na.rm=TRUE)
+   })
+   stopifnot(all.equal(y0,y1))
+ } # for (kk in ...)
Random test #1
Random test #2
Random test #3
Random test #4
Random test #5
Random test #6
Random test #7
Random test #8
Random test #9
Random test #10
Random test #11
Random test #12
Random test #13
Random test #14
Random test #15
Random test #16
Random test #17
Random test #18
Random test #19
Random test #20
> 
> proc.time()
   user  system elapsed 
  18.73    0.32   19.04 

Biobase.Rcheck/tests_x64/test-rowMedians.Rout


R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Biobase)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

> set.seed(1)
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> # Consistency checks
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> 
> # rowMedians() by rowQ()
> rowMedians2 <- function(imat) {
+   nr <- ncol(imat)
+   half <- (nr + 1)/2
+   if (nr%%2 == 1) {
+     return(rowQ(imat, half))
+   } else {
+     return((rowQ(imat, half) + rowQ(imat, half+1))/2)
+   }
+ }
> 
> cat("Consistency checks:\n")
Consistency checks:
> set.seed(1)
> for (kk in 1:20) {
+   cat("Random test #", kk, "\n", sep="")
+ 
+   # Simulate data in a matrix of any shape
+   nrow <- sample(2000, size=1)
+   ncol <- sample(2000, size=1)
+   x <- rnorm(nrow*ncol)
+   dim(x) <- c(nrow, ncol)
+ 
+   # Add NAs?
+   nas <- sample(c(TRUE,FALSE), size=1)
+   if (nas) {
+     nna <- sample(nrow*ncol, size=1)
+     x[sample(length(x), size=nna)] <- NA
+   }
+ 
+   na.rm <- nas
+   t1 <- system.time({
+     y1 <- rowMedians(x, na.rm=na.rm)
+   })
+   t2 <- system.time({
+     y2 <- apply(x, MARGIN=1, FUN=median, na.rm=na.rm)
+   })
+   # When all values of 'y2' are NA, 'y2' is logical
+   if (is.logical(y2)) y2 <- as.double(y2)
+   stopifnot(all.equal(y1,y2))
+   cat(sprintf("rowMedians()/apply(): %.3g\n", (t1/t2)[3]))
+ 
+   if (!nas) {
+     t3 <- system.time({
+       y3 <- rowMedians2(x)
+     })
+     stopifnot(all.equal(y1,y3))
+     cat(sprintf("rowMedians()/rowMedians2(): %.3g\n", (t1/t3)[3]))
+   }
+ }
Random test #1
rowMedians()/apply(): 0
Random test #2
rowMedians()/apply(): 0.158
Random test #3
rowMedians()/apply(): 0.467
rowMedians()/rowMedians2(): 1.4
Random test #4
rowMedians()/apply(): 0.125
Random test #5
rowMedians()/apply(): 0
rowMedians()/rowMedians2(): 0
Random test #6
rowMedians()/apply(): 0.0556
Random test #7
rowMedians()/apply(): 0.333
Random test #8
rowMedians()/apply(): 0.1
Random test #9
rowMedians()/apply(): 0.0714
rowMedians()/rowMedians2(): 0.333
Random test #10
rowMedians()/apply(): 0.273
rowMedians()/rowMedians2(): 0.429
Random test #11
rowMedians()/apply(): 0
Random test #12
rowMedians()/apply(): 0.15
Random test #13
rowMedians()/apply(): 0.231
rowMedians()/rowMedians2(): 0.75
Random test #14
rowMedians()/apply(): 0.333
rowMedians()/rowMedians2(): 1
Random test #15
rowMedians()/apply(): 0.2
Random test #16
rowMedians()/apply(): 0
Random test #17
rowMedians()/apply(): 0.273
rowMedians()/rowMedians2(): 0.5
Random test #18
rowMedians()/apply(): 0
Random test #19
rowMedians()/apply(): 0.125
Random test #20
rowMedians()/apply(): 0
> 
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> # Benchmarking
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> cat("Benchmarking:\n")
Benchmarking:
> 
> # Simulate data in a matrix of any shape
> nrow <- 1000
> ncol <- 1000
> x <- rnorm(nrow*ncol)
> dim(x) <- c(nrow, ncol)
> 
> gc()
          used (Mb) gc trigger (Mb) max used (Mb)
Ncells  516204 27.6     940480 50.3   940480 50.3
Vcells 1850766 14.2    3498329 26.7  6444614 49.2
> t0 <- system.time({
+   for (rr in 1:20)
+     y0 <- apply(x, MARGIN=1, FUN=median, na.rm=FALSE)
+ })
> gc()
          used (Mb) gc trigger (Mb) max used (Mb)
Ncells  516222 27.6     940480 50.3   940480 50.3
Vcells 1851785 14.2    5213592 39.8  6444614 49.2
> t1 <- system.time({
+   for (rr in 1:20)
+     y1 <- rowMedians(x, na.rm=FALSE)
+ })
> gc()
          used (Mb) gc trigger (Mb) max used (Mb)
Ncells  516247 27.6     940480 50.3   940480 50.3
Vcells 1852609 14.2    5213592 39.8  6444614 49.2
> stopifnot(all.equal(y0,y1))
> cat(sprintf("rowMedians()/apply(): %.3g\n", (t1/t0)[3]))
rowMedians()/apply(): 0.209
> 
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> # Consistency checks
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> cat("Consistency checks without NAs:\n")
Consistency checks without NAs:
> for (kk in 1:20) {
+   cat("Random test #", kk, "\n", sep="")
+ 
+   # Simulate data in a matrix of any shape
+   nrow <- sample(1000, size=1)
+   ncol <- sample(1000, size=1)
+   x <- rnorm(nrow*ncol)
+   dim(x) <- c(nrow, ncol)
+ 
+   t0 <- system.time({
+     y0 <- apply(x, MARGIN=1, FUN=median, na.rm=FALSE)
+   })
+   t1 <- system.time({
+     y1 <- rowMedians(x, na.rm=FALSE)
+   })
+   stopifnot(all.equal(y0,y1))
+ } # for (kk in ...)
Random test #1
Random test #2
Random test #3
Random test #4
Random test #5
Random test #6
Random test #7
Random test #8
Random test #9
Random test #10
Random test #11
Random test #12
Random test #13
Random test #14
Random test #15
Random test #16
Random test #17
Random test #18
Random test #19
Random test #20
> 
> 
> 
> cat("Consistency checks with NAs:\n")
Consistency checks with NAs:
> for (kk in 1:20) {
+   cat("Random test #", kk, "\n", sep="")
+ 
+   # Simulate data in a matrix of any shape
+   nrow <- sample(1000, size=1)
+   ncol <- sample(1000, size=1)
+   x <- rnorm(nrow*ncol)
+   dim(x) <- c(nrow, ncol)
+ 
+   # Add NAs
+   nna <- sample(nrow*ncol-1, size=1)
+   x[sample(length(x), size=nna)] <- NA
+ 
+   t0 <- system.time({
+     y0 <- apply(x, MARGIN=1, FUN=median, na.rm=TRUE)
+     y0[is.na(y0)] <- NA
+   })
+   t1 <- system.time({
+     y1 <- rowMedians(x, na.rm=TRUE)
+   })
+   stopifnot(all.equal(y0,y1))
+ } # for (kk in ...)
Random test #1
Random test #2
Random test #3
Random test #4
Random test #5
Random test #6
Random test #7
Random test #8
Random test #9
Random test #10
Random test #11
Random test #12
Random test #13
Random test #14
Random test #15
Random test #16
Random test #17
Random test #18
Random test #19
Random test #20
> 
> proc.time()
   user  system elapsed 
  18.29    0.25   18.53 

Example timings

Biobase.Rcheck/examples_i386/Biobase-Ex.timings

nameusersystemelapsed
Aggregate0.030.000.03
ScalarObject-class0.010.000.01
addVig2Menu000
anyMissing000
cache0.020.000.02
channel0.250.000.25
channelNames0.060.000.06
class.AnnotatedDataFrame0.030.000.03
class.ExpressionSet0.270.000.27
class.MIAxE0.010.000.01
class.MultiSet0.040.000.03
class.NChannelSet0.140.000.14
class.Versioned0.070.000.08
class.VersionedBiobase0.020.000.02
class.Versions0.000.020.01
class.VersionsNull000
class.container000
class.eSet0.060.000.07
classVersion000
contents000
copyEnv0.020.000.01
copySubstitute0.080.000.08
createPackage0.000.010.02
data.aaMap000
data.geneData0.010.020.03
data.reporter0.000.020.01
data.sample.ExpressionSet0.020.000.02
data.sample.MultiSet0.010.000.01
dumpPackTxt0.000.000.02
esApply0.890.000.89
getPkgVigs0.000.000.03
isCurrent0.030.000.03
isUnique000
isVersioned000
lcSuffix0.050.000.05
listLen000
makeDataPackage0.120.000.12
matchpt0.010.000.01
multiassign0.030.000.03
note000
openPDF000
openVignette000
package.version000
read.AnnotatedDataFrame0.040.000.03
read.MIAME0.030.000.04
readExpressionSet0.090.000.09
reverseSplit000
rowMedians0.060.000.06
rowQ0.020.000.02
selectChannels0.030.000.03
selectSome0.020.000.01
strbreak0.010.000.02
subListExtract0.640.000.64
testBioCConnection0.080.030.42
updateOldESet000
validMsg000

Biobase.Rcheck/examples_x64/Biobase-Ex.timings

nameusersystemelapsed
Aggregate0.050.000.04
ScalarObject-class0.020.000.01
addVig2Menu000
anyMissing000
cache0.000.010.02
channel0.570.000.56
channelNames0.120.000.12
class.AnnotatedDataFrame0.060.000.07
class.ExpressionSet0.350.000.34
class.MIAxE0.010.000.01
class.MultiSet0.020.000.02
class.NChannelSet0.340.000.34
class.Versioned0.070.000.06
class.VersionedBiobase0.030.000.03
class.Versions0.020.000.02
class.VersionsNull000
class.container000
class.eSet0.060.000.06
classVersion000
contents000
copyEnv0.010.000.02
copySubstitute0.100.000.09
createPackage000
data.aaMap0.010.000.02
data.geneData0.020.010.03
data.reporter000
data.sample.ExpressionSet0.000.020.02
data.sample.MultiSet0.010.000.01
dumpPackTxt000
esApply1.080.011.09
getPkgVigs0.020.000.02
isCurrent0.030.000.03
isUnique000
isVersioned000
lcSuffix0.030.000.03
listLen000
makeDataPackage0.090.000.10
matchpt0.020.000.01
multiassign0.010.000.02
note000
openPDF000
openVignette000
package.version000
read.AnnotatedDataFrame0.020.000.02
read.MIAME0.010.000.01
readExpressionSet0.060.020.08
reverseSplit000
rowMedians0.130.000.13
rowQ0.010.000.01
selectChannels0.040.000.03
selectSome000
strbreak0.030.000.04
subListExtract0.730.000.73
testBioCConnection0.060.020.27
updateOldESet000
validMsg000