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

This page was generated on 2026-01-05 11:58 -0500 (Mon, 05 Jan 2026).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 24.04.3 LTS)x86_644.5.2 (2025-10-31) -- "[Not] Part in a Rumble" 4883
taishanLinux (openEuler 24.03 LTS)aarch644.5.0 (2025-04-11) -- "How About a Twenty-Six" 4671
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 257/2361HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.74.0  (landing page)
Ben Bolstad
Snapshot Date: 2026-01-01 13:45 -0500 (Thu, 01 Jan 2026)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: RELEASE_3_22
git_last_commit: d2ce144
git_last_commit_date: 2025-10-29 09:58:55 -0500 (Wed, 29 Oct 2025)
nebbiolo2Linux (Ubuntu 24.04.3 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
taishanLinux (openEuler 24.03 LTS) / aarch64  OK    OK    OK  


CHECK results for BufferedMatrix on taishan

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.
- See Martin Grigorov's blog post for how to debug Linux ARM64 related issues on a x86_64 host.

raw results


Summary

Package: BufferedMatrix
Version: 1.74.0
Command: /home/biocbuild/R/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R/site-library --no-vignettes --timings BufferedMatrix_1.74.0.tar.gz
StartedAt: 2026-01-02 09:27:48 -0000 (Fri, 02 Jan 2026)
EndedAt: 2026-01-02 09:28:49 -0000 (Fri, 02 Jan 2026)
EllapsedTime: 60.4 seconds
RetCode: 0
Status:   OK  
CheckDir: BufferedMatrix.Rcheck
Warnings: 0

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/R/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R/site-library --no-vignettes --timings BufferedMatrix_1.74.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck’
* using R version 4.5.0 (2025-04-11)
* using platform: aarch64-unknown-linux-gnu
* R was compiled by
    aarch64-unknown-linux-gnu-gcc (GCC) 14.2.0
    GNU Fortran (GCC) 14.2.0
* running under: openEuler 24.03 (LTS)
* using session charset: UTF-8
* using option ‘--no-vignettes’
* checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK
* this is package ‘BufferedMatrix’ version ‘1.74.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: ‘aarch64-unknown-linux-gnu-gcc (GCC) 14.2.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 ... NOTE
Note: information on .o files is not available
* 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 running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE

Status: 2 NOTEs
See
  ‘/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/00check.log’
for details.


Installation output

BufferedMatrix.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/R/R/bin/R CMD INSTALL BufferedMatrix
###
##############################################################################
##############################################################################


* installing to library ‘/home/biocbuild/R/R-4.5.0/site-library’
* installing *source* package ‘BufferedMatrix’ ...
** this is package ‘BufferedMatrix’ version ‘1.74.0’
** using staged installation
** libs
using C compiler: ‘aarch64-unknown-linux-gnu-gcc (GCC) 14.2.0’
/opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -I"/home/biocbuild/R/R-4.5.0/include" -DNDEBUG   -I/usr/local/include    -fPIC  -g -O2  -Wall -Werror=format-security -c RBufferedMatrix.c -o RBufferedMatrix.o
/opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -I"/home/biocbuild/R/R-4.5.0/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){
      |            ^~~~~~~~~~~
/opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -I"/home/biocbuild/R/R-4.5.0/include" -DNDEBUG   -I/usr/local/include    -fPIC  -g -O2  -Wall -Werror=format-security -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o
/opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -I"/home/biocbuild/R/R-4.5.0/include" -DNDEBUG   -I/usr/local/include    -fPIC  -g -O2  -Wall -Werror=format-security -c init_package.c -o init_package.o
/opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -shared -L/home/biocbuild/R/R-4.5.0/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/R/R-4.5.0/lib -lR
installing to /home/biocbuild/R/R-4.5.0/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.5.0 (2025-04-11) -- "How About a Twenty-Six"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-unknown-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.345   0.033   0.365 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-unknown-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.22-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 478398 25.6    1047041   56   639620 34.2
Vcells 885166  6.8    8388608   64  2080985 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] "Fri Jan  2 09:28:42 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] "Fri Jan  2 09:28:42 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: 0x164fbff0>
> 
> 
> 
> 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] "Fri Jan  2 09:28:43 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] "Fri Jan  2 09:28:43 2026"
> 
> ColMode(tmp2)
<pointer: 0x164fbff0>
> 
> 
> 
> ### 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,] 100.7996404 -2.003271  1.1585412 -0.4162937
[2,]   0.7583899 -0.159488 -1.7717943 -1.2292202
[3,]   0.4848232  0.931601  0.1523631  1.0896973
[4,]  -0.8665627  1.660383  2.0541583  0.6638711
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-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,] 100.7996404 2.003271 1.1585412 0.4162937
[2,]   0.7583899 0.159488 1.7717943 1.2292202
[3,]   0.4848232 0.931601 0.1523631 1.0896973
[4,]   0.8665627 1.660383 2.0541583 0.6638711
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-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,] 10.0399024 1.4153696 1.0763555 0.6452082
[2,]  0.8708559 0.3993595 1.3310876 1.1087020
[3,]  0.6962925 0.9651948 0.3903371 1.0438857
[4,]  0.9308935 1.2885585 1.4332335 0.8147829
> 
> 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.22-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,] 226.19866 41.15697 36.92210 31.86838
[2,]  34.46695 29.15308 40.08267 37.31624
[3,]  32.44775 35.58355 29.05573 36.52855
[4,]  35.17550 39.54597 41.38649 33.81170
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x151de6c0>
> exp(tmp5)
<pointer: 0x151de6c0>
> log(tmp5,2)
<pointer: 0x151de6c0>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 470.8029
> Min(tmp5)
[1] 54.44836
> mean(tmp5)
[1] 73.73161
> Sum(tmp5)
[1] 14746.32
> Var(tmp5)
[1] 865.3606
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 91.50524 72.33118 71.90458 73.22752 70.06813 71.23188 74.36960 71.92451
 [9] 70.32131 70.43218
> rowSums(tmp5)
 [1] 1830.105 1446.624 1438.092 1464.550 1401.363 1424.638 1487.392 1438.490
 [9] 1406.426 1408.644
> rowVars(tmp5)
 [1] 8013.80571   51.71513   89.82853   62.12356   67.90027   70.52510
 [7]   67.67233   89.95038  105.72122   57.62522
> rowSd(tmp5)
 [1] 89.519862  7.191323  9.477792  7.881850  8.240162  8.397923  8.226319
 [8]  9.484218 10.282082  7.591128
> rowMax(tmp5)
 [1] 470.80288  83.90150  90.37187  86.14056  88.18244  86.80065  92.26113
 [8]  87.17713  87.56782  80.49067
> rowMin(tmp5)
 [1] 59.34874 54.82474 55.92743 62.51422 59.64107 54.44836 58.79641 54.90485
 [9] 57.24252 57.17090
> 
> colMeans(tmp5)
 [1] 109.59812  74.60202  70.24780  74.00105  70.42696  73.06198  71.72616
 [8]  67.04054  72.02563  73.93146  73.79780  70.95510  75.09803  73.59527
[15]  73.97577  75.09397  66.57626  74.82433  66.79269  67.26125
> colSums(tmp5)
 [1] 1095.9812  746.0202  702.4780  740.0105  704.2696  730.6198  717.2616
 [8]  670.4054  720.2563  739.3146  737.9780  709.5510  750.9803  735.9527
[15]  739.7577  750.9397  665.7626  748.2433  667.9269  672.6125
> colVars(tmp5)
 [1] 16123.92454   102.53148   109.42499    72.27492   119.97406    29.31511
 [7]    29.09139    51.54269   138.77694    15.27632    85.61784    53.11317
[13]    86.52665    79.00507    60.82676    34.46431    56.69967    68.91307
[19]    55.77412    76.11429
> colSd(tmp5)
 [1] 126.980016  10.125783  10.460640   8.501466  10.953267   5.414343
 [7]   5.393644   7.179324  11.780363   3.908493   9.252991   7.287878
[13]   9.301970   8.888479   7.799151   5.870631   7.529918   8.301389
[19]   7.468207   8.724350
> colMax(tmp5)
 [1] 470.80288  88.18244  86.14056  83.90444  87.32402  81.64410  79.24926
 [8]  78.19785  92.26113  80.40037  87.17713  80.49067  90.37187  84.47295
[15]  83.75041  85.61931  81.95512  87.56782  77.73837  85.51143
> colMin(tmp5)
 [1] 60.78545 57.24252 58.71257 58.39268 54.44836 62.13997 61.68769 54.90485
 [9] 56.39541 67.29469 63.39156 60.19637 63.59994 60.40595 58.56829 67.32467
[17] 54.82474 61.55395 55.92743 58.79641
> 
> 
> ### 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] 91.50524       NA 71.90458 73.22752 70.06813 71.23188 74.36960 71.92451
 [9] 70.32131 70.43218
> rowSums(tmp5)
 [1] 1830.105       NA 1438.092 1464.550 1401.363 1424.638 1487.392 1438.490
 [9] 1406.426 1408.644
> rowVars(tmp5)
 [1] 8013.80571   51.98335   89.82853   62.12356   67.90027   70.52510
 [7]   67.67233   89.95038  105.72122   57.62522
> rowSd(tmp5)
 [1] 89.519862  7.209948  9.477792  7.881850  8.240162  8.397923  8.226319
 [8]  9.484218 10.282082  7.591128
> rowMax(tmp5)
 [1] 470.80288        NA  90.37187  86.14056  88.18244  86.80065  92.26113
 [8]  87.17713  87.56782  80.49067
> rowMin(tmp5)
 [1] 59.34874       NA 55.92743 62.51422 59.64107 54.44836 58.79641 54.90485
 [9] 57.24252 57.17090
> 
> colMeans(tmp5)
 [1] 109.59812  74.60202  70.24780  74.00105  70.42696  73.06198  71.72616
 [8]  67.04054  72.02563  73.93146  73.79780  70.95510        NA  73.59527
[15]  73.97577  75.09397  66.57626  74.82433  66.79269  67.26125
> colSums(tmp5)
 [1] 1095.9812  746.0202  702.4780  740.0105  704.2696  730.6198  717.2616
 [8]  670.4054  720.2563  739.3146  737.9780  709.5510        NA  735.9527
[15]  739.7577  750.9397  665.7626  748.2433  667.9269  672.6125
> colVars(tmp5)
 [1] 16123.92454   102.53148   109.42499    72.27492   119.97406    29.31511
 [7]    29.09139    51.54269   138.77694    15.27632    85.61784    53.11317
[13]          NA    79.00507    60.82676    34.46431    56.69967    68.91307
[19]    55.77412    76.11429
> colSd(tmp5)
 [1] 126.980016  10.125783  10.460640   8.501466  10.953267   5.414343
 [7]   5.393644   7.179324  11.780363   3.908493   9.252991   7.287878
[13]         NA   8.888479   7.799151   5.870631   7.529918   8.301389
[19]   7.468207   8.724350
> colMax(tmp5)
 [1] 470.80288  88.18244  86.14056  83.90444  87.32402  81.64410  79.24926
 [8]  78.19785  92.26113  80.40037  87.17713  80.49067        NA  84.47295
[15]  83.75041  85.61931  81.95512  87.56782  77.73837  85.51143
> colMin(tmp5)
 [1] 60.78545 57.24252 58.71257 58.39268 54.44836 62.13997 61.68769 54.90485
 [9] 56.39541 67.29469 63.39156 60.19637       NA 60.40595 58.56829 67.32467
[17] 54.82474 61.55395 55.92743 58.79641
> 
> Max(tmp5,na.rm=TRUE)
[1] 470.8029
> Min(tmp5,na.rm=TRUE)
[1] 54.44836
> mean(tmp5,na.rm=TRUE)
[1] 73.70511
> Sum(tmp5,na.rm=TRUE)
[1] 14667.32
> Var(tmp5,na.rm=TRUE)
[1] 869.5899
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 91.50524 71.97991 71.90458 73.22752 70.06813 71.23188 74.36960 71.92451
 [9] 70.32131 70.43218
> rowSums(tmp5,na.rm=TRUE)
 [1] 1830.105 1367.618 1438.092 1464.550 1401.363 1424.638 1487.392 1438.490
 [9] 1406.426 1408.644
> rowVars(tmp5,na.rm=TRUE)
 [1] 8013.80571   51.98335   89.82853   62.12356   67.90027   70.52510
 [7]   67.67233   89.95038  105.72122   57.62522
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.519862  7.209948  9.477792  7.881850  8.240162  8.397923  8.226319
 [8]  9.484218 10.282082  7.591128
> rowMax(tmp5,na.rm=TRUE)
 [1] 470.80288  83.90150  90.37187  86.14056  88.18244  86.80065  92.26113
 [8]  87.17713  87.56782  80.49067
> rowMin(tmp5,na.rm=TRUE)
 [1] 59.34874 54.82474 55.92743 62.51422 59.64107 54.44836 58.79641 54.90485
 [9] 57.24252 57.17090
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 109.59812  74.60202  70.24780  74.00105  70.42696  73.06198  71.72616
 [8]  67.04054  72.02563  73.93146  73.79780  70.95510  74.66390  73.59527
[15]  73.97577  75.09397  66.57626  74.82433  66.79269  67.26125
> colSums(tmp5,na.rm=TRUE)
 [1] 1095.9812  746.0202  702.4780  740.0105  704.2696  730.6198  717.2616
 [8]  670.4054  720.2563  739.3146  737.9780  709.5510  671.9751  735.9527
[15]  739.7577  750.9397  665.7626  748.2433  667.9269  672.6125
> colVars(tmp5,na.rm=TRUE)
 [1] 16123.92454   102.53148   109.42499    72.27492   119.97406    29.31511
 [7]    29.09139    51.54269   138.77694    15.27632    85.61784    53.11317
[13]    95.22218    79.00507    60.82676    34.46431    56.69967    68.91307
[19]    55.77412    76.11429
> colSd(tmp5,na.rm=TRUE)
 [1] 126.980016  10.125783  10.460640   8.501466  10.953267   5.414343
 [7]   5.393644   7.179324  11.780363   3.908493   9.252991   7.287878
[13]   9.758185   8.888479   7.799151   5.870631   7.529918   8.301389
[19]   7.468207   8.724350
> colMax(tmp5,na.rm=TRUE)
 [1] 470.80288  88.18244  86.14056  83.90444  87.32402  81.64410  79.24926
 [8]  78.19785  92.26113  80.40037  87.17713  80.49067  90.37187  84.47295
[15]  83.75041  85.61931  81.95512  87.56782  77.73837  85.51143
> colMin(tmp5,na.rm=TRUE)
 [1] 60.78545 57.24252 58.71257 58.39268 54.44836 62.13997 61.68769 54.90485
 [9] 56.39541 67.29469 63.39156 60.19637 63.59994 60.40595 58.56829 67.32467
[17] 54.82474 61.55395 55.92743 58.79641
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 91.50524      NaN 71.90458 73.22752 70.06813 71.23188 74.36960 71.92451
 [9] 70.32131 70.43218
> rowSums(tmp5,na.rm=TRUE)
 [1] 1830.105    0.000 1438.092 1464.550 1401.363 1424.638 1487.392 1438.490
 [9] 1406.426 1408.644
> rowVars(tmp5,na.rm=TRUE)
 [1] 8013.80571         NA   89.82853   62.12356   67.90027   70.52510
 [7]   67.67233   89.95038  105.72122   57.62522
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.519862        NA  9.477792  7.881850  8.240162  8.397923  8.226319
 [8]  9.484218 10.282082  7.591128
> rowMax(tmp5,na.rm=TRUE)
 [1] 470.80288        NA  90.37187  86.14056  88.18244  86.80065  92.26113
 [8]  87.17713  87.56782  80.49067
> rowMin(tmp5,na.rm=TRUE)
 [1] 59.34874       NA 55.92743 62.51422 59.64107 54.44836 58.79641 54.90485
 [9] 57.24252 57.17090
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 113.80475  76.14910  68.78347  73.59352  69.70868  73.07612  72.36740
 [8]  65.89394  72.40622  74.21589  73.13505  71.05733       NaN  73.81843
[15]  73.87583  75.82658  67.88198  73.81576  66.53924  67.13107
> colSums(tmp5,na.rm=TRUE)
 [1] 1024.2428  685.3419  619.0512  662.3417  627.3781  657.6851  651.3066
 [8]  593.0455  651.6560  667.9430  658.2155  639.5160    0.0000  664.3659
[15]  664.8824  682.4392  610.9378  664.3418  598.8532  604.1797
> colVars(tmp5,na.rm=TRUE)
 [1] 17940.33793    88.42163    98.97996    79.44083   129.16658    32.97725
 [7]    28.10181    43.19520   154.49450    16.27570    91.37870    59.63475
[13]          NA    88.32044    68.31772    32.73431    44.60684    66.08346
[19]    62.02323    85.43794
> colSd(tmp5,na.rm=TRUE)
 [1] 133.941547   9.403278   9.948867   8.912959  11.365147   5.742582
 [7]   5.301114   6.572306  12.429582   4.034316   9.559221   7.722354
[13]         NA   9.397895   8.265453   5.721390   6.678835   8.129174
[19]   7.875483   9.243264
> colMax(tmp5,na.rm=TRUE)
 [1] 470.80288  88.18244  86.14056  83.90444  87.32402  81.64410  79.24926
 [8]  78.19785  92.26113  80.40037  87.17713  80.49067      -Inf  84.47295
[15]  83.75041  85.61931  81.95512  87.56782  77.73837  85.51143
> colMin(tmp5,na.rm=TRUE)
 [1] 60.78545 57.24252 58.71257 58.39268 54.44836 62.13997 61.68769 54.90485
 [9] 56.39541 67.29469 63.39156 60.19637      Inf 60.40595 58.56829 67.32467
[17] 58.16564 61.55395 55.92743 58.79641
> 
> 
> 
> 
> 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] 150.7370 136.8821 225.6740 228.5131 211.9329 196.0048 257.7979 364.1042
 [9] 235.9471 170.7956
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 150.7370 136.8821 225.6740 228.5131 211.9329 196.0048 257.7979 364.1042
 [9] 235.9471 170.7956
> 
> 
> 
> 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]  5.684342e-14  2.842171e-14  8.526513e-14  2.273737e-13  8.526513e-14
 [6]  1.705303e-13 -2.273737e-13  8.526513e-14 -2.842171e-14  2.842171e-14
[11] -1.421085e-14  1.705303e-13  0.000000e+00  5.684342e-14  2.842171e-14
[16] -1.989520e-13  1.705303e-13 -1.989520e-13 -5.684342e-14  2.842171e-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   12 
10   20 
10   18 
2   6 
8   20 
7   9 
1   13 
1   2 
5   15 
9   3 
4   1 
1   9 
6   13 
7   5 
5   15 
9   11 
5   17 
2   12 
9   17 
3   18 
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.113569
> Min(tmp)
[1] -3.181703
> mean(tmp)
[1] -0.1537554
> Sum(tmp)
[1] -15.37554
> Var(tmp)
[1] 1.230122
> 
> rowMeans(tmp)
[1] -0.1537554
> rowSums(tmp)
[1] -15.37554
> rowVars(tmp)
[1] 1.230122
> rowSd(tmp)
[1] 1.109109
> rowMax(tmp)
[1] 2.113569
> rowMin(tmp)
[1] -3.181703
> 
> colMeans(tmp)
  [1]  2.01076743 -0.99037550 -0.74087193  0.69863652 -0.45365614  0.96367431
  [7] -1.19402616 -0.01758947 -1.96123669  2.02373952  1.07077946  0.42189908
 [13] -0.04788156 -0.06973509  0.72863937 -1.65819068 -0.55250731  0.92479713
 [19]  0.86159150 -0.27349257  1.01701644 -1.37331530 -0.55295661 -1.35836485
 [25]  1.10691872 -1.37850860  1.66156430 -1.11984106 -0.01509391 -0.70156935
 [31] -1.65297396 -0.48172839  0.55955202  0.40111772 -0.28210183 -1.64972330
 [37]  1.06624133 -2.82671245  1.97821321 -0.37252926 -1.31676502 -0.37324980
 [43] -1.33827309  1.06138115  1.58831322  1.36112012 -0.10063037 -0.40145897
 [49] -0.94125397  2.09199133  1.07174070 -0.44842186 -0.83120775 -1.10133815
 [55] -0.47930625 -1.33190365 -0.25012542 -1.20394388 -0.40667736 -0.12788444
 [61]  0.66581373 -0.55065985 -1.14523834 -0.90837908 -1.13022867  0.30854182
 [67] -0.03197912 -0.18033173 -0.94819641 -3.18170325 -0.19352877  0.14238481
 [73]  0.15630432  0.79534020 -1.49630502  2.11356860 -0.83156701  1.63398479
 [79] -0.50466255  0.42237010 -1.01807196 -1.36314747  0.44657450 -1.40101004
 [85]  1.16458122 -0.68786524 -1.58455041  1.76770343  0.10355480 -0.96844654
 [91]  0.80697554 -1.06357204  1.22920456 -1.14263757 -0.41101769  0.73134844
 [97]  0.91781113  0.32300558 -0.98203275  0.32825544
> colSums(tmp)
  [1]  2.01076743 -0.99037550 -0.74087193  0.69863652 -0.45365614  0.96367431
  [7] -1.19402616 -0.01758947 -1.96123669  2.02373952  1.07077946  0.42189908
 [13] -0.04788156 -0.06973509  0.72863937 -1.65819068 -0.55250731  0.92479713
 [19]  0.86159150 -0.27349257  1.01701644 -1.37331530 -0.55295661 -1.35836485
 [25]  1.10691872 -1.37850860  1.66156430 -1.11984106 -0.01509391 -0.70156935
 [31] -1.65297396 -0.48172839  0.55955202  0.40111772 -0.28210183 -1.64972330
 [37]  1.06624133 -2.82671245  1.97821321 -0.37252926 -1.31676502 -0.37324980
 [43] -1.33827309  1.06138115  1.58831322  1.36112012 -0.10063037 -0.40145897
 [49] -0.94125397  2.09199133  1.07174070 -0.44842186 -0.83120775 -1.10133815
 [55] -0.47930625 -1.33190365 -0.25012542 -1.20394388 -0.40667736 -0.12788444
 [61]  0.66581373 -0.55065985 -1.14523834 -0.90837908 -1.13022867  0.30854182
 [67] -0.03197912 -0.18033173 -0.94819641 -3.18170325 -0.19352877  0.14238481
 [73]  0.15630432  0.79534020 -1.49630502  2.11356860 -0.83156701  1.63398479
 [79] -0.50466255  0.42237010 -1.01807196 -1.36314747  0.44657450 -1.40101004
 [85]  1.16458122 -0.68786524 -1.58455041  1.76770343  0.10355480 -0.96844654
 [91]  0.80697554 -1.06357204  1.22920456 -1.14263757 -0.41101769  0.73134844
 [97]  0.91781113  0.32300558 -0.98203275  0.32825544
> 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]  2.01076743 -0.99037550 -0.74087193  0.69863652 -0.45365614  0.96367431
  [7] -1.19402616 -0.01758947 -1.96123669  2.02373952  1.07077946  0.42189908
 [13] -0.04788156 -0.06973509  0.72863937 -1.65819068 -0.55250731  0.92479713
 [19]  0.86159150 -0.27349257  1.01701644 -1.37331530 -0.55295661 -1.35836485
 [25]  1.10691872 -1.37850860  1.66156430 -1.11984106 -0.01509391 -0.70156935
 [31] -1.65297396 -0.48172839  0.55955202  0.40111772 -0.28210183 -1.64972330
 [37]  1.06624133 -2.82671245  1.97821321 -0.37252926 -1.31676502 -0.37324980
 [43] -1.33827309  1.06138115  1.58831322  1.36112012 -0.10063037 -0.40145897
 [49] -0.94125397  2.09199133  1.07174070 -0.44842186 -0.83120775 -1.10133815
 [55] -0.47930625 -1.33190365 -0.25012542 -1.20394388 -0.40667736 -0.12788444
 [61]  0.66581373 -0.55065985 -1.14523834 -0.90837908 -1.13022867  0.30854182
 [67] -0.03197912 -0.18033173 -0.94819641 -3.18170325 -0.19352877  0.14238481
 [73]  0.15630432  0.79534020 -1.49630502  2.11356860 -0.83156701  1.63398479
 [79] -0.50466255  0.42237010 -1.01807196 -1.36314747  0.44657450 -1.40101004
 [85]  1.16458122 -0.68786524 -1.58455041  1.76770343  0.10355480 -0.96844654
 [91]  0.80697554 -1.06357204  1.22920456 -1.14263757 -0.41101769  0.73134844
 [97]  0.91781113  0.32300558 -0.98203275  0.32825544
> colMin(tmp)
  [1]  2.01076743 -0.99037550 -0.74087193  0.69863652 -0.45365614  0.96367431
  [7] -1.19402616 -0.01758947 -1.96123669  2.02373952  1.07077946  0.42189908
 [13] -0.04788156 -0.06973509  0.72863937 -1.65819068 -0.55250731  0.92479713
 [19]  0.86159150 -0.27349257  1.01701644 -1.37331530 -0.55295661 -1.35836485
 [25]  1.10691872 -1.37850860  1.66156430 -1.11984106 -0.01509391 -0.70156935
 [31] -1.65297396 -0.48172839  0.55955202  0.40111772 -0.28210183 -1.64972330
 [37]  1.06624133 -2.82671245  1.97821321 -0.37252926 -1.31676502 -0.37324980
 [43] -1.33827309  1.06138115  1.58831322  1.36112012 -0.10063037 -0.40145897
 [49] -0.94125397  2.09199133  1.07174070 -0.44842186 -0.83120775 -1.10133815
 [55] -0.47930625 -1.33190365 -0.25012542 -1.20394388 -0.40667736 -0.12788444
 [61]  0.66581373 -0.55065985 -1.14523834 -0.90837908 -1.13022867  0.30854182
 [67] -0.03197912 -0.18033173 -0.94819641 -3.18170325 -0.19352877  0.14238481
 [73]  0.15630432  0.79534020 -1.49630502  2.11356860 -0.83156701  1.63398479
 [79] -0.50466255  0.42237010 -1.01807196 -1.36314747  0.44657450 -1.40101004
 [85]  1.16458122 -0.68786524 -1.58455041  1.76770343  0.10355480 -0.96844654
 [91]  0.80697554 -1.06357204  1.22920456 -1.14263757 -0.41101769  0.73134844
 [97]  0.91781113  0.32300558 -0.98203275  0.32825544
> colMedians(tmp)
  [1]  2.01076743 -0.99037550 -0.74087193  0.69863652 -0.45365614  0.96367431
  [7] -1.19402616 -0.01758947 -1.96123669  2.02373952  1.07077946  0.42189908
 [13] -0.04788156 -0.06973509  0.72863937 -1.65819068 -0.55250731  0.92479713
 [19]  0.86159150 -0.27349257  1.01701644 -1.37331530 -0.55295661 -1.35836485
 [25]  1.10691872 -1.37850860  1.66156430 -1.11984106 -0.01509391 -0.70156935
 [31] -1.65297396 -0.48172839  0.55955202  0.40111772 -0.28210183 -1.64972330
 [37]  1.06624133 -2.82671245  1.97821321 -0.37252926 -1.31676502 -0.37324980
 [43] -1.33827309  1.06138115  1.58831322  1.36112012 -0.10063037 -0.40145897
 [49] -0.94125397  2.09199133  1.07174070 -0.44842186 -0.83120775 -1.10133815
 [55] -0.47930625 -1.33190365 -0.25012542 -1.20394388 -0.40667736 -0.12788444
 [61]  0.66581373 -0.55065985 -1.14523834 -0.90837908 -1.13022867  0.30854182
 [67] -0.03197912 -0.18033173 -0.94819641 -3.18170325 -0.19352877  0.14238481
 [73]  0.15630432  0.79534020 -1.49630502  2.11356860 -0.83156701  1.63398479
 [79] -0.50466255  0.42237010 -1.01807196 -1.36314747  0.44657450 -1.40101004
 [85]  1.16458122 -0.68786524 -1.58455041  1.76770343  0.10355480 -0.96844654
 [91]  0.80697554 -1.06357204  1.22920456 -1.14263757 -0.41101769  0.73134844
 [97]  0.91781113  0.32300558 -0.98203275  0.32825544
> colRanges(tmp)
         [,1]       [,2]       [,3]      [,4]       [,5]      [,6]      [,7]
[1,] 2.010767 -0.9903755 -0.7408719 0.6986365 -0.4536561 0.9636743 -1.194026
[2,] 2.010767 -0.9903755 -0.7408719 0.6986365 -0.4536561 0.9636743 -1.194026
            [,8]      [,9]   [,10]    [,11]     [,12]       [,13]       [,14]
[1,] -0.01758947 -1.961237 2.02374 1.070779 0.4218991 -0.04788156 -0.06973509
[2,] -0.01758947 -1.961237 2.02374 1.070779 0.4218991 -0.04788156 -0.06973509
         [,15]     [,16]      [,17]     [,18]     [,19]      [,20]    [,21]
[1,] 0.7286394 -1.658191 -0.5525073 0.9247971 0.8615915 -0.2734926 1.017016
[2,] 0.7286394 -1.658191 -0.5525073 0.9247971 0.8615915 -0.2734926 1.017016
         [,22]      [,23]     [,24]    [,25]     [,26]    [,27]     [,28]
[1,] -1.373315 -0.5529566 -1.358365 1.106919 -1.378509 1.661564 -1.119841
[2,] -1.373315 -0.5529566 -1.358365 1.106919 -1.378509 1.661564 -1.119841
           [,29]      [,30]     [,31]      [,32]    [,33]     [,34]      [,35]
[1,] -0.01509391 -0.7015693 -1.652974 -0.4817284 0.559552 0.4011177 -0.2821018
[2,] -0.01509391 -0.7015693 -1.652974 -0.4817284 0.559552 0.4011177 -0.2821018
         [,36]    [,37]     [,38]    [,39]      [,40]     [,41]      [,42]
[1,] -1.649723 1.066241 -2.826712 1.978213 -0.3725293 -1.316765 -0.3732498
[2,] -1.649723 1.066241 -2.826712 1.978213 -0.3725293 -1.316765 -0.3732498
         [,43]    [,44]    [,45]   [,46]      [,47]     [,48]     [,49]
[1,] -1.338273 1.061381 1.588313 1.36112 -0.1006304 -0.401459 -0.941254
[2,] -1.338273 1.061381 1.588313 1.36112 -0.1006304 -0.401459 -0.941254
        [,50]    [,51]      [,52]      [,53]     [,54]      [,55]     [,56]
[1,] 2.091991 1.071741 -0.4484219 -0.8312078 -1.101338 -0.4793063 -1.331904
[2,] 2.091991 1.071741 -0.4484219 -0.8312078 -1.101338 -0.4793063 -1.331904
          [,57]     [,58]      [,59]      [,60]     [,61]      [,62]     [,63]
[1,] -0.2501254 -1.203944 -0.4066774 -0.1278844 0.6658137 -0.5506599 -1.145238
[2,] -0.2501254 -1.203944 -0.4066774 -0.1278844 0.6658137 -0.5506599 -1.145238
          [,64]     [,65]     [,66]       [,67]      [,68]      [,69]     [,70]
[1,] -0.9083791 -1.130229 0.3085418 -0.03197912 -0.1803317 -0.9481964 -3.181703
[2,] -0.9083791 -1.130229 0.3085418 -0.03197912 -0.1803317 -0.9481964 -3.181703
          [,71]     [,72]     [,73]     [,74]     [,75]    [,76]     [,77]
[1,] -0.1935288 0.1423848 0.1563043 0.7953402 -1.496305 2.113569 -0.831567
[2,] -0.1935288 0.1423848 0.1563043 0.7953402 -1.496305 2.113569 -0.831567
        [,78]      [,79]     [,80]     [,81]     [,82]     [,83]    [,84]
[1,] 1.633985 -0.5046626 0.4223701 -1.018072 -1.363147 0.4465745 -1.40101
[2,] 1.633985 -0.5046626 0.4223701 -1.018072 -1.363147 0.4465745 -1.40101
        [,85]      [,86]    [,87]    [,88]     [,89]      [,90]     [,91]
[1,] 1.164581 -0.6878652 -1.58455 1.767703 0.1035548 -0.9684465 0.8069755
[2,] 1.164581 -0.6878652 -1.58455 1.767703 0.1035548 -0.9684465 0.8069755
         [,92]    [,93]     [,94]      [,95]     [,96]     [,97]     [,98]
[1,] -1.063572 1.229205 -1.142638 -0.4110177 0.7313484 0.9178111 0.3230056
[2,] -1.063572 1.229205 -1.142638 -0.4110177 0.7313484 0.9178111 0.3230056
          [,99]    [,100]
[1,] -0.9820327 0.3282554
[2,] -0.9820327 0.3282554
> 
> 
> Max(tmp2)
[1] 2.137543
> Min(tmp2)
[1] -3.009053
> mean(tmp2)
[1] -0.06226064
> Sum(tmp2)
[1] -6.226064
> Var(tmp2)
[1] 1.016896
> 
> rowMeans(tmp2)
  [1]  0.32117884 -1.32974904  0.79312386 -0.96782936 -1.93655388 -0.58701279
  [7]  0.46414868 -0.02830389  1.09887573  1.03557828  0.92579796 -0.36097434
 [13] -0.18847454 -0.47516768  1.36840545  1.37806283 -0.31991131 -0.74405932
 [19]  0.98563838  0.73197679  0.49996982 -1.75938644 -0.57902437 -0.21805873
 [25] -0.24601350 -0.06660752 -1.08420896  1.06962659 -0.92820286  0.62784436
 [31]  0.63840500  2.13754302  0.51554222 -0.79928276 -0.17603022 -0.25401437
 [37] -1.48085458 -0.74372810  0.63526198 -0.33354428 -0.79899221  0.01822975
 [43]  1.25329993  0.39068051  0.31605117 -0.38505034 -0.64766243 -3.00905317
 [49]  0.31723803  1.49649644 -0.01278478  0.78806515 -1.47826430  0.90937698
 [55]  0.06041783  1.61019657 -0.26747216 -0.24052526  1.04192087 -2.38984103
 [61]  0.57883377 -0.58133734 -2.06992261  0.04681162 -0.90978580 -0.11556650
 [67]  0.72565193 -2.05908241 -0.96075230 -0.13424793 -0.22885002  1.21576520
 [73]  0.17268469  0.10885053 -0.75215015 -1.16247847  0.83680745  0.34240447
 [79] -2.35627706 -0.67060686  0.63443091  1.09402392 -0.55198897 -0.26069103
 [85]  1.18353385 -1.12601828 -1.28209652  0.97657724  0.18729779  1.88448672
 [91]  0.38038792  0.12875235 -0.19264043 -1.95820005  1.25627801  1.11063387
 [97] -0.31625386  0.04841835  0.16973067 -0.21179282
> rowSums(tmp2)
  [1]  0.32117884 -1.32974904  0.79312386 -0.96782936 -1.93655388 -0.58701279
  [7]  0.46414868 -0.02830389  1.09887573  1.03557828  0.92579796 -0.36097434
 [13] -0.18847454 -0.47516768  1.36840545  1.37806283 -0.31991131 -0.74405932
 [19]  0.98563838  0.73197679  0.49996982 -1.75938644 -0.57902437 -0.21805873
 [25] -0.24601350 -0.06660752 -1.08420896  1.06962659 -0.92820286  0.62784436
 [31]  0.63840500  2.13754302  0.51554222 -0.79928276 -0.17603022 -0.25401437
 [37] -1.48085458 -0.74372810  0.63526198 -0.33354428 -0.79899221  0.01822975
 [43]  1.25329993  0.39068051  0.31605117 -0.38505034 -0.64766243 -3.00905317
 [49]  0.31723803  1.49649644 -0.01278478  0.78806515 -1.47826430  0.90937698
 [55]  0.06041783  1.61019657 -0.26747216 -0.24052526  1.04192087 -2.38984103
 [61]  0.57883377 -0.58133734 -2.06992261  0.04681162 -0.90978580 -0.11556650
 [67]  0.72565193 -2.05908241 -0.96075230 -0.13424793 -0.22885002  1.21576520
 [73]  0.17268469  0.10885053 -0.75215015 -1.16247847  0.83680745  0.34240447
 [79] -2.35627706 -0.67060686  0.63443091  1.09402392 -0.55198897 -0.26069103
 [85]  1.18353385 -1.12601828 -1.28209652  0.97657724  0.18729779  1.88448672
 [91]  0.38038792  0.12875235 -0.19264043 -1.95820005  1.25627801  1.11063387
 [97] -0.31625386  0.04841835  0.16973067 -0.21179282
> 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.32117884 -1.32974904  0.79312386 -0.96782936 -1.93655388 -0.58701279
  [7]  0.46414868 -0.02830389  1.09887573  1.03557828  0.92579796 -0.36097434
 [13] -0.18847454 -0.47516768  1.36840545  1.37806283 -0.31991131 -0.74405932
 [19]  0.98563838  0.73197679  0.49996982 -1.75938644 -0.57902437 -0.21805873
 [25] -0.24601350 -0.06660752 -1.08420896  1.06962659 -0.92820286  0.62784436
 [31]  0.63840500  2.13754302  0.51554222 -0.79928276 -0.17603022 -0.25401437
 [37] -1.48085458 -0.74372810  0.63526198 -0.33354428 -0.79899221  0.01822975
 [43]  1.25329993  0.39068051  0.31605117 -0.38505034 -0.64766243 -3.00905317
 [49]  0.31723803  1.49649644 -0.01278478  0.78806515 -1.47826430  0.90937698
 [55]  0.06041783  1.61019657 -0.26747216 -0.24052526  1.04192087 -2.38984103
 [61]  0.57883377 -0.58133734 -2.06992261  0.04681162 -0.90978580 -0.11556650
 [67]  0.72565193 -2.05908241 -0.96075230 -0.13424793 -0.22885002  1.21576520
 [73]  0.17268469  0.10885053 -0.75215015 -1.16247847  0.83680745  0.34240447
 [79] -2.35627706 -0.67060686  0.63443091  1.09402392 -0.55198897 -0.26069103
 [85]  1.18353385 -1.12601828 -1.28209652  0.97657724  0.18729779  1.88448672
 [91]  0.38038792  0.12875235 -0.19264043 -1.95820005  1.25627801  1.11063387
 [97] -0.31625386  0.04841835  0.16973067 -0.21179282
> rowMin(tmp2)
  [1]  0.32117884 -1.32974904  0.79312386 -0.96782936 -1.93655388 -0.58701279
  [7]  0.46414868 -0.02830389  1.09887573  1.03557828  0.92579796 -0.36097434
 [13] -0.18847454 -0.47516768  1.36840545  1.37806283 -0.31991131 -0.74405932
 [19]  0.98563838  0.73197679  0.49996982 -1.75938644 -0.57902437 -0.21805873
 [25] -0.24601350 -0.06660752 -1.08420896  1.06962659 -0.92820286  0.62784436
 [31]  0.63840500  2.13754302  0.51554222 -0.79928276 -0.17603022 -0.25401437
 [37] -1.48085458 -0.74372810  0.63526198 -0.33354428 -0.79899221  0.01822975
 [43]  1.25329993  0.39068051  0.31605117 -0.38505034 -0.64766243 -3.00905317
 [49]  0.31723803  1.49649644 -0.01278478  0.78806515 -1.47826430  0.90937698
 [55]  0.06041783  1.61019657 -0.26747216 -0.24052526  1.04192087 -2.38984103
 [61]  0.57883377 -0.58133734 -2.06992261  0.04681162 -0.90978580 -0.11556650
 [67]  0.72565193 -2.05908241 -0.96075230 -0.13424793 -0.22885002  1.21576520
 [73]  0.17268469  0.10885053 -0.75215015 -1.16247847  0.83680745  0.34240447
 [79] -2.35627706 -0.67060686  0.63443091  1.09402392 -0.55198897 -0.26069103
 [85]  1.18353385 -1.12601828 -1.28209652  0.97657724  0.18729779  1.88448672
 [91]  0.38038792  0.12875235 -0.19264043 -1.95820005  1.25627801  1.11063387
 [97] -0.31625386  0.04841835  0.16973067 -0.21179282
> 
> colMeans(tmp2)
[1] -0.06226064
> colSums(tmp2)
[1] -6.226064
> colVars(tmp2)
[1] 1.016896
> colSd(tmp2)
[1] 1.008413
> colMax(tmp2)
[1] 2.137543
> colMin(tmp2)
[1] -3.009053
> colMedians(tmp2)
[1] -0.04745571
> colRanges(tmp2)
          [,1]
[1,] -3.009053
[2,]  2.137543
> 
> 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] -0.1012467 -2.8113269 -3.3636574  1.8967943  2.7009508 -4.3400508
 [7] -0.6376558 -1.6932159 -0.2264719 -3.9016810
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.8871516
[2,] -0.6133243
[3,] -0.2734723
[4,]  0.9834612
[5,]  1.3937705
> 
> rowApply(tmp,sum)
 [1]  0.8349821  1.4096417 -6.5512155 -3.4722596 -5.2788070  1.7407325
 [7] -1.7961212 -3.0491305  0.3206192  3.3639968
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    3    3    7    1    4    7    8    5    8    10
 [2,]    9   10    9    6    2    4    5    3    1     7
 [3,]    8    5    2    2    9    6    2    6    4     3
 [4,]    5    8   10    9    1    3    9   10    6     2
 [5,]   10    6    5    8   10   10    1    9    5     4
 [6,]    4    7    3    3    5    1    6    4    9     1
 [7,]    1    9    6    5    3    8    4    7   10     6
 [8,]    2    4    1    7    7    9    3    8    3     8
 [9,]    7    1    4   10    8    2   10    2    7     9
[10,]    6    2    8    4    6    5    7    1    2     5
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1] -3.4409226 -3.4102080 -2.2343109 -2.6598543 -0.1069452 -2.3532181
 [7]  1.5653269 -1.0440355  3.5465169 -6.0077273  1.2817692 -0.5842910
[13]  4.5234743  1.3480646  3.5112766 -1.3556230 -0.1583317 -2.3739855
[19] -2.3295166  3.5657844
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -2.7924701
[2,] -0.6304943
[3,] -0.2387576
[4,] -0.2038283
[5,]  0.4246276
> 
> rowApply(tmp,sum)
[1] -2.3013599 -2.3017810  1.4625884 -6.2737060  0.6975018
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   15    1    3   10    8
[2,]    6    7    7    7    4
[3,]    2    9    5   17    5
[4,]    4   20   11    6    2
[5,]   14   16   16    8    3
> 
> 
> as.matrix(tmp)
           [,1]       [,2]       [,3]       [,4]       [,5]        [,6]
[1,]  0.4246276 -0.9828662 -1.4060708 -1.2012225  0.3946271 -1.51640326
[2,] -2.7924701 -0.2220070 -0.1935059  1.3003815  0.5591025 -0.49517440
[3,] -0.6304943 -0.2265098 -0.4281745  0.1523335  0.8817743  0.15936634
[4,] -0.2038283 -0.8316083  0.2381997 -0.8914767 -0.5850964 -0.08355835
[5,] -0.2387576 -1.1472168 -0.4447595 -2.0198701 -1.3573527 -0.41744843
           [,7]       [,8]        [,9]      [,10]      [,11]       [,12]
[1,]  0.3053447 -0.6686798  0.74506299  0.7479314  1.7599209 -0.11880338
[2,]  0.5269256 -0.6057469  1.26752560 -0.4514642 -1.3350134  0.11791310
[3,]  0.2190549  1.0675674  1.04771859 -3.0304890 -1.1008516 -0.41358330
[4,] -1.2843823 -1.0955884 -0.01829792 -1.0219621  1.2260949 -0.18359428
[5,]  1.7983840  0.2584123  0.50450767 -2.2517434  0.7316184  0.01377689
         [,13]      [,14]       [,15]       [,16]       [,17]       [,18]
[1,] 0.2332236  1.1057568  0.67537187 -1.13678018 -1.24769779 -0.45813155
[2,] 1.0323957 -0.1510011 -0.21408347 -0.02100901  0.80071482  0.37871436
[3,] 1.5818727  0.3428255  1.64229597 -0.12800661 -0.05003586  0.02446633
[4,] 0.9200334 -1.3051845 -0.05865669 -0.09088661 -0.37054776 -2.11167810
[5,] 0.7559489  1.3556678  1.46634891  0.02105938  0.70923493 -0.20735652
          [,19]      [,20]
[1,]  0.2034563 -0.1600278
[2,] -1.9299103  0.1259316
[3,] -0.4518710  0.8033288
[4,]  0.1043946  1.3739181
[5,] -0.2555861  1.4226337
> 
> 
> 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.22-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.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  652  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  566  bytes.
Disk usage :  160  bytes.
> subBufferedMatrix(tmp,1:3,)
BufferedMatrix object
Matrix size:  3 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-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 1.016586 1.101539 1.44765 0.0228922 0.1272716 1.809765 0.01610853
           col8       col9     col10     col11     col12     col13     col14
row1 -0.3521795 -0.7910494 0.3974301 0.5147357 -1.173797 0.3740616 -1.579122
        col15      col16     col17      col18    col19      col20
row1 1.035831 -0.9630571 0.1440584 -0.9143906 1.167858 -0.2721451
> tmp[,"col10"]
          col10
row1  0.3974301
row2 -1.2246475
row3  1.2501578
row4  1.1076697
row5  0.3880257
> tmp[c("row1","row5"),]
         col1      col2       col3      col4       col5     col6        col7
row1 1.016586  1.101539 1.44764961 0.0228922  0.1272716 1.809765  0.01610853
row5 1.055959 -1.144489 0.04356359 1.9398654 -1.6752522 1.478601 -1.99257176
           col8       col9     col10      col11      col12     col13      col14
row1 -0.3521795 -0.7910494 0.3974301  0.5147357 -1.1737968 0.3740616 -1.5791218
row5  0.1205820 -0.1644459 0.3880257 -0.2025430  0.7070806 0.3352173  0.2837674
         col15      col16      col17      col18     col19      col20
row1 1.0358312 -0.9630571  0.1440584 -0.9143906 1.1678584 -0.2721451
row5 0.7433654 -1.0637318 -0.7189535 -0.6610357 0.8109396  0.3112873
> tmp[,c("col6","col20")]
          col6      col20
row1 1.8097647 -0.2721451
row2 0.1305559  0.6749152
row3 0.6199892  0.6520486
row4 0.2138633 -0.6575120
row5 1.4786011  0.3112873
> tmp[c("row1","row5"),c("col6","col20")]
         col6      col20
row1 1.809765 -0.2721451
row5 1.478601  0.3112873
> 
> 
> 
> 
> 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.61275 50.72128 50.0943 49.53707 50.18986 105.7129 50.64352 50.28995
         col9    col10    col11    col12    col13    col14    col15    col16
row1 49.33275 51.39193 49.08237 49.09616 49.92584 49.60756 51.39729 48.98978
        col17    col18    col19    col20
row1 50.98428 49.16285 48.97629 103.7379
> tmp[,"col10"]
        col10
row1 51.39193
row2 29.51596
row3 30.18601
row4 30.64443
row5 49.82895
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 49.61275 50.72128 50.09430 49.53707 50.18986 105.7129 50.64352 50.28995
row5 49.32831 49.68409 49.27776 50.09250 49.27394 107.2038 51.83031 50.19555
         col9    col10    col11    col12    col13    col14    col15    col16
row1 49.33275 51.39193 49.08237 49.09616 49.92584 49.60756 51.39729 48.98978
row5 49.19308 49.82895 50.62512 50.22839 49.59923 49.57542 50.17368 49.66874
        col17    col18    col19    col20
row1 50.98428 49.16285 48.97629 103.7379
row5 50.91977 47.60489 50.79458 103.3198
> tmp[,c("col6","col20")]
          col6     col20
row1 105.71289 103.73787
row2  74.21785  74.66203
row3  77.45710  76.01015
row4  74.46076  76.84967
row5 107.20385 103.31981
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 105.7129 103.7379
row5 107.2038 103.3198
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 105.7129 103.7379
row5 107.2038 103.3198
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,]  0.5079570
[2,]  0.4765293
[3,] -1.0740947
[4,]  0.9645413
[5,] -0.1411010
> tmp[,c("col17","col7")]
           col17         col7
[1,] -1.09275220  2.561878907
[2,]  0.44018481  0.001552076
[3,] -0.98160739 -0.267766825
[4,] -0.11046618 -0.960084249
[5,]  0.08641224  1.144495049
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6      col20
[1,]  0.0574365  0.7356632
[2,] -0.9072751  0.5289106
[3,]  0.8741734  2.7249135
[4,]  0.7885327 -1.2553849
[5,] -0.9531069  0.8169506
> subBufferedMatrix(tmp,1,c("col6"))[,1]
          col1
[1,] 0.0574365
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,]  0.0574365
[2,] -0.9072751
> 
> 
> 
> 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.2839706 -0.8349535  0.6320334 -1.961220 0.6073529 -0.5364506  0.5138990
row1 -0.5819867  1.2832663 -0.3479783  1.282305 0.2857541 -1.0646614 -0.1937374
          [,8]      [,9]   [,10]     [,11]      [,12]     [,13]      [,14]
row3 1.7305341 0.4024405 2.60392 -2.086410  0.6514859 -1.609030 -0.3414338
row1 0.3381243 0.8158346 1.23161  1.323312 -2.8509503 -1.441998  1.1474235
          [,15]      [,16]     [,17]      [,18]       [,19]     [,20]
row3  0.4966891  0.1243019 1.0196623  1.9227335 -0.06060688 0.2345431
row1 -0.6593735 -1.9698845 0.9730717 -0.8892687 -0.76244317 0.3498569
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
         [,1]     [,2]     [,3]       [,4]       [,5]      [,6]       [,7]
row2 1.657089 1.400101 2.118565 0.05525471 -0.6562842 0.1200401 -0.7727732
           [,8]       [,9]    [,10]
row2 -0.6455745 -0.5773287 1.199512
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
           [,1]     [,2]       [,3]     [,4]     [,5]     [,6]      [,7]
row5 0.09069901 0.996842 -0.1327068 1.246262 1.791146 2.795608 -2.651795
          [,8]      [,9]     [,10]     [,11]      [,12]     [,13]    [,14]
row5 0.8211542 0.6668418 0.2191855 0.9639455 -0.1107349 0.9855662 2.672945
          [,15]     [,16]    [,17]     [,18]     [,19]      [,20]
row5 0.03199358 0.4817515 1.311897 -1.280799 -0.598829 -0.1520593
> 
> 
> 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: 0x15d749a0>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe6d3f76d8" 
 [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe6786c3b31"
 [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe6f2e08aa" 
 [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe61bc64bb9"
 [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe647d275c5"
 [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe6583c4d15"
 [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe64cd6cb81"
 [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe62efc7839"
 [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe635d3f732"
[10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe631cb1b4f"
[11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe6498e7628"
[12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe64ac599c5"
[13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe639f1ae5a"
[14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe678759ec5"
[15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1a5fe660fcf475"
> 
> 
> ### 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: 0x170a98e0>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x170a98e0>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x170a98e0>
> rowMedians(tmp)
  [1] -0.3809444565 -0.0648410098 -0.0604371650 -0.2920883011 -0.1681281990
  [6] -0.3378240820  0.3754118356 -0.0125402564 -0.2202576644 -0.1904908355
 [11]  0.1330096402  0.4001097775 -0.5972328407  0.3290559897 -0.1656191366
 [16]  0.0700855727  0.4840369901  0.7508844808 -0.1483315008  0.2384267507
 [21]  0.2027097048 -1.1219681494  0.0580131641  0.5252242300  0.8046386575
 [26]  0.3824856676  0.0923486451 -0.1816408940  0.8656772672  0.0508520084
 [31]  0.5724190633  0.1505102396  0.1554614550 -0.1894201651 -0.2428428958
 [36]  0.3448822398  0.3038217003 -0.1285646894 -0.1310467559  0.1015421314
 [41] -0.0688071123  0.1192836768  0.0403957916 -0.3407663271  0.4008164488
 [46] -0.2472841029  0.0634053631  0.5105826026 -0.2130255032 -0.4381788750
 [51] -0.3499492173  0.2030701541 -0.0423151501 -0.2086911888  0.1244928311
 [56]  0.3902108578  0.3811963517 -0.2831001142 -0.2219570438  0.3804578888
 [61]  0.1705070015  0.3228655015 -0.0637414279  0.0606913412 -0.1130597447
 [66] -0.0170639994 -0.0254830761 -0.1445562047  0.2924015623 -0.0636448138
 [71]  0.0187640168 -0.1816869297  0.2584724835 -0.0291515527 -0.2133956871
 [76] -0.3621783402  0.3031936339  0.1773469985 -0.2902925637  0.5102232996
 [81] -1.0585676877 -0.5760330170  0.5967823347  0.2443779133 -0.3879887986
 [86]  0.2680145607 -0.5434658069 -0.0156464185  0.1735889210  0.0581327141
 [91] -0.5070418239  0.2075976511 -0.1420123502  0.7000878257  0.0015366154
 [96]  0.1181536655  0.3725921727 -0.0076426598 -0.0603171610 -0.1448167448
[101]  0.1304371203 -0.2564032130 -0.0050383713  0.3586317248  0.0087123947
[106]  0.1094986009 -0.5035999004 -0.6028383863  0.0323478693  0.6903044291
[111] -0.5719657998 -0.4170510096  0.0588981657  0.0132978872 -0.2247267840
[116] -0.0859425254  0.0616490725  0.1254253562  0.5124148409  0.4333912401
[121]  0.3830638690  0.1309883463 -0.3831870445 -0.3248705214 -0.0376830665
[126]  0.1170977224  0.3528686660  0.0459378811  0.1796504909  0.2236108716
[131] -0.0655488999 -0.2328907234  0.2175320515 -0.1746369457 -0.4417212127
[136]  0.2454038941  0.1729470400 -0.3015689676  0.1374962107 -0.1586607687
[141] -0.2160684062  0.5570281343  0.1851834707  0.2097129251 -0.1015998389
[146] -0.2328925944 -0.5042310025  0.3103905574 -0.4100101570  0.1748324382
[151] -0.0360579928  0.2195103053  0.4371271057 -0.3957848591 -0.0636019155
[156]  0.3854247390 -0.3054037038  0.4083414034 -0.1427966007  0.2686246000
[161] -0.3708577917  0.1352618618 -0.0879163029 -0.6847894127  0.1707493483
[166] -0.0429751505  0.7018223606  0.4282066950 -0.2112052315 -0.0997784591
[171]  0.2347732293  0.4796572016 -0.0015132694 -0.1323661457 -0.4955456299
[176]  0.3101667464 -0.4600860568 -0.3682753716 -0.1363501469 -0.0379609073
[181]  0.3372849679 -0.2604483350  0.2686312718 -0.3952503514 -0.2365094572
[186]  0.4523698407  0.0473324393  0.3324449237  0.0916160576  0.0390185606
[191]  0.0617586626 -0.4201008485 -0.3808138597 -0.2814748946  0.3926467657
[196] -0.1705088870  0.4890862707  0.3972904270  0.3538639253 -0.2974016782
[201] -0.3124123174  0.0792773075 -0.0102454998  0.1041068505 -0.1091171679
[206] -0.2465930746 -0.0874572922  0.7463414317 -0.0338141216 -0.1858617167
[211]  0.4654513664 -0.1464001697 -0.2422738684  0.1884393050 -0.0278557844
[216]  0.3925116164 -0.0114319780  0.1703794923 -0.0048059756 -0.5609712297
[221] -0.1823939209  0.0072055698 -0.4404196601  0.3138169960  0.0953149892
[226] -0.0006781436 -0.3465691581 -0.1951793588 -0.0004839753  0.0889905332
> 
> proc.time()
   user  system elapsed 
  1.811   0.964   2.801 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-unknown-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: 0x2f38fff0>
> .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: 0x2f38fff0>
> .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: 0x2f38fff0>
> .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: 0x2f38fff0>
> 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: 0x2f2750e0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x2f2750e0>
> .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: 0x2f2750e0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x2f2750e0>
> .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: 0x2f2750e0>
> 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: 0x2e1fc520>
> .Call("R_bm_AddColumn",P)
<pointer: 0x2e1fc520>
> .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: 0x2e1fc520>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x2e1fc520>
> .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: 0x2e1fc520>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x2e1fc520>
> .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: 0x2e1fc520>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x2e1fc520>
> .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: 0x2e1fc520>
> 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: 0x2dc00720>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x2dc00720>
> .Call("R_bm_AddColumn",P)
<pointer: 0x2dc00720>
> .Call("R_bm_AddColumn",P)
<pointer: 0x2dc00720>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile1a61336370fb3e" "BufferedMatrixFile1a61337ccdd5f0"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile1a61336370fb3e" "BufferedMatrixFile1a61337ccdd5f0"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x2eaf07d0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x2eaf07d0>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x2eaf07d0>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x2eaf07d0>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x2eaf07d0>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x2eaf07d0>
> .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: 0x2ebf7c90>
> .Call("R_bm_AddColumn",P)
<pointer: 0x2ebf7c90>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x2ebf7c90>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x2ebf7c90>
> 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: 0x2fea0110>
> .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: 0x2fea0110>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.339   0.053   0.377 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-unknown-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.320   0.052   0.358 

Example timings