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

This page was generated on 2025-11-24 12:07 -0500 (Mon, 24 Nov 2025).

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

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


CHECK results for BufferedMatrix on taishan

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

raw results


Summary

Package: BufferedMatrix
Version: 1.74.0
Command: /home/biocbuild/R/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R/site-library --no-vignettes --timings BufferedMatrix_1.74.0.tar.gz
StartedAt: 2025-11-21 08:35:50 -0000 (Fri, 21 Nov 2025)
EndedAt: 2025-11-21 08:36:20 -0000 (Fri, 21 Nov 2025)
EllapsedTime: 30.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.74.0.tar.gz
###
##############################################################################
##############################################################################


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

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


Installation output

BufferedMatrix.Rcheck/00install.out

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


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

Tests output

BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout


R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-unknown-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

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

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

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

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

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

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

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

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

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

[[1]]
[1] 0

> 
> proc.time()
   user  system elapsed 
  0.349   0.028   0.361 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-unknown-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> 
> ### this is used to control how many repetitions in something below
> ### higher values result in more checks.
> nreps <-100 ##20000
> 
> 
> ## test creation and some simple assignments and subsetting operations
> 
> ## first on single elements
> tmp <- createBufferedMatrix(1000,10)
> 
> tmp[10,5]
[1] 0
> tmp[10,5] <- 10
> tmp[10,5]
[1] 10
> tmp[10,5] <- 12.445
> tmp[10,5]
[1] 12.445
> 
> 
> 
> ## now testing accessing multiple elements
> tmp2 <- createBufferedMatrix(10,20)
> 
> 
> tmp2[3,1] <- 51.34
> tmp2[9,2] <- 9.87654
> tmp2[,1:2]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[,-(3:20)]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[3,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,] 51.34    0    0    0    0    0    0    0    0     0     0     0     0
     [,14] [,15] [,16] [,17] [,18] [,19] [,20]
[1,]     0     0     0     0     0     0     0
> tmp2[-3,]
      [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]    0 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19] [,20]
 [1,]     0     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0     0
> tmp2[2,1:3]
     [,1] [,2] [,3]
[1,]    0    0    0
> tmp2[3:9,1:3]
      [,1]    [,2] [,3]
[1,] 51.34 0.00000    0
[2,]  0.00 0.00000    0
[3,]  0.00 0.00000    0
[4,]  0.00 0.00000    0
[5,]  0.00 0.00000    0
[6,]  0.00 0.00000    0
[7,]  0.00 9.87654    0
> tmp2[-4,-4]
       [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,] 51.34 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]  0.00 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19]
 [1,]     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0
> 
> ## now testing accessing/assigning multiple elements
> tmp3 <- createBufferedMatrix(10,10)
> 
> for (i in 1:10){
+   for (j in 1:10){
+     tmp3[i,j] <- (j-1)*10 + i
+   }
+ }
> 
> tmp3[2:4,2:4]
     [,1] [,2] [,3]
[1,]   12   22   32
[2,]   13   23   33
[3,]   14   24   34
> tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]   11   21   31   11   21   31   91    1   11     1    11    21    31
 [2,]   12   22   32   12   22   32   92    2   12     2    12    22    32
 [3,]   13   23   33   13   23   33   93    3   13     3    13    23    33
 [4,]   14   24   34   14   24   34   94    4   14     4    14    24    34
 [5,]   15   25   35   15   25   35   95    5   15     5    15    25    35
 [6,]   16   26   36   16   26   36   96    6   16     6    16    26    36
 [7,]   17   27   37   17   27   37   97    7   17     7    17    27    37
 [8,]   18   28   38   18   28   38   98    8   18     8    18    28    38
 [9,]   19   29   39   19   29   39   99    9   19     9    19    29    39
      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
 [1,]    41    51    61    71    81    91    91    81    71    61    51    41
 [2,]    42    52    62    72    82    92    92    82    72    62    52    42
 [3,]    43    53    63    73    83    93    93    83    73    63    53    43
 [4,]    44    54    64    74    84    94    94    84    74    64    54    44
 [5,]    45    55    65    75    85    95    95    85    75    65    55    45
 [6,]    46    56    66    76    86    96    96    86    76    66    56    46
 [7,]    47    57    67    77    87    97    97    87    77    67    57    47
 [8,]    48    58    68    78    88    98    98    88    78    68    58    48
 [9,]    49    59    69    79    89    99    99    89    79    69    59    49
      [,26] [,27] [,28] [,29]
 [1,]    31    21    11     1
 [2,]    32    22    12     2
 [3,]    33    23    13     3
 [4,]    34    24    14     4
 [5,]    35    25    15     5
 [6,]    36    26    16     6
 [7,]    37    27    17     7
 [8,]    38    28    18     8
 [9,]    39    29    19     9
> tmp3[-c(1:5),-c(6:10)]
     [,1] [,2] [,3] [,4] [,5]
[1,]    6   16   26   36   46
[2,]    7   17   27   37   47
[3,]    8   18   28   38   48
[4,]    9   19   29   39   49
[5,]   10   20   30   40   50
> 
> ## assignment of whole columns
> tmp3[,1] <- c(1:10*100.0)
> tmp3[,1:2] <- tmp3[,1:2]*100
> tmp3[,1:2] <- tmp3[,2:1]
> tmp3[,1:2]
      [,1]  [,2]
 [1,] 1100 1e+04
 [2,] 1200 2e+04
 [3,] 1300 3e+04
 [4,] 1400 4e+04
 [5,] 1500 5e+04
 [6,] 1600 6e+04
 [7,] 1700 7e+04
 [8,] 1800 8e+04
 [9,] 1900 9e+04
[10,] 2000 1e+05
> 
> 
> tmp3[,-1] <- tmp3[,1:9]
> tmp3[,1:10]
      [,1] [,2]  [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,] 1100 1100 1e+04   21   31   41   51   61   71    81
 [2,] 1200 1200 2e+04   22   32   42   52   62   72    82
 [3,] 1300 1300 3e+04   23   33   43   53   63   73    83
 [4,] 1400 1400 4e+04   24   34   44   54   64   74    84
 [5,] 1500 1500 5e+04   25   35   45   55   65   75    85
 [6,] 1600 1600 6e+04   26   36   46   56   66   76    86
 [7,] 1700 1700 7e+04   27   37   47   57   67   77    87
 [8,] 1800 1800 8e+04   28   38   48   58   68   78    88
 [9,] 1900 1900 9e+04   29   39   49   59   69   79    89
[10,] 2000 2000 1e+05   30   40   50   60   70   80    90
> 
> tmp3[,1:2] <- rep(1,10)
> tmp3[,1:2] <- rep(1,20)
> tmp3[,1:2] <- matrix(c(1:5),1,5)
> 
> tmp3[,-c(1:8)] <- matrix(c(1:5),1,5)
> 
> tmp3[1,] <- 1:10
> tmp3[1,]
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    1    2    3    4    5    6    7    8    9    10
> tmp3[-1,] <- c(1,2)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    2    1    2    1    2    1    2    1    2     1
[10,]    1    2    1    2    1    2    1    2    1     2
> tmp3[-c(1:8),] <- matrix(c(1:5),1,5)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    1    3    5    2    4    1    3    5    2     4
[10,]    2    4    1    3    5    2    4    1    3     5
> 
> 
> tmp3[1:2,1:2] <- 5555.04
> tmp3[-(1:2),1:2] <- 1234.56789
> 
> 
> 
> ## testing accessors for the directory and prefix
> directory(tmp3)
[1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests"
> prefix(tmp3)
[1] "BM"
> 
> ## testing if we can remove these objects
> rm(tmp, tmp2, tmp3)
> gc()
         used (Mb) gc trigger (Mb) max used (Mb)
Ncells 478398 25.6    1047041   56   639620 34.2
Vcells 885166  6.8    8388608   64  2080985 15.9
> 
> 
> 
> 
> ##
> ## checking reads
> ##
> 
> tmp2 <- createBufferedMatrix(10,20)
> 
> test.sample <- rnorm(10*20)
> 
> tmp2[1:10,1:20] <- test.sample
> 
> test.matrix <- matrix(test.sample,10,20)
> 
> ## testing reads
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Fri Nov 21 08:36:14 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] "Fri Nov 21 08:36:14 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: 0xd7cdff0>
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Fri Nov 21 08:36:14 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] "Fri Nov 21 08:36:15 2025"
> 
> ColMode(tmp2)
<pointer: 0xd7cdff0>
> 
> 
> 
> ### Now testing assignments
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+ 
+   new.data <- rnorm(20)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,] <- new.data
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   new.data <- rnorm(10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+ 
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col  <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(25),5,5)
+   tmp2[which.row,which.col] <- new.data
+   test.matrix[which.row,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> ###
> ###
> ### testing some more functions
> ###
> 
> 
> 
> ## duplication function
> tmp5 <- duplicate(tmp2)
> 
> # making sure really did copy everything.
> tmp5[1,1] <- tmp5[1,1] +100.00
> 
> if (tmp5[1,1] == tmp2[1,1]){
+   stop("Problem with duplication")
+ }
> 
> 
> 
> 
> ### testing elementwise applying of functions
> 
> tmp5[1:4,1:4]
            [,1]         [,2]       [,3]       [,4]
[1,] 100.1750337 -1.008974019  0.9289808 -0.1841220
[2,]  -2.9968996  0.013643211  0.4843183 -0.3346746
[3,]  -1.3830370  0.005329865 -1.6987045 -1.7593674
[4,]  -0.8034185 -1.032506406  0.6607917 -0.3942604
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
            [,1]        [,2]      [,3]      [,4]
[1,] 100.1750337 1.008974019 0.9289808 0.1841220
[2,]   2.9968996 0.013643211 0.4843183 0.3346746
[3,]   1.3830370 0.005329865 1.6987045 1.7593674
[4,]   0.8034185 1.032506406 0.6607917 0.3942604
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
           [,1]       [,2]      [,3]      [,4]
[1,] 10.0087479 1.00447699 0.9638365 0.4290944
[2,]  1.7311556 0.11680416 0.6959298 0.5785107
[3,]  1.1760260 0.07300592 1.3033436 1.3264115
[4,]  0.8963362 1.01612322 0.8128909 0.6279016
> 
> my.function <- function(x,power){
+   (x+5)^power
+ }
> 
> ewApply(tmp5,my.function,power=2)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 225.26251 36.05374 35.56735 29.47507
[2,]  45.30846 26.18168 32.44362 31.11978
[3,]  38.14330 25.73539 39.73214 40.02348
[4,]  34.76678 36.19374 33.78970 31.67328
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0xc4b06c0>
> exp(tmp5)
<pointer: 0xc4b06c0>
> log(tmp5,2)
<pointer: 0xc4b06c0>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 468.8544
> Min(tmp5)
[1] 53.08342
> mean(tmp5)
[1] 73.18538
> Sum(tmp5)
[1] 14637.08
> Var(tmp5)
[1] 871.1552
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 87.75901 68.93979 74.15303 69.40497 73.35489 74.72791 71.70275 70.73926
 [9] 68.56923 72.50295
> rowSums(tmp5)
 [1] 1755.180 1378.796 1483.061 1388.099 1467.098 1494.558 1434.055 1414.785
 [9] 1371.385 1450.059
> rowVars(tmp5)
 [1] 8114.76019   89.38338   98.15275   95.51631   71.85153   39.48834
 [7]   85.26438   82.19380   62.22458   92.72900
> rowSd(tmp5)
 [1] 90.081964  9.454279  9.907207  9.773244  8.476528  6.283975  9.233872
 [8]  9.066080  7.888256  9.629590
> rowMax(tmp5)
 [1] 468.85441  94.30361  91.08182  91.59610  86.40257  83.22225  88.44179
 [8]  90.94006  85.80218  85.24062
> rowMin(tmp5)
 [1] 55.24439 54.49375 53.56484 53.08342 59.55102 59.79248 56.12187 57.71246
 [9] 54.21713 55.11358
> 
> colMeans(tmp5)
 [1] 114.42320  66.85929  71.45220  64.18395  67.88289  68.49990  75.61662
 [8]  67.60285  72.20062  68.75519  73.24436  69.01857  67.70291  71.76175
[15]  73.82800  74.30015  72.59225  75.54817  72.33199  75.90274
> colSums(tmp5)
 [1] 1144.2320  668.5929  714.5220  641.8395  678.8289  684.9990  756.1662
 [8]  676.0285  722.0062  687.5519  732.4436  690.1857  677.0291  717.6175
[15]  738.2800  743.0015  725.9225  755.4817  723.3199  759.0274
> colVars(tmp5)
 [1] 15640.77156    87.57568   107.82693    67.91334    35.13309    53.09126
 [7]   106.33870    53.09592   107.49713   109.87154    73.15348    48.53333
[13]    36.04990    72.24405   112.87602    69.29636    91.77323    28.06713
[19]    76.51974    65.13428
> colSd(tmp5)
 [1] 125.063070   9.358188  10.383975   8.240955   5.927318   7.286375
 [7]  10.312066   7.286694  10.368082  10.481963   8.552981   6.966586
[13]   6.004157   8.499650  10.624313   8.324444   9.579834   5.297842
[19]   8.747556   8.070581
> colMax(tmp5)
 [1] 468.85441  76.16007  84.39329  83.30363  76.34685  81.55283  91.59610
 [8]  81.21285  87.23580  84.74850  84.54152  77.38865  75.44386  86.40257
[15]  82.96045  85.80218  90.94006  84.94697  88.44179  91.08182
> colMin(tmp5)
 [1] 56.12187 53.56484 55.59262 55.11358 58.02824 61.09104 59.75491 57.71638
 [9] 55.24439 55.53931 60.28062 57.33169 59.60779 59.43119 55.41371 63.13525
[17] 53.08342 69.07493 63.36184 61.81983
> 
> 
> ### 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] 87.75901 68.93979 74.15303       NA 73.35489 74.72791 71.70275 70.73926
 [9] 68.56923 72.50295
> rowSums(tmp5)
 [1] 1755.180 1378.796 1483.061       NA 1467.098 1494.558 1434.055 1414.785
 [9] 1371.385 1450.059
> rowVars(tmp5)
 [1] 8114.76019   89.38338   98.15275   99.27420   71.85153   39.48834
 [7]   85.26438   82.19380   62.22458   92.72900
> rowSd(tmp5)
 [1] 90.081964  9.454279  9.907207  9.963644  8.476528  6.283975  9.233872
 [8]  9.066080  7.888256  9.629590
> rowMax(tmp5)
 [1] 468.85441  94.30361  91.08182        NA  86.40257  83.22225  88.44179
 [8]  90.94006  85.80218  85.24062
> rowMin(tmp5)
 [1] 55.24439 54.49375 53.56484       NA 59.55102 59.79248 56.12187 57.71246
 [9] 54.21713 55.11358
> 
> colMeans(tmp5)
 [1] 114.42320  66.85929  71.45220  64.18395  67.88289  68.49990  75.61662
 [8]  67.60285  72.20062  68.75519  73.24436  69.01857        NA  71.76175
[15]  73.82800  74.30015  72.59225  75.54817  72.33199  75.90274
> colSums(tmp5)
 [1] 1144.2320  668.5929  714.5220  641.8395  678.8289  684.9990  756.1662
 [8]  676.0285  722.0062  687.5519  732.4436  690.1857        NA  717.6175
[15]  738.2800  743.0015  725.9225  755.4817  723.3199  759.0274
> colVars(tmp5)
 [1] 15640.77156    87.57568   107.82693    67.91334    35.13309    53.09126
 [7]   106.33870    53.09592   107.49713   109.87154    73.15348    48.53333
[13]          NA    72.24405   112.87602    69.29636    91.77323    28.06713
[19]    76.51974    65.13428
> colSd(tmp5)
 [1] 125.063070   9.358188  10.383975   8.240955   5.927318   7.286375
 [7]  10.312066   7.286694  10.368082  10.481963   8.552981   6.966586
[13]         NA   8.499650  10.624313   8.324444   9.579834   5.297842
[19]   8.747556   8.070581
> colMax(tmp5)
 [1] 468.85441  76.16007  84.39329  83.30363  76.34685  81.55283  91.59610
 [8]  81.21285  87.23580  84.74850  84.54152  77.38865        NA  86.40257
[15]  82.96045  85.80218  90.94006  84.94697  88.44179  91.08182
> colMin(tmp5)
 [1] 56.12187 53.56484 55.59262 55.11358 58.02824 61.09104 59.75491 57.71638
 [9] 55.24439 55.53931 60.28062 57.33169       NA 59.43119 55.41371 63.13525
[17] 53.08342 69.07493 63.36184 61.81983
> 
> Max(tmp5,na.rm=TRUE)
[1] 468.8544
> Min(tmp5,na.rm=TRUE)
[1] 53.08342
> mean(tmp5,na.rm=TRUE)
[1] 73.23023
> Sum(tmp5,na.rm=TRUE)
[1] 14572.82
> Var(tmp5,na.rm=TRUE)
[1] 875.1505
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 87.75901 68.93979 74.15303 69.67581 73.35489 74.72791 71.70275 70.73926
 [9] 68.56923 72.50295
> rowSums(tmp5,na.rm=TRUE)
 [1] 1755.180 1378.796 1483.061 1323.840 1467.098 1494.558 1434.055 1414.785
 [9] 1371.385 1450.059
> rowVars(tmp5,na.rm=TRUE)
 [1] 8114.76019   89.38338   98.15275   99.27420   71.85153   39.48834
 [7]   85.26438   82.19380   62.22458   92.72900
> rowSd(tmp5,na.rm=TRUE)
 [1] 90.081964  9.454279  9.907207  9.963644  8.476528  6.283975  9.233872
 [8]  9.066080  7.888256  9.629590
> rowMax(tmp5,na.rm=TRUE)
 [1] 468.85441  94.30361  91.08182  91.59610  86.40257  83.22225  88.44179
 [8]  90.94006  85.80218  85.24062
> rowMin(tmp5,na.rm=TRUE)
 [1] 55.24439 54.49375 53.56484 53.08342 59.55102 59.79248 56.12187 57.71246
 [9] 54.21713 55.11358
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 114.42320  66.85929  71.45220  64.18395  67.88289  68.49990  75.61662
 [8]  67.60285  72.20062  68.75519  73.24436  69.01857  68.08557  71.76175
[15]  73.82800  74.30015  72.59225  75.54817  72.33199  75.90274
> colSums(tmp5,na.rm=TRUE)
 [1] 1144.2320  668.5929  714.5220  641.8395  678.8289  684.9990  756.1662
 [8]  676.0285  722.0062  687.5519  732.4436  690.1857  612.7701  717.6175
[15]  738.2800  743.0015  725.9225  755.4817  723.3199  759.0274
> colVars(tmp5,na.rm=TRUE)
 [1] 15640.77156    87.57568   107.82693    67.91334    35.13309    53.09126
 [7]   106.33870    53.09592   107.49713   109.87154    73.15348    48.53333
[13]    38.90889    72.24405   112.87602    69.29636    91.77323    28.06713
[19]    76.51974    65.13428
> colSd(tmp5,na.rm=TRUE)
 [1] 125.063070   9.358188  10.383975   8.240955   5.927318   7.286375
 [7]  10.312066   7.286694  10.368082  10.481963   8.552981   6.966586
[13]   6.237699   8.499650  10.624313   8.324444   9.579834   5.297842
[19]   8.747556   8.070581
> colMax(tmp5,na.rm=TRUE)
 [1] 468.85441  76.16007  84.39329  83.30363  76.34685  81.55283  91.59610
 [8]  81.21285  87.23580  84.74850  84.54152  77.38865  75.44386  86.40257
[15]  82.96045  85.80218  90.94006  84.94697  88.44179  91.08182
> colMin(tmp5,na.rm=TRUE)
 [1] 56.12187 53.56484 55.59262 55.11358 58.02824 61.09104 59.75491 57.71638
 [9] 55.24439 55.53931 60.28062 57.33169 59.60779 59.43119 55.41371 63.13525
[17] 53.08342 69.07493 63.36184 61.81983
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 87.75901 68.93979 74.15303      NaN 73.35489 74.72791 71.70275 70.73926
 [9] 68.56923 72.50295
> rowSums(tmp5,na.rm=TRUE)
 [1] 1755.180 1378.796 1483.061    0.000 1467.098 1494.558 1434.055 1414.785
 [9] 1371.385 1450.059
> rowVars(tmp5,na.rm=TRUE)
 [1] 8114.76019   89.38338   98.15275         NA   71.85153   39.48834
 [7]   85.26438   82.19380   62.22458   92.72900
> rowSd(tmp5,na.rm=TRUE)
 [1] 90.081964  9.454279  9.907207        NA  8.476528  6.283975  9.233872
 [8]  9.066080  7.888256  9.629590
> rowMax(tmp5,na.rm=TRUE)
 [1] 468.85441  94.30361  91.08182        NA  86.40257  83.22225  88.44179
 [8]  90.94006  85.80218  85.24062
> rowMin(tmp5,na.rm=TRUE)
 [1] 55.24439 54.49375 53.56484       NA 59.55102 59.79248 56.12187 57.71246
 [9] 54.21713 55.11358
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 119.09661  65.91782  71.57702  63.99063  67.62622  69.32310  73.84112
 [8]  67.16124  72.74255  70.22362  74.67062  69.53621       NaN  70.86911
[15]  72.81329  75.54069  74.75990  74.71656  72.14911  77.46750
> colSums(tmp5,na.rm=TRUE)
 [1] 1071.8695  593.2603  644.1931  575.9157  608.6360  623.9079  664.5701
 [8]  604.4511  654.6830  632.0126  672.0356  625.8259    0.0000  637.8220
[15]  655.3196  679.8662  672.8391  672.4490  649.3419  697.2075
> colVars(tmp5,na.rm=TRUE)
 [1] 17350.15933    88.55100   121.13003    75.98210    38.78357    52.10389
 [7]    84.16661    57.53895   117.63023    99.34724    59.41272    51.58544
[13]          NA    72.31062   115.40198    60.64522    50.38452    23.79520
[19]    85.70845    45.73050
> colSd(tmp5,na.rm=TRUE)
 [1] 131.720004   9.410154  11.005909   8.716771   6.227646   7.218302
 [7]   9.174236   7.585444  10.845747   9.967309   7.707965   7.182301
[13]         NA   8.503565  10.742531   7.787504   7.098205   4.878033
[19]   9.257886   6.762433
> colMax(tmp5,na.rm=TRUE)
 [1] 468.85441  76.16007  84.39329  83.30363  76.34685  81.55283  85.31545
 [8]  81.21285  87.23580  84.74850  84.54152  77.38865      -Inf  86.40257
[15]  82.81823  85.80218  90.94006  84.94697  88.44179  91.08182
> colMin(tmp5,na.rm=TRUE)
 [1] 56.12187 53.56484 55.59262 55.11358 58.02824 61.60480 59.75491 57.71638
 [9] 55.24439 56.40608 60.28062 57.33169      Inf 59.43119 55.41371 64.76310
[17] 65.71687 69.07493 63.36184 69.23142
> 
> 
> 
> 
> 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] 244.1710 236.9088 432.4877 154.0472 183.8117 333.8822 191.5401 319.5918
 [9] 205.3234 240.7682
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 244.1710 236.9088 432.4877 154.0472 183.8117 333.8822 191.5401 319.5918
 [9] 205.3234 240.7682
> 
> 
> 
> copymatrix <- matrix(rnorm(200,150,15),10,20)
> 
> tmp5[1:10,1:20] <- copymatrix
> which.row <- 1
> which.col  <- 3
> cat(which.row," ",which.col,"\n")
1   3 
> tmp5[which.row,which.col] <- NA
> copymatrix[which.row,which.col] <- NA
> 
> colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE)
 [1] -5.684342e-14 -5.684342e-14 -2.842171e-14 -2.842171e-14 -5.684342e-14
 [6]  1.136868e-13  5.684342e-14  1.705303e-13  1.136868e-13 -1.136868e-13
[11]  1.421085e-13 -4.263256e-14  2.842171e-14 -1.136868e-13 -1.705303e-13
[16]  3.552714e-14 -2.842171e-14  5.684342e-14  5.684342e-14 -2.273737e-13
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## 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)
+ }
7   11 
3   12 
1   19 
8   18 
3   8 
6   10 
7   7 
7   14 
3   19 
9   8 
8   13 
3   15 
4   8 
3   3 
1   20 
7   6 
4   19 
1   12 
6   15 
5   16 
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.07757
> Min(tmp)
[1] -2.728525
> mean(tmp)
[1] 0.03056894
> Sum(tmp)
[1] 3.056894
> Var(tmp)
[1] 0.9987542
> 
> rowMeans(tmp)
[1] 0.03056894
> rowSums(tmp)
[1] 3.056894
> rowVars(tmp)
[1] 0.9987542
> rowSd(tmp)
[1] 0.9993769
> rowMax(tmp)
[1] 2.07757
> rowMin(tmp)
[1] -2.728525
> 
> colMeans(tmp)
  [1]  0.66278774 -0.11206652  1.81005973 -1.14004932  1.77142691 -0.41817003
  [7] -0.28317196 -0.92856003  0.11987223  0.44003135 -0.36175819  0.19522356
 [13] -0.90053297 -1.19687853  1.59824006  0.89514189  0.37384430  1.13795427
 [19] -0.11370543  0.25576582 -0.48528434 -0.11741654 -0.69708028 -2.72852520
 [25]  1.22422430 -0.70215581 -1.04535673  0.97807210 -1.35381234 -0.42490285
 [31] -1.44981409 -1.04814369  0.07277068 -0.94131016  0.07730654 -0.83355962
 [37] -1.54688713  1.47490071 -0.90678650  1.97610199  0.21322313 -0.37421846
 [43]  0.88111833  0.14736938  0.70104349  2.07757029 -0.23211322  1.70658313
 [49]  0.79245983  0.67117327 -0.42909009  0.72369741 -0.13540601  0.99245201
 [55] -1.02397005  1.21870583  1.82569674  0.80098826 -0.96159957 -1.35349460
 [61]  0.09497387 -0.45644963  0.65529326  0.33543784  0.95578609 -0.04756671
 [67] -0.55395641  0.82280242  1.23907901 -0.12852872 -1.08278027  1.17942978
 [73]  0.22424394 -0.48834562 -0.84894557  0.65508868 -0.62834996 -0.54359239
 [79]  0.49662465 -2.08723653  0.00482606  1.14641941 -1.10975281 -0.30577901
 [85]  0.44791344  2.02383129 -1.13605073 -0.50454076 -0.74980940  0.23619035
 [91] -1.81273221 -1.63787204  0.47909802  0.93034832 -0.53292416  1.30275963
 [97] -0.65359380  0.51335607  0.81603658  0.23617679
> colSums(tmp)
  [1]  0.66278774 -0.11206652  1.81005973 -1.14004932  1.77142691 -0.41817003
  [7] -0.28317196 -0.92856003  0.11987223  0.44003135 -0.36175819  0.19522356
 [13] -0.90053297 -1.19687853  1.59824006  0.89514189  0.37384430  1.13795427
 [19] -0.11370543  0.25576582 -0.48528434 -0.11741654 -0.69708028 -2.72852520
 [25]  1.22422430 -0.70215581 -1.04535673  0.97807210 -1.35381234 -0.42490285
 [31] -1.44981409 -1.04814369  0.07277068 -0.94131016  0.07730654 -0.83355962
 [37] -1.54688713  1.47490071 -0.90678650  1.97610199  0.21322313 -0.37421846
 [43]  0.88111833  0.14736938  0.70104349  2.07757029 -0.23211322  1.70658313
 [49]  0.79245983  0.67117327 -0.42909009  0.72369741 -0.13540601  0.99245201
 [55] -1.02397005  1.21870583  1.82569674  0.80098826 -0.96159957 -1.35349460
 [61]  0.09497387 -0.45644963  0.65529326  0.33543784  0.95578609 -0.04756671
 [67] -0.55395641  0.82280242  1.23907901 -0.12852872 -1.08278027  1.17942978
 [73]  0.22424394 -0.48834562 -0.84894557  0.65508868 -0.62834996 -0.54359239
 [79]  0.49662465 -2.08723653  0.00482606  1.14641941 -1.10975281 -0.30577901
 [85]  0.44791344  2.02383129 -1.13605073 -0.50454076 -0.74980940  0.23619035
 [91] -1.81273221 -1.63787204  0.47909802  0.93034832 -0.53292416  1.30275963
 [97] -0.65359380  0.51335607  0.81603658  0.23617679
> 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.66278774 -0.11206652  1.81005973 -1.14004932  1.77142691 -0.41817003
  [7] -0.28317196 -0.92856003  0.11987223  0.44003135 -0.36175819  0.19522356
 [13] -0.90053297 -1.19687853  1.59824006  0.89514189  0.37384430  1.13795427
 [19] -0.11370543  0.25576582 -0.48528434 -0.11741654 -0.69708028 -2.72852520
 [25]  1.22422430 -0.70215581 -1.04535673  0.97807210 -1.35381234 -0.42490285
 [31] -1.44981409 -1.04814369  0.07277068 -0.94131016  0.07730654 -0.83355962
 [37] -1.54688713  1.47490071 -0.90678650  1.97610199  0.21322313 -0.37421846
 [43]  0.88111833  0.14736938  0.70104349  2.07757029 -0.23211322  1.70658313
 [49]  0.79245983  0.67117327 -0.42909009  0.72369741 -0.13540601  0.99245201
 [55] -1.02397005  1.21870583  1.82569674  0.80098826 -0.96159957 -1.35349460
 [61]  0.09497387 -0.45644963  0.65529326  0.33543784  0.95578609 -0.04756671
 [67] -0.55395641  0.82280242  1.23907901 -0.12852872 -1.08278027  1.17942978
 [73]  0.22424394 -0.48834562 -0.84894557  0.65508868 -0.62834996 -0.54359239
 [79]  0.49662465 -2.08723653  0.00482606  1.14641941 -1.10975281 -0.30577901
 [85]  0.44791344  2.02383129 -1.13605073 -0.50454076 -0.74980940  0.23619035
 [91] -1.81273221 -1.63787204  0.47909802  0.93034832 -0.53292416  1.30275963
 [97] -0.65359380  0.51335607  0.81603658  0.23617679
> colMin(tmp)
  [1]  0.66278774 -0.11206652  1.81005973 -1.14004932  1.77142691 -0.41817003
  [7] -0.28317196 -0.92856003  0.11987223  0.44003135 -0.36175819  0.19522356
 [13] -0.90053297 -1.19687853  1.59824006  0.89514189  0.37384430  1.13795427
 [19] -0.11370543  0.25576582 -0.48528434 -0.11741654 -0.69708028 -2.72852520
 [25]  1.22422430 -0.70215581 -1.04535673  0.97807210 -1.35381234 -0.42490285
 [31] -1.44981409 -1.04814369  0.07277068 -0.94131016  0.07730654 -0.83355962
 [37] -1.54688713  1.47490071 -0.90678650  1.97610199  0.21322313 -0.37421846
 [43]  0.88111833  0.14736938  0.70104349  2.07757029 -0.23211322  1.70658313
 [49]  0.79245983  0.67117327 -0.42909009  0.72369741 -0.13540601  0.99245201
 [55] -1.02397005  1.21870583  1.82569674  0.80098826 -0.96159957 -1.35349460
 [61]  0.09497387 -0.45644963  0.65529326  0.33543784  0.95578609 -0.04756671
 [67] -0.55395641  0.82280242  1.23907901 -0.12852872 -1.08278027  1.17942978
 [73]  0.22424394 -0.48834562 -0.84894557  0.65508868 -0.62834996 -0.54359239
 [79]  0.49662465 -2.08723653  0.00482606  1.14641941 -1.10975281 -0.30577901
 [85]  0.44791344  2.02383129 -1.13605073 -0.50454076 -0.74980940  0.23619035
 [91] -1.81273221 -1.63787204  0.47909802  0.93034832 -0.53292416  1.30275963
 [97] -0.65359380  0.51335607  0.81603658  0.23617679
> colMedians(tmp)
  [1]  0.66278774 -0.11206652  1.81005973 -1.14004932  1.77142691 -0.41817003
  [7] -0.28317196 -0.92856003  0.11987223  0.44003135 -0.36175819  0.19522356
 [13] -0.90053297 -1.19687853  1.59824006  0.89514189  0.37384430  1.13795427
 [19] -0.11370543  0.25576582 -0.48528434 -0.11741654 -0.69708028 -2.72852520
 [25]  1.22422430 -0.70215581 -1.04535673  0.97807210 -1.35381234 -0.42490285
 [31] -1.44981409 -1.04814369  0.07277068 -0.94131016  0.07730654 -0.83355962
 [37] -1.54688713  1.47490071 -0.90678650  1.97610199  0.21322313 -0.37421846
 [43]  0.88111833  0.14736938  0.70104349  2.07757029 -0.23211322  1.70658313
 [49]  0.79245983  0.67117327 -0.42909009  0.72369741 -0.13540601  0.99245201
 [55] -1.02397005  1.21870583  1.82569674  0.80098826 -0.96159957 -1.35349460
 [61]  0.09497387 -0.45644963  0.65529326  0.33543784  0.95578609 -0.04756671
 [67] -0.55395641  0.82280242  1.23907901 -0.12852872 -1.08278027  1.17942978
 [73]  0.22424394 -0.48834562 -0.84894557  0.65508868 -0.62834996 -0.54359239
 [79]  0.49662465 -2.08723653  0.00482606  1.14641941 -1.10975281 -0.30577901
 [85]  0.44791344  2.02383129 -1.13605073 -0.50454076 -0.74980940  0.23619035
 [91] -1.81273221 -1.63787204  0.47909802  0.93034832 -0.53292416  1.30275963
 [97] -0.65359380  0.51335607  0.81603658  0.23617679
> colRanges(tmp)
          [,1]       [,2]    [,3]      [,4]     [,5]     [,6]      [,7]
[1,] 0.6627877 -0.1120665 1.81006 -1.140049 1.771427 -0.41817 -0.283172
[2,] 0.6627877 -0.1120665 1.81006 -1.140049 1.771427 -0.41817 -0.283172
         [,8]      [,9]     [,10]      [,11]     [,12]     [,13]     [,14]
[1,] -0.92856 0.1198722 0.4400314 -0.3617582 0.1952236 -0.900533 -1.196879
[2,] -0.92856 0.1198722 0.4400314 -0.3617582 0.1952236 -0.900533 -1.196879
       [,15]     [,16]     [,17]    [,18]      [,19]     [,20]      [,21]
[1,] 1.59824 0.8951419 0.3738443 1.137954 -0.1137054 0.2557658 -0.4852843
[2,] 1.59824 0.8951419 0.3738443 1.137954 -0.1137054 0.2557658 -0.4852843
          [,22]      [,23]     [,24]    [,25]      [,26]     [,27]     [,28]
[1,] -0.1174165 -0.6970803 -2.728525 1.224224 -0.7021558 -1.045357 0.9780721
[2,] -0.1174165 -0.6970803 -2.728525 1.224224 -0.7021558 -1.045357 0.9780721
         [,29]      [,30]     [,31]     [,32]      [,33]      [,34]      [,35]
[1,] -1.353812 -0.4249029 -1.449814 -1.048144 0.07277068 -0.9413102 0.07730654
[2,] -1.353812 -0.4249029 -1.449814 -1.048144 0.07277068 -0.9413102 0.07730654
          [,36]     [,37]    [,38]      [,39]    [,40]     [,41]      [,42]
[1,] -0.8335596 -1.546887 1.474901 -0.9067865 1.976102 0.2132231 -0.3742185
[2,] -0.8335596 -1.546887 1.474901 -0.9067865 1.976102 0.2132231 -0.3742185
         [,43]     [,44]     [,45]   [,46]      [,47]    [,48]     [,49]
[1,] 0.8811183 0.1473694 0.7010435 2.07757 -0.2321132 1.706583 0.7924598
[2,] 0.8811183 0.1473694 0.7010435 2.07757 -0.2321132 1.706583 0.7924598
         [,50]      [,51]     [,52]     [,53]    [,54]    [,55]    [,56]
[1,] 0.6711733 -0.4290901 0.7236974 -0.135406 0.992452 -1.02397 1.218706
[2,] 0.6711733 -0.4290901 0.7236974 -0.135406 0.992452 -1.02397 1.218706
        [,57]     [,58]      [,59]     [,60]      [,61]      [,62]     [,63]
[1,] 1.825697 0.8009883 -0.9615996 -1.353495 0.09497387 -0.4564496 0.6552933
[2,] 1.825697 0.8009883 -0.9615996 -1.353495 0.09497387 -0.4564496 0.6552933
         [,64]     [,65]       [,66]      [,67]     [,68]    [,69]      [,70]
[1,] 0.3354378 0.9557861 -0.04756671 -0.5539564 0.8228024 1.239079 -0.1285287
[2,] 0.3354378 0.9557861 -0.04756671 -0.5539564 0.8228024 1.239079 -0.1285287
        [,71]   [,72]     [,73]      [,74]      [,75]     [,76]    [,77]
[1,] -1.08278 1.17943 0.2242439 -0.4883456 -0.8489456 0.6550887 -0.62835
[2,] -1.08278 1.17943 0.2242439 -0.4883456 -0.8489456 0.6550887 -0.62835
          [,78]     [,79]     [,80]      [,81]    [,82]     [,83]     [,84]
[1,] -0.5435924 0.4966247 -2.087237 0.00482606 1.146419 -1.109753 -0.305779
[2,] -0.5435924 0.4966247 -2.087237 0.00482606 1.146419 -1.109753 -0.305779
         [,85]    [,86]     [,87]      [,88]      [,89]     [,90]     [,91]
[1,] 0.4479134 2.023831 -1.136051 -0.5045408 -0.7498094 0.2361903 -1.812732
[2,] 0.4479134 2.023831 -1.136051 -0.5045408 -0.7498094 0.2361903 -1.812732
         [,92]    [,93]     [,94]      [,95]   [,96]      [,97]     [,98]
[1,] -1.637872 0.479098 0.9303483 -0.5329242 1.30276 -0.6535938 0.5133561
[2,] -1.637872 0.479098 0.9303483 -0.5329242 1.30276 -0.6535938 0.5133561
         [,99]    [,100]
[1,] 0.8160366 0.2361768
[2,] 0.8160366 0.2361768
> 
> 
> Max(tmp2)
[1] 3.396493
> Min(tmp2)
[1] -3.144042
> mean(tmp2)
[1] -0.1049338
> Sum(tmp2)
[1] -10.49338
> Var(tmp2)
[1] 1.341816
> 
> rowMeans(tmp2)
  [1]  0.12100057 -0.74602385 -0.86203832 -1.16438457  0.37781158  0.45173296
  [7]  0.22709026  2.48689088 -0.50617778  0.37594334  0.15824957  1.48298488
 [13] -1.16697353 -0.04347327 -0.76563738 -0.44506784  0.39025547 -1.81602120
 [19]  1.40728234 -0.82873514 -0.15091148 -0.65282801 -0.33272947 -1.73202249
 [25] -1.93954560 -2.39318505  0.58127309 -1.36333357  2.35008319  0.11943761
 [31]  1.39126015 -1.37388462 -0.52363521  0.69011724 -0.64926790 -0.53780013
 [37] -0.05134426  1.11085695 -2.37747680  1.38837839  0.83861277  3.39649250
 [43] -1.07189241  0.68922043 -0.55571756  0.19918346 -0.74060616  0.01299441
 [49]  0.26450364 -0.39738243 -0.81929195  1.08006713  0.94023717  0.31169654
 [55]  0.43392009 -0.68675923 -0.97840906  0.15147803 -0.10491676  0.65780169
 [61]  1.25214433 -2.57722230 -2.05438876 -0.15659415  0.77115314  2.23102703
 [67]  1.82193611  0.73248040  0.14515032  1.27176795  1.12718008  1.63055346
 [73]  0.21164924 -3.14404214 -0.35998914  0.49251640  1.04665127 -0.68515965
 [79] -0.19638213  0.32290356 -0.24280858 -0.90520627 -1.00837985 -0.27949702
 [85] -0.58400690 -1.54469654 -0.73805475 -0.38148916 -2.08691701 -0.86553313
 [91] -1.80527923 -0.67871868 -0.65197904  0.60427230 -0.97277307  0.05292527
 [97]  0.06036963  1.73446297 -0.70726875  0.31448198
> rowSums(tmp2)
  [1]  0.12100057 -0.74602385 -0.86203832 -1.16438457  0.37781158  0.45173296
  [7]  0.22709026  2.48689088 -0.50617778  0.37594334  0.15824957  1.48298488
 [13] -1.16697353 -0.04347327 -0.76563738 -0.44506784  0.39025547 -1.81602120
 [19]  1.40728234 -0.82873514 -0.15091148 -0.65282801 -0.33272947 -1.73202249
 [25] -1.93954560 -2.39318505  0.58127309 -1.36333357  2.35008319  0.11943761
 [31]  1.39126015 -1.37388462 -0.52363521  0.69011724 -0.64926790 -0.53780013
 [37] -0.05134426  1.11085695 -2.37747680  1.38837839  0.83861277  3.39649250
 [43] -1.07189241  0.68922043 -0.55571756  0.19918346 -0.74060616  0.01299441
 [49]  0.26450364 -0.39738243 -0.81929195  1.08006713  0.94023717  0.31169654
 [55]  0.43392009 -0.68675923 -0.97840906  0.15147803 -0.10491676  0.65780169
 [61]  1.25214433 -2.57722230 -2.05438876 -0.15659415  0.77115314  2.23102703
 [67]  1.82193611  0.73248040  0.14515032  1.27176795  1.12718008  1.63055346
 [73]  0.21164924 -3.14404214 -0.35998914  0.49251640  1.04665127 -0.68515965
 [79] -0.19638213  0.32290356 -0.24280858 -0.90520627 -1.00837985 -0.27949702
 [85] -0.58400690 -1.54469654 -0.73805475 -0.38148916 -2.08691701 -0.86553313
 [91] -1.80527923 -0.67871868 -0.65197904  0.60427230 -0.97277307  0.05292527
 [97]  0.06036963  1.73446297 -0.70726875  0.31448198
> rowVars(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowSd(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowMax(tmp2)
  [1]  0.12100057 -0.74602385 -0.86203832 -1.16438457  0.37781158  0.45173296
  [7]  0.22709026  2.48689088 -0.50617778  0.37594334  0.15824957  1.48298488
 [13] -1.16697353 -0.04347327 -0.76563738 -0.44506784  0.39025547 -1.81602120
 [19]  1.40728234 -0.82873514 -0.15091148 -0.65282801 -0.33272947 -1.73202249
 [25] -1.93954560 -2.39318505  0.58127309 -1.36333357  2.35008319  0.11943761
 [31]  1.39126015 -1.37388462 -0.52363521  0.69011724 -0.64926790 -0.53780013
 [37] -0.05134426  1.11085695 -2.37747680  1.38837839  0.83861277  3.39649250
 [43] -1.07189241  0.68922043 -0.55571756  0.19918346 -0.74060616  0.01299441
 [49]  0.26450364 -0.39738243 -0.81929195  1.08006713  0.94023717  0.31169654
 [55]  0.43392009 -0.68675923 -0.97840906  0.15147803 -0.10491676  0.65780169
 [61]  1.25214433 -2.57722230 -2.05438876 -0.15659415  0.77115314  2.23102703
 [67]  1.82193611  0.73248040  0.14515032  1.27176795  1.12718008  1.63055346
 [73]  0.21164924 -3.14404214 -0.35998914  0.49251640  1.04665127 -0.68515965
 [79] -0.19638213  0.32290356 -0.24280858 -0.90520627 -1.00837985 -0.27949702
 [85] -0.58400690 -1.54469654 -0.73805475 -0.38148916 -2.08691701 -0.86553313
 [91] -1.80527923 -0.67871868 -0.65197904  0.60427230 -0.97277307  0.05292527
 [97]  0.06036963  1.73446297 -0.70726875  0.31448198
> rowMin(tmp2)
  [1]  0.12100057 -0.74602385 -0.86203832 -1.16438457  0.37781158  0.45173296
  [7]  0.22709026  2.48689088 -0.50617778  0.37594334  0.15824957  1.48298488
 [13] -1.16697353 -0.04347327 -0.76563738 -0.44506784  0.39025547 -1.81602120
 [19]  1.40728234 -0.82873514 -0.15091148 -0.65282801 -0.33272947 -1.73202249
 [25] -1.93954560 -2.39318505  0.58127309 -1.36333357  2.35008319  0.11943761
 [31]  1.39126015 -1.37388462 -0.52363521  0.69011724 -0.64926790 -0.53780013
 [37] -0.05134426  1.11085695 -2.37747680  1.38837839  0.83861277  3.39649250
 [43] -1.07189241  0.68922043 -0.55571756  0.19918346 -0.74060616  0.01299441
 [49]  0.26450364 -0.39738243 -0.81929195  1.08006713  0.94023717  0.31169654
 [55]  0.43392009 -0.68675923 -0.97840906  0.15147803 -0.10491676  0.65780169
 [61]  1.25214433 -2.57722230 -2.05438876 -0.15659415  0.77115314  2.23102703
 [67]  1.82193611  0.73248040  0.14515032  1.27176795  1.12718008  1.63055346
 [73]  0.21164924 -3.14404214 -0.35998914  0.49251640  1.04665127 -0.68515965
 [79] -0.19638213  0.32290356 -0.24280858 -0.90520627 -1.00837985 -0.27949702
 [85] -0.58400690 -1.54469654 -0.73805475 -0.38148916 -2.08691701 -0.86553313
 [91] -1.80527923 -0.67871868 -0.65197904  0.60427230 -0.97277307  0.05292527
 [97]  0.06036963  1.73446297 -0.70726875  0.31448198
> 
> colMeans(tmp2)
[1] -0.1049338
> colSums(tmp2)
[1] -10.49338
> colVars(tmp2)
[1] 1.341816
> colSd(tmp2)
[1] 1.158368
> colMax(tmp2)
[1] 3.396493
> colMin(tmp2)
[1] -3.144042
> colMedians(tmp2)
[1] -0.1279141
> colRanges(tmp2)
          [,1]
[1,] -3.144042
[2,]  3.396493
> 
> dataset1 <- matrix(dataset1,1,100)
> 
> agree.checks(tmp,dataset1)
> 
> dataset2 <- matrix(dataset2,100,1)
> agree.checks(tmp2,dataset2)
>   
> 
> tmp <- createBufferedMatrix(10,10)
> 
> tmp[1:10,1:10] <- rnorm(100)
> colApply(tmp,sum)
 [1] -0.54342873 -2.67350188  4.90440452 -0.07749249 -6.95187491 -0.83031597
 [7] -1.18902313  6.89539885 -5.04302998 -1.47661549
> colApply(tmp,quantile)[,1]
            [,1]
[1,] -1.29587939
[2,] -0.89560690
[3,]  0.05721793
[4,]  0.36148788
[5,]  1.59496484
> 
> rowApply(tmp,sum)
 [1]  4.53857670 -0.94944031  1.16803335  0.30553960 -1.90649679 -3.00440169
 [7] -2.53462894 -2.17392583 -0.09538619 -2.33334912
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    2    9   10    1    9    6    8    8    5     3
 [2,]    1    6    2    6   10    4    1    6    6     5
 [3,]   10    4    7    9    4   10    9    5    3     7
 [4,]    5    1    6    5    5    9    5    9    1    10
 [5,]    6    2    1    2    6    7    4    3    2     1
 [6,]    3    8    8   10    8    1    2    4    9     2
 [7,]    4    7    3    7    1    5    7    2   10     8
 [8,]    9   10    9    4    7    8   10   10    8     4
 [9,]    8    3    4    3    3    2    6    1    4     9
[10,]    7    5    5    8    2    3    3    7    7     6
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1]  0.08057765 -0.27692565  0.38232127  0.18755969  1.03547544 -1.57707738
 [7] -2.12250534 -6.10526163  2.19097572  2.39988475  1.12801597  0.54472684
[13] -0.19903564 -1.73939804 -0.55848396  1.45928693  3.43732607 -2.04487364
[19] -1.12363036  4.72852188
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -2.3323570
[2,] -0.4661104
[3,]  0.8002486
[4,]  0.8378384
[5,]  1.2409581
> 
> rowApply(tmp,sum)
[1] 12.3016067 -0.6809372 -0.5189098 -8.0767510 -1.1975282
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   10   19    1    9   17
[2,]    6   15   19    6    7
[3,]   17    3    6   12   15
[4,]    1   12   16   10   11
[5,]   11    5   11    8   19
> 
> 
> as.matrix(tmp)
           [,1]       [,2]       [,3]        [,4]       [,5]       [,6]
[1,]  0.8002486 -0.2286242  1.1856049 -0.90184731  0.8123643  1.4874346
[2,]  1.2409581  0.3779095 -0.8005119 -0.02071356 -0.7615856 -0.5880538
[3,] -2.3323570  1.4435423 -0.8434418  1.05172687  0.1007945 -1.4489285
[4,] -0.4661104 -1.1592369  0.1094904 -0.18496157 -0.6439968  0.3188349
[5,]  0.8378384 -0.7105163  0.7311797  0.24335526  1.5278991 -1.3463645
            [,7]       [,8]       [,9]      [,10]      [,11]      [,12]
[1,]  0.61698742 -0.5116133  1.0177183  0.5586650 -0.1053562  0.9897727
[2,]  1.01368599 -0.3724983  1.3186898 -0.2204081 -0.6850382 -0.9676020
[3,] -1.00957695 -1.8434198  1.9910083  0.6578158  0.2235684  1.0842821
[4,] -2.71338632 -1.4352701 -1.1722368  0.8050965  0.9843834 -1.5742610
[5,] -0.03021549 -1.9424602 -0.9642039  0.5987155  0.7104586  1.0125350
          [,13]       [,14]      [,15]       [,16]      [,17]     [,18]
[1,]  1.1820843 -0.62121321 -0.3061333  1.13921463  0.8862336  1.952722
[2,] -0.7678234 -1.25753480 -0.1562384  0.17531059  0.7725710  1.146599
[3,]  1.3990005  0.05374285  0.9528914 -0.69277054 -0.2027227 -2.103426
[4,]  0.2695296  0.56819352  0.2193736  0.06565989  0.3689131 -1.936541
[5,] -2.2818267 -0.48258639 -1.2683773  0.77187237  1.6123311 -1.104229
            [,19]       [,20]
[1,] -0.230285791 2.577629224
[2,] -0.133180245 0.004526739
[3,] -0.003132153 1.002492763
[4,] -0.984273712 0.484048492
[5,]  0.227241543 0.659824659
> 
> 
> is.BufferedMatrix(tmp)
[1] TRUE
> 
> as.BufferedMatrix(as.matrix(tmp))
BufferedMatrix object
Matrix size:  5 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  800  bytes.
> 
> 
> 
> subBufferedMatrix(tmp,1:5,1:5)
BufferedMatrix object
Matrix size:  5 5 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  648  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  562  bytes.
Disk usage :  160  bytes.
> subBufferedMatrix(tmp,1:3,)
BufferedMatrix object
Matrix size:  3 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  480  bytes.
> 
> 
> rm(tmp)
> 
> 
> ###
> ### Testing colnames and rownames
> ###
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> 
> 
> colnames(tmp)
NULL
> rownames(tmp)
NULL
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> colnames(tmp)
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"
> rownames(tmp)
[1] "row1" "row2" "row3" "row4" "row5"
> 
> 
> tmp["row1",]
           col1       col2       col3      col4       col5      col6      col7
row1 -0.8636811 -0.9000621 -0.2230556 0.4420854 -0.3314259 -1.618608 0.4482984
          col8      col9     col10   col11    col12     col13     col14
row1 -0.731323 0.5460691 0.0489352 1.80762 1.991088 0.5345316 0.8865071
        col15    col16      col17  col18     col19       col20
row1 1.663155 0.768409 -0.4253377 0.4081 0.2750772 -0.03205593
> tmp[,"col10"]
          col10
row1  0.0489352
row2  0.7549446
row3 -0.2840833
row4 -1.0454167
row5 -0.1986600
> tmp[c("row1","row5"),]
           col1       col2       col3       col4       col5       col6
row1 -0.8636811 -0.9000621 -0.2230556  0.4420854 -0.3314259 -1.6186081
row5 -0.9081685 -0.5306623 -2.6157454 -0.6207680 -1.0763967  0.7448151
          col7       col8      col9      col10    col11      col12     col13
row1 0.4482984 -0.7313230 0.5460691  0.0489352 1.807620 1.99108788 0.5345316
row5 2.7674194 -0.2811138 1.9117327 -0.1986600 0.352879 0.09559771 1.1077036
         col14    col15     col16      col17      col18      col19       col20
row1 0.8865071 1.663155  0.768409 -0.4253377  0.4081000  0.2750772 -0.03205593
row5 0.8139441 2.053868 -1.904962  1.0469882 -0.7914217 -1.8202546 -0.90641683
> tmp[,c("col6","col20")]
           col6       col20
row1 -1.6186081 -0.03205593
row2 -0.4893970 -1.19891920
row3  1.2674271 -0.34047623
row4  0.7601881  0.32924462
row5  0.7448151 -0.90641683
> tmp[c("row1","row5"),c("col6","col20")]
           col6       col20
row1 -1.6186081 -0.03205593
row5  0.7448151 -0.90641683
> 
> 
> 
> 
> tmp["row1",] <- rnorm(20,mean=10)
> tmp[,"col10"] <- rnorm(5,mean=30)
> tmp[c("row1","row5"),] <- rnorm(40,mean=50)
> tmp[,c("col6","col20")] <- rnorm(10,mean=75)
> tmp[c("row1","row5"),c("col6","col20")]  <- rnorm(4,mean=105)
> 
> tmp["row1",]
         col1     col2     col3     col4     col5     col6     col7    col8
row1 49.56498 49.37836 48.97452 51.36471 50.51658 103.9229 48.70112 51.1871
       col9    col10    col11    col12    col13    col14    col15    col16
row1 50.464 50.31386 50.56373 48.51855 48.96184 50.73885 48.75355 50.20879
        col17    col18   col19    col20
row1 50.62105 49.88314 49.1072 104.0384
> tmp[,"col10"]
        col10
row1 50.31386
row2 30.01383
row3 29.74475
row4 30.35999
row5 49.63157
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 49.56498 49.37836 48.97452 51.36471 50.51658 103.9229 48.70112 51.18710
row5 49.59163 51.60090 49.10378 50.04401 50.06240 104.5968 48.05342 46.80653
         col9    col10    col11    col12    col13    col14    col15    col16
row1 50.46400 50.31386 50.56373 48.51855 48.96184 50.73885 48.75355 50.20879
row5 49.01154 49.63157 50.93406 51.54251 50.16673 48.06826 50.87222 53.01992
        col17    col18    col19    col20
row1 50.62105 49.88314 49.10720 104.0384
row5 51.99179 48.80200 49.54929 104.1462
> tmp[,c("col6","col20")]
          col6     col20
row1 103.92293 104.03843
row2  75.34140  75.38437
row3  75.57730  74.58662
row4  76.11712  74.10197
row5 104.59679 104.14622
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 103.9229 104.0384
row5 104.5968 104.1462
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 103.9229 104.0384
row5 104.5968 104.1462
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,] -0.2672283
[2,]  0.6663415
[3,] -0.1595256
[4,]  0.7140293
[5,]  1.5325229
> tmp[,c("col17","col7")]
           col17       col7
[1,]  0.48120406  2.0769115
[2,]  0.80969756  0.2345022
[3,] -0.05151165  0.8201354
[4,] -0.49544006 -0.2627488
[5,] -1.52985566  0.1826648
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6      col20
[1,] -0.5131539  0.3109837
[2,] -0.5337298  0.7670394
[3,]  0.9439083 -0.4902458
[4,] -1.1291000  0.8914893
[5,]  1.1489351  1.0240942
> subBufferedMatrix(tmp,1,c("col6"))[,1]
           col1
[1,] -0.5131539
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,] -0.5131539
[2,] -0.5337298
> 
> 
> 
> 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.04356284 -1.3055206 -0.1681981 1.1071164  2.031438 -1.3054224 -1.835098
row1 0.29105330  0.3031082  1.4094640 0.9520826 -1.683326  0.3855974 -1.148977
          [,8]      [,9]      [,10]      [,11]      [,12]      [,13]     [,14]
row3 -0.958048 0.5715685 -1.3057819  0.1030066 -0.7472997  1.5179336 0.7492948
row1  1.045873 0.8664754  0.3802437 -0.7968336  1.0068108 -0.1575129 0.7367990
         [,15]      [,16]     [,17]     [,18]      [,19]      [,20]
row3 -1.743295 -0.1864381 -1.361449 0.8847037  0.1689227 -0.7875718
row1 -0.504659 -0.2894676 -1.190285 1.3340436 -0.9517692 -1.7609964
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
           [,1]       [,2]       [,3]      [,4]      [,5]     [,6]       [,7]
row2 -0.7988424 -0.9979764 -0.4124402 -0.394838 0.7863279 1.327622 -0.8039327
           [,8]      [,9]   [,10]
row2 -0.2682055 0.6960049 0.89224
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
         [,1]      [,2]       [,3]      [,4]       [,5]      [,6]     [,7]
row5 0.446462 0.3741186 -0.2567689 -1.261112 -0.2616644 -1.791972 0.599493
             [,8]      [,9]    [,10]    [,11]     [,12]     [,13]      [,14]
row5 -0.007623609 0.1832795 0.189041 1.644269 0.4614274 0.4173819 -0.6433255
          [,15]      [,16]     [,17]     [,18]     [,19]     [,20]
row5 -0.1879331 -0.2446448 0.1745828 0.2962472 0.7368814 0.2738123
> 
> 
> 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: 0xd6968f0>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb9982374830a7"
 [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb99821851be77"
 [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb99822127d10d"
 [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb99821a86ff31"
 [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb9982623ee1bb"
 [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb9982701b5d42"
 [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb998254b1c6f1"
 [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb9982cd3afd3" 
 [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb998244eb5c4b"
[10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb99821b0a75d0"
[11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb99823663fba" 
[12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb99823a0b0156"
[13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb99823175a09e"
[14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb99825648dfbb"
[15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMb9982210526c7"
> 
> 
> ### 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: 0xe37a680>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0xe37a680>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0xe37a680>
> rowMedians(tmp)
  [1] -0.2769374572  0.6603115395 -0.2403229339  0.4231007845 -0.1751454321
  [6] -0.1808021582  0.0005843797  0.0599061536  0.2055627988 -0.0015891446
 [11] -0.4563217665 -0.4942963606  0.5928515969  0.0387737698 -0.2421713509
 [16]  0.2322142193  0.4127503313  0.1232085448 -0.1576821181 -0.4369444180
 [21]  0.2858474086  0.0062308669 -0.4191297669  0.1851954967  0.0262979855
 [26] -0.5029820881 -0.1869377254 -0.7891869740  0.2895026100 -0.0448761245
 [31]  0.0967741003  0.2689321060 -0.2961468579  0.0803446149  0.3353768132
 [36]  0.1327984191 -0.0321985281  0.5148725124  0.3006036398 -0.4305401048
 [41] -0.4585727943 -0.4018741044  0.4788523480 -0.1411407392 -0.1819811345
 [46]  0.3842672874  0.0403468415  0.2263773709 -0.2492228133 -0.0937178766
 [51] -0.2372633647  0.2808014865 -0.0212275171 -0.0597662530  0.1202773598
 [56]  0.0417316998  0.1915060748 -0.0379894481 -0.8131387411  0.3963682548
 [61] -0.2100567491 -0.1200758098 -0.5831179926 -0.0364139576  0.2060655212
 [66]  0.1754190558  0.4857590177 -0.5270274247  0.0710235756 -0.0813702265
 [71] -0.2041284818  0.4146400116 -0.4189832197  0.1959456946 -0.1221195399
 [76] -0.7789000015 -0.2107318219  0.4290370880 -0.0758021219 -0.1113687551
 [81]  0.9447128021 -0.6024116180 -0.1074062035 -0.4196188507  0.5095847922
 [86] -0.5055485624  0.3169314769 -0.0829595161  0.1914000967  0.0242732883
 [91]  0.0132876430 -0.2060110709  0.0269208607 -0.0140334971 -0.4847640175
 [96]  0.1233443513 -0.4303711919  0.1376496215 -0.3432418870  0.4065014914
[101]  0.2859501400  0.3110170448  0.3350726596  0.2670623245 -0.0902005518
[106] -0.0824719950  0.1879935371 -0.1586236439  0.0073004959 -0.2935365353
[111]  0.3178709448 -0.4380921191 -0.4779251363  0.0050961791  0.2788154944
[116] -0.3263851993  0.3750128277 -0.1666953326  0.1375716593  0.2578815509
[121]  0.2356414618  0.3488976850  0.0662762911  0.5191742567  0.2906503436
[126] -0.0066239518  0.3554815753  0.3220408964  0.3204559270  0.1109791558
[131] -0.4230163392  0.1310631833 -0.0142773950 -0.1388906598 -0.1965214947
[136] -0.5454469450  0.3151605992 -0.0812140134 -0.0490390308 -0.1318942905
[141] -0.1587128264 -0.3275341574 -0.0849286442 -0.0753161420  0.4033169239
[146]  0.2936568053  0.4268767496 -0.1025929296  0.0458401864 -0.6813193370
[151]  0.1581195671 -0.2833665974 -0.2309199250  0.0138642378  0.2536890146
[156] -0.2995350071 -0.4036821286 -0.3062697916  0.0031682546 -0.0625180175
[161] -0.4377836298 -0.2523910810 -0.3707034852  0.0277230144 -0.8193122999
[166] -0.0594575233  0.0074314384  0.2489022268  0.2976961666 -0.0840499295
[171] -0.1590570689 -0.0651803101  0.1616248382 -0.5813411733  0.3288065468
[176]  0.3565676679 -0.1310441715 -0.5837078738 -0.0909259884 -0.2022664395
[181] -0.6407585570  0.1193427311 -0.0063505616 -0.0792250682  0.4072988512
[186]  0.0897823250 -0.0123651327 -0.1851560193 -0.2571697241 -0.5769454540
[191] -0.1341229618  0.5367658839 -0.6297671731  0.2006320603 -0.0300984866
[196]  0.3838162864 -0.0555982797  0.2451186101  0.4188127513 -0.1679462830
[201]  0.5168229962  0.7736724208 -0.5502847907 -0.4010591329  0.1955019760
[206] -0.0958446962  0.4822908860 -0.2064299926 -0.8080995241  0.0308370647
[211] -0.6650681834  0.1348032668 -0.3032779930 -0.2889165080 -0.6996603228
[216]  0.2367270970 -0.0218850045  0.3883715026 -0.1466796386 -0.4283954920
[221] -0.0996175348  0.3873780381  0.4363235929  0.3590842802  0.0997636979
[226] -0.2946356793  0.1760389844 -0.3851820536  0.2162135379  0.2827187564
> 
> proc.time()
   user  system elapsed 
  1.976   0.781   2.787 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-unknown-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

<pointer: 0x31512ff0>
> .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: 0x31512ff0>
> .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: 0x31512ff0>
> .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: 0x31512ff0>
> 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: 0x313f80e0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x313f80e0>
> .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: 0x313f80e0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x313f80e0>
> .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: 0x313f80e0>
> 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: 0x3037f520>
> .Call("R_bm_AddColumn",P)
<pointer: 0x3037f520>
> .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: 0x3037f520>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x3037f520>
> .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: 0x3037f520>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x3037f520>
> .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: 0x3037f520>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x3037f520>
> .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: 0x3037f520>
> 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: 0x2fd83720>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x2fd83720>
> .Call("R_bm_AddColumn",P)
<pointer: 0x2fd83720>
> .Call("R_bm_AddColumn",P)
<pointer: 0x2fd83720>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFileb99d13833de34" "BufferedMatrixFileb99d175d27779"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFileb99d13833de34" "BufferedMatrixFileb99d175d27779"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x30c737d0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x30c737d0>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x30c737d0>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x30c737d0>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x30c737d0>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x30c737d0>
> .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: 0x30d7ac90>
> .Call("R_bm_AddColumn",P)
<pointer: 0x30d7ac90>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x30d7ac90>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x30d7ac90>
> 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: 0x32023110>
> .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: 0x32023110>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.332   0.054   0.370 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-unknown-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> Temp <- createBufferedMatrix(100)
> dim(Temp)
[1] 100   0
> buffer.dim(Temp)
[1] 1 1
> 
> 
> proc.time()
   user  system elapsed 
  0.331   0.038   0.354 

Example timings