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

This page was generated on 2025-09-25 11:41 -0400 (Thu, 25 Sep 2025).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo1Linux (Ubuntu 24.04.3 LTS)x86_644.5.1 (2025-06-13) -- "Great Square Root" 4827
merida1macOS 12.7.5 Montereyx86_644.5.1 RC (2025-06-05 r88288) -- "Great Square Root" 4608
kjohnson1macOS 13.6.6 Venturaarm644.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" 4549
kunpeng2Linux (openEuler 24.03 LTS)aarch64R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" 4581
Click on any hostname to see more info about the system (e.g. compilers)      (*) as reported by 'uname -p', except on Windows and Mac OS X

Package 252/2341HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.72.0  (landing page)
Ben Bolstad
Snapshot Date: 2025-09-22 13:40 -0400 (Mon, 22 Sep 2025)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: RELEASE_3_21
git_last_commit: aa9e634
git_last_commit_date: 2025-04-15 09:39:39 -0400 (Tue, 15 Apr 2025)
nebbiolo1Linux (Ubuntu 24.04.3 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
merida1macOS 12.7.5 Monterey / x86_64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kjohnson1macOS 13.6.6 Ventura / arm64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kunpeng2Linux (openEuler 24.03 LTS) / aarch64  OK    OK    OK  


CHECK results for BufferedMatrix on kunpeng2

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

raw results


Summary

Package: BufferedMatrix
Version: 1.72.0
Command: /home/biocbuild/R/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R/site-library --no-vignettes --timings BufferedMatrix_1.72.0.tar.gz
StartedAt: 2025-09-23 07:52:35 -0000 (Tue, 23 Sep 2025)
EndedAt: 2025-09-23 07:52:58 -0000 (Tue, 23 Sep 2025)
EllapsedTime: 23.0 seconds
RetCode: 0
Status:   OK  
CheckDir: BufferedMatrix.Rcheck
Warnings: 0

Command output

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


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

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


Installation output

BufferedMatrix.Rcheck/00install.out

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


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

Tests output

BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout


R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-unknown-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

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

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

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

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

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

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

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

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

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

[[1]]
[1] 0

> 
> proc.time()
   user  system elapsed 
  0.338   0.029   0.353 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-unknown-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> 
> ### this is used to control how many repetitions in something below
> ### higher values result in more checks.
> nreps <-100 ##20000
> 
> 
> ## test creation and some simple assignments and subsetting operations
> 
> ## first on single elements
> tmp <- createBufferedMatrix(1000,10)
> 
> tmp[10,5]
[1] 0
> tmp[10,5] <- 10
> tmp[10,5]
[1] 10
> tmp[10,5] <- 12.445
> tmp[10,5]
[1] 12.445
> 
> 
> 
> ## now testing accessing multiple elements
> tmp2 <- createBufferedMatrix(10,20)
> 
> 
> tmp2[3,1] <- 51.34
> tmp2[9,2] <- 9.87654
> tmp2[,1:2]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[,-(3:20)]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[3,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,] 51.34    0    0    0    0    0    0    0    0     0     0     0     0
     [,14] [,15] [,16] [,17] [,18] [,19] [,20]
[1,]     0     0     0     0     0     0     0
> tmp2[-3,]
      [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]    0 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19] [,20]
 [1,]     0     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0     0
> tmp2[2,1:3]
     [,1] [,2] [,3]
[1,]    0    0    0
> tmp2[3:9,1:3]
      [,1]    [,2] [,3]
[1,] 51.34 0.00000    0
[2,]  0.00 0.00000    0
[3,]  0.00 0.00000    0
[4,]  0.00 0.00000    0
[5,]  0.00 0.00000    0
[6,]  0.00 0.00000    0
[7,]  0.00 9.87654    0
> tmp2[-4,-4]
       [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,] 51.34 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]  0.00 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19]
 [1,]     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0
> 
> ## now testing accessing/assigning multiple elements
> tmp3 <- createBufferedMatrix(10,10)
> 
> for (i in 1:10){
+   for (j in 1:10){
+     tmp3[i,j] <- (j-1)*10 + i
+   }
+ }
> 
> tmp3[2:4,2:4]
     [,1] [,2] [,3]
[1,]   12   22   32
[2,]   13   23   33
[3,]   14   24   34
> tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]   11   21   31   11   21   31   91    1   11     1    11    21    31
 [2,]   12   22   32   12   22   32   92    2   12     2    12    22    32
 [3,]   13   23   33   13   23   33   93    3   13     3    13    23    33
 [4,]   14   24   34   14   24   34   94    4   14     4    14    24    34
 [5,]   15   25   35   15   25   35   95    5   15     5    15    25    35
 [6,]   16   26   36   16   26   36   96    6   16     6    16    26    36
 [7,]   17   27   37   17   27   37   97    7   17     7    17    27    37
 [8,]   18   28   38   18   28   38   98    8   18     8    18    28    38
 [9,]   19   29   39   19   29   39   99    9   19     9    19    29    39
      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
 [1,]    41    51    61    71    81    91    91    81    71    61    51    41
 [2,]    42    52    62    72    82    92    92    82    72    62    52    42
 [3,]    43    53    63    73    83    93    93    83    73    63    53    43
 [4,]    44    54    64    74    84    94    94    84    74    64    54    44
 [5,]    45    55    65    75    85    95    95    85    75    65    55    45
 [6,]    46    56    66    76    86    96    96    86    76    66    56    46
 [7,]    47    57    67    77    87    97    97    87    77    67    57    47
 [8,]    48    58    68    78    88    98    98    88    78    68    58    48
 [9,]    49    59    69    79    89    99    99    89    79    69    59    49
      [,26] [,27] [,28] [,29]
 [1,]    31    21    11     1
 [2,]    32    22    12     2
 [3,]    33    23    13     3
 [4,]    34    24    14     4
 [5,]    35    25    15     5
 [6,]    36    26    16     6
 [7,]    37    27    17     7
 [8,]    38    28    18     8
 [9,]    39    29    19     9
> tmp3[-c(1:5),-c(6:10)]
     [,1] [,2] [,3] [,4] [,5]
[1,]    6   16   26   36   46
[2,]    7   17   27   37   47
[3,]    8   18   28   38   48
[4,]    9   19   29   39   49
[5,]   10   20   30   40   50
> 
> ## assignment of whole columns
> tmp3[,1] <- c(1:10*100.0)
> tmp3[,1:2] <- tmp3[,1:2]*100
> tmp3[,1:2] <- tmp3[,2:1]
> tmp3[,1:2]
      [,1]  [,2]
 [1,] 1100 1e+04
 [2,] 1200 2e+04
 [3,] 1300 3e+04
 [4,] 1400 4e+04
 [5,] 1500 5e+04
 [6,] 1600 6e+04
 [7,] 1700 7e+04
 [8,] 1800 8e+04
 [9,] 1900 9e+04
[10,] 2000 1e+05
> 
> 
> tmp3[,-1] <- tmp3[,1:9]
> tmp3[,1:10]
      [,1] [,2]  [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,] 1100 1100 1e+04   21   31   41   51   61   71    81
 [2,] 1200 1200 2e+04   22   32   42   52   62   72    82
 [3,] 1300 1300 3e+04   23   33   43   53   63   73    83
 [4,] 1400 1400 4e+04   24   34   44   54   64   74    84
 [5,] 1500 1500 5e+04   25   35   45   55   65   75    85
 [6,] 1600 1600 6e+04   26   36   46   56   66   76    86
 [7,] 1700 1700 7e+04   27   37   47   57   67   77    87
 [8,] 1800 1800 8e+04   28   38   48   58   68   78    88
 [9,] 1900 1900 9e+04   29   39   49   59   69   79    89
[10,] 2000 2000 1e+05   30   40   50   60   70   80    90
> 
> tmp3[,1:2] <- rep(1,10)
> tmp3[,1:2] <- rep(1,20)
> tmp3[,1:2] <- matrix(c(1:5),1,5)
> 
> tmp3[,-c(1:8)] <- matrix(c(1:5),1,5)
> 
> tmp3[1,] <- 1:10
> tmp3[1,]
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    1    2    3    4    5    6    7    8    9    10
> tmp3[-1,] <- c(1,2)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    2    1    2    1    2    1    2    1    2     1
[10,]    1    2    1    2    1    2    1    2    1     2
> tmp3[-c(1:8),] <- matrix(c(1:5),1,5)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    1    3    5    2    4    1    3    5    2     4
[10,]    2    4    1    3    5    2    4    1    3     5
> 
> 
> tmp3[1:2,1:2] <- 5555.04
> tmp3[-(1:2),1:2] <- 1234.56789
> 
> 
> 
> ## testing accessors for the directory and prefix
> directory(tmp3)
[1] "/home/biocbuild/bbs-3.21-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 477833 25.6    1045337 55.9   639800 34.2
Vcells 884297  6.8    8388608 64.0  2080696 15.9
> 
> 
> 
> 
> ##
> ## checking reads
> ##
> 
> tmp2 <- createBufferedMatrix(10,20)
> 
> test.sample <- rnorm(10*20)
> 
> tmp2[1:10,1:20] <- test.sample
> 
> test.matrix <- matrix(test.sample,10,20)
> 
> ## testing reads
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Tue Sep 23 07:52:52 2025"
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> date()
[1] "Tue Sep 23 07:52:52 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: 0x394146e0>
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Tue Sep 23 07:52:53 2025"
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> date()
[1] "Tue Sep 23 07:52:53 2025"
> 
> ColMode(tmp2)
<pointer: 0x394146e0>
> 
> 
> 
> ### Now testing assignments
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+ 
+   new.data <- rnorm(20)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,] <- new.data
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   new.data <- rnorm(10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+ 
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col  <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(25),5,5)
+   tmp2[which.row,which.col] <- new.data
+   test.matrix[which.row,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> ###
> ###
> ### testing some more functions
> ###
> 
> 
> 
> ## duplication function
> tmp5 <- duplicate(tmp2)
> 
> # making sure really did copy everything.
> tmp5[1,1] <- tmp5[1,1] +100.00
> 
> if (tmp5[1,1] == tmp2[1,1]){
+   stop("Problem with duplication")
+ }
> 
> 
> 
> 
> ### testing elementwise applying of functions
> 
> tmp5[1:4,1:4]
           [,1]        [,2]       [,3]        [,4]
[1,] 99.4442254 -0.86287423  0.9065090  1.11426017
[2,]  2.3726247  2.51801442 -0.5758146  0.82846608
[3,] -0.4123106 -0.03859743 -1.7836341 -0.06370041
[4,] -1.1846076  0.56738153 -0.9662035 -1.36849864
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
           [,1]       [,2]      [,3]       [,4]
[1,] 99.4442254 0.86287423 0.9065090 1.11426017
[2,]  2.3726247 2.51801442 0.5758146 0.82846608
[3,]  0.4123106 0.03859743 1.7836341 0.06370041
[4,]  1.1846076 0.56738153 0.9662035 1.36849864
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]      [,2]      [,3]      [,4]
[1,] 9.9721726 0.9289102 0.9521077 1.0555852
[2,] 1.5403327 1.5868253 0.7588245 0.9102011
[3,] 0.6421142 0.1964623 1.3355276 0.2523894
[4,] 1.0883968 0.7532473 0.9829565 1.1698285
> 
> 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.21-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 224.16595 35.15198 35.42759 36.67011
[2,]  42.77595 43.38627 33.16406 34.93048
[3,]  31.83345 27.00322 40.13891 27.58759
[4,]  37.06858 33.09985 35.79577 38.06678
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x379ec520>
> exp(tmp5)
<pointer: 0x379ec520>
> log(tmp5,2)
<pointer: 0x379ec520>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 466.5721
> Min(tmp5)
[1] 53.66306
> mean(tmp5)
[1] 74.16323
> Sum(tmp5)
[1] 14832.65
> Var(tmp5)
[1] 854.8295
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 92.02489 72.57427 70.54347 72.11909 72.20814 73.43288 72.01883 74.32714
 [9] 72.87890 69.50470
> rowSums(tmp5)
 [1] 1840.498 1451.485 1410.869 1442.382 1444.163 1468.658 1440.377 1486.543
 [9] 1457.578 1390.094
> rowVars(tmp5)
 [1] 7843.67361   78.21512   73.45515   90.78381   64.41163  106.10810
 [7]   53.70938  104.03307   65.37566   82.73526
> rowSd(tmp5)
 [1] 88.564517  8.843931  8.570598  9.528054  8.025686 10.300879  7.328668
 [8] 10.199660  8.085521  9.095893
> rowMax(tmp5)
 [1] 466.57206  90.30283  84.75994  95.50367  88.05100  96.10261  90.41330
 [8]  97.86764  83.69589  85.18584
> rowMin(tmp5)
 [1] 55.66230 56.02671 56.20366 54.05394 59.67471 53.66306 58.50090 58.50036
 [9] 57.26354 55.77046
> 
> colMeans(tmp5)
 [1] 115.63110  69.88384  74.98643  71.04858  71.98780  67.40314  74.46697
 [8]  80.69026  72.59190  70.63331  71.56351  67.68671  72.83780  73.26520
[15]  66.32779  72.24411  70.13689  77.70320  72.65200  69.52409
> colSums(tmp5)
 [1] 1156.3110  698.8384  749.8643  710.4858  719.8780  674.0314  744.6697
 [8]  806.9026  725.9190  706.3331  715.6351  676.8671  728.3780  732.6520
[15]  663.2779  722.4411  701.3689  777.0320  726.5200  695.2409
> colVars(tmp5)
 [1] 15303.22827    77.14447    83.28702    53.34081    61.17975    96.79878
 [7]   118.17705   139.84889    42.99231    37.52704    44.28916    37.90053
[13]   104.09389    72.04062    39.79218    36.67484    27.72575   129.69572
[19]    50.68246    94.56068
> colSd(tmp5)
 [1] 123.706218   8.783193   9.126172   7.303479   7.821749   9.838637
 [7]  10.870927  11.825772   6.556852   6.125932   6.655010   6.156341
[13]  10.202641   8.487675   6.308104   6.055976   5.265525  11.388403
[19]   7.119162   9.724232
> colMax(tmp5)
 [1] 466.57206  90.30283  87.09744  82.60624  85.68223  85.18584  88.65722
 [8]  97.86764  82.21449  83.60084  82.70158  74.03947  90.01431  83.69589
[15]  74.45649  82.27019  79.63395  95.50367  84.83366  86.74362
> colMin(tmp5)
 [1] 58.50036 56.20366 53.66306 57.41996 59.55766 54.38285 55.66230 62.12477
 [9] 61.45939 61.66684 61.99477 57.26354 56.79753 61.26315 54.05394 62.46824
[17] 60.91437 59.83832 64.77638 55.77046
> 
> 
> ### 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] 92.02489 72.57427       NA 72.11909 72.20814 73.43288 72.01883 74.32714
 [9] 72.87890 69.50470
> rowSums(tmp5)
 [1] 1840.498 1451.485       NA 1442.382 1444.163 1468.658 1440.377 1486.543
 [9] 1457.578 1390.094
> rowVars(tmp5)
 [1] 7843.67361   78.21512   75.10459   90.78381   64.41163  106.10810
 [7]   53.70938  104.03307   65.37566   82.73526
> rowSd(tmp5)
 [1] 88.564517  8.843931  8.666290  9.528054  8.025686 10.300879  7.328668
 [8] 10.199660  8.085521  9.095893
> rowMax(tmp5)
 [1] 466.57206  90.30283        NA  95.50367  88.05100  96.10261  90.41330
 [8]  97.86764  83.69589  85.18584
> rowMin(tmp5)
 [1] 55.66230 56.02671       NA 54.05394 59.67471 53.66306 58.50090 58.50036
 [9] 57.26354 55.77046
> 
> colMeans(tmp5)
 [1] 115.63110  69.88384  74.98643  71.04858  71.98780  67.40314  74.46697
 [8]        NA  72.59190  70.63331  71.56351  67.68671  72.83780  73.26520
[15]  66.32779  72.24411  70.13689  77.70320  72.65200  69.52409
> colSums(tmp5)
 [1] 1156.3110  698.8384  749.8643  710.4858  719.8780  674.0314  744.6697
 [8]        NA  725.9190  706.3331  715.6351  676.8671  728.3780  732.6520
[15]  663.2779  722.4411  701.3689  777.0320  726.5200  695.2409
> colVars(tmp5)
 [1] 15303.22827    77.14447    83.28702    53.34081    61.17975    96.79878
 [7]   118.17705          NA    42.99231    37.52704    44.28916    37.90053
[13]   104.09389    72.04062    39.79218    36.67484    27.72575   129.69572
[19]    50.68246    94.56068
> colSd(tmp5)
 [1] 123.706218   8.783193   9.126172   7.303479   7.821749   9.838637
 [7]  10.870927         NA   6.556852   6.125932   6.655010   6.156341
[13]  10.202641   8.487675   6.308104   6.055976   5.265525  11.388403
[19]   7.119162   9.724232
> colMax(tmp5)
 [1] 466.57206  90.30283  87.09744  82.60624  85.68223  85.18584  88.65722
 [8]        NA  82.21449  83.60084  82.70158  74.03947  90.01431  83.69589
[15]  74.45649  82.27019  79.63395  95.50367  84.83366  86.74362
> colMin(tmp5)
 [1] 58.50036 56.20366 53.66306 57.41996 59.55766 54.38285 55.66230       NA
 [9] 61.45939 61.66684 61.99477 57.26354 56.79753 61.26315 54.05394 62.46824
[17] 60.91437 59.83832 64.77638 55.77046
> 
> Max(tmp5,na.rm=TRUE)
[1] 466.5721
> Min(tmp5,na.rm=TRUE)
[1] 53.66306
> mean(tmp5,na.rm=TRUE)
[1] 74.14902
> Sum(tmp5,na.rm=TRUE)
[1] 14755.65
> Var(tmp5,na.rm=TRUE)
[1] 859.1062
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 92.02489 72.57427 70.20410 72.11909 72.20814 73.43288 72.01883 74.32714
 [9] 72.87890 69.50470
> rowSums(tmp5,na.rm=TRUE)
 [1] 1840.498 1451.485 1333.878 1442.382 1444.163 1468.658 1440.377 1486.543
 [9] 1457.578 1390.094
> rowVars(tmp5,na.rm=TRUE)
 [1] 7843.67361   78.21512   75.10459   90.78381   64.41163  106.10810
 [7]   53.70938  104.03307   65.37566   82.73526
> rowSd(tmp5,na.rm=TRUE)
 [1] 88.564517  8.843931  8.666290  9.528054  8.025686 10.300879  7.328668
 [8] 10.199660  8.085521  9.095893
> rowMax(tmp5,na.rm=TRUE)
 [1] 466.57206  90.30283  84.75994  95.50367  88.05100  96.10261  90.41330
 [8]  97.86764  83.69589  85.18584
> rowMin(tmp5,na.rm=TRUE)
 [1] 55.66230 56.02671 56.20366 54.05394 59.67471 53.66306 58.50090 58.50036
 [9] 57.26354 55.77046
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 115.63110  69.88384  74.98643  71.04858  71.98780  67.40314  74.46697
 [8]  81.10124  72.59190  70.63331  71.56351  67.68671  72.83780  73.26520
[15]  66.32779  72.24411  70.13689  77.70320  72.65200  69.52409
> colSums(tmp5,na.rm=TRUE)
 [1] 1156.3110  698.8384  749.8643  710.4858  719.8780  674.0314  744.6697
 [8]  729.9111  725.9190  706.3331  715.6351  676.8671  728.3780  732.6520
[15]  663.2779  722.4411  701.3689  777.0320  726.5200  695.2409
> colVars(tmp5,na.rm=TRUE)
 [1] 15303.22827    77.14447    83.28702    53.34081    61.17975    96.79878
 [7]   118.17705   155.42988    42.99231    37.52704    44.28916    37.90053
[13]   104.09389    72.04062    39.79218    36.67484    27.72575   129.69572
[19]    50.68246    94.56068
> colSd(tmp5,na.rm=TRUE)
 [1] 123.706218   8.783193   9.126172   7.303479   7.821749   9.838637
 [7]  10.870927  12.467152   6.556852   6.125932   6.655010   6.156341
[13]  10.202641   8.487675   6.308104   6.055976   5.265525  11.388403
[19]   7.119162   9.724232
> colMax(tmp5,na.rm=TRUE)
 [1] 466.57206  90.30283  87.09744  82.60624  85.68223  85.18584  88.65722
 [8]  97.86764  82.21449  83.60084  82.70158  74.03947  90.01431  83.69589
[15]  74.45649  82.27019  79.63395  95.50367  84.83366  86.74362
> colMin(tmp5,na.rm=TRUE)
 [1] 58.50036 56.20366 53.66306 57.41996 59.55766 54.38285 55.66230 62.12477
 [9] 61.45939 61.66684 61.99477 57.26354 56.79753 61.26315 54.05394 62.46824
[17] 60.91437 59.83832 64.77638 55.77046
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 92.02489 72.57427      NaN 72.11909 72.20814 73.43288 72.01883 74.32714
 [9] 72.87890 69.50470
> rowSums(tmp5,na.rm=TRUE)
 [1] 1840.498 1451.485    0.000 1442.382 1444.163 1468.658 1440.377 1486.543
 [9] 1457.578 1390.094
> rowVars(tmp5,na.rm=TRUE)
 [1] 7843.67361   78.21512         NA   90.78381   64.41163  106.10810
 [7]   53.70938  104.03307   65.37566   82.73526
> rowSd(tmp5,na.rm=TRUE)
 [1] 88.564517  8.843931        NA  9.528054  8.025686 10.300879  7.328668
 [8] 10.199660  8.085521  9.095893
> rowMax(tmp5,na.rm=TRUE)
 [1] 466.57206  90.30283        NA  95.50367  88.05100  96.10261  90.41330
 [8]  97.86764  83.69589  85.18584
> rowMin(tmp5,na.rm=TRUE)
 [1] 55.66230 56.02671       NA 54.05394 59.67471 53.66306 58.50090 58.50036
 [9] 57.26354 55.77046
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 121.11710  71.40386  74.03560  72.56287  72.17608  66.97504  73.32330
 [8]       NaN  72.57347  71.62958  72.62671  66.98084  72.16746  72.54310
[15]  66.38872  71.89354  69.08166  79.61373  73.10088  70.01376
> colSums(tmp5,na.rm=TRUE)
 [1] 1090.0539  642.6347  666.3204  653.0659  649.5847  602.7754  659.9097
 [8]    0.0000  653.1612  644.6663  653.6404  602.8276  649.5072  652.8879
[15]  597.4984  647.0419  621.7349  716.5235  657.9079  630.1239
> colVars(tmp5,na.rm=TRUE)
 [1] 16877.55038    60.79487    83.52706    34.21129    68.42842   106.83688
 [7]   118.23455          NA    48.36253    31.05158    37.10852    37.03288
[13]   112.05047    75.17957    44.72444    39.87660    18.66450   104.84411
[19]    54.75097   103.68329
> colSd(tmp5,na.rm=TRUE)
 [1] 129.913627   7.797107   9.139314   5.849042   8.272147  10.336193
 [7]  10.873571         NA   6.954317   5.572395   6.091676   6.085465
[13]  10.585389   8.670615   6.687633   6.314792   4.320243  10.239341
[19]   7.399390  10.182499
> colMax(tmp5,na.rm=TRUE)
 [1] 466.57206  90.30283  87.09744  82.60624  85.68223  85.18584  88.65722
 [8]      -Inf  82.21449  83.60084  82.70158  73.70169  90.01431  83.69589
[15]  74.45649  82.27019  75.29277  95.50367  84.83366  86.74362
> colMin(tmp5,na.rm=TRUE)
 [1] 58.50036 64.16699 53.66306 64.31271 59.55766 54.38285 55.66230      Inf
 [9] 61.45939 64.80227 65.34030 57.26354 56.79753 61.26315 54.05394 62.46824
[17] 60.91437 59.83832 64.77638 55.77046
> 
> 
> 
> 
> 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] 255.1957 301.0284 171.8722 246.5348 276.9260 218.2311 159.5856 177.0062
 [9] 244.3703 162.9100
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 255.1957 301.0284 171.8722 246.5348 276.9260 218.2311 159.5856 177.0062
 [9] 244.3703 162.9100
> 
> 
> 
> 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]  1.563194e-13  2.273737e-13 -8.526513e-14  1.989520e-13  5.684342e-14
 [6]  2.273737e-13  2.842171e-14  1.136868e-13  1.136868e-13 -5.684342e-14
[11]  5.684342e-14  4.263256e-14  8.526513e-14 -1.705303e-13 -2.273737e-13
[16]  4.263256e-14 -1.136868e-13 -1.705303e-13  8.526513e-14 -8.526513e-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)
+ }
8   20 
6   19 
7   6 
7   18 
10   3 
9   7 
9   1 
5   12 
8   9 
5   4 
9   2 
3   5 
1   8 
8   19 
10   11 
7   14 
10   6 
5   14 
2   10 
2   15 
There were 50 or more warnings (use warnings() to see the first 50)
> 
> 
> ### now test 1 by n and n by 1 matrix
> 
> 
> err.tol <- 1e-12
> 
> rm(tmp5)
> 
> dataset1 <- rnorm(100)
> dataset2 <- rnorm(100)
> 
> tmp <- createBufferedMatrix(1,100)
> tmp[1,] <- dataset1
> 
> tmp2 <- createBufferedMatrix(100,1)
> tmp2[,1] <- dataset2
> 
> 
> 
> 
> 
> Max(tmp)
[1] 2.776571
> Min(tmp)
[1] -2.00495
> mean(tmp)
[1] 0.1076509
> Sum(tmp)
[1] 10.76509
> Var(tmp)
[1] 1.049186
> 
> rowMeans(tmp)
[1] 0.1076509
> rowSums(tmp)
[1] 10.76509
> rowVars(tmp)
[1] 1.049186
> rowSd(tmp)
[1] 1.024298
> rowMax(tmp)
[1] 2.776571
> rowMin(tmp)
[1] -2.00495
> 
> colMeans(tmp)
  [1]  0.97847198  0.76006784  0.10436338 -0.90287778  0.47133089  0.22598266
  [7]  1.07098386 -1.24556572  1.72641076  0.87583476 -1.77587273  0.09764482
 [13] -0.37578881  1.49974883 -0.81135445 -0.06509252  0.82486203 -0.65604428
 [19]  0.08197466 -1.80648070  0.64998449 -0.46512222 -0.01702472 -0.34313732
 [25]  1.01824866  0.57976982 -0.64330796 -0.32193823 -1.16197899 -0.43936920
 [31]  0.07367545  0.11758809  0.22264361  2.77657113 -0.18943420  0.68351466
 [37] -0.09171519  0.50722593 -0.63535227 -0.38893008  2.26622691 -0.27356780
 [43]  0.57328589  0.11417071 -0.04835788  0.37681548 -1.91102023  0.76485674
 [49]  0.91808508  0.67784128 -0.02593241 -1.40335799  2.36085648 -0.46776579
 [55]  1.93599840  0.35023932  1.84299619 -1.63977761 -0.60436422  0.16307218
 [61]  0.26486064  0.59619685  0.62057855 -1.54179845  0.01614865 -0.86797976
 [67] -0.12042747  0.39573252 -0.31293900  0.12209944 -0.16167376  0.37040734
 [73] -0.09383486 -1.90940031 -2.00495020  1.03680268 -0.54017438  0.46686793
 [79]  1.43468361 -0.72659315 -0.39708310 -0.94793982  0.36186042  1.95099091
 [85]  1.02921038  1.51422604 -0.10540445  1.91804686  0.66651433 -0.60253328
 [91]  1.18651866  0.91769432  0.89146353  0.16839883 -1.69403919  0.34971634
 [97]  1.03597233  0.08952341 -1.67104110 -1.92242141
> colSums(tmp)
  [1]  0.97847198  0.76006784  0.10436338 -0.90287778  0.47133089  0.22598266
  [7]  1.07098386 -1.24556572  1.72641076  0.87583476 -1.77587273  0.09764482
 [13] -0.37578881  1.49974883 -0.81135445 -0.06509252  0.82486203 -0.65604428
 [19]  0.08197466 -1.80648070  0.64998449 -0.46512222 -0.01702472 -0.34313732
 [25]  1.01824866  0.57976982 -0.64330796 -0.32193823 -1.16197899 -0.43936920
 [31]  0.07367545  0.11758809  0.22264361  2.77657113 -0.18943420  0.68351466
 [37] -0.09171519  0.50722593 -0.63535227 -0.38893008  2.26622691 -0.27356780
 [43]  0.57328589  0.11417071 -0.04835788  0.37681548 -1.91102023  0.76485674
 [49]  0.91808508  0.67784128 -0.02593241 -1.40335799  2.36085648 -0.46776579
 [55]  1.93599840  0.35023932  1.84299619 -1.63977761 -0.60436422  0.16307218
 [61]  0.26486064  0.59619685  0.62057855 -1.54179845  0.01614865 -0.86797976
 [67] -0.12042747  0.39573252 -0.31293900  0.12209944 -0.16167376  0.37040734
 [73] -0.09383486 -1.90940031 -2.00495020  1.03680268 -0.54017438  0.46686793
 [79]  1.43468361 -0.72659315 -0.39708310 -0.94793982  0.36186042  1.95099091
 [85]  1.02921038  1.51422604 -0.10540445  1.91804686  0.66651433 -0.60253328
 [91]  1.18651866  0.91769432  0.89146353  0.16839883 -1.69403919  0.34971634
 [97]  1.03597233  0.08952341 -1.67104110 -1.92242141
> 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.97847198  0.76006784  0.10436338 -0.90287778  0.47133089  0.22598266
  [7]  1.07098386 -1.24556572  1.72641076  0.87583476 -1.77587273  0.09764482
 [13] -0.37578881  1.49974883 -0.81135445 -0.06509252  0.82486203 -0.65604428
 [19]  0.08197466 -1.80648070  0.64998449 -0.46512222 -0.01702472 -0.34313732
 [25]  1.01824866  0.57976982 -0.64330796 -0.32193823 -1.16197899 -0.43936920
 [31]  0.07367545  0.11758809  0.22264361  2.77657113 -0.18943420  0.68351466
 [37] -0.09171519  0.50722593 -0.63535227 -0.38893008  2.26622691 -0.27356780
 [43]  0.57328589  0.11417071 -0.04835788  0.37681548 -1.91102023  0.76485674
 [49]  0.91808508  0.67784128 -0.02593241 -1.40335799  2.36085648 -0.46776579
 [55]  1.93599840  0.35023932  1.84299619 -1.63977761 -0.60436422  0.16307218
 [61]  0.26486064  0.59619685  0.62057855 -1.54179845  0.01614865 -0.86797976
 [67] -0.12042747  0.39573252 -0.31293900  0.12209944 -0.16167376  0.37040734
 [73] -0.09383486 -1.90940031 -2.00495020  1.03680268 -0.54017438  0.46686793
 [79]  1.43468361 -0.72659315 -0.39708310 -0.94793982  0.36186042  1.95099091
 [85]  1.02921038  1.51422604 -0.10540445  1.91804686  0.66651433 -0.60253328
 [91]  1.18651866  0.91769432  0.89146353  0.16839883 -1.69403919  0.34971634
 [97]  1.03597233  0.08952341 -1.67104110 -1.92242141
> colMin(tmp)
  [1]  0.97847198  0.76006784  0.10436338 -0.90287778  0.47133089  0.22598266
  [7]  1.07098386 -1.24556572  1.72641076  0.87583476 -1.77587273  0.09764482
 [13] -0.37578881  1.49974883 -0.81135445 -0.06509252  0.82486203 -0.65604428
 [19]  0.08197466 -1.80648070  0.64998449 -0.46512222 -0.01702472 -0.34313732
 [25]  1.01824866  0.57976982 -0.64330796 -0.32193823 -1.16197899 -0.43936920
 [31]  0.07367545  0.11758809  0.22264361  2.77657113 -0.18943420  0.68351466
 [37] -0.09171519  0.50722593 -0.63535227 -0.38893008  2.26622691 -0.27356780
 [43]  0.57328589  0.11417071 -0.04835788  0.37681548 -1.91102023  0.76485674
 [49]  0.91808508  0.67784128 -0.02593241 -1.40335799  2.36085648 -0.46776579
 [55]  1.93599840  0.35023932  1.84299619 -1.63977761 -0.60436422  0.16307218
 [61]  0.26486064  0.59619685  0.62057855 -1.54179845  0.01614865 -0.86797976
 [67] -0.12042747  0.39573252 -0.31293900  0.12209944 -0.16167376  0.37040734
 [73] -0.09383486 -1.90940031 -2.00495020  1.03680268 -0.54017438  0.46686793
 [79]  1.43468361 -0.72659315 -0.39708310 -0.94793982  0.36186042  1.95099091
 [85]  1.02921038  1.51422604 -0.10540445  1.91804686  0.66651433 -0.60253328
 [91]  1.18651866  0.91769432  0.89146353  0.16839883 -1.69403919  0.34971634
 [97]  1.03597233  0.08952341 -1.67104110 -1.92242141
> colMedians(tmp)
  [1]  0.97847198  0.76006784  0.10436338 -0.90287778  0.47133089  0.22598266
  [7]  1.07098386 -1.24556572  1.72641076  0.87583476 -1.77587273  0.09764482
 [13] -0.37578881  1.49974883 -0.81135445 -0.06509252  0.82486203 -0.65604428
 [19]  0.08197466 -1.80648070  0.64998449 -0.46512222 -0.01702472 -0.34313732
 [25]  1.01824866  0.57976982 -0.64330796 -0.32193823 -1.16197899 -0.43936920
 [31]  0.07367545  0.11758809  0.22264361  2.77657113 -0.18943420  0.68351466
 [37] -0.09171519  0.50722593 -0.63535227 -0.38893008  2.26622691 -0.27356780
 [43]  0.57328589  0.11417071 -0.04835788  0.37681548 -1.91102023  0.76485674
 [49]  0.91808508  0.67784128 -0.02593241 -1.40335799  2.36085648 -0.46776579
 [55]  1.93599840  0.35023932  1.84299619 -1.63977761 -0.60436422  0.16307218
 [61]  0.26486064  0.59619685  0.62057855 -1.54179845  0.01614865 -0.86797976
 [67] -0.12042747  0.39573252 -0.31293900  0.12209944 -0.16167376  0.37040734
 [73] -0.09383486 -1.90940031 -2.00495020  1.03680268 -0.54017438  0.46686793
 [79]  1.43468361 -0.72659315 -0.39708310 -0.94793982  0.36186042  1.95099091
 [85]  1.02921038  1.51422604 -0.10540445  1.91804686  0.66651433 -0.60253328
 [91]  1.18651866  0.91769432  0.89146353  0.16839883 -1.69403919  0.34971634
 [97]  1.03597233  0.08952341 -1.67104110 -1.92242141
> colRanges(tmp)
         [,1]      [,2]      [,3]       [,4]      [,5]      [,6]     [,7]
[1,] 0.978472 0.7600678 0.1043634 -0.9028778 0.4713309 0.2259827 1.070984
[2,] 0.978472 0.7600678 0.1043634 -0.9028778 0.4713309 0.2259827 1.070984
          [,8]     [,9]     [,10]     [,11]      [,12]      [,13]    [,14]
[1,] -1.245566 1.726411 0.8758348 -1.775873 0.09764482 -0.3757888 1.499749
[2,] -1.245566 1.726411 0.8758348 -1.775873 0.09764482 -0.3757888 1.499749
          [,15]       [,16]    [,17]      [,18]      [,19]     [,20]     [,21]
[1,] -0.8113545 -0.06509252 0.824862 -0.6560443 0.08197466 -1.806481 0.6499845
[2,] -0.8113545 -0.06509252 0.824862 -0.6560443 0.08197466 -1.806481 0.6499845
          [,22]       [,23]      [,24]    [,25]     [,26]     [,27]      [,28]
[1,] -0.4651222 -0.01702472 -0.3431373 1.018249 0.5797698 -0.643308 -0.3219382
[2,] -0.4651222 -0.01702472 -0.3431373 1.018249 0.5797698 -0.643308 -0.3219382
         [,29]      [,30]      [,31]     [,32]     [,33]    [,34]      [,35]
[1,] -1.161979 -0.4393692 0.07367545 0.1175881 0.2226436 2.776571 -0.1894342
[2,] -1.161979 -0.4393692 0.07367545 0.1175881 0.2226436 2.776571 -0.1894342
         [,36]       [,37]     [,38]      [,39]      [,40]    [,41]      [,42]
[1,] 0.6835147 -0.09171519 0.5072259 -0.6353523 -0.3889301 2.266227 -0.2735678
[2,] 0.6835147 -0.09171519 0.5072259 -0.6353523 -0.3889301 2.266227 -0.2735678
         [,43]     [,44]       [,45]     [,46]    [,47]     [,48]     [,49]
[1,] 0.5732859 0.1141707 -0.04835788 0.3768155 -1.91102 0.7648567 0.9180851
[2,] 0.5732859 0.1141707 -0.04835788 0.3768155 -1.91102 0.7648567 0.9180851
         [,50]       [,51]     [,52]    [,53]      [,54]    [,55]     [,56]
[1,] 0.6778413 -0.02593241 -1.403358 2.360856 -0.4677658 1.935998 0.3502393
[2,] 0.6778413 -0.02593241 -1.403358 2.360856 -0.4677658 1.935998 0.3502393
        [,57]     [,58]      [,59]     [,60]     [,61]     [,62]     [,63]
[1,] 1.842996 -1.639778 -0.6043642 0.1630722 0.2648606 0.5961968 0.6205785
[2,] 1.842996 -1.639778 -0.6043642 0.1630722 0.2648606 0.5961968 0.6205785
         [,64]      [,65]      [,66]      [,67]     [,68]     [,69]     [,70]
[1,] -1.541798 0.01614865 -0.8679798 -0.1204275 0.3957325 -0.312939 0.1220994
[2,] -1.541798 0.01614865 -0.8679798 -0.1204275 0.3957325 -0.312939 0.1220994
          [,71]     [,72]       [,73]   [,74]    [,75]    [,76]      [,77]
[1,] -0.1616738 0.3704073 -0.09383486 -1.9094 -2.00495 1.036803 -0.5401744
[2,] -0.1616738 0.3704073 -0.09383486 -1.9094 -2.00495 1.036803 -0.5401744
         [,78]    [,79]      [,80]      [,81]      [,82]     [,83]    [,84]
[1,] 0.4668679 1.434684 -0.7265932 -0.3970831 -0.9479398 0.3618604 1.950991
[2,] 0.4668679 1.434684 -0.7265932 -0.3970831 -0.9479398 0.3618604 1.950991
       [,85]    [,86]      [,87]    [,88]     [,89]      [,90]    [,91]
[1,] 1.02921 1.514226 -0.1054044 1.918047 0.6665143 -0.6025333 1.186519
[2,] 1.02921 1.514226 -0.1054044 1.918047 0.6665143 -0.6025333 1.186519
         [,92]     [,93]     [,94]     [,95]     [,96]    [,97]      [,98]
[1,] 0.9176943 0.8914635 0.1683988 -1.694039 0.3497163 1.035972 0.08952341
[2,] 0.9176943 0.8914635 0.1683988 -1.694039 0.3497163 1.035972 0.08952341
         [,99]    [,100]
[1,] -1.671041 -1.922421
[2,] -1.671041 -1.922421
> 
> 
> Max(tmp2)
[1] 2.647963
> Min(tmp2)
[1] -2.720067
> mean(tmp2)
[1] -0.1072866
> Sum(tmp2)
[1] -10.72866
> Var(tmp2)
[1] 1.148566
> 
> rowMeans(tmp2)
  [1]  1.04587987 -1.14451470 -1.65015764 -0.53736807 -1.09511372 -0.92273155
  [7] -1.66245926 -0.24749891 -0.12634937  2.64796311 -0.10459228 -1.25866389
 [13]  0.95254036 -0.93443451  0.08205807  0.90178860 -1.30588482 -1.58020240
 [19] -0.84386372  0.89020865  0.47152334 -0.06967806  0.89560373 -0.56736907
 [25] -1.17978564  1.87400817  0.60576926  0.03893953  0.75054563 -1.63942773
 [31] -0.20362640  0.56246958 -0.15828528 -1.77090839  0.16317502 -1.27473662
 [37] -1.35905136  0.50344727 -0.53003395  1.59514832 -2.55895056 -2.72006651
 [43] -0.80032184  0.58999845 -0.11094844 -1.08390961 -0.12122098  0.28893619
 [49]  2.06721705 -0.43494015 -0.57999958  1.76882407 -0.14084635 -0.61552573
 [55] -1.21340380  0.68797807  0.33643606 -0.23501559  0.72972627 -0.21851234
 [61]  1.97953963 -0.31097627  1.44228762 -0.59970428  0.68329460  0.71369456
 [67] -1.29860050  0.25237063 -0.11678912 -1.01885852 -1.56038429  1.69765417
 [73]  0.88039799  0.57459493 -0.58804709  0.47018859 -1.68687273  1.68158842
 [79] -0.75137253 -0.18452063 -0.23672605 -1.61558972 -0.25474638 -0.29767975
 [85]  0.48338042 -0.01523795 -1.22368573 -0.76719948 -0.65335889  0.52917702
 [91]  1.00601826  1.11301161 -1.06666093 -0.20463338  1.03885219  0.45748027
 [97]  0.27067405  0.67631440  1.86171725 -1.53903966
> rowSums(tmp2)
  [1]  1.04587987 -1.14451470 -1.65015764 -0.53736807 -1.09511372 -0.92273155
  [7] -1.66245926 -0.24749891 -0.12634937  2.64796311 -0.10459228 -1.25866389
 [13]  0.95254036 -0.93443451  0.08205807  0.90178860 -1.30588482 -1.58020240
 [19] -0.84386372  0.89020865  0.47152334 -0.06967806  0.89560373 -0.56736907
 [25] -1.17978564  1.87400817  0.60576926  0.03893953  0.75054563 -1.63942773
 [31] -0.20362640  0.56246958 -0.15828528 -1.77090839  0.16317502 -1.27473662
 [37] -1.35905136  0.50344727 -0.53003395  1.59514832 -2.55895056 -2.72006651
 [43] -0.80032184  0.58999845 -0.11094844 -1.08390961 -0.12122098  0.28893619
 [49]  2.06721705 -0.43494015 -0.57999958  1.76882407 -0.14084635 -0.61552573
 [55] -1.21340380  0.68797807  0.33643606 -0.23501559  0.72972627 -0.21851234
 [61]  1.97953963 -0.31097627  1.44228762 -0.59970428  0.68329460  0.71369456
 [67] -1.29860050  0.25237063 -0.11678912 -1.01885852 -1.56038429  1.69765417
 [73]  0.88039799  0.57459493 -0.58804709  0.47018859 -1.68687273  1.68158842
 [79] -0.75137253 -0.18452063 -0.23672605 -1.61558972 -0.25474638 -0.29767975
 [85]  0.48338042 -0.01523795 -1.22368573 -0.76719948 -0.65335889  0.52917702
 [91]  1.00601826  1.11301161 -1.06666093 -0.20463338  1.03885219  0.45748027
 [97]  0.27067405  0.67631440  1.86171725 -1.53903966
> rowVars(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowSd(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowMax(tmp2)
  [1]  1.04587987 -1.14451470 -1.65015764 -0.53736807 -1.09511372 -0.92273155
  [7] -1.66245926 -0.24749891 -0.12634937  2.64796311 -0.10459228 -1.25866389
 [13]  0.95254036 -0.93443451  0.08205807  0.90178860 -1.30588482 -1.58020240
 [19] -0.84386372  0.89020865  0.47152334 -0.06967806  0.89560373 -0.56736907
 [25] -1.17978564  1.87400817  0.60576926  0.03893953  0.75054563 -1.63942773
 [31] -0.20362640  0.56246958 -0.15828528 -1.77090839  0.16317502 -1.27473662
 [37] -1.35905136  0.50344727 -0.53003395  1.59514832 -2.55895056 -2.72006651
 [43] -0.80032184  0.58999845 -0.11094844 -1.08390961 -0.12122098  0.28893619
 [49]  2.06721705 -0.43494015 -0.57999958  1.76882407 -0.14084635 -0.61552573
 [55] -1.21340380  0.68797807  0.33643606 -0.23501559  0.72972627 -0.21851234
 [61]  1.97953963 -0.31097627  1.44228762 -0.59970428  0.68329460  0.71369456
 [67] -1.29860050  0.25237063 -0.11678912 -1.01885852 -1.56038429  1.69765417
 [73]  0.88039799  0.57459493 -0.58804709  0.47018859 -1.68687273  1.68158842
 [79] -0.75137253 -0.18452063 -0.23672605 -1.61558972 -0.25474638 -0.29767975
 [85]  0.48338042 -0.01523795 -1.22368573 -0.76719948 -0.65335889  0.52917702
 [91]  1.00601826  1.11301161 -1.06666093 -0.20463338  1.03885219  0.45748027
 [97]  0.27067405  0.67631440  1.86171725 -1.53903966
> rowMin(tmp2)
  [1]  1.04587987 -1.14451470 -1.65015764 -0.53736807 -1.09511372 -0.92273155
  [7] -1.66245926 -0.24749891 -0.12634937  2.64796311 -0.10459228 -1.25866389
 [13]  0.95254036 -0.93443451  0.08205807  0.90178860 -1.30588482 -1.58020240
 [19] -0.84386372  0.89020865  0.47152334 -0.06967806  0.89560373 -0.56736907
 [25] -1.17978564  1.87400817  0.60576926  0.03893953  0.75054563 -1.63942773
 [31] -0.20362640  0.56246958 -0.15828528 -1.77090839  0.16317502 -1.27473662
 [37] -1.35905136  0.50344727 -0.53003395  1.59514832 -2.55895056 -2.72006651
 [43] -0.80032184  0.58999845 -0.11094844 -1.08390961 -0.12122098  0.28893619
 [49]  2.06721705 -0.43494015 -0.57999958  1.76882407 -0.14084635 -0.61552573
 [55] -1.21340380  0.68797807  0.33643606 -0.23501559  0.72972627 -0.21851234
 [61]  1.97953963 -0.31097627  1.44228762 -0.59970428  0.68329460  0.71369456
 [67] -1.29860050  0.25237063 -0.11678912 -1.01885852 -1.56038429  1.69765417
 [73]  0.88039799  0.57459493 -0.58804709  0.47018859 -1.68687273  1.68158842
 [79] -0.75137253 -0.18452063 -0.23672605 -1.61558972 -0.25474638 -0.29767975
 [85]  0.48338042 -0.01523795 -1.22368573 -0.76719948 -0.65335889  0.52917702
 [91]  1.00601826  1.11301161 -1.06666093 -0.20463338  1.03885219  0.45748027
 [97]  0.27067405  0.67631440  1.86171725 -1.53903966
> 
> colMeans(tmp2)
[1] -0.1072866
> colSums(tmp2)
[1] -10.72866
> colVars(tmp2)
[1] 1.148566
> colSd(tmp2)
[1] 1.071712
> colMax(tmp2)
[1] 2.647963
> colMin(tmp2)
[1] -2.720067
> colMedians(tmp2)
[1] -0.1495658
> colRanges(tmp2)
          [,1]
[1,] -2.720067
[2,]  2.647963
> 
> dataset1 <- matrix(dataset1,1,100)
> 
> agree.checks(tmp,dataset1)
> 
> dataset2 <- matrix(dataset2,100,1)
> agree.checks(tmp2,dataset2)
>   
> 
> tmp <- createBufferedMatrix(10,10)
> 
> tmp[1:10,1:10] <- rnorm(100)
> colApply(tmp,sum)
 [1]  2.2178179 -1.0640523 -1.6129335 -1.0348891 -1.2601096  1.9524395
 [7]  0.6894016  0.2786049  4.5809478  9.9802018
> colApply(tmp,quantile)[,1]
            [,1]
[1,] -2.03475692
[2,] -0.43468496
[3,]  0.04043802
[4,]  1.16992468
[5,]  2.16106958
> 
> rowApply(tmp,sum)
 [1]  4.7948692 -5.3924171  1.8054489  2.3471928  2.6038978 -0.8272535
 [7]  5.8479150  5.3506478 -1.6732938 -0.1295780
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    7    1    4    4    5    2    4   10    9     9
 [2,]    8    2    8    2    3    9    8    5    1     4
 [3,]    6    7    5    3    4    5    3    1    8     1
 [4,]    5    4    1    6    7    8    9    3    3     5
 [5,]    9    3    2    8    6    4    1    2    5     7
 [6,]    3   10    7    9    1    6    7    6    2     2
 [7,]    4    8    3    1    9    3   10    9    4     8
 [8,]    2    6    6   10    8    1    2    8    7     6
 [9,]    1    9    9    5    2    7    6    4    6    10
[10,]   10    5   10    7   10   10    5    7   10     3
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1] -0.2421110  0.4358652  3.7242459  1.6840004  0.9890459 -1.2483088
 [7]  1.1087945 -0.5699861  1.7612427  1.8067819  0.6373490 -3.2500554
[13]  0.2310277 -4.0787048  4.8765610  2.4940986 -3.6135898  3.2288488
[19]  0.8911032  0.1901354
> colApply(tmp,quantile)[,1]
            [,1]
[1,] -1.23587841
[2,] -0.78511714
[3,] -0.05266058
[4,]  0.76187818
[5,]  1.06966692
> 
> rowApply(tmp,sum)
[1] -1.6009490  2.1932747  5.4263789 -0.5456425  5.5832823
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]    6    2    6   17   17
[2,]   14    9    9    5   16
[3,]   20   11    8   19    4
[4,]   18    4   10   14   13
[5,]   16   18   17    2    1
> 
> 
> as.matrix(tmp)
            [,1]        [,2]       [,3]       [,4]       [,5]       [,6]
[1,] -0.78511714  0.04105900  2.5965271  1.6121390  0.8163015 -0.9954248
[2,] -1.23587841 -0.01881869  0.2698928 -1.0176995  1.1347178  0.7489206
[3,] -0.05266058  0.26217194  0.2044584  0.4249347  1.1757209 -1.0387178
[4,]  0.76187818 -0.85968347  1.0628844  0.3572006 -1.5246915  0.3358788
[5,]  1.06966692  1.01113643 -0.4095167  0.3074256 -0.6130027 -0.2989656
            [,7]        [,8]       [,9]      [,10]      [,11]       [,12]
[1,] -0.13822339 -1.23762427 -0.1912875  1.1576519 -0.8690012 -2.99508492
[2,]  1.10373009 -0.05728014  0.5084391  0.7129011  0.2836289 -1.19213981
[3,] -0.48054427  1.00121406  0.4482124  0.5881088  1.9740128  0.42955184
[4,] -0.07560125 -0.08023479 -0.1804266 -0.8022098 -0.3146991  0.53821901
[5,]  0.69943335 -0.19606100  1.1763053  0.1503300 -0.4365924 -0.03060146
           [,13]      [,14]     [,15]      [,16]      [,17]       [,18]
[1,] -0.09222305 -1.3988181  1.965845 -0.4157382 -0.1714630 -0.09227926
[2,]  1.65863056 -0.5140882  1.148233 -0.1414982 -1.8128245  0.15175131
[3,]  0.59367018 -2.2328510  1.334202  2.3489768 -0.9070981  0.55591864
[4,] -1.74203677 -0.2252337 -1.115535  0.4782323 -1.2315892  1.02706776
[5,] -0.18701326  0.2922863  1.543816  0.2241259  0.5093850  1.58639034
          [,19]      [,20]
[1,]  0.3377225 -0.7459101
[2,] -0.3836664  0.8463235
[3,] -1.3539901  0.1510873
[4,]  2.8826484  0.1622897
[5,] -0.5916111 -0.2236549
> 
> 
> 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.21-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.21-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  653  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.21-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.21-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.222748 -0.3000053 -0.4378374 -0.9135632 0.3200198 3.280762 -1.417184
           col8       col9     col10      col11     col12      col13
row1 -0.7513473 -0.8570386 0.6148263 -0.9408487 -1.132483 0.03673514
           col14      col15     col16     col17     col18     col19     col20
row1 -0.02816072 -0.6936092 0.4071357 0.1317845 0.9256717 0.5806192 -1.312708
> tmp[,"col10"]
          col10
row1  0.6148263
row2 -0.6125731
row3 -1.6633089
row4  2.6202150
row5  0.9370316
> tmp[c("row1","row5"),]
         col1       col2       col3       col4      col5      col6      col7
row1 0.222748 -0.3000053 -0.4378374 -0.9135632 0.3200198 3.2807622 -1.417184
row5 1.635520  0.2820295  0.1205560 -1.1967548 1.5943898 0.5186609  1.332240
           col8       col9     col10       col11      col12      col13
row1 -0.7513473 -0.8570386 0.6148263 -0.94084869 -1.1324833 0.03673514
row5  1.7605314  1.0149941 0.9370316 -0.06984413  0.9071715 0.41482934
           col14      col15     col16     col17      col18      col19     col20
row1 -0.02816072 -0.6936092 0.4071357 0.1317845  0.9256717  0.5806192 -1.312708
row5 -1.72253544  0.6220618 0.3614583 0.4845441 -1.6766593 -0.9269973  1.389042
> tmp[,c("col6","col20")]
           col6      col20
row1  3.2807622 -1.3127085
row2  0.4900725  0.1319621
row3 -2.0119045  0.5291618
row4  1.1870937 -0.5831389
row5  0.5186609  1.3890421
> tmp[c("row1","row5"),c("col6","col20")]
          col6     col20
row1 3.2807622 -1.312708
row5 0.5186609  1.389042
> 
> 
> 
> 
> 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.39677 50.77876 50.62065 48.42797 51.32804 102.3427 50.69771 52.12347
         col9    col10    col11    col12    col13    col14    col15    col16
row1 48.39505 49.46691 49.62067 50.70682 49.93873 51.06342 49.92352 50.94571
        col17    col18    col19    col20
row1 49.47356 50.28416 49.48338 104.6171
> tmp[,"col10"]
        col10
row1 49.46691
row2 30.72060
row3 28.54506
row4 30.82934
row5 48.73266
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 50.39677 50.77876 50.62065 48.42797 51.32804 102.3427 50.69771 52.12347
row5 50.25413 50.61369 47.45518 50.04820 49.76578 104.7902 50.07838 48.33518
         col9    col10    col11    col12    col13    col14    col15    col16
row1 48.39505 49.46691 49.62067 50.70682 49.93873 51.06342 49.92352 50.94571
row5 50.75876 48.73266 47.61481 48.37474 49.68861 50.07128 50.91711 48.91332
        col17    col18    col19    col20
row1 49.47356 50.28416 49.48338 104.6171
row5 48.91512 50.88843 50.18454 105.5271
> tmp[,c("col6","col20")]
          col6     col20
row1 102.34274 104.61709
row2  75.32467  75.78275
row3  74.96509  73.14085
row4  72.12814  74.82948
row5 104.79024 105.52707
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 102.3427 104.6171
row5 104.7902 105.5271
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 102.3427 104.6171
row5 104.7902 105.5271
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,]  2.0178162
[2,] -1.9131292
[3,]  0.8102917
[4,]  2.2450589
[5,]  0.3651062
> tmp[,c("col17","col7")]
          col17       col7
[1,]  0.2871180  0.6618062
[2,]  0.4472589 -0.6000962
[3,] -1.2326368  0.3422676
[4,]  0.2413675  0.3004906
[5,]  1.9635680  0.3170963
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
            col6      col20
[1,] -0.13689179 -0.2497600
[2,]  0.51647750  0.4944915
[3,] -0.08961904  0.7368653
[4,] -1.89347070 -1.3100413
[5,]  0.10900751  0.3030849
> subBufferedMatrix(tmp,1,c("col6"))[,1]
           col1
[1,] -0.1368918
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,] -0.1368918
[2,]  0.5164775
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> 
> 
> 
> subBufferedMatrix(tmp,c("row3","row1"),)[,1:20]
           [,1]      [,2]       [,3]     [,4]        [,5]       [,6]       [,7]
row3 -0.1320936 0.2491213 -0.5267734 1.282402  0.75219856 -0.5545285 -0.8082629
row1  0.6516711 1.5731855 -0.5713141 2.703897 -0.01277568 -0.3618323 -0.1989692
           [,8]      [,9]      [,10]      [,11]     [,12]     [,13]      [,14]
row3 -0.8370801 0.6669249 -0.7577099 -0.7236740 1.0199367 -1.947180  0.9534150
row1  1.1665127 1.1745952  0.5351408 -0.2709935 0.2331814 -1.523571 -0.4595468
          [,15]      [,16]      [,17]     [,18]       [,19]      [,20]
row3  0.7932879  0.2870315  0.5387687 -1.159929  0.95810929 -0.4841378
row1 -0.7480876 -0.4542487 -0.8436719 -2.035341 -0.04897374  0.2246486
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
           [,1]      [,2]       [,3]      [,4]       [,5]      [,6]      [,7]
row2 -0.7102781 0.8204417 -0.7502694 0.5000096 -0.2060868 -0.377759 0.6139101
           [,8]       [,9]    [,10]
row2 -0.3202153 -0.6780956 0.873702
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
          [,1]       [,2]       [,3]     [,4]      [,5]     [,6]      [,7]
row5 -2.578102 -0.1787162 -0.4418839 0.481318 0.2304905 0.966169 -1.064972
           [,8]      [,9]      [,10]    [,11]    [,12]      [,13]    [,14]
row5 -0.1248608 0.5944278 -0.5902447 1.000019 1.930557 -0.2330155 2.277163
         [,15]    [,16]    [,17]    [,18]     [,19]     [,20]
row5 0.5424601 1.124624 1.569597 1.315569 0.6752123 0.1809992
> 
> 
> 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: 0x39e03c90>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a2c95fb6d"
 [2] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a53566d98"
 [3] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a172d0662"
 [4] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a77b7f0f9"
 [5] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a54f41e9" 
 [6] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a18afe5da"
 [7] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a6d3273a5"
 [8] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a1637ad83"
 [9] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a6572d422"
[10] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a55a6c6b5"
[11] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a10c77992"
[12] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a26953981"
[13] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a109da841"
[14] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a2d04a472"
[15] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b362a709a33a5"
> 
> 
> ### 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: 0x39cf0180>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x39cf0180>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x39cf0180>
> rowMedians(tmp)
  [1]  0.1356979535  0.1380520531 -0.0174764362  0.3800054102  0.0359458054
  [6] -0.0809947047 -0.3018372784 -0.1242583653  0.0805514676 -0.0007250176
 [11] -0.0610530345 -0.2584074414  0.1659644993  0.2021779265 -0.3094302654
 [16]  0.1979273046 -0.2897219571  0.1525751660 -0.4973429901  0.0658975856
 [21]  0.2946399823 -0.1738416372  0.0452869726  0.0175020629 -0.5484687182
 [26] -0.2165451947 -0.1170404675  0.4249662442 -0.3288425705 -0.1751994415
 [31] -0.2508308783 -0.2676055855  0.1734657813  0.3324962392  0.2116802937
 [36] -0.3465648032 -0.3848665323  0.4764522068 -0.0590523263  0.3420699476
 [41] -0.4017666397  0.0538714466 -0.2301766308  0.2515970749  0.1525044702
 [46]  0.2959637059  0.9992980201  0.4147850510 -0.2861455271  0.0195373805
 [51]  0.0028257960  0.2412807533 -0.2353013270 -0.0275252953 -0.1897041729
 [56] -0.3122403434 -0.0897903220 -0.3109365432 -0.0992720425  0.4923416169
 [61]  0.1242491857 -0.1101919822  0.4370842205  0.4676699040  0.2445292081
 [66]  0.1048943724 -0.3997651042 -0.4150241259 -0.3505566395 -0.7024414815
 [71] -0.0927054986  0.4865546760 -0.0805241516 -0.4021265988  0.0350101130
 [76]  0.0752846093  0.6591468938 -0.6208922757 -0.3484504121 -0.1512993059
 [81]  0.2027805831  0.1827062694 -0.5210989581 -0.1535886138  0.3896762698
 [86] -0.2871227686  0.1210525728  0.0974242901  0.2660228191  0.2266889233
 [91] -0.2147991130  0.0475730301 -0.3493731680 -0.0551791776  0.1807284333
 [96] -0.2551416973  0.2474817694 -0.4422058388 -0.3876508137 -0.0872551035
[101] -0.1791441522 -0.5730788485  0.2454880988 -0.0336518590  0.4465706643
[106]  0.4799747752  0.1864064513  0.1623666342 -0.1332847701  0.3355448829
[111]  0.1076101012 -0.2765946267  0.1703945420 -0.2470347250  0.0020229841
[116]  0.3231008326  0.0624342679  0.0710405049 -0.1611920509  0.0586269645
[121] -0.1691823646 -0.2745102446  0.5980482963 -0.0515258762 -0.3940233405
[126]  0.1181346268 -0.3511246184 -0.2676533141 -0.1470421292  0.3476466561
[131] -0.0709173602 -0.3693254895 -0.0223916380 -0.1091114083  0.1185582027
[136] -0.0942839721 -0.2139674826 -0.2936778009 -0.3468768000 -0.4907579545
[141] -0.0522215998  0.2404447496  0.2052124028  0.1475276415  0.3034862984
[146]  0.1923290699  0.2644041734  0.4584429567 -0.3980436287 -0.3616602700
[151]  0.4181387984  0.2787525459  0.1051746550 -0.1184547391  0.3473541128
[156]  0.1730625076 -0.1805745009 -0.1937323390  0.1296596594 -0.4016867995
[161]  0.4286916401 -0.0694975037  0.3177540704  0.4819243390  0.0746925028
[166]  0.2347563573  0.1041593441 -0.3868830572  0.3113799421 -0.2901207185
[171] -0.2722337129 -0.2367370397  0.1883513878 -0.4729114020 -0.3580882986
[176]  0.4290183342 -0.2297919302  0.3424398216 -0.3627871001  0.1749999933
[181] -0.1117463696  0.1489451846 -0.0958000186  0.7455031586  0.2002229155
[186] -0.1144190706  0.1307079126 -0.1681079659 -0.2791198636 -0.2931363898
[191]  0.3230985257  0.2880951527  0.2147765410 -0.1907569526 -0.0372810601
[196]  0.4215205693 -0.1657285589 -0.1162939758 -0.4220316825 -0.3185776233
[201] -0.1625939522 -0.2603052565  0.1985249844  0.1892840544  0.0300059306
[206] -0.0929765944  0.4460419689  0.3383818937  0.2326838489  0.8887921969
[211]  0.1876983316  0.2209557999  0.3180448644  0.4883456583  0.5063939575
[216] -0.0990456427  0.4645537453 -0.0205007592 -0.2988871246  0.3424948752
[221]  0.0842578658  0.0031026336  0.3949173321  0.2007206004  0.2788457534
[226] -0.4728395717  0.0078034670  0.2817089244 -0.0500936352 -0.3419308402
> 
> proc.time()
   user  system elapsed 
  1.938   0.836   2.801 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-unknown-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

<pointer: 0x36bfc6e0>
> .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: 0x36bfc6e0>
> .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: 0x36bfc6e0>
> .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: 0x36bfc6e0>
> 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: 0x36c446a0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x36c446a0>
> .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: 0x36c446a0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x36c446a0>
> .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: 0x36c446a0>
> 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: 0x35e007d0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x35e007d0>
> .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: 0x35e007d0>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x35e007d0>
> .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: 0x35e007d0>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x35e007d0>
> .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: 0x35e007d0>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x35e007d0>
> .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: 0x35e007d0>
> 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: 0x3695fd70>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x3695fd70>
> .Call("R_bm_AddColumn",P)
<pointer: 0x3695fd70>
> .Call("R_bm_AddColumn",P)
<pointer: 0x3695fd70>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile1b364218a109c9" "BufferedMatrixFile1b3642cb2cbee" 
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile1b364218a109c9" "BufferedMatrixFile1b3642cb2cbee" 
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x36502cd0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x36502cd0>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x36502cd0>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x36502cd0>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x36502cd0>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x36502cd0>
> .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: 0x35471a10>
> .Call("R_bm_AddColumn",P)
<pointer: 0x35471a10>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x35471a10>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x35471a10>
> 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: 0x3738bcc0>
> .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: 0x3738bcc0>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.341   0.057   0.385 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-unknown-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> Temp <- createBufferedMatrix(100)
> dim(Temp)
[1] 100   0
> buffer.dim(Temp)
[1] 1 1
> 
> 
> proc.time()
   user  system elapsed 
  0.314   0.057   0.359 

Example timings