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

This page was generated on 2026-03-17 11:33 -0400 (Tue, 17 Mar 2026).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo1Linux (Ubuntu 24.04.3 LTS)x86_64R Under development (unstable) (2026-03-05 r89546) -- "Unsuffered Consequences" 4845
kjohnson3macOS 13.7.7 Venturaarm64R Under development (unstable) (2026-03-01 r89506) -- "Unsuffered Consequences" 4060
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/2367HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.75.0  (landing page)
Ben Bolstad
Snapshot Date: 2026-03-16 13:40 -0400 (Mon, 16 Mar 2026)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: devel
git_last_commit: ecdbf23
git_last_commit_date: 2025-10-29 09:58:55 -0400 (Wed, 29 Oct 2025)
nebbiolo1Linux (Ubuntu 24.04.3 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
kjohnson3macOS 13.7.7 Ventura / arm64  ERROR    ERROR  skippedskipped
See other builds for BufferedMatrix in R Universe.


CHECK results for BufferedMatrix on nebbiolo1

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

raw results


Summary

Package: BufferedMatrix
Version: 1.75.0
Command: /home/biocbuild/bbs-3.23-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.23-bioc/R/site-library --timings BufferedMatrix_1.75.0.tar.gz
StartedAt: 2026-03-16 21:37:14 -0400 (Mon, 16 Mar 2026)
EndedAt: 2026-03-16 21:37:39 -0400 (Mon, 16 Mar 2026)
EllapsedTime: 25.0 seconds
RetCode: 0
Status:   OK  
CheckDir: BufferedMatrix.Rcheck
Warnings: 0

Command output

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


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

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


Installation output

BufferedMatrix.Rcheck/00install.out

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


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

Tests output

BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout


R Under development (unstable) (2026-03-05 r89546) -- "Unsuffered Consequences"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

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

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

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

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

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

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

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

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

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

[[1]]
[1] 0

> 
> proc.time()
   user  system elapsed 
  0.244   0.044   0.278 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R Under development (unstable) (2026-03-05 r89546) -- "Unsuffered Consequences"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> 
> ### this is used to control how many repetitions in something below
> ### higher values result in more checks.
> nreps <-100 ##20000
> 
> 
> ## test creation and some simple assignments and subsetting operations
> 
> ## first on single elements
> tmp <- createBufferedMatrix(1000,10)
> 
> tmp[10,5]
[1] 0
> tmp[10,5] <- 10
> tmp[10,5]
[1] 10
> tmp[10,5] <- 12.445
> tmp[10,5]
[1] 12.445
> 
> 
> 
> ## now testing accessing multiple elements
> tmp2 <- createBufferedMatrix(10,20)
> 
> 
> tmp2[3,1] <- 51.34
> tmp2[9,2] <- 9.87654
> tmp2[,1:2]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[,-(3:20)]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[3,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,] 51.34    0    0    0    0    0    0    0    0     0     0     0     0
     [,14] [,15] [,16] [,17] [,18] [,19] [,20]
[1,]     0     0     0     0     0     0     0
> tmp2[-3,]
      [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]    0 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19] [,20]
 [1,]     0     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0     0
> tmp2[2,1:3]
     [,1] [,2] [,3]
[1,]    0    0    0
> tmp2[3:9,1:3]
      [,1]    [,2] [,3]
[1,] 51.34 0.00000    0
[2,]  0.00 0.00000    0
[3,]  0.00 0.00000    0
[4,]  0.00 0.00000    0
[5,]  0.00 0.00000    0
[6,]  0.00 0.00000    0
[7,]  0.00 9.87654    0
> tmp2[-4,-4]
       [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,] 51.34 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]  0.00 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19]
 [1,]     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0
> 
> ## now testing accessing/assigning multiple elements
> tmp3 <- createBufferedMatrix(10,10)
> 
> for (i in 1:10){
+   for (j in 1:10){
+     tmp3[i,j] <- (j-1)*10 + i
+   }
+ }
> 
> tmp3[2:4,2:4]
     [,1] [,2] [,3]
[1,]   12   22   32
[2,]   13   23   33
[3,]   14   24   34
> tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]   11   21   31   11   21   31   91    1   11     1    11    21    31
 [2,]   12   22   32   12   22   32   92    2   12     2    12    22    32
 [3,]   13   23   33   13   23   33   93    3   13     3    13    23    33
 [4,]   14   24   34   14   24   34   94    4   14     4    14    24    34
 [5,]   15   25   35   15   25   35   95    5   15     5    15    25    35
 [6,]   16   26   36   16   26   36   96    6   16     6    16    26    36
 [7,]   17   27   37   17   27   37   97    7   17     7    17    27    37
 [8,]   18   28   38   18   28   38   98    8   18     8    18    28    38
 [9,]   19   29   39   19   29   39   99    9   19     9    19    29    39
      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
 [1,]    41    51    61    71    81    91    91    81    71    61    51    41
 [2,]    42    52    62    72    82    92    92    82    72    62    52    42
 [3,]    43    53    63    73    83    93    93    83    73    63    53    43
 [4,]    44    54    64    74    84    94    94    84    74    64    54    44
 [5,]    45    55    65    75    85    95    95    85    75    65    55    45
 [6,]    46    56    66    76    86    96    96    86    76    66    56    46
 [7,]    47    57    67    77    87    97    97    87    77    67    57    47
 [8,]    48    58    68    78    88    98    98    88    78    68    58    48
 [9,]    49    59    69    79    89    99    99    89    79    69    59    49
      [,26] [,27] [,28] [,29]
 [1,]    31    21    11     1
 [2,]    32    22    12     2
 [3,]    33    23    13     3
 [4,]    34    24    14     4
 [5,]    35    25    15     5
 [6,]    36    26    16     6
 [7,]    37    27    17     7
 [8,]    38    28    18     8
 [9,]    39    29    19     9
> tmp3[-c(1:5),-c(6:10)]
     [,1] [,2] [,3] [,4] [,5]
[1,]    6   16   26   36   46
[2,]    7   17   27   37   47
[3,]    8   18   28   38   48
[4,]    9   19   29   39   49
[5,]   10   20   30   40   50
> 
> ## assignment of whole columns
> tmp3[,1] <- c(1:10*100.0)
> tmp3[,1:2] <- tmp3[,1:2]*100
> tmp3[,1:2] <- tmp3[,2:1]
> tmp3[,1:2]
      [,1]  [,2]
 [1,] 1100 1e+04
 [2,] 1200 2e+04
 [3,] 1300 3e+04
 [4,] 1400 4e+04
 [5,] 1500 5e+04
 [6,] 1600 6e+04
 [7,] 1700 7e+04
 [8,] 1800 8e+04
 [9,] 1900 9e+04
[10,] 2000 1e+05
> 
> 
> tmp3[,-1] <- tmp3[,1:9]
> tmp3[,1:10]
      [,1] [,2]  [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,] 1100 1100 1e+04   21   31   41   51   61   71    81
 [2,] 1200 1200 2e+04   22   32   42   52   62   72    82
 [3,] 1300 1300 3e+04   23   33   43   53   63   73    83
 [4,] 1400 1400 4e+04   24   34   44   54   64   74    84
 [5,] 1500 1500 5e+04   25   35   45   55   65   75    85
 [6,] 1600 1600 6e+04   26   36   46   56   66   76    86
 [7,] 1700 1700 7e+04   27   37   47   57   67   77    87
 [8,] 1800 1800 8e+04   28   38   48   58   68   78    88
 [9,] 1900 1900 9e+04   29   39   49   59   69   79    89
[10,] 2000 2000 1e+05   30   40   50   60   70   80    90
> 
> tmp3[,1:2] <- rep(1,10)
> tmp3[,1:2] <- rep(1,20)
> tmp3[,1:2] <- matrix(c(1:5),1,5)
> 
> tmp3[,-c(1:8)] <- matrix(c(1:5),1,5)
> 
> tmp3[1,] <- 1:10
> tmp3[1,]
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    1    2    3    4    5    6    7    8    9    10
> tmp3[-1,] <- c(1,2)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    2    1    2    1    2    1    2    1    2     1
[10,]    1    2    1    2    1    2    1    2    1     2
> tmp3[-c(1:8),] <- matrix(c(1:5),1,5)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    1    3    5    2    4    1    3    5    2     4
[10,]    2    4    1    3    5    2    4    1    3     5
> 
> 
> tmp3[1:2,1:2] <- 5555.04
> tmp3[-(1:2),1:2] <- 1234.56789
> 
> 
> 
> ## testing accessors for the directory and prefix
> directory(tmp3)
[1] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests"
> prefix(tmp3)
[1] "BM"
> 
> ## testing if we can remove these objects
> rm(tmp, tmp2, tmp3)
> gc()
         used (Mb) gc trigger (Mb) max used (Mb)
Ncells 479482 25.7    1050322 56.1   639251 34.2
Vcells 886403  6.8    8388608 64.0  2083267 15.9
> 
> 
> 
> 
> ##
> ## checking reads
> ##
> 
> tmp2 <- createBufferedMatrix(10,20)
> 
> test.sample <- rnorm(10*20)
> 
> tmp2[1:10,1:20] <- test.sample
> 
> test.matrix <- matrix(test.sample,10,20)
> 
> ## testing reads
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Mon Mar 16 21:37:29 2026"
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> date()
[1] "Mon Mar 16 21:37:29 2026"
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> 
> 
> RowMode(tmp2)
<pointer: 0x57223a5b54f0>
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Mon Mar 16 21:37:29 2026"
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> date()
[1] "Mon Mar 16 21:37:29 2026"
> 
> ColMode(tmp2)
<pointer: 0x57223a5b54f0>
> 
> 
> 
> ### Now testing assignments
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+ 
+   new.data <- rnorm(20)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,] <- new.data
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   new.data <- rnorm(10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+ 
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col  <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(25),5,5)
+   tmp2[which.row,which.col] <- new.data
+   test.matrix[which.row,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> ###
> ###
> ### testing some more functions
> ###
> 
> 
> 
> ## duplication function
> tmp5 <- duplicate(tmp2)
> 
> # making sure really did copy everything.
> tmp5[1,1] <- tmp5[1,1] +100.00
> 
> if (tmp5[1,1] == tmp2[1,1]){
+   stop("Problem with duplication")
+ }
> 
> 
> 
> 
> ### testing elementwise applying of functions
> 
> tmp5[1:4,1:4]
          [,1]      [,2]       [,3]       [,4]
[1,] 99.612272  1.060349 -0.6926594 -0.8026987
[2,]  1.116152 -1.038988 -0.7191747  0.6142167
[3,] -0.868209  1.306133  2.7217778 -0.8046151
[4,]  1.427781  1.073854 -0.1268543 -0.5585988
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]      [,3]      [,4]
[1,] 99.612272 1.060349 0.6926594 0.8026987
[2,]  1.116152 1.038988 0.7191747 0.6142167
[3,]  0.868209 1.306133 2.7217778 0.8046151
[4,]  1.427781 1.073854 0.1268543 0.5585988
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]      [,3]      [,4]
[1,] 9.9805948 1.029733 0.8322616 0.8959345
[2,] 1.0564811 1.019307 0.8480417 0.7837198
[3,] 0.9317773 1.142862 1.6497811 0.8970034
[4,] 1.1948978 1.036269 0.3561661 0.7473947
> 
> my.function <- function(x,power){
+   (x+5)^power
+ }
> 
> ewApply(tmp5,my.function,power=2)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 224.41822 36.35768 34.01528 34.76204
[2,]  36.68096 36.23206 34.19959 33.45141
[3,]  35.18598 37.73475 44.21959 34.77465
[4,]  38.37676 36.43655 28.68852 33.03255
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x57223bc135a0>
> exp(tmp5)
<pointer: 0x57223bc135a0>
> log(tmp5,2)
<pointer: 0x57223bc135a0>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 467.0971
> Min(tmp5)
[1] 54.1289
> mean(tmp5)
[1] 71.48091
> Sum(tmp5)
[1] 14296.18
> Var(tmp5)
[1] 846.9321
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 89.79367 70.32611 71.31450 69.47682 69.34229 69.30847 69.08327 70.57127
 [9] 68.39203 67.20069
> rowSums(tmp5)
 [1] 1795.873 1406.522 1426.290 1389.536 1386.846 1386.169 1381.665 1411.425
 [9] 1367.841 1344.014
> rowVars(tmp5)
 [1] 7911.94226   26.60412  100.74944   49.52290   55.03512   60.64037
 [7]   63.10631   83.55869   69.13143   45.50776
> rowSd(tmp5)
 [1] 88.949099  5.157918 10.037402  7.037251  7.418566  7.787193  7.943948
 [8]  9.141044  8.314531  6.745944
> rowMax(tmp5)
 [1] 467.09712  76.73646  92.03728  86.31898  88.00527  84.17786  83.81787
 [8]  84.79190  90.32052  80.84925
> rowMin(tmp5)
 [1] 57.83138 58.58045 54.12890 58.84667 59.65406 56.09211 55.36034 54.84440
 [9] 55.99979 55.12741
> 
> colMeans(tmp5)
 [1] 110.32643  72.01098  72.20736  67.61991  73.26368  68.39009  68.92589
 [8]  72.79066  67.36996  70.19075  68.90279  65.76307  71.30721  69.58258
[15]  66.05740  68.19520  65.68487  70.70418  73.17362  67.15160
> colSums(tmp5)
 [1] 1103.2643  720.1098  722.0736  676.1991  732.6368  683.9009  689.2589
 [8]  727.9066  673.6996  701.9075  689.0279  657.6307  713.0721  695.8258
[15]  660.5740  681.9520  656.8487  707.0418  731.7362  671.5160
> colVars(tmp5)
 [1] 15757.08263    41.97921    82.61279    56.77649    29.09456    43.89071
 [7]    96.41049    81.55234    53.47772    44.77096    69.90602    42.96578
[13]    28.50947    36.98309    37.37345    68.00105    42.88738    89.22605
[19]    85.48614    45.15575
> colSd(tmp5)
 [1] 125.527219   6.479137   9.089158   7.535018   5.393938   6.625006
 [7]   9.818884   9.030634   7.312846   6.691110   8.360982   6.554829
[13]   5.339426   6.081373   6.113383   8.246275   6.548846   9.445954
[19]   9.245872   6.719803
> colMax(tmp5)
 [1] 467.09712  78.57917  92.03728  80.76426  81.59780  79.71285  82.60804
 [8]  88.00527  76.73646  81.33231  83.81787  74.85274  78.78622  77.91558
[15]  73.13315  84.17786  75.12031  86.31898  90.32052  76.33688
> colMin(tmp5)
 [1] 58.96183 61.09791 59.71139 56.09211 64.57506 57.27597 55.99979 61.72773
 [9] 54.12890 61.92050 55.12741 57.80848 61.51249 60.11605 55.26801 54.84440
[17] 55.36034 57.83138 61.84510 55.45440
> 
> 
> ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default)
> 
> 
> which.row <- sample(1:10,1,replace=TRUE)
> which.col  <- sample(1:20,1,replace=TRUE)
> 
> tmp5[which.row,which.col] <- NA
> 
> Max(tmp5)
[1] NA
> Min(tmp5)
[1] NA
> mean(tmp5)
[1] NA
> Sum(tmp5)
[1] NA
> Var(tmp5)
[1] NA
> 
> rowMeans(tmp5)
 [1]       NA 70.32611 71.31450 69.47682 69.34229 69.30847 69.08327 70.57127
 [9] 68.39203 67.20069
> rowSums(tmp5)
 [1]       NA 1406.522 1426.290 1389.536 1386.846 1386.169 1381.665 1411.425
 [9] 1367.841 1344.014
> rowVars(tmp5)
 [1] 8326.81639   26.60412  100.74944   49.52290   55.03512   60.64037
 [7]   63.10631   83.55869   69.13143   45.50776
> rowSd(tmp5)
 [1] 91.251391  5.157918 10.037402  7.037251  7.418566  7.787193  7.943948
 [8]  9.141044  8.314531  6.745944
> rowMax(tmp5)
 [1]       NA 76.73646 92.03728 86.31898 88.00527 84.17786 83.81787 84.79190
 [9] 90.32052 80.84925
> rowMin(tmp5)
 [1]       NA 58.58045 54.12890 58.84667 59.65406 56.09211 55.36034 54.84440
 [9] 55.99979 55.12741
> 
> colMeans(tmp5)
 [1] 110.32643  72.01098  72.20736  67.61991  73.26368  68.39009  68.92589
 [8]  72.79066  67.36996  70.19075  68.90279  65.76307  71.30721        NA
[15]  66.05740  68.19520  65.68487  70.70418  73.17362  67.15160
> colSums(tmp5)
 [1] 1103.2643  720.1098  722.0736  676.1991  732.6368  683.9009  689.2589
 [8]  727.9066  673.6996  701.9075  689.0279  657.6307  713.0721        NA
[15]  660.5740  681.9520  656.8487  707.0418  731.7362  671.5160
> colVars(tmp5)
 [1] 15757.08263    41.97921    82.61279    56.77649    29.09456    43.89071
 [7]    96.41049    81.55234    53.47772    44.77096    69.90602    42.96578
[13]    28.50947          NA    37.37345    68.00105    42.88738    89.22605
[19]    85.48614    45.15575
> colSd(tmp5)
 [1] 125.527219   6.479137   9.089158   7.535018   5.393938   6.625006
 [7]   9.818884   9.030634   7.312846   6.691110   8.360982   6.554829
[13]   5.339426         NA   6.113383   8.246275   6.548846   9.445954
[19]   9.245872   6.719803
> colMax(tmp5)
 [1] 467.09712  78.57917  92.03728  80.76426  81.59780  79.71285  82.60804
 [8]  88.00527  76.73646  81.33231  83.81787  74.85274  78.78622        NA
[15]  73.13315  84.17786  75.12031  86.31898  90.32052  76.33688
> colMin(tmp5)
 [1] 58.96183 61.09791 59.71139 56.09211 64.57506 57.27597 55.99979 61.72773
 [9] 54.12890 61.92050 55.12741 57.80848 61.51249       NA 55.26801 54.84440
[17] 55.36034 57.83138 61.84510 55.45440
> 
> Max(tmp5,na.rm=TRUE)
[1] 467.0971
> Min(tmp5,na.rm=TRUE)
[1] 54.1289
> mean(tmp5,na.rm=TRUE)
[1] 71.49212
> Sum(tmp5,na.rm=TRUE)
[1] 14226.93
> Var(tmp5,na.rm=TRUE)
[1] 851.1842
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 90.87486 70.32611 71.31450 69.47682 69.34229 69.30847 69.08327 70.57127
 [9] 68.39203 67.20069
> rowSums(tmp5,na.rm=TRUE)
 [1] 1726.622 1406.522 1426.290 1389.536 1386.846 1386.169 1381.665 1411.425
 [9] 1367.841 1344.014
> rowVars(tmp5,na.rm=TRUE)
 [1] 8326.81639   26.60412  100.74944   49.52290   55.03512   60.64037
 [7]   63.10631   83.55869   69.13143   45.50776
> rowSd(tmp5,na.rm=TRUE)
 [1] 91.251391  5.157918 10.037402  7.037251  7.418566  7.787193  7.943948
 [8]  9.141044  8.314531  6.745944
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.09712  76.73646  92.03728  86.31898  88.00527  84.17786  83.81787
 [8]  84.79190  90.32052  80.84925
> rowMin(tmp5,na.rm=TRUE)
 [1] 57.83138 58.58045 54.12890 58.84667 59.65406 56.09211 55.36034 54.84440
 [9] 55.99979 55.12741
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 110.32643  72.01098  72.20736  67.61991  73.26368  68.39009  68.92589
 [8]  72.79066  67.36996  70.19075  68.90279  65.76307  71.30721  69.61942
[15]  66.05740  68.19520  65.68487  70.70418  73.17362  67.15160
> colSums(tmp5,na.rm=TRUE)
 [1] 1103.2643  720.1098  722.0736  676.1991  732.6368  683.9009  689.2589
 [8]  727.9066  673.6996  701.9075  689.0279  657.6307  713.0721  626.5747
[15]  660.5740  681.9520  656.8487  707.0418  731.7362  671.5160
> colVars(tmp5,na.rm=TRUE)
 [1] 15757.08263    41.97921    82.61279    56.77649    29.09456    43.89071
 [7]    96.41049    81.55234    53.47772    44.77096    69.90602    42.96578
[13]    28.50947    41.59072    37.37345    68.00105    42.88738    89.22605
[19]    85.48614    45.15575
> colSd(tmp5,na.rm=TRUE)
 [1] 125.527219   6.479137   9.089158   7.535018   5.393938   6.625006
 [7]   9.818884   9.030634   7.312846   6.691110   8.360982   6.554829
[13]   5.339426   6.449087   6.113383   8.246275   6.548846   9.445954
[19]   9.245872   6.719803
> colMax(tmp5,na.rm=TRUE)
 [1] 467.09712  78.57917  92.03728  80.76426  81.59780  79.71285  82.60804
 [8]  88.00527  76.73646  81.33231  83.81787  74.85274  78.78622  77.91558
[15]  73.13315  84.17786  75.12031  86.31898  90.32052  76.33688
> colMin(tmp5,na.rm=TRUE)
 [1] 58.96183 61.09791 59.71139 56.09211 64.57506 57.27597 55.99979 61.72773
 [9] 54.12890 61.92050 55.12741 57.80848 61.51249 60.11605 55.26801 54.84440
[17] 55.36034 57.83138 61.84510 55.45440
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1]      NaN 70.32611 71.31450 69.47682 69.34229 69.30847 69.08327 70.57127
 [9] 68.39203 67.20069
> rowSums(tmp5,na.rm=TRUE)
 [1]    0.000 1406.522 1426.290 1389.536 1386.846 1386.169 1381.665 1411.425
 [9] 1367.841 1344.014
> rowVars(tmp5,na.rm=TRUE)
 [1]        NA  26.60412 100.74944  49.52290  55.03512  60.64037  63.10631
 [8]  83.55869  69.13143  45.50776
> rowSd(tmp5,na.rm=TRUE)
 [1]        NA  5.157918 10.037402  7.037251  7.418566  7.787193  7.943948
 [8]  9.141044  8.314531  6.745944
> rowMax(tmp5,na.rm=TRUE)
 [1]       NA 76.73646 92.03728 86.31898 88.00527 84.17786 83.81787 84.79190
 [9] 90.32052 80.84925
> rowMin(tmp5,na.rm=TRUE)
 [1]       NA 58.58045 54.12890 58.84667 59.65406 56.09211 55.36034 54.84440
 [9] 55.99979 55.12741
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 70.68524 71.60401 72.36392 67.09405 73.01183 68.66496 68.15982 73.28314
 [9] 67.30388 70.93873 68.27727 64.80897 71.50976      NaN 65.27121 67.99365
[17] 66.25749 72.13449 73.03900 66.90240
> colSums(tmp5,na.rm=TRUE)
 [1] 636.1672 644.4361 651.2753 603.8465 657.1064 617.9847 613.4384 659.5483
 [9] 605.7349 638.4486 614.4954 583.2808 643.5878   0.0000 587.4409 611.9429
[17] 596.3174 649.2104 657.3510 602.1216
> colVars(tmp5,na.rm=TRUE)
 [1]  48.20051  45.36331  92.66365  60.76262  32.01778  48.52707 101.85960
 [8]  89.01780  60.11331  44.07334  74.24232  38.09565  31.61158        NA
[15]  35.09148  76.04418  44.55950  77.36418  95.96802  50.10161
> colSd(tmp5,na.rm=TRUE)
 [1]  6.942659  6.735229  9.626196  7.795038  5.658425  6.966137 10.092552
 [8]  9.434925  7.753277  6.638775  8.616398  6.172167  5.622418        NA
[15]  5.923807  8.720332  6.675290  8.795691  9.796327  7.078249
> colMax(tmp5,na.rm=TRUE)
 [1] 79.87619 78.57917 92.03728 80.76426 81.59780 79.71285 82.60804 88.00527
 [9] 76.73646 81.33231 83.81787 74.85274 78.78622     -Inf 71.87860 84.17786
[17] 75.12031 86.31898 90.32052 76.33688
> colMin(tmp5,na.rm=TRUE)
 [1] 58.96183 61.09791 59.71139 56.09211 64.57506 57.27597 55.99979 61.72773
 [9] 54.12890 61.92050 55.12741 57.80848 61.51249      Inf 55.26801 54.84440
[17] 55.36034 58.58045 61.84510 55.45440
> 
> 
> 
> 
> 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] 105.22367 218.01615 597.84662 153.52951 283.93446  92.85886 268.46810
 [8] 255.49129 193.99720 333.83895
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 105.22367 218.01615 597.84662 153.52951 283.93446  92.85886 268.46810
 [8] 255.49129 193.99720 333.83895
> 
> 
> 
> copymatrix <- matrix(rnorm(200,150,15),10,20)
> 
> tmp5[1:10,1:20] <- copymatrix
> which.row <- 1
> which.col  <- 3
> cat(which.row," ",which.col,"\n")
1   3 
> tmp5[which.row,which.col] <- NA
> copymatrix[which.row,which.col] <- NA
> 
> colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE)
 [1] -2.842171e-14  2.557954e-13  7.105427e-15  1.563194e-13 -1.136868e-13
 [6]  2.842171e-13  4.263256e-14 -5.684342e-14 -2.273737e-13 -5.684342e-14
[11] -2.842171e-14 -2.842171e-14  1.136868e-13  1.705303e-13 -5.684342e-14
[16]  5.684342e-14  1.136868e-13  4.263256e-14 -2.842171e-14  8.526513e-14
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## making sure these things agree
> ##
> ## first when there is no NA
> 
> 
> 
> agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){
+ 
+   if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Max")
+   }
+   
+ 
+   if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Min")
+   }
+ 
+ 
+   if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){
+ 
+     cat(Sum(buff.matrix,na.rm=TRUE),"\n")
+     cat(sum(r.matrix,na.rm=TRUE),"\n")
+     cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n")
+     
+     stop("No agreement in Sum")
+   }
+   
+   if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){
+     stop("No agreement in mean")
+   }
+   
+   
+   if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){
+     stop("No agreement in Var")
+   }
+   
+   
+ 
+   if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowMeans")
+   }
+   
+   
+   if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colMeans")
+   }
+   
+   
+   if(any(abs(rowSums(buff.matrix,na.rm=TRUE)  -  apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in rowSums")
+   }
+   
+   
+   if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colSums")
+   }
+   
+   ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when 
+   ### computing variance
+   my.Var <- function(x,na.rm=FALSE){
+    if (all(is.na(x))){
+      return(NA)
+    } else {
+      var(x,na.rm=na.rm)
+    }
+ 
+   }
+   
+   if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+   
+   
+   if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+ 
+ 
+   if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+ 
+   if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+   
+   
+   if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+   
+ 
+   if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+ 
+   if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMedian")
+   }
+ 
+   if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colRanges")
+   }
+ 
+ 
+   
+ }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> for (rep in 1:20){
+   copymatrix <- matrix(rnorm(200,150,15),10,20)
+   
+   tmp5[1:10,1:20] <- copymatrix
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ## now lets assign some NA values and check agreement
+ 
+   which.row <- sample(1:10,1,replace=TRUE)
+   which.col  <- sample(1:20,1,replace=TRUE)
+   
+   cat(which.row," ",which.col,"\n")
+   
+   tmp5[which.row,which.col] <- NA
+   copymatrix[which.row,which.col] <- NA
+   
+   agree.checks(tmp5,copymatrix)
+ 
+   ## make an entire row NA
+   tmp5[which.row,] <- NA
+   copymatrix[which.row,] <- NA
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ### also make an entire col NA
+   tmp5[,which.col] <- NA
+   copymatrix[,which.col] <- NA
+ 
+   agree.checks(tmp5,copymatrix)
+ 
+   ### now make 1 element non NA with NA in the rest of row and column
+ 
+   tmp5[which.row,which.col] <- rnorm(1,150,15)
+   copymatrix[which.row,which.col] <- tmp5[which.row,which.col]
+ 
+   agree.checks(tmp5,copymatrix)
+ }
2   20 
4   7 
6   2 
6   7 
5   3 
10   18 
5   19 
1   2 
8   8 
9   6 
10   6 
6   14 
1   4 
7   3 
9   10 
3   11 
7   18 
10   12 
10   13 
4   18 
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.157998
> Min(tmp)
[1] -2.728913
> mean(tmp)
[1] -0.007155049
> Sum(tmp)
[1] -0.7155049
> Var(tmp)
[1] 1.046414
> 
> rowMeans(tmp)
[1] -0.007155049
> rowSums(tmp)
[1] -0.7155049
> rowVars(tmp)
[1] 1.046414
> rowSd(tmp)
[1] 1.022944
> rowMax(tmp)
[1] 2.157998
> rowMin(tmp)
[1] -2.728913
> 
> colMeans(tmp)
  [1] -0.1909105349 -0.3906222697  1.9602539474 -0.0895968237 -0.8659091021
  [6]  0.9785766463  1.1715768133 -0.2332380394  2.1579980111 -0.0031910864
 [11] -0.5410447631 -0.5057904227 -0.1571246359  0.7067519448  0.3616037309
 [16]  1.4297523173 -0.1726930374  0.1770672081 -0.5493768476  0.3654904594
 [21]  1.0225705399 -1.0210937105  1.9557408108 -1.6117858152 -0.1192868533
 [26] -1.5414737578  0.9858582833  1.3748054854 -0.2416252577 -0.3949792187
 [31] -0.5321366201 -0.8274060875 -1.9998963144 -0.8762679179  0.6058563030
 [36] -1.8484849295 -0.0381753528  1.3603423808  0.0396970229 -0.5243458699
 [41]  1.0251246315 -0.0336581284 -0.0431496042 -1.3658148736  1.1584626906
 [46]  0.8015706872 -1.0188038584  1.2492749833  0.2120814340  0.3901844940
 [51]  1.1610405109  0.8348257637 -0.5586242438  1.7536606852 -0.2358374186
 [56] -1.0117573460  1.0328431943 -0.4795918684 -0.3761967666  0.6912157564
 [61]  0.3653570782 -2.7289129487  0.4763726406 -0.5927722990 -1.5661793581
 [66] -1.2937539323 -0.2119644670  0.7570010593 -0.4178602598  1.4855542459
 [71] -0.0498102765 -1.5990246395  0.8147241788 -0.4813650450  0.9263445060
 [76] -1.7605705452 -1.0557652809  0.4680038001  0.5527040194 -0.5830877605
 [81]  0.5802985896 -0.0900019379  0.7338554231 -0.6449547436 -1.1546679254
 [86]  1.5694419538 -0.8871620764 -0.0001456922  1.0692299534 -1.8134387361
 [91]  0.7530256611  1.5797887075  1.1057024957  0.0958011464 -1.2481060509
 [96]  0.0263954363 -0.6072109038 -1.1943785729 -1.6360052913  0.9776956060
> colSums(tmp)
  [1] -0.1909105349 -0.3906222697  1.9602539474 -0.0895968237 -0.8659091021
  [6]  0.9785766463  1.1715768133 -0.2332380394  2.1579980111 -0.0031910864
 [11] -0.5410447631 -0.5057904227 -0.1571246359  0.7067519448  0.3616037309
 [16]  1.4297523173 -0.1726930374  0.1770672081 -0.5493768476  0.3654904594
 [21]  1.0225705399 -1.0210937105  1.9557408108 -1.6117858152 -0.1192868533
 [26] -1.5414737578  0.9858582833  1.3748054854 -0.2416252577 -0.3949792187
 [31] -0.5321366201 -0.8274060875 -1.9998963144 -0.8762679179  0.6058563030
 [36] -1.8484849295 -0.0381753528  1.3603423808  0.0396970229 -0.5243458699
 [41]  1.0251246315 -0.0336581284 -0.0431496042 -1.3658148736  1.1584626906
 [46]  0.8015706872 -1.0188038584  1.2492749833  0.2120814340  0.3901844940
 [51]  1.1610405109  0.8348257637 -0.5586242438  1.7536606852 -0.2358374186
 [56] -1.0117573460  1.0328431943 -0.4795918684 -0.3761967666  0.6912157564
 [61]  0.3653570782 -2.7289129487  0.4763726406 -0.5927722990 -1.5661793581
 [66] -1.2937539323 -0.2119644670  0.7570010593 -0.4178602598  1.4855542459
 [71] -0.0498102765 -1.5990246395  0.8147241788 -0.4813650450  0.9263445060
 [76] -1.7605705452 -1.0557652809  0.4680038001  0.5527040194 -0.5830877605
 [81]  0.5802985896 -0.0900019379  0.7338554231 -0.6449547436 -1.1546679254
 [86]  1.5694419538 -0.8871620764 -0.0001456922  1.0692299534 -1.8134387361
 [91]  0.7530256611  1.5797887075  1.1057024957  0.0958011464 -1.2481060509
 [96]  0.0263954363 -0.6072109038 -1.1943785729 -1.6360052913  0.9776956060
> 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.1909105349 -0.3906222697  1.9602539474 -0.0895968237 -0.8659091021
  [6]  0.9785766463  1.1715768133 -0.2332380394  2.1579980111 -0.0031910864
 [11] -0.5410447631 -0.5057904227 -0.1571246359  0.7067519448  0.3616037309
 [16]  1.4297523173 -0.1726930374  0.1770672081 -0.5493768476  0.3654904594
 [21]  1.0225705399 -1.0210937105  1.9557408108 -1.6117858152 -0.1192868533
 [26] -1.5414737578  0.9858582833  1.3748054854 -0.2416252577 -0.3949792187
 [31] -0.5321366201 -0.8274060875 -1.9998963144 -0.8762679179  0.6058563030
 [36] -1.8484849295 -0.0381753528  1.3603423808  0.0396970229 -0.5243458699
 [41]  1.0251246315 -0.0336581284 -0.0431496042 -1.3658148736  1.1584626906
 [46]  0.8015706872 -1.0188038584  1.2492749833  0.2120814340  0.3901844940
 [51]  1.1610405109  0.8348257637 -0.5586242438  1.7536606852 -0.2358374186
 [56] -1.0117573460  1.0328431943 -0.4795918684 -0.3761967666  0.6912157564
 [61]  0.3653570782 -2.7289129487  0.4763726406 -0.5927722990 -1.5661793581
 [66] -1.2937539323 -0.2119644670  0.7570010593 -0.4178602598  1.4855542459
 [71] -0.0498102765 -1.5990246395  0.8147241788 -0.4813650450  0.9263445060
 [76] -1.7605705452 -1.0557652809  0.4680038001  0.5527040194 -0.5830877605
 [81]  0.5802985896 -0.0900019379  0.7338554231 -0.6449547436 -1.1546679254
 [86]  1.5694419538 -0.8871620764 -0.0001456922  1.0692299534 -1.8134387361
 [91]  0.7530256611  1.5797887075  1.1057024957  0.0958011464 -1.2481060509
 [96]  0.0263954363 -0.6072109038 -1.1943785729 -1.6360052913  0.9776956060
> colMin(tmp)
  [1] -0.1909105349 -0.3906222697  1.9602539474 -0.0895968237 -0.8659091021
  [6]  0.9785766463  1.1715768133 -0.2332380394  2.1579980111 -0.0031910864
 [11] -0.5410447631 -0.5057904227 -0.1571246359  0.7067519448  0.3616037309
 [16]  1.4297523173 -0.1726930374  0.1770672081 -0.5493768476  0.3654904594
 [21]  1.0225705399 -1.0210937105  1.9557408108 -1.6117858152 -0.1192868533
 [26] -1.5414737578  0.9858582833  1.3748054854 -0.2416252577 -0.3949792187
 [31] -0.5321366201 -0.8274060875 -1.9998963144 -0.8762679179  0.6058563030
 [36] -1.8484849295 -0.0381753528  1.3603423808  0.0396970229 -0.5243458699
 [41]  1.0251246315 -0.0336581284 -0.0431496042 -1.3658148736  1.1584626906
 [46]  0.8015706872 -1.0188038584  1.2492749833  0.2120814340  0.3901844940
 [51]  1.1610405109  0.8348257637 -0.5586242438  1.7536606852 -0.2358374186
 [56] -1.0117573460  1.0328431943 -0.4795918684 -0.3761967666  0.6912157564
 [61]  0.3653570782 -2.7289129487  0.4763726406 -0.5927722990 -1.5661793581
 [66] -1.2937539323 -0.2119644670  0.7570010593 -0.4178602598  1.4855542459
 [71] -0.0498102765 -1.5990246395  0.8147241788 -0.4813650450  0.9263445060
 [76] -1.7605705452 -1.0557652809  0.4680038001  0.5527040194 -0.5830877605
 [81]  0.5802985896 -0.0900019379  0.7338554231 -0.6449547436 -1.1546679254
 [86]  1.5694419538 -0.8871620764 -0.0001456922  1.0692299534 -1.8134387361
 [91]  0.7530256611  1.5797887075  1.1057024957  0.0958011464 -1.2481060509
 [96]  0.0263954363 -0.6072109038 -1.1943785729 -1.6360052913  0.9776956060
> colMedians(tmp)
  [1] -0.1909105349 -0.3906222697  1.9602539474 -0.0895968237 -0.8659091021
  [6]  0.9785766463  1.1715768133 -0.2332380394  2.1579980111 -0.0031910864
 [11] -0.5410447631 -0.5057904227 -0.1571246359  0.7067519448  0.3616037309
 [16]  1.4297523173 -0.1726930374  0.1770672081 -0.5493768476  0.3654904594
 [21]  1.0225705399 -1.0210937105  1.9557408108 -1.6117858152 -0.1192868533
 [26] -1.5414737578  0.9858582833  1.3748054854 -0.2416252577 -0.3949792187
 [31] -0.5321366201 -0.8274060875 -1.9998963144 -0.8762679179  0.6058563030
 [36] -1.8484849295 -0.0381753528  1.3603423808  0.0396970229 -0.5243458699
 [41]  1.0251246315 -0.0336581284 -0.0431496042 -1.3658148736  1.1584626906
 [46]  0.8015706872 -1.0188038584  1.2492749833  0.2120814340  0.3901844940
 [51]  1.1610405109  0.8348257637 -0.5586242438  1.7536606852 -0.2358374186
 [56] -1.0117573460  1.0328431943 -0.4795918684 -0.3761967666  0.6912157564
 [61]  0.3653570782 -2.7289129487  0.4763726406 -0.5927722990 -1.5661793581
 [66] -1.2937539323 -0.2119644670  0.7570010593 -0.4178602598  1.4855542459
 [71] -0.0498102765 -1.5990246395  0.8147241788 -0.4813650450  0.9263445060
 [76] -1.7605705452 -1.0557652809  0.4680038001  0.5527040194 -0.5830877605
 [81]  0.5802985896 -0.0900019379  0.7338554231 -0.6449547436 -1.1546679254
 [86]  1.5694419538 -0.8871620764 -0.0001456922  1.0692299534 -1.8134387361
 [91]  0.7530256611  1.5797887075  1.1057024957  0.0958011464 -1.2481060509
 [96]  0.0263954363 -0.6072109038 -1.1943785729 -1.6360052913  0.9776956060
> colRanges(tmp)
           [,1]       [,2]     [,3]        [,4]       [,5]      [,6]     [,7]
[1,] -0.1909105 -0.3906223 1.960254 -0.08959682 -0.8659091 0.9785766 1.171577
[2,] -0.1909105 -0.3906223 1.960254 -0.08959682 -0.8659091 0.9785766 1.171577
          [,8]     [,9]        [,10]      [,11]      [,12]      [,13]     [,14]
[1,] -0.233238 2.157998 -0.003191086 -0.5410448 -0.5057904 -0.1571246 0.7067519
[2,] -0.233238 2.157998 -0.003191086 -0.5410448 -0.5057904 -0.1571246 0.7067519
         [,15]    [,16]     [,17]     [,18]      [,19]     [,20]    [,21]
[1,] 0.3616037 1.429752 -0.172693 0.1770672 -0.5493768 0.3654905 1.022571
[2,] 0.3616037 1.429752 -0.172693 0.1770672 -0.5493768 0.3654905 1.022571
         [,22]    [,23]     [,24]      [,25]     [,26]     [,27]    [,28]
[1,] -1.021094 1.955741 -1.611786 -0.1192869 -1.541474 0.9858583 1.374805
[2,] -1.021094 1.955741 -1.611786 -0.1192869 -1.541474 0.9858583 1.374805
          [,29]      [,30]      [,31]      [,32]     [,33]      [,34]     [,35]
[1,] -0.2416253 -0.3949792 -0.5321366 -0.8274061 -1.999896 -0.8762679 0.6058563
[2,] -0.2416253 -0.3949792 -0.5321366 -0.8274061 -1.999896 -0.8762679 0.6058563
         [,36]       [,37]    [,38]      [,39]      [,40]    [,41]       [,42]
[1,] -1.848485 -0.03817535 1.360342 0.03969702 -0.5243459 1.025125 -0.03365813
[2,] -1.848485 -0.03817535 1.360342 0.03969702 -0.5243459 1.025125 -0.03365813
          [,43]     [,44]    [,45]     [,46]     [,47]    [,48]     [,49]
[1,] -0.0431496 -1.365815 1.158463 0.8015707 -1.018804 1.249275 0.2120814
[2,] -0.0431496 -1.365815 1.158463 0.8015707 -1.018804 1.249275 0.2120814
         [,50]    [,51]     [,52]      [,53]    [,54]      [,55]     [,56]
[1,] 0.3901845 1.161041 0.8348258 -0.5586242 1.753661 -0.2358374 -1.011757
[2,] 0.3901845 1.161041 0.8348258 -0.5586242 1.753661 -0.2358374 -1.011757
        [,57]      [,58]      [,59]     [,60]     [,61]     [,62]     [,63]
[1,] 1.032843 -0.4795919 -0.3761968 0.6912158 0.3653571 -2.728913 0.4763726
[2,] 1.032843 -0.4795919 -0.3761968 0.6912158 0.3653571 -2.728913 0.4763726
          [,64]     [,65]     [,66]      [,67]     [,68]      [,69]    [,70]
[1,] -0.5927723 -1.566179 -1.293754 -0.2119645 0.7570011 -0.4178603 1.485554
[2,] -0.5927723 -1.566179 -1.293754 -0.2119645 0.7570011 -0.4178603 1.485554
           [,71]     [,72]     [,73]     [,74]     [,75]     [,76]     [,77]
[1,] -0.04981028 -1.599025 0.8147242 -0.481365 0.9263445 -1.760571 -1.055765
[2,] -0.04981028 -1.599025 0.8147242 -0.481365 0.9263445 -1.760571 -1.055765
         [,78]    [,79]      [,80]     [,81]       [,82]     [,83]      [,84]
[1,] 0.4680038 0.552704 -0.5830878 0.5802986 -0.09000194 0.7338554 -0.6449547
[2,] 0.4680038 0.552704 -0.5830878 0.5802986 -0.09000194 0.7338554 -0.6449547
         [,85]    [,86]      [,87]         [,88]   [,89]     [,90]     [,91]
[1,] -1.154668 1.569442 -0.8871621 -0.0001456922 1.06923 -1.813439 0.7530257
[2,] -1.154668 1.569442 -0.8871621 -0.0001456922 1.06923 -1.813439 0.7530257
        [,92]    [,93]      [,94]     [,95]      [,96]      [,97]     [,98]
[1,] 1.579789 1.105702 0.09580115 -1.248106 0.02639544 -0.6072109 -1.194379
[2,] 1.579789 1.105702 0.09580115 -1.248106 0.02639544 -0.6072109 -1.194379
         [,99]    [,100]
[1,] -1.636005 0.9776956
[2,] -1.636005 0.9776956
> 
> 
> Max(tmp2)
[1] 3.106567
> Min(tmp2)
[1] -2.354537
> mean(tmp2)
[1] -0.02055058
> Sum(tmp2)
[1] -2.055058
> Var(tmp2)
[1] 0.9229784
> 
> rowMeans(tmp2)
  [1]  3.10656656 -0.76443307 -1.69672578  1.65467516 -0.07515522 -0.40574341
  [7]  0.33947316  0.10330353 -0.29444214 -1.38510558  0.28926936  0.71256786
 [13]  1.79299965 -0.17523009 -0.77098838  0.72111222  0.32403294  1.38292533
 [19] -0.85303950  0.45603760  0.28463088  0.14973185 -1.09635373 -0.97702534
 [25]  0.75726747 -1.47514872  0.73838537 -0.84214331  1.06105618  1.08283562
 [31] -1.44395431 -0.17443853  0.25962260  0.35887720 -0.56492907 -0.55975956
 [37] -1.59941391  0.03192228  0.40016224 -0.44884972 -0.97513069 -0.82077194
 [43] -0.36641849 -0.33265391 -0.86480677  0.68621145  0.94845542  0.71356066
 [49]  0.11222283  1.46088481  0.28229011 -0.15789272  0.05625576 -1.53365358
 [55]  0.22852874 -0.32628496  0.07379632  0.74556357  0.73908009  0.54265356
 [61] -1.53506637  1.57311460 -0.56487072 -0.92757738  0.86703830  0.56370537
 [67] -0.50909658  0.73342706 -2.35453685  0.25770716  0.50149391 -0.17652072
 [73]  1.88524473  0.75064258  0.29060742 -1.39073984 -0.58998291 -0.66467108
 [79]  0.01496553  0.80041075  1.32643324 -0.93864830  0.85146879 -1.23446837
 [85]  0.15308734  0.44639216  0.18888502 -1.30287379 -1.81044318  0.58965762
 [91] -0.27601160 -0.31624768 -0.01122121  1.07561100 -0.75623801  0.59161804
 [97]  0.54877341 -0.85499592 -2.16482901  0.69723201
> rowSums(tmp2)
  [1]  3.10656656 -0.76443307 -1.69672578  1.65467516 -0.07515522 -0.40574341
  [7]  0.33947316  0.10330353 -0.29444214 -1.38510558  0.28926936  0.71256786
 [13]  1.79299965 -0.17523009 -0.77098838  0.72111222  0.32403294  1.38292533
 [19] -0.85303950  0.45603760  0.28463088  0.14973185 -1.09635373 -0.97702534
 [25]  0.75726747 -1.47514872  0.73838537 -0.84214331  1.06105618  1.08283562
 [31] -1.44395431 -0.17443853  0.25962260  0.35887720 -0.56492907 -0.55975956
 [37] -1.59941391  0.03192228  0.40016224 -0.44884972 -0.97513069 -0.82077194
 [43] -0.36641849 -0.33265391 -0.86480677  0.68621145  0.94845542  0.71356066
 [49]  0.11222283  1.46088481  0.28229011 -0.15789272  0.05625576 -1.53365358
 [55]  0.22852874 -0.32628496  0.07379632  0.74556357  0.73908009  0.54265356
 [61] -1.53506637  1.57311460 -0.56487072 -0.92757738  0.86703830  0.56370537
 [67] -0.50909658  0.73342706 -2.35453685  0.25770716  0.50149391 -0.17652072
 [73]  1.88524473  0.75064258  0.29060742 -1.39073984 -0.58998291 -0.66467108
 [79]  0.01496553  0.80041075  1.32643324 -0.93864830  0.85146879 -1.23446837
 [85]  0.15308734  0.44639216  0.18888502 -1.30287379 -1.81044318  0.58965762
 [91] -0.27601160 -0.31624768 -0.01122121  1.07561100 -0.75623801  0.59161804
 [97]  0.54877341 -0.85499592 -2.16482901  0.69723201
> 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]  3.10656656 -0.76443307 -1.69672578  1.65467516 -0.07515522 -0.40574341
  [7]  0.33947316  0.10330353 -0.29444214 -1.38510558  0.28926936  0.71256786
 [13]  1.79299965 -0.17523009 -0.77098838  0.72111222  0.32403294  1.38292533
 [19] -0.85303950  0.45603760  0.28463088  0.14973185 -1.09635373 -0.97702534
 [25]  0.75726747 -1.47514872  0.73838537 -0.84214331  1.06105618  1.08283562
 [31] -1.44395431 -0.17443853  0.25962260  0.35887720 -0.56492907 -0.55975956
 [37] -1.59941391  0.03192228  0.40016224 -0.44884972 -0.97513069 -0.82077194
 [43] -0.36641849 -0.33265391 -0.86480677  0.68621145  0.94845542  0.71356066
 [49]  0.11222283  1.46088481  0.28229011 -0.15789272  0.05625576 -1.53365358
 [55]  0.22852874 -0.32628496  0.07379632  0.74556357  0.73908009  0.54265356
 [61] -1.53506637  1.57311460 -0.56487072 -0.92757738  0.86703830  0.56370537
 [67] -0.50909658  0.73342706 -2.35453685  0.25770716  0.50149391 -0.17652072
 [73]  1.88524473  0.75064258  0.29060742 -1.39073984 -0.58998291 -0.66467108
 [79]  0.01496553  0.80041075  1.32643324 -0.93864830  0.85146879 -1.23446837
 [85]  0.15308734  0.44639216  0.18888502 -1.30287379 -1.81044318  0.58965762
 [91] -0.27601160 -0.31624768 -0.01122121  1.07561100 -0.75623801  0.59161804
 [97]  0.54877341 -0.85499592 -2.16482901  0.69723201
> rowMin(tmp2)
  [1]  3.10656656 -0.76443307 -1.69672578  1.65467516 -0.07515522 -0.40574341
  [7]  0.33947316  0.10330353 -0.29444214 -1.38510558  0.28926936  0.71256786
 [13]  1.79299965 -0.17523009 -0.77098838  0.72111222  0.32403294  1.38292533
 [19] -0.85303950  0.45603760  0.28463088  0.14973185 -1.09635373 -0.97702534
 [25]  0.75726747 -1.47514872  0.73838537 -0.84214331  1.06105618  1.08283562
 [31] -1.44395431 -0.17443853  0.25962260  0.35887720 -0.56492907 -0.55975956
 [37] -1.59941391  0.03192228  0.40016224 -0.44884972 -0.97513069 -0.82077194
 [43] -0.36641849 -0.33265391 -0.86480677  0.68621145  0.94845542  0.71356066
 [49]  0.11222283  1.46088481  0.28229011 -0.15789272  0.05625576 -1.53365358
 [55]  0.22852874 -0.32628496  0.07379632  0.74556357  0.73908009  0.54265356
 [61] -1.53506637  1.57311460 -0.56487072 -0.92757738  0.86703830  0.56370537
 [67] -0.50909658  0.73342706 -2.35453685  0.25770716  0.50149391 -0.17652072
 [73]  1.88524473  0.75064258  0.29060742 -1.39073984 -0.58998291 -0.66467108
 [79]  0.01496553  0.80041075  1.32643324 -0.93864830  0.85146879 -1.23446837
 [85]  0.15308734  0.44639216  0.18888502 -1.30287379 -1.81044318  0.58965762
 [91] -0.27601160 -0.31624768 -0.01122121  1.07561100 -0.75623801  0.59161804
 [97]  0.54877341 -0.85499592 -2.16482901  0.69723201
> 
> colMeans(tmp2)
[1] -0.02055058
> colSums(tmp2)
[1] -2.055058
> colVars(tmp2)
[1] 0.9229784
> colSd(tmp2)
[1] 0.9607176
> colMax(tmp2)
[1] 3.106567
> colMin(tmp2)
[1] -2.354537
> colMedians(tmp2)
[1] 0.08854992
> colRanges(tmp2)
          [,1]
[1,] -2.354537
[2,]  3.106567
> 
> 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.56041840  5.15109359  1.86581747 -1.78707963  0.85575744  0.61160218
 [7]  2.66791869  2.84313710 -0.44625511 -0.03119708
> colApply(tmp,quantile)[,1]
            [,1]
[1,] -0.93418457
[2,] -0.46510117
[3,] -0.07563765
[4,]  0.24994434
[5,]  1.50179044
> 
> rowApply(tmp,sum)
 [1]  4.9751256  3.6537723  7.1121301 -3.3304538  5.2596821 -0.7870209
 [7] -1.1818781 -2.7424608 -2.0734935  1.4058101
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    3   10    3    5    5    6    4   10    5     3
 [2,]    6    9    6   10    9    2    8    7    3     9
 [3,]    8    5    2    8    3    5   10    8    4     7
 [4,]    1    1    5    1   10    1    1    9    9    10
 [5,]    5    6    1    9    4    9    9    1   10     8
 [6,]    9    7    9    6    2    7    5    2    7     1
 [7,]    7    8    4    2    1   10    6    6    1     6
 [8,]   10    2   10    7    7    3    2    5    8     5
 [9,]    4    4    8    4    6    4    7    4    6     2
[10,]    2    3    7    3    8    8    3    3    2     4
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1] -2.05477733 -0.02515395  1.81035840  1.48063368  0.31653097  1.32236564
 [7]  0.20944139 -0.05030579  0.47579389  0.35554264  1.51649766  2.78577568
[13]  3.57576553 -0.03359548 -1.33564673  2.69263697 -3.68570681  0.66261118
[19]  1.71250393 -1.07234137
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -2.1191792
[2,] -1.0283689
[3,] -0.2262809
[4,]  0.6419624
[5,]  0.6770893
> 
> rowApply(tmp,sum)
[1]  6.236592 -3.915286  4.392175 -5.149440  9.094890
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   11    2    7    3   11
[2,]    7   18    4    2   18
[3,]    9   16   11   20    8
[4,]   15   12   14   15    5
[5,]    1    9   17   10   15
> 
> 
> as.matrix(tmp)
           [,1]       [,2]       [,3]       [,4]        [,5]       [,6]
[1,]  0.6770893  0.1422951 0.19410480  0.9684797 -1.67649010 -0.5826634
[2,] -2.1191792  0.4656865 0.35808820  0.0519574  0.02199096 -0.3634586
[3,] -0.2262809 -0.7965035 0.07818125  0.7325153  1.33882471 -0.6056566
[4,] -1.0283689 -1.2957997 1.11224113  0.2082163 -0.33528774  0.8575661
[5,]  0.6419624  1.4591676 0.06774303 -0.4805351  0.96749315  2.0165782
              [,7]       [,8]        [,9]      [,10]      [,11]      [,12]
[1,] -0.9503605422 -0.7607806  0.98233882  0.9994018  0.6890154  0.3397727
[2,] -0.0093847225  0.0231031  0.08417592  1.1334655 -0.5429491  0.4145340
[3,]  0.0008875357  0.7111193  0.06740189 -1.1485575  1.0262150  2.0673781
[4,] -0.1472026009 -0.3340233  0.34887967 -1.4368601 -0.4240395 -0.7344149
[5,]  1.3155017230  0.3102757 -1.00700242  0.8080929  0.7682558  0.6985058
          [,13]      [,14]       [,15]      [,16]      [,17]       [,18]
[1,]  1.8889269  1.5963456 -0.15169802  0.9447929 -1.1870955  0.91349625
[2,]  0.3411588 -0.3483729  0.02255697  0.5441443 -0.2435976  0.07277718
[3,] -1.3548851  0.2430784 -0.24351374  1.3392089 -1.2048847 -0.03166195
[4,]  0.1847556 -0.7896482  0.01021793 -0.4977806 -0.8997588  0.22444158
[5,]  2.5158093 -0.7349983 -0.97320987  0.3622714 -0.1503703 -0.51644189
          [,19]       [,20]
[1,]  1.0589687  0.15065190
[2,] -1.2599474 -2.56203561
[3,]  1.4605700  0.93873821
[4,] -0.6175904  0.44501615
[5,]  1.0705030 -0.04471203
> 
> 
> is.BufferedMatrix(tmp)
[1] TRUE
> 
> as.BufferedMatrix(as.matrix(tmp))
BufferedMatrix object
Matrix size:  5 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  800  bytes.
> 
> 
> 
> subBufferedMatrix(tmp,1:5,1:5)
BufferedMatrix object
Matrix size:  5 5 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  653  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  566  bytes.
Disk usage :  160  bytes.
> subBufferedMatrix(tmp,1:3,)
BufferedMatrix object
Matrix size:  3 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  480  bytes.
> 
> 
> rm(tmp)
> 
> 
> ###
> ### Testing colnames and rownames
> ###
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> 
> 
> colnames(tmp)
NULL
> rownames(tmp)
NULL
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> colnames(tmp)
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"
> rownames(tmp)
[1] "row1" "row2" "row3" "row4" "row5"
> 
> 
> tmp["row1",]
          col1      col2       col3     col4      col5      col6      col7
row1 -0.198305 0.4613611 -0.5035156 1.106723 -1.451935 0.4485557 0.1585972
           col8     col9     col10    col11      col12      col13       col14
row1 -0.9630753 2.008232 -2.768573 1.714599 -0.6452383 -0.5954844 -0.04386238
        col15     col16      col17     col18   col19     col20
row1 1.037284 0.4872484 -0.4166716 0.2004024 1.02974 0.1469227
> tmp[,"col10"]
          col10
row1 -2.7685733
row2 -1.2196451
row3  0.5691640
row4 -0.6974035
row5  2.1807870
> tmp[c("row1","row5"),]
           col1       col2       col3      col4       col5       col6      col7
row1 -0.1983050 0.46136111 -0.5035156  1.106723 -1.4519349  0.4485557 0.1585972
row5 -0.2148111 0.02610665 -0.6921599 -1.938588 -0.4563817 -0.6405534 1.0158015
           col8      col9     col10      col11      col12      col13
row1 -0.9630753 2.0082325 -2.768573  1.7145992 -0.6452383 -0.5954844
row5 -0.3269829 0.9427249  2.180787 -0.7654615  0.2164012 -1.0742414
           col14    col15     col16      col17      col18      col19      col20
row1 -0.04386238 1.037284 0.4872484 -0.4166716  0.2004024  1.0297403  0.1469227
row5 -0.28395406 1.312594 0.2942154  1.0124408 -0.5394140 -0.5706147 -1.4215821
> tmp[,c("col6","col20")]
           col6       col20
row1  0.4485557  0.14692271
row2  0.3535324  0.86056019
row3 -0.2121888 -0.04661494
row4 -1.8133056  0.39441210
row5 -0.6405534 -1.42158215
> tmp[c("row1","row5"),c("col6","col20")]
           col6      col20
row1  0.4485557  0.1469227
row5 -0.6405534 -1.4215821
> 
> 
> 
> 
> 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 51.33828 50.52152 49.97301 48.44009 50.6658 105.853 50.70285 50.36045
         col9    col10    col11    col12    col13    col14    col15    col16
row1 50.33855 50.47421 49.81749 51.06982 51.56489 48.43355 49.96442 50.36286
        col17    col18    col19    col20
row1 49.03396 49.32736 50.46206 104.0493
> tmp[,"col10"]
        col10
row1 50.47421
row2 29.43173
row3 30.02287
row4 29.17295
row5 51.07528
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 51.33828 50.52152 49.97301 48.44009 50.66580 105.8530 50.70285 50.36045
row5 50.78569 51.99759 50.60105 50.33589 50.83848 107.2542 51.37313 49.79323
         col9    col10    col11    col12    col13    col14    col15    col16
row1 50.33855 50.47421 49.81749 51.06982 51.56489 48.43355 49.96442 50.36286
row5 51.15074 51.07528 49.25407 49.67910 51.30323 50.52905 51.59167 50.31791
        col17    col18    col19    col20
row1 49.03396 49.32736 50.46206 104.0493
row5 50.78615 50.79490 49.38006 106.3101
> tmp[,c("col6","col20")]
          col6     col20
row1 105.85298 104.04933
row2  76.42521  72.85849
row3  74.31382  72.31615
row4  74.25465  74.79012
row5 107.25422 106.31009
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 105.8530 104.0493
row5 107.2542 106.3101
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 105.8530 104.0493
row5 107.2542 106.3101
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,] -1.3599626
[2,] -1.1285716
[3,] -1.1376448
[4,]  1.3623430
[5,]  0.5607565
> tmp[,c("col17","col7")]
          col17       col7
[1,] -0.3379430 -1.0310149
[2,] -0.7417941 -1.5826927
[3,]  0.6258701 -0.6870828
[4,] -1.4610954 -0.2732554
[5,]  0.7475773  0.2954486
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6       col20
[1,] -1.2593430  0.03474071
[2,]  0.5423435  0.14176725
[3,] -0.4425313 -1.02187531
[4,]  0.1198373  0.05685817
[5,] -0.3176438  1.47885101
> subBufferedMatrix(tmp,1,c("col6"))[,1]
          col1
[1,] -1.259343
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,] -1.2593430
[2,]  0.5423435
> 
> 
> 
> 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.1150104 0.1813601 0.7893191  0.3268784 0.02079055 -0.3042538 0.3834073
row1 -1.0551265 0.1343789 0.8978959 -0.1037593 1.20086531  0.7134713 0.3052312
           [,8]       [,9]        [,10]      [,11]      [,12]      [,13]
row3 -0.1569463 -0.8894382  0.005041973  1.8546886 -0.6101713  0.9755448
row1 -0.1400564  1.0740870 -2.268415978 -0.5976732 -0.6875976 -0.3625966
          [,14]    [,15]     [,16]      [,17]     [,18]      [,19]      [,20]
row3 -0.9669279 1.005789  1.056476 -0.3403630  1.068352  0.8182408 -1.3111911
row1  1.1663554 1.306091 -1.547823 -0.2949072 -1.016150 -0.8776843  0.5621787
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
         [,1]     [,2]       [,3]      [,4]       [,5]      [,6]       [,7]
row2 1.636172 0.477347 -0.4430044 -1.170802 -0.9990925 -0.219992 -0.3464966
          [,8]     [,9]       [,10]
row2 0.5788855 0.360235 -0.02821316
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
           [,1]      [,2]    [,3]       [,4]      [,5]     [,6]       [,7]
row5 -0.6545218 0.1180536 1.07656 -0.9766582 -1.038037 1.790617 -0.1599597
           [,8]       [,9]     [,10]    [,11]     [,12]     [,13]     [,14]
row5 -0.9730885 -0.8419863 0.5619509 1.343338 0.9507097 -0.360928 0.3092713
          [,15]     [,16]      [,17]   [,18]      [,19]     [,20]
row5 -0.9436051 0.7910306 -0.3331748 1.12891 -0.2989368 0.9146196
> 
> 
> 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: 0x57223a3c4930>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM3242533cc269ea"
 [2] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM324253eb38be5" 
 [3] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM324253e3a07bc" 
 [4] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM32425324b66af9"
 [5] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM3242534917aa7e"
 [6] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM324253223fbafb"
 [7] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM324253bb31085" 
 [8] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM324253b06c49a" 
 [9] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM3242533b5a5192"
[10] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM3242531186223f"
[11] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM324253abd3879" 
[12] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM324253495e4113"
[13] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM32425359d544e8"
[14] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM3242537dfb537f"
[15] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM3242536142e25c"
> 
> 
> ### 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: 0x57223deecdb0>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x57223deecdb0>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x57223deecdb0>
> rowMedians(tmp)
  [1]  0.591461615 -0.174370580  0.144279375  0.138679427  0.137972024
  [6]  0.407599053  0.061168246  0.117005560  0.114456703 -0.034281645
 [11] -0.204976105 -0.147426815 -0.208724853  0.038362832  0.166474180
 [16]  0.636360388 -0.050597201 -0.374645384  0.274795681 -0.089724133
 [21] -0.503121399  0.034261005  0.208864355  0.516204211  0.047600665
 [26] -0.258736439  0.386407954 -0.200068592 -0.202698552  0.227907635
 [31] -0.354008160 -0.090894378 -0.097904390  0.164784000  0.562385147
 [36]  0.402910642 -0.210492665  0.140640272 -0.121947267 -0.078706189
 [41] -0.077637023 -0.588812356  0.042155862 -0.072830935 -0.366214644
 [46]  0.034013984  0.089079200  0.033497269 -0.478475441 -0.613852458
 [51]  0.166093459  0.487147414  0.016874503 -0.586132815  0.221599535
 [56]  0.041537064 -0.359094288  0.357122260  0.220642832  0.186124033
 [61] -0.478193248 -0.239821084 -0.366950800 -0.028079792  0.322023723
 [66]  0.214047687  0.068710483  0.318121989  0.500717004 -0.227473823
 [71] -0.519038431  0.135226904  0.300752081  0.152657865  0.457379838
 [76] -0.245007932  0.466966377 -0.365127694  0.164133134  0.097768184
 [81]  0.173486033  0.233182134 -0.227975854 -0.246185050 -0.210617322
 [86] -0.336747049  0.267214654 -0.394163882 -0.179735281  0.356161483
 [91]  0.499908142 -0.444441523  0.025971237 -0.086948012 -0.126565929
 [96]  0.553276696 -0.011745777  0.336547823 -0.037325732  0.206585621
[101]  0.483227704  1.093210516 -0.102897944  0.175470941 -0.124186582
[106]  0.147589213 -0.006780796  0.339552259 -0.288784271  0.163461643
[111]  0.039310804 -0.037292956  0.069937582  0.320429308  0.637592582
[116] -0.304785581 -0.024924628  0.627852070  0.029230482  0.652856976
[121] -0.583332425 -0.110325569  0.106717869 -0.264578995 -0.072972536
[126] -0.152146234 -0.083474167  0.441318844 -0.048523370  0.217321647
[131]  0.456269897 -0.074793377 -0.131516843  0.072612617  0.421458958
[136]  0.075212406 -0.166859864  0.240091729  0.293068645  0.017804941
[141] -0.281060642 -0.252968556  0.374659447 -0.538865574 -0.204189603
[146]  0.306448586 -0.374293108  0.012580239 -0.625953163  0.140954144
[151]  0.110413457  0.184024116 -0.645073826 -0.270568528  0.512415423
[156]  0.109220513  0.236528022  0.268324282  0.214197591  0.012741257
[161]  0.108796589  0.268802105  0.132957627  0.065744543 -0.569762081
[166]  0.078456172  0.230038786 -0.086189235 -0.299704123  0.308291875
[171]  0.571094440 -0.177713349 -0.182517200 -0.400335151 -0.544667826
[176]  0.368808331 -0.126786143  0.409266409  0.119346151 -0.042652265
[181] -0.081701772  0.047795885  0.179484669  0.155986040  0.504705324
[186]  0.022838724 -0.171409187 -0.667894558  0.240406397  0.328421535
[191]  0.331509400 -0.391778269 -0.109405387  0.043053268  0.358367368
[196] -0.348173329 -0.310359506 -0.166339807 -0.249646379  0.307504668
[201]  0.303310967  0.194925807 -0.129694439  0.128074359  0.816698189
[206]  0.286229654 -0.156215289  0.099665122 -0.311250034  0.201553516
[211] -0.396439964  0.718003550 -0.709037523 -0.229564258  0.383246960
[216] -0.184944755  0.111012061  0.058413509 -0.141558198  0.019567220
[221] -0.266395159 -0.108990978  0.524307956 -0.655722926  0.371871856
[226]  0.226305190  0.312457623  0.248748350  0.474435075  0.199680339
> 
> proc.time()
   user  system elapsed 
  1.296   1.497   2.779 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R Under development (unstable) (2026-03-05 r89546) -- "Unsuffered Consequences"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

<pointer: 0x5fed87110ff0>
> .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: 0x5fed87110ff0>
> .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: 0x5fed87110ff0>
> .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: 0x5fed87110ff0>
> 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: 0x5fed86dbc710>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fed86dbc710>
> .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: 0x5fed86dbc710>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fed86dbc710>
> .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: 0x5fed86dbc710>
> 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: 0x5fed871203f0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fed871203f0>
> .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: 0x5fed871203f0>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x5fed871203f0>
> .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: 0x5fed871203f0>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x5fed871203f0>
> .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: 0x5fed871203f0>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x5fed871203f0>
> .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: 0x5fed871203f0>
> 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: 0x5fed868578c0>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x5fed868578c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fed868578c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fed868578c0>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile3242cc1fcce405" "BufferedMatrixFile3242cc67ff3aa5"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile3242cc1fcce405" "BufferedMatrixFile3242cc67ff3aa5"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fed86583e30>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fed86583e30>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x5fed86583e30>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x5fed86583e30>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x5fed86583e30>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x5fed86583e30>
> .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: 0x5fed876df790>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fed876df790>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x5fed876df790>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x5fed876df790>
> 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: 0x5fed86aca860>
> .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: 0x5fed86aca860>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.247   0.047   0.282 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R Under development (unstable) (2026-03-05 r89546) -- "Unsuffered Consequences"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> Temp <- createBufferedMatrix(100)
> dim(Temp)
[1] 100   0
> buffer.dim(Temp)
[1] 1 1
> 
> 
> proc.time()
   user  system elapsed 
  0.245   0.042   0.274 

Example timings