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

This page was generated on 2025-12-11 12:03 -0500 (Thu, 11 Dec 2025).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 24.04.3 LTS)x86_644.5.2 (2025-10-31) -- "[Not] Part in a Rumble" 4879
merida1macOS 12.7.6 Montereyx86_644.5.2 (2025-10-31) -- "[Not] Part in a Rumble" 4670
kjohnson1macOS 13.7.5 Venturaarm644.5.2 Patched (2025-11-04 r88984) -- "[Not] Part in a Rumble" 4604
taishanLinux (openEuler 24.03 LTS)aarch644.5.0 (2025-04-11) -- "How About a Twenty-Six" 4669
Click on any hostname to see more info about the system (e.g. compilers)      (*) as reported by 'uname -p', except on Windows and Mac OS X

Package 257/2361HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.74.0  (landing page)
Ben Bolstad
Snapshot Date: 2025-12-08 13:45 -0500 (Mon, 08 Dec 2025)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: RELEASE_3_22
git_last_commit: d2ce144
git_last_commit_date: 2025-10-29 09:58:55 -0500 (Wed, 29 Oct 2025)
nebbiolo2Linux (Ubuntu 24.04.3 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
merida1macOS 12.7.6 Monterey / x86_64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kjohnson1macOS 13.7.5 Ventura / arm64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
taishanLinux (openEuler 24.03 LTS) / aarch64  OK    OK    OK  


CHECK results for BufferedMatrix on nebbiolo2

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

raw results


Summary

Package: BufferedMatrix
Version: 1.74.0
Command: /home/biocbuild/bbs-3.22-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.22-bioc/R/site-library --timings BufferedMatrix_1.74.0.tar.gz
StartedAt: 2025-12-08 21:41:32 -0500 (Mon, 08 Dec 2025)
EndedAt: 2025-12-08 21:41:56 -0500 (Mon, 08 Dec 2025)
EllapsedTime: 24.0 seconds
RetCode: 0
Status:   OK  
CheckDir: BufferedMatrix.Rcheck
Warnings: 0

Command output

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


* using log directory ‘/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck’
* using R version 4.5.2 (2025-10-31)
* 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.74.0’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘BufferedMatrix’ can be installed ... OK
* used C compiler: ‘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 ... NOTE
Note: information on .o files is not available
* checking files in ‘vignettes’ ... OK
* checking examples ... NONE
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘Rcodetesting.R’
  Running ‘c_code_level_tests.R’
  Running ‘objectTesting.R’
  Running ‘rawCalltesting.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking re-building of vignette outputs ... OK
* checking PDF version of manual ... OK
* DONE

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


Installation output

BufferedMatrix.Rcheck/00install.out

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


* installing to library ‘/home/biocbuild/bbs-3.22-bioc/R/site-library’
* installing *source* package ‘BufferedMatrix’ ...
** this is package ‘BufferedMatrix’ version ‘1.74.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.22-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.22-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.22-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.22-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.22-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.22-bioc/R/lib -lR
installing to /home/biocbuild/bbs-3.22-bioc/R/site-library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’
Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’
Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’
Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’
Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’
Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (BufferedMatrix)

Tests output

BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
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.244   0.045   0.280 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
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.22-bioc/meat/BufferedMatrix.Rcheck/tests"
> prefix(tmp3)
[1] "BM"
> 
> ## testing if we can remove these objects
> rm(tmp, tmp2, tmp3)
> gc()
         used (Mb) gc trigger (Mb) max used (Mb)
Ncells 478284 25.6    1046725   56   639600 34.2
Vcells 884773  6.8    8388608   64  2081613 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] "Mon Dec  8 21:41:47 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] "Mon Dec  8 21:41:47 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: 0x5ff3d754f370>
> 
> 
> 
> 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] "Mon Dec  8 21:41:47 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] "Mon Dec  8 21:41:47 2025"
> 
> ColMode(tmp2)
<pointer: 0x5ff3d754f370>
> 
> 
> 
> ### Now testing assignments
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+ 
+   new.data <- rnorm(20)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,] <- new.data
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   new.data <- rnorm(10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+ 
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col  <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(25),5,5)
+   tmp2[which.row,which.col] <- new.data
+   test.matrix[which.row,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> ###
> ###
> ### testing some more functions
> ###
> 
> 
> 
> ## duplication function
> tmp5 <- duplicate(tmp2)
> 
> # making sure really did copy everything.
> tmp5[1,1] <- tmp5[1,1] +100.00
> 
> if (tmp5[1,1] == tmp2[1,1]){
+   stop("Problem with duplication")
+ }
> 
> 
> 
> 
> ### testing elementwise applying of functions
> 
> tmp5[1:4,1:4]
           [,1]        [,2]       [,3]        [,4]
[1,] 100.218368  0.52871129 -1.1748324 -0.07478941
[2,]  -1.936538 -0.04890691 -0.5578186 -1.31911808
[3,]  -0.996419 -0.38902896  0.4243276  1.44484167
[4,]   1.300824 -2.51349491 -0.7019406  0.04372754
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
           [,1]       [,2]      [,3]       [,4]
[1,] 100.218368 0.52871129 1.1748324 0.07478941
[2,]   1.936538 0.04890691 0.5578186 1.31911808
[3,]   0.996419 0.38902896 0.4243276 1.44484167
[4,]   1.300824 2.51349491 0.7019406 0.04372754
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
           [,1]      [,2]      [,3]      [,4]
[1,] 10.0109125 0.7271254 1.0838969 0.2734765
[2,]  1.3915956 0.2211491 0.7468725 1.1485287
[3,]  0.9982079 0.6237219 0.6514043 1.2020157
[4,]  1.1405367 1.5854006 0.8378190 0.2091113
> 
> my.function <- function(x,power){
+   (x+5)^power
+ }
> 
> ewApply(tmp5,my.function,power=2)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 225.32749 32.79996 37.01380 27.80955
[2,]  40.85249 27.26040 33.02654 37.80440
[3,]  35.97850 31.62625 31.93837 38.46500
[4,]  37.70619 43.36750 34.08013 27.13484
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x5ff3d86af800>
> exp(tmp5)
<pointer: 0x5ff3d86af800>
> log(tmp5,2)
<pointer: 0x5ff3d86af800>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 468.9897
> Min(tmp5)
[1] 53.4469
> mean(tmp5)
[1] 72.57445
> Sum(tmp5)
[1] 14514.89
> Var(tmp5)
[1] 871.9651
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 90.19688 71.08644 70.15364 71.06266 69.23762 71.74750 70.47437 69.73049
 [9] 65.53197 76.52295
> rowSums(tmp5)
 [1] 1803.938 1421.729 1403.073 1421.253 1384.752 1434.950 1409.487 1394.610
 [9] 1310.639 1530.459
> rowVars(tmp5)
 [1] 8034.87932   95.60632   74.35710  104.90489   65.81452   67.88490
 [7]   72.06079   56.06096   51.36141   77.74242
> rowSd(tmp5)
 [1] 89.637488  9.777849  8.623056 10.242309  8.112615  8.239229  8.488863
 [8]  7.487387  7.166688  8.817166
> rowMax(tmp5)
 [1] 468.98965  86.87533  89.14691  90.26377  87.10558  89.03076  88.06140
 [8]  91.12016  81.00706  90.28755
> rowMin(tmp5)
 [1] 54.83915 56.14745 57.47535 53.72699 57.34030 58.87733 53.44690 56.32366
 [9] 54.11302 59.00589
> 
> colMeans(tmp5)
 [1] 112.83290  70.22909  70.98440  69.37350  67.31477  72.36181  68.92413
 [8]  68.39491  73.75409  71.38444  67.29388  72.44878  64.59349  72.86156
[15]  73.41487  67.19371  72.16622  75.03509  67.21409  73.71333
> colSums(tmp5)
 [1] 1128.3290  702.2909  709.8440  693.7350  673.1477  723.6181  689.2413
 [8]  683.9491  737.5409  713.8444  672.9388  724.4878  645.9349  728.6156
[15]  734.1487  671.9371  721.6622  750.3509  672.1409  737.1333
> colVars(tmp5)
 [1] 15721.32015   119.46231    51.29172    94.00027    83.41262    38.29666
 [7]    70.05160    37.55478    67.50857    79.75418    44.20658    62.99459
[13]    57.07296   146.34609   122.14726    42.65708   187.92360    63.39126
[19]    49.95327    76.41897
> colSd(tmp5)
 [1] 125.384689  10.929882   7.161824   9.695374   9.133051   6.188430
 [7]   8.369684   6.128196   8.216360   8.930520   6.648803   7.936913
[13]   7.554665  12.097359  11.052025   6.531239  13.708523   7.961863
[19]   7.067763   8.741795
> colMax(tmp5)
 [1] 468.98965  90.26377  81.90936  80.67166  82.98888  84.46230  81.12241
 [8]  75.69504  86.19983  85.62437  75.00617  89.02097  78.92500  90.28755
[15]  87.10558  78.64053  91.12016  86.69275  77.41501  86.04284
> colMin(tmp5)
 [1] 57.34030 56.73895 57.68065 56.47762 56.14745 67.14335 54.11302 59.24291
 [9] 60.41016 58.94729 53.72699 64.79448 54.83915 53.44690 59.00589 55.79025
[17] 56.71387 60.38062 58.63355 58.44160
> 
> 
> ### 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] 90.19688 71.08644 70.15364 71.06266 69.23762 71.74750 70.47437 69.73049
 [9]       NA 76.52295
> rowSums(tmp5)
 [1] 1803.938 1421.729 1403.073 1421.253 1384.752 1434.950 1409.487 1394.610
 [9]       NA 1530.459
> rowVars(tmp5)
 [1] 8034.87932   95.60632   74.35710  104.90489   65.81452   67.88490
 [7]   72.06079   56.06096   47.48896   77.74242
> rowSd(tmp5)
 [1] 89.637488  9.777849  8.623056 10.242309  8.112615  8.239229  8.488863
 [8]  7.487387  6.891223  8.817166
> rowMax(tmp5)
 [1] 468.98965  86.87533  89.14691  90.26377  87.10558  89.03076  88.06140
 [8]  91.12016        NA  90.28755
> rowMin(tmp5)
 [1] 54.83915 56.14745 57.47535 53.72699 57.34030 58.87733 53.44690 56.32366
 [9]       NA 59.00589
> 
> colMeans(tmp5)
 [1] 112.83290  70.22909  70.98440  69.37350  67.31477  72.36181  68.92413
 [8]  68.39491        NA  71.38444  67.29388  72.44878  64.59349  72.86156
[15]  73.41487  67.19371  72.16622  75.03509  67.21409  73.71333
> colSums(tmp5)
 [1] 1128.3290  702.2909  709.8440  693.7350  673.1477  723.6181  689.2413
 [8]  683.9491        NA  713.8444  672.9388  724.4878  645.9349  728.6156
[15]  734.1487  671.9371  721.6622  750.3509  672.1409  737.1333
> colVars(tmp5)
 [1] 15721.32015   119.46231    51.29172    94.00027    83.41262    38.29666
 [7]    70.05160    37.55478          NA    79.75418    44.20658    62.99459
[13]    57.07296   146.34609   122.14726    42.65708   187.92360    63.39126
[19]    49.95327    76.41897
> colSd(tmp5)
 [1] 125.384689  10.929882   7.161824   9.695374   9.133051   6.188430
 [7]   8.369684   6.128196         NA   8.930520   6.648803   7.936913
[13]   7.554665  12.097359  11.052025   6.531239  13.708523   7.961863
[19]   7.067763   8.741795
> colMax(tmp5)
 [1] 468.98965  90.26377  81.90936  80.67166  82.98888  84.46230  81.12241
 [8]  75.69504        NA  85.62437  75.00617  89.02097  78.92500  90.28755
[15]  87.10558  78.64053  91.12016  86.69275  77.41501  86.04284
> colMin(tmp5)
 [1] 57.34030 56.73895 57.68065 56.47762 56.14745 67.14335 54.11302 59.24291
 [9]       NA 58.94729 53.72699 64.79448 54.83915 53.44690 59.00589 55.79025
[17] 56.71387 60.38062 58.63355 58.44160
> 
> Max(tmp5,na.rm=TRUE)
[1] 468.9897
> Min(tmp5,na.rm=TRUE)
[1] 53.4469
> mean(tmp5,na.rm=TRUE)
[1] 72.55595
> Sum(tmp5,na.rm=TRUE)
[1] 14438.63
> Var(tmp5,na.rm=TRUE)
[1] 876.3002
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 90.19688 71.08644 70.15364 71.06266 69.23762 71.74750 70.47437 69.73049
 [9] 64.96753 76.52295
> rowSums(tmp5,na.rm=TRUE)
 [1] 1803.938 1421.729 1403.073 1421.253 1384.752 1434.950 1409.487 1394.610
 [9] 1234.383 1530.459
> rowVars(tmp5,na.rm=TRUE)
 [1] 8034.87932   95.60632   74.35710  104.90489   65.81452   67.88490
 [7]   72.06079   56.06096   47.48896   77.74242
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.637488  9.777849  8.623056 10.242309  8.112615  8.239229  8.488863
 [8]  7.487387  6.891223  8.817166
> rowMax(tmp5,na.rm=TRUE)
 [1] 468.98965  86.87533  89.14691  90.26377  87.10558  89.03076  88.06140
 [8]  91.12016  81.00706  90.28755
> rowMin(tmp5,na.rm=TRUE)
 [1] 54.83915 56.14745 57.47535 53.72699 57.34030 58.87733 53.44690 56.32366
 [9] 54.11302 59.00589
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 112.83290  70.22909  70.98440  69.37350  67.31477  72.36181  68.92413
 [8]  68.39491  73.47606  71.38444  67.29388  72.44878  64.59349  72.86156
[15]  73.41487  67.19371  72.16622  75.03509  67.21409  73.71333
> colSums(tmp5,na.rm=TRUE)
 [1] 1128.3290  702.2909  709.8440  693.7350  673.1477  723.6181  689.2413
 [8]  683.9491  661.2845  713.8444  672.9388  724.4878  645.9349  728.6156
[15]  734.1487  671.9371  721.6622  750.3509  672.1409  737.1333
> colVars(tmp5,na.rm=TRUE)
 [1] 15721.32015   119.46231    51.29172    94.00027    83.41262    38.29666
 [7]    70.05160    37.55478    75.07751    79.75418    44.20658    62.99459
[13]    57.07296   146.34609   122.14726    42.65708   187.92360    63.39126
[19]    49.95327    76.41897
> colSd(tmp5,na.rm=TRUE)
 [1] 125.384689  10.929882   7.161824   9.695374   9.133051   6.188430
 [7]   8.369684   6.128196   8.664728   8.930520   6.648803   7.936913
[13]   7.554665  12.097359  11.052025   6.531239  13.708523   7.961863
[19]   7.067763   8.741795
> colMax(tmp5,na.rm=TRUE)
 [1] 468.98965  90.26377  81.90936  80.67166  82.98888  84.46230  81.12241
 [8]  75.69504  86.19983  85.62437  75.00617  89.02097  78.92500  90.28755
[15]  87.10558  78.64053  91.12016  86.69275  77.41501  86.04284
> colMin(tmp5,na.rm=TRUE)
 [1] 57.34030 56.73895 57.68065 56.47762 56.14745 67.14335 54.11302 59.24291
 [9] 60.41016 58.94729 53.72699 64.79448 54.83915 53.44690 59.00589 55.79025
[17] 56.71387 60.38062 58.63355 58.44160
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 90.19688 71.08644 70.15364 71.06266 69.23762 71.74750 70.47437 69.73049
 [9]      NaN 76.52295
> rowSums(tmp5,na.rm=TRUE)
 [1] 1803.938 1421.729 1403.073 1421.253 1384.752 1434.950 1409.487 1394.610
 [9]    0.000 1530.459
> rowVars(tmp5,na.rm=TRUE)
 [1] 8034.87932   95.60632   74.35710  104.90489   65.81452   67.88490
 [7]   72.06079   56.06096         NA   77.74242
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.637488  9.777849  8.623056 10.242309  8.112615  8.239229  8.488863
 [8]  7.487387        NA  8.817166
> rowMax(tmp5,na.rm=TRUE)
 [1] 468.98965  86.87533  89.14691  90.26377  87.10558  89.03076  88.06140
 [8]  91.12016        NA  90.28755
> rowMin(tmp5,na.rm=TRUE)
 [1] 54.83915 56.14745 57.47535 53.72699 57.34030 58.87733 53.44690 56.32366
 [9]       NA 59.00589
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 117.49577  70.54393  72.46259  69.66367  68.35743  72.26945  70.56981
 [8]  69.14505       NaN  72.50840  67.93534  71.49786  64.94116  73.65957
[15]  74.12374  66.73541  73.85229  75.25924  67.25744  75.38480
> colSums(tmp5,na.rm=TRUE)
 [1] 1057.4619  634.8953  652.1633  626.9730  615.2168  650.4251  635.1283
 [8]  622.3054    0.0000  652.5756  611.4181  643.4807  584.4704  662.9361
[15]  667.1137  600.6187  664.6706  677.3331  605.3170  678.4632
> colVars(tmp5,na.rm=TRUE)
 [1] 17441.88390   133.27999    33.12131   104.80308    81.60900    42.98778
 [7]    48.34015    35.91866          NA    75.51140    45.10326    60.69612
[13]    62.84727   157.47519   131.76247    45.62626   179.43213    70.74994
[19]    56.17628    54.54075
> colSd(tmp5,na.rm=TRUE)
 [1] 132.067725  11.544695   5.755111  10.237337   9.033770   6.556507
 [7]   6.952708   5.993218         NA   8.689730   6.715896   7.790772
[13]   7.927627  12.548912  11.478783   6.754721  13.395228   8.411299
[19]   7.495084   7.385171
> colMax(tmp5,na.rm=TRUE)
 [1] 468.98965  90.26377  81.90936  80.67166  82.98888  84.46230  81.12241
 [8]  75.69504      -Inf  85.62437  75.00617  89.02097  78.92500  90.28755
[15]  87.10558  78.64053  91.12016  86.69275  77.41501  86.04284
> colMin(tmp5,na.rm=TRUE)
 [1] 57.34030 56.73895 64.54488 56.47762 56.14745 67.14335 58.58090 59.24291
 [9]      Inf 58.94729 53.72699 64.79448 54.83915 53.44690 59.00589 55.79025
[17] 56.71387 60.38062 58.63355 58.44160
> 
> 
> 
> 
> 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] 133.44958 132.54832 281.66249 175.37555 292.91609 144.08900 198.45247
 [8] 202.87653  91.42233 319.30792
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 133.44958 132.54832 281.66249 175.37555 292.91609 144.08900 198.45247
 [8] 202.87653  91.42233 319.30792
> 
> 
> 
> copymatrix <- matrix(rnorm(200,150,15),10,20)
> 
> tmp5[1:10,1:20] <- copymatrix
> which.row <- 1
> which.col  <- 3
> cat(which.row," ",which.col,"\n")
1   3 
> tmp5[which.row,which.col] <- NA
> copymatrix[which.row,which.col] <- NA
> 
> colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE)
 [1] -5.684342e-14  5.684342e-14  1.136868e-13  4.263256e-14  0.000000e+00
 [6] -1.705303e-13 -2.273737e-13  0.000000e+00  0.000000e+00  1.136868e-13
[11]  2.273737e-13  1.705303e-13 -5.684342e-14 -8.526513e-14  1.136868e-13
[16]  0.000000e+00  1.705303e-13  8.526513e-14  1.136868e-13 -5.684342e-14
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## making sure these things agree
> ##
> ## first when there is no NA
> 
> 
> 
> agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){
+ 
+   if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Max")
+   }
+   
+ 
+   if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Min")
+   }
+ 
+ 
+   if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){
+ 
+     cat(Sum(buff.matrix,na.rm=TRUE),"\n")
+     cat(sum(r.matrix,na.rm=TRUE),"\n")
+     cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n")
+     
+     stop("No agreement in Sum")
+   }
+   
+   if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){
+     stop("No agreement in mean")
+   }
+   
+   
+   if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){
+     stop("No agreement in Var")
+   }
+   
+   
+ 
+   if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowMeans")
+   }
+   
+   
+   if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colMeans")
+   }
+   
+   
+   if(any(abs(rowSums(buff.matrix,na.rm=TRUE)  -  apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in rowSums")
+   }
+   
+   
+   if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colSums")
+   }
+   
+   ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when 
+   ### computing variance
+   my.Var <- function(x,na.rm=FALSE){
+    if (all(is.na(x))){
+      return(NA)
+    } else {
+      var(x,na.rm=na.rm)
+    }
+ 
+   }
+   
+   if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+   
+   
+   if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+ 
+ 
+   if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+ 
+   if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+   
+   
+   if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+   
+ 
+   if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+ 
+   if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMedian")
+   }
+ 
+   if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colRanges")
+   }
+ 
+ 
+   
+ }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> for (rep in 1:20){
+   copymatrix <- matrix(rnorm(200,150,15),10,20)
+   
+   tmp5[1:10,1:20] <- copymatrix
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ## now lets assign some NA values and check agreement
+ 
+   which.row <- sample(1:10,1,replace=TRUE)
+   which.col  <- sample(1:20,1,replace=TRUE)
+   
+   cat(which.row," ",which.col,"\n")
+   
+   tmp5[which.row,which.col] <- NA
+   copymatrix[which.row,which.col] <- NA
+   
+   agree.checks(tmp5,copymatrix)
+ 
+   ## make an entire row NA
+   tmp5[which.row,] <- NA
+   copymatrix[which.row,] <- NA
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ### also make an entire col NA
+   tmp5[,which.col] <- NA
+   copymatrix[,which.col] <- NA
+ 
+   agree.checks(tmp5,copymatrix)
+ 
+   ### now make 1 element non NA with NA in the rest of row and column
+ 
+   tmp5[which.row,which.col] <- rnorm(1,150,15)
+   copymatrix[which.row,which.col] <- tmp5[which.row,which.col]
+ 
+   agree.checks(tmp5,copymatrix)
+ }
3   19 
1   14 
1   5 
10   13 
2   9 
8   11 
5   7 
5   16 
9   1 
2   18 
8   9 
9   7 
6   1 
3   16 
1   16 
10   17 
9   4 
1   20 
1   10 
7   10 
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] 4.427062
> Min(tmp)
[1] -1.914464
> mean(tmp)
[1] 0.04492234
> Sum(tmp)
[1] 4.492234
> Var(tmp)
[1] 1.07554
> 
> rowMeans(tmp)
[1] 0.04492234
> rowSums(tmp)
[1] 4.492234
> rowVars(tmp)
[1] 1.07554
> rowSd(tmp)
[1] 1.037082
> rowMax(tmp)
[1] 4.427062
> rowMin(tmp)
[1] -1.914464
> 
> colMeans(tmp)
  [1] -0.35372554 -0.29007026  0.92554368  0.05556540 -1.02160988 -0.28154309
  [7] -0.41064711 -0.46217719 -0.90785963  0.73112971  1.15118884 -0.23025444
 [13]  0.82961279  4.42706155  2.00054918 -0.07003976  1.06148460 -1.60164257
 [19]  0.13148942  0.71655102  1.83470161 -0.54355468 -0.07714368 -1.27157085
 [25] -0.07535437  0.64532799 -0.23313105  1.39806869  0.92995469 -0.85128543
 [31]  0.03657897 -1.06443463 -0.55840876  1.48287246  1.01953658 -1.91446436
 [37] -0.18670163 -0.98494413  0.16089328 -0.45468447  0.50127449 -0.37578400
 [43] -0.29116869 -1.53967119  0.25345017  0.35654935 -1.27121415  1.47820134
 [49] -1.61020436  0.30443821 -0.58313458  1.32726755  1.20490422  1.46760953
 [55] -1.45343125 -0.39679665  0.56990150 -1.47876553 -0.25635019  1.08194751
 [61]  0.75527462  0.69298218  0.44359033 -0.91849082  0.63404576 -0.11154952
 [67] -0.45571389  1.59266502 -0.38776095 -0.90121392  0.47106856 -0.31658369
 [73] -0.64509246  0.63684779  0.83135077  0.52097225  1.30052020 -1.29865737
 [79] -1.10895747 -0.17772828  0.33130899  0.53367063 -1.21314430  0.21733394
 [85] -1.53105147 -0.35777755 -0.56094823  0.36383418  0.40418018  0.80473376
 [91] -1.02523060 -0.10855403 -1.41212023  0.29152993 -1.65252739  0.32476861
 [97]  1.76232428 -0.79342918 -0.46907805  2.04295520
> colSums(tmp)
  [1] -0.35372554 -0.29007026  0.92554368  0.05556540 -1.02160988 -0.28154309
  [7] -0.41064711 -0.46217719 -0.90785963  0.73112971  1.15118884 -0.23025444
 [13]  0.82961279  4.42706155  2.00054918 -0.07003976  1.06148460 -1.60164257
 [19]  0.13148942  0.71655102  1.83470161 -0.54355468 -0.07714368 -1.27157085
 [25] -0.07535437  0.64532799 -0.23313105  1.39806869  0.92995469 -0.85128543
 [31]  0.03657897 -1.06443463 -0.55840876  1.48287246  1.01953658 -1.91446436
 [37] -0.18670163 -0.98494413  0.16089328 -0.45468447  0.50127449 -0.37578400
 [43] -0.29116869 -1.53967119  0.25345017  0.35654935 -1.27121415  1.47820134
 [49] -1.61020436  0.30443821 -0.58313458  1.32726755  1.20490422  1.46760953
 [55] -1.45343125 -0.39679665  0.56990150 -1.47876553 -0.25635019  1.08194751
 [61]  0.75527462  0.69298218  0.44359033 -0.91849082  0.63404576 -0.11154952
 [67] -0.45571389  1.59266502 -0.38776095 -0.90121392  0.47106856 -0.31658369
 [73] -0.64509246  0.63684779  0.83135077  0.52097225  1.30052020 -1.29865737
 [79] -1.10895747 -0.17772828  0.33130899  0.53367063 -1.21314430  0.21733394
 [85] -1.53105147 -0.35777755 -0.56094823  0.36383418  0.40418018  0.80473376
 [91] -1.02523060 -0.10855403 -1.41212023  0.29152993 -1.65252739  0.32476861
 [97]  1.76232428 -0.79342918 -0.46907805  2.04295520
> 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.35372554 -0.29007026  0.92554368  0.05556540 -1.02160988 -0.28154309
  [7] -0.41064711 -0.46217719 -0.90785963  0.73112971  1.15118884 -0.23025444
 [13]  0.82961279  4.42706155  2.00054918 -0.07003976  1.06148460 -1.60164257
 [19]  0.13148942  0.71655102  1.83470161 -0.54355468 -0.07714368 -1.27157085
 [25] -0.07535437  0.64532799 -0.23313105  1.39806869  0.92995469 -0.85128543
 [31]  0.03657897 -1.06443463 -0.55840876  1.48287246  1.01953658 -1.91446436
 [37] -0.18670163 -0.98494413  0.16089328 -0.45468447  0.50127449 -0.37578400
 [43] -0.29116869 -1.53967119  0.25345017  0.35654935 -1.27121415  1.47820134
 [49] -1.61020436  0.30443821 -0.58313458  1.32726755  1.20490422  1.46760953
 [55] -1.45343125 -0.39679665  0.56990150 -1.47876553 -0.25635019  1.08194751
 [61]  0.75527462  0.69298218  0.44359033 -0.91849082  0.63404576 -0.11154952
 [67] -0.45571389  1.59266502 -0.38776095 -0.90121392  0.47106856 -0.31658369
 [73] -0.64509246  0.63684779  0.83135077  0.52097225  1.30052020 -1.29865737
 [79] -1.10895747 -0.17772828  0.33130899  0.53367063 -1.21314430  0.21733394
 [85] -1.53105147 -0.35777755 -0.56094823  0.36383418  0.40418018  0.80473376
 [91] -1.02523060 -0.10855403 -1.41212023  0.29152993 -1.65252739  0.32476861
 [97]  1.76232428 -0.79342918 -0.46907805  2.04295520
> colMin(tmp)
  [1] -0.35372554 -0.29007026  0.92554368  0.05556540 -1.02160988 -0.28154309
  [7] -0.41064711 -0.46217719 -0.90785963  0.73112971  1.15118884 -0.23025444
 [13]  0.82961279  4.42706155  2.00054918 -0.07003976  1.06148460 -1.60164257
 [19]  0.13148942  0.71655102  1.83470161 -0.54355468 -0.07714368 -1.27157085
 [25] -0.07535437  0.64532799 -0.23313105  1.39806869  0.92995469 -0.85128543
 [31]  0.03657897 -1.06443463 -0.55840876  1.48287246  1.01953658 -1.91446436
 [37] -0.18670163 -0.98494413  0.16089328 -0.45468447  0.50127449 -0.37578400
 [43] -0.29116869 -1.53967119  0.25345017  0.35654935 -1.27121415  1.47820134
 [49] -1.61020436  0.30443821 -0.58313458  1.32726755  1.20490422  1.46760953
 [55] -1.45343125 -0.39679665  0.56990150 -1.47876553 -0.25635019  1.08194751
 [61]  0.75527462  0.69298218  0.44359033 -0.91849082  0.63404576 -0.11154952
 [67] -0.45571389  1.59266502 -0.38776095 -0.90121392  0.47106856 -0.31658369
 [73] -0.64509246  0.63684779  0.83135077  0.52097225  1.30052020 -1.29865737
 [79] -1.10895747 -0.17772828  0.33130899  0.53367063 -1.21314430  0.21733394
 [85] -1.53105147 -0.35777755 -0.56094823  0.36383418  0.40418018  0.80473376
 [91] -1.02523060 -0.10855403 -1.41212023  0.29152993 -1.65252739  0.32476861
 [97]  1.76232428 -0.79342918 -0.46907805  2.04295520
> colMedians(tmp)
  [1] -0.35372554 -0.29007026  0.92554368  0.05556540 -1.02160988 -0.28154309
  [7] -0.41064711 -0.46217719 -0.90785963  0.73112971  1.15118884 -0.23025444
 [13]  0.82961279  4.42706155  2.00054918 -0.07003976  1.06148460 -1.60164257
 [19]  0.13148942  0.71655102  1.83470161 -0.54355468 -0.07714368 -1.27157085
 [25] -0.07535437  0.64532799 -0.23313105  1.39806869  0.92995469 -0.85128543
 [31]  0.03657897 -1.06443463 -0.55840876  1.48287246  1.01953658 -1.91446436
 [37] -0.18670163 -0.98494413  0.16089328 -0.45468447  0.50127449 -0.37578400
 [43] -0.29116869 -1.53967119  0.25345017  0.35654935 -1.27121415  1.47820134
 [49] -1.61020436  0.30443821 -0.58313458  1.32726755  1.20490422  1.46760953
 [55] -1.45343125 -0.39679665  0.56990150 -1.47876553 -0.25635019  1.08194751
 [61]  0.75527462  0.69298218  0.44359033 -0.91849082  0.63404576 -0.11154952
 [67] -0.45571389  1.59266502 -0.38776095 -0.90121392  0.47106856 -0.31658369
 [73] -0.64509246  0.63684779  0.83135077  0.52097225  1.30052020 -1.29865737
 [79] -1.10895747 -0.17772828  0.33130899  0.53367063 -1.21314430  0.21733394
 [85] -1.53105147 -0.35777755 -0.56094823  0.36383418  0.40418018  0.80473376
 [91] -1.02523060 -0.10855403 -1.41212023  0.29152993 -1.65252739  0.32476861
 [97]  1.76232428 -0.79342918 -0.46907805  2.04295520
> colRanges(tmp)
           [,1]       [,2]      [,3]      [,4]     [,5]       [,6]       [,7]
[1,] -0.3537255 -0.2900703 0.9255437 0.0555654 -1.02161 -0.2815431 -0.4106471
[2,] -0.3537255 -0.2900703 0.9255437 0.0555654 -1.02161 -0.2815431 -0.4106471
           [,8]       [,9]     [,10]    [,11]      [,12]     [,13]    [,14]
[1,] -0.4621772 -0.9078596 0.7311297 1.151189 -0.2302544 0.8296128 4.427062
[2,] -0.4621772 -0.9078596 0.7311297 1.151189 -0.2302544 0.8296128 4.427062
        [,15]       [,16]    [,17]     [,18]     [,19]    [,20]    [,21]
[1,] 2.000549 -0.07003976 1.061485 -1.601643 0.1314894 0.716551 1.834702
[2,] 2.000549 -0.07003976 1.061485 -1.601643 0.1314894 0.716551 1.834702
          [,22]       [,23]     [,24]       [,25]    [,26]     [,27]    [,28]
[1,] -0.5435547 -0.07714368 -1.271571 -0.07535437 0.645328 -0.233131 1.398069
[2,] -0.5435547 -0.07714368 -1.271571 -0.07535437 0.645328 -0.233131 1.398069
         [,29]      [,30]      [,31]     [,32]      [,33]    [,34]    [,35]
[1,] 0.9299547 -0.8512854 0.03657897 -1.064435 -0.5584088 1.482872 1.019537
[2,] 0.9299547 -0.8512854 0.03657897 -1.064435 -0.5584088 1.482872 1.019537
         [,36]      [,37]      [,38]     [,39]      [,40]     [,41]     [,42]
[1,] -1.914464 -0.1867016 -0.9849441 0.1608933 -0.4546845 0.5012745 -0.375784
[2,] -1.914464 -0.1867016 -0.9849441 0.1608933 -0.4546845 0.5012745 -0.375784
          [,43]     [,44]     [,45]     [,46]     [,47]    [,48]     [,49]
[1,] -0.2911687 -1.539671 0.2534502 0.3565493 -1.271214 1.478201 -1.610204
[2,] -0.2911687 -1.539671 0.2534502 0.3565493 -1.271214 1.478201 -1.610204
         [,50]      [,51]    [,52]    [,53]   [,54]     [,55]      [,56]
[1,] 0.3044382 -0.5831346 1.327268 1.204904 1.46761 -1.453431 -0.3967967
[2,] 0.3044382 -0.5831346 1.327268 1.204904 1.46761 -1.453431 -0.3967967
         [,57]     [,58]      [,59]    [,60]     [,61]     [,62]     [,63]
[1,] 0.5699015 -1.478766 -0.2563502 1.081948 0.7552746 0.6929822 0.4435903
[2,] 0.5699015 -1.478766 -0.2563502 1.081948 0.7552746 0.6929822 0.4435903
          [,64]     [,65]      [,66]      [,67]    [,68]     [,69]      [,70]
[1,] -0.9184908 0.6340458 -0.1115495 -0.4557139 1.592665 -0.387761 -0.9012139
[2,] -0.9184908 0.6340458 -0.1115495 -0.4557139 1.592665 -0.387761 -0.9012139
         [,71]      [,72]      [,73]     [,74]     [,75]     [,76]   [,77]
[1,] 0.4710686 -0.3165837 -0.6450925 0.6368478 0.8313508 0.5209723 1.30052
[2,] 0.4710686 -0.3165837 -0.6450925 0.6368478 0.8313508 0.5209723 1.30052
         [,78]     [,79]      [,80]    [,81]     [,82]     [,83]     [,84]
[1,] -1.298657 -1.108957 -0.1777283 0.331309 0.5336706 -1.213144 0.2173339
[2,] -1.298657 -1.108957 -0.1777283 0.331309 0.5336706 -1.213144 0.2173339
         [,85]      [,86]      [,87]     [,88]     [,89]     [,90]     [,91]
[1,] -1.531051 -0.3577776 -0.5609482 0.3638342 0.4041802 0.8047338 -1.025231
[2,] -1.531051 -0.3577776 -0.5609482 0.3638342 0.4041802 0.8047338 -1.025231
         [,92]    [,93]     [,94]     [,95]     [,96]    [,97]      [,98]
[1,] -0.108554 -1.41212 0.2915299 -1.652527 0.3247686 1.762324 -0.7934292
[2,] -0.108554 -1.41212 0.2915299 -1.652527 0.3247686 1.762324 -0.7934292
         [,99]   [,100]
[1,] -0.469078 2.042955
[2,] -0.469078 2.042955
> 
> 
> Max(tmp2)
[1] 2.494535
> Min(tmp2)
[1] -2.813178
> mean(tmp2)
[1] -0.1272505
> Sum(tmp2)
[1] -12.72505
> Var(tmp2)
[1] 1.190691
> 
> rowMeans(tmp2)
  [1] -2.322851566  1.263776045 -1.389112472  0.885519071 -1.653302253
  [6]  0.550540132  0.974293246 -1.170477143  2.494535249 -0.313098109
 [11] -1.209096072 -0.724390537  0.279883730 -0.005488819  2.165525907
 [16] -0.376846526  0.433949756  1.028774845 -0.174202633 -0.129814478
 [21]  0.233909334  2.311376848 -0.004872179 -0.617041763 -0.739248325
 [26] -0.582441512 -0.971398243 -0.807512660 -0.399011917  1.183677606
 [31] -0.517236396 -0.685306530 -0.105320377 -1.053521812 -1.004754192
 [36]  0.084322951 -0.352593756 -1.821793935  0.904754700  1.228891989
 [41]  0.961618871  0.017718147  1.174617368 -1.160721186 -0.227711992
 [46] -1.363337262 -0.067553192 -0.019779286 -0.058889827 -2.130300339
 [51]  1.602501014 -0.530423851  0.305155488  0.173278998 -0.390468021
 [56] -1.028257957  0.392945458 -1.104933226  0.733485082 -0.177873843
 [61]  0.369632874 -0.157285070 -0.717661797 -1.949710738  0.792914734
 [66]  2.397018313 -0.244752002  0.309908858 -1.466595548  0.314994112
 [71] -0.114702488  1.302258641 -1.260391956 -1.674593983 -1.065821559
 [76] -0.376842057 -1.306664698 -0.354326563 -0.256723162 -1.004638563
 [81]  1.562055253 -0.080580097  0.814533691 -0.734973324 -1.499627768
 [86]  1.548421849  1.082379461 -0.633750968 -2.813177735 -0.388211324
 [91]  2.460949288 -1.059632129 -0.818116264  0.753953178  0.250939384
 [96] -0.356357980  0.945461607 -1.994068531  0.265076311  0.439591033
> rowSums(tmp2)
  [1] -2.322851566  1.263776045 -1.389112472  0.885519071 -1.653302253
  [6]  0.550540132  0.974293246 -1.170477143  2.494535249 -0.313098109
 [11] -1.209096072 -0.724390537  0.279883730 -0.005488819  2.165525907
 [16] -0.376846526  0.433949756  1.028774845 -0.174202633 -0.129814478
 [21]  0.233909334  2.311376848 -0.004872179 -0.617041763 -0.739248325
 [26] -0.582441512 -0.971398243 -0.807512660 -0.399011917  1.183677606
 [31] -0.517236396 -0.685306530 -0.105320377 -1.053521812 -1.004754192
 [36]  0.084322951 -0.352593756 -1.821793935  0.904754700  1.228891989
 [41]  0.961618871  0.017718147  1.174617368 -1.160721186 -0.227711992
 [46] -1.363337262 -0.067553192 -0.019779286 -0.058889827 -2.130300339
 [51]  1.602501014 -0.530423851  0.305155488  0.173278998 -0.390468021
 [56] -1.028257957  0.392945458 -1.104933226  0.733485082 -0.177873843
 [61]  0.369632874 -0.157285070 -0.717661797 -1.949710738  0.792914734
 [66]  2.397018313 -0.244752002  0.309908858 -1.466595548  0.314994112
 [71] -0.114702488  1.302258641 -1.260391956 -1.674593983 -1.065821559
 [76] -0.376842057 -1.306664698 -0.354326563 -0.256723162 -1.004638563
 [81]  1.562055253 -0.080580097  0.814533691 -0.734973324 -1.499627768
 [86]  1.548421849  1.082379461 -0.633750968 -2.813177735 -0.388211324
 [91]  2.460949288 -1.059632129 -0.818116264  0.753953178  0.250939384
 [96] -0.356357980  0.945461607 -1.994068531  0.265076311  0.439591033
> 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] -2.322851566  1.263776045 -1.389112472  0.885519071 -1.653302253
  [6]  0.550540132  0.974293246 -1.170477143  2.494535249 -0.313098109
 [11] -1.209096072 -0.724390537  0.279883730 -0.005488819  2.165525907
 [16] -0.376846526  0.433949756  1.028774845 -0.174202633 -0.129814478
 [21]  0.233909334  2.311376848 -0.004872179 -0.617041763 -0.739248325
 [26] -0.582441512 -0.971398243 -0.807512660 -0.399011917  1.183677606
 [31] -0.517236396 -0.685306530 -0.105320377 -1.053521812 -1.004754192
 [36]  0.084322951 -0.352593756 -1.821793935  0.904754700  1.228891989
 [41]  0.961618871  0.017718147  1.174617368 -1.160721186 -0.227711992
 [46] -1.363337262 -0.067553192 -0.019779286 -0.058889827 -2.130300339
 [51]  1.602501014 -0.530423851  0.305155488  0.173278998 -0.390468021
 [56] -1.028257957  0.392945458 -1.104933226  0.733485082 -0.177873843
 [61]  0.369632874 -0.157285070 -0.717661797 -1.949710738  0.792914734
 [66]  2.397018313 -0.244752002  0.309908858 -1.466595548  0.314994112
 [71] -0.114702488  1.302258641 -1.260391956 -1.674593983 -1.065821559
 [76] -0.376842057 -1.306664698 -0.354326563 -0.256723162 -1.004638563
 [81]  1.562055253 -0.080580097  0.814533691 -0.734973324 -1.499627768
 [86]  1.548421849  1.082379461 -0.633750968 -2.813177735 -0.388211324
 [91]  2.460949288 -1.059632129 -0.818116264  0.753953178  0.250939384
 [96] -0.356357980  0.945461607 -1.994068531  0.265076311  0.439591033
> rowMin(tmp2)
  [1] -2.322851566  1.263776045 -1.389112472  0.885519071 -1.653302253
  [6]  0.550540132  0.974293246 -1.170477143  2.494535249 -0.313098109
 [11] -1.209096072 -0.724390537  0.279883730 -0.005488819  2.165525907
 [16] -0.376846526  0.433949756  1.028774845 -0.174202633 -0.129814478
 [21]  0.233909334  2.311376848 -0.004872179 -0.617041763 -0.739248325
 [26] -0.582441512 -0.971398243 -0.807512660 -0.399011917  1.183677606
 [31] -0.517236396 -0.685306530 -0.105320377 -1.053521812 -1.004754192
 [36]  0.084322951 -0.352593756 -1.821793935  0.904754700  1.228891989
 [41]  0.961618871  0.017718147  1.174617368 -1.160721186 -0.227711992
 [46] -1.363337262 -0.067553192 -0.019779286 -0.058889827 -2.130300339
 [51]  1.602501014 -0.530423851  0.305155488  0.173278998 -0.390468021
 [56] -1.028257957  0.392945458 -1.104933226  0.733485082 -0.177873843
 [61]  0.369632874 -0.157285070 -0.717661797 -1.949710738  0.792914734
 [66]  2.397018313 -0.244752002  0.309908858 -1.466595548  0.314994112
 [71] -0.114702488  1.302258641 -1.260391956 -1.674593983 -1.065821559
 [76] -0.376842057 -1.306664698 -0.354326563 -0.256723162 -1.004638563
 [81]  1.562055253 -0.080580097  0.814533691 -0.734973324 -1.499627768
 [86]  1.548421849  1.082379461 -0.633750968 -2.813177735 -0.388211324
 [91]  2.460949288 -1.059632129 -0.818116264  0.753953178  0.250939384
 [96] -0.356357980  0.945461607 -1.994068531  0.265076311  0.439591033
> 
> colMeans(tmp2)
[1] -0.1272505
> colSums(tmp2)
[1] -12.72505
> colVars(tmp2)
[1] 1.190691
> colSd(tmp2)
[1] 1.091188
> colMax(tmp2)
[1] 2.494535
> colMin(tmp2)
[1] -2.813178
> colMedians(tmp2)
[1] -0.1760382
> colRanges(tmp2)
          [,1]
[1,] -2.813178
[2,]  2.494535
> 
> dataset1 <- matrix(dataset1,1,100)
> 
> agree.checks(tmp,dataset1)
> 
> dataset2 <- matrix(dataset2,100,1)
> agree.checks(tmp2,dataset2)
>   
> 
> tmp <- createBufferedMatrix(10,10)
> 
> tmp[1:10,1:10] <- rnorm(100)
> colApply(tmp,sum)
 [1] -1.951250 -5.876568 -8.765473 -1.268653  5.378153 -2.855139  2.607019
 [8]  3.014860 -3.043780 -1.214596
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.8377701
[2,] -0.7831243
[3,] -0.2072929
[4,]  0.3235445
[5,]  1.1733004
> 
> rowApply(tmp,sum)
 [1] -0.07866149 -0.23271339  2.72625806  2.85270423 -1.95582582 -2.45544905
 [7] -2.50642977 -5.70228312 -0.68110867 -5.94191757
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    6    5    5    3    9    2   10    9    2     3
 [2,]    4    1    3    2    2    7    6    8    9     1
 [3,]    2    3    2    6    1    1    8    5    1     8
 [4,]    1    9    8    5    3    8    5    4    8     9
 [5,]    5   10    9   10    8    4    1    6   10    10
 [6,]    8    6    7    4    5    3    9    1    4     7
 [7,]    9    7   10    8    7    5    7    2    6     6
 [8,]   10    8    6    9    4    6    3   10    5     5
 [9,]    3    4    1    1   10   10    4    3    3     4
[10,]    7    2    4    7    6    9    2    7    7     2
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1]  3.6498663 -1.5280498 -0.1624128 -2.3312289 -0.4112826  2.2418377
 [7]  0.6248729 -3.2571420 -0.2221779  2.2712194  0.3507902 -1.2909674
[13] -4.2210704  6.5241284  3.1670856 -1.9648888  0.4727785  0.4774808
[19] -3.6003602  1.6977354
> colApply(tmp,quantile)[,1]
            [,1]
[1,] -0.30117441
[2,]  0.07449434
[3,]  0.73658386
[4,]  1.22222799
[5,]  1.91773449
> 
> rowApply(tmp,sum)
[1]  0.1707623  7.7226675  1.5105680 -1.4010239 -5.5147595
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   20    6   15   12   20
[2,]   14   14    1    9    2
[3,]   13   12    7   11    5
[4,]    8    5   19    1    8
[5,]    1   15    5   16   12
> 
> 
> as.matrix(tmp)
            [,1]       [,2]       [,3]       [,4]         [,5]       [,6]
[1,]  1.91773449  0.5809791  0.2288273 -0.8167024 -1.566656707 -0.3054456
[2,] -0.30117441  0.8976930  0.8763748 -0.5209984  0.999638633  0.2670980
[3,]  0.73658386 -1.6405496 -0.3807326  1.5537866 -0.431339542  0.6155940
[4,]  0.07449434 -0.2528720 -0.1198427 -1.9738265  0.579390363  2.6278753
[5,]  1.22222799 -1.1133004 -0.7670397 -0.5734881  0.007684665 -0.9632840
            [,7]       [,8]       [,9]      [,10]       [,11]        [,12]
[1,]  1.35977870 -0.8474206 -0.9061173  1.3535482 -0.03486871 -0.883367378
[2,]  0.06919985 -0.8434886  0.4424022  1.3204231  0.49810618  0.893554722
[3,] -0.29930351 -1.1050990  0.7532877  0.2054953 -1.17274605  0.005861141
[4,] -0.81974731  0.2125003  0.1877681 -0.2374369  0.60715657 -1.461269722
[5,]  0.31494520 -0.6736340 -0.6995187 -0.3708104  0.45314219  0.154253818
          [,13]     [,14]      [,15]       [,16]        [,17]       [,18]
[1,]  0.7471538 1.6546551  1.4257308 -0.04143667 -1.500628215 -0.89824344
[2,] -1.1748523 1.8044904  1.2150147 -1.58146190  1.310836651  0.64525405
[3,] -0.1700695 2.2979381 -0.9394818 -0.09143393  0.007516485  1.09229678
[4,] -1.0406008 0.3764319  0.7452351 -0.28951503  1.031618797 -0.29021038
[5,] -2.5827016 0.3906129  0.7205868  0.03895877 -0.376565260 -0.07161616
          [,19]      [,20]
[1,] -0.9568743 -0.3398839
[2,] -0.7965452  1.7011019
[3,] -0.3966517  0.8696151
[4,] -0.5891911 -0.7689823
[5,] -0.8610980  0.2358845
> 
> 
> is.BufferedMatrix(tmp)
[1] TRUE
> 
> as.BufferedMatrix(as.matrix(tmp))
BufferedMatrix object
Matrix size:  5 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  800  bytes.
> 
> 
> 
> subBufferedMatrix(tmp,1:5,1:5)
BufferedMatrix object
Matrix size:  5 5 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  652  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  565  bytes.
Disk usage :  160  bytes.
> subBufferedMatrix(tmp,1:3,)
BufferedMatrix object
Matrix size:  3 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  480  bytes.
> 
> 
> rm(tmp)
> 
> 
> ###
> ### Testing colnames and rownames
> ###
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> 
> 
> colnames(tmp)
NULL
> rownames(tmp)
NULL
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> colnames(tmp)
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"
> rownames(tmp)
[1] "row1" "row2" "row3" "row4" "row5"
> 
> 
> tmp["row1",]
          col1     col2        col3      col4     col5      col6       col7
row1 0.7621278 2.009707 -0.09373391 0.8589028 1.145404 -1.474786 0.03543875
          col8       col9      col10     col11      col12      col13     col14
row1 0.0301536 0.02254976 -0.4524916 -1.350705 -0.2382903 -0.7347332 0.1483075
         col15     col16     col17     col18     col19     col20
row1 0.2358228 0.5962439 0.6932895 0.1908814 0.1680347 0.6693557
> tmp[,"col10"]
          col10
row1 -0.4524916
row2  0.3190536
row3 -0.8779576
row4  0.4831841
row5  1.6110553
> tmp[c("row1","row5"),]
           col1     col2        col3       col4      col5       col6
row1  0.7621278 2.009707 -0.09373391  0.8589028 1.1454045 -1.4747859
row5 -0.4586562 0.241687  0.76435220 -0.7016787 0.4526319  0.2831794
            col7      col8       col9      col10      col11      col12
row1  0.03543875 0.0301536 0.02254976 -0.4524916 -1.3507051 -0.2382903
row5 -0.02971774 0.2989580 0.99870641  1.6110553 -0.5194621 -0.6953614
          col13      col14      col15     col16     col17     col18      col19
row1 -0.7347332  0.1483075  0.2358228 0.5962439 0.6932895 0.1908814  0.1680347
row5 -1.0101870 -0.1690369 -1.2167059 0.1797960 0.2141780 1.6787249 -1.8228294
          col20
row1  0.6693557
row5 -0.5772010
> tmp[,c("col6","col20")]
           col6      col20
row1 -1.4747859  0.6693557
row2 -0.7161467 -0.2336857
row3 -1.3217285  0.9756234
row4 -1.2622509 -0.7913239
row5  0.2831794 -0.5772010
> tmp[c("row1","row5"),c("col6","col20")]
           col6      col20
row1 -1.4747859  0.6693557
row5  0.2831794 -0.5772010
> 
> 
> 
> 
> 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 50.80306 50.49877 50.25618 50.2705 50.47828 105.648 50.50714 50.82928
         col9    col10   col11    col12   col13    col14    col15    col16
row1 49.18858 49.19748 50.3865 50.93311 49.9415 48.56421 49.62051 50.85072
        col17    col18    col19  col20
row1 50.35323 50.75006 48.18643 106.09
> tmp[,"col10"]
        col10
row1 49.19748
row2 32.22572
row3 30.68160
row4 29.43431
row5 49.49047
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 50.80306 50.49877 50.25618 50.27050 50.47828 105.6480 50.50714 50.82928
row5 48.42551 49.78964 48.55825 51.32384 50.69606 105.4028 50.54365 49.65262
         col9    col10    col11    col12    col13    col14    col15    col16
row1 49.18858 49.19748 50.38650 50.93311 49.94150 48.56421 49.62051 50.85072
row5 50.29051 49.49047 50.28596 51.10185 49.62444 52.65147 49.40856 49.45757
        col17    col18    col19    col20
row1 50.35323 50.75006 48.18643 106.0900
row5 49.69936 50.28990 51.36972 107.5033
> tmp[,c("col6","col20")]
          col6     col20
row1 105.64797 106.08996
row2  76.13466  73.39854
row3  73.45401  75.32001
row4  75.35511  75.02095
row5 105.40278 107.50332
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 105.6480 106.0900
row5 105.4028 107.5033
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 105.6480 106.0900
row5 105.4028 107.5033
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
           col13
[1,]  0.15679857
[2,] -1.33394409
[3,] -0.47560220
[4,] -0.00561664
[5,]  1.02519088
> tmp[,c("col17","col7")]
           col17       col7
[1,] -0.01610403  0.0380109
[2,]  0.48729076  1.1561005
[3,] -1.20992452 -0.2112349
[4,] -0.78699809 -0.6056557
[5,] -1.49630690  1.0287880
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6      col20
[1,] -1.9794430  0.2907842
[2,]  0.2777679 -0.6039315
[3,]  0.9912218 -0.8768663
[4,] -1.2192087  1.1854351
[5,] -0.9442313  0.7129595
> subBufferedMatrix(tmp,1,c("col6"))[,1]
          col1
[1,] -1.979443
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,] -1.9794430
[2,]  0.2777679
> 
> 
> 
> 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]
row3 -1.205952  0.96005025 -0.1882272 -0.8417193 0.3434165  1.2226758
row1  1.012711 -0.03063218  0.1825827 -1.5143666 1.9213333 -0.1072602
           [,7]       [,8]        [,9]      [,10]      [,11]     [,12]
row3 -0.9338532  0.4196072 -0.22467844 -0.4811634 -0.5139877 1.1088471
row1  0.7051393 -0.2414822 -0.04556853 -0.8386631 -0.1467817 0.2179852
          [,13]     [,14]      [,15]      [,16]      [,17]     [,18]      [,19]
row3 -0.6222017 0.2070094  0.0434427  0.7103283 -0.1081128 0.2463430 -1.3287344
row1 -0.2063670 0.1203139 -1.5322498 -1.7495250  0.7014477 0.8970485  0.9414966
          [,20]
row3 -0.5411942
row1 -1.4608832
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
          [,1]        [,2]       [,3]      [,4]       [,5]       [,6]     [,7]
row2 -1.539998 -0.03115737 -0.9832776 -1.272729 0.03577394 -0.4006178 1.994436
         [,8]      [,9]     [,10]
row2 1.120634 0.7123749 -2.071103
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
          [,1]       [,2]      [,3]     [,4]      [,5]    [,6]       [,7]
row5 0.1491061 -0.8335382 0.1674976 1.232199 0.3535639 1.06253 -0.7831958
           [,8]      [,9]    [,10]     [,11]      [,12]      [,13]     [,14]
row5 0.05533478 0.1013905 1.137103 -1.459573 -0.3671958 0.08481838 0.1515641
        [,15]      [,16]      [,17]     [,18]     [,19]    [,20]
row5 2.025188 -0.3085447 -0.5393302 -2.738031 -0.567952 1.394751
> 
> 
> 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: 0x5ff3d81f4ca0>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe321d04da"
 [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe2e50d9e0"
 [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe47f1fe21"
 [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe4aca7fe3"
 [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe4942eb9c"
 [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe3bd06cd7"
 [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe7b06dde5"
 [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe31693811"
 [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe7350b769"
[10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe22f384fc"
[11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe59c30ce7"
[12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe33d59073"
[13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe4695f169"
[14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe49de7f40"
[15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d92fe1777eb9e"
> 
> 
> ### 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: 0x5ff3d8aa0350>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x5ff3d8aa0350>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x5ff3d8aa0350>
> rowMedians(tmp)
  [1]  0.0435344076  0.1919252817  0.2802463087  0.4502154319  0.0250254867
  [6]  0.1688918545  0.0365855776 -0.5544747879  0.0961555594 -0.5768535235
 [11]  0.0275406240 -0.1766614635 -0.1774985846  0.0841824287  0.2872231580
 [16]  0.2389324171 -0.0193184887  0.7071367866 -0.0010114812 -0.3885742363
 [21]  0.2914183732 -0.1090304295  0.1178283270 -0.3091616944 -0.1253245169
 [26]  0.1829306440  0.4981435211 -0.2864284181 -0.1070815197  0.1874483505
 [31]  0.3097013342  0.0193935589  0.0438076231 -0.0307168503 -0.1790407610
 [36] -0.6721780924  0.1085848736  0.1182269835  0.1677517894 -0.2930815930
 [41] -0.0356350664 -0.2971133346  0.6121667203 -0.4824848585 -0.0240971875
 [46]  0.9390079182 -0.0783333749 -0.2952458905 -0.1414815767 -0.1712472763
 [51]  0.2805441871 -0.1577580209 -0.0424329993 -0.4954347459 -0.2967391079
 [56]  0.1567908273  0.4269397579 -0.1457180299  0.6026191598  0.2386088939
 [61]  0.1426748246 -0.2977163112 -0.0543316043  0.2871022705 -0.1728801246
 [66] -0.5318116677  0.4517338302 -0.1747713721 -0.2301664150 -0.0919047103
 [71] -0.0766659739 -0.4215929054  0.0191060016 -0.0464983130 -0.0655134203
 [76]  0.0042570613  0.2466717010 -0.1745652427  0.2793686620 -0.3386656097
 [81] -0.1717059702  0.0354511746 -0.6194632286  0.3809354348 -0.2696090117
 [86]  0.0333339562 -0.6343116987  0.0021860093 -0.2900072495 -0.1479091214
 [91]  0.1574285946 -0.6356339606  0.1867989161 -0.3531432230 -0.1274464699
 [96] -0.1506321261 -0.1469131473 -0.1627978805  0.3182331671 -0.0478669682
[101]  0.2365254745  0.2848953324 -0.5275854166  0.2916345771  0.0959814091
[106] -0.0994495644 -0.0422849264  0.4900072553 -0.1207708425 -0.3127430123
[111]  0.2567897236  0.2042841436  0.0203999538 -0.0167769397 -0.5087818635
[116] -0.4297753106 -0.3384605934  0.2547867572  0.0400889108 -0.2917118063
[121]  0.3247227524 -0.3166948778  0.1648104032  0.1292559806  0.3009328593
[126] -0.4222790135 -0.2846938935  0.3972253803  0.0432840985 -0.1402982010
[131] -0.1484592052  1.1119463979  0.0539646468 -0.0774542843 -0.0008546259
[136]  0.3769162942 -0.1445725041 -0.0893128155 -0.2807397350  0.1154541140
[141]  0.2572996428  0.4154320864 -0.3089630505  0.6046840885 -0.3371066468
[146] -0.1351854974  0.2683645952 -0.0225205079 -0.1839990389  0.3146372954
[151] -0.1691195208  0.0173345906  0.1610076590  0.1052116547  0.3637841959
[156] -0.1486106060 -0.1360669502  0.0585039880 -0.1701420469 -0.0853967354
[161]  0.0467565765  0.1333300889  0.0487782922 -0.0023114834  0.0513761766
[166]  0.3286030900 -0.1508188822  0.2379403963  0.0424561848  0.5229714439
[171]  0.0206084959 -0.0809496978  0.3382615663  0.2159987918  0.4253455833
[176]  0.4250497998 -0.3115100853  0.7038651051  0.1124958418  0.0807447733
[181] -0.1132840328 -0.2817126235  0.0948891088  0.1565387267  0.1040402631
[186]  0.3414198439 -0.3272650328  0.0421442460  0.2546950243 -0.0695239841
[191] -0.6733631404  0.5971604040 -0.0440911038 -0.7065238715  0.0056620114
[196] -0.0635576706 -0.0853999056  0.5991900783 -0.7584706244  0.1007574221
[201] -0.0255017940  0.0497306303 -0.0252142117 -0.1491623123  0.5368114525
[206] -0.1612853183  0.0892722679 -0.0051149701  0.0881282141  0.1009888723
[211] -0.4339336304  0.3656647885 -0.5442520383  0.0796470581 -0.4767655896
[216]  0.2105117532 -0.0304627318  0.1143714695 -0.3541176968  0.6018966970
[221] -0.2369410738 -0.0995752638 -0.0168170576  0.5773593392  0.1605086372
[226] -0.1366605904 -0.3328882633 -0.0695828207  0.2120815713 -0.4213358081
> 
> proc.time()
   user  system elapsed 
  1.274   0.643   1.907 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
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: 0x575e0d54c370>
> .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: 0x575e0d54c370>
> .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: 0x575e0d54c370>
> .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: 0x575e0d54c370>
> 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: 0x575e0d5341c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x575e0d5341c0>
> .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: 0x575e0d5341c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x575e0d5341c0>
> .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: 0x575e0d5341c0>
> 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: 0x575e0d817120>
> .Call("R_bm_AddColumn",P)
<pointer: 0x575e0d817120>
> .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: 0x575e0d817120>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x575e0d817120>
> .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: 0x575e0d817120>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x575e0d817120>
> .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: 0x575e0d817120>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x575e0d817120>
> .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: 0x575e0d817120>
> 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: 0x575e0c567390>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x575e0c567390>
> .Call("R_bm_AddColumn",P)
<pointer: 0x575e0c567390>
> .Call("R_bm_AddColumn",P)
<pointer: 0x575e0c567390>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile3d9383389b0c0d" "BufferedMatrixFile3d938368f6e42e"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile3d9383389b0c0d" "BufferedMatrixFile3d938368f6e42e"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x575e0c45e3d0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x575e0c45e3d0>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x575e0c45e3d0>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x575e0c45e3d0>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x575e0c45e3d0>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x575e0c45e3d0>
> .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: 0x575e0df93fa0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x575e0df93fa0>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x575e0df93fa0>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x575e0df93fa0>
> 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: 0x575e0c76bff0>
> .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: 0x575e0c76bff0>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.274   0.051   0.305 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
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.245   0.038   0.272 

Example timings