Back to Multiple platform build/check report for BioC 3.24:   simplified   long
A[B]CDEFGHIJKLMNOPQRSTUVWXYZ

This page was generated on 2026-05-06 11:33 -0400 (Wed, 06 May 2026).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 24.04.4 LTS)x86_644.6.0 RC (2026-04-17 r89917) -- "Because it was There" 4878
taishanLinux (openEuler 24.03 LTS)aarch644.5.0 (2025-04-11) -- "How About a Twenty-Six" 4663
Click on any hostname to see more info about the system (e.g. compilers)      (*) as reported by 'uname -p', except on Windows and Mac OS X

Package 252/2366HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.77.0  (landing page)
Ben Bolstad
Snapshot Date: 2026-05-05 13:45 -0400 (Tue, 05 May 2026)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: devel
git_last_commit: 2d99771
git_last_commit_date: 2026-04-28 08:32:08 -0400 (Tue, 28 Apr 2026)
nebbiolo2Linux (Ubuntu 24.04.4 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
taishanLinux (openEuler 24.03 LTS) / aarch64  OK    OK    OK  
See other builds for BufferedMatrix in R Universe.


CHECK results for BufferedMatrix on nebbiolo2

To the developers/maintainers of the BufferedMatrix package:
- Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information.
- Use the following Renviron settings to reproduce errors and warnings.
- If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information.

raw results


Summary

Package: BufferedMatrix
Version: 1.77.0
Command: /home/biocbuild/bbs-3.24-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.24-bioc/R/site-library --timings BufferedMatrix_1.77.0.tar.gz
StartedAt: 2026-05-05 21:49:33 -0400 (Tue, 05 May 2026)
EndedAt: 2026-05-05 21:50:01 -0400 (Tue, 05 May 2026)
EllapsedTime: 27.0 seconds
RetCode: 0
Status:   OK  
CheckDir: BufferedMatrix.Rcheck
Warnings: 0

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/bbs-3.24-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.24-bioc/R/site-library --timings BufferedMatrix_1.77.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck’
* using R version 4.6.0 RC (2026-04-17 r89917)
* using platform: x86_64-pc-linux-gnu
* R was compiled by
    gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
    GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
* running under: Ubuntu 24.04.4 LTS
* using session charset: UTF-8
* current time: 2026-05-06 01:49:34 UTC
* checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK
* this is package ‘BufferedMatrix’ version ‘1.77.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 for sufficient/correct file permissions ... OK
* checking whether package ‘BufferedMatrix’ can be installed ... OK
* used C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0’
* 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 code files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* 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 loading without being on the library search path ... 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 ... OK
* checking Rd files ... NOTE
checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup?
   209 |     $x^{power}$ elementwise of the matrix
       |        ^
prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword
prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details
prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value
prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references
prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso
prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples
* 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 line endings in C/C++/Fortran sources/headers ... OK
* checking compiled code ... INFO
Note: information on .o files is not available
* checking sizes of PDF files under ‘inst/doc’ ...* checking files in ‘vignettes’ ... OK
* checking examples ... NONE
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘Rcodetesting.R’
  Running ‘c_code_level_tests.R’
  Running ‘objectTesting.R’
  Running ‘rawCalltesting.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking re-building of vignette outputs ... OK
* checking PDF version of manual ... OK
* DONE

Status: 1 NOTE
See
  ‘/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/00check.log’
for details.


Installation output

BufferedMatrix.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/bbs-3.24-bioc/R/bin/R CMD INSTALL BufferedMatrix
###
##############################################################################
##############################################################################


* installing to library ‘/home/biocbuild/bbs-3.24-bioc/R/site-library’
* installing *source* package ‘BufferedMatrix’ ...
** this is package ‘BufferedMatrix’ version ‘1.77.0’
** using staged installation
** libs
using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0’
gcc -std=gnu2x -I"/home/biocbuild/bbs-3.24-bioc/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -Wall -Werror=format-security -c RBufferedMatrix.c -o RBufferedMatrix.o
gcc -std=gnu2x -I"/home/biocbuild/bbs-3.24-bioc/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -Wall -Werror=format-security -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o
doubleBufferedMatrix.c: In function ‘dbm_ReadOnlyMode’:
doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
 1580 |   if (!(Matrix->readonly) & setting){
      |       ^~~~~~~~~~~~~~~~~~~
doubleBufferedMatrix.c: At top level:
doubleBufferedMatrix.c:3327:12: warning: ‘sort_double’ defined but not used [-Wunused-function]
 3327 | static int sort_double(const double *a1,const double *a2){
      |            ^~~~~~~~~~~
gcc -std=gnu2x -I"/home/biocbuild/bbs-3.24-bioc/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -Wall -Werror=format-security -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o
gcc -std=gnu2x -I"/home/biocbuild/bbs-3.24-bioc/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -Wall -Werror=format-security -c init_package.c -o init_package.o
gcc -std=gnu2x -shared -L/home/biocbuild/bbs-3.24-bioc/R/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/bbs-3.24-bioc/R/lib -lR
installing to /home/biocbuild/bbs-3.24-bioc/R/site-library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’
Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’
Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’
Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’
Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’
Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (BufferedMatrix)

Tests output

BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout


R version 4.6.0 RC (2026-04-17 r89917) -- "Because it was There"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1))

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

Checking dimensions
Rows: 5
Cols: 5
Buffer Rows: 1
Buffer Cols: 1

Assigning Values
0.000000 1.000000 2.000000 3.000000 4.000000 
1.000000 2.000000 3.000000 4.000000 5.000000 
2.000000 3.000000 4.000000 5.000000 6.000000 
3.000000 4.000000 5.000000 6.000000 7.000000 
4.000000 5.000000 6.000000 7.000000 8.000000 

Adding Additional Column
Checking dimensions
Rows: 5
Cols: 6
Buffer Rows: 1
Buffer Cols: 1
0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 
1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 
2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 
3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 
4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 

Reassigning values
1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 
2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 
3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 
4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 
5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 

Resizing Buffers
Checking dimensions
Rows: 5
Cols: 6
Buffer Rows: 3
Buffer Cols: 3
1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 
2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 
3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 
4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 
5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 

Activating Row Buffer
In row mode: 1
1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 
2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 
3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 
4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 
5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 

Squaring Last Column
1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 
2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 
3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 
4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 
5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 

Square rooting Last Row, then turing off Row Buffer
In row mode: 0
Checking on value that should be not be in column buffer2.236068 
1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 
2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 
3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 
4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 
2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 

Single Indexing. Assign each value its square
1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 
4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 
9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 
16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 
25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 

Resizing Buffers Smaller
Checking dimensions
Rows: 5
Cols: 6
Buffer Rows: 1
Buffer Cols: 1
1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 
4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 
9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 
16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 
25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 

Activating Row Mode.
Resizing Buffers
Checking dimensions
Rows: 5
Cols: 6
Buffer Rows: 1
Buffer Cols: 1
Activating ReadOnly Mode.
The results of assignment is: 0
Printing matrix reversed.
900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 
841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 
784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 
729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 
676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 

[[1]]
[1] 0

> 
> proc.time()
   user  system elapsed 
  0.248   0.043   0.279 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R version 4.6.0 RC (2026-04-17 r89917) -- "Because it was There"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths());

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> 
> ### this is used to control how many repetitions in something below
> ### higher values result in more checks.
> nreps <-100 ##20000
> 
> 
> ## test creation and some simple assignments and subsetting operations
> 
> ## first on single elements
> tmp <- createBufferedMatrix(1000,10)
> 
> tmp[10,5]
[1] 0
> tmp[10,5] <- 10
> tmp[10,5]
[1] 10
> tmp[10,5] <- 12.445
> tmp[10,5]
[1] 12.445
> 
> 
> 
> ## now testing accessing multiple elements
> tmp2 <- createBufferedMatrix(10,20)
> 
> 
> tmp2[3,1] <- 51.34
> tmp2[9,2] <- 9.87654
> tmp2[,1:2]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[,-(3:20)]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[3,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,] 51.34    0    0    0    0    0    0    0    0     0     0     0     0
     [,14] [,15] [,16] [,17] [,18] [,19] [,20]
[1,]     0     0     0     0     0     0     0
> tmp2[-3,]
      [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]    0 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19] [,20]
 [1,]     0     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0     0
> tmp2[2,1:3]
     [,1] [,2] [,3]
[1,]    0    0    0
> tmp2[3:9,1:3]
      [,1]    [,2] [,3]
[1,] 51.34 0.00000    0
[2,]  0.00 0.00000    0
[3,]  0.00 0.00000    0
[4,]  0.00 0.00000    0
[5,]  0.00 0.00000    0
[6,]  0.00 0.00000    0
[7,]  0.00 9.87654    0
> tmp2[-4,-4]
       [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,] 51.34 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]  0.00 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19]
 [1,]     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0
> 
> ## now testing accessing/assigning multiple elements
> tmp3 <- createBufferedMatrix(10,10)
> 
> for (i in 1:10){
+   for (j in 1:10){
+     tmp3[i,j] <- (j-1)*10 + i
+   }
+ }
> 
> tmp3[2:4,2:4]
     [,1] [,2] [,3]
[1,]   12   22   32
[2,]   13   23   33
[3,]   14   24   34
> tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]   11   21   31   11   21   31   91    1   11     1    11    21    31
 [2,]   12   22   32   12   22   32   92    2   12     2    12    22    32
 [3,]   13   23   33   13   23   33   93    3   13     3    13    23    33
 [4,]   14   24   34   14   24   34   94    4   14     4    14    24    34
 [5,]   15   25   35   15   25   35   95    5   15     5    15    25    35
 [6,]   16   26   36   16   26   36   96    6   16     6    16    26    36
 [7,]   17   27   37   17   27   37   97    7   17     7    17    27    37
 [8,]   18   28   38   18   28   38   98    8   18     8    18    28    38
 [9,]   19   29   39   19   29   39   99    9   19     9    19    29    39
      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
 [1,]    41    51    61    71    81    91    91    81    71    61    51    41
 [2,]    42    52    62    72    82    92    92    82    72    62    52    42
 [3,]    43    53    63    73    83    93    93    83    73    63    53    43
 [4,]    44    54    64    74    84    94    94    84    74    64    54    44
 [5,]    45    55    65    75    85    95    95    85    75    65    55    45
 [6,]    46    56    66    76    86    96    96    86    76    66    56    46
 [7,]    47    57    67    77    87    97    97    87    77    67    57    47
 [8,]    48    58    68    78    88    98    98    88    78    68    58    48
 [9,]    49    59    69    79    89    99    99    89    79    69    59    49
      [,26] [,27] [,28] [,29]
 [1,]    31    21    11     1
 [2,]    32    22    12     2
 [3,]    33    23    13     3
 [4,]    34    24    14     4
 [5,]    35    25    15     5
 [6,]    36    26    16     6
 [7,]    37    27    17     7
 [8,]    38    28    18     8
 [9,]    39    29    19     9
> tmp3[-c(1:5),-c(6:10)]
     [,1] [,2] [,3] [,4] [,5]
[1,]    6   16   26   36   46
[2,]    7   17   27   37   47
[3,]    8   18   28   38   48
[4,]    9   19   29   39   49
[5,]   10   20   30   40   50
> 
> ## assignment of whole columns
> tmp3[,1] <- c(1:10*100.0)
> tmp3[,1:2] <- tmp3[,1:2]*100
> tmp3[,1:2] <- tmp3[,2:1]
> tmp3[,1:2]
      [,1]  [,2]
 [1,] 1100 1e+04
 [2,] 1200 2e+04
 [3,] 1300 3e+04
 [4,] 1400 4e+04
 [5,] 1500 5e+04
 [6,] 1600 6e+04
 [7,] 1700 7e+04
 [8,] 1800 8e+04
 [9,] 1900 9e+04
[10,] 2000 1e+05
> 
> 
> tmp3[,-1] <- tmp3[,1:9]
> tmp3[,1:10]
      [,1] [,2]  [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,] 1100 1100 1e+04   21   31   41   51   61   71    81
 [2,] 1200 1200 2e+04   22   32   42   52   62   72    82
 [3,] 1300 1300 3e+04   23   33   43   53   63   73    83
 [4,] 1400 1400 4e+04   24   34   44   54   64   74    84
 [5,] 1500 1500 5e+04   25   35   45   55   65   75    85
 [6,] 1600 1600 6e+04   26   36   46   56   66   76    86
 [7,] 1700 1700 7e+04   27   37   47   57   67   77    87
 [8,] 1800 1800 8e+04   28   38   48   58   68   78    88
 [9,] 1900 1900 9e+04   29   39   49   59   69   79    89
[10,] 2000 2000 1e+05   30   40   50   60   70   80    90
> 
> tmp3[,1:2] <- rep(1,10)
> tmp3[,1:2] <- rep(1,20)
> tmp3[,1:2] <- matrix(c(1:5),1,5)
> 
> tmp3[,-c(1:8)] <- matrix(c(1:5),1,5)
> 
> tmp3[1,] <- 1:10
> tmp3[1,]
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    1    2    3    4    5    6    7    8    9    10
> tmp3[-1,] <- c(1,2)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    2    1    2    1    2    1    2    1    2     1
[10,]    1    2    1    2    1    2    1    2    1     2
> tmp3[-c(1:8),] <- matrix(c(1:5),1,5)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    1    3    5    2    4    1    3    5    2     4
[10,]    2    4    1    3    5    2    4    1    3     5
> 
> 
> tmp3[1:2,1:2] <- 5555.04
> tmp3[-(1:2),1:2] <- 1234.56789
> 
> 
> 
> ## testing accessors for the directory and prefix
> directory(tmp3)
[1] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests"
> prefix(tmp3)
[1] "BM"
> 
> ## testing if we can remove these objects
> rm(tmp, tmp2, tmp3)
> gc()
         used (Mb) gc trigger (Mb) max used (Mb)
Ncells 480233 25.7    1053308 56.3   637571 34.1
Vcells 887253  6.8    8388608 64.0  2083896 15.9
> 
> 
> 
> 
> ##
> ## checking reads
> ##
> 
> tmp2 <- createBufferedMatrix(10,20)
> 
> test.sample <- rnorm(10*20)
> 
> tmp2[1:10,1:20] <- test.sample
> 
> test.matrix <- matrix(test.sample,10,20)
> 
> ## testing reads
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Tue May  5 21:49:52 2026"
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> date()
[1] "Tue May  5 21:49:52 2026"
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> 
> 
> RowMode(tmp2)
<pointer: 0x585ec5191520>
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Tue May  5 21:49:52 2026"
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> date()
[1] "Tue May  5 21:49:52 2026"
> 
> ColMode(tmp2)
<pointer: 0x585ec5191520>
> 
> 
> 
> ### Now testing assignments
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+ 
+   new.data <- rnorm(20)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,] <- new.data
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   new.data <- rnorm(10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+ 
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col  <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(25),5,5)
+   tmp2[which.row,which.col] <- new.data
+   test.matrix[which.row,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> ###
> ###
> ### testing some more functions
> ###
> 
> 
> 
> ## duplication function
> tmp5 <- duplicate(tmp2)
> 
> # making sure really did copy everything.
> tmp5[1,1] <- tmp5[1,1] +100.00
> 
> if (tmp5[1,1] == tmp2[1,1]){
+   stop("Problem with duplication")
+ }
> 
> 
> 
> 
> ### testing elementwise applying of functions
> 
> tmp5[1:4,1:4]
           [,1]       [,2]       [,3]       [,4]
[1,] 99.7440942  2.6198874 -0.4689816 -1.1490717
[2,]  1.7754649  0.0942273  1.7514023  0.2857477
[3,]  0.3368506  0.4843747  0.9815183 -0.2847375
[4,] -0.9894514 -0.5041823 -0.1395919  0.2921189
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
           [,1]      [,2]      [,3]      [,4]
[1,] 99.7440942 2.6198874 0.4689816 1.1490717
[2,]  1.7754649 0.0942273 1.7514023 0.2857477
[3,]  0.3368506 0.4843747 0.9815183 0.2847375
[4,]  0.9894514 0.5041823 0.1395919 0.2921189
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]      [,2]      [,3]      [,4]
[1,] 9.9871965 1.6186066 0.6848223 1.0719476
[2,] 1.3324657 0.3069647 1.3234056 0.5345537
[3,] 0.5803883 0.6959703 0.9907161 0.5336080
[4,] 0.9947117 0.7100580 0.3736200 0.5404803
> 
> my.function <- function(x,power){
+   (x+5)^power
+ }
> 
> ewApply(tmp5,my.function,power=2)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 224.61606 43.80595 32.31720 36.86855
[2,]  40.10012 28.16387 39.98546 30.63128
[3,]  31.14073 32.44408 35.88868 30.62082
[4,]  35.93657 32.60476 28.87579 30.69692
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x585ec5f7c8f0>
> exp(tmp5)
<pointer: 0x585ec5f7c8f0>
> log(tmp5,2)
<pointer: 0x585ec5f7c8f0>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 467.5089
> Min(tmp5)
[1] 53.99345
> mean(tmp5)
[1] 72.56399
> Sum(tmp5)
[1] 14512.8
> Var(tmp5)
[1] 848.6793
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 92.03393 68.71892 68.56279 69.32049 70.94616 74.58226 71.91572 70.35945
 [9] 71.01553 68.18464
> rowSums(tmp5)
 [1] 1840.679 1374.378 1371.256 1386.410 1418.923 1491.645 1438.314 1407.189
 [9] 1420.311 1363.693
> rowVars(tmp5)
 [1] 7885.27918   54.35273   66.39619   54.65714   44.96382   66.78021
 [7]   64.82451   41.25259   95.19596   37.26447
> rowSd(tmp5)
 [1] 88.799095  7.372431  8.148386  7.393047  6.705507  8.171916  8.051367
 [8]  6.422818  9.756842  6.104463
> rowMax(tmp5)
 [1] 467.50890  83.46315  88.27690  82.07873  85.39944  88.65199  89.48882
 [8]  83.18789  86.97452  77.74353
> rowMin(tmp5)
 [1] 60.17942 58.61941 54.71923 53.99345 60.09593 56.87999 54.69713 58.17360
 [9] 57.64600 54.74839
> 
> colMeans(tmp5)
 [1] 114.41124  72.89031  71.87610  70.38913  69.62207  69.30333  68.81061
 [8]  69.84605  65.80295  74.30749  73.10230  69.14943  73.58971  66.08962
[15]  72.04422  70.14637  72.48432  71.14215  70.27319  65.99916
> colSums(tmp5)
 [1] 1144.1124  728.9031  718.7610  703.8913  696.2207  693.0333  688.1061
 [8]  698.4605  658.0295  743.0749  731.0230  691.4943  735.8971  660.8962
[15]  720.4422  701.4637  724.8432  711.4215  702.7319  659.9916
> colVars(tmp5)
 [1] 15434.911836    82.982500    61.319105   102.495984    58.426090
 [6]    30.759366    60.396420    72.323716    33.821792    60.565743
[11]    62.275260    65.286132     8.266544    56.666578    82.682118
[16]   103.577955    58.455820    75.015806    49.172724    30.926999
> colSd(tmp5)
 [1] 124.237321   9.109473   7.830652  10.124030   7.643696   5.546113
 [7]   7.771513   8.504335   5.815651   7.782400   7.891468   8.079983
[13]   2.875160   7.527721   9.092971  10.177326   7.645641   8.661167
[19]   7.012327   5.561205
> colMax(tmp5)
 [1] 467.50890  91.17635  83.22449  86.97452  83.66189  78.16723  78.85529
 [8]  86.68435  79.05717  88.65199  83.09354  80.15541  78.43895  77.38102
[15]  88.97102  89.48882  83.07703  88.27690  82.07873  74.02739
> colMin(tmp5)
 [1] 64.81536 58.61941 60.10118 54.74839 60.31503 59.97401 57.64600 60.00950
 [9] 56.68969 60.44503 60.65049 58.82427 68.39628 54.69713 54.71923 53.99345
[17] 60.20627 56.87999 62.83382 57.39612
> 
> 
> ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default)
> 
> 
> which.row <- sample(1:10,1,replace=TRUE)
> which.col  <- sample(1:20,1,replace=TRUE)
> 
> tmp5[which.row,which.col] <- NA
> 
> Max(tmp5)
[1] NA
> Min(tmp5)
[1] NA
> mean(tmp5)
[1] NA
> Sum(tmp5)
[1] NA
> Var(tmp5)
[1] NA
> 
> rowMeans(tmp5)
 [1]       NA 68.71892 68.56279 69.32049 70.94616 74.58226 71.91572 70.35945
 [9] 71.01553 68.18464
> rowSums(tmp5)
 [1]       NA 1374.378 1371.256 1386.410 1418.923 1491.645 1438.314 1407.189
 [9] 1420.311 1363.693
> rowVars(tmp5)
 [1] 8322.80163   54.35273   66.39619   54.65714   44.96382   66.78021
 [7]   64.82451   41.25259   95.19596   37.26447
> rowSd(tmp5)
 [1] 91.229390  7.372431  8.148386  7.393047  6.705507  8.171916  8.051367
 [8]  6.422818  9.756842  6.104463
> rowMax(tmp5)
 [1]       NA 83.46315 88.27690 82.07873 85.39944 88.65199 89.48882 83.18789
 [9] 86.97452 77.74353
> rowMin(tmp5)
 [1]       NA 58.61941 54.71923 53.99345 60.09593 56.87999 54.69713 58.17360
 [9] 57.64600 54.74839
> 
> colMeans(tmp5)
 [1] 114.41124  72.89031  71.87610  70.38913  69.62207  69.30333  68.81061
 [8]  69.84605  65.80295  74.30749  73.10230  69.14943  73.58971  66.08962
[15]        NA  70.14637  72.48432  71.14215  70.27319  65.99916
> colSums(tmp5)
 [1] 1144.1124  728.9031  718.7610  703.8913  696.2207  693.0333  688.1061
 [8]  698.4605  658.0295  743.0749  731.0230  691.4943  735.8971  660.8962
[15]        NA  701.4637  724.8432  711.4215  702.7319  659.9916
> colVars(tmp5)
 [1] 15434.911836    82.982500    61.319105   102.495984    58.426090
 [6]    30.759366    60.396420    72.323716    33.821792    60.565743
[11]    62.275260    65.286132     8.266544    56.666578           NA
[16]   103.577955    58.455820    75.015806    49.172724    30.926999
> colSd(tmp5)
 [1] 124.237321   9.109473   7.830652  10.124030   7.643696   5.546113
 [7]   7.771513   8.504335   5.815651   7.782400   7.891468   8.079983
[13]   2.875160   7.527721         NA  10.177326   7.645641   8.661167
[19]   7.012327   5.561205
> colMax(tmp5)
 [1] 467.50890  91.17635  83.22449  86.97452  83.66189  78.16723  78.85529
 [8]  86.68435  79.05717  88.65199  83.09354  80.15541  78.43895  77.38102
[15]        NA  89.48882  83.07703  88.27690  82.07873  74.02739
> colMin(tmp5)
 [1] 64.81536 58.61941 60.10118 54.74839 60.31503 59.97401 57.64600 60.00950
 [9] 56.68969 60.44503 60.65049 58.82427 68.39628 54.69713       NA 53.99345
[17] 60.20627 56.87999 62.83382 57.39612
> 
> Max(tmp5,na.rm=TRUE)
[1] 467.5089
> Min(tmp5,na.rm=TRUE)
[1] 53.99345
> mean(tmp5,na.rm=TRUE)
[1] 72.48154
> Sum(tmp5,na.rm=TRUE)
[1] 14423.83
> Var(tmp5,na.rm=TRUE)
[1] 851.5992
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 92.19513 68.71892 68.56279 69.32049 70.94616 74.58226 71.91572 70.35945
 [9] 71.01553 68.18464
> rowSums(tmp5,na.rm=TRUE)
 [1] 1751.708 1374.378 1371.256 1386.410 1418.923 1491.645 1438.314 1407.189
 [9] 1420.311 1363.693
> rowVars(tmp5,na.rm=TRUE)
 [1] 8322.80163   54.35273   66.39619   54.65714   44.96382   66.78021
 [7]   64.82451   41.25259   95.19596   37.26447
> rowSd(tmp5,na.rm=TRUE)
 [1] 91.229390  7.372431  8.148386  7.393047  6.705507  8.171916  8.051367
 [8]  6.422818  9.756842  6.104463
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.50890  83.46315  88.27690  82.07873  85.39944  88.65199  89.48882
 [8]  83.18789  86.97452  77.74353
> rowMin(tmp5,na.rm=TRUE)
 [1] 60.17942 58.61941 54.71923 53.99345 60.09593 56.87999 54.69713 58.17360
 [9] 57.64600 54.74839
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 114.41124  72.89031  71.87610  70.38913  69.62207  69.30333  68.81061
 [8]  69.84605  65.80295  74.30749  73.10230  69.14943  73.58971  66.08962
[15]  70.16346  70.14637  72.48432  71.14215  70.27319  65.99916
> colSums(tmp5,na.rm=TRUE)
 [1] 1144.1124  728.9031  718.7610  703.8913  696.2207  693.0333  688.1061
 [8]  698.4605  658.0295  743.0749  731.0230  691.4943  735.8971  660.8962
[15]  631.4711  701.4637  724.8432  711.4215  702.7319  659.9916
> colVars(tmp5,na.rm=TRUE)
 [1] 15434.911836    82.982500    61.319105   102.495984    58.426090
 [6]    30.759366    60.396420    72.323716    33.821792    60.565743
[11]    62.275260    65.286132     8.266544    56.666578    53.223399
[16]   103.577955    58.455820    75.015806    49.172724    30.926999
> colSd(tmp5,na.rm=TRUE)
 [1] 124.237321   9.109473   7.830652  10.124030   7.643696   5.546113
 [7]   7.771513   8.504335   5.815651   7.782400   7.891468   8.079983
[13]   2.875160   7.527721   7.295437  10.177326   7.645641   8.661167
[19]   7.012327   5.561205
> colMax(tmp5,na.rm=TRUE)
 [1] 467.50890  91.17635  83.22449  86.97452  83.66189  78.16723  78.85529
 [8]  86.68435  79.05717  88.65199  83.09354  80.15541  78.43895  77.38102
[15]  80.63345  89.48882  83.07703  88.27690  82.07873  74.02739
> colMin(tmp5,na.rm=TRUE)
 [1] 64.81536 58.61941 60.10118 54.74839 60.31503 59.97401 57.64600 60.00950
 [9] 56.68969 60.44503 60.65049 58.82427 68.39628 54.69713 54.71923 53.99345
[17] 60.20627 56.87999 62.83382 57.39612
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1]      NaN 68.71892 68.56279 69.32049 70.94616 74.58226 71.91572 70.35945
 [9] 71.01553 68.18464
> rowSums(tmp5,na.rm=TRUE)
 [1]    0.000 1374.378 1371.256 1386.410 1418.923 1491.645 1438.314 1407.189
 [9] 1420.311 1363.693
> rowVars(tmp5,na.rm=TRUE)
 [1]       NA 54.35273 66.39619 54.65714 44.96382 66.78021 64.82451 41.25259
 [9] 95.19596 37.26447
> rowSd(tmp5,na.rm=TRUE)
 [1]       NA 7.372431 8.148386 7.393047 6.705507 8.171916 8.051367 6.422818
 [9] 9.756842 6.104463
> rowMax(tmp5,na.rm=TRUE)
 [1]       NA 83.46315 88.27690 82.07873 85.39944 88.65199 89.48882 83.18789
 [9] 86.97452 77.74353
> rowMin(tmp5,na.rm=TRUE)
 [1]       NA 58.61941 54.71923 53.99345 60.09593 56.87999 54.69713 58.17360
 [9] 57.64600 54.74839
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 75.17817 70.85853 72.38856 69.68380 70.52142 68.71466 68.33409 70.14542
 [9] 66.18379 74.93249 72.16751 68.04802 74.16675 66.33331      NaN 70.41675
[17] 72.23714 71.66671 69.22684 66.64580
> colSums(tmp5,na.rm=TRUE)
 [1] 676.6035 637.7268 651.4970 627.1542 634.6928 618.4319 615.0068 631.3088
 [9] 595.6541 674.3924 649.5076 612.4322 667.5008 596.9998   0.0000 633.7507
[17] 650.1343 645.0004 623.0416 599.8122
> colVars(tmp5,na.rm=TRUE)
 [1]  47.893419  46.913752  66.029654 109.711292  56.630061  30.705751
 [7]  65.391420  80.355877  36.417844  63.741986  60.229150  59.799522
[13]   5.553795  63.081810         NA 115.702817  65.075468  81.297225
[19]  43.002333  30.088800
> colSd(tmp5,na.rm=TRUE)
 [1]  6.920507  6.849361  8.125863 10.474316  7.525295  5.541277  8.086496
 [8]  8.964144  6.034720  7.983858  7.760744  7.733015  2.356649  7.942406
[15]        NA 10.756524  8.066937  9.016497  6.557616  5.485326
> colMax(tmp5,na.rm=TRUE)
 [1] 83.46315 79.00971 83.22449 86.97452 83.66189 78.16723 78.85529 86.68435
 [9] 79.05717 88.65199 83.09354 80.15541 78.43895 77.38102     -Inf 89.48882
[17] 83.07703 88.27690 82.07873 74.02739
> colMin(tmp5,na.rm=TRUE)
 [1] 64.81536 58.61941 60.10118 54.74839 60.31503 59.97401 57.64600 60.00950
 [9] 56.68969 60.44503 60.65049 58.82427 71.93159 54.69713      Inf 53.99345
[17] 60.20627 56.87999 62.83382 57.39612
> 
> 
> 
> 
> copymatrix <- matrix(rnorm(200,150,15),10,20)
> 
> tmp5[1:10,1:20] <- copymatrix
> which.row <- 3
> which.col  <- 1
> cat(which.row," ",which.col,"\n")
3   1 
> tmp5[which.row,which.col] <- NA
> copymatrix[which.row,which.col] <- NA
> 
> rowVars(tmp5,na.rm=TRUE)
 [1] 321.7098 284.0726 241.4151 214.4132 331.5478 373.2107 301.2373 184.9525
 [9] 168.3547 131.5930
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 321.7098 284.0726 241.4151 214.4132 331.5478 373.2107 301.2373 184.9525
 [9] 168.3547 131.5930
> 
> 
> 
> copymatrix <- matrix(rnorm(200,150,15),10,20)
> 
> tmp5[1:10,1:20] <- copymatrix
> which.row <- 1
> which.col  <- 3
> cat(which.row," ",which.col,"\n")
1   3 
> tmp5[which.row,which.col] <- NA
> copymatrix[which.row,which.col] <- NA
> 
> colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE)
 [1]  0.000000e+00 -1.705303e-13  0.000000e+00 -1.136868e-13 -5.684342e-14
 [6]  8.526513e-14  1.989520e-13  1.136868e-13 -1.136868e-13  5.684342e-14
[11] -1.136868e-13 -1.136868e-13 -8.526513e-14  6.394885e-14 -1.136868e-13
[16]  0.000000e+00 -8.526513e-14 -1.421085e-13  2.842171e-13  5.684342e-14
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## making sure these things agree
> ##
> ## first when there is no NA
> 
> 
> 
> agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){
+ 
+   if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Max")
+   }
+   
+ 
+   if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Min")
+   }
+ 
+ 
+   if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){
+ 
+     cat(Sum(buff.matrix,na.rm=TRUE),"\n")
+     cat(sum(r.matrix,na.rm=TRUE),"\n")
+     cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n")
+     
+     stop("No agreement in Sum")
+   }
+   
+   if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){
+     stop("No agreement in mean")
+   }
+   
+   
+   if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){
+     stop("No agreement in Var")
+   }
+   
+   
+ 
+   if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowMeans")
+   }
+   
+   
+   if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colMeans")
+   }
+   
+   
+   if(any(abs(rowSums(buff.matrix,na.rm=TRUE)  -  apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in rowSums")
+   }
+   
+   
+   if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colSums")
+   }
+   
+   ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when 
+   ### computing variance
+   my.Var <- function(x,na.rm=FALSE){
+    if (all(is.na(x))){
+      return(NA)
+    } else {
+      var(x,na.rm=na.rm)
+    }
+ 
+   }
+   
+   if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+   
+   
+   if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+ 
+ 
+   if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+ 
+   if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+   
+   
+   if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+   
+ 
+   if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+ 
+   if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMedian")
+   }
+ 
+   if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colRanges")
+   }
+ 
+ 
+   
+ }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> for (rep in 1:20){
+   copymatrix <- matrix(rnorm(200,150,15),10,20)
+   
+   tmp5[1:10,1:20] <- copymatrix
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ## now lets assign some NA values and check agreement
+ 
+   which.row <- sample(1:10,1,replace=TRUE)
+   which.col  <- sample(1:20,1,replace=TRUE)
+   
+   cat(which.row," ",which.col,"\n")
+   
+   tmp5[which.row,which.col] <- NA
+   copymatrix[which.row,which.col] <- NA
+   
+   agree.checks(tmp5,copymatrix)
+ 
+   ## make an entire row NA
+   tmp5[which.row,] <- NA
+   copymatrix[which.row,] <- NA
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ### also make an entire col NA
+   tmp5[,which.col] <- NA
+   copymatrix[,which.col] <- NA
+ 
+   agree.checks(tmp5,copymatrix)
+ 
+   ### now make 1 element non NA with NA in the rest of row and column
+ 
+   tmp5[which.row,which.col] <- rnorm(1,150,15)
+   copymatrix[which.row,which.col] <- tmp5[which.row,which.col]
+ 
+   agree.checks(tmp5,copymatrix)
+ }
5   18 
6   8 
9   8 
4   10 
10   5 
10   19 
1   18 
5   18 
4   14 
4   9 
7   19 
3   18 
3   20 
4   7 
7   15 
3   4 
9   1 
6   11 
7   7 
2   11 
There were 50 or more warnings (use warnings() to see the first 50)
> 
> 
> ### now test 1 by n and n by 1 matrix
> 
> 
> err.tol <- 1e-12
> 
> rm(tmp5)
> 
> dataset1 <- rnorm(100)
> dataset2 <- rnorm(100)
> 
> tmp <- createBufferedMatrix(1,100)
> tmp[1,] <- dataset1
> 
> tmp2 <- createBufferedMatrix(100,1)
> tmp2[,1] <- dataset2
> 
> 
> 
> 
> 
> Max(tmp)
[1] 2.212133
> Min(tmp)
[1] -2.568197
> mean(tmp)
[1] -0.05211921
> Sum(tmp)
[1] -5.211921
> Var(tmp)
[1] 0.7634278
> 
> rowMeans(tmp)
[1] -0.05211921
> rowSums(tmp)
[1] -5.211921
> rowVars(tmp)
[1] 0.7634278
> rowSd(tmp)
[1] 0.8737436
> rowMax(tmp)
[1] 2.212133
> rowMin(tmp)
[1] -2.568197
> 
> colMeans(tmp)
  [1]  0.339591598 -1.158380816  0.370742722 -1.310460334 -0.704427754
  [6]  0.419249887 -1.035878477 -0.381920990  0.845235997 -1.650054511
 [11] -0.520898152 -0.350947765 -0.092539077  1.439682468  0.119928839
 [16]  0.387672666  0.853915201 -0.258408811 -1.103333209  1.126405510
 [21] -1.939657899  0.680738152  0.989647966  0.551471568 -1.973175732
 [26]  0.774215698  0.404433898 -0.385228261  0.888340202 -0.354450283
 [31]  0.408783036  0.681806423 -1.171005337  0.008088680  0.201377096
 [36] -0.304406849  1.259340158 -0.418338488 -0.021117429  0.107117863
 [41] -2.568196684  0.382873706 -0.517255598  1.371455206  2.212132699
 [46] -1.115741850 -1.972643208  0.767894694 -0.565977889 -0.729541031
 [51] -0.105137972  1.074733316  0.369176599 -0.233878554 -1.126645228
 [56]  0.839241287 -0.709701380  0.012863235  0.131542622 -0.701535715
 [61]  0.543570707  0.237942602  0.376936763  0.323258463 -1.798110972
 [66]  1.029103223 -0.937412754 -1.494889164 -0.515575070  0.250684157
 [71]  0.646590458 -0.890564628  1.217892013  1.060677707  0.546668505
 [76]  1.050169440 -0.351666883  0.629321403  0.211470183 -0.833044595
 [81] -0.330264858  0.543747743  0.529901197 -0.415105670 -0.113546167
 [86] -0.101587832  0.563753870 -0.116615743 -0.494203589  0.708314112
 [91] -0.512535747 -0.725329905 -0.174527287  0.848918849 -1.119443058
 [96] -0.207862086  0.639386364 -0.008152584  0.511283419 -1.079887153
> colSums(tmp)
  [1]  0.339591598 -1.158380816  0.370742722 -1.310460334 -0.704427754
  [6]  0.419249887 -1.035878477 -0.381920990  0.845235997 -1.650054511
 [11] -0.520898152 -0.350947765 -0.092539077  1.439682468  0.119928839
 [16]  0.387672666  0.853915201 -0.258408811 -1.103333209  1.126405510
 [21] -1.939657899  0.680738152  0.989647966  0.551471568 -1.973175732
 [26]  0.774215698  0.404433898 -0.385228261  0.888340202 -0.354450283
 [31]  0.408783036  0.681806423 -1.171005337  0.008088680  0.201377096
 [36] -0.304406849  1.259340158 -0.418338488 -0.021117429  0.107117863
 [41] -2.568196684  0.382873706 -0.517255598  1.371455206  2.212132699
 [46] -1.115741850 -1.972643208  0.767894694 -0.565977889 -0.729541031
 [51] -0.105137972  1.074733316  0.369176599 -0.233878554 -1.126645228
 [56]  0.839241287 -0.709701380  0.012863235  0.131542622 -0.701535715
 [61]  0.543570707  0.237942602  0.376936763  0.323258463 -1.798110972
 [66]  1.029103223 -0.937412754 -1.494889164 -0.515575070  0.250684157
 [71]  0.646590458 -0.890564628  1.217892013  1.060677707  0.546668505
 [76]  1.050169440 -0.351666883  0.629321403  0.211470183 -0.833044595
 [81] -0.330264858  0.543747743  0.529901197 -0.415105670 -0.113546167
 [86] -0.101587832  0.563753870 -0.116615743 -0.494203589  0.708314112
 [91] -0.512535747 -0.725329905 -0.174527287  0.848918849 -1.119443058
 [96] -0.207862086  0.639386364 -0.008152584  0.511283419 -1.079887153
> colVars(tmp)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> colSd(tmp)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> colMax(tmp)
  [1]  0.339591598 -1.158380816  0.370742722 -1.310460334 -0.704427754
  [6]  0.419249887 -1.035878477 -0.381920990  0.845235997 -1.650054511
 [11] -0.520898152 -0.350947765 -0.092539077  1.439682468  0.119928839
 [16]  0.387672666  0.853915201 -0.258408811 -1.103333209  1.126405510
 [21] -1.939657899  0.680738152  0.989647966  0.551471568 -1.973175732
 [26]  0.774215698  0.404433898 -0.385228261  0.888340202 -0.354450283
 [31]  0.408783036  0.681806423 -1.171005337  0.008088680  0.201377096
 [36] -0.304406849  1.259340158 -0.418338488 -0.021117429  0.107117863
 [41] -2.568196684  0.382873706 -0.517255598  1.371455206  2.212132699
 [46] -1.115741850 -1.972643208  0.767894694 -0.565977889 -0.729541031
 [51] -0.105137972  1.074733316  0.369176599 -0.233878554 -1.126645228
 [56]  0.839241287 -0.709701380  0.012863235  0.131542622 -0.701535715
 [61]  0.543570707  0.237942602  0.376936763  0.323258463 -1.798110972
 [66]  1.029103223 -0.937412754 -1.494889164 -0.515575070  0.250684157
 [71]  0.646590458 -0.890564628  1.217892013  1.060677707  0.546668505
 [76]  1.050169440 -0.351666883  0.629321403  0.211470183 -0.833044595
 [81] -0.330264858  0.543747743  0.529901197 -0.415105670 -0.113546167
 [86] -0.101587832  0.563753870 -0.116615743 -0.494203589  0.708314112
 [91] -0.512535747 -0.725329905 -0.174527287  0.848918849 -1.119443058
 [96] -0.207862086  0.639386364 -0.008152584  0.511283419 -1.079887153
> colMin(tmp)
  [1]  0.339591598 -1.158380816  0.370742722 -1.310460334 -0.704427754
  [6]  0.419249887 -1.035878477 -0.381920990  0.845235997 -1.650054511
 [11] -0.520898152 -0.350947765 -0.092539077  1.439682468  0.119928839
 [16]  0.387672666  0.853915201 -0.258408811 -1.103333209  1.126405510
 [21] -1.939657899  0.680738152  0.989647966  0.551471568 -1.973175732
 [26]  0.774215698  0.404433898 -0.385228261  0.888340202 -0.354450283
 [31]  0.408783036  0.681806423 -1.171005337  0.008088680  0.201377096
 [36] -0.304406849  1.259340158 -0.418338488 -0.021117429  0.107117863
 [41] -2.568196684  0.382873706 -0.517255598  1.371455206  2.212132699
 [46] -1.115741850 -1.972643208  0.767894694 -0.565977889 -0.729541031
 [51] -0.105137972  1.074733316  0.369176599 -0.233878554 -1.126645228
 [56]  0.839241287 -0.709701380  0.012863235  0.131542622 -0.701535715
 [61]  0.543570707  0.237942602  0.376936763  0.323258463 -1.798110972
 [66]  1.029103223 -0.937412754 -1.494889164 -0.515575070  0.250684157
 [71]  0.646590458 -0.890564628  1.217892013  1.060677707  0.546668505
 [76]  1.050169440 -0.351666883  0.629321403  0.211470183 -0.833044595
 [81] -0.330264858  0.543747743  0.529901197 -0.415105670 -0.113546167
 [86] -0.101587832  0.563753870 -0.116615743 -0.494203589  0.708314112
 [91] -0.512535747 -0.725329905 -0.174527287  0.848918849 -1.119443058
 [96] -0.207862086  0.639386364 -0.008152584  0.511283419 -1.079887153
> colMedians(tmp)
  [1]  0.339591598 -1.158380816  0.370742722 -1.310460334 -0.704427754
  [6]  0.419249887 -1.035878477 -0.381920990  0.845235997 -1.650054511
 [11] -0.520898152 -0.350947765 -0.092539077  1.439682468  0.119928839
 [16]  0.387672666  0.853915201 -0.258408811 -1.103333209  1.126405510
 [21] -1.939657899  0.680738152  0.989647966  0.551471568 -1.973175732
 [26]  0.774215698  0.404433898 -0.385228261  0.888340202 -0.354450283
 [31]  0.408783036  0.681806423 -1.171005337  0.008088680  0.201377096
 [36] -0.304406849  1.259340158 -0.418338488 -0.021117429  0.107117863
 [41] -2.568196684  0.382873706 -0.517255598  1.371455206  2.212132699
 [46] -1.115741850 -1.972643208  0.767894694 -0.565977889 -0.729541031
 [51] -0.105137972  1.074733316  0.369176599 -0.233878554 -1.126645228
 [56]  0.839241287 -0.709701380  0.012863235  0.131542622 -0.701535715
 [61]  0.543570707  0.237942602  0.376936763  0.323258463 -1.798110972
 [66]  1.029103223 -0.937412754 -1.494889164 -0.515575070  0.250684157
 [71]  0.646590458 -0.890564628  1.217892013  1.060677707  0.546668505
 [76]  1.050169440 -0.351666883  0.629321403  0.211470183 -0.833044595
 [81] -0.330264858  0.543747743  0.529901197 -0.415105670 -0.113546167
 [86] -0.101587832  0.563753870 -0.116615743 -0.494203589  0.708314112
 [91] -0.512535747 -0.725329905 -0.174527287  0.848918849 -1.119443058
 [96] -0.207862086  0.639386364 -0.008152584  0.511283419 -1.079887153
> colRanges(tmp)
          [,1]      [,2]      [,3]     [,4]       [,5]      [,6]      [,7]
[1,] 0.3395916 -1.158381 0.3707427 -1.31046 -0.7044278 0.4192499 -1.035878
[2,] 0.3395916 -1.158381 0.3707427 -1.31046 -0.7044278 0.4192499 -1.035878
          [,8]     [,9]     [,10]      [,11]      [,12]       [,13]    [,14]
[1,] -0.381921 0.845236 -1.650055 -0.5208982 -0.3509478 -0.09253908 1.439682
[2,] -0.381921 0.845236 -1.650055 -0.5208982 -0.3509478 -0.09253908 1.439682
         [,15]     [,16]     [,17]      [,18]     [,19]    [,20]     [,21]
[1,] 0.1199288 0.3876727 0.8539152 -0.2584088 -1.103333 1.126406 -1.939658
[2,] 0.1199288 0.3876727 0.8539152 -0.2584088 -1.103333 1.126406 -1.939658
         [,22]    [,23]     [,24]     [,25]     [,26]     [,27]      [,28]
[1,] 0.6807382 0.989648 0.5514716 -1.973176 0.7742157 0.4044339 -0.3852283
[2,] 0.6807382 0.989648 0.5514716 -1.973176 0.7742157 0.4044339 -0.3852283
         [,29]      [,30]    [,31]     [,32]     [,33]      [,34]     [,35]
[1,] 0.8883402 -0.3544503 0.408783 0.6818064 -1.171005 0.00808868 0.2013771
[2,] 0.8883402 -0.3544503 0.408783 0.6818064 -1.171005 0.00808868 0.2013771
          [,36]   [,37]      [,38]       [,39]     [,40]     [,41]     [,42]
[1,] -0.3044068 1.25934 -0.4183385 -0.02111743 0.1071179 -2.568197 0.3828737
[2,] -0.3044068 1.25934 -0.4183385 -0.02111743 0.1071179 -2.568197 0.3828737
          [,43]    [,44]    [,45]     [,46]     [,47]     [,48]      [,49]
[1,] -0.5172556 1.371455 2.212133 -1.115742 -1.972643 0.7678947 -0.5659779
[2,] -0.5172556 1.371455 2.212133 -1.115742 -1.972643 0.7678947 -0.5659779
         [,50]     [,51]    [,52]     [,53]      [,54]     [,55]     [,56]
[1,] -0.729541 -0.105138 1.074733 0.3691766 -0.2338786 -1.126645 0.8392413
[2,] -0.729541 -0.105138 1.074733 0.3691766 -0.2338786 -1.126645 0.8392413
          [,57]      [,58]     [,59]      [,60]     [,61]     [,62]     [,63]
[1,] -0.7097014 0.01286324 0.1315426 -0.7015357 0.5435707 0.2379426 0.3769368
[2,] -0.7097014 0.01286324 0.1315426 -0.7015357 0.5435707 0.2379426 0.3769368
         [,64]     [,65]    [,66]      [,67]     [,68]      [,69]     [,70]
[1,] 0.3232585 -1.798111 1.029103 -0.9374128 -1.494889 -0.5155751 0.2506842
[2,] 0.3232585 -1.798111 1.029103 -0.9374128 -1.494889 -0.5155751 0.2506842
         [,71]      [,72]    [,73]    [,74]     [,75]    [,76]      [,77]
[1,] 0.6465905 -0.8905646 1.217892 1.060678 0.5466685 1.050169 -0.3516669
[2,] 0.6465905 -0.8905646 1.217892 1.060678 0.5466685 1.050169 -0.3516669
         [,78]     [,79]      [,80]      [,81]     [,82]     [,83]      [,84]
[1,] 0.6293214 0.2114702 -0.8330446 -0.3302649 0.5437477 0.5299012 -0.4151057
[2,] 0.6293214 0.2114702 -0.8330446 -0.3302649 0.5437477 0.5299012 -0.4151057
          [,85]      [,86]     [,87]      [,88]      [,89]     [,90]      [,91]
[1,] -0.1135462 -0.1015878 0.5637539 -0.1166157 -0.4942036 0.7083141 -0.5125357
[2,] -0.1135462 -0.1015878 0.5637539 -0.1166157 -0.4942036 0.7083141 -0.5125357
          [,92]      [,93]     [,94]     [,95]      [,96]     [,97]
[1,] -0.7253299 -0.1745273 0.8489188 -1.119443 -0.2078621 0.6393864
[2,] -0.7253299 -0.1745273 0.8489188 -1.119443 -0.2078621 0.6393864
            [,98]     [,99]    [,100]
[1,] -0.008152584 0.5112834 -1.079887
[2,] -0.008152584 0.5112834 -1.079887
> 
> 
> Max(tmp2)
[1] 2.180282
> Min(tmp2)
[1] -2.755441
> mean(tmp2)
[1] -0.07390976
> Sum(tmp2)
[1] -7.390976
> Var(tmp2)
[1] 1.144063
> 
> rowMeans(tmp2)
  [1]  0.28346159  0.49059555 -0.22921200  1.53086363  0.08752977  0.99948693
  [7]  0.33152881 -2.69086444  0.26434375  0.58470060 -1.55513550  1.69782068
 [13] -0.43715930  0.07079420 -0.76734632 -1.92749164  0.16751311  0.80826939
 [19]  1.24733887 -1.04237820 -1.43674571 -0.47989308  1.08720952 -1.02824369
 [25]  1.37332455  1.63811937  2.18028174  0.28875667 -2.36343612  0.88558138
 [31] -0.90423901  0.76557313  0.51622095  0.03335993  0.28893219 -2.75544054
 [37] -0.35786330 -0.71905674 -1.46211864 -1.87157889 -1.01587168 -0.80157187
 [43] -0.50818957 -0.80521379 -1.34021604  1.52606121  0.61180336 -0.40901277
 [49]  0.14300650  1.28718434  0.65934056 -0.32201612  0.05693453 -0.24529924
 [55] -0.48048685  0.31775375  0.89059558  0.41231782  1.42568142  0.93445297
 [61]  1.66490613 -1.67262276  1.28352526 -0.57499509 -0.50653939  0.44354166
 [67]  0.38613118 -1.41776598 -0.15585315 -0.86876422 -0.88581310 -0.22945744
 [73]  0.84723454  0.40628464 -0.15603709 -0.18288727  0.38902432  0.81851878
 [79]  0.46843191 -0.06560597  1.44376950 -0.53050024  0.63515873 -2.37375460
 [85]  1.59303357  0.03697744  0.01602576 -1.13669606 -0.49757183 -1.18906508
 [91] -1.80919231 -0.90334621 -0.53129296 -1.90720569  0.16327112  1.19513671
 [97]  1.00669935 -0.77514122 -0.49003174  0.74083550
> rowSums(tmp2)
  [1]  0.28346159  0.49059555 -0.22921200  1.53086363  0.08752977  0.99948693
  [7]  0.33152881 -2.69086444  0.26434375  0.58470060 -1.55513550  1.69782068
 [13] -0.43715930  0.07079420 -0.76734632 -1.92749164  0.16751311  0.80826939
 [19]  1.24733887 -1.04237820 -1.43674571 -0.47989308  1.08720952 -1.02824369
 [25]  1.37332455  1.63811937  2.18028174  0.28875667 -2.36343612  0.88558138
 [31] -0.90423901  0.76557313  0.51622095  0.03335993  0.28893219 -2.75544054
 [37] -0.35786330 -0.71905674 -1.46211864 -1.87157889 -1.01587168 -0.80157187
 [43] -0.50818957 -0.80521379 -1.34021604  1.52606121  0.61180336 -0.40901277
 [49]  0.14300650  1.28718434  0.65934056 -0.32201612  0.05693453 -0.24529924
 [55] -0.48048685  0.31775375  0.89059558  0.41231782  1.42568142  0.93445297
 [61]  1.66490613 -1.67262276  1.28352526 -0.57499509 -0.50653939  0.44354166
 [67]  0.38613118 -1.41776598 -0.15585315 -0.86876422 -0.88581310 -0.22945744
 [73]  0.84723454  0.40628464 -0.15603709 -0.18288727  0.38902432  0.81851878
 [79]  0.46843191 -0.06560597  1.44376950 -0.53050024  0.63515873 -2.37375460
 [85]  1.59303357  0.03697744  0.01602576 -1.13669606 -0.49757183 -1.18906508
 [91] -1.80919231 -0.90334621 -0.53129296 -1.90720569  0.16327112  1.19513671
 [97]  1.00669935 -0.77514122 -0.49003174  0.74083550
> rowVars(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowSd(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowMax(tmp2)
  [1]  0.28346159  0.49059555 -0.22921200  1.53086363  0.08752977  0.99948693
  [7]  0.33152881 -2.69086444  0.26434375  0.58470060 -1.55513550  1.69782068
 [13] -0.43715930  0.07079420 -0.76734632 -1.92749164  0.16751311  0.80826939
 [19]  1.24733887 -1.04237820 -1.43674571 -0.47989308  1.08720952 -1.02824369
 [25]  1.37332455  1.63811937  2.18028174  0.28875667 -2.36343612  0.88558138
 [31] -0.90423901  0.76557313  0.51622095  0.03335993  0.28893219 -2.75544054
 [37] -0.35786330 -0.71905674 -1.46211864 -1.87157889 -1.01587168 -0.80157187
 [43] -0.50818957 -0.80521379 -1.34021604  1.52606121  0.61180336 -0.40901277
 [49]  0.14300650  1.28718434  0.65934056 -0.32201612  0.05693453 -0.24529924
 [55] -0.48048685  0.31775375  0.89059558  0.41231782  1.42568142  0.93445297
 [61]  1.66490613 -1.67262276  1.28352526 -0.57499509 -0.50653939  0.44354166
 [67]  0.38613118 -1.41776598 -0.15585315 -0.86876422 -0.88581310 -0.22945744
 [73]  0.84723454  0.40628464 -0.15603709 -0.18288727  0.38902432  0.81851878
 [79]  0.46843191 -0.06560597  1.44376950 -0.53050024  0.63515873 -2.37375460
 [85]  1.59303357  0.03697744  0.01602576 -1.13669606 -0.49757183 -1.18906508
 [91] -1.80919231 -0.90334621 -0.53129296 -1.90720569  0.16327112  1.19513671
 [97]  1.00669935 -0.77514122 -0.49003174  0.74083550
> rowMin(tmp2)
  [1]  0.28346159  0.49059555 -0.22921200  1.53086363  0.08752977  0.99948693
  [7]  0.33152881 -2.69086444  0.26434375  0.58470060 -1.55513550  1.69782068
 [13] -0.43715930  0.07079420 -0.76734632 -1.92749164  0.16751311  0.80826939
 [19]  1.24733887 -1.04237820 -1.43674571 -0.47989308  1.08720952 -1.02824369
 [25]  1.37332455  1.63811937  2.18028174  0.28875667 -2.36343612  0.88558138
 [31] -0.90423901  0.76557313  0.51622095  0.03335993  0.28893219 -2.75544054
 [37] -0.35786330 -0.71905674 -1.46211864 -1.87157889 -1.01587168 -0.80157187
 [43] -0.50818957 -0.80521379 -1.34021604  1.52606121  0.61180336 -0.40901277
 [49]  0.14300650  1.28718434  0.65934056 -0.32201612  0.05693453 -0.24529924
 [55] -0.48048685  0.31775375  0.89059558  0.41231782  1.42568142  0.93445297
 [61]  1.66490613 -1.67262276  1.28352526 -0.57499509 -0.50653939  0.44354166
 [67]  0.38613118 -1.41776598 -0.15585315 -0.86876422 -0.88581310 -0.22945744
 [73]  0.84723454  0.40628464 -0.15603709 -0.18288727  0.38902432  0.81851878
 [79]  0.46843191 -0.06560597  1.44376950 -0.53050024  0.63515873 -2.37375460
 [85]  1.59303357  0.03697744  0.01602576 -1.13669606 -0.49757183 -1.18906508
 [91] -1.80919231 -0.90334621 -0.53129296 -1.90720569  0.16327112  1.19513671
 [97]  1.00669935 -0.77514122 -0.49003174  0.74083550
> 
> colMeans(tmp2)
[1] -0.07390976
> colSums(tmp2)
[1] -7.390976
> colVars(tmp2)
[1] 1.144063
> colSd(tmp2)
[1] 1.069609
> colMax(tmp2)
[1] 2.180282
> colMin(tmp2)
[1] -2.755441
> colMedians(tmp2)
[1] 0.03516869
> colRanges(tmp2)
          [,1]
[1,] -2.755441
[2,]  2.180282
> 
> dataset1 <- matrix(dataset1,1,100)
> 
> agree.checks(tmp,dataset1)
> 
> dataset2 <- matrix(dataset2,100,1)
> agree.checks(tmp2,dataset2)
>   
> 
> tmp <- createBufferedMatrix(10,10)
> 
> tmp[1:10,1:10] <- rnorm(100)
> colApply(tmp,sum)
 [1]  3.418097  6.209375 -2.867334  3.029329 -4.443059 -3.894376  4.097864
 [8]  1.098260  3.189382 -1.973158
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.2801233
[2,] -0.2642295
[3,]  0.2991502
[4,]  1.1582540
[5,]  1.6406941
> 
> rowApply(tmp,sum)
 [1]  3.57543502  1.29374879 -1.78705089  5.96354887  3.82015133  4.76596966
 [7] -3.12869911 -5.53751916  0.08473513 -1.18593950
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    9    9    7    7    6    1    9    4    9     3
 [2,]    3   10    9    6    9    6    5    6    6     9
 [3,]    8    1    3    1    5    4    7    3    1    10
 [4,]    2    5   10    9    4    5    8    5    5     6
 [5,]    7    3    4    5    3   10    4    1    2     4
 [6,]    6    2    5    3    2    3    6    2    3     8
 [7,]    1    4    2    8    7    9   10    7   10     7
 [8,]    5    8    8   10    1    8    2    9    4     1
 [9,]   10    6    6    2   10    7    3    8    8     2
[10,]    4    7    1    4    8    2    1   10    7     5
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1]  3.47244712  2.88055812  2.58614573  0.09451889  3.72494435  0.47508042
 [7] -2.11236592  1.40055031  0.94361798  1.94327141 -2.75315095 -0.31422757
[13] -2.04817884  2.13752993  0.07050516  1.34560244  2.62636736 -0.85113302
[19]  0.80982768  2.73042865
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -0.1621264
[2,]  0.1040210
[3,]  0.3538102
[4,]  1.3864892
[5,]  1.7902531
> 
> rowApply(tmp,sum)
[1] 7.14921854 0.04343112 4.50693653 6.14509749 1.31765559
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   20   14   18    5   12
[2,]   12   20    4   10   18
[3,]   13   16    9    6   20
[4,]    3    3   13   14   13
[5,]   15   19   14   13    6
> 
> 
> as.matrix(tmp)
           [,1]       [,2]        [,3]       [,4]       [,5]       [,6]
[1,]  1.7902531  0.3088224  0.67783174 -0.5860025  1.3254979  0.2757544
[2,]  0.3538102  1.9809299  0.50967375 -0.9655958  1.4810073  1.0894015
[3,]  1.3864892 -1.0033261 -0.06317874  0.7137848  0.7268943 -0.2898783
[4,] -0.1621264  0.3410700 -0.02603389  0.8092250  0.6043540 -0.3526128
[5,]  0.1040210  1.2530619  1.48785286  0.1231075 -0.4128092 -0.2475844
           [,7]        [,8]       [,9]       [,10]      [,11]      [,12]
[1,] -1.6850118  1.50621380  1.4599838  0.18045663  0.2936416 -0.5737286
[2,] -0.6318358 -0.49794320 -0.4454362  0.06629362 -0.4629724 -0.9987421
[3,]  0.8426837  0.04419339 -0.3221870  0.40864150 -0.6946997 -0.1860074
[4,]  0.3722776  0.32390061  1.3749131  1.33477840 -1.0665485  1.0165128
[5,] -1.0104796  0.02418572 -1.1236557 -0.04689873 -0.8225719  0.4277377
           [,13]      [,14]       [,15]      [,16]      [,17]      [,18]
[1,] -0.25510937 -0.9575522 -0.20400692 -0.2740949  1.0116919  1.3545079
[2,] -0.25015375  0.1379051 -0.62846560 -0.8681194 -1.0212629 -0.3342009
[3,] -2.35563521  0.4742104  1.79265980  2.9254995  1.3679196 -1.0387254
[4,]  0.86746238  1.2426050 -0.02238526  0.8659135  0.3139963 -0.4574254
[5,] -0.05474289  1.2403617 -0.86729685 -1.3035963  0.9540225 -0.3752892
          [,19]      [,20]
[1,] -0.1022152  1.6022849
[2,]  1.0401649  0.4889729
[3,]  1.1169594 -1.3393611
[4,] -1.7512795  0.5165006
[5,]  0.5061981  1.4620314
> 
> 
> is.BufferedMatrix(tmp)
[1] TRUE
> 
> as.BufferedMatrix(as.matrix(tmp))
BufferedMatrix object
Matrix size:  5 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  800  bytes.
> 
> 
> 
> subBufferedMatrix(tmp,1:5,1:5)
BufferedMatrix object
Matrix size:  5 5 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  654  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  565  bytes.
Disk usage :  160  bytes.
> subBufferedMatrix(tmp,1:3,)
BufferedMatrix object
Matrix size:  3 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  480  bytes.
> 
> 
> rm(tmp)
> 
> 
> ###
> ### Testing colnames and rownames
> ###
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> 
> 
> colnames(tmp)
NULL
> rownames(tmp)
NULL
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> colnames(tmp)
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"
> rownames(tmp)
[1] "row1" "row2" "row3" "row4" "row5"
> 
> 
> tmp["row1",]
          col1       col2      col3      col4      col5      col6       col7
row1 0.6145967 -0.6403401 0.2331927 -1.446579 -2.064922 -0.405623 -0.2356534
         col8      col9      col10    col11      col12      col13     col14
row1 1.164273 -1.224655 0.06289602 0.606685 -0.5253558 -0.9880474 0.6198485
         col15    col16     col17     col18   col19      col20
row1 0.6605601 1.265998 0.8370409 0.8122179 2.07309 -0.4741043
> tmp[,"col10"]
           col10
row1  0.06289602
row2 -1.70168667
row3  0.08703139
row4  0.13128241
row5 -1.03665571
> tmp[c("row1","row5"),]
          col1       col2      col3       col4       col5      col6       col7
row1 0.6145967 -0.6403401 0.2331927 -1.4465793 -2.0649222 -0.405623 -0.2356534
row5 0.8964001  0.6793971 1.0543264 -0.8782697  0.2515756  0.328176 -1.2178861
          col8       col9       col10     col11      col12      col13
row1 1.1642727 -1.2246546  0.06289602  0.606685 -0.5253558 -0.9880474
row5 0.2613018 -0.5516184 -1.03665571 -1.689090 -1.5451218  1.1008376
          col14     col15    col16      col17      col18      col19      col20
row1  0.6198485 0.6605601 1.265998 0.83704088  0.8122179  2.0730899 -0.4741043
row5 -0.4935531 0.4642007 1.837712 0.01679937 -1.3829556 -0.3144631 -0.9692721
> tmp[,c("col6","col20")]
           col6      col20
row1 -0.4056230 -0.4741043
row2  1.6718137  2.0111963
row3  0.5621279  0.6835965
row4  0.2183197 -0.8344107
row5  0.3281760 -0.9692721
> tmp[c("row1","row5"),c("col6","col20")]
          col6      col20
row1 -0.405623 -0.4741043
row5  0.328176 -0.9692721
> 
> 
> 
> 
> tmp["row1",] <- rnorm(20,mean=10)
> tmp[,"col10"] <- rnorm(5,mean=30)
> tmp[c("row1","row5"),] <- rnorm(40,mean=50)
> tmp[,c("col6","col20")] <- rnorm(10,mean=75)
> tmp[c("row1","row5"),c("col6","col20")]  <- rnorm(4,mean=105)
> 
> tmp["row1",]
         col1     col2     col3     col4    col5     col6    col7    col8
row1 49.72298 50.37196 51.14123 50.85803 49.1267 104.3788 49.4967 49.0721
         col9    col10    col11    col12    col13    col14 col15    col16
row1 48.88897 50.56253 49.69204 50.17956 49.13653 49.81277 50.03 49.14811
        col17    col18    col19   col20
row1 49.29282 50.08285 48.85324 104.801
> tmp[,"col10"]
        col10
row1 50.56253
row2 29.82550
row3 29.85488
row4 29.64142
row5 49.95131
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 49.72298 50.37196 51.14123 50.85803 49.12670 104.3788 49.49670 49.07210
row5 50.63864 48.75403 49.03412 49.01357 48.89971 106.1776 50.18109 53.11954
         col9    col10    col11    col12    col13    col14    col15    col16
row1 48.88897 50.56253 49.69204 50.17956 49.13653 49.81277 50.03000 49.14811
row5 50.02158 49.95131 51.54491 48.99822 50.12561 49.93106 49.42171 52.98929
        col17    col18    col19    col20
row1 49.29282 50.08285 48.85324 104.8010
row5 51.22574 50.28533 49.07295 104.5547
> tmp[,c("col6","col20")]
          col6     col20
row1 104.37875 104.80099
row2  73.00350  76.62336
row3  74.25921  72.77053
row4  75.81366  75.27925
row5 106.17761 104.55466
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 104.3788 104.8010
row5 106.1776 104.5547
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 104.3788 104.8010
row5 106.1776 104.5547
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,] -0.2880833
[2,]  2.6683818
[3,]  0.3670282
[4,] -0.4146811
[5,] -0.1869610
> tmp[,c("col17","col7")]
         col17       col7
[1,]  1.059495  1.4832463
[2,]  0.816449 -0.1058775
[3,]  0.141551 -2.7752726
[4,] -1.355325 -2.2782822
[5,] -2.015368  1.5154371
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6      col20
[1,] -0.8710881 -1.0164173
[2,] -1.2137229  1.3420564
[3,]  0.4685681 -0.5825399
[4,] -0.4231012  0.3326401
[5,] -0.3810232  0.2434529
> subBufferedMatrix(tmp,1,c("col6"))[,1]
           col1
[1,] -0.8710881
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,] -0.8710881
[2,] -1.2137229
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> 
> 
> 
> subBufferedMatrix(tmp,c("row3","row1"),)[,1:20]
           [,1]      [,2]      [,3]       [,4]       [,5]       [,6]       [,7]
row3  0.2388346 -0.637825 0.7571974 -2.2021134 -0.9182528 -0.5018282  1.9150706
row1 -0.1578081 -0.274443 0.4338019 -0.8668891  1.4887150 -1.3040736 -0.1754819
          [,8]       [,9]      [,10]      [,11]      [,12]     [,13]     [,14]
row3 -1.192955 -0.2932640 -0.1559342  0.9989221 -1.0776386 0.3112635 0.2671729
row1 -1.440662 -0.2530313 -0.1863801 -1.4389446 -0.9903472 0.5602497 0.1939486
           [,15]     [,16]     [,17]     [,18]      [,19]      [,20]
row3 -0.02985669 1.5994560 -1.141281  0.827409 -0.1404245 -0.2804795
row1  1.05073406 0.5250836 -1.153790 -1.549453 -1.7620502 -1.0866162
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
          [,1]      [,2]       [,3]      [,4]      [,5]      [,6]       [,7]
row2 -1.169356 0.1291415 -0.4856138 0.4720376 0.1227881 -1.352715 -0.2244431
         [,8]      [,9]      [,10]
row2 1.221639 -1.764389 -0.8196966
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
          [,1]      [,2]      [,3]      [,4]     [,5]     [,6]      [,7]
row5 -1.391943 -1.293592 0.1804733 -0.365411 0.747198 0.334316 0.7302894
          [,8]      [,9]     [,10]     [,11]    [,12]      [,13]    [,14]
row5 -0.564156 0.2582126 -1.075391 -1.882821 1.695963 -0.3494896 0.653078
        [,15]     [,16]     [,17]     [,18]       [,19]      [,20]
row5 1.472963 0.1172062 -1.370386 -1.051348 -0.03578032 -0.5437564
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> colnames(tmp)
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"
> rownames(tmp)
[1] "row1" "row2" "row3" "row4" "row5"
> 
> 
> colnames(tmp) <- NULL
> rownames(tmp) <- NULL
> 
> colnames(tmp)
NULL
> rownames(tmp)
NULL
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> dimnames(tmp)
[[1]]
[1] "row1" "row2" "row3" "row4" "row5"

[[2]]
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"

> 
> dimnames(tmp) <- NULL
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> dimnames(tmp)
[[1]]
NULL

[[2]]
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"

> 
> 
> dimnames(tmp) <- NULL
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> dimnames(tmp)
[[1]]
[1] "row1" "row2" "row3" "row4" "row5"

[[2]]
NULL

> 
> dimnames(tmp) <- list(NULL,c(colnames(tmp,do.NULL=FALSE)))
> dimnames(tmp)
[[1]]
NULL

[[2]]
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"

> 
> 
> 
> ###
> ### Testing logical indexing
> ###
> ###
> 
> tmp <- createBufferedMatrix(230,15)
> tmp[1:230,1:15] <- rnorm(230*15)
> x <-tmp[1:230,1:15]  
> 
> for (rep in 1:10){
+   which.cols <- sample(c(TRUE,FALSE),15,replace=T)
+   which.rows <- sample(c(TRUE,FALSE),230,replace=T)
+   
+   if (!all(tmp[which.rows,which.cols] == x[which.rows,which.cols])){
+     stop("No agreement when logical indexing\n")
+   }
+   
+   if (!all(subBufferedMatrix(tmp,,which.cols)[,1:sum(which.cols)] ==  x[,which.cols])){
+     stop("No agreement when logical indexing in subBufferedMatrix cols\n")
+   }
+   if (!all(subBufferedMatrix(tmp,which.rows,)[1:sum(which.rows),] ==  x[which.rows,])){
+     stop("No agreement when logical indexing in subBufferedMatrix rows\n")
+   }
+   
+   
+   if (!all(subBufferedMatrix(tmp,which.rows,which.cols)[1:sum(which.rows),1:sum(which.cols)]==  x[which.rows,which.cols])){
+     stop("No agreement when logical indexing in subBufferedMatrix rows and columns\n")
+   }
+ }
> 
> 
> ##
> ## Test the ReadOnlyMode
> ##
> 
> ReadOnlyMode(tmp)
<pointer: 0x585ec4ba6350>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b359d3df6"
 [2] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b5b296d15"
 [3] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b7b78aac6"
 [4] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b614984a2"
 [5] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b43902957"
 [6] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b5a1471a5"
 [7] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b14406387"
 [8] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b2b4e7dee"
 [9] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b61835443"
[10] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b771834c9"
[11] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b2b24b50f"
[12] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b2f13d70d"
[13] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b4dd786af"
[14] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b18158288"
[15] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM27506b603f9968"
> 
> 
> ### testing coercion functions
> ###
> 
> tmp <- as(tmp,"matrix")
> tmp <- as(tmp,"BufferedMatrix")
> 
> 
> 
> ### testing whether can move storage from one location to another
> 
> MoveStorageDirectory(tmp,"NewDirectory",full.path=FALSE)
<pointer: 0x585ec72a3b50>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x585ec72a3b50>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x585ec72a3b50>
> rowMedians(tmp)
  [1] -0.194645468 -0.362856096 -0.036919825 -0.282957635 -0.419299305
  [6] -0.212238163  0.347679770  0.275293903  0.168372490  0.497361415
 [11]  0.306970820 -0.570837407  0.011239725 -0.253284764 -0.278499305
 [16]  0.484085120 -0.118661181  0.065138217  0.142456914 -0.786639012
 [21] -0.198493144 -0.009092361  0.016283824  0.151158918  0.298275066
 [26]  0.620503658 -0.160770827  0.247483144  0.506345432 -0.096627003
 [31] -0.515541077  0.425243307 -0.179005729  0.054251638  0.276469456
 [36] -0.063899119  0.162466528  0.210772410 -0.059795805  0.518539400
 [41]  0.280311516  0.469826747  0.222891931  0.708359534 -0.171003329
 [46]  0.499096687 -0.351661014 -0.012500811 -0.033556940  0.149679508
 [51]  0.111723195 -0.121537755  0.407203410  0.031021966 -0.048295768
 [56]  0.356372540  0.786041961 -0.473636910 -0.493319388 -0.244475626
 [61] -0.629112907  0.208154664  0.495325549 -0.297993503 -0.092594543
 [66] -0.336461627  0.319287810 -0.141284237  0.091689632  0.382923890
 [71]  0.339499564 -0.165296406 -0.366359027  0.021570294 -0.182913506
 [76]  0.309786741 -0.349628566 -0.577422838 -0.245544449  0.225896504
 [81]  0.072819272 -0.149097771  0.116894015  0.533409209 -0.108983033
 [86]  0.440473326  0.581313546 -0.034468680  0.198327974  0.617928279
 [91] -0.016065631  0.526314334  0.089571526  0.374547145 -0.317512930
 [96]  0.095024470  0.461575328  0.069744138 -0.412414994 -0.026019437
[101]  0.682985074 -0.118270251  0.267298573  0.002625044  0.351144533
[106]  0.002748168  0.129342916 -0.196919401 -0.051130021 -0.324010330
[111]  0.372478087 -0.578191490  0.044977967 -0.054201038 -0.098894029
[116]  0.106020530 -0.360232889  0.341899172  0.372585026  0.267578716
[121]  0.136900782  0.354549745 -0.202898102  0.003535662 -0.515683872
[126]  0.165587944  0.074488665 -0.139035277 -0.371707071  0.344889138
[131] -0.340732539  0.098128014  0.372503146  0.462470007 -0.044921329
[136] -0.394759796 -0.371954670  0.125467117 -0.290167564 -0.092733459
[141]  0.242634935 -0.040537071  0.464972028  0.206253360 -0.343877882
[146]  0.240643860  0.381878645 -0.725138681  0.072114669  0.053698118
[151] -0.079402877 -0.139769371 -0.048846070 -0.242528527  0.170793324
[156] -0.044169880 -0.333560296 -0.183691125  0.642364348 -0.360477594
[161]  0.442246213  0.032474957 -0.224276442 -0.261349051  0.202337254
[166]  0.232607726  0.178824156  0.247974074  0.130475724  0.158527177
[171] -0.114820970 -0.113120955  0.082638285  0.176891030 -0.444019344
[176]  0.492316889 -0.079091109 -0.177085887  0.025660955 -0.456080352
[181]  0.365960774 -0.355522284  0.560877691 -0.009686477 -0.008051081
[186]  0.166793047  0.762549249 -0.013951539 -0.024682452 -0.022336033
[191] -0.564662522 -0.156000364  0.149553988 -0.315942091 -0.548311384
[196] -0.061868328  0.406898873  0.079308805 -0.571732440 -0.117568536
[201] -0.111605598 -0.131816053  0.220991301 -0.236024119 -0.184483141
[206]  0.169007111 -0.046573793  0.099254546 -0.302284058 -0.059793577
[211]  0.440540124 -0.004378136 -0.158945959 -0.465135962 -0.475743774
[216]  0.225264171  0.073704178 -0.088435444 -0.074125450 -0.193732811
[221]  0.238592247 -0.442783786 -0.034860749 -0.104903517 -0.145839311
[226] -0.208383955 -0.301943707  0.117112879 -0.387964364 -0.246183669
> 
> proc.time()
   user  system elapsed 
  1.292   0.678   1.959 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R version 4.6.0 RC (2026-04-17 r89917) -- "Because it was There"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths());

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> prefix <- "dbmtest"
> directory <- getwd()
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_Test_C",P)
RBufferedMatrix
Checking dimensions
Rows: 5
Cols: 5
Buffer Rows: 1
Buffer Cols: 1

Assigning Values
0.000000 1.000000 2.000000 3.000000 4.000000 
1.000000 2.000000 3.000000 4.000000 5.000000 
2.000000 3.000000 4.000000 5.000000 6.000000 
3.000000 4.000000 5.000000 6.000000 7.000000 
4.000000 5.000000 6.000000 7.000000 8.000000 

<pointer: 0x5b4bb3889520>
> .Call("R_bm_Test_C2",P)
Checking dimensions
Rows: 5
Cols: 5
Buffer Rows: 1
Buffer Cols: 1

Printing Values
0.000000 1.000000 2.000000 3.000000 4.000000 
1.000000 2.000000 3.000000 4.000000 5.000000 
2.000000 3.000000 4.000000 5.000000 6.000000 
3.000000 4.000000 5.000000 6.000000 7.000000 
4.000000 5.000000 6.000000 7.000000 8.000000 

<pointer: 0x5b4bb3889520>
> .Call("R_bm_Test_C",P)
RBufferedMatrix
Checking dimensions
Rows: 5
Cols: 10
Buffer Rows: 1
Buffer Cols: 1

Assigning Values
0.000000 1.000000 2.000000 3.000000 4.000000 
1.000000 2.000000 3.000000 4.000000 5.000000 
2.000000 3.000000 4.000000 5.000000 6.000000 
3.000000 4.000000 5.000000 6.000000 7.000000 
4.000000 5.000000 6.000000 7.000000 8.000000 

<pointer: 0x5b4bb3889520>
> .Call("R_bm_Test_C2",P)
Checking dimensions
Rows: 5
Cols: 10
Buffer Rows: 1
Buffer Cols: 1

Printing Values
0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 0.000000 0.000000 0.000000 0.000000 
1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 0.000000 0.000000 0.000000 0.000000 
2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 0.000000 0.000000 0.000000 0.000000 
3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 0.000000 0.000000 0.000000 0.000000 
4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 0.000000 0.000000 0.000000 0.000000 

<pointer: 0x5b4bb3889520>
> rm(P)
> 
> #P <- .Call("R_bm_Destroy",P)
> #.Call("R_bm_Destroy",P)
> #.Call("R_bm_Test_C",P)
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,5)
[1] TRUE
> .Call("R_bm_Test_C2",P)
Checking dimensions
Rows: 5
Cols: 0
Buffer Rows: 1
Buffer Cols: 1

Printing Values






<pointer: 0x5b4bb3432f60>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5b4bb3432f60>
> .Call("R_bm_Test_C2",P)
Checking dimensions
Rows: 5
Cols: 1
Buffer Rows: 1
Buffer Cols: 1

Printing Values
0.000000 
0.000000 
0.000000 
0.000000 
0.000000 

<pointer: 0x5b4bb3432f60>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5b4bb3432f60>
> .Call("R_bm_Test_C2",P)
Checking dimensions
Rows: 5
Cols: 2
Buffer Rows: 1
Buffer Cols: 1

Printing Values
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 

<pointer: 0x5b4bb3432f60>
> rm(P)
> 
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,5)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x5b4bb3fdcb40>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5b4bb3fdcb40>
> .Call("R_bm_Test_C2",P)
Checking dimensions
Rows: 5
Cols: 2
Buffer Rows: 1
Buffer Cols: 1

Printing Values
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 

<pointer: 0x5b4bb3fdcb40>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x5b4bb3fdcb40>
> .Call("R_bm_Test_C2",P)
Checking dimensions
Rows: 5
Cols: 2
Buffer Rows: 5
Buffer Cols: 5

Printing Values
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 

<pointer: 0x5b4bb3fdcb40>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x5b4bb3fdcb40>
> .Call("R_bm_Test_C2",P)
Checking dimensions
Rows: 5
Cols: 2
Buffer Rows: 5
Buffer Cols: 5

Printing Values
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 

<pointer: 0x5b4bb3fdcb40>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x5b4bb3fdcb40>
> .Call("R_bm_Test_C2",P)
Checking dimensions
Rows: 5
Cols: 2
Buffer Rows: 5
Buffer Cols: 5

Printing Values
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 

<pointer: 0x5b4bb3fdcb40>
> rm(P)
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x5b4bb4019bc0>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x5b4bb4019bc0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5b4bb4019bc0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5b4bb4019bc0>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile2751be3c3957d6" "BufferedMatrixFile2751be76292bb9"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile2751be3c3957d6" "BufferedMatrixFile2751be76292bb9"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x5b4bb3fb3000>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5b4bb3fb3000>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x5b4bb3fb3000>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x5b4bb3fb3000>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x5b4bb3fb3000>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x5b4bb3fb3000>
> .Call("R_bm_isRowMode",P)
[1] FALSE
> rm(P)
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x5b4bb30e6e30>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5b4bb30e6e30>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x5b4bb30e6e30>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x5b4bb30e6e30>
> rm(P)
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_Test_C",P)
RBufferedMatrix
Checking dimensions
Rows: 5
Cols: 5
Buffer Rows: 1
Buffer Cols: 1

Assigning Values
0.000000 1.000000 2.000000 3.000000 4.000000 
1.000000 2.000000 3.000000 4.000000 5.000000 
2.000000 3.000000 4.000000 5.000000 6.000000 
3.000000 4.000000 5.000000 6.000000 7.000000 
4.000000 5.000000 6.000000 7.000000 8.000000 

<pointer: 0x5b4bb3710a50>
> .Call("R_bm_getValue",P,3,3)
[1] 6
> 
> .Call("R_bm_getValue",P,100000,10000)
[1] NA
> .Call("R_bm_setValue",P,3,3,12345.0)
[1] TRUE
> .Call("R_bm_Test_C2",P)
Checking dimensions
Rows: 5
Cols: 5
Buffer Rows: 1
Buffer Cols: 1

Printing Values
0.000000 1.000000 2.000000 3.000000 4.000000 
1.000000 2.000000 3.000000 4.000000 5.000000 
2.000000 3.000000 4.000000 5.000000 6.000000 
3.000000 4.000000 5.000000 12345.000000 7.000000 
4.000000 5.000000 6.000000 7.000000 8.000000 

<pointer: 0x5b4bb3710a50>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.263   0.050   0.294 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R version 4.6.0 RC (2026-04-17 r89917) -- "Because it was There"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths());

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> Temp <- createBufferedMatrix(100)
> dim(Temp)
[1] 100   0
> buffer.dim(Temp)
[1] 1 1
> 
> 
> proc.time()
   user  system elapsed 
  0.256   0.043   0.287 

Example timings