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

This page was generated on 2025-11-19 10:12 -0500 (Wed, 19 Nov 2025).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo1Linux (Ubuntu 24.04.3 LTS)x86_64R Under development (unstable) (2025-10-20 r88955) -- "Unsuffered Consequences" 4827
lconwaymacOS 12.7.6 Montereyx86_64R Under development (unstable) (2025-10-21 r88958) -- "Unsuffered Consequences" 4600
kjohnson3macOS 13.7.7 Venturaarm64R Under development (unstable) (2025-11-04 r88984) -- "Unsuffered Consequences" 4564
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 251/2325HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.75.0  (landing page)
Ben Bolstad
Snapshot Date: 2025-11-18 13:40 -0500 (Tue, 18 Nov 2025)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: devel
git_last_commit: ecdbf23
git_last_commit_date: 2025-10-29 09:58:55 -0500 (Wed, 29 Oct 2025)
nebbiolo1Linux (Ubuntu 24.04.3 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
lconwaymacOS 12.7.6 Monterey / x86_64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kjohnson3macOS 13.7.7 Ventura / arm64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published


CHECK results for BufferedMatrix on nebbiolo1

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.75.0
Command: /home/biocbuild/bbs-3.23-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.23-bioc/R/site-library --timings BufferedMatrix_1.75.0.tar.gz
StartedAt: 2025-11-18 22:29:26 -0500 (Tue, 18 Nov 2025)
EndedAt: 2025-11-18 22:29:51 -0500 (Tue, 18 Nov 2025)
EllapsedTime: 25.1 seconds
RetCode: 0
Status:   OK  
CheckDir: BufferedMatrix.Rcheck
Warnings: 0

Command output

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


* using log directory ‘/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck’
* using R Under development (unstable) (2025-10-20 r88955)
* using platform: x86_64-pc-linux-gnu
* R was compiled by
    gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
    GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
* running under: Ubuntu 24.04.3 LTS
* using session charset: UTF-8
* checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK
* this is package ‘BufferedMatrix’ version ‘1.75.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) 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.23-bioc/meat/BufferedMatrix.Rcheck/00check.log’
for details.


Installation output

BufferedMatrix.Rcheck/00install.out

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


* installing to library ‘/home/biocbuild/bbs-3.23-bioc/R/site-library’
* installing *source* package ‘BufferedMatrix’ ...
** this is package ‘BufferedMatrix’ version ‘1.75.0’
** using staged installation
** libs
using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’
gcc -std=gnu2x -I"/home/biocbuild/bbs-3.23-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.23-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.23-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.23-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.23-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.23-bioc/R/lib -lR
installing to /home/biocbuild/bbs-3.23-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 Under development (unstable) (2025-10-20 r88955) -- "Unsuffered Consequences"
Copyright (C) 2025 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.245   0.057   0.290 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R Under development (unstable) (2025-10-20 r88955) -- "Unsuffered Consequences"
Copyright (C) 2025 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.23-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 478818 25.6    1048392   56   639317 34.2
Vcells 885623  6.8    8388608   64  2082728 15.9
> 
> 
> 
> 
> ##
> ## checking reads
> ##
> 
> tmp2 <- createBufferedMatrix(10,20)
> 
> test.sample <- rnorm(10*20)
> 
> tmp2[1:10,1:20] <- test.sample
> 
> test.matrix <- matrix(test.sample,10,20)
> 
> ## testing reads
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Tue Nov 18 22:29:42 2025"
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> date()
[1] "Tue Nov 18 22:29:42 2025"
> 
> 
> 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: 0x62a96f0c05e0>
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Tue Nov 18 22:29:42 2025"
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> date()
[1] "Tue Nov 18 22:29:42 2025"
> 
> ColMode(tmp2)
<pointer: 0x62a96f0c05e0>
> 
> 
> 
> ### 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,] 101.18146920  0.2108286 -0.53819658  0.7341196
[2,]  -0.04716566 -0.2743599 -0.09746091 -0.4923904
[3,]  -1.77828034  0.5017061 -0.07431666 -0.1785959
[4,]   0.33179858  2.3241418  0.85779622 -1.6916878
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
             [,1]      [,2]       [,3]      [,4]
[1,] 101.18146920 0.2108286 0.53819658 0.7341196
[2,]   0.04716566 0.2743599 0.09746091 0.4923904
[3,]   1.77828034 0.5017061 0.07431666 0.1785959
[4,]   0.33179858 2.3241418 0.85779622 1.6916878
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
           [,1]      [,2]      [,3]      [,4]
[1,] 10.0589000 0.4591608 0.7336188 0.8568078
[2,]  0.2171766 0.5237937 0.3121873 0.7017053
[3,]  1.3335218 0.7083122 0.2726108 0.4226061
[4,]  0.5760196 1.5245136 0.9261729 1.3006490
> 
> 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.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 226.77047 29.80244 32.87438 34.30220
[2,]  27.21893 30.51230 28.21933 32.50944
[3,]  40.11350 32.58483 27.80042 29.40466
[4,]  31.09199 42.56928 35.11953 39.69818
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x62a96ec4b840>
> exp(tmp5)
<pointer: 0x62a96ec4b840>
> log(tmp5,2)
<pointer: 0x62a96ec4b840>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 471.993
> Min(tmp5)
[1] 53.12249
> mean(tmp5)
[1] 72.0574
> Sum(tmp5)
[1] 14411.48
> Var(tmp5)
[1] 886.1196
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 90.19456 68.11242 68.74703 70.06051 70.99299 71.05365 69.30588 69.84941
 [9] 70.42196 71.83561
> rowSums(tmp5)
 [1] 1803.891 1362.248 1374.941 1401.210 1419.860 1421.073 1386.118 1396.988
 [9] 1408.439 1436.712
> rowVars(tmp5)
 [1] 8166.77711   67.00157   89.99357   68.20386   88.22812  122.95530
 [7]   64.99069   80.01628   96.10295   40.06117
> rowSd(tmp5)
 [1] 90.370222  8.185449  9.486494  8.258563  9.392982 11.088521  8.061680
 [8]  8.945182  9.803211  6.329390
> rowMax(tmp5)
 [1] 471.99302  84.04834  87.63375  88.60238  87.47540 100.43294  86.15765
 [8]  85.01487  87.84618  82.03190
> rowMin(tmp5)
 [1] 58.92772 55.05379 53.12249 58.24492 56.59905 56.02443 56.66802 55.73166
 [9] 55.08141 62.01865
> 
> colMeans(tmp5)
 [1] 107.20218  75.63099  65.66393  71.10834  67.78912  71.24072  66.35681
 [8]  74.66289  70.56120  69.11523  67.08727  71.42252  68.37516  67.28390
[15]  72.10575  68.88114  71.94449  70.88140  74.77953  69.05550
> colSums(tmp5)
 [1] 1072.0218  756.3099  656.6393  711.0834  677.8912  712.4072  663.5681
 [8]  746.6289  705.6120  691.1523  670.8727  714.2252  683.7516  672.8390
[15]  721.0575  688.8114  719.4449  708.8140  747.7953  690.5550
> colVars(tmp5)
 [1] 16480.62064   101.76154    31.97926   167.63816   103.62856    58.87496
 [7]    39.31974    56.56274    64.45135    39.22097    88.06797    76.32976
[13]    65.18266    82.75473   115.99291   127.97855   107.90472   106.04453
[19]    42.08781    27.65742
> colSd(tmp5)
 [1] 128.376870  10.087693   5.655020  12.947516  10.179811   7.673002
 [7]   6.270546   7.520821   8.028160   6.262665   9.384454   8.736690
[13]   8.073578   9.096962  10.770000  11.312761  10.387720  10.297793
[19]   6.487512   5.259033
> colMax(tmp5)
 [1] 471.99302  88.60238  73.09669 100.43294  87.63375  82.03190  75.86513
 [8]  84.04834  85.80848  77.65834  80.68329  86.40386  79.43548  79.71116
[15]  87.84618  91.80661  87.47540  85.85232  84.35098  77.14512
> colMin(tmp5)
 [1] 56.65264 62.02987 57.86294 58.77090 56.65102 58.24492 56.59905 59.62160
 [9] 60.28000 60.96369 55.08141 60.84763 53.12249 55.73166 57.23571 55.05379
[17] 56.02443 58.32085 63.58609 59.13575
> 
> 
> ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default)
> 
> 
> which.row <- sample(1:10,1,replace=TRUE)
> which.col  <- sample(1:20,1,replace=TRUE)
> 
> tmp5[which.row,which.col] <- NA
> 
> Max(tmp5)
[1] NA
> Min(tmp5)
[1] NA
> mean(tmp5)
[1] NA
> Sum(tmp5)
[1] NA
> Var(tmp5)
[1] NA
> 
> rowMeans(tmp5)
 [1]       NA 68.11242 68.74703 70.06051 70.99299 71.05365 69.30588 69.84941
 [9] 70.42196 71.83561
> rowSums(tmp5)
 [1]       NA 1362.248 1374.941 1401.210 1419.860 1421.073 1386.118 1396.988
 [9] 1408.439 1436.712
> rowVars(tmp5)
 [1] 8600.39247   67.00157   89.99357   68.20386   88.22812  122.95530
 [7]   64.99069   80.01628   96.10295   40.06117
> rowSd(tmp5)
 [1] 92.738301  8.185449  9.486494  8.258563  9.392982 11.088521  8.061680
 [8]  8.945182  9.803211  6.329390
> rowMax(tmp5)
 [1]        NA  84.04834  87.63375  88.60238  87.47540 100.43294  86.15765
 [8]  85.01487  87.84618  82.03190
> rowMin(tmp5)
 [1]       NA 55.05379 53.12249 58.24492 56.59905 56.02443 56.66802 55.73166
 [9] 55.08141 62.01865
> 
> colMeans(tmp5)
 [1] 107.20218  75.63099  65.66393  71.10834  67.78912  71.24072  66.35681
 [8]  74.66289  70.56120        NA  67.08727  71.42252  68.37516  67.28390
[15]  72.10575  68.88114  71.94449  70.88140  74.77953  69.05550
> colSums(tmp5)
 [1] 1072.0218  756.3099  656.6393  711.0834  677.8912  712.4072  663.5681
 [8]  746.6289  705.6120        NA  670.8727  714.2252  683.7516  672.8390
[15]  721.0575  688.8114  719.4449  708.8140  747.7953  690.5550
> colVars(tmp5)
 [1] 16480.62064   101.76154    31.97926   167.63816   103.62856    58.87496
 [7]    39.31974    56.56274    64.45135          NA    88.06797    76.32976
[13]    65.18266    82.75473   115.99291   127.97855   107.90472   106.04453
[19]    42.08781    27.65742
> colSd(tmp5)
 [1] 128.376870  10.087693   5.655020  12.947516  10.179811   7.673002
 [7]   6.270546   7.520821   8.028160         NA   9.384454   8.736690
[13]   8.073578   9.096962  10.770000  11.312761  10.387720  10.297793
[19]   6.487512   5.259033
> colMax(tmp5)
 [1] 471.99302  88.60238  73.09669 100.43294  87.63375  82.03190  75.86513
 [8]  84.04834  85.80848        NA  80.68329  86.40386  79.43548  79.71116
[15]  87.84618  91.80661  87.47540  85.85232  84.35098  77.14512
> colMin(tmp5)
 [1] 56.65264 62.02987 57.86294 58.77090 56.65102 58.24492 56.59905 59.62160
 [9] 60.28000       NA 55.08141 60.84763 53.12249 55.73166 57.23571 55.05379
[17] 56.02443 58.32085 63.58609 59.13575
> 
> Max(tmp5,na.rm=TRUE)
[1] 471.993
> Min(tmp5,na.rm=TRUE)
[1] 53.12249
> mean(tmp5,na.rm=TRUE)
[1] 72.05941
> Sum(tmp5,na.rm=TRUE)
[1] 14339.82
> Var(tmp5,na.rm=TRUE)
[1] 890.5942
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 91.17019 68.11242 68.74703 70.06051 70.99299 71.05365 69.30588 69.84941
 [9] 70.42196 71.83561
> rowSums(tmp5,na.rm=TRUE)
 [1] 1732.234 1362.248 1374.941 1401.210 1419.860 1421.073 1386.118 1396.988
 [9] 1408.439 1436.712
> rowVars(tmp5,na.rm=TRUE)
 [1] 8600.39247   67.00157   89.99357   68.20386   88.22812  122.95530
 [7]   64.99069   80.01628   96.10295   40.06117
> rowSd(tmp5,na.rm=TRUE)
 [1] 92.738301  8.185449  9.486494  8.258563  9.392982 11.088521  8.061680
 [8]  8.945182  9.803211  6.329390
> rowMax(tmp5,na.rm=TRUE)
 [1] 471.99302  84.04834  87.63375  88.60238  87.47540 100.43294  86.15765
 [8]  85.01487  87.84618  82.03190
> rowMin(tmp5,na.rm=TRUE)
 [1] 58.92772 55.05379 53.12249 58.24492 56.59905 56.02443 56.66802 55.73166
 [9] 55.08141 62.01865
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 107.20218  75.63099  65.66393  71.10834  67.78912  71.24072  66.35681
 [8]  74.66289  70.56120  68.83273  67.08727  71.42252  68.37516  67.28390
[15]  72.10575  68.88114  71.94449  70.88140  74.77953  69.05550
> colSums(tmp5,na.rm=TRUE)
 [1] 1072.0218  756.3099  656.6393  711.0834  677.8912  712.4072  663.5681
 [8]  746.6289  705.6120  619.4946  670.8727  714.2252  683.7516  672.8390
[15]  721.0575  688.8114  719.4449  708.8140  747.7953  690.5550
> colVars(tmp5,na.rm=TRUE)
 [1] 16480.62064   101.76154    31.97926   167.63816   103.62856    58.87496
 [7]    39.31974    56.56274    64.45135    43.22580    88.06797    76.32976
[13]    65.18266    82.75473   115.99291   127.97855   107.90472   106.04453
[19]    42.08781    27.65742
> colSd(tmp5,na.rm=TRUE)
 [1] 128.376870  10.087693   5.655020  12.947516  10.179811   7.673002
 [7]   6.270546   7.520821   8.028160   6.574633   9.384454   8.736690
[13]   8.073578   9.096962  10.770000  11.312761  10.387720  10.297793
[19]   6.487512   5.259033
> colMax(tmp5,na.rm=TRUE)
 [1] 471.99302  88.60238  73.09669 100.43294  87.63375  82.03190  75.86513
 [8]  84.04834  85.80848  77.65834  80.68329  86.40386  79.43548  79.71116
[15]  87.84618  91.80661  87.47540  85.85232  84.35098  77.14512
> colMin(tmp5,na.rm=TRUE)
 [1] 56.65264 62.02987 57.86294 58.77090 56.65102 58.24492 56.59905 59.62160
 [9] 60.28000 60.96369 55.08141 60.84763 53.12249 55.73166 57.23571 55.05379
[17] 56.02443 58.32085 63.58609 59.13575
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1]      NaN 68.11242 68.74703 70.06051 70.99299 71.05365 69.30588 69.84941
 [9] 70.42196 71.83561
> rowSums(tmp5,na.rm=TRUE)
 [1]    0.000 1362.248 1374.941 1401.210 1419.860 1421.073 1386.118 1396.988
 [9] 1408.439 1436.712
> rowVars(tmp5,na.rm=TRUE)
 [1]        NA  67.00157  89.99357  68.20386  88.22812 122.95530  64.99069
 [8]  80.01628  96.10295  40.06117
> rowSd(tmp5,na.rm=TRUE)
 [1]        NA  8.185449  9.486494  8.258563  9.392982 11.088521  8.061680
 [8]  8.945182  9.803211  6.329390
> rowMax(tmp5,na.rm=TRUE)
 [1]        NA  84.04834  87.63375  88.60238  87.47540 100.43294  86.15765
 [8]  85.01487  87.84618  82.03190
> rowMin(tmp5,na.rm=TRUE)
 [1]       NA 55.05379 53.12249 58.24492 56.59905 56.02443 56.66802 55.73166
 [9] 55.08141 62.01865
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 66.66987 77.14222 65.35729 71.07643 68.60804 70.83086 66.92191 76.33415
 [9] 71.17786      NaN 67.99389 70.15476 68.26531 66.47949 70.36477 69.98307
[17] 70.65147 69.25797 74.58349 70.15769
> colSums(tmp5,na.rm=TRUE)
 [1] 600.0288 694.2800 588.2156 639.6879 617.4724 637.4777 602.2972 687.0073
 [9] 640.6007   0.0000 611.9450 631.3928 614.3878 598.3154 633.2830 629.8476
[17] 635.8632 623.3217 671.2514 631.4192
> colVars(tmp5,na.rm=TRUE)
 [1]  58.42646  88.78861  34.91882 188.58147 109.03751  64.34447  40.64216
 [8]  32.21078  68.22974        NA  89.82947  67.78992  73.19473  85.81948
[15]  96.39346 130.31577 102.58396  89.65044  46.91645  17.44776
> colSd(tmp5,na.rm=TRUE)
 [1]  7.643720  9.422771  5.909215 13.732497 10.442103  8.021501  6.375120
 [8]  5.675454  8.260130        NA  9.477841  8.233464  8.555392  9.263881
[15]  9.818017 11.415593 10.128374  9.468392  6.849558  4.177051
> colMax(tmp5,na.rm=TRUE)
 [1]  83.49099  88.60238  73.09669 100.43294  87.63375  82.03190  75.86513
 [8]  84.04834  85.80848      -Inf  80.68329  86.40386  79.43548  79.71116
[15]  87.84618  91.80661  87.47540  85.85232  84.35098  77.14512
> colMin(tmp5,na.rm=TRUE)
 [1] 56.65264 63.50735 57.86294 58.77090 56.65102 58.24492 56.59905 66.56393
 [9] 60.28000      Inf 55.08141 60.84763 53.12249 55.73166 57.23571 55.05379
[17] 56.02443 58.32085 63.58609 65.97023
> 
> 
> 
> 
> 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] 183.2970 240.4390 298.1487 231.2425 276.1424 226.5305 322.9149 266.3930
 [9] 117.2337 275.2196
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 183.2970 240.4390 298.1487 231.2425 276.1424 226.5305 322.9149 266.3930
 [9] 117.2337 275.2196
> 
> 
> 
> 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] -2.842171e-14  1.136868e-13  5.684342e-14 -1.705303e-13 -8.526513e-14
 [6] -6.394885e-14 -2.842171e-14 -1.705303e-13 -1.421085e-14  8.526513e-14
[11]  2.273737e-13  5.684342e-14 -5.684342e-14  1.136868e-13 -2.557954e-13
[16] -5.684342e-14  2.842171e-14 -5.684342e-14  0.000000e+00  0.000000e+00
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## 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)
+ }
4   6 
4   1 
6   5 
7   4 
2   1 
10   8 
4   4 
6   19 
2   11 
6   12 
10   2 
3   20 
8   15 
7   16 
10   20 
3   13 
6   5 
5   17 
2   11 
2   8 
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.803325
> Min(tmp)
[1] -1.937776
> mean(tmp)
[1] -0.02098428
> Sum(tmp)
[1] -2.098428
> Var(tmp)
[1] 0.8909885
> 
> rowMeans(tmp)
[1] -0.02098428
> rowSums(tmp)
[1] -2.098428
> rowVars(tmp)
[1] 0.8909885
> rowSd(tmp)
[1] 0.9439219
> rowMax(tmp)
[1] 2.803325
> rowMin(tmp)
[1] -1.937776
> 
> colMeans(tmp)
  [1] -0.674083202 -1.163458073  0.101657517 -1.334924340 -0.420500720
  [6]  0.324744327 -1.458918858  0.302172680  0.266336661 -1.846380509
 [11]  0.609735062 -0.330315867 -1.091252211 -0.853486442 -0.087925589
 [16]  0.918683981 -0.844353694  0.687425683 -0.105403242  0.650530577
 [21]  2.803324649 -0.877984402  0.386680861 -0.011295217  0.793299708
 [26] -1.222337918 -0.532702846  0.489036920  0.142413674 -0.045275217
 [31]  1.054040523  0.449719020  0.446987543  0.269233969 -1.327139921
 [36]  1.163060298 -0.820230874  0.367609060 -1.547265479 -1.700227218
 [41]  1.958859560  0.357884294 -1.127348461  1.711694051 -0.489907920
 [46]  0.506295260 -0.647072988 -0.078884351  0.861226724 -0.883100240
 [51] -1.169959929 -0.263009165 -1.900214732 -0.105753643  0.168382111
 [56]  1.854345019 -0.729854670 -1.318217301  0.197938022  0.171867623
 [61]  0.082047659  0.197570863 -0.014168886  0.067683676 -1.937775706
 [66] -1.156629710 -0.870787194  0.709681798  0.351778798 -0.366870894
 [71] -1.170606021  0.975731569 -0.040516362 -1.004397392  1.947171227
 [76]  0.715469852  1.541417972  1.100072513 -0.633552447 -0.024471649
 [81] -0.265151866 -0.008963047 -0.341603983  0.151346262 -0.340635550
 [86]  1.801738144  1.345444307  0.407288947 -0.308889967 -0.153461789
 [91]  0.568545476  0.416141630  0.223064026  0.351289024 -0.510955240
 [96] -0.311092092  0.112537841  0.949992992  1.606377540 -1.266690248
> colSums(tmp)
  [1] -0.674083202 -1.163458073  0.101657517 -1.334924340 -0.420500720
  [6]  0.324744327 -1.458918858  0.302172680  0.266336661 -1.846380509
 [11]  0.609735062 -0.330315867 -1.091252211 -0.853486442 -0.087925589
 [16]  0.918683981 -0.844353694  0.687425683 -0.105403242  0.650530577
 [21]  2.803324649 -0.877984402  0.386680861 -0.011295217  0.793299708
 [26] -1.222337918 -0.532702846  0.489036920  0.142413674 -0.045275217
 [31]  1.054040523  0.449719020  0.446987543  0.269233969 -1.327139921
 [36]  1.163060298 -0.820230874  0.367609060 -1.547265479 -1.700227218
 [41]  1.958859560  0.357884294 -1.127348461  1.711694051 -0.489907920
 [46]  0.506295260 -0.647072988 -0.078884351  0.861226724 -0.883100240
 [51] -1.169959929 -0.263009165 -1.900214732 -0.105753643  0.168382111
 [56]  1.854345019 -0.729854670 -1.318217301  0.197938022  0.171867623
 [61]  0.082047659  0.197570863 -0.014168886  0.067683676 -1.937775706
 [66] -1.156629710 -0.870787194  0.709681798  0.351778798 -0.366870894
 [71] -1.170606021  0.975731569 -0.040516362 -1.004397392  1.947171227
 [76]  0.715469852  1.541417972  1.100072513 -0.633552447 -0.024471649
 [81] -0.265151866 -0.008963047 -0.341603983  0.151346262 -0.340635550
 [86]  1.801738144  1.345444307  0.407288947 -0.308889967 -0.153461789
 [91]  0.568545476  0.416141630  0.223064026  0.351289024 -0.510955240
 [96] -0.311092092  0.112537841  0.949992992  1.606377540 -1.266690248
> 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.674083202 -1.163458073  0.101657517 -1.334924340 -0.420500720
  [6]  0.324744327 -1.458918858  0.302172680  0.266336661 -1.846380509
 [11]  0.609735062 -0.330315867 -1.091252211 -0.853486442 -0.087925589
 [16]  0.918683981 -0.844353694  0.687425683 -0.105403242  0.650530577
 [21]  2.803324649 -0.877984402  0.386680861 -0.011295217  0.793299708
 [26] -1.222337918 -0.532702846  0.489036920  0.142413674 -0.045275217
 [31]  1.054040523  0.449719020  0.446987543  0.269233969 -1.327139921
 [36]  1.163060298 -0.820230874  0.367609060 -1.547265479 -1.700227218
 [41]  1.958859560  0.357884294 -1.127348461  1.711694051 -0.489907920
 [46]  0.506295260 -0.647072988 -0.078884351  0.861226724 -0.883100240
 [51] -1.169959929 -0.263009165 -1.900214732 -0.105753643  0.168382111
 [56]  1.854345019 -0.729854670 -1.318217301  0.197938022  0.171867623
 [61]  0.082047659  0.197570863 -0.014168886  0.067683676 -1.937775706
 [66] -1.156629710 -0.870787194  0.709681798  0.351778798 -0.366870894
 [71] -1.170606021  0.975731569 -0.040516362 -1.004397392  1.947171227
 [76]  0.715469852  1.541417972  1.100072513 -0.633552447 -0.024471649
 [81] -0.265151866 -0.008963047 -0.341603983  0.151346262 -0.340635550
 [86]  1.801738144  1.345444307  0.407288947 -0.308889967 -0.153461789
 [91]  0.568545476  0.416141630  0.223064026  0.351289024 -0.510955240
 [96] -0.311092092  0.112537841  0.949992992  1.606377540 -1.266690248
> colMin(tmp)
  [1] -0.674083202 -1.163458073  0.101657517 -1.334924340 -0.420500720
  [6]  0.324744327 -1.458918858  0.302172680  0.266336661 -1.846380509
 [11]  0.609735062 -0.330315867 -1.091252211 -0.853486442 -0.087925589
 [16]  0.918683981 -0.844353694  0.687425683 -0.105403242  0.650530577
 [21]  2.803324649 -0.877984402  0.386680861 -0.011295217  0.793299708
 [26] -1.222337918 -0.532702846  0.489036920  0.142413674 -0.045275217
 [31]  1.054040523  0.449719020  0.446987543  0.269233969 -1.327139921
 [36]  1.163060298 -0.820230874  0.367609060 -1.547265479 -1.700227218
 [41]  1.958859560  0.357884294 -1.127348461  1.711694051 -0.489907920
 [46]  0.506295260 -0.647072988 -0.078884351  0.861226724 -0.883100240
 [51] -1.169959929 -0.263009165 -1.900214732 -0.105753643  0.168382111
 [56]  1.854345019 -0.729854670 -1.318217301  0.197938022  0.171867623
 [61]  0.082047659  0.197570863 -0.014168886  0.067683676 -1.937775706
 [66] -1.156629710 -0.870787194  0.709681798  0.351778798 -0.366870894
 [71] -1.170606021  0.975731569 -0.040516362 -1.004397392  1.947171227
 [76]  0.715469852  1.541417972  1.100072513 -0.633552447 -0.024471649
 [81] -0.265151866 -0.008963047 -0.341603983  0.151346262 -0.340635550
 [86]  1.801738144  1.345444307  0.407288947 -0.308889967 -0.153461789
 [91]  0.568545476  0.416141630  0.223064026  0.351289024 -0.510955240
 [96] -0.311092092  0.112537841  0.949992992  1.606377540 -1.266690248
> colMedians(tmp)
  [1] -0.674083202 -1.163458073  0.101657517 -1.334924340 -0.420500720
  [6]  0.324744327 -1.458918858  0.302172680  0.266336661 -1.846380509
 [11]  0.609735062 -0.330315867 -1.091252211 -0.853486442 -0.087925589
 [16]  0.918683981 -0.844353694  0.687425683 -0.105403242  0.650530577
 [21]  2.803324649 -0.877984402  0.386680861 -0.011295217  0.793299708
 [26] -1.222337918 -0.532702846  0.489036920  0.142413674 -0.045275217
 [31]  1.054040523  0.449719020  0.446987543  0.269233969 -1.327139921
 [36]  1.163060298 -0.820230874  0.367609060 -1.547265479 -1.700227218
 [41]  1.958859560  0.357884294 -1.127348461  1.711694051 -0.489907920
 [46]  0.506295260 -0.647072988 -0.078884351  0.861226724 -0.883100240
 [51] -1.169959929 -0.263009165 -1.900214732 -0.105753643  0.168382111
 [56]  1.854345019 -0.729854670 -1.318217301  0.197938022  0.171867623
 [61]  0.082047659  0.197570863 -0.014168886  0.067683676 -1.937775706
 [66] -1.156629710 -0.870787194  0.709681798  0.351778798 -0.366870894
 [71] -1.170606021  0.975731569 -0.040516362 -1.004397392  1.947171227
 [76]  0.715469852  1.541417972  1.100072513 -0.633552447 -0.024471649
 [81] -0.265151866 -0.008963047 -0.341603983  0.151346262 -0.340635550
 [86]  1.801738144  1.345444307  0.407288947 -0.308889967 -0.153461789
 [91]  0.568545476  0.416141630  0.223064026  0.351289024 -0.510955240
 [96] -0.311092092  0.112537841  0.949992992  1.606377540 -1.266690248
> colRanges(tmp)
           [,1]      [,2]      [,3]      [,4]       [,5]      [,6]      [,7]
[1,] -0.6740832 -1.163458 0.1016575 -1.334924 -0.4205007 0.3247443 -1.458919
[2,] -0.6740832 -1.163458 0.1016575 -1.334924 -0.4205007 0.3247443 -1.458919
          [,8]      [,9]     [,10]     [,11]      [,12]     [,13]      [,14]
[1,] 0.3021727 0.2663367 -1.846381 0.6097351 -0.3303159 -1.091252 -0.8534864
[2,] 0.3021727 0.2663367 -1.846381 0.6097351 -0.3303159 -1.091252 -0.8534864
           [,15]    [,16]      [,17]     [,18]      [,19]     [,20]    [,21]
[1,] -0.08792559 0.918684 -0.8443537 0.6874257 -0.1054032 0.6505306 2.803325
[2,] -0.08792559 0.918684 -0.8443537 0.6874257 -0.1054032 0.6505306 2.803325
          [,22]     [,23]       [,24]     [,25]     [,26]      [,27]     [,28]
[1,] -0.8779844 0.3866809 -0.01129522 0.7932997 -1.222338 -0.5327028 0.4890369
[2,] -0.8779844 0.3866809 -0.01129522 0.7932997 -1.222338 -0.5327028 0.4890369
         [,29]       [,30]    [,31]    [,32]     [,33]    [,34]    [,35]
[1,] 0.1424137 -0.04527522 1.054041 0.449719 0.4469875 0.269234 -1.32714
[2,] 0.1424137 -0.04527522 1.054041 0.449719 0.4469875 0.269234 -1.32714
       [,36]      [,37]     [,38]     [,39]     [,40]   [,41]     [,42]
[1,] 1.16306 -0.8202309 0.3676091 -1.547265 -1.700227 1.95886 0.3578843
[2,] 1.16306 -0.8202309 0.3676091 -1.547265 -1.700227 1.95886 0.3578843
         [,43]    [,44]      [,45]     [,46]     [,47]       [,48]     [,49]
[1,] -1.127348 1.711694 -0.4899079 0.5062953 -0.647073 -0.07888435 0.8612267
[2,] -1.127348 1.711694 -0.4899079 0.5062953 -0.647073 -0.07888435 0.8612267
          [,50]    [,51]      [,52]     [,53]      [,54]     [,55]    [,56]
[1,] -0.8831002 -1.16996 -0.2630092 -1.900215 -0.1057536 0.1683821 1.854345
[2,] -0.8831002 -1.16996 -0.2630092 -1.900215 -0.1057536 0.1683821 1.854345
          [,57]     [,58]    [,59]     [,60]      [,61]     [,62]       [,63]
[1,] -0.7298547 -1.318217 0.197938 0.1718676 0.08204766 0.1975709 -0.01416889
[2,] -0.7298547 -1.318217 0.197938 0.1718676 0.08204766 0.1975709 -0.01416889
          [,64]     [,65]    [,66]      [,67]     [,68]     [,69]      [,70]
[1,] 0.06768368 -1.937776 -1.15663 -0.8707872 0.7096818 0.3517788 -0.3668709
[2,] 0.06768368 -1.937776 -1.15663 -0.8707872 0.7096818 0.3517788 -0.3668709
         [,71]     [,72]       [,73]     [,74]    [,75]     [,76]    [,77]
[1,] -1.170606 0.9757316 -0.04051636 -1.004397 1.947171 0.7154699 1.541418
[2,] -1.170606 0.9757316 -0.04051636 -1.004397 1.947171 0.7154699 1.541418
        [,78]      [,79]       [,80]      [,81]        [,82]     [,83]
[1,] 1.100073 -0.6335524 -0.02447165 -0.2651519 -0.008963047 -0.341604
[2,] 1.100073 -0.6335524 -0.02447165 -0.2651519 -0.008963047 -0.341604
         [,84]      [,85]    [,86]    [,87]     [,88]    [,89]      [,90]
[1,] 0.1513463 -0.3406356 1.801738 1.345444 0.4072889 -0.30889 -0.1534618
[2,] 0.1513463 -0.3406356 1.801738 1.345444 0.4072889 -0.30889 -0.1534618
         [,91]     [,92]    [,93]    [,94]      [,95]      [,96]     [,97]
[1,] 0.5685455 0.4161416 0.223064 0.351289 -0.5109552 -0.3110921 0.1125378
[2,] 0.5685455 0.4161416 0.223064 0.351289 -0.5109552 -0.3110921 0.1125378
        [,98]    [,99]   [,100]
[1,] 0.949993 1.606378 -1.26669
[2,] 0.949993 1.606378 -1.26669
> 
> 
> Max(tmp2)
[1] 2.292474
> Min(tmp2)
[1] -2.764591
> mean(tmp2)
[1] -0.002562363
> Sum(tmp2)
[1] -0.2562363
> Var(tmp2)
[1] 0.8552075
> 
> rowMeans(tmp2)
  [1]  0.113523943 -0.442800140  1.601637167 -0.462007761 -0.070956112
  [6]  0.044695861  0.386905067  0.833569535  0.610489312  0.768505282
 [11] -0.735733411 -0.354427916  0.601497199 -0.787233322  1.313737028
 [16]  1.681770994  0.064780097 -1.428599891 -0.020088858 -1.468208917
 [21]  1.411396485  0.440674950 -0.025631100  0.737495335 -0.893183508
 [26] -0.883348665 -1.087733060 -0.343299468 -0.089197460 -0.766042194
 [31]  0.392868072 -0.122568944 -0.435491905 -1.409677421  0.467105948
 [36] -0.413682997  0.979631975 -1.269003070 -1.380350219  1.415296076
 [41]  0.316931313  0.673223027  0.146715197 -1.079467916 -0.991241521
 [46]  0.047662310  1.807619602 -0.932556166  0.923597745 -1.298424721
 [51] -1.381491100  1.990706210  0.429728411  0.433671234 -0.244374461
 [56]  0.224479147 -0.538354405  1.461664035 -1.456192889 -0.052147893
 [61] -1.170676510 -0.392023776 -0.235707364  0.615870657  1.303760364
 [66]  0.804734670 -1.350979280 -1.267080698  0.876685664 -0.828972082
 [71]  0.473745088  0.446843148  0.103078723 -1.240803895  1.666761212
 [76]  0.762748902 -1.500112131 -0.487702101  0.949804262 -0.203665403
 [81]  0.106253728  0.694334477  0.033637679 -2.764590900 -0.178208535
 [86]  0.467554964  0.299629500  0.105754770  0.407391555  0.251475251
 [91] -0.005711032 -0.114186487 -0.076033332  0.126720362  2.292474312
 [96] -0.278320857  0.134298285  0.571320122 -1.159678528  0.045277776
> rowSums(tmp2)
  [1]  0.113523943 -0.442800140  1.601637167 -0.462007761 -0.070956112
  [6]  0.044695861  0.386905067  0.833569535  0.610489312  0.768505282
 [11] -0.735733411 -0.354427916  0.601497199 -0.787233322  1.313737028
 [16]  1.681770994  0.064780097 -1.428599891 -0.020088858 -1.468208917
 [21]  1.411396485  0.440674950 -0.025631100  0.737495335 -0.893183508
 [26] -0.883348665 -1.087733060 -0.343299468 -0.089197460 -0.766042194
 [31]  0.392868072 -0.122568944 -0.435491905 -1.409677421  0.467105948
 [36] -0.413682997  0.979631975 -1.269003070 -1.380350219  1.415296076
 [41]  0.316931313  0.673223027  0.146715197 -1.079467916 -0.991241521
 [46]  0.047662310  1.807619602 -0.932556166  0.923597745 -1.298424721
 [51] -1.381491100  1.990706210  0.429728411  0.433671234 -0.244374461
 [56]  0.224479147 -0.538354405  1.461664035 -1.456192889 -0.052147893
 [61] -1.170676510 -0.392023776 -0.235707364  0.615870657  1.303760364
 [66]  0.804734670 -1.350979280 -1.267080698  0.876685664 -0.828972082
 [71]  0.473745088  0.446843148  0.103078723 -1.240803895  1.666761212
 [76]  0.762748902 -1.500112131 -0.487702101  0.949804262 -0.203665403
 [81]  0.106253728  0.694334477  0.033637679 -2.764590900 -0.178208535
 [86]  0.467554964  0.299629500  0.105754770  0.407391555  0.251475251
 [91] -0.005711032 -0.114186487 -0.076033332  0.126720362  2.292474312
 [96] -0.278320857  0.134298285  0.571320122 -1.159678528  0.045277776
> rowVars(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowSd(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowMax(tmp2)
  [1]  0.113523943 -0.442800140  1.601637167 -0.462007761 -0.070956112
  [6]  0.044695861  0.386905067  0.833569535  0.610489312  0.768505282
 [11] -0.735733411 -0.354427916  0.601497199 -0.787233322  1.313737028
 [16]  1.681770994  0.064780097 -1.428599891 -0.020088858 -1.468208917
 [21]  1.411396485  0.440674950 -0.025631100  0.737495335 -0.893183508
 [26] -0.883348665 -1.087733060 -0.343299468 -0.089197460 -0.766042194
 [31]  0.392868072 -0.122568944 -0.435491905 -1.409677421  0.467105948
 [36] -0.413682997  0.979631975 -1.269003070 -1.380350219  1.415296076
 [41]  0.316931313  0.673223027  0.146715197 -1.079467916 -0.991241521
 [46]  0.047662310  1.807619602 -0.932556166  0.923597745 -1.298424721
 [51] -1.381491100  1.990706210  0.429728411  0.433671234 -0.244374461
 [56]  0.224479147 -0.538354405  1.461664035 -1.456192889 -0.052147893
 [61] -1.170676510 -0.392023776 -0.235707364  0.615870657  1.303760364
 [66]  0.804734670 -1.350979280 -1.267080698  0.876685664 -0.828972082
 [71]  0.473745088  0.446843148  0.103078723 -1.240803895  1.666761212
 [76]  0.762748902 -1.500112131 -0.487702101  0.949804262 -0.203665403
 [81]  0.106253728  0.694334477  0.033637679 -2.764590900 -0.178208535
 [86]  0.467554964  0.299629500  0.105754770  0.407391555  0.251475251
 [91] -0.005711032 -0.114186487 -0.076033332  0.126720362  2.292474312
 [96] -0.278320857  0.134298285  0.571320122 -1.159678528  0.045277776
> rowMin(tmp2)
  [1]  0.113523943 -0.442800140  1.601637167 -0.462007761 -0.070956112
  [6]  0.044695861  0.386905067  0.833569535  0.610489312  0.768505282
 [11] -0.735733411 -0.354427916  0.601497199 -0.787233322  1.313737028
 [16]  1.681770994  0.064780097 -1.428599891 -0.020088858 -1.468208917
 [21]  1.411396485  0.440674950 -0.025631100  0.737495335 -0.893183508
 [26] -0.883348665 -1.087733060 -0.343299468 -0.089197460 -0.766042194
 [31]  0.392868072 -0.122568944 -0.435491905 -1.409677421  0.467105948
 [36] -0.413682997  0.979631975 -1.269003070 -1.380350219  1.415296076
 [41]  0.316931313  0.673223027  0.146715197 -1.079467916 -0.991241521
 [46]  0.047662310  1.807619602 -0.932556166  0.923597745 -1.298424721
 [51] -1.381491100  1.990706210  0.429728411  0.433671234 -0.244374461
 [56]  0.224479147 -0.538354405  1.461664035 -1.456192889 -0.052147893
 [61] -1.170676510 -0.392023776 -0.235707364  0.615870657  1.303760364
 [66]  0.804734670 -1.350979280 -1.267080698  0.876685664 -0.828972082
 [71]  0.473745088  0.446843148  0.103078723 -1.240803895  1.666761212
 [76]  0.762748902 -1.500112131 -0.487702101  0.949804262 -0.203665403
 [81]  0.106253728  0.694334477  0.033637679 -2.764590900 -0.178208535
 [86]  0.467554964  0.299629500  0.105754770  0.407391555  0.251475251
 [91] -0.005711032 -0.114186487 -0.076033332  0.126720362  2.292474312
 [96] -0.278320857  0.134298285  0.571320122 -1.159678528  0.045277776
> 
> colMeans(tmp2)
[1] -0.002562363
> colSums(tmp2)
[1] -0.2562363
> colVars(tmp2)
[1] 0.8552075
> colSd(tmp2)
[1] 0.9247743
> colMax(tmp2)
[1] 2.292474
> colMin(tmp2)
[1] -2.764591
> colMedians(tmp2)
[1] 0.04498682
> colRanges(tmp2)
          [,1]
[1,] -2.764591
[2,]  2.292474
> 
> 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]  2.5840235  4.7699513 -3.5178856  1.4706782  0.5883347  3.7850018
 [7] -3.2280149  1.6554110  2.8327291 -0.4912158
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -0.8398103
[2,] -0.3584062
[3,]  0.1762713
[4,]  1.0404039
[5,]  1.4260172
> 
> rowApply(tmp,sum)
 [1]  2.5861856  2.3562784  0.3640536  0.9107406 -1.2695259  1.9544039
 [7]  2.5774767  0.6433527 -2.2980472  2.6240949
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    4    8    6    9    4    4    2   10    5     7
 [2,]    5    6    8    4    6   10    6    7   10     2
 [3,]    3    3    1    7    9    7    9    4    3     1
 [4,]    6   10    4    3   10    8    8    1    1     6
 [5,]    1    7   10    5    5    6    3    3    2    10
 [6,]    2    4    9   10    3    9    4    5    4     8
 [7,]    9    5    3    1    2    1    1    9    8     4
 [8,]    7    9    2    8    7    2    7    8    6     5
 [9,]   10    2    7    2    1    5   10    6    7     9
[10,]    8    1    5    6    8    3    5    2    9     3
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1]  4.58672421 -0.36800090  0.41522158  0.01547263  3.10223791  1.89096363
 [7]  2.13336245  0.56018882 -1.58839146  3.08158780 -1.04748234 -2.14951419
[13]  1.94620024  0.65559785 -1.02406641 -2.14095836 -1.96048158  4.50998881
[19] -1.99789331 -0.64154931
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -0.6463035
[2,]  0.4639808
[3,]  0.9613529
[4,]  1.1362052
[5,]  2.6714889
> 
> rowApply(tmp,sum)
[1] -6.552525  4.387456  4.123645  4.937266  3.083366
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   10   12   17   16   20
[2,]    1    5   18    3   19
[3,]   12   20    3   11    4
[4,]    4   19   13    2    9
[5,]   16   15   10   20   11
> 
> 
> as.matrix(tmp)
           [,1]       [,2]       [,3]       [,4]      [,5]       [,6]      [,7]
[1,] -0.6463035 -2.3286483 -0.4907431 -1.3391354 0.5268103  0.3333539 0.2483369
[2,]  0.4639808 -0.3976976  2.1364270  2.1275921 0.6471887 -0.1123743 0.0807513
[3,]  1.1362052  1.5625371 -0.9896281  0.5898882 0.3131988  1.6279397 0.2808229
[4,]  0.9613529 -0.9847104  0.6277152 -1.0136082 1.4017907  0.8796748 0.5714856
[5,]  2.6714889  1.7805185 -0.8685494 -0.3492640 0.2132493 -0.8376305 0.9519657
           [,8]       [,9]     [,10]      [,11]      [,12]       [,13]
[1,]  1.1686585 -0.8015685 0.1631769 -0.5922576 -1.5660800  0.92249728
[2,] -0.1202340 -0.2367065 0.7030120  0.5583647  1.1533308  0.61342291
[3,] -2.1437241  0.9753363 0.5613996  0.6804176 -0.9747855 -0.06061344
[4,]  0.3235848 -0.8008602 1.1699349 -1.1496371 -0.4847733 -0.45061910
[5,]  1.3319036 -0.7245925 0.4840643 -0.5443700 -0.2772062  0.92151260
          [,14]      [,15]      [,16]      [,17]      [,18]      [,19]
[1,]  1.9600978 -0.8632503 -0.7902397 -1.0943217  1.2280736 -1.0590509
[2,] -1.4209836 -1.3110329 -1.2378972  0.2161497  1.5601309 -1.2707710
[3,]  0.5617084  0.7502395 -0.2016599 -1.2817248 -0.4468158 -0.6383060
[4,]  0.7831413  0.7884498  1.0513108 -0.9550919  1.1959346  0.3630300
[5,] -1.2283661 -0.3884725 -0.9624723  1.1545072  0.9726654  0.6072045
          [,20]
[1,] -1.5319310
[2,]  0.2348022
[3,]  1.8212095
[4,]  0.6591605
[5,] -1.8247905
> 
> 
> 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.23-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.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  648  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  562  bytes.
Disk usage :  160  bytes.
> subBufferedMatrix(tmp,1:3,)
BufferedMatrix object
Matrix size:  3 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  480  bytes.
> 
> 
> rm(tmp)
> 
> 
> ###
> ### Testing colnames and rownames
> ###
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> 
> 
> colnames(tmp)
NULL
> rownames(tmp)
NULL
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> colnames(tmp)
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"
> rownames(tmp)
[1] "row1" "row2" "row3" "row4" "row5"
> 
> 
> tmp["row1",]
         col1       col2       col3       col4      col5      col6      col7
row1 1.166242 -0.2562253 -0.2261805 -0.1021515 0.1343466 -2.065162 0.1656781
          col8      col9    col10    col11     col12      col13      col14
row1 0.9767721 0.5193555 1.022474 1.397054 -1.794945 -0.5491016 -0.2678859
         col15     col16    col17     col18     col19    col20
row1 -1.921655 0.8501233 1.309385 0.7860661 0.9231617 1.003872
> tmp[,"col10"]
           col10
row1  1.02247367
row2  1.59085698
row3  0.89449535
row4 -1.96116404
row5 -0.04834925
> tmp[c("row1","row5"),]
          col1       col2       col3       col4       col5      col6      col7
row1 1.1662424 -0.2562253 -0.2261805 -0.1021515  0.1343466 -2.065162 0.1656781
row5 0.4204711  0.7585339  0.1591387  0.7880580 -1.8082340  1.768324 0.1179885
          col8       col9       col10      col11      col12       col13
row1 0.9767721  0.5193555  1.02247367  1.3970536 -1.7949453 -0.54910161
row5 1.1788805 -0.0421391 -0.04834925 -0.1934508  0.1475642  0.09074508
          col14      col15     col16      col17     col18     col19      col20
row1 -0.2678859 -1.9216547 0.8501233  1.3093849 0.7860661 0.9231617  1.0038722
row5  0.3212492 -0.5588578 0.6969431 -0.7504378 2.6574273 2.3713504 -0.7858115
> tmp[,c("col6","col20")]
           col6      col20
row1 -2.0651618  1.0038722
row2  0.8279424  1.1368390
row3  1.1942842  1.8219267
row4  0.6340930  0.7751104
row5  1.7683242 -0.7858115
> tmp[c("row1","row5"),c("col6","col20")]
          col6      col20
row1 -2.065162  1.0038722
row5  1.768324 -0.7858115
> 
> 
> 
> 
> 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 47.51902 50.24965 49.8603 49.46261 49.79729 104.5786 49.59837 48.42672
         col9    col10    col11   col12    col13    col14   col15    col16
row1 51.06544 49.48188 52.32479 49.7576 49.49928 50.10995 49.9669 50.04859
        col17    col18    col19    col20
row1 50.04393 49.81277 50.54764 104.3838
> tmp[,"col10"]
        col10
row1 49.48188
row2 30.30738
row3 29.63327
row4 29.47580
row5 48.37463
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 47.51902 50.24965 49.86030 49.46261 49.79729 104.5786 49.59837 48.42672
row5 49.76279 49.21133 48.58205 50.34704 50.72968 105.1025 48.20620 48.87270
         col9    col10    col11    col12    col13    col14    col15    col16
row1 51.06544 49.48188 52.32479 49.75760 49.49928 50.10995 49.96690 50.04859
row5 50.20370 48.37463 50.77355 48.35648 50.10891 51.63575 49.93155 49.46939
        col17    col18    col19    col20
row1 50.04393 49.81277 50.54764 104.3838
row5 50.15718 50.11562 52.11981 106.1728
> tmp[,c("col6","col20")]
          col6     col20
row1 104.57860 104.38380
row2  76.76266  74.09486
row3  75.49614  75.13831
row4  74.98600  74.58995
row5 105.10246 106.17281
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 104.5786 104.3838
row5 105.1025 106.1728
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 104.5786 104.3838
row5 105.1025 106.1728
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,]  0.3809914
[2,]  0.8417280
[3,] -0.3235010
[4,] -0.1664300
[5,]  1.3995828
> tmp[,c("col17","col7")]
             col17       col7
[1,]  0.6542904963 -0.4170203
[2,] -1.0138973619 -0.6999876
[3,]  1.2632268738 -0.7212136
[4,] -0.9002852670 -0.2083169
[5,] -0.0005089105 -1.1958251
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
            col6       col20
[1,] -0.30568609 -0.29863997
[2,]  0.01341719  0.77776615
[3,]  0.05104190  0.66575391
[4,] -0.51153482 -0.02479394
[5,]  1.38657631  0.16927690
> subBufferedMatrix(tmp,1,c("col6"))[,1]
           col1
[1,] -0.3056861
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
            col6
[1,] -0.30568609
[2,]  0.01341719
> 
> 
> 
> 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 -1.942806 0.02266793 -0.8757441 0.2130755  0.5969522 -0.6991313 0.4496306
row1 -1.344988 1.25131439  0.6743754 0.9136138 -0.5921746 -0.7698674 0.8587025
           [,8]        [,9]      [,10]       [,11]     [,12]     [,13]
row3  1.4704154  0.07328321  1.5717517 -0.09209155  1.221559 -1.132817
row1 -0.2530407 -0.75626926 -0.7967615  1.26123306 -0.942357 -1.404405
           [,14]      [,15]     [,16]      [,17]      [,18]      [,19]
row3 -0.04082142 -0.7296809 -0.128536 -0.4167561 0.02470627 -0.6710211
row1  0.69956968 -0.7259236  2.253295 -1.1611403 0.67438632  0.7111506
         [,20]
row3 0.6682874
row1 0.1531166
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
         [,1]       [,2]     [,3]     [,4]      [,5]      [,6]      [,7]
row2 1.828377 -0.1903021 -2.31089 -0.31829 -2.287124 0.4278986 0.3561379
           [,8]       [,9]      [,10]
row2 -0.5687022 -0.2126173 -0.1264356
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
          [,1]    [,2]       [,3]      [,4]      [,5]      [,6]    [,7]
row5 -0.239851 1.04252 -0.9826771 -1.789926 0.1637707 -1.244414 1.08606
           [,8]      [,9]     [,10]      [,11]     [,12]    [,13]     [,14]
row5 -0.7416302 0.6849539 0.7468324 -0.3594374 0.6513463 2.195412 0.9743922
        [,15]     [,16]      [,17]    [,18]      [,19]       [,20]
row5 2.327368 -1.720721 -0.6799975 1.031129 -0.4444699 -0.09749272
> 
> 
> 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: 0x62a96ea08c20>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c866535cc01"
 [2] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c865b99648e"
 [3] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c8653dc91f" 
 [4] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c86361640f5"
 [5] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c865662c59a"
 [6] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c86751ec20f"
 [7] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c862c3f06fb"
 [8] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c8611ad4ddc"
 [9] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c8633decf59"
[10] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c8637a3d52d"
[11] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c865dbf56d5"
[12] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c8650432961"
[13] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c86715cdb62"
[14] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c862d4b30"  
[15] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BMa3c861a2a77"  
> 
> 
> ### 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: 0x62a96d932800>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x62a96d932800>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x62a96d932800>
> rowMedians(tmp)
  [1]  0.2995461858  0.1218746338  0.2180184273 -0.1124832054  0.3961179885
  [6]  0.2922409035 -0.3589847499 -0.1523659959  0.4344458205 -0.4254616300
 [11]  0.0002487389  0.1672754003 -0.0328305369 -0.5118383795  0.3919086350
 [16]  0.2121011414 -0.0846064054  0.0485241344  0.5362129735  0.0009214384
 [21] -0.1616585657 -0.4819568959 -0.0175929928  0.1706976237 -0.4200742247
 [26] -0.7515475199  0.2480210862 -0.0716832807  0.7604194663 -0.0309773834
 [31]  0.3318532488 -0.4399222137 -0.1712284529 -0.3953887590 -0.1558935532
 [36] -0.7165835685 -0.2354180826  0.1984186075 -0.3008727380 -0.3904638305
 [41]  0.3081191639  0.1760989984 -0.0797623762 -0.0735506013 -0.5475412741
 [46] -0.0803740675  0.1241499082 -0.1546086481  0.2912523548  0.0632750489
 [51]  0.3263765838  0.3865382048  0.1970382612 -0.0279038120 -0.0642634061
 [56] -0.5230284102 -0.2974806238 -0.1627816107 -0.0488130887  0.1300644356
 [61]  0.1909470679  0.6134775985 -0.0904009266  0.1168502833 -0.5081381763
 [66]  0.2684845327 -0.2833328583  0.4363123120 -0.0225132243  0.4576117839
 [71] -0.0796082273  0.3917462536  0.0958026467  0.3954572014  0.1188879262
 [76]  0.4520739701  0.1684030555  0.4254207658 -0.0442862692 -0.1714750931
 [81] -0.3188478193 -0.2264799446 -0.1646403439 -0.0546248058  0.5406480258
 [86]  0.0227819965  0.1827645686 -0.2529445619 -0.3265242664  0.0942300267
 [91]  0.0400003384 -0.0701956359  0.2495067968  0.4654491642  0.6459517258
 [96] -0.3784295406 -0.1622416132  0.0837518568 -0.2099404268  0.4245517319
[101] -0.0447328591  0.0892957495 -0.3456385694 -0.3642777022 -0.6016847298
[106] -0.2981750255 -0.1412585374  0.0326868150 -0.6193252176 -0.4445565256
[111]  0.2044924230 -0.0962419939  0.3126519829  0.3478604390 -0.1594536102
[116] -0.7762445842 -0.2368063308 -0.4518067501  0.3381671142  0.5019309030
[121]  0.0286431271 -0.3457495745 -0.4793390160 -0.2788266846  0.1231820208
[126] -0.2811076915 -0.0996305416  0.3502622426  0.1996908783  0.2151332172
[131] -0.2442956806 -0.1231891644  0.5494777927 -0.4235179345 -0.1848601549
[136] -0.0235070879 -0.4696029891  0.7992386426  0.0492618880 -0.7871647604
[141]  0.1838576426 -0.0895231095  0.2062662810 -0.3318878183  0.1990082838
[146] -0.6035117393  0.3823444173  0.3105332156  0.0171695889  0.4635228811
[151] -0.3331940458 -0.1054630169  0.1472647090  0.1498669142  0.5969834083
[156] -0.1254341308  0.2054256115  0.1550760436  0.1219820362  0.1622842873
[161] -0.0497705665  0.6936384419 -0.0049757857 -0.0690530857 -0.4985774974
[166]  0.1938744637 -0.1184549645 -0.9234346984  0.0627018341 -0.0864330893
[171]  0.2735489686  0.0178686547 -0.9122597214  0.0890387905 -0.1570666768
[176] -0.1626187908 -0.1244446779 -0.4302232681  0.1264552167  0.2147656688
[181] -0.0812218340  0.0821367983 -0.2219159331  0.0800572326 -0.2738701242
[186] -0.1725556736 -0.1276900706 -0.0994388341  0.2067694060  0.2817381133
[191]  0.3047851812 -0.4648374372 -0.2297321375 -0.1967102026 -0.1505421667
[196]  0.0370935141  0.0428359124 -0.1208116859 -0.1831918894 -0.1868124908
[201] -0.6684339916 -0.7494111454  0.0533152090 -0.0995559115  0.0280648553
[206] -0.5240048747  0.2332764572  0.4996952475 -0.1355627822  0.4365900764
[211]  0.2250651150 -0.1921272464 -0.3797963984 -0.3131636796 -0.3396091226
[216] -0.1203181418 -0.5117392565 -0.2827028055 -0.4298146657 -0.5700701711
[221] -0.0627000906  0.3394532634 -0.3614764487 -0.0530986249  0.2900851270
[226]  0.0322142373  0.4459848714 -0.1177120309 -0.0944446345  0.0324404742
> 
> proc.time()
   user  system elapsed 
  1.344   1.420   2.753 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R Under development (unstable) (2025-10-20 r88955) -- "Unsuffered Consequences"
Copyright (C) 2025 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: 0x63a0db08cb20>
> .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: 0x63a0db08cb20>
> .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: 0x63a0db08cb20>
> .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: 0x63a0db08cb20>
> 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: 0x63a0db06d410>
> .Call("R_bm_AddColumn",P)
<pointer: 0x63a0db06d410>
> .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: 0x63a0db06d410>
> .Call("R_bm_AddColumn",P)
<pointer: 0x63a0db06d410>
> .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: 0x63a0db06d410>
> 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: 0x63a0d991a7a0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x63a0d991a7a0>
> .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: 0x63a0d991a7a0>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x63a0d991a7a0>
> .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: 0x63a0d991a7a0>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x63a0d991a7a0>
> .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: 0x63a0d991a7a0>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x63a0d991a7a0>
> .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: 0x63a0d991a7a0>
> 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: 0x63a0d9e5e070>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x63a0d9e5e070>
> .Call("R_bm_AddColumn",P)
<pointer: 0x63a0d9e5e070>
> .Call("R_bm_AddColumn",P)
<pointer: 0x63a0d9e5e070>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFilea3eea1c9e9b19" "BufferedMatrixFilea3eea2bb96bee"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFilea3eea1c9e9b19" "BufferedMatrixFilea3eea2bb96bee"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x63a0da9f10c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x63a0da9f10c0>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x63a0da9f10c0>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x63a0da9f10c0>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x63a0da9f10c0>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x63a0da9f10c0>
> .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: 0x63a0dba07a10>
> .Call("R_bm_AddColumn",P)
<pointer: 0x63a0dba07a10>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x63a0dba07a10>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x63a0dba07a10>
> 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: 0x63a0dae8ac60>
> .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: 0x63a0dae8ac60>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.233   0.058   0.282 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R Under development (unstable) (2025-10-20 r88955) -- "Unsuffered Consequences"
Copyright (C) 2025 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.231   0.054   0.275 

Example timings