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

This page was generated on 2026-04-18 11:35 -0400 (Sat, 18 Apr 2026).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo1Linux (Ubuntu 24.04.4 LTS)x86_644.6.0 alpha (2026-04-05 r89794) 4957
kjohnson3macOS 13.7.7 Venturaarm644.6.0 alpha (2026-04-08 r89818) 4686
kunpeng2Linux (openEuler 24.03 LTS)aarch64R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" 4627
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 259/2404HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.75.0  (landing page)
Ben Bolstad
Snapshot Date: 2026-04-17 13:40 -0400 (Fri, 17 Apr 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.4 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
kjohnson3macOS 13.7.7 Ventura / arm64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kunpeng2Linux (openEuler 24.03 LTS) / aarch64  OK    OK    OK  
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-04-17 21:57:02 -0400 (Fri, 17 Apr 2026)
EndedAt: 2026-04-17 21:57:27 -0400 (Fri, 17 Apr 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 version 4.6.0 alpha (2026-04-05 r89794)
* using platform: x86_64-pc-linux-gnu
* R was compiled by
    gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
    GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
* running under: Ubuntu 24.04.4 LTS
* using session charset: UTF-8
* current time: 2026-04-18 01:57:02 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 version 4.6.0 alpha (2026-04-05 r89794)
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.242   0.050   0.280 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R version 4.6.0 alpha (2026-04-05 r89794)
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 480193 25.7    1053195 56.3   637568 34.1
Vcells 887233  6.8    8388608 64.0  2083868 15.9
> 
> 
> 
> 
> ##
> ## checking reads
> ##
> 
> tmp2 <- createBufferedMatrix(10,20)
> 
> test.sample <- rnorm(10*20)
> 
> tmp2[1:10,1:20] <- test.sample
> 
> test.matrix <- matrix(test.sample,10,20)
> 
> ## testing reads
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Fri Apr 17 21:57:17 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] "Fri Apr 17 21:57:17 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: 0x60f5e1cd6a60>
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Fri Apr 17 21:57:18 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] "Fri Apr 17 21:57:18 2026"
> 
> ColMode(tmp2)
<pointer: 0x60f5e1cd6a60>
> 
> 
> 
> ### 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.8379969 -2.2134548 -0.1094299  0.03433539
[2,] -0.9737503 -1.2978737 -0.3282383 -0.61436740
[3,] -0.9836275  0.7919599  0.9754012 -0.19344754
[4,]  1.1576133 -0.7544671 -0.3678162 -0.11465851
> 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.8379969 2.2134548 0.1094299 0.03433539
[2,]  0.9737503 1.2978737 0.3282383 0.61436740
[3,]  0.9836275 0.7919599 0.9754012 0.19344754
[4,]  1.1576133 0.7544671 0.3678162 0.11465851
> 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.9918966 1.4877684 0.3308018 0.1852981
[2,] 0.9867879 1.1392426 0.5729208 0.7838159
[3,] 0.9917800 0.8899213 0.9876240 0.4398267
[4,] 1.0759244 0.8686007 0.6064785 0.3386126
> 
> 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.75696 42.09114 28.41745 26.88732
[2,]  35.84163 37.69030 31.05745 33.45253
[3,]  35.90143 34.69117 35.85164 29.59171
[4,]  36.91686 34.44047 31.43260 28.50078
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x60f5e1c57e20>
> exp(tmp5)
<pointer: 0x60f5e1c57e20>
> log(tmp5,2)
<pointer: 0x60f5e1c57e20>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 467.8022
> Min(tmp5)
[1] 53.6703
> mean(tmp5)
[1] 71.73398
> Sum(tmp5)
[1] 14346.8
> Var(tmp5)
[1] 861.3013
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 89.74795 71.23997 70.75792 70.95494 67.72147 69.23311 68.53851 69.09457
 [9] 70.39370 69.65765
> rowSums(tmp5)
 [1] 1794.959 1424.799 1415.158 1419.099 1354.429 1384.662 1370.770 1381.891
 [9] 1407.874 1393.153
> rowVars(tmp5)
 [1] 8047.63460   49.69249   59.65801  106.12429   57.97361   72.97071
 [7]   53.39377   56.03650   65.49156   60.49924
> rowSd(tmp5)
 [1] 89.708609  7.049290  7.723860 10.301664  7.614040  8.542290  7.307104
 [8]  7.485753  8.092685  7.778126
> rowMax(tmp5)
 [1] 467.80217  84.00289  84.52449  90.76244  83.63876  91.51016  82.44748
 [8]  83.90342  88.05393  84.43287
> rowMin(tmp5)
 [1] 55.54218 59.35353 54.92405 55.34629 55.47485 56.47597 53.67030 58.86597
 [9] 55.57585 55.23330
> 
> colMeans(tmp5)
 [1] 110.09560  73.35454  70.62370  64.09787  64.83034  70.74326  72.21609
 [8]  74.10604  65.92119  64.22572  76.90963  69.01309  68.40334  66.12501
[15]  73.72944  70.59348  67.75274  67.57233  72.41226  71.95396
> colSums(tmp5)
 [1] 1100.9560  733.5454  706.2370  640.9787  648.3034  707.4326  722.1609
 [8]  741.0604  659.2119  642.2572  769.0963  690.1309  684.0334  661.2501
[15]  737.2944  705.9348  677.5274  675.7233  724.1226  719.5396
> colVars(tmp5)
 [1] 15821.99214    53.32899    59.77384    29.88271    53.25960    71.09651
 [7]   133.77694    46.10162    44.41753    26.38383   110.57547    55.75869
[13]    55.72203    40.89085   126.75737    72.06741    54.09636    67.14509
[19]    84.39432    43.40448
> colSd(tmp5)
 [1] 125.785501   7.302670   7.731354   5.466508   7.297917   8.431875
 [7]  11.566198   6.789817   6.664648   5.136519  10.515487   7.467174
[13]   7.464719   6.394596  11.258657   8.489253   7.355023   8.194211
[19]   9.186638   6.588208
> colMax(tmp5)
 [1] 467.80217  87.60719  82.34709  72.47992  77.69166  84.43287  89.87694
 [8]  83.83234  77.98304  70.60687  90.76244  82.44748  82.01022  77.15541
[15]  91.51016  82.16328  83.90342  84.00289  84.52449  83.78759
> colMin(tmp5)
 [1] 62.22545 59.24904 59.14720 55.96243 53.67030 58.86597 55.57585 62.78058
 [9] 55.23330 56.16958 63.07867 55.54218 56.38229 54.92405 58.48557 55.47485
[17] 57.05086 55.34629 56.04003 60.36523
> 
> 
> ### 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] 89.74795 71.23997 70.75792 70.95494 67.72147 69.23311 68.53851 69.09457
 [9] 70.39370       NA
> rowSums(tmp5)
 [1] 1794.959 1424.799 1415.158 1419.099 1354.429 1384.662 1370.770 1381.891
 [9] 1407.874       NA
> rowVars(tmp5)
 [1] 8047.63460   49.69249   59.65801  106.12429   57.97361   72.97071
 [7]   53.39377   56.03650   65.49156   63.84756
> rowSd(tmp5)
 [1] 89.708609  7.049290  7.723860 10.301664  7.614040  8.542290  7.307104
 [8]  7.485753  8.092685  7.990467
> rowMax(tmp5)
 [1] 467.80217  84.00289  84.52449  90.76244  83.63876  91.51016  82.44748
 [8]  83.90342  88.05393        NA
> rowMin(tmp5)
 [1] 55.54218 59.35353 54.92405 55.34629 55.47485 56.47597 53.67030 58.86597
 [9] 55.57585       NA
> 
> colMeans(tmp5)
 [1] 110.09560  73.35454        NA  64.09787  64.83034  70.74326  72.21609
 [8]  74.10604  65.92119  64.22572  76.90963  69.01309  68.40334  66.12501
[15]  73.72944  70.59348  67.75274  67.57233  72.41226  71.95396
> colSums(tmp5)
 [1] 1100.9560  733.5454        NA  640.9787  648.3034  707.4326  722.1609
 [8]  741.0604  659.2119  642.2572  769.0963  690.1309  684.0334  661.2501
[15]  737.2944  705.9348  677.5274  675.7233  724.1226  719.5396
> colVars(tmp5)
 [1] 15821.99214    53.32899          NA    29.88271    53.25960    71.09651
 [7]   133.77694    46.10162    44.41753    26.38383   110.57547    55.75869
[13]    55.72203    40.89085   126.75737    72.06741    54.09636    67.14509
[19]    84.39432    43.40448
> colSd(tmp5)
 [1] 125.785501   7.302670         NA   5.466508   7.297917   8.431875
 [7]  11.566198   6.789817   6.664648   5.136519  10.515487   7.467174
[13]   7.464719   6.394596  11.258657   8.489253   7.355023   8.194211
[19]   9.186638   6.588208
> colMax(tmp5)
 [1] 467.80217  87.60719        NA  72.47992  77.69166  84.43287  89.87694
 [8]  83.83234  77.98304  70.60687  90.76244  82.44748  82.01022  77.15541
[15]  91.51016  82.16328  83.90342  84.00289  84.52449  83.78759
> colMin(tmp5)
 [1] 62.22545 59.24904       NA 55.96243 53.67030 58.86597 55.57585 62.78058
 [9] 55.23330 56.16958 63.07867 55.54218 56.38229 54.92405 58.48557 55.47485
[17] 57.05086 55.34629 56.04003 60.36523
> 
> Max(tmp5,na.rm=TRUE)
[1] 467.8022
> Min(tmp5,na.rm=TRUE)
[1] 53.6703
> mean(tmp5,na.rm=TRUE)
[1] 71.74207
> Sum(tmp5,na.rm=TRUE)
[1] 14276.67
> Var(tmp5,na.rm=TRUE)
[1] 865.6381
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 89.74795 71.23997 70.75792 70.95494 67.72147 69.23311 68.53851 69.09457
 [9] 70.39370 69.63307
> rowSums(tmp5,na.rm=TRUE)
 [1] 1794.959 1424.799 1415.158 1419.099 1354.429 1384.662 1370.770 1381.891
 [9] 1407.874 1323.028
> rowVars(tmp5,na.rm=TRUE)
 [1] 8047.63460   49.69249   59.65801  106.12429   57.97361   72.97071
 [7]   53.39377   56.03650   65.49156   63.84756
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.708609  7.049290  7.723860 10.301664  7.614040  8.542290  7.307104
 [8]  7.485753  8.092685  7.990467
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.80217  84.00289  84.52449  90.76244  83.63876  91.51016  82.44748
 [8]  83.90342  88.05393  84.43287
> rowMin(tmp5,na.rm=TRUE)
 [1] 55.54218 59.35353 54.92405 55.34629 55.47485 56.47597 53.67030 58.86597
 [9] 55.57585 55.23330
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 110.09560  73.35454  70.67915  64.09787  64.83034  70.74326  72.21609
 [8]  74.10604  65.92119  64.22572  76.90963  69.01309  68.40334  66.12501
[15]  73.72944  70.59348  67.75274  67.57233  72.41226  71.95396
> colSums(tmp5,na.rm=TRUE)
 [1] 1100.9560  733.5454  636.1123  640.9787  648.3034  707.4326  722.1609
 [8]  741.0604  659.2119  642.2572  769.0963  690.1309  684.0334  661.2501
[15]  737.2944  705.9348  677.5274  675.7233  724.1226  719.5396
> colVars(tmp5,na.rm=TRUE)
 [1] 15821.99214    53.32899    67.21098    29.88271    53.25960    71.09651
 [7]   133.77694    46.10162    44.41753    26.38383   110.57547    55.75869
[13]    55.72203    40.89085   126.75737    72.06741    54.09636    67.14509
[19]    84.39432    43.40448
> colSd(tmp5,na.rm=TRUE)
 [1] 125.785501   7.302670   8.198230   5.466508   7.297917   8.431875
 [7]  11.566198   6.789817   6.664648   5.136519  10.515487   7.467174
[13]   7.464719   6.394596  11.258657   8.489253   7.355023   8.194211
[19]   9.186638   6.588208
> colMax(tmp5,na.rm=TRUE)
 [1] 467.80217  87.60719  82.34709  72.47992  77.69166  84.43287  89.87694
 [8]  83.83234  77.98304  70.60687  90.76244  82.44748  82.01022  77.15541
[15]  91.51016  82.16328  83.90342  84.00289  84.52449  83.78759
> colMin(tmp5,na.rm=TRUE)
 [1] 62.22545 59.24904 59.14720 55.96243 53.67030 58.86597 55.57585 62.78058
 [9] 55.23330 56.16958 63.07867 55.54218 56.38229 54.92405 58.48557 55.47485
[17] 57.05086 55.34629 56.04003 60.36523
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 89.74795 71.23997 70.75792 70.95494 67.72147 69.23311 68.53851 69.09457
 [9] 70.39370      NaN
> rowSums(tmp5,na.rm=TRUE)
 [1] 1794.959 1424.799 1415.158 1419.099 1354.429 1384.662 1370.770 1381.891
 [9] 1407.874    0.000
> rowVars(tmp5,na.rm=TRUE)
 [1] 8047.63460   49.69249   59.65801  106.12429   57.97361   72.97071
 [7]   53.39377   56.03650   65.49156         NA
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.708609  7.049290  7.723860 10.301664  7.614040  8.542290  7.307104
 [8]  7.485753  8.092685        NA
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.80217  84.00289  84.52449  90.76244  83.63876  91.51016  82.44748
 [8]  83.90342  88.05393        NA
> rowMin(tmp5,na.rm=TRUE)
 [1] 55.54218 59.35353 54.92405 55.34629 55.47485 56.47597 53.67030 58.86597
 [9] 55.57585       NA
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 114.24432  72.99450       NaN  63.54815  64.73252  69.22220  71.28101
 [8]  74.93045  67.10873  64.36940  78.44640  68.88375  68.06321  65.93987
[15]  75.28582  70.59787  67.91375  68.33079  71.13619  71.58564
> colSums(tmp5,na.rm=TRUE)
 [1] 1028.1989  656.9505    0.0000  571.9334  582.5926  622.9998  641.5291
 [8]  674.3741  603.9786  579.3246  706.0176  619.9537  612.5689  593.4589
[15]  677.5724  635.3808  611.2237  614.9771  640.2257  644.2708
> colVars(tmp5,na.rm=TRUE)
 [1] 17606.10756    58.53679          NA    30.21847    59.80939    53.95506
 [7]   140.66233    44.21818    34.10430    29.44959    97.82858    62.54034
[13]    61.38577    45.61659   115.35111    81.07562    60.56677    69.06645
[19]    76.62447    47.30389
> colSd(tmp5,na.rm=TRUE)
 [1] 132.688008   7.650934         NA   5.497133   7.733653   7.345411
 [7]  11.860115   6.649675   5.839889   5.426748   9.890833   7.908245
[13]   7.834907   6.754005  10.740164   9.004200   7.782466   8.310623
[19]   8.753540   6.877782
> colMax(tmp5,na.rm=TRUE)
 [1] 467.80217  87.60719      -Inf  72.47992  77.69166  77.67294  89.87694
 [8]  83.83234  77.98304  70.60687  90.76244  82.44748  82.01022  77.15541
[15]  91.51016  82.16328  83.90342  84.00289  84.52449  83.78759
> colMin(tmp5,na.rm=TRUE)
 [1] 62.22545 59.24904      Inf 55.96243 53.67030 58.86597 55.57585 62.78058
 [9] 60.54678 56.16958 64.85111 55.54218 56.38229 54.92405 58.48557 55.47485
[17] 57.05086 55.34629 56.04003 60.36523
> 
> 
> 
> 
> 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] 103.8507 168.9089 183.2525 134.1088 234.2605 247.5919 148.3938 200.4494
 [9] 352.7362 222.5001
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 103.8507 168.9089 183.2525 134.1088 234.2605 247.5919 148.3938 200.4494
 [9] 352.7362 222.5001
> 
> 
> 
> copymatrix <- matrix(rnorm(200,150,15),10,20)
> 
> tmp5[1:10,1:20] <- copymatrix
> which.row <- 1
> which.col  <- 3
> cat(which.row," ",which.col,"\n")
1   3 
> tmp5[which.row,which.col] <- NA
> copymatrix[which.row,which.col] <- NA
> 
> colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE)
 [1]  5.684342e-14 -5.684342e-14  1.705303e-13  8.526513e-14 -2.842171e-14
 [6]  1.136868e-13  0.000000e+00  1.421085e-13  1.136868e-13  4.263256e-14
[11]  5.684342e-14 -5.684342e-14 -5.684342e-14 -8.526513e-14  1.136868e-13
[16] -1.136868e-13 -1.136868e-13  1.705303e-13 -5.684342e-14 -1.136868e-13
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## making sure these things agree
> ##
> ## first when there is no NA
> 
> 
> 
> agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){
+ 
+   if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Max")
+   }
+   
+ 
+   if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Min")
+   }
+ 
+ 
+   if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){
+ 
+     cat(Sum(buff.matrix,na.rm=TRUE),"\n")
+     cat(sum(r.matrix,na.rm=TRUE),"\n")
+     cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n")
+     
+     stop("No agreement in Sum")
+   }
+   
+   if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){
+     stop("No agreement in mean")
+   }
+   
+   
+   if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){
+     stop("No agreement in Var")
+   }
+   
+   
+ 
+   if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowMeans")
+   }
+   
+   
+   if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colMeans")
+   }
+   
+   
+   if(any(abs(rowSums(buff.matrix,na.rm=TRUE)  -  apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in rowSums")
+   }
+   
+   
+   if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colSums")
+   }
+   
+   ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when 
+   ### computing variance
+   my.Var <- function(x,na.rm=FALSE){
+    if (all(is.na(x))){
+      return(NA)
+    } else {
+      var(x,na.rm=na.rm)
+    }
+ 
+   }
+   
+   if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+   
+   
+   if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+ 
+ 
+   if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+ 
+   if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+   
+   
+   if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+   
+ 
+   if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+ 
+   if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMedian")
+   }
+ 
+   if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colRanges")
+   }
+ 
+ 
+   
+ }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> for (rep in 1:20){
+   copymatrix <- matrix(rnorm(200,150,15),10,20)
+   
+   tmp5[1:10,1:20] <- copymatrix
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ## now lets assign some NA values and check agreement
+ 
+   which.row <- sample(1:10,1,replace=TRUE)
+   which.col  <- sample(1:20,1,replace=TRUE)
+   
+   cat(which.row," ",which.col,"\n")
+   
+   tmp5[which.row,which.col] <- NA
+   copymatrix[which.row,which.col] <- NA
+   
+   agree.checks(tmp5,copymatrix)
+ 
+   ## make an entire row NA
+   tmp5[which.row,] <- NA
+   copymatrix[which.row,] <- NA
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ### also make an entire col NA
+   tmp5[,which.col] <- NA
+   copymatrix[,which.col] <- NA
+ 
+   agree.checks(tmp5,copymatrix)
+ 
+   ### now make 1 element non NA with NA in the rest of row and column
+ 
+   tmp5[which.row,which.col] <- rnorm(1,150,15)
+   copymatrix[which.row,which.col] <- tmp5[which.row,which.col]
+ 
+   agree.checks(tmp5,copymatrix)
+ }
6   7 
4   9 
6   4 
4   18 
4   17 
10   8 
3   17 
7   18 
5   17 
7   12 
2   17 
3   1 
5   3 
6   3 
4   5 
2   1 
10   4 
5   9 
9   17 
4   6 
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.606799
> Min(tmp)
[1] -3.142198
> mean(tmp)
[1] -0.08863257
> Sum(tmp)
[1] -8.863257
> Var(tmp)
[1] 1.031024
> 
> rowMeans(tmp)
[1] -0.08863257
> rowSums(tmp)
[1] -8.863257
> rowVars(tmp)
[1] 1.031024
> rowSd(tmp)
[1] 1.015393
> rowMax(tmp)
[1] 2.606799
> rowMin(tmp)
[1] -3.142198
> 
> colMeans(tmp)
  [1] -0.71470446  0.70001490 -0.44626354 -1.11281309 -1.14460516 -1.35727430
  [7]  1.49470576 -0.49219706 -0.82774134 -0.72189051 -1.10330295 -1.59950617
 [13]  0.59967661  0.23168036  1.27634294  0.21807110 -0.87772261  1.62338004
 [19] -1.34829015  0.61634221 -0.77168362  0.78285652  1.23304746  0.95583103
 [25] -0.10188292  0.61876213  1.09231463 -0.56959710  2.60679932 -1.18765690
 [31]  0.22632097 -0.12116766 -0.52821244  0.37338552  0.69193561  0.16012456
 [37]  1.67119787 -0.05011250  1.54957475 -0.10250732 -0.22079978  0.59957639
 [43] -0.92718684 -1.78947784 -0.51985377 -0.51562036  0.15332336  0.35464693
 [49] -1.32938513  0.83250260 -0.69777123  2.42800497  1.21362516 -1.37883034
 [55]  2.22334479  1.04612756 -0.53327682 -0.92567558 -0.67010863  0.41815463
 [61] -1.31750362 -0.87356087 -0.36431782 -0.84089773  1.31806115  1.68464962
 [67] -0.91644710 -0.13346570 -1.41111854  0.10396208  0.52884384 -0.84412478
 [73] -3.14219827 -0.52660621 -0.59716545 -0.30772474 -0.32523454 -0.31474113
 [79]  0.53910240 -0.60799165 -0.09813716  0.10477499  1.37131547 -1.70925136
 [85] -0.46315006 -0.19600860 -1.04938418 -0.44740410 -0.94608214  0.03595400
 [91] -0.53009640 -0.57711077  0.13060191  0.16053422 -1.16517332 -0.56049016
 [97] -0.47785020  1.47914959 -0.18497656  1.30345466
> colSums(tmp)
  [1] -0.71470446  0.70001490 -0.44626354 -1.11281309 -1.14460516 -1.35727430
  [7]  1.49470576 -0.49219706 -0.82774134 -0.72189051 -1.10330295 -1.59950617
 [13]  0.59967661  0.23168036  1.27634294  0.21807110 -0.87772261  1.62338004
 [19] -1.34829015  0.61634221 -0.77168362  0.78285652  1.23304746  0.95583103
 [25] -0.10188292  0.61876213  1.09231463 -0.56959710  2.60679932 -1.18765690
 [31]  0.22632097 -0.12116766 -0.52821244  0.37338552  0.69193561  0.16012456
 [37]  1.67119787 -0.05011250  1.54957475 -0.10250732 -0.22079978  0.59957639
 [43] -0.92718684 -1.78947784 -0.51985377 -0.51562036  0.15332336  0.35464693
 [49] -1.32938513  0.83250260 -0.69777123  2.42800497  1.21362516 -1.37883034
 [55]  2.22334479  1.04612756 -0.53327682 -0.92567558 -0.67010863  0.41815463
 [61] -1.31750362 -0.87356087 -0.36431782 -0.84089773  1.31806115  1.68464962
 [67] -0.91644710 -0.13346570 -1.41111854  0.10396208  0.52884384 -0.84412478
 [73] -3.14219827 -0.52660621 -0.59716545 -0.30772474 -0.32523454 -0.31474113
 [79]  0.53910240 -0.60799165 -0.09813716  0.10477499  1.37131547 -1.70925136
 [85] -0.46315006 -0.19600860 -1.04938418 -0.44740410 -0.94608214  0.03595400
 [91] -0.53009640 -0.57711077  0.13060191  0.16053422 -1.16517332 -0.56049016
 [97] -0.47785020  1.47914959 -0.18497656  1.30345466
> 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.71470446  0.70001490 -0.44626354 -1.11281309 -1.14460516 -1.35727430
  [7]  1.49470576 -0.49219706 -0.82774134 -0.72189051 -1.10330295 -1.59950617
 [13]  0.59967661  0.23168036  1.27634294  0.21807110 -0.87772261  1.62338004
 [19] -1.34829015  0.61634221 -0.77168362  0.78285652  1.23304746  0.95583103
 [25] -0.10188292  0.61876213  1.09231463 -0.56959710  2.60679932 -1.18765690
 [31]  0.22632097 -0.12116766 -0.52821244  0.37338552  0.69193561  0.16012456
 [37]  1.67119787 -0.05011250  1.54957475 -0.10250732 -0.22079978  0.59957639
 [43] -0.92718684 -1.78947784 -0.51985377 -0.51562036  0.15332336  0.35464693
 [49] -1.32938513  0.83250260 -0.69777123  2.42800497  1.21362516 -1.37883034
 [55]  2.22334479  1.04612756 -0.53327682 -0.92567558 -0.67010863  0.41815463
 [61] -1.31750362 -0.87356087 -0.36431782 -0.84089773  1.31806115  1.68464962
 [67] -0.91644710 -0.13346570 -1.41111854  0.10396208  0.52884384 -0.84412478
 [73] -3.14219827 -0.52660621 -0.59716545 -0.30772474 -0.32523454 -0.31474113
 [79]  0.53910240 -0.60799165 -0.09813716  0.10477499  1.37131547 -1.70925136
 [85] -0.46315006 -0.19600860 -1.04938418 -0.44740410 -0.94608214  0.03595400
 [91] -0.53009640 -0.57711077  0.13060191  0.16053422 -1.16517332 -0.56049016
 [97] -0.47785020  1.47914959 -0.18497656  1.30345466
> colMin(tmp)
  [1] -0.71470446  0.70001490 -0.44626354 -1.11281309 -1.14460516 -1.35727430
  [7]  1.49470576 -0.49219706 -0.82774134 -0.72189051 -1.10330295 -1.59950617
 [13]  0.59967661  0.23168036  1.27634294  0.21807110 -0.87772261  1.62338004
 [19] -1.34829015  0.61634221 -0.77168362  0.78285652  1.23304746  0.95583103
 [25] -0.10188292  0.61876213  1.09231463 -0.56959710  2.60679932 -1.18765690
 [31]  0.22632097 -0.12116766 -0.52821244  0.37338552  0.69193561  0.16012456
 [37]  1.67119787 -0.05011250  1.54957475 -0.10250732 -0.22079978  0.59957639
 [43] -0.92718684 -1.78947784 -0.51985377 -0.51562036  0.15332336  0.35464693
 [49] -1.32938513  0.83250260 -0.69777123  2.42800497  1.21362516 -1.37883034
 [55]  2.22334479  1.04612756 -0.53327682 -0.92567558 -0.67010863  0.41815463
 [61] -1.31750362 -0.87356087 -0.36431782 -0.84089773  1.31806115  1.68464962
 [67] -0.91644710 -0.13346570 -1.41111854  0.10396208  0.52884384 -0.84412478
 [73] -3.14219827 -0.52660621 -0.59716545 -0.30772474 -0.32523454 -0.31474113
 [79]  0.53910240 -0.60799165 -0.09813716  0.10477499  1.37131547 -1.70925136
 [85] -0.46315006 -0.19600860 -1.04938418 -0.44740410 -0.94608214  0.03595400
 [91] -0.53009640 -0.57711077  0.13060191  0.16053422 -1.16517332 -0.56049016
 [97] -0.47785020  1.47914959 -0.18497656  1.30345466
> colMedians(tmp)
  [1] -0.71470446  0.70001490 -0.44626354 -1.11281309 -1.14460516 -1.35727430
  [7]  1.49470576 -0.49219706 -0.82774134 -0.72189051 -1.10330295 -1.59950617
 [13]  0.59967661  0.23168036  1.27634294  0.21807110 -0.87772261  1.62338004
 [19] -1.34829015  0.61634221 -0.77168362  0.78285652  1.23304746  0.95583103
 [25] -0.10188292  0.61876213  1.09231463 -0.56959710  2.60679932 -1.18765690
 [31]  0.22632097 -0.12116766 -0.52821244  0.37338552  0.69193561  0.16012456
 [37]  1.67119787 -0.05011250  1.54957475 -0.10250732 -0.22079978  0.59957639
 [43] -0.92718684 -1.78947784 -0.51985377 -0.51562036  0.15332336  0.35464693
 [49] -1.32938513  0.83250260 -0.69777123  2.42800497  1.21362516 -1.37883034
 [55]  2.22334479  1.04612756 -0.53327682 -0.92567558 -0.67010863  0.41815463
 [61] -1.31750362 -0.87356087 -0.36431782 -0.84089773  1.31806115  1.68464962
 [67] -0.91644710 -0.13346570 -1.41111854  0.10396208  0.52884384 -0.84412478
 [73] -3.14219827 -0.52660621 -0.59716545 -0.30772474 -0.32523454 -0.31474113
 [79]  0.53910240 -0.60799165 -0.09813716  0.10477499  1.37131547 -1.70925136
 [85] -0.46315006 -0.19600860 -1.04938418 -0.44740410 -0.94608214  0.03595400
 [91] -0.53009640 -0.57711077  0.13060191  0.16053422 -1.16517332 -0.56049016
 [97] -0.47785020  1.47914959 -0.18497656  1.30345466
> colRanges(tmp)
           [,1]      [,2]       [,3]      [,4]      [,5]      [,6]     [,7]
[1,] -0.7147045 0.7000149 -0.4462635 -1.112813 -1.144605 -1.357274 1.494706
[2,] -0.7147045 0.7000149 -0.4462635 -1.112813 -1.144605 -1.357274 1.494706
           [,8]       [,9]      [,10]     [,11]     [,12]     [,13]     [,14]
[1,] -0.4921971 -0.8277413 -0.7218905 -1.103303 -1.599506 0.5996766 0.2316804
[2,] -0.4921971 -0.8277413 -0.7218905 -1.103303 -1.599506 0.5996766 0.2316804
        [,15]     [,16]      [,17]   [,18]    [,19]     [,20]      [,21]
[1,] 1.276343 0.2180711 -0.8777226 1.62338 -1.34829 0.6163422 -0.7716836
[2,] 1.276343 0.2180711 -0.8777226 1.62338 -1.34829 0.6163422 -0.7716836
         [,22]    [,23]    [,24]      [,25]     [,26]    [,27]      [,28]
[1,] 0.7828565 1.233047 0.955831 -0.1018829 0.6187621 1.092315 -0.5695971
[2,] 0.7828565 1.233047 0.955831 -0.1018829 0.6187621 1.092315 -0.5695971
        [,29]     [,30]    [,31]      [,32]      [,33]     [,34]     [,35]
[1,] 2.606799 -1.187657 0.226321 -0.1211677 -0.5282124 0.3733855 0.6919356
[2,] 2.606799 -1.187657 0.226321 -0.1211677 -0.5282124 0.3733855 0.6919356
         [,36]    [,37]      [,38]    [,39]      [,40]      [,41]     [,42]
[1,] 0.1601246 1.671198 -0.0501125 1.549575 -0.1025073 -0.2207998 0.5995764
[2,] 0.1601246 1.671198 -0.0501125 1.549575 -0.1025073 -0.2207998 0.5995764
          [,43]     [,44]      [,45]      [,46]     [,47]     [,48]     [,49]
[1,] -0.9271868 -1.789478 -0.5198538 -0.5156204 0.1533234 0.3546469 -1.329385
[2,] -0.9271868 -1.789478 -0.5198538 -0.5156204 0.1533234 0.3546469 -1.329385
         [,50]      [,51]    [,52]    [,53]    [,54]    [,55]    [,56]
[1,] 0.8325026 -0.6977712 2.428005 1.213625 -1.37883 2.223345 1.046128
[2,] 0.8325026 -0.6977712 2.428005 1.213625 -1.37883 2.223345 1.046128
          [,57]      [,58]      [,59]     [,60]     [,61]      [,62]      [,63]
[1,] -0.5332768 -0.9256756 -0.6701086 0.4181546 -1.317504 -0.8735609 -0.3643178
[2,] -0.5332768 -0.9256756 -0.6701086 0.4181546 -1.317504 -0.8735609 -0.3643178
          [,64]    [,65]   [,66]      [,67]      [,68]     [,69]     [,70]
[1,] -0.8408977 1.318061 1.68465 -0.9164471 -0.1334657 -1.411119 0.1039621
[2,] -0.8408977 1.318061 1.68465 -0.9164471 -0.1334657 -1.411119 0.1039621
         [,71]      [,72]     [,73]      [,74]      [,75]      [,76]      [,77]
[1,] 0.5288438 -0.8441248 -3.142198 -0.5266062 -0.5971655 -0.3077247 -0.3252345
[2,] 0.5288438 -0.8441248 -3.142198 -0.5266062 -0.5971655 -0.3077247 -0.3252345
          [,78]     [,79]      [,80]       [,81]    [,82]    [,83]     [,84]
[1,] -0.3147411 0.5391024 -0.6079916 -0.09813716 0.104775 1.371315 -1.709251
[2,] -0.3147411 0.5391024 -0.6079916 -0.09813716 0.104775 1.371315 -1.709251
          [,85]      [,86]     [,87]      [,88]      [,89]    [,90]      [,91]
[1,] -0.4631501 -0.1960086 -1.049384 -0.4474041 -0.9460821 0.035954 -0.5300964
[2,] -0.4631501 -0.1960086 -1.049384 -0.4474041 -0.9460821 0.035954 -0.5300964
          [,92]     [,93]     [,94]     [,95]      [,96]      [,97]   [,98]
[1,] -0.5771108 0.1306019 0.1605342 -1.165173 -0.5604902 -0.4778502 1.47915
[2,] -0.5771108 0.1306019 0.1605342 -1.165173 -0.5604902 -0.4778502 1.47915
          [,99]   [,100]
[1,] -0.1849766 1.303455
[2,] -0.1849766 1.303455
> 
> 
> Max(tmp2)
[1] 1.780184
> Min(tmp2)
[1] -2.86367
> mean(tmp2)
[1] -0.1427147
> Sum(tmp2)
[1] -14.27147
> Var(tmp2)
[1] 0.8411097
> 
> rowMeans(tmp2)
  [1]  0.58951044 -0.37323464 -1.62930542 -0.16993301  0.67620798  0.37695676
  [7] -1.36222458 -1.19453067 -0.18255474 -0.84973479 -0.70977238 -0.63793578
 [13]  0.85482436 -0.07003026  0.38301013 -0.06019994 -0.72276486 -0.72365173
 [19] -1.22844205 -0.16024434  1.09524037 -0.44726214  0.67749026 -1.17520324
 [25] -2.67360525  1.28309223  0.51431366  0.82223499 -1.84496634 -0.11593921
 [31]  0.25148235 -1.08104429 -0.62413067 -1.56421634  0.93730169  0.76226028
 [37] -1.42815881 -1.26878978  1.32925522 -0.15693794  0.88929088 -0.60098490
 [43]  0.10954557 -1.47892470 -0.34682858  0.72064457 -1.34938048 -1.54111400
 [49] -1.20680742  0.30690923 -1.25336702 -0.49269231  0.28701985  0.72683679
 [55] -0.29286881 -0.51096425 -0.71563276  0.87951048  0.47172459 -0.91679206
 [61]  0.97482404  0.39538877  0.93261228 -2.86367025  0.01663558 -1.32067608
 [67] -0.18094276  0.33117547  0.02497147  1.02780728 -0.34558304 -0.13823644
 [73] -0.60098285  1.10259388  0.20519138  0.80317529  0.18879345  0.25261706
 [79]  0.52369556  1.62051315 -1.89421455 -0.63382390  0.25493142  0.32590690
 [85] -0.61351634 -0.26123546  0.99575346 -0.30622809  0.87902699 -0.94150398
 [91]  0.97872361 -0.08333497  0.05863446  0.23120019  0.20652888 -0.48327446
 [97] -0.12076221  1.78018415 -0.11019585  0.73233115
> rowSums(tmp2)
  [1]  0.58951044 -0.37323464 -1.62930542 -0.16993301  0.67620798  0.37695676
  [7] -1.36222458 -1.19453067 -0.18255474 -0.84973479 -0.70977238 -0.63793578
 [13]  0.85482436 -0.07003026  0.38301013 -0.06019994 -0.72276486 -0.72365173
 [19] -1.22844205 -0.16024434  1.09524037 -0.44726214  0.67749026 -1.17520324
 [25] -2.67360525  1.28309223  0.51431366  0.82223499 -1.84496634 -0.11593921
 [31]  0.25148235 -1.08104429 -0.62413067 -1.56421634  0.93730169  0.76226028
 [37] -1.42815881 -1.26878978  1.32925522 -0.15693794  0.88929088 -0.60098490
 [43]  0.10954557 -1.47892470 -0.34682858  0.72064457 -1.34938048 -1.54111400
 [49] -1.20680742  0.30690923 -1.25336702 -0.49269231  0.28701985  0.72683679
 [55] -0.29286881 -0.51096425 -0.71563276  0.87951048  0.47172459 -0.91679206
 [61]  0.97482404  0.39538877  0.93261228 -2.86367025  0.01663558 -1.32067608
 [67] -0.18094276  0.33117547  0.02497147  1.02780728 -0.34558304 -0.13823644
 [73] -0.60098285  1.10259388  0.20519138  0.80317529  0.18879345  0.25261706
 [79]  0.52369556  1.62051315 -1.89421455 -0.63382390  0.25493142  0.32590690
 [85] -0.61351634 -0.26123546  0.99575346 -0.30622809  0.87902699 -0.94150398
 [91]  0.97872361 -0.08333497  0.05863446  0.23120019  0.20652888 -0.48327446
 [97] -0.12076221  1.78018415 -0.11019585  0.73233115
> rowVars(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowSd(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowMax(tmp2)
  [1]  0.58951044 -0.37323464 -1.62930542 -0.16993301  0.67620798  0.37695676
  [7] -1.36222458 -1.19453067 -0.18255474 -0.84973479 -0.70977238 -0.63793578
 [13]  0.85482436 -0.07003026  0.38301013 -0.06019994 -0.72276486 -0.72365173
 [19] -1.22844205 -0.16024434  1.09524037 -0.44726214  0.67749026 -1.17520324
 [25] -2.67360525  1.28309223  0.51431366  0.82223499 -1.84496634 -0.11593921
 [31]  0.25148235 -1.08104429 -0.62413067 -1.56421634  0.93730169  0.76226028
 [37] -1.42815881 -1.26878978  1.32925522 -0.15693794  0.88929088 -0.60098490
 [43]  0.10954557 -1.47892470 -0.34682858  0.72064457 -1.34938048 -1.54111400
 [49] -1.20680742  0.30690923 -1.25336702 -0.49269231  0.28701985  0.72683679
 [55] -0.29286881 -0.51096425 -0.71563276  0.87951048  0.47172459 -0.91679206
 [61]  0.97482404  0.39538877  0.93261228 -2.86367025  0.01663558 -1.32067608
 [67] -0.18094276  0.33117547  0.02497147  1.02780728 -0.34558304 -0.13823644
 [73] -0.60098285  1.10259388  0.20519138  0.80317529  0.18879345  0.25261706
 [79]  0.52369556  1.62051315 -1.89421455 -0.63382390  0.25493142  0.32590690
 [85] -0.61351634 -0.26123546  0.99575346 -0.30622809  0.87902699 -0.94150398
 [91]  0.97872361 -0.08333497  0.05863446  0.23120019  0.20652888 -0.48327446
 [97] -0.12076221  1.78018415 -0.11019585  0.73233115
> rowMin(tmp2)
  [1]  0.58951044 -0.37323464 -1.62930542 -0.16993301  0.67620798  0.37695676
  [7] -1.36222458 -1.19453067 -0.18255474 -0.84973479 -0.70977238 -0.63793578
 [13]  0.85482436 -0.07003026  0.38301013 -0.06019994 -0.72276486 -0.72365173
 [19] -1.22844205 -0.16024434  1.09524037 -0.44726214  0.67749026 -1.17520324
 [25] -2.67360525  1.28309223  0.51431366  0.82223499 -1.84496634 -0.11593921
 [31]  0.25148235 -1.08104429 -0.62413067 -1.56421634  0.93730169  0.76226028
 [37] -1.42815881 -1.26878978  1.32925522 -0.15693794  0.88929088 -0.60098490
 [43]  0.10954557 -1.47892470 -0.34682858  0.72064457 -1.34938048 -1.54111400
 [49] -1.20680742  0.30690923 -1.25336702 -0.49269231  0.28701985  0.72683679
 [55] -0.29286881 -0.51096425 -0.71563276  0.87951048  0.47172459 -0.91679206
 [61]  0.97482404  0.39538877  0.93261228 -2.86367025  0.01663558 -1.32067608
 [67] -0.18094276  0.33117547  0.02497147  1.02780728 -0.34558304 -0.13823644
 [73] -0.60098285  1.10259388  0.20519138  0.80317529  0.18879345  0.25261706
 [79]  0.52369556  1.62051315 -1.89421455 -0.63382390  0.25493142  0.32590690
 [85] -0.61351634 -0.26123546  0.99575346 -0.30622809  0.87902699 -0.94150398
 [91]  0.97872361 -0.08333497  0.05863446  0.23120019  0.20652888 -0.48327446
 [97] -0.12076221  1.78018415 -0.11019585  0.73233115
> 
> colMeans(tmp2)
[1] -0.1427147
> colSums(tmp2)
[1] -14.27147
> colVars(tmp2)
[1] 0.8411097
> colSd(tmp2)
[1] 0.9171203
> colMax(tmp2)
[1] 1.780184
> colMin(tmp2)
[1] -2.86367
> colMedians(tmp2)
[1] -0.1130675
> colRanges(tmp2)
          [,1]
[1,] -2.863670
[2,]  1.780184
> 
> 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.7216773  1.1363688  3.0669378  2.9016383 -5.3267083 -0.6376581
 [7] -7.1355847 -0.5065442 -3.9794739 -5.9222380
> colApply(tmp,quantile)[,1]
            [,1]
[1,] -1.85022713
[2,] -0.81061435
[3,]  0.04122488
[4,]  0.71055583
[5,]  1.16590647
> 
> rowApply(tmp,sum)
 [1] -4.4068401 -3.1484043 -1.6286052  4.5392537  9.6438502 -8.0103696
 [7]  0.5428209 -3.9507539 -8.6234832 -2.0824082
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    7    2    8    7    6   10    2    9    7     5
 [2,]    6    8    6    2   10    9    8    5    6    10
 [3,]    9    7    4    6    9    7    4    7   10     6
 [4,]    8    9    9    8    2    2    6    6    2     9
 [5,]    2    5    3    3    1    8    9   10    9     1
 [6,]    5    6   10    5    5    1    5    3    3     7
 [7,]    3   10    2    1    4    6    1    2    4     3
 [8,]   10    3    7    4    8    3   10    4    1     8
 [9,]    4    1    1    9    7    5    3    8    8     4
[10,]    1    4    5   10    3    4    7    1    5     2
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1] -3.17630698  2.12199351 -1.34098826 -0.29433459  2.54313271  0.97719692
 [7] -0.76963923 -5.15658514  2.34716859 -1.94130261 -2.68808455  0.26544764
[13]  1.24109415 -0.44135957  0.21363225  0.06386764  1.62074317  3.18972877
[19] -1.28116938  0.04193244
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.7422527
[2,] -0.8879333
[3,] -0.8437428
[4,]  0.1167914
[5,]  0.1808304
> 
> rowApply(tmp,sum)
[1]  3.3458696 -5.7963489  2.7415224 -3.1408936  0.3860179
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   10    5    1    3   11
[2,]    9   20    3   15   18
[3,]   11    3   17    1   16
[4,]    2   14   11    7   17
[5,]   16   12   18   17   13
> 
> 
> as.matrix(tmp)
           [,1]       [,2]       [,3]       [,4]        [,5]        [,6]
[1,]  0.1808304  0.1176537  0.1974527 -1.0099311  0.94053961  1.08308398
[2,] -0.8879333  1.7461302 -1.1565572  0.3058129 -0.08588657 -0.54015601
[3,] -1.7422527 -1.0304702  0.7972577  0.2884122  0.96145469  0.71183870
[4,] -0.8437428  0.3183097 -1.7899183 -0.5692992  0.48594836  0.02131185
[5,]  0.1167914  0.9703702  0.6107768  0.6906707  0.24107661 -0.29888159
           [,7]       [,8]       [,9]      [,10]      [,11]       [,12]
[1,]  0.8156293 -0.6992269  1.1178172 -0.6452709 -0.2456775 -0.03499508
[2,]  0.3315650 -2.4052216 -0.1251231 -0.5111999 -2.4288938 -0.85513902
[3,]  0.4027725 -0.4414628  1.4799670 -0.3677378  0.2118718  0.73631357
[4,] -0.4798106 -0.1798497  0.2457016  0.2431840 -0.7570118 -0.08723274
[5,] -1.8397955 -1.4308242 -0.3711941 -0.6602779  0.5316267  0.50650091
          [,13]       [,14]       [,15]       [,16]       [,17]      [,18]
[1,] -0.2519967 -1.96101416  0.34760187  1.65757611  1.36232949  0.7888580
[2,]  0.4674071 -0.78602227 -0.06322189 -0.09417242  0.39837207  1.4160456
[3,] -0.5308223  0.08984498 -0.09878953  0.49084097  0.09361960  0.6027923
[4,]  1.4109230  0.66546992  0.46246932 -0.63967395 -0.28965256  1.0091529
[5,]  0.1455831  1.55036196 -0.43442752 -1.35070306  0.05607457 -0.6271200
           [,19]      [,20]
[1,] -0.91477316  0.4993828
[2,] -0.93273791  0.4105831
[3,]  1.17721127 -1.0911395
[4,] -0.70509477 -1.6620777
[5,]  0.09422519  1.8851838
> 
> 
> 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 :  654  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 1.48207 -1.212258 0.6664302 0.5850595 1.082707 1.297491 -1.059092
           col8       col9     col10      col11      col12      col13     col14
row1 -0.1331005 -0.8496735 -1.806747 -0.8959516 0.09297655 -0.6723235 -1.193669
          col15     col16       col17      col18    col19     col20
row1 -0.3906416 0.4688942 -0.07478797 -0.4078538 -2.22779 0.3423722
> tmp[,"col10"]
           col10
row1 -1.80674660
row2 -2.08515897
row3  0.06970212
row4  1.01194562
row5 -0.67739003
> tmp[c("row1","row5"),]
          col1       col2       col3       col4      col5     col6       col7
row1 1.4820700 -1.2122580  0.6664302  0.5850595 1.0827072 1.297491 -1.0590915
row5 0.3807811  0.4732917 -0.8216711 -0.1171487 0.5477887 1.298563  0.8381681
           col8        col9     col10       col11       col12      col13
row1 -0.1331005 -0.84967351 -1.806747 -0.89595165  0.09297655 -0.6723235
row5 -2.1160146  0.05844622 -0.677390  0.06255367 -0.98253454  1.1256519
          col14      col15     col16       col17      col18      col19
row1 -1.1936687 -0.3906416 0.4688942 -0.07478797 -0.4078538 -2.2277897
row5  0.5101198  0.3228397 1.0560973 -1.38162723 -0.3998564  0.5711117
          col20
row1  0.3423722
row5 -0.4352250
> tmp[,c("col6","col20")]
           col6      col20
row1 1.29749133  0.3423722
row2 0.01793526  1.0637263
row3 0.54752638  1.8692462
row4 0.91409592  0.5372683
row5 1.29856294 -0.4352250
> tmp[c("row1","row5"),c("col6","col20")]
         col6      col20
row1 1.297491  0.3423722
row5 1.298563 -0.4352250
> 
> 
> 
> 
> tmp["row1",] <- rnorm(20,mean=10)
> tmp[,"col10"] <- rnorm(5,mean=30)
> tmp[c("row1","row5"),] <- rnorm(40,mean=50)
> tmp[,c("col6","col20")] <- rnorm(10,mean=75)
> tmp[c("row1","row5"),c("col6","col20")]  <- rnorm(4,mean=105)
> 
> tmp["row1",]
         col1     col2     col3     col4     col5     col6    col7     col8
row1 50.62285 51.14878 50.60107 50.16133 49.48363 105.6354 49.2682 49.88029
         col9   col10    col11    col12    col13    col14    col15    col16
row1 50.03836 50.7919 49.19842 48.49073 52.33099 49.71079 49.33771 50.44021
        col17    col18    col19   col20
row1 50.60796 50.42268 49.04801 105.114
> tmp[,"col10"]
        col10
row1 50.79190
row2 29.51146
row3 29.80683
row4 28.96829
row5 49.49721
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 50.62285 51.14878 50.60107 50.16133 49.48363 105.6354 49.26820 49.88029
row5 49.86891 51.46985 50.20768 49.91732 49.72609 105.9332 50.15548 49.72172
         col9    col10    col11    col12    col13    col14    col15    col16
row1 50.03836 50.79190 49.19842 48.49073 52.33099 49.71079 49.33771 50.44021
row5 49.04695 49.49721 49.01429 49.33989 49.82849 48.72586 48.43323 49.47624
        col17    col18    col19   col20
row1 50.60796 50.42268 49.04801 105.114
row5 50.75341 50.42345 50.52711 107.612
> tmp[,c("col6","col20")]
          col6     col20
row1 105.63540 105.11402
row2  75.16742  73.81009
row3  76.49731  77.31160
row4  75.42321  75.51176
row5 105.93317 107.61203
> tmp[c("row1","row5"),c("col6","col20")]
         col6   col20
row1 105.6354 105.114
row5 105.9332 107.612
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6   col20
row1 105.6354 105.114
row5 105.9332 107.612
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
           col13
[1,]  0.07495827
[2,] -1.37418830
[3,] -1.04025889
[4,]  0.54349752
[5,]  0.35223818
> tmp[,c("col17","col7")]
         col17       col7
[1,] 1.6512731 -0.1996069
[2,] 0.3536319 -0.1801748
[3,] 1.6529969  0.5860229
[4,] 1.9428700 -1.0034291
[5,] 1.5981580  0.9959518
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6      col20
[1,]  0.3942578 -0.3695561
[2,] -0.1951262  0.2996669
[3,] -1.1872283  1.0477059
[4,]  0.1492372 -0.5778347
[5,] -2.2139131  1.9513158
> subBufferedMatrix(tmp,1,c("col6"))[,1]
          col1
[1,] 0.3942578
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,]  0.3942578
[2,] -0.1951262
> 
> 
> 
> 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.6198479 -0.1791093 -0.11693702 -1.4625620 -1.321955  1.213826  2.024562
row1  1.9001089  1.7380773  0.04522493  0.9262466  2.243568 -1.046906 -2.420646
            [,8]        [,9]     [,10]      [,11]      [,12]      [,13]
row3  0.05291239  0.73207001 0.4023319 -1.7156238 -0.2383853  1.3395922
row1 -0.22164103 -0.02321567 0.1600006 -0.5894054 -1.1076339 -0.5649042
         [,14]      [,15]      [,16]      [,17]      [,18]      [,19]
row3 0.5877333 -0.5980269 -0.3110978 -0.4137742 -1.3235438 -0.2749783
row1 0.2835414  1.1895977  0.7599833 -1.2391290  0.4242296 -1.2905022
          [,20]
row3  0.9508931
row1 -1.3655808
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
           [,1]       [,2]     [,3]     [,4]       [,5]      [,6]      [,7]
row2 -0.3279614 -0.1662032 1.094762 1.965185 0.01478922 -1.787844 0.3712717
          [,8]       [,9]      [,10]
row2 -1.584647 -0.2229894 0.00112505
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
           [,1]      [,2]       [,3]      [,4]      [,5]       [,6]       [,7]
row5 -0.4694176 0.5792198 -0.2765778 -1.459538 0.1032366 -0.9759258 -0.1185845
          [,8]      [,9]     [,10]      [,11]    [,12]      [,13]     [,14]
row5 -1.309587 -1.115515 -1.334141 -0.1955085 -1.16852 -0.5992967 0.6851573
         [,15]    [,16]      [,17]      [,18]     [,19]     [,20]
row5 0.3172675 1.677514 -0.3638809 -0.9303406 -1.118583 0.3953411
> 
> 
> 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: 0x60f5e27db200>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a12a3150c"
 [2] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a558e6974"
 [3] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a62d8921" 
 [4] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a7078bf74"
 [5] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a252555da"
 [6] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a735d172" 
 [7] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a704997c7"
 [8] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a467a72a" 
 [9] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a19ff0b43"
[10] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a24089562"
[11] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a19e18d8f"
[12] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a36bc098" 
[13] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a2c02fbb4"
[14] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a45b76fc5"
[15] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM23e98a41744ba4"
> 
> 
> ### 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: 0x60f5e4643690>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x60f5e4643690>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x60f5e4643690>
> rowMedians(tmp)
  [1] -0.7783284125  0.1749435702 -0.0859146165  0.4210599132  0.6885288808
  [6] -0.1495180364 -0.5780948815 -0.0119550606 -0.3930534927 -0.1936925028
 [11]  0.5637028953  0.3610789157 -0.0027433860  0.7100470764 -0.3335855177
 [16]  0.1014198828 -0.0196058442 -0.3220963773 -0.0111011395  0.0352097736
 [21] -0.1721962051 -0.1182442921  0.4813433077 -0.0325353310 -0.6222921596
 [26]  0.2447641827  0.0132910981 -0.4261957421 -0.2159138796 -0.0850082019
 [31]  0.3957093502  0.2425544162  0.2769742243 -0.2861034143 -0.1585998600
 [36] -0.5127619794 -0.3195325378 -0.2907810713  0.2097034677  0.0789587877
 [41] -0.1631687252  0.3107998551 -0.0003501191  0.7271407222  0.2175336232
 [46] -0.1284190506 -0.0437307618 -0.2744506251 -0.3416625647  0.2059746315
 [51] -0.1258327615  0.3101272923  0.0684534408  0.0980716817  0.2152282765
 [56]  0.2296459930 -0.0430148237  0.1636026296  0.5288214757 -0.1259161373
 [61] -0.8173424609  0.7121911292 -0.3118206279  0.0372447856  0.2949015977
 [66] -0.2933588962  0.0578292877  0.0072847127 -0.1764897239  0.3618820151
 [71]  0.2076174363 -0.0060768755  0.4971175223 -0.1031681808 -0.1244175911
 [76] -0.0417342029 -0.0987443672 -0.0856780994  0.3423512258  0.3299713879
 [81]  0.0449413914 -0.3621103083  0.2508152411 -0.0322211998  0.0220477995
 [86]  0.3078357353 -0.0086038742  0.0986931287  0.3541705690  0.0070554022
 [91]  0.2644291527 -0.2139400952  0.0170345966  0.1710294190  0.2426086371
 [96]  0.1782816590 -0.2404518428  0.3100214556 -0.1094920466 -0.3651165923
[101]  0.3423710948 -0.1810665159 -0.0348592457  0.0878804283  0.3502483585
[106] -0.3456305798 -0.0333257201 -0.1364919342 -0.0516246737  0.3247013527
[111] -0.4642450719  0.1570487729 -0.3505225953 -0.2488341324 -0.1235990699
[116]  0.2716162730  0.2599752769 -0.1879136814  0.4602654800 -0.1679540338
[121] -0.2077898195 -0.5395983609  0.6288980588 -0.5371191536  0.1103097794
[126] -0.4507518355 -0.3159178559 -0.1642837637  0.1773228065  0.3550958157
[131]  0.1173909039  0.1101596232 -0.0861344066  0.2403932428  0.4982320127
[136]  0.3486939760  0.7120079947  0.1282985104  0.2245215950  0.3296510743
[141] -0.1257027655  0.1197674362 -0.0217510766  0.3337058640  0.1229190635
[146]  0.2387270008 -0.2851065816 -0.0508363066  0.2257735898 -0.1346138549
[151]  0.1156384688 -0.0071036742 -0.2012214915 -0.1859547712 -0.3996910552
[156] -0.1562256245 -0.1887275748  0.0375325394 -0.0709719704  0.3725033127
[161]  0.0781018671  0.0596768777 -0.5839517904  0.0247667051  0.1374183360
[166]  0.3477795669 -0.5226627938 -0.0923780558  0.1362339913  0.2378659286
[171]  0.1845236436  0.0327165508 -0.4733550569 -0.3471846537 -0.0400398873
[176]  0.0944639935  0.1408531249  0.0085477859 -0.2913703066  0.0053805145
[181] -0.0862474332  0.3847606707  0.6151849804 -0.3213414384 -0.5033726655
[186] -0.1219170930 -0.2226481609 -0.1016703866 -0.0832900771 -0.0712511725
[191] -0.1207603265  0.2989064165  0.7427597476 -0.4611233618  0.0442026694
[196] -0.0284389904  0.5972454265  0.1080520264  0.1591905325 -0.0968036020
[201] -0.2572278031  0.2728735897 -0.6419672525 -0.0404087110 -0.2297805641
[206] -0.1822311405  0.6285411941  0.3274126140  0.8357008267 -0.0272698000
[211]  0.0398104212 -0.3113952160 -0.7056909836  0.2630961772 -0.1311279584
[216]  0.4429081469  0.1932908578  0.1571014058 -0.0371609655  0.0624304919
[221]  0.2724943382  0.3716708148  0.0979797607  0.0955172230  0.3166977467
[226]  0.2345633622 -0.7039121184  0.5584458010 -0.0497314022  0.3077675476
> 
> proc.time()
   user  system elapsed 
  1.287   1.491   2.766 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R version 4.6.0 alpha (2026-04-05 r89794)
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: 0x5f92d0a64ff0>
> .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: 0x5f92d0a64ff0>
> .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: 0x5f92d0a64ff0>
> .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: 0x5f92d0a64ff0>
> 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: 0x5f92d0683a60>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5f92d0683a60>
> .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: 0x5f92d0683a60>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5f92d0683a60>
> .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: 0x5f92d0683a60>
> 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: 0x5f92d03e9240>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5f92d03e9240>
> .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: 0x5f92d03e9240>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x5f92d03e9240>
> .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: 0x5f92d03e9240>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x5f92d03e9240>
> .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: 0x5f92d03e9240>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x5f92d03e9240>
> .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: 0x5f92d03e9240>
> 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: 0x5f92d142a160>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x5f92d142a160>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5f92d142a160>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5f92d142a160>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile23ebb45127f421" "BufferedMatrixFile23ebb458a7c9b" 
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile23ebb45127f421" "BufferedMatrixFile23ebb458a7c9b" 
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x5f92d169bd20>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5f92d169bd20>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x5f92d169bd20>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x5f92d169bd20>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x5f92d169bd20>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x5f92d169bd20>
> .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: 0x5f92d18cd390>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5f92d18cd390>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x5f92d18cd390>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x5f92d18cd390>
> 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: 0x5f92d2ba77c0>
> .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: 0x5f92d2ba77c0>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.264   0.050   0.300 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R version 4.6.0 alpha (2026-04-05 r89794)
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.232   0.055   0.277 

Example timings