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

This page was generated on 2026-04-30 11:32 -0400 (Thu, 30 Apr 2026).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 24.04.4 LTS)x86_644.6.0 RC (2026-04-17 r89917) -- "Because it was There" 4843
Click on any hostname to see more info about the system (e.g. compilers)      (*) as reported by 'uname -p', except on Windows and Mac OS X

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


CHECK results for BufferedMatrix on nebbiolo2

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

raw results


Summary

Package: BufferedMatrix
Version: 1.77.0
Command: /home/biocbuild/bbs-3.24-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.24-bioc/R/site-library --timings BufferedMatrix_1.77.0.tar.gz
StartedAt: 2026-04-29 22:02:44 -0400 (Wed, 29 Apr 2026)
EndedAt: 2026-04-29 22:03:09 -0400 (Wed, 29 Apr 2026)
EllapsedTime: 25.0 seconds
RetCode: 0
Status:   OK  
CheckDir: BufferedMatrix.Rcheck
Warnings: 0

Command output

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


* using log directory ‘/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck’
* using R version 4.6.0 RC (2026-04-17 r89917)
* using platform: x86_64-pc-linux-gnu
* R was compiled by
    gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
    GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
* running under: Ubuntu 24.04.4 LTS
* using session charset: UTF-8
* current time: 2026-04-30 02:02:44 UTC
* checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK
* this is package ‘BufferedMatrix’ version ‘1.77.0’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘BufferedMatrix’ can be installed ... OK
* used C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0’
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking code files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... NOTE
checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup?
   209 |     $x^{power}$ elementwise of the matrix
       |        ^
prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword
prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details
prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value
prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references
prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso
prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking compiled code ... INFO
Note: information on .o files is not available
* checking sizes of PDF files under ‘inst/doc’ ...* checking files in ‘vignettes’ ... OK
* checking examples ... NONE
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘Rcodetesting.R’
  Running ‘c_code_level_tests.R’
  Running ‘objectTesting.R’
  Running ‘rawCalltesting.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking re-building of vignette outputs ... OK
* checking PDF version of manual ... OK
* DONE

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


Installation output

BufferedMatrix.Rcheck/00install.out

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


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

Tests output

BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout


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

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

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

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

> library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1))

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

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

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

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

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

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

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

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

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

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

[[1]]
[1] 0

> 
> proc.time()
   user  system elapsed 
  0.244   0.056   0.288 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


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

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

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

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

> library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths());

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> 
> ### this is used to control how many repetitions in something below
> ### higher values result in more checks.
> nreps <-100 ##20000
> 
> 
> ## test creation and some simple assignments and subsetting operations
> 
> ## first on single elements
> tmp <- createBufferedMatrix(1000,10)
> 
> tmp[10,5]
[1] 0
> tmp[10,5] <- 10
> tmp[10,5]
[1] 10
> tmp[10,5] <- 12.445
> tmp[10,5]
[1] 12.445
> 
> 
> 
> ## now testing accessing multiple elements
> tmp2 <- createBufferedMatrix(10,20)
> 
> 
> tmp2[3,1] <- 51.34
> tmp2[9,2] <- 9.87654
> tmp2[,1:2]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[,-(3:20)]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[3,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,] 51.34    0    0    0    0    0    0    0    0     0     0     0     0
     [,14] [,15] [,16] [,17] [,18] [,19] [,20]
[1,]     0     0     0     0     0     0     0
> tmp2[-3,]
      [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]    0 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19] [,20]
 [1,]     0     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0     0
> tmp2[2,1:3]
     [,1] [,2] [,3]
[1,]    0    0    0
> tmp2[3:9,1:3]
      [,1]    [,2] [,3]
[1,] 51.34 0.00000    0
[2,]  0.00 0.00000    0
[3,]  0.00 0.00000    0
[4,]  0.00 0.00000    0
[5,]  0.00 0.00000    0
[6,]  0.00 0.00000    0
[7,]  0.00 9.87654    0
> tmp2[-4,-4]
       [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,] 51.34 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]  0.00 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19]
 [1,]     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0
> 
> ## now testing accessing/assigning multiple elements
> tmp3 <- createBufferedMatrix(10,10)
> 
> for (i in 1:10){
+   for (j in 1:10){
+     tmp3[i,j] <- (j-1)*10 + i
+   }
+ }
> 
> tmp3[2:4,2:4]
     [,1] [,2] [,3]
[1,]   12   22   32
[2,]   13   23   33
[3,]   14   24   34
> tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]   11   21   31   11   21   31   91    1   11     1    11    21    31
 [2,]   12   22   32   12   22   32   92    2   12     2    12    22    32
 [3,]   13   23   33   13   23   33   93    3   13     3    13    23    33
 [4,]   14   24   34   14   24   34   94    4   14     4    14    24    34
 [5,]   15   25   35   15   25   35   95    5   15     5    15    25    35
 [6,]   16   26   36   16   26   36   96    6   16     6    16    26    36
 [7,]   17   27   37   17   27   37   97    7   17     7    17    27    37
 [8,]   18   28   38   18   28   38   98    8   18     8    18    28    38
 [9,]   19   29   39   19   29   39   99    9   19     9    19    29    39
      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
 [1,]    41    51    61    71    81    91    91    81    71    61    51    41
 [2,]    42    52    62    72    82    92    92    82    72    62    52    42
 [3,]    43    53    63    73    83    93    93    83    73    63    53    43
 [4,]    44    54    64    74    84    94    94    84    74    64    54    44
 [5,]    45    55    65    75    85    95    95    85    75    65    55    45
 [6,]    46    56    66    76    86    96    96    86    76    66    56    46
 [7,]    47    57    67    77    87    97    97    87    77    67    57    47
 [8,]    48    58    68    78    88    98    98    88    78    68    58    48
 [9,]    49    59    69    79    89    99    99    89    79    69    59    49
      [,26] [,27] [,28] [,29]
 [1,]    31    21    11     1
 [2,]    32    22    12     2
 [3,]    33    23    13     3
 [4,]    34    24    14     4
 [5,]    35    25    15     5
 [6,]    36    26    16     6
 [7,]    37    27    17     7
 [8,]    38    28    18     8
 [9,]    39    29    19     9
> tmp3[-c(1:5),-c(6:10)]
     [,1] [,2] [,3] [,4] [,5]
[1,]    6   16   26   36   46
[2,]    7   17   27   37   47
[3,]    8   18   28   38   48
[4,]    9   19   29   39   49
[5,]   10   20   30   40   50
> 
> ## assignment of whole columns
> tmp3[,1] <- c(1:10*100.0)
> tmp3[,1:2] <- tmp3[,1:2]*100
> tmp3[,1:2] <- tmp3[,2:1]
> tmp3[,1:2]
      [,1]  [,2]
 [1,] 1100 1e+04
 [2,] 1200 2e+04
 [3,] 1300 3e+04
 [4,] 1400 4e+04
 [5,] 1500 5e+04
 [6,] 1600 6e+04
 [7,] 1700 7e+04
 [8,] 1800 8e+04
 [9,] 1900 9e+04
[10,] 2000 1e+05
> 
> 
> tmp3[,-1] <- tmp3[,1:9]
> tmp3[,1:10]
      [,1] [,2]  [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,] 1100 1100 1e+04   21   31   41   51   61   71    81
 [2,] 1200 1200 2e+04   22   32   42   52   62   72    82
 [3,] 1300 1300 3e+04   23   33   43   53   63   73    83
 [4,] 1400 1400 4e+04   24   34   44   54   64   74    84
 [5,] 1500 1500 5e+04   25   35   45   55   65   75    85
 [6,] 1600 1600 6e+04   26   36   46   56   66   76    86
 [7,] 1700 1700 7e+04   27   37   47   57   67   77    87
 [8,] 1800 1800 8e+04   28   38   48   58   68   78    88
 [9,] 1900 1900 9e+04   29   39   49   59   69   79    89
[10,] 2000 2000 1e+05   30   40   50   60   70   80    90
> 
> tmp3[,1:2] <- rep(1,10)
> tmp3[,1:2] <- rep(1,20)
> tmp3[,1:2] <- matrix(c(1:5),1,5)
> 
> tmp3[,-c(1:8)] <- matrix(c(1:5),1,5)
> 
> tmp3[1,] <- 1:10
> tmp3[1,]
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    1    2    3    4    5    6    7    8    9    10
> tmp3[-1,] <- c(1,2)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    2    1    2    1    2    1    2    1    2     1
[10,]    1    2    1    2    1    2    1    2    1     2
> tmp3[-c(1:8),] <- matrix(c(1:5),1,5)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    1    3    5    2    4    1    3    5    2     4
[10,]    2    4    1    3    5    2    4    1    3     5
> 
> 
> tmp3[1:2,1:2] <- 5555.04
> tmp3[-(1:2),1:2] <- 1234.56789
> 
> 
> 
> ## testing accessors for the directory and prefix
> directory(tmp3)
[1] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests"
> prefix(tmp3)
[1] "BM"
> 
> ## testing if we can remove these objects
> rm(tmp, tmp2, tmp3)
> gc()
         used (Mb) gc trigger (Mb) max used (Mb)
Ncells 480233 25.7    1053308 56.3   637571 34.1
Vcells 887253  6.8    8388608 64.0  2083896 15.9
> 
> 
> 
> 
> ##
> ## checking reads
> ##
> 
> tmp2 <- createBufferedMatrix(10,20)
> 
> test.sample <- rnorm(10*20)
> 
> tmp2[1:10,1:20] <- test.sample
> 
> test.matrix <- matrix(test.sample,10,20)
> 
> ## testing reads
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Wed Apr 29 22:03:00 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] "Wed Apr 29 22:03:00 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: 0x60f63fee1520>
> 
> 
> 
> 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] "Wed Apr 29 22:03:00 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] "Wed Apr 29 22:03:01 2026"
> 
> ColMode(tmp2)
<pointer: 0x60f63fee1520>
> 
> 
> 
> ### Now testing assignments
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+ 
+   new.data <- rnorm(20)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,] <- new.data
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   new.data <- rnorm(10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+ 
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col  <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(25),5,5)
+   tmp2[which.row,which.col] <- new.data
+   test.matrix[which.row,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> ###
> ###
> ### testing some more functions
> ###
> 
> 
> 
> ## duplication function
> tmp5 <- duplicate(tmp2)
> 
> # making sure really did copy everything.
> tmp5[1,1] <- tmp5[1,1] +100.00
> 
> if (tmp5[1,1] == tmp2[1,1]){
+   stop("Problem with duplication")
+ }
> 
> 
> 
> 
> ### testing elementwise applying of functions
> 
> tmp5[1:4,1:4]
           [,1]       [,2]        [,3]        [,4]
[1,] 99.0280639  1.3907532  0.99025319  0.26168596
[2,] -0.1991027 -0.3113685 -1.69973847  0.03719059
[3,]  0.8029334 -0.1980844  2.09982683 -0.76089142
[4,]  1.3586192  0.6229895  0.02593718  0.84501393
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
           [,1]      [,2]       [,3]       [,4]
[1,] 99.0280639 1.3907532 0.99025319 0.26168596
[2,]  0.1991027 0.3113685 1.69973847 0.03719059
[3,]  0.8029334 0.1980844 2.09982683 0.76089142
[4,]  1.3586192 0.6229895 0.02593718 0.84501393
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]      [,2]      [,3]      [,4]
[1,] 9.9512845 1.1793020 0.9951147 0.5115525
[2,] 0.4462093 0.5580040 1.3037402 0.1928486
[3,] 0.8960655 0.4450667 1.4490779 0.8722909
[4,] 1.1655982 0.7892968 0.1610502 0.9192464
> 
> my.function <- function(x,power){
+   (x+5)^power
+ }
> 
> ewApply(tmp5,my.function,power=2)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 223.54091 38.18377 35.94140 30.37721
[2,]  29.66120 30.89141 39.73714 26.96568
[3,]  34.76359 29.64875 41.59061 34.48380
[4,]  38.01460 33.51596 26.63644 35.03748
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x60f640ccc8f0>
> exp(tmp5)
<pointer: 0x60f640ccc8f0>
> log(tmp5,2)
<pointer: 0x60f640ccc8f0>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 465.2711
> Min(tmp5)
[1] 53.67659
> mean(tmp5)
[1] 74.17479
> Sum(tmp5)
[1] 14834.96
> Var(tmp5)
[1] 857.4443
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 93.81586 71.04894 73.37491 71.71110 72.02488 72.62302 69.07390 73.88514
 [9] 71.79772 72.39242
> rowSums(tmp5)
 [1] 1876.317 1420.979 1467.498 1434.222 1440.498 1452.460 1381.478 1477.703
 [9] 1435.954 1447.848
> rowVars(tmp5)
 [1] 7710.99381   79.19467   80.24495  140.12142  133.71852   61.14545
 [7]   86.10841   59.60488   79.10732   82.76892
> rowSd(tmp5)
 [1] 87.812265  8.899139  8.957955 11.837290 11.563672  7.819556  9.279461
 [8]  7.720420  8.894229  9.097742
> rowMax(tmp5)
 [1] 465.27111  86.21860  86.95613  96.59382  96.96066  89.74192  91.80401
 [8]  87.86591  86.67365  87.66920
> rowMin(tmp5)
 [1] 59.36272 56.12552 56.92419 53.75311 54.41811 57.50685 53.92179 60.79462
 [9] 53.67659 60.41643
> 
> colMeans(tmp5)
 [1] 114.25774  70.17937  71.69691  69.65907  71.51402  74.68107  70.61926
 [8]  74.79753  70.81773  79.54152  67.49136  76.56625  72.97747  71.52809
[15]  70.67535  67.61071  74.02566  73.05113  71.33682  70.46870
> colSums(tmp5)
 [1] 1142.5774  701.7937  716.9691  696.5907  715.1402  746.8107  706.1926
 [8]  747.9753  708.1773  795.4152  674.9136  765.6625  729.7747  715.2809
[15]  706.7535  676.1071  740.2566  730.5113  713.3682  704.6870
> colVars(tmp5)
 [1] 15298.84172    57.58814   111.87029    83.59855    51.85007   163.40906
 [7]    73.69461   121.12323    42.47737   112.04221   119.56897    77.16094
[13]    48.28747    90.43264   100.72060    63.41703    63.42638    81.89969
[19]    74.11746    71.51002
> colSd(tmp5)
 [1] 123.688487   7.588685  10.576875   9.143224   7.200699  12.783155
 [7]   8.584557  11.005600   6.517466  10.584999  10.934760   8.784130
[13]   6.948918   9.509608  10.035965   7.963481   7.964068   9.049845
[19]   8.609150   8.456360
> colMax(tmp5)
 [1] 465.27111  79.47452  86.56540  80.97009  87.86591  96.18646  82.57740
 [8]  87.37670  84.07547  96.59382  89.74192  91.33184  87.66920  82.44843
[15]  91.80401  81.91079  84.82360  86.21860  85.53589  82.08497
> colMin(tmp5)
 [1] 61.73589 61.38537 54.84188 53.92179 59.28337 60.15570 58.37919 57.50685
 [9] 61.91474 64.12733 53.67659 60.79462 66.41320 54.41811 59.10143 54.27470
[17] 60.63560 59.29489 61.01436 58.00280
> 
> 
> ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default)
> 
> 
> which.row <- sample(1:10,1,replace=TRUE)
> which.col  <- sample(1:20,1,replace=TRUE)
> 
> tmp5[which.row,which.col] <- NA
> 
> Max(tmp5)
[1] NA
> Min(tmp5)
[1] NA
> mean(tmp5)
[1] NA
> Sum(tmp5)
[1] NA
> Var(tmp5)
[1] NA
> 
> rowMeans(tmp5)
 [1]       NA 71.04894 73.37491 71.71110 72.02488 72.62302 69.07390 73.88514
 [9] 71.79772 72.39242
> rowSums(tmp5)
 [1]       NA 1420.979 1467.498 1434.222 1440.498 1452.460 1381.478 1477.703
 [9] 1435.954 1447.848
> rowVars(tmp5)
 [1] 8130.35577   79.19467   80.24495  140.12142  133.71852   61.14545
 [7]   86.10841   59.60488   79.10732   82.76892
> rowSd(tmp5)
 [1] 90.168485  8.899139  8.957955 11.837290 11.563672  7.819556  9.279461
 [8]  7.720420  8.894229  9.097742
> rowMax(tmp5)
 [1]       NA 86.21860 86.95613 96.59382 96.96066 89.74192 91.80401 87.86591
 [9] 86.67365 87.66920
> rowMin(tmp5)
 [1]       NA 56.12552 56.92419 53.75311 54.41811 57.50685 53.92179 60.79462
 [9] 53.67659 60.41643
> 
> colMeans(tmp5)
 [1] 114.25774  70.17937  71.69691  69.65907  71.51402  74.68107        NA
 [8]  74.79753  70.81773  79.54152  67.49136  76.56625  72.97747  71.52809
[15]  70.67535  67.61071  74.02566  73.05113  71.33682  70.46870
> colSums(tmp5)
 [1] 1142.5774  701.7937  716.9691  696.5907  715.1402  746.8107        NA
 [8]  747.9753  708.1773  795.4152  674.9136  765.6625  729.7747  715.2809
[15]  706.7535  676.1071  740.2566  730.5113  713.3682  704.6870
> colVars(tmp5)
 [1] 15298.84172    57.58814   111.87029    83.59855    51.85007   163.40906
 [7]          NA   121.12323    42.47737   112.04221   119.56897    77.16094
[13]    48.28747    90.43264   100.72060    63.41703    63.42638    81.89969
[19]    74.11746    71.51002
> colSd(tmp5)
 [1] 123.688487   7.588685  10.576875   9.143224   7.200699  12.783155
 [7]         NA  11.005600   6.517466  10.584999  10.934760   8.784130
[13]   6.948918   9.509608  10.035965   7.963481   7.964068   9.049845
[19]   8.609150   8.456360
> colMax(tmp5)
 [1] 465.27111  79.47452  86.56540  80.97009  87.86591  96.18646        NA
 [8]  87.37670  84.07547  96.59382  89.74192  91.33184  87.66920  82.44843
[15]  91.80401  81.91079  84.82360  86.21860  85.53589  82.08497
> colMin(tmp5)
 [1] 61.73589 61.38537 54.84188 53.92179 59.28337 60.15570       NA 57.50685
 [9] 61.91474 64.12733 53.67659 60.79462 66.41320 54.41811 59.10143 54.27470
[17] 60.63560 59.29489 61.01436 58.00280
> 
> Max(tmp5,na.rm=TRUE)
[1] 465.2711
> Min(tmp5,na.rm=TRUE)
[1] 53.67659
> mean(tmp5,na.rm=TRUE)
[1] 74.13852
> Sum(tmp5,na.rm=TRUE)
[1] 14753.57
> Var(tmp5,na.rm=TRUE)
[1] 861.5104
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 94.46975 71.04894 73.37491 71.71110 72.02488 72.62302 69.07390 73.88514
 [9] 71.79772 72.39242
> rowSums(tmp5,na.rm=TRUE)
 [1] 1794.925 1420.979 1467.498 1434.222 1440.498 1452.460 1381.478 1477.703
 [9] 1435.954 1447.848
> rowVars(tmp5,na.rm=TRUE)
 [1] 8130.35577   79.19467   80.24495  140.12142  133.71852   61.14545
 [7]   86.10841   59.60488   79.10732   82.76892
> rowSd(tmp5,na.rm=TRUE)
 [1] 90.168485  8.899139  8.957955 11.837290 11.563672  7.819556  9.279461
 [8]  7.720420  8.894229  9.097742
> rowMax(tmp5,na.rm=TRUE)
 [1] 465.27111  86.21860  86.95613  96.59382  96.96066  89.74192  91.80401
 [8]  87.86591  86.67365  87.66920
> rowMin(tmp5,na.rm=TRUE)
 [1] 59.36272 56.12552 56.92419 53.75311 54.41811 57.50685 53.92179 60.79462
 [9] 53.67659 60.41643
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 114.25774  70.17937  71.69691  69.65907  71.51402  74.68107  69.42230
 [8]  74.79753  70.81773  79.54152  67.49136  76.56625  72.97747  71.52809
[15]  70.67535  67.61071  74.02566  73.05113  71.33682  70.46870
> colSums(tmp5,na.rm=TRUE)
 [1] 1142.5774  701.7937  716.9691  696.5907  715.1402  746.8107  624.8007
 [8]  747.9753  708.1773  795.4152  674.9136  765.6625  729.7747  715.2809
[15]  706.7535  676.1071  740.2566  730.5113  713.3682  704.6870
> colVars(tmp5,na.rm=TRUE)
 [1] 15298.84172    57.58814   111.87029    83.59855    51.85007   163.40906
 [7]    66.78838   121.12323    42.47737   112.04221   119.56897    77.16094
[13]    48.28747    90.43264   100.72060    63.41703    63.42638    81.89969
[19]    74.11746    71.51002
> colSd(tmp5,na.rm=TRUE)
 [1] 123.688487   7.588685  10.576875   9.143224   7.200699  12.783155
 [7]   8.172416  11.005600   6.517466  10.584999  10.934760   8.784130
[13]   6.948918   9.509608  10.035965   7.963481   7.964068   9.049845
[19]   8.609150   8.456360
> colMax(tmp5,na.rm=TRUE)
 [1] 465.27111  79.47452  86.56540  80.97009  87.86591  96.18646  82.57740
 [8]  87.37670  84.07547  96.59382  89.74192  91.33184  87.66920  82.44843
[15]  91.80401  81.91079  84.82360  86.21860  85.53589  82.08497
> colMin(tmp5,na.rm=TRUE)
 [1] 61.73589 61.38537 54.84188 53.92179 59.28337 60.15570 58.37919 57.50685
 [9] 61.91474 64.12733 53.67659 60.79462 66.41320 54.41811 59.10143 54.27470
[17] 60.63560 59.29489 61.01436 58.00280
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1]      NaN 71.04894 73.37491 71.71110 72.02488 72.62302 69.07390 73.88514
 [9] 71.79772 72.39242
> rowSums(tmp5,na.rm=TRUE)
 [1]    0.000 1420.979 1467.498 1434.222 1440.498 1452.460 1381.478 1477.703
 [9] 1435.954 1447.848
> rowVars(tmp5,na.rm=TRUE)
 [1]        NA  79.19467  80.24495 140.12142 133.71852  61.14545  86.10841
 [8]  59.60488  79.10732  82.76892
> rowSd(tmp5,na.rm=TRUE)
 [1]        NA  8.899139  8.957955 11.837290 11.563672  7.819556  9.279461
 [8]  7.720420  8.894229  9.097742
> rowMax(tmp5,na.rm=TRUE)
 [1]       NA 86.21860 86.95613 96.59382 96.96066 89.74192 91.80401 87.86591
 [9] 86.67365 87.66920
> rowMin(tmp5,na.rm=TRUE)
 [1]       NA 56.12552 56.92419 53.75311 54.41811 57.50685 53.92179 60.79462
 [9] 53.67659 60.41643
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 75.25625 69.14657 71.35131 70.37384 71.12682 73.57962      NaN 73.56552
 [9] 71.03144 80.28693 68.39454 75.64278 73.17989 70.31472 71.61750 67.79694
[17] 72.82589 73.54206 71.53431 69.85971
> colSums(tmp5,na.rm=TRUE)
 [1] 677.3063 622.3192 642.1618 633.3645 640.1414 662.2166   0.0000 662.0896
 [9] 639.2829 722.5824 615.5509 680.7850 658.6190 632.8324 644.5575 610.1724
[17] 655.4330 661.8786 643.8088 628.7374
> colVars(tmp5,na.rm=TRUE)
 [1]  98.64287  52.78668 124.51038  88.30087  56.64474 170.18693        NA
 [8] 119.18765  47.27327 119.79659 125.33803  77.21208  53.86246  85.17369
[15] 103.32469  70.95401  55.16085  89.42579  82.94333  76.27650
> colSd(tmp5,na.rm=TRUE)
 [1]  9.931912  7.265444 11.158422  9.396854  7.526270 13.045571        NA
 [8] 10.917310  6.875556 10.945163 11.195447  8.787040  7.339105  9.228959
[15] 10.164875  8.423420  7.427035  9.456521  9.107323  8.733642
> colMax(tmp5,na.rm=TRUE)
 [1] 96.96066 79.09794 86.56540 80.97009 87.86591 96.18646     -Inf 87.37670
 [9] 84.07547 96.59382 89.74192 91.33184 87.66920 82.08967 91.80401 81.91079
[17] 83.26058 86.21860 85.53589 82.08497
> colMin(tmp5,na.rm=TRUE)
 [1] 61.73589 61.38537 54.84188 53.92179 59.28337 60.15570      Inf 57.50685
 [9] 61.91474 64.12733 53.67659 60.79462 66.41320 54.41811 59.10143 54.27470
[17] 60.63560 59.29489 61.01436 58.00280
> 
> 
> 
> 
> 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] 260.1437 418.3501 185.6862 310.5968 283.4090 288.9659 125.1241 138.5885
 [9] 211.8930 167.0920
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 260.1437 418.3501 185.6862 310.5968 283.4090 288.9659 125.1241 138.5885
 [9] 211.8930 167.0920
> 
> 
> 
> 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 -5.684342e-14  2.842171e-13 -4.263256e-14  0.000000e+00
 [6] -2.842171e-14  2.842171e-14  0.000000e+00  1.705303e-13  1.136868e-13
[11] -1.989520e-13  1.136868e-13 -5.684342e-14  5.684342e-14  7.105427e-14
[16] -2.842171e-14  1.705303e-13  0.000000e+00 -2.842171e-13 -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)
+ }
10   8 
3   2 
1   2 
10   1 
9   1 
9   6 
5   4 
4   14 
9   1 
10   16 
10   20 
7   1 
3   20 
5   15 
2   3 
2   2 
10   4 
8   9 
1   16 
8   11 
There were 50 or more warnings (use warnings() to see the first 50)
> 
> 
> ### now test 1 by n and n by 1 matrix
> 
> 
> err.tol <- 1e-12
> 
> rm(tmp5)
> 
> dataset1 <- rnorm(100)
> dataset2 <- rnorm(100)
> 
> tmp <- createBufferedMatrix(1,100)
> tmp[1,] <- dataset1
> 
> tmp2 <- createBufferedMatrix(100,1)
> tmp2[,1] <- dataset2
> 
> 
> 
> 
> 
> Max(tmp)
[1] 2.002768
> Min(tmp)
[1] -2.658037
> mean(tmp)
[1] -0.03541706
> Sum(tmp)
[1] -3.541706
> Var(tmp)
[1] 0.9466922
> 
> rowMeans(tmp)
[1] -0.03541706
> rowSums(tmp)
[1] -3.541706
> rowVars(tmp)
[1] 0.9466922
> rowSd(tmp)
[1] 0.9729811
> rowMax(tmp)
[1] 2.002768
> rowMin(tmp)
[1] -2.658037
> 
> colMeans(tmp)
  [1] -0.019459868  1.023747947 -1.474469653 -0.592806235  0.661148119
  [6] -2.658037162  1.368305058  0.028617791 -0.353381581  0.401449764
 [11] -1.316779092  0.081637313  0.130253902  0.664799438  0.904112807
 [16]  0.957420535 -0.993174403 -0.451686419 -0.270070255 -0.036948878
 [21]  0.826499679  1.112939557  0.372650371 -1.104355901  1.015736337
 [26]  1.700978622  0.463760074 -0.751543816 -1.240495520  0.785982390
 [31] -0.764937273 -1.436500065  0.012237821  0.095551262  0.225314403
 [36] -0.501217479 -0.982943078  0.898282432 -0.538458952  0.537946146
 [41] -0.566502396 -0.889658065  0.810248328  2.002767715  1.245934815
 [46]  1.666838965 -2.247218132 -1.082250444 -0.457718514  0.166641731
 [51] -1.319190488 -0.588030771  0.752192862 -1.399325953 -1.999813384
 [56]  0.167937433 -0.272410600 -0.456087788 -0.511162961 -1.237998122
 [61] -0.536697068 -0.354195352 -1.652763387  0.254277619 -0.078560119
 [66] -0.483645180  0.624555480  1.520440036  0.973779398  0.650780528
 [71]  0.972950214 -1.498885209  0.196523444  1.123031785  1.052139308
 [76] -1.438849994 -0.343207995  1.391023626  0.491289638 -0.002319196
 [81]  0.131201456  0.636298269 -0.834224278 -1.982550039  0.348465766
 [86] -0.251342618 -1.395120099  0.697276901 -0.239017895  0.975299492
 [91] -0.636824436  0.749201488  1.468877105  0.787074329  0.126663517
 [96]  0.158805815  0.946721350 -0.458066899 -0.995343901  0.795931077
> colSums(tmp)
  [1] -0.019459868  1.023747947 -1.474469653 -0.592806235  0.661148119
  [6] -2.658037162  1.368305058  0.028617791 -0.353381581  0.401449764
 [11] -1.316779092  0.081637313  0.130253902  0.664799438  0.904112807
 [16]  0.957420535 -0.993174403 -0.451686419 -0.270070255 -0.036948878
 [21]  0.826499679  1.112939557  0.372650371 -1.104355901  1.015736337
 [26]  1.700978622  0.463760074 -0.751543816 -1.240495520  0.785982390
 [31] -0.764937273 -1.436500065  0.012237821  0.095551262  0.225314403
 [36] -0.501217479 -0.982943078  0.898282432 -0.538458952  0.537946146
 [41] -0.566502396 -0.889658065  0.810248328  2.002767715  1.245934815
 [46]  1.666838965 -2.247218132 -1.082250444 -0.457718514  0.166641731
 [51] -1.319190488 -0.588030771  0.752192862 -1.399325953 -1.999813384
 [56]  0.167937433 -0.272410600 -0.456087788 -0.511162961 -1.237998122
 [61] -0.536697068 -0.354195352 -1.652763387  0.254277619 -0.078560119
 [66] -0.483645180  0.624555480  1.520440036  0.973779398  0.650780528
 [71]  0.972950214 -1.498885209  0.196523444  1.123031785  1.052139308
 [76] -1.438849994 -0.343207995  1.391023626  0.491289638 -0.002319196
 [81]  0.131201456  0.636298269 -0.834224278 -1.982550039  0.348465766
 [86] -0.251342618 -1.395120099  0.697276901 -0.239017895  0.975299492
 [91] -0.636824436  0.749201488  1.468877105  0.787074329  0.126663517
 [96]  0.158805815  0.946721350 -0.458066899 -0.995343901  0.795931077
> colVars(tmp)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> colSd(tmp)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> colMax(tmp)
  [1] -0.019459868  1.023747947 -1.474469653 -0.592806235  0.661148119
  [6] -2.658037162  1.368305058  0.028617791 -0.353381581  0.401449764
 [11] -1.316779092  0.081637313  0.130253902  0.664799438  0.904112807
 [16]  0.957420535 -0.993174403 -0.451686419 -0.270070255 -0.036948878
 [21]  0.826499679  1.112939557  0.372650371 -1.104355901  1.015736337
 [26]  1.700978622  0.463760074 -0.751543816 -1.240495520  0.785982390
 [31] -0.764937273 -1.436500065  0.012237821  0.095551262  0.225314403
 [36] -0.501217479 -0.982943078  0.898282432 -0.538458952  0.537946146
 [41] -0.566502396 -0.889658065  0.810248328  2.002767715  1.245934815
 [46]  1.666838965 -2.247218132 -1.082250444 -0.457718514  0.166641731
 [51] -1.319190488 -0.588030771  0.752192862 -1.399325953 -1.999813384
 [56]  0.167937433 -0.272410600 -0.456087788 -0.511162961 -1.237998122
 [61] -0.536697068 -0.354195352 -1.652763387  0.254277619 -0.078560119
 [66] -0.483645180  0.624555480  1.520440036  0.973779398  0.650780528
 [71]  0.972950214 -1.498885209  0.196523444  1.123031785  1.052139308
 [76] -1.438849994 -0.343207995  1.391023626  0.491289638 -0.002319196
 [81]  0.131201456  0.636298269 -0.834224278 -1.982550039  0.348465766
 [86] -0.251342618 -1.395120099  0.697276901 -0.239017895  0.975299492
 [91] -0.636824436  0.749201488  1.468877105  0.787074329  0.126663517
 [96]  0.158805815  0.946721350 -0.458066899 -0.995343901  0.795931077
> colMin(tmp)
  [1] -0.019459868  1.023747947 -1.474469653 -0.592806235  0.661148119
  [6] -2.658037162  1.368305058  0.028617791 -0.353381581  0.401449764
 [11] -1.316779092  0.081637313  0.130253902  0.664799438  0.904112807
 [16]  0.957420535 -0.993174403 -0.451686419 -0.270070255 -0.036948878
 [21]  0.826499679  1.112939557  0.372650371 -1.104355901  1.015736337
 [26]  1.700978622  0.463760074 -0.751543816 -1.240495520  0.785982390
 [31] -0.764937273 -1.436500065  0.012237821  0.095551262  0.225314403
 [36] -0.501217479 -0.982943078  0.898282432 -0.538458952  0.537946146
 [41] -0.566502396 -0.889658065  0.810248328  2.002767715  1.245934815
 [46]  1.666838965 -2.247218132 -1.082250444 -0.457718514  0.166641731
 [51] -1.319190488 -0.588030771  0.752192862 -1.399325953 -1.999813384
 [56]  0.167937433 -0.272410600 -0.456087788 -0.511162961 -1.237998122
 [61] -0.536697068 -0.354195352 -1.652763387  0.254277619 -0.078560119
 [66] -0.483645180  0.624555480  1.520440036  0.973779398  0.650780528
 [71]  0.972950214 -1.498885209  0.196523444  1.123031785  1.052139308
 [76] -1.438849994 -0.343207995  1.391023626  0.491289638 -0.002319196
 [81]  0.131201456  0.636298269 -0.834224278 -1.982550039  0.348465766
 [86] -0.251342618 -1.395120099  0.697276901 -0.239017895  0.975299492
 [91] -0.636824436  0.749201488  1.468877105  0.787074329  0.126663517
 [96]  0.158805815  0.946721350 -0.458066899 -0.995343901  0.795931077
> colMedians(tmp)
  [1] -0.019459868  1.023747947 -1.474469653 -0.592806235  0.661148119
  [6] -2.658037162  1.368305058  0.028617791 -0.353381581  0.401449764
 [11] -1.316779092  0.081637313  0.130253902  0.664799438  0.904112807
 [16]  0.957420535 -0.993174403 -0.451686419 -0.270070255 -0.036948878
 [21]  0.826499679  1.112939557  0.372650371 -1.104355901  1.015736337
 [26]  1.700978622  0.463760074 -0.751543816 -1.240495520  0.785982390
 [31] -0.764937273 -1.436500065  0.012237821  0.095551262  0.225314403
 [36] -0.501217479 -0.982943078  0.898282432 -0.538458952  0.537946146
 [41] -0.566502396 -0.889658065  0.810248328  2.002767715  1.245934815
 [46]  1.666838965 -2.247218132 -1.082250444 -0.457718514  0.166641731
 [51] -1.319190488 -0.588030771  0.752192862 -1.399325953 -1.999813384
 [56]  0.167937433 -0.272410600 -0.456087788 -0.511162961 -1.237998122
 [61] -0.536697068 -0.354195352 -1.652763387  0.254277619 -0.078560119
 [66] -0.483645180  0.624555480  1.520440036  0.973779398  0.650780528
 [71]  0.972950214 -1.498885209  0.196523444  1.123031785  1.052139308
 [76] -1.438849994 -0.343207995  1.391023626  0.491289638 -0.002319196
 [81]  0.131201456  0.636298269 -0.834224278 -1.982550039  0.348465766
 [86] -0.251342618 -1.395120099  0.697276901 -0.239017895  0.975299492
 [91] -0.636824436  0.749201488  1.468877105  0.787074329  0.126663517
 [96]  0.158805815  0.946721350 -0.458066899 -0.995343901  0.795931077
> colRanges(tmp)
            [,1]     [,2]     [,3]       [,4]      [,5]      [,6]     [,7]
[1,] -0.01945987 1.023748 -1.47447 -0.5928062 0.6611481 -2.658037 1.368305
[2,] -0.01945987 1.023748 -1.47447 -0.5928062 0.6611481 -2.658037 1.368305
           [,8]       [,9]     [,10]     [,11]      [,12]     [,13]     [,14]
[1,] 0.02861779 -0.3533816 0.4014498 -1.316779 0.08163731 0.1302539 0.6647994
[2,] 0.02861779 -0.3533816 0.4014498 -1.316779 0.08163731 0.1302539 0.6647994
         [,15]     [,16]      [,17]      [,18]      [,19]       [,20]     [,21]
[1,] 0.9041128 0.9574205 -0.9931744 -0.4516864 -0.2700703 -0.03694888 0.8264997
[2,] 0.9041128 0.9574205 -0.9931744 -0.4516864 -0.2700703 -0.03694888 0.8264997
       [,22]     [,23]     [,24]    [,25]    [,26]     [,27]      [,28]
[1,] 1.11294 0.3726504 -1.104356 1.015736 1.700979 0.4637601 -0.7515438
[2,] 1.11294 0.3726504 -1.104356 1.015736 1.700979 0.4637601 -0.7515438
         [,29]     [,30]      [,31]   [,32]      [,33]      [,34]     [,35]
[1,] -1.240496 0.7859824 -0.7649373 -1.4365 0.01223782 0.09555126 0.2253144
[2,] -1.240496 0.7859824 -0.7649373 -1.4365 0.01223782 0.09555126 0.2253144
          [,36]      [,37]     [,38]     [,39]     [,40]      [,41]      [,42]
[1,] -0.5012175 -0.9829431 0.8982824 -0.538459 0.5379461 -0.5665024 -0.8896581
[2,] -0.5012175 -0.9829431 0.8982824 -0.538459 0.5379461 -0.5665024 -0.8896581
         [,43]    [,44]    [,45]    [,46]     [,47]    [,48]      [,49]
[1,] 0.8102483 2.002768 1.245935 1.666839 -2.247218 -1.08225 -0.4577185
[2,] 0.8102483 2.002768 1.245935 1.666839 -2.247218 -1.08225 -0.4577185
         [,50]    [,51]      [,52]     [,53]     [,54]     [,55]     [,56]
[1,] 0.1666417 -1.31919 -0.5880308 0.7521929 -1.399326 -1.999813 0.1679374
[2,] 0.1666417 -1.31919 -0.5880308 0.7521929 -1.399326 -1.999813 0.1679374
          [,57]      [,58]     [,59]     [,60]      [,61]      [,62]     [,63]
[1,] -0.2724106 -0.4560878 -0.511163 -1.237998 -0.5366971 -0.3541954 -1.652763
[2,] -0.2724106 -0.4560878 -0.511163 -1.237998 -0.5366971 -0.3541954 -1.652763
         [,64]       [,65]      [,66]     [,67]   [,68]     [,69]     [,70]
[1,] 0.2542776 -0.07856012 -0.4836452 0.6245555 1.52044 0.9737794 0.6507805
[2,] 0.2542776 -0.07856012 -0.4836452 0.6245555 1.52044 0.9737794 0.6507805
         [,71]     [,72]     [,73]    [,74]    [,75]    [,76]     [,77]
[1,] 0.9729502 -1.498885 0.1965234 1.123032 1.052139 -1.43885 -0.343208
[2,] 0.9729502 -1.498885 0.1965234 1.123032 1.052139 -1.43885 -0.343208
        [,78]     [,79]        [,80]     [,81]     [,82]      [,83]    [,84]
[1,] 1.391024 0.4912896 -0.002319196 0.1312015 0.6362983 -0.8342243 -1.98255
[2,] 1.391024 0.4912896 -0.002319196 0.1312015 0.6362983 -0.8342243 -1.98255
         [,85]      [,86]    [,87]     [,88]      [,89]     [,90]      [,91]
[1,] 0.3484658 -0.2513426 -1.39512 0.6972769 -0.2390179 0.9752995 -0.6368244
[2,] 0.3484658 -0.2513426 -1.39512 0.6972769 -0.2390179 0.9752995 -0.6368244
         [,92]    [,93]     [,94]     [,95]     [,96]     [,97]      [,98]
[1,] 0.7492015 1.468877 0.7870743 0.1266635 0.1588058 0.9467214 -0.4580669
[2,] 0.7492015 1.468877 0.7870743 0.1266635 0.1588058 0.9467214 -0.4580669
          [,99]    [,100]
[1,] -0.9953439 0.7959311
[2,] -0.9953439 0.7959311
> 
> 
> Max(tmp2)
[1] 2.8756
> Min(tmp2)
[1] -1.85314
> mean(tmp2)
[1] 0.05733556
> Sum(tmp2)
[1] 5.733556
> Var(tmp2)
[1] 1.022356
> 
> rowMeans(tmp2)
  [1]  1.0233989703 -0.7211767544 -0.5893030863 -0.8452676480  1.0890747391
  [6] -0.7965843955  2.0554534035  0.0002967327  1.2985470745  0.1521850149
 [11]  0.1405296560 -1.4287105654  1.3184311880 -0.9215512072 -1.3150008423
 [16]  1.2177114608  0.3828978227 -1.1060724765 -1.0171348331  0.7749540930
 [21] -1.7267763031 -1.0372769373 -0.5500523973  1.2360556566  0.7050232919
 [26]  1.1009311141  0.5191036653 -0.3370776531  0.2185710766 -0.1652730547
 [31]  0.8615673708  0.0085184456 -1.7496051052  0.9013110769  0.2380655601
 [36]  0.8921130444 -0.5164987566 -1.4797185017  2.4919654321  2.1104102851
 [41] -0.3547821820 -0.6411779903 -0.1579691250  1.4585860337 -1.6324208021
 [46]  1.2891898590  1.1325511750  1.1575119871 -0.1852217523 -0.9553734799
 [51] -0.6917875531 -0.9985780395 -0.4752967264  1.4550688794  0.9833070565
 [56] -0.8065497090  0.5065836729  0.6717559238 -1.8531401658 -0.0261160677
 [61] -0.0456421272  2.8755998982  1.2926700059  0.2281781415 -1.0749597968
 [66]  0.7446730660  1.0752352240 -0.2222544983 -0.5043494822  0.6431137220
 [71] -0.5633237933 -0.5348459660  0.4535070356  0.4018781835 -0.7414919109
 [76] -1.3936813981  0.9227889004  0.5305066865  1.0004863740 -0.7692152003
 [81] -0.5620559897 -1.2335144472 -0.7995374145 -1.7532311769  0.0122821365
 [86]  0.3266659391 -0.1109496007 -0.4450525991 -0.3619597901  1.1975108845
 [91] -0.2074292658 -0.8560492799 -1.1641802694 -0.4072568182  0.7084548076
 [96] -0.1790822084  1.5510291381  0.0903224469  0.9629021170  0.3356373798
> rowSums(tmp2)
  [1]  1.0233989703 -0.7211767544 -0.5893030863 -0.8452676480  1.0890747391
  [6] -0.7965843955  2.0554534035  0.0002967327  1.2985470745  0.1521850149
 [11]  0.1405296560 -1.4287105654  1.3184311880 -0.9215512072 -1.3150008423
 [16]  1.2177114608  0.3828978227 -1.1060724765 -1.0171348331  0.7749540930
 [21] -1.7267763031 -1.0372769373 -0.5500523973  1.2360556566  0.7050232919
 [26]  1.1009311141  0.5191036653 -0.3370776531  0.2185710766 -0.1652730547
 [31]  0.8615673708  0.0085184456 -1.7496051052  0.9013110769  0.2380655601
 [36]  0.8921130444 -0.5164987566 -1.4797185017  2.4919654321  2.1104102851
 [41] -0.3547821820 -0.6411779903 -0.1579691250  1.4585860337 -1.6324208021
 [46]  1.2891898590  1.1325511750  1.1575119871 -0.1852217523 -0.9553734799
 [51] -0.6917875531 -0.9985780395 -0.4752967264  1.4550688794  0.9833070565
 [56] -0.8065497090  0.5065836729  0.6717559238 -1.8531401658 -0.0261160677
 [61] -0.0456421272  2.8755998982  1.2926700059  0.2281781415 -1.0749597968
 [66]  0.7446730660  1.0752352240 -0.2222544983 -0.5043494822  0.6431137220
 [71] -0.5633237933 -0.5348459660  0.4535070356  0.4018781835 -0.7414919109
 [76] -1.3936813981  0.9227889004  0.5305066865  1.0004863740 -0.7692152003
 [81] -0.5620559897 -1.2335144472 -0.7995374145 -1.7532311769  0.0122821365
 [86]  0.3266659391 -0.1109496007 -0.4450525991 -0.3619597901  1.1975108845
 [91] -0.2074292658 -0.8560492799 -1.1641802694 -0.4072568182  0.7084548076
 [96] -0.1790822084  1.5510291381  0.0903224469  0.9629021170  0.3356373798
> 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]  1.0233989703 -0.7211767544 -0.5893030863 -0.8452676480  1.0890747391
  [6] -0.7965843955  2.0554534035  0.0002967327  1.2985470745  0.1521850149
 [11]  0.1405296560 -1.4287105654  1.3184311880 -0.9215512072 -1.3150008423
 [16]  1.2177114608  0.3828978227 -1.1060724765 -1.0171348331  0.7749540930
 [21] -1.7267763031 -1.0372769373 -0.5500523973  1.2360556566  0.7050232919
 [26]  1.1009311141  0.5191036653 -0.3370776531  0.2185710766 -0.1652730547
 [31]  0.8615673708  0.0085184456 -1.7496051052  0.9013110769  0.2380655601
 [36]  0.8921130444 -0.5164987566 -1.4797185017  2.4919654321  2.1104102851
 [41] -0.3547821820 -0.6411779903 -0.1579691250  1.4585860337 -1.6324208021
 [46]  1.2891898590  1.1325511750  1.1575119871 -0.1852217523 -0.9553734799
 [51] -0.6917875531 -0.9985780395 -0.4752967264  1.4550688794  0.9833070565
 [56] -0.8065497090  0.5065836729  0.6717559238 -1.8531401658 -0.0261160677
 [61] -0.0456421272  2.8755998982  1.2926700059  0.2281781415 -1.0749597968
 [66]  0.7446730660  1.0752352240 -0.2222544983 -0.5043494822  0.6431137220
 [71] -0.5633237933 -0.5348459660  0.4535070356  0.4018781835 -0.7414919109
 [76] -1.3936813981  0.9227889004  0.5305066865  1.0004863740 -0.7692152003
 [81] -0.5620559897 -1.2335144472 -0.7995374145 -1.7532311769  0.0122821365
 [86]  0.3266659391 -0.1109496007 -0.4450525991 -0.3619597901  1.1975108845
 [91] -0.2074292658 -0.8560492799 -1.1641802694 -0.4072568182  0.7084548076
 [96] -0.1790822084  1.5510291381  0.0903224469  0.9629021170  0.3356373798
> rowMin(tmp2)
  [1]  1.0233989703 -0.7211767544 -0.5893030863 -0.8452676480  1.0890747391
  [6] -0.7965843955  2.0554534035  0.0002967327  1.2985470745  0.1521850149
 [11]  0.1405296560 -1.4287105654  1.3184311880 -0.9215512072 -1.3150008423
 [16]  1.2177114608  0.3828978227 -1.1060724765 -1.0171348331  0.7749540930
 [21] -1.7267763031 -1.0372769373 -0.5500523973  1.2360556566  0.7050232919
 [26]  1.1009311141  0.5191036653 -0.3370776531  0.2185710766 -0.1652730547
 [31]  0.8615673708  0.0085184456 -1.7496051052  0.9013110769  0.2380655601
 [36]  0.8921130444 -0.5164987566 -1.4797185017  2.4919654321  2.1104102851
 [41] -0.3547821820 -0.6411779903 -0.1579691250  1.4585860337 -1.6324208021
 [46]  1.2891898590  1.1325511750  1.1575119871 -0.1852217523 -0.9553734799
 [51] -0.6917875531 -0.9985780395 -0.4752967264  1.4550688794  0.9833070565
 [56] -0.8065497090  0.5065836729  0.6717559238 -1.8531401658 -0.0261160677
 [61] -0.0456421272  2.8755998982  1.2926700059  0.2281781415 -1.0749597968
 [66]  0.7446730660  1.0752352240 -0.2222544983 -0.5043494822  0.6431137220
 [71] -0.5633237933 -0.5348459660  0.4535070356  0.4018781835 -0.7414919109
 [76] -1.3936813981  0.9227889004  0.5305066865  1.0004863740 -0.7692152003
 [81] -0.5620559897 -1.2335144472 -0.7995374145 -1.7532311769  0.0122821365
 [86]  0.3266659391 -0.1109496007 -0.4450525991 -0.3619597901  1.1975108845
 [91] -0.2074292658 -0.8560492799 -1.1641802694 -0.4072568182  0.7084548076
 [96] -0.1790822084  1.5510291381  0.0903224469  0.9629021170  0.3356373798
> 
> colMeans(tmp2)
[1] 0.05733556
> colSums(tmp2)
[1] 5.733556
> colVars(tmp2)
[1] 1.022356
> colSd(tmp2)
[1] 1.011116
> colMax(tmp2)
[1] 2.8756
> colMin(tmp2)
[1] -1.85314
> colMedians(tmp2)
[1] -0.01290967
> colRanges(tmp2)
         [,1]
[1,] -1.85314
[2,]  2.87560
> 
> 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] -1.45373330 -2.82716227  1.10424155 -1.79671169 -5.62647471 -1.30271959
 [7] -1.91954925 -3.24839307  0.07668564 -2.77129619
> colApply(tmp,quantile)[,1]
            [,1]
[1,] -1.24692800
[2,] -0.70937544
[3,] -0.04675953
[4,]  0.42992032
[5,]  0.99826477
> 
> rowApply(tmp,sum)
 [1] -4.0040458 -0.8170989 -7.8838142 -3.9433660  1.6029936  5.3332095
 [7] -0.4892299 -3.1735414 -3.8320418 -2.5581781
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    9    5    9    8    4    4    2    7   10     2
 [2,]    5    3    1    3    7   10   10    4    4     4
 [3,]   10   10    3    9    3    5    4    3    3     1
 [4,]    3    4    8    4    6    3    7    5    9     9
 [5,]    1    7    2    1    2    9    3    9    2     7
 [6,]    4    8    4    2    5    7    5    6    7    10
 [7,]    2    9    7    6    1    6    9    8    6     6
 [8,]    8    2    6    7    9    8    1    2    1     8
 [9,]    7    6    5   10    8    1    6   10    5     5
[10,]    6    1   10    5   10    2    8    1    8     3
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1] -1.4803779  1.6123104  0.5878905  0.5010636  1.8275012  2.1566984
 [7]  2.0965101 -3.5873329 -1.6624071  0.8084322 -0.5009773  1.1641506
[13]  4.0169822  1.4554592 -1.6970905 -3.8788739 -1.9151179  1.5399134
[19]  2.5651810 -1.5010022
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.3335060
[2,] -1.0669501
[3,] -0.9677177
[4,] -0.4259324
[5,]  2.3137283
> 
> rowApply(tmp,sum)
[1]   2.730699   1.654363   4.880160   7.088913 -12.245223
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]    1    4   20    2   11
[2,]    7   13   10   20   10
[3,]   16    9    6   11    8
[4,]   15   19    2   10    3
[5,]   17    8   13   13   15
> 
> 
> as.matrix(tmp)
           [,1]       [,2]         [,3]       [,4]       [,5]       [,6]
[1,] -1.3335060 -0.3902310  0.935897830  0.9189882  1.0076044  1.2961340
[2,] -0.9677177  0.3118551 -0.009907901  1.7469159 -0.1896339 -0.8526853
[3,]  2.3137283  0.2744479  0.029074666 -1.1652127  0.4785961  2.0871126
[4,] -1.0669501  1.8544764  0.614251573  0.6116403  0.6841975  0.8808402
[5,] -0.4259324 -0.4382379 -0.981425646 -1.6112682 -0.1532629 -1.2547030
           [,7]       [,8]       [,9]      [,10]      [,11]      [,12]
[1,] -0.2528700 -0.2746407 -0.4732536 -0.1867432 -0.7089180  0.4600127
[2,]  0.2448971 -0.7880812  0.1889333  1.3147750  1.0135582  2.3018698
[3,]  0.5178315 -2.8252059 -0.9873419  0.6506491  0.8530472  0.1771270
[4,]  1.1267327  0.6995673 -0.6793794  0.6341789  0.2437383  0.3672017
[5,]  0.4599189 -0.3989725  0.2886345 -1.6044276 -1.9024030 -2.1420606
           [,13]      [,14]      [,15]      [,16]      [,17]      [,18]
[1,]  1.04307771  1.7569071  0.3223304 -0.3161859 -0.7443750 -0.5501252
[2,]  0.31500577 -1.2110016 -1.9053177 -1.4196146  0.2674517  1.4034526
[3,] -0.09409007 -0.9112552  0.1109987  0.4556299  0.2353796  1.1698480
[4,]  1.59630557  1.1536997 -0.3374121 -2.3455623 -0.1665993  0.2030236
[5,]  1.15668322  0.6671092  0.1123102 -0.2531410 -1.5069750 -0.6862857
          [,19]      [,20]
[1,]  0.8424485 -0.6218528
[2,]  0.3697847 -0.4801761
[3,]  1.2163565  0.2934389
[4,]  1.3163272 -0.3013649
[5,] -1.1797359 -0.3910474
> 
> 
> is.BufferedMatrix(tmp)
[1] TRUE
> 
> as.BufferedMatrix(as.matrix(tmp))
BufferedMatrix object
Matrix size:  5 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  800  bytes.
> 
> 
> 
> subBufferedMatrix(tmp,1:5,1:5)
BufferedMatrix object
Matrix size:  5 5 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  654  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  565  bytes.
Disk usage :  160  bytes.
> subBufferedMatrix(tmp,1:3,)
BufferedMatrix object
Matrix size:  3 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  480  bytes.
> 
> 
> rm(tmp)
> 
> 
> ###
> ### Testing colnames and rownames
> ###
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> 
> 
> colnames(tmp)
NULL
> rownames(tmp)
NULL
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> colnames(tmp)
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"
> rownames(tmp)
[1] "row1" "row2" "row3" "row4" "row5"
> 
> 
> tmp["row1",]
           col1     col2        col3      col4       col5      col6      col7
row1 -0.4271471 0.666601 -0.09174821 -1.412937 -0.6394119 0.8743176 -1.770069
          col8      col9      col10    col11      col12     col13     col14
row1 -1.087154 0.3320988 -0.5682606 0.818659 -0.6955655 -0.723738 -1.286685
         col15     col16      col17     col18     col19      col20
row1 0.7570868 0.9331613 -0.6526417 0.4797415 0.6279209 -0.2628688
> tmp[,"col10"]
          col10
row1 -0.5682606
row2  1.4521836
row3  1.1424689
row4  0.0669676
row5  1.5060472
> tmp[c("row1","row5"),]
           col1     col2        col3         col4       col5       col6
row1 -0.4271471 0.666601 -0.09174821 -1.412937391 -0.6394119  0.8743176
row5  0.6539301 0.360425 -2.34813766 -0.003850589 -0.1908156 -0.6329590
          col7       col8       col9      col10     col11      col12     col13
row1 -1.770069 -1.0871541  0.3320988 -0.5682606 0.8186590 -0.6955655 -0.723738
row5 -2.013146  0.2557361 -1.3933314  1.5060472 0.7141065  0.4964332  2.787237
         col14      col15     col16      col17     col18      col19      col20
row1 -1.286685  0.7570868 0.9331613 -0.6526417 0.4797415  0.6279209 -0.2628688
row5 -2.108321 -0.6690901 0.9717487  0.1539149 0.2608978 -1.5665288  0.8181879
> tmp[,c("col6","col20")]
            col6      col20
row1  0.87431763 -0.2628688
row2  0.06603795 -0.3029128
row3 -1.63283067 -1.0607492
row4 -1.53185965 -0.5155318
row5 -0.63295900  0.8181879
> tmp[c("row1","row5"),c("col6","col20")]
           col6      col20
row1  0.8743176 -0.2628688
row5 -0.6329590  0.8181879
> 
> 
> 
> 
> 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 48.48618 51.01902 49.6918 49.67178 49.58227 104.6178 48.73267 48.10418
         col9    col10    col11    col12    col13    col14    col15    col16
row1 48.66039 48.48487 49.99673 50.81295 50.61871 50.91623 50.65848 49.38894
        col17    col18    col19    col20
row1 50.76438 48.74468 49.53424 104.7515
> tmp[,"col10"]
        col10
row1 48.48487
row2 29.27841
row3 30.86760
row4 26.84230
row5 50.25364
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 48.48618 51.01902 49.69180 49.67178 49.58227 104.6178 48.73267 48.10418
row5 49.67886 49.95326 51.69497 49.14961 49.43242 104.7144 50.94439 47.44661
         col9    col10    col11    col12    col13    col14    col15    col16
row1 48.66039 48.48487 49.99673 50.81295 50.61871 50.91623 50.65848 49.38894
row5 48.75525 50.25364 50.24454 50.22191 49.97388 48.33121 49.65653 50.25879
        col17    col18    col19    col20
row1 50.76438 48.74468 49.53424 104.7515
row5 49.11839 50.46491 51.33470 106.1994
> tmp[,c("col6","col20")]
          col6     col20
row1 104.61783 104.75151
row2  74.13583  76.35667
row3  75.69482  75.13523
row4  75.15449  76.82903
row5 104.71438 106.19942
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 104.6178 104.7515
row5 104.7144 106.1994
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 104.6178 104.7515
row5 104.7144 106.1994
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,]  1.5967260
[2,]  0.8361518
[3,]  0.2971169
[4,]  0.7567107
[5,] -0.2233946
> tmp[,c("col17","col7")]
          col17        col7
[1,] -0.3451985 -0.05599057
[2,]  0.2880730  1.00998228
[3,]  0.7011673 -2.10098533
[4,] -0.8669595  1.34219421
[5,] -0.6148039  1.39257601
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
            col6      col20
[1,]  0.33578155 -1.0967897
[2,] -0.03189193  0.2426719
[3,]  0.49280021  1.5709489
[4,]  0.79599729 -0.7565318
[5,]  0.34720547  0.1549710
> subBufferedMatrix(tmp,1,c("col6"))[,1]
          col1
[1,] 0.3357816
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
            col6
[1,]  0.33578155
[2,] -0.03189193
> 
> 
> 
> 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.2484054 -0.3000128 0.1939035 -0.3955608  0.2163384 -0.5206729 1.077098
row1  1.3977851  1.2081597 0.5448658  1.6926905 -0.7332755 -0.5700460 2.129062
           [,8]       [,9]     [,10]     [,11]      [,12]     [,13]       [,14]
row3  0.8970161 -2.3902067 0.8175378 0.3996053 -2.1706612  1.134730 -0.06170533
row1 -0.7581346  0.1319919 0.3840546 1.5108248  0.7675993 -1.362119  0.99554561
          [,15]      [,16]      [,17]     [,18]      [,19]      [,20]
row3  0.8093147  0.2455308  1.4000951 -1.186429  0.4599942  0.7139036
row1 -0.2409579 -1.8221318 -0.5475246  1.147654 -0.4006876 -0.9913244
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
          [,1]      [,2]      [,3]      [,4]       [,5]      [,6]      [,7]
row2 0.6449622 -1.076116 -1.144342 -1.466952 -0.6159018 0.2832767 -1.318974
           [,8]      [,9]     [,10]
row2 -0.6710258 0.3625889 0.6184548
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
         [,1]      [,2]      [,3]       [,4]      [,5]        [,6]       [,7]
row5 1.010146 -2.044415 0.2295256 -0.1207025 0.6842258 -0.08194824 -0.2247674
           [,8]      [,9]     [,10]      [,11]       [,12]     [,13]     [,14]
row5 -0.3122457 0.4380444 0.3187857 -0.9110816 -0.02833821 0.3451321 0.2813706
        [,15]    [,16]     [,17]     [,18]    [,19]     [,20]
row5 1.834422 2.205164 -1.054948 0.9134743 -0.61443 0.1765458
> 
> 
> 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: 0x60f641d9d130>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb315ec68033"
 [2] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb314fc201fd"
 [3] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb3130a5a233"
 [4] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb317d3b8365"
 [5] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb3152ea3bdd"
 [6] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb317eca00"  
 [7] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb3128486a17"
 [8] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb31467ef8cd"
 [9] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb312708d6d5"
[10] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb31368bf51f"
[11] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb311bc83b53"
[12] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb3151b56334"
[13] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb3141914070"
[14] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb3152bd54a5"
[15] "/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests/BM1cbb317a9ea1b6"
> 
> 
> ### 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: 0x60f63f99c8e0>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x60f63f99c8e0>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.24-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x60f63f99c8e0>
> rowMedians(tmp)
  [1]  0.183488574  0.469926590 -0.234087933  0.086330088  0.242675739
  [6] -0.506046238  0.198898701  0.066881757 -0.056871640  0.169611949
 [11]  0.717432346 -0.196424494 -0.140318530 -0.486587292 -0.212633924
 [16]  0.037976509  0.046734075  0.183570981  0.175563916 -0.066856793
 [21] -0.256879308 -0.061086349  0.157629417 -0.244852938  0.012475932
 [26] -0.159379458  0.643269183  0.220353016  0.188545956 -0.204989533
 [31]  0.224493876 -0.171351114  0.010057629 -0.291935663 -0.025940403
 [36] -0.150729508 -0.457219148  0.255345869 -0.339409023  0.172490193
 [41] -0.127074079  0.217126051  0.281867973  0.613006974  0.336770002
 [46]  0.111097909  0.316958214 -0.008049912 -0.298898438 -0.676343642
 [51]  0.652281867 -0.298874191  0.012251716  0.612528639 -0.205531096
 [56]  0.243814535  0.103274144 -0.108594273  0.495695840 -0.111640819
 [61] -0.588198526  0.297380991  0.156735436  0.029752045 -0.341925853
 [66] -0.067930236 -0.248078256 -0.237769589 -0.001773492  0.043633352
 [71] -0.121533676 -0.140954735 -0.190492513 -0.334818575 -0.350225605
 [76] -0.200017720  0.003937011  0.458620242 -0.074225657 -0.166120684
 [81] -0.269301732 -0.198986836  0.128669934 -0.591285970  0.224537780
 [86] -0.184663298  0.007239989  0.406103656  0.297109088 -0.150409546
 [91]  0.211274634 -0.171089213 -0.022792383  0.253575447 -0.341654165
 [96] -0.181009747 -0.176206413  0.506170119  0.084838101 -0.475678809
[101] -0.292694017  0.073820209 -0.444408919  0.227029725 -0.154701504
[106]  0.022912407  0.144876565  0.315445407  0.805103584  0.079553505
[111] -0.249327438  0.400977128  0.567388189  0.015605203 -0.260719659
[116] -0.632262876 -0.116553814 -0.753755359  0.237228848  0.469645807
[121] -0.398734522  0.305007604  0.157922489 -0.235493735  0.038027302
[126]  0.053520330  0.383987520 -0.322061709  0.385001397  0.027682402
[131]  0.156117663 -0.504219707 -0.202811656 -0.056494909  0.384669911
[136]  0.199253140 -0.053941343 -0.680386351  0.444941078 -0.124923140
[141]  0.167428187 -0.544127015  0.001047077  0.412074875 -0.173417992
[146] -0.875220122  0.275995203 -0.672270382 -0.189707499  0.297941763
[151]  0.005187924 -0.106830405 -0.127567870 -0.595919088 -0.551377260
[156]  0.238407587 -0.144580969 -0.217966878 -0.371553468  0.036598742
[161] -0.043492247  0.443189539 -0.160590544 -0.044412983  0.030898529
[166]  0.204306202 -0.538810483 -0.278816953 -0.317833441 -0.123551111
[171] -0.476687890 -0.339525313 -0.345663851 -0.489278550 -0.405793215
[176]  0.081005466  0.202332412 -0.329078684 -0.011335316 -0.334024024
[181] -0.211598386  0.142388942  0.217185009  0.174913487  0.363664931
[186] -0.267034964 -0.507447245  0.089972071 -0.052490660 -0.466399180
[191]  0.364396395  0.043058002  0.059084406  0.438020548 -0.078360903
[196]  0.095958952 -0.015227108  0.215321146  0.022474841  0.081875756
[201] -0.597351389 -0.513713398 -0.530330194 -0.195603653 -0.280411851
[206]  0.581975002  0.537791580 -0.558706327 -0.117668660  0.023755174
[211]  0.115547416  0.314545501  0.152401760  0.177218297  0.184275782
[216]  0.154187193  0.223923117  0.236577951  0.863971232 -0.141157964
[221]  0.144842735  0.134145800  0.059206978  0.111748721 -0.773386695
[226]  0.325201904  0.551416608 -0.278394720 -0.189046136 -0.315893056
> 
> proc.time()
   user  system elapsed 
  1.249   0.700   1.939 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


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

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

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

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

> library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths());

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

<pointer: 0x642d41784520>
> .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: 0x642d41784520>
> .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: 0x642d41784520>
> .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: 0x642d41784520>
> 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: 0x642d4132df60>
> .Call("R_bm_AddColumn",P)
<pointer: 0x642d4132df60>
> .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: 0x642d4132df60>
> .Call("R_bm_AddColumn",P)
<pointer: 0x642d4132df60>
> .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: 0x642d4132df60>
> 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: 0x642d41ed7b40>
> .Call("R_bm_AddColumn",P)
<pointer: 0x642d41ed7b40>
> .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: 0x642d41ed7b40>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x642d41ed7b40>
> .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: 0x642d41ed7b40>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x642d41ed7b40>
> .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: 0x642d41ed7b40>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x642d41ed7b40>
> .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: 0x642d41ed7b40>
> 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: 0x642d41f14bc0>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x642d41f14bc0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x642d41f14bc0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x642d41f14bc0>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile1cbc773e87d4d3" "BufferedMatrixFile1cbc77540014bc"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile1cbc773e87d4d3" "BufferedMatrixFile1cbc77540014bc"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x642d41eae000>
> .Call("R_bm_AddColumn",P)
<pointer: 0x642d41eae000>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x642d41eae000>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x642d41eae000>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x642d41eae000>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x642d41eae000>
> .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: 0x642d40fe1e30>
> .Call("R_bm_AddColumn",P)
<pointer: 0x642d40fe1e30>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x642d40fe1e30>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x642d40fe1e30>
> 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: 0x642d4160ba50>
> .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: 0x642d4160ba50>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.282   0.046   0.315 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


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

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

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

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

> library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths());

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> Temp <- createBufferedMatrix(100)
> dim(Temp)
[1] 100   0
> buffer.dim(Temp)
[1] 1 1
> 
> 
> proc.time()
   user  system elapsed 
  0.250   0.049   0.285 

Example timings