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

This page was generated on 2025-08-21 12:03 -0400 (Thu, 21 Aug 2025).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 24.04.3 LTS)x86_644.5.1 (2025-06-13) -- "Great Square Root" 4819
lconwaymacOS 12.7.1 Montereyx86_644.5.1 (2025-06-13) -- "Great Square Root" 4597
kjohnson3macOS 13.7.7 Venturaarm644.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" 4539
taishanLinux (openEuler 24.03 LTS)aarch644.5.0 (2025-04-11) -- "How About a Twenty-Six" 4536
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 251/2318HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.73.0  (landing page)
Ben Bolstad
Snapshot Date: 2025-08-20 13:45 -0400 (Wed, 20 Aug 2025)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: devel
git_last_commit: 0147962
git_last_commit_date: 2025-04-15 09:39:39 -0400 (Tue, 15 Apr 2025)
nebbiolo2Linux (Ubuntu 24.04.3 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
lconwaymacOS 12.7.1 Monterey / x86_64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kjohnson3macOS 13.7.7 Ventura / arm64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
taishanLinux (openEuler 24.03 LTS) / aarch64  OK    OK    OK  


CHECK results for BufferedMatrix on nebbiolo2

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

raw results


Summary

Package: BufferedMatrix
Version: 1.73.0
Command: /home/biocbuild/bbs-3.22-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.22-bioc/R/site-library --timings BufferedMatrix_1.73.0.tar.gz
StartedAt: 2025-08-20 20:44:45 -0400 (Wed, 20 Aug 2025)
EndedAt: 2025-08-20 20:45:09 -0400 (Wed, 20 Aug 2025)
EllapsedTime: 24.0 seconds
RetCode: 0
Status:   OK  
CheckDir: BufferedMatrix.Rcheck
Warnings: 0

Command output

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


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

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


Installation output

BufferedMatrix.Rcheck/00install.out

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


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

Tests output

BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout


R version 4.5.1 (2025-06-13) -- "Great Square Root"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

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

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

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

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

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

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

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

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

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

[[1]]
[1] 0

> 
> proc.time()
   user  system elapsed 
  0.277   0.144   0.285 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R version 4.5.1 (2025-06-13) -- "Great Square Root"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> 
> ### this is used to control how many repetitions in something below
> ### higher values result in more checks.
> nreps <-100 ##20000
> 
> 
> ## test creation and some simple assignments and subsetting operations
> 
> ## first on single elements
> tmp <- createBufferedMatrix(1000,10)
> 
> tmp[10,5]
[1] 0
> tmp[10,5] <- 10
> tmp[10,5]
[1] 10
> tmp[10,5] <- 12.445
> tmp[10,5]
[1] 12.445
> 
> 
> 
> ## now testing accessing multiple elements
> tmp2 <- createBufferedMatrix(10,20)
> 
> 
> tmp2[3,1] <- 51.34
> tmp2[9,2] <- 9.87654
> tmp2[,1:2]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[,-(3:20)]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[3,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,] 51.34    0    0    0    0    0    0    0    0     0     0     0     0
     [,14] [,15] [,16] [,17] [,18] [,19] [,20]
[1,]     0     0     0     0     0     0     0
> tmp2[-3,]
      [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]    0 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19] [,20]
 [1,]     0     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0     0
> tmp2[2,1:3]
     [,1] [,2] [,3]
[1,]    0    0    0
> tmp2[3:9,1:3]
      [,1]    [,2] [,3]
[1,] 51.34 0.00000    0
[2,]  0.00 0.00000    0
[3,]  0.00 0.00000    0
[4,]  0.00 0.00000    0
[5,]  0.00 0.00000    0
[6,]  0.00 0.00000    0
[7,]  0.00 9.87654    0
> tmp2[-4,-4]
       [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,] 51.34 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]  0.00 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19]
 [1,]     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0
> 
> ## now testing accessing/assigning multiple elements
> tmp3 <- createBufferedMatrix(10,10)
> 
> for (i in 1:10){
+   for (j in 1:10){
+     tmp3[i,j] <- (j-1)*10 + i
+   }
+ }
> 
> tmp3[2:4,2:4]
     [,1] [,2] [,3]
[1,]   12   22   32
[2,]   13   23   33
[3,]   14   24   34
> tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]   11   21   31   11   21   31   91    1   11     1    11    21    31
 [2,]   12   22   32   12   22   32   92    2   12     2    12    22    32
 [3,]   13   23   33   13   23   33   93    3   13     3    13    23    33
 [4,]   14   24   34   14   24   34   94    4   14     4    14    24    34
 [5,]   15   25   35   15   25   35   95    5   15     5    15    25    35
 [6,]   16   26   36   16   26   36   96    6   16     6    16    26    36
 [7,]   17   27   37   17   27   37   97    7   17     7    17    27    37
 [8,]   18   28   38   18   28   38   98    8   18     8    18    28    38
 [9,]   19   29   39   19   29   39   99    9   19     9    19    29    39
      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
 [1,]    41    51    61    71    81    91    91    81    71    61    51    41
 [2,]    42    52    62    72    82    92    92    82    72    62    52    42
 [3,]    43    53    63    73    83    93    93    83    73    63    53    43
 [4,]    44    54    64    74    84    94    94    84    74    64    54    44
 [5,]    45    55    65    75    85    95    95    85    75    65    55    45
 [6,]    46    56    66    76    86    96    96    86    76    66    56    46
 [7,]    47    57    67    77    87    97    97    87    77    67    57    47
 [8,]    48    58    68    78    88    98    98    88    78    68    58    48
 [9,]    49    59    69    79    89    99    99    89    79    69    59    49
      [,26] [,27] [,28] [,29]
 [1,]    31    21    11     1
 [2,]    32    22    12     2
 [3,]    33    23    13     3
 [4,]    34    24    14     4
 [5,]    35    25    15     5
 [6,]    36    26    16     6
 [7,]    37    27    17     7
 [8,]    38    28    18     8
 [9,]    39    29    19     9
> tmp3[-c(1:5),-c(6:10)]
     [,1] [,2] [,3] [,4] [,5]
[1,]    6   16   26   36   46
[2,]    7   17   27   37   47
[3,]    8   18   28   38   48
[4,]    9   19   29   39   49
[5,]   10   20   30   40   50
> 
> ## assignment of whole columns
> tmp3[,1] <- c(1:10*100.0)
> tmp3[,1:2] <- tmp3[,1:2]*100
> tmp3[,1:2] <- tmp3[,2:1]
> tmp3[,1:2]
      [,1]  [,2]
 [1,] 1100 1e+04
 [2,] 1200 2e+04
 [3,] 1300 3e+04
 [4,] 1400 4e+04
 [5,] 1500 5e+04
 [6,] 1600 6e+04
 [7,] 1700 7e+04
 [8,] 1800 8e+04
 [9,] 1900 9e+04
[10,] 2000 1e+05
> 
> 
> tmp3[,-1] <- tmp3[,1:9]
> tmp3[,1:10]
      [,1] [,2]  [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,] 1100 1100 1e+04   21   31   41   51   61   71    81
 [2,] 1200 1200 2e+04   22   32   42   52   62   72    82
 [3,] 1300 1300 3e+04   23   33   43   53   63   73    83
 [4,] 1400 1400 4e+04   24   34   44   54   64   74    84
 [5,] 1500 1500 5e+04   25   35   45   55   65   75    85
 [6,] 1600 1600 6e+04   26   36   46   56   66   76    86
 [7,] 1700 1700 7e+04   27   37   47   57   67   77    87
 [8,] 1800 1800 8e+04   28   38   48   58   68   78    88
 [9,] 1900 1900 9e+04   29   39   49   59   69   79    89
[10,] 2000 2000 1e+05   30   40   50   60   70   80    90
> 
> tmp3[,1:2] <- rep(1,10)
> tmp3[,1:2] <- rep(1,20)
> tmp3[,1:2] <- matrix(c(1:5),1,5)
> 
> tmp3[,-c(1:8)] <- matrix(c(1:5),1,5)
> 
> tmp3[1,] <- 1:10
> tmp3[1,]
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    1    2    3    4    5    6    7    8    9    10
> tmp3[-1,] <- c(1,2)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    2    1    2    1    2    1    2    1    2     1
[10,]    1    2    1    2    1    2    1    2    1     2
> tmp3[-c(1:8),] <- matrix(c(1:5),1,5)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    1    3    5    2    4    1    3    5    2     4
[10,]    2    4    1    3    5    2    4    1    3     5
> 
> 
> tmp3[1:2,1:2] <- 5555.04
> tmp3[-(1:2),1:2] <- 1234.56789
> 
> 
> 
> ## testing accessors for the directory and prefix
> directory(tmp3)
[1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests"
> prefix(tmp3)
[1] "BM"
> 
> ## testing if we can remove these objects
> rm(tmp, tmp2, tmp3)
> gc()
         used (Mb) gc trigger (Mb) max used (Mb)
Ncells 478417 25.6    1047105   56   639600 34.2
Vcells 885231  6.8    8388608   64  2081598 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] "Wed Aug 20 20:45:00 2025"
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> date()
[1] "Wed Aug 20 20:45:00 2025"
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> 
> 
> RowMode(tmp2)
<pointer: 0x5687ea986c20>
> 
> 
> 
> 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] "Wed Aug 20 20:45:00 2025"
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> date()
[1] "Wed Aug 20 20:45:00 2025"
> 
> ColMode(tmp2)
<pointer: 0x5687ea986c20>
> 
> 
> 
> ### 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,] 98.8917100  1.1229147 -0.0473928  0.6615786
[2,]  1.7801727  1.1476277 -0.5162766  0.6083335
[3,]  0.9402579 -0.1355675 -0.8059412  0.2250971
[4,] -0.2336726  0.8297869 -0.5180689 -1.1797234
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
           [,1]      [,2]      [,3]      [,4]
[1,] 98.8917100 1.1229147 0.0473928 0.6615786
[2,]  1.7801727 1.1476277 0.5162766 0.6083335
[3,]  0.9402579 0.1355675 0.8059412 0.2250971
[4,]  0.2336726 0.8297869 0.5180689 1.1797234
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
         [,1]      [,2]      [,3]      [,4]
[1,] 9.944431 1.0596767 0.2176989 0.8133748
[2,] 1.334231 1.0712739 0.7185239 0.7799574
[3,] 0.969669 0.3681949 0.8977423 0.4744440
[4,] 0.483397 0.9109264 0.7197701 1.0861507
> 
> my.function <- function(x,power){
+   (x+5)^power
+ }
> 
> ewApply(tmp5,my.function,power=2)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 223.33602 36.71968 27.22438 33.79533
[2,]  40.12248 36.86037 32.70152 33.40791
[3,]  35.63695 28.81752 34.78336 29.96954
[4,]  30.06764 34.93905 32.71577 37.04123
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x5687ea7fb140>
> exp(tmp5)
<pointer: 0x5687ea7fb140>
> log(tmp5,2)
<pointer: 0x5687ea7fb140>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 464.8447
> Min(tmp5)
[1] 54.50696
> mean(tmp5)
[1] 73.56654
> Sum(tmp5)
[1] 14713.31
> Var(tmp5)
[1] 842.4164
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 92.91554 70.73914 69.94033 71.98394 70.70707 68.59803 70.16493 74.54828
 [9] 71.91980 74.14840
> rowSums(tmp5)
 [1] 1858.311 1414.783 1398.807 1439.679 1414.141 1371.961 1403.299 1490.966
 [9] 1438.396 1482.968
> rowVars(tmp5)
 [1] 7729.52606   74.13267   50.83982   52.85655   46.01618  103.23408
 [7]   70.43827   59.09310   76.14059   90.94720
> rowSd(tmp5)
 [1] 87.917723  8.610033  7.130205  7.270251  6.783523 10.160417  8.392751
 [8]  7.687204  8.725857  9.536624
> rowMax(tmp5)
 [1] 464.84467  84.83432  82.67798  84.01572  83.31170  91.16741  89.21851
 [8]  89.46211  89.18269  97.87163
> rowMin(tmp5)
 [1] 56.66398 56.19339 59.97988 60.06019 55.46154 54.50696 55.93560 57.86274
 [9] 55.97430 56.73499
> 
> colMeans(tmp5)
 [1] 110.77433  71.54822  69.29168  74.39549  72.68308  72.80000  71.03391
 [8]  67.84249  71.08579  70.26169  68.42197  70.74534  74.73082  71.76397
[15]  69.02089  70.22762  73.71809  73.40591  77.19349  70.38610
> colSums(tmp5)
 [1] 1107.7433  715.4822  692.9168  743.9549  726.8308  728.0000  710.3391
 [8]  678.4249  710.8579  702.6169  684.2197  707.4534  747.3082  717.6397
[15]  690.2089  702.2762  737.1809  734.0591  771.9349  703.8610
> colVars(tmp5)
 [1] 15536.63470    73.58008    65.10567    79.39012    52.91972    55.15304
 [7]    73.66185    32.04295   193.06846    90.83326    50.99261    63.99573
[13]    18.65806   107.39452    38.91342    69.88906    47.51156   126.86974
[19]    43.41543    74.24484
> colSd(tmp5)
 [1] 124.646038   8.577883   8.068809   8.910113   7.274594   7.426509
 [7]   8.582648   5.660649  13.894908   9.530648   7.140911   7.999733
[13]   4.319498  10.363133   6.238063   8.359967   6.892863  11.263647
[19]   6.589038   8.616544
> colMax(tmp5)
 [1] 464.84467  80.96509  79.82065  87.12762  80.88288  83.72920  82.78455
 [8]  79.72901  97.87163  83.31170  80.74053  80.33081  82.54693  83.42513
[15]  78.38700  84.83432  81.83857  89.46211  91.16741  84.01572
> colMin(tmp5)
 [1] 56.16202 54.50696 54.68189 60.03847 61.02392 59.30608 55.93560 60.16131
 [9] 56.19339 56.73499 56.88460 55.97430 69.96635 55.46154 59.25363 57.86274
[17] 63.31435 62.13307 69.16167 59.43337
> 
> 
> ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default)
> 
> 
> which.row <- sample(1:10,1,replace=TRUE)
> which.col  <- sample(1:20,1,replace=TRUE)
> 
> tmp5[which.row,which.col] <- NA
> 
> Max(tmp5)
[1] NA
> Min(tmp5)
[1] NA
> mean(tmp5)
[1] NA
> Sum(tmp5)
[1] NA
> Var(tmp5)
[1] NA
> 
> rowMeans(tmp5)
 [1] 92.91554 70.73914 69.94033 71.98394 70.70707 68.59803 70.16493 74.54828
 [9]       NA 74.14840
> rowSums(tmp5)
 [1] 1858.311 1414.783 1398.807 1439.679 1414.141 1371.961 1403.299 1490.966
 [9]       NA 1482.968
> rowVars(tmp5)
 [1] 7729.52606   74.13267   50.83982   52.85655   46.01618  103.23408
 [7]   70.43827   59.09310   76.80431   90.94720
> rowSd(tmp5)
 [1] 87.917723  8.610033  7.130205  7.270251  6.783523 10.160417  8.392751
 [8]  7.687204  8.763807  9.536624
> rowMax(tmp5)
 [1] 464.84467  84.83432  82.67798  84.01572  83.31170  91.16741  89.21851
 [8]  89.46211        NA  97.87163
> rowMin(tmp5)
 [1] 56.66398 56.19339 59.97988 60.06019 55.46154 54.50696 55.93560 57.86274
 [9]       NA 56.73499
> 
> colMeans(tmp5)
 [1] 110.77433  71.54822  69.29168  74.39549  72.68308  72.80000  71.03391
 [8]        NA  71.08579  70.26169  68.42197  70.74534  74.73082  71.76397
[15]  69.02089  70.22762  73.71809  73.40591  77.19349  70.38610
> colSums(tmp5)
 [1] 1107.7433  715.4822  692.9168  743.9549  726.8308  728.0000  710.3391
 [8]        NA  710.8579  702.6169  684.2197  707.4534  747.3082  717.6397
[15]  690.2089  702.2762  737.1809  734.0591  771.9349  703.8610
> colVars(tmp5)
 [1] 15536.63470    73.58008    65.10567    79.39012    52.91972    55.15304
 [7]    73.66185          NA   193.06846    90.83326    50.99261    63.99573
[13]    18.65806   107.39452    38.91342    69.88906    47.51156   126.86974
[19]    43.41543    74.24484
> colSd(tmp5)
 [1] 124.646038   8.577883   8.068809   8.910113   7.274594   7.426509
 [7]   8.582648         NA  13.894908   9.530648   7.140911   7.999733
[13]   4.319498  10.363133   6.238063   8.359967   6.892863  11.263647
[19]   6.589038   8.616544
> colMax(tmp5)
 [1] 464.84467  80.96509  79.82065  87.12762  80.88288  83.72920  82.78455
 [8]        NA  97.87163  83.31170  80.74053  80.33081  82.54693  83.42513
[15]  78.38700  84.83432  81.83857  89.46211  91.16741  84.01572
> colMin(tmp5)
 [1] 56.16202 54.50696 54.68189 60.03847 61.02392 59.30608 55.93560       NA
 [9] 56.19339 56.73499 56.88460 55.97430 69.96635 55.46154 59.25363 57.86274
[17] 63.31435 62.13307 69.16167 59.43337
> 
> Max(tmp5,na.rm=TRUE)
[1] 464.8447
> Min(tmp5,na.rm=TRUE)
[1] 54.50696
> mean(tmp5,na.rm=TRUE)
[1] 73.53558
> Sum(tmp5,na.rm=TRUE)
[1] 14633.58
> Var(tmp5,na.rm=TRUE)
[1] 846.4783
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 92.91554 70.73914 69.94033 71.98394 70.70707 68.59803 70.16493 74.54828
 [9] 71.50878 74.14840
> rowSums(tmp5,na.rm=TRUE)
 [1] 1858.311 1414.783 1398.807 1439.679 1414.141 1371.961 1403.299 1490.966
 [9] 1358.667 1482.968
> rowVars(tmp5,na.rm=TRUE)
 [1] 7729.52606   74.13267   50.83982   52.85655   46.01618  103.23408
 [7]   70.43827   59.09310   76.80431   90.94720
> rowSd(tmp5,na.rm=TRUE)
 [1] 87.917723  8.610033  7.130205  7.270251  6.783523 10.160417  8.392751
 [8]  7.687204  8.763807  9.536624
> rowMax(tmp5,na.rm=TRUE)
 [1] 464.84467  84.83432  82.67798  84.01572  83.31170  91.16741  89.21851
 [8]  89.46211  89.18269  97.87163
> rowMin(tmp5,na.rm=TRUE)
 [1] 56.66398 56.19339 59.97988 60.06019 55.46154 54.50696 55.93560 57.86274
 [9] 55.97430 56.73499
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 110.77433  71.54822  69.29168  74.39549  72.68308  72.80000  71.03391
 [8]  66.52177  71.08579  70.26169  68.42197  70.74534  74.73082  71.76397
[15]  69.02089  70.22762  73.71809  73.40591  77.19349  70.38610
> colSums(tmp5,na.rm=TRUE)
 [1] 1107.7433  715.4822  692.9168  743.9549  726.8308  728.0000  710.3391
 [8]  598.6959  710.8579  702.6169  684.2197  707.4534  747.3082  717.6397
[15]  690.2089  702.2762  737.1809  734.0591  771.9349  703.8610
> colVars(tmp5,na.rm=TRUE)
 [1] 15536.63470    73.58008    65.10567    79.39012    52.91972    55.15304
 [7]    73.66185    16.42478   193.06846    90.83326    50.99261    63.99573
[13]    18.65806   107.39452    38.91342    69.88906    47.51156   126.86974
[19]    43.41543    74.24484
> colSd(tmp5,na.rm=TRUE)
 [1] 124.646038   8.577883   8.068809   8.910113   7.274594   7.426509
 [7]   8.582648   4.052750  13.894908   9.530648   7.140911   7.999733
[13]   4.319498  10.363133   6.238063   8.359967   6.892863  11.263647
[19]   6.589038   8.616544
> colMax(tmp5,na.rm=TRUE)
 [1] 464.84467  80.96509  79.82065  87.12762  80.88288  83.72920  82.78455
 [8]  72.65138  97.87163  83.31170  80.74053  80.33081  82.54693  83.42513
[15]  78.38700  84.83432  81.83857  89.46211  91.16741  84.01572
> colMin(tmp5,na.rm=TRUE)
 [1] 56.16202 54.50696 54.68189 60.03847 61.02392 59.30608 55.93560 60.16131
 [9] 56.19339 56.73499 56.88460 55.97430 69.96635 55.46154 59.25363 57.86274
[17] 63.31435 62.13307 69.16167 59.43337
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 92.91554 70.73914 69.94033 71.98394 70.70707 68.59803 70.16493 74.54828
 [9]      NaN 74.14840
> rowSums(tmp5,na.rm=TRUE)
 [1] 1858.311 1414.783 1398.807 1439.679 1414.141 1371.961 1403.299 1490.966
 [9]    0.000 1482.968
> rowVars(tmp5,na.rm=TRUE)
 [1] 7729.52606   74.13267   50.83982   52.85655   46.01618  103.23408
 [7]   70.43827   59.09310         NA   90.94720
> rowSd(tmp5,na.rm=TRUE)
 [1] 87.917723  8.610033  7.130205  7.270251  6.783523 10.160417  8.392751
 [8]  7.687204        NA  9.536624
> rowMax(tmp5,na.rm=TRUE)
 [1] 464.84467  84.83432  82.67798  84.01572  83.31170  91.16741  89.21851
 [8]  89.46211        NA  97.87163
> rowMin(tmp5,na.rm=TRUE)
 [1] 56.66398 56.19339 59.97988 60.06019 55.46154 54.50696 55.93560 57.86274
 [9]       NA 56.73499
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 115.24948  71.33771  69.07181  73.14015  73.89776  72.68353  70.73669
 [8]       NaN  70.66003  71.31768  69.04506  72.38656  74.99914  73.10575
[15]  69.01763  70.38438  72.81582  71.65294  77.40674  69.55971
> colSums(tmp5,na.rm=TRUE)
 [1] 1037.2453  642.0394  621.6463  658.2613  665.0798  654.1518  636.6302
 [8]    0.0000  635.9403  641.8592  621.4055  651.4791  674.9922  657.9518
[15]  621.1587  633.4594  655.3424  644.8764  696.6607  626.0374
> colVars(tmp5,na.rm=TRUE)
 [1] 17253.41066    82.27904    72.70003    71.58515    42.93609    61.89457
 [7]    81.87574          NA   215.16273    89.64241    52.99902    41.69192
[13]    20.18039   100.56448    43.77748    78.34873    44.29188   108.15807
[19]    48.33075    75.84269
> colSd(tmp5,na.rm=TRUE)
 [1] 131.352239   9.070780   8.526431   8.460801   6.552563   7.867310
 [7]   9.048521         NA  14.668426   9.467968   7.280043   6.456928
[13]   4.492258  10.028184   6.616455   8.851482   6.655215  10.399907
[19]   6.952032   8.708771
> colMax(tmp5,na.rm=TRUE)
 [1] 464.84467  80.96509  79.82065  87.12762  80.88288  83.72920  82.78455
 [8]      -Inf  97.87163  83.31170  80.74053  80.33081  82.54693  83.42513
[15]  78.38700  84.83432  81.75864  89.46211  91.16741  84.01572
> colMin(tmp5,na.rm=TRUE)
 [1] 56.16202 54.50696 54.68189 60.03847 61.02392 59.30608 55.93560      Inf
 [9] 56.19339 56.73499 56.88460 61.00120 69.96635 55.46154 59.25363 57.86274
[17] 63.31435 62.13307 69.16167 59.43337
> 
> 
> 
> 
> 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] 225.1930 241.2474 174.6686 179.3102 243.4641 203.8344 142.1739 183.0842
 [9] 364.6568 264.7850
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 225.1930 241.2474 174.6686 179.3102 243.4641 203.8344 142.1739 183.0842
 [9] 364.6568 264.7850
> 
> 
> 
> 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] -8.526513e-14  2.842171e-14  0.000000e+00  8.526513e-14 -2.842171e-13
 [6]  3.979039e-13  0.000000e+00  8.526513e-14  1.136868e-13 -5.684342e-14
[11] -8.526513e-14  2.842171e-14  0.000000e+00 -1.421085e-14 -2.842171e-14
[16]  5.684342e-14  1.421085e-14  2.842171e-14 -8.526513e-14 -5.684342e-14
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## making sure these things agree
> ##
> ## first when there is no NA
> 
> 
> 
> agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){
+ 
+   if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Max")
+   }
+   
+ 
+   if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Min")
+   }
+ 
+ 
+   if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){
+ 
+     cat(Sum(buff.matrix,na.rm=TRUE),"\n")
+     cat(sum(r.matrix,na.rm=TRUE),"\n")
+     cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n")
+     
+     stop("No agreement in Sum")
+   }
+   
+   if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){
+     stop("No agreement in mean")
+   }
+   
+   
+   if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){
+     stop("No agreement in Var")
+   }
+   
+   
+ 
+   if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowMeans")
+   }
+   
+   
+   if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colMeans")
+   }
+   
+   
+   if(any(abs(rowSums(buff.matrix,na.rm=TRUE)  -  apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in rowSums")
+   }
+   
+   
+   if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colSums")
+   }
+   
+   ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when 
+   ### computing variance
+   my.Var <- function(x,na.rm=FALSE){
+    if (all(is.na(x))){
+      return(NA)
+    } else {
+      var(x,na.rm=na.rm)
+    }
+ 
+   }
+   
+   if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+   
+   
+   if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+ 
+ 
+   if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+ 
+   if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+   
+   
+   if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+   
+ 
+   if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+ 
+   if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMedian")
+   }
+ 
+   if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colRanges")
+   }
+ 
+ 
+   
+ }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> for (rep in 1:20){
+   copymatrix <- matrix(rnorm(200,150,15),10,20)
+   
+   tmp5[1:10,1:20] <- copymatrix
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ## now lets assign some NA values and check agreement
+ 
+   which.row <- sample(1:10,1,replace=TRUE)
+   which.col  <- sample(1:20,1,replace=TRUE)
+   
+   cat(which.row," ",which.col,"\n")
+   
+   tmp5[which.row,which.col] <- NA
+   copymatrix[which.row,which.col] <- NA
+   
+   agree.checks(tmp5,copymatrix)
+ 
+   ## make an entire row NA
+   tmp5[which.row,] <- NA
+   copymatrix[which.row,] <- NA
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ### also make an entire col NA
+   tmp5[,which.col] <- NA
+   copymatrix[,which.col] <- NA
+ 
+   agree.checks(tmp5,copymatrix)
+ 
+   ### now make 1 element non NA with NA in the rest of row and column
+ 
+   tmp5[which.row,which.col] <- rnorm(1,150,15)
+   copymatrix[which.row,which.col] <- tmp5[which.row,which.col]
+ 
+   agree.checks(tmp5,copymatrix)
+ }
4   7 
8   15 
9   2 
7   3 
3   7 
7   19 
7   6 
5   16 
2   10 
7   20 
5   8 
7   15 
10   15 
10   9 
3   16 
3   6 
3   3 
2   18 
10   3 
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.376646
> Min(tmp)
[1] -2.443367
> mean(tmp)
[1] 0.06908425
> Sum(tmp)
[1] 6.908425
> Var(tmp)
[1] 0.7428876
> 
> rowMeans(tmp)
[1] 0.06908425
> rowSums(tmp)
[1] 6.908425
> rowVars(tmp)
[1] 0.7428876
> rowSd(tmp)
[1] 0.8619093
> rowMax(tmp)
[1] 2.376646
> rowMin(tmp)
[1] -2.443367
> 
> colMeans(tmp)
  [1]  0.250705354 -0.175937513  2.376645673 -0.115719909  0.517667500
  [6] -0.561917166 -0.278666582 -0.939369950 -0.433596706  0.434113419
 [11] -0.930994047  0.004558733  1.308752340 -0.428442679 -1.300625589
 [16] -1.589148121 -0.297761688 -0.040962888  0.765015911 -0.056522682
 [21]  1.461051571 -0.990929727 -0.591111589  0.476028354  1.455280207
 [26] -0.805430038  0.441393844  0.386158366 -0.458302168 -0.599819090
 [31] -0.428613466  0.821836677  0.746054755 -0.730468123 -0.247850027
 [36]  0.913545301  0.856132694 -0.547003659  0.903876706  0.732684270
 [41]  1.128716700 -2.443366843 -1.628133799 -0.607527682  0.718387400
 [46]  1.660036039 -0.450368257 -0.687271002 -0.146463802  0.797864800
 [51] -0.515291788  0.718682096  0.306104211 -0.072678220 -1.608980104
 [56]  0.698215568 -0.120050461  0.188907672 -0.468382227 -0.387561795
 [61] -0.429655215  0.611461556  0.530510352  1.087912522 -0.439944779
 [66]  0.320015561  0.622359928 -0.138849581  1.262658679 -0.868456640
 [71] -0.422100153 -1.320329968  0.243155170  0.554099213  0.003382200
 [76]  0.016510981 -0.571606756 -0.585257030 -1.630712518  0.285135032
 [81]  1.015657361  1.619762940 -0.129154165  0.784232122  0.665269622
 [86]  1.329000023 -0.110711942  1.495615990 -0.194588856  0.416314601
 [91]  1.291151358 -0.435950772 -1.241943470  0.156321915  0.106370772
 [96] -1.220510102  0.483819158  1.018018267  0.609569785  0.736745225
> colSums(tmp)
  [1]  0.250705354 -0.175937513  2.376645673 -0.115719909  0.517667500
  [6] -0.561917166 -0.278666582 -0.939369950 -0.433596706  0.434113419
 [11] -0.930994047  0.004558733  1.308752340 -0.428442679 -1.300625589
 [16] -1.589148121 -0.297761688 -0.040962888  0.765015911 -0.056522682
 [21]  1.461051571 -0.990929727 -0.591111589  0.476028354  1.455280207
 [26] -0.805430038  0.441393844  0.386158366 -0.458302168 -0.599819090
 [31] -0.428613466  0.821836677  0.746054755 -0.730468123 -0.247850027
 [36]  0.913545301  0.856132694 -0.547003659  0.903876706  0.732684270
 [41]  1.128716700 -2.443366843 -1.628133799 -0.607527682  0.718387400
 [46]  1.660036039 -0.450368257 -0.687271002 -0.146463802  0.797864800
 [51] -0.515291788  0.718682096  0.306104211 -0.072678220 -1.608980104
 [56]  0.698215568 -0.120050461  0.188907672 -0.468382227 -0.387561795
 [61] -0.429655215  0.611461556  0.530510352  1.087912522 -0.439944779
 [66]  0.320015561  0.622359928 -0.138849581  1.262658679 -0.868456640
 [71] -0.422100153 -1.320329968  0.243155170  0.554099213  0.003382200
 [76]  0.016510981 -0.571606756 -0.585257030 -1.630712518  0.285135032
 [81]  1.015657361  1.619762940 -0.129154165  0.784232122  0.665269622
 [86]  1.329000023 -0.110711942  1.495615990 -0.194588856  0.416314601
 [91]  1.291151358 -0.435950772 -1.241943470  0.156321915  0.106370772
 [96] -1.220510102  0.483819158  1.018018267  0.609569785  0.736745225
> 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.250705354 -0.175937513  2.376645673 -0.115719909  0.517667500
  [6] -0.561917166 -0.278666582 -0.939369950 -0.433596706  0.434113419
 [11] -0.930994047  0.004558733  1.308752340 -0.428442679 -1.300625589
 [16] -1.589148121 -0.297761688 -0.040962888  0.765015911 -0.056522682
 [21]  1.461051571 -0.990929727 -0.591111589  0.476028354  1.455280207
 [26] -0.805430038  0.441393844  0.386158366 -0.458302168 -0.599819090
 [31] -0.428613466  0.821836677  0.746054755 -0.730468123 -0.247850027
 [36]  0.913545301  0.856132694 -0.547003659  0.903876706  0.732684270
 [41]  1.128716700 -2.443366843 -1.628133799 -0.607527682  0.718387400
 [46]  1.660036039 -0.450368257 -0.687271002 -0.146463802  0.797864800
 [51] -0.515291788  0.718682096  0.306104211 -0.072678220 -1.608980104
 [56]  0.698215568 -0.120050461  0.188907672 -0.468382227 -0.387561795
 [61] -0.429655215  0.611461556  0.530510352  1.087912522 -0.439944779
 [66]  0.320015561  0.622359928 -0.138849581  1.262658679 -0.868456640
 [71] -0.422100153 -1.320329968  0.243155170  0.554099213  0.003382200
 [76]  0.016510981 -0.571606756 -0.585257030 -1.630712518  0.285135032
 [81]  1.015657361  1.619762940 -0.129154165  0.784232122  0.665269622
 [86]  1.329000023 -0.110711942  1.495615990 -0.194588856  0.416314601
 [91]  1.291151358 -0.435950772 -1.241943470  0.156321915  0.106370772
 [96] -1.220510102  0.483819158  1.018018267  0.609569785  0.736745225
> colMin(tmp)
  [1]  0.250705354 -0.175937513  2.376645673 -0.115719909  0.517667500
  [6] -0.561917166 -0.278666582 -0.939369950 -0.433596706  0.434113419
 [11] -0.930994047  0.004558733  1.308752340 -0.428442679 -1.300625589
 [16] -1.589148121 -0.297761688 -0.040962888  0.765015911 -0.056522682
 [21]  1.461051571 -0.990929727 -0.591111589  0.476028354  1.455280207
 [26] -0.805430038  0.441393844  0.386158366 -0.458302168 -0.599819090
 [31] -0.428613466  0.821836677  0.746054755 -0.730468123 -0.247850027
 [36]  0.913545301  0.856132694 -0.547003659  0.903876706  0.732684270
 [41]  1.128716700 -2.443366843 -1.628133799 -0.607527682  0.718387400
 [46]  1.660036039 -0.450368257 -0.687271002 -0.146463802  0.797864800
 [51] -0.515291788  0.718682096  0.306104211 -0.072678220 -1.608980104
 [56]  0.698215568 -0.120050461  0.188907672 -0.468382227 -0.387561795
 [61] -0.429655215  0.611461556  0.530510352  1.087912522 -0.439944779
 [66]  0.320015561  0.622359928 -0.138849581  1.262658679 -0.868456640
 [71] -0.422100153 -1.320329968  0.243155170  0.554099213  0.003382200
 [76]  0.016510981 -0.571606756 -0.585257030 -1.630712518  0.285135032
 [81]  1.015657361  1.619762940 -0.129154165  0.784232122  0.665269622
 [86]  1.329000023 -0.110711942  1.495615990 -0.194588856  0.416314601
 [91]  1.291151358 -0.435950772 -1.241943470  0.156321915  0.106370772
 [96] -1.220510102  0.483819158  1.018018267  0.609569785  0.736745225
> colMedians(tmp)
  [1]  0.250705354 -0.175937513  2.376645673 -0.115719909  0.517667500
  [6] -0.561917166 -0.278666582 -0.939369950 -0.433596706  0.434113419
 [11] -0.930994047  0.004558733  1.308752340 -0.428442679 -1.300625589
 [16] -1.589148121 -0.297761688 -0.040962888  0.765015911 -0.056522682
 [21]  1.461051571 -0.990929727 -0.591111589  0.476028354  1.455280207
 [26] -0.805430038  0.441393844  0.386158366 -0.458302168 -0.599819090
 [31] -0.428613466  0.821836677  0.746054755 -0.730468123 -0.247850027
 [36]  0.913545301  0.856132694 -0.547003659  0.903876706  0.732684270
 [41]  1.128716700 -2.443366843 -1.628133799 -0.607527682  0.718387400
 [46]  1.660036039 -0.450368257 -0.687271002 -0.146463802  0.797864800
 [51] -0.515291788  0.718682096  0.306104211 -0.072678220 -1.608980104
 [56]  0.698215568 -0.120050461  0.188907672 -0.468382227 -0.387561795
 [61] -0.429655215  0.611461556  0.530510352  1.087912522 -0.439944779
 [66]  0.320015561  0.622359928 -0.138849581  1.262658679 -0.868456640
 [71] -0.422100153 -1.320329968  0.243155170  0.554099213  0.003382200
 [76]  0.016510981 -0.571606756 -0.585257030 -1.630712518  0.285135032
 [81]  1.015657361  1.619762940 -0.129154165  0.784232122  0.665269622
 [86]  1.329000023 -0.110711942  1.495615990 -0.194588856  0.416314601
 [91]  1.291151358 -0.435950772 -1.241943470  0.156321915  0.106370772
 [96] -1.220510102  0.483819158  1.018018267  0.609569785  0.736745225
> colRanges(tmp)
          [,1]       [,2]     [,3]       [,4]      [,5]       [,6]       [,7]
[1,] 0.2507054 -0.1759375 2.376646 -0.1157199 0.5176675 -0.5619172 -0.2786666
[2,] 0.2507054 -0.1759375 2.376646 -0.1157199 0.5176675 -0.5619172 -0.2786666
         [,8]       [,9]     [,10]     [,11]       [,12]    [,13]      [,14]
[1,] -0.93937 -0.4335967 0.4341134 -0.930994 0.004558733 1.308752 -0.4284427
[2,] -0.93937 -0.4335967 0.4341134 -0.930994 0.004558733 1.308752 -0.4284427
         [,15]     [,16]      [,17]       [,18]     [,19]       [,20]    [,21]
[1,] -1.300626 -1.589148 -0.2977617 -0.04096289 0.7650159 -0.05652268 1.461052
[2,] -1.300626 -1.589148 -0.2977617 -0.04096289 0.7650159 -0.05652268 1.461052
          [,22]      [,23]     [,24]   [,25]    [,26]     [,27]     [,28]
[1,] -0.9909297 -0.5911116 0.4760284 1.45528 -0.80543 0.4413938 0.3861584
[2,] -0.9909297 -0.5911116 0.4760284 1.45528 -0.80543 0.4413938 0.3861584
          [,29]      [,30]      [,31]     [,32]     [,33]      [,34]    [,35]
[1,] -0.4583022 -0.5998191 -0.4286135 0.8218367 0.7460548 -0.7304681 -0.24785
[2,] -0.4583022 -0.5998191 -0.4286135 0.8218367 0.7460548 -0.7304681 -0.24785
         [,36]     [,37]      [,38]     [,39]     [,40]    [,41]     [,42]
[1,] 0.9135453 0.8561327 -0.5470037 0.9038767 0.7326843 1.128717 -2.443367
[2,] 0.9135453 0.8561327 -0.5470037 0.9038767 0.7326843 1.128717 -2.443367
         [,43]      [,44]     [,45]    [,46]      [,47]     [,48]      [,49]
[1,] -1.628134 -0.6075277 0.7183874 1.660036 -0.4503683 -0.687271 -0.1464638
[2,] -1.628134 -0.6075277 0.7183874 1.660036 -0.4503683 -0.687271 -0.1464638
         [,50]      [,51]     [,52]     [,53]       [,54]    [,55]     [,56]
[1,] 0.7978648 -0.5152918 0.7186821 0.3061042 -0.07267822 -1.60898 0.6982156
[2,] 0.7978648 -0.5152918 0.7186821 0.3061042 -0.07267822 -1.60898 0.6982156
          [,57]     [,58]      [,59]      [,60]      [,61]     [,62]     [,63]
[1,] -0.1200505 0.1889077 -0.4683822 -0.3875618 -0.4296552 0.6114616 0.5305104
[2,] -0.1200505 0.1889077 -0.4683822 -0.3875618 -0.4296552 0.6114616 0.5305104
        [,64]      [,65]     [,66]     [,67]      [,68]    [,69]      [,70]
[1,] 1.087913 -0.4399448 0.3200156 0.6223599 -0.1388496 1.262659 -0.8684566
[2,] 1.087913 -0.4399448 0.3200156 0.6223599 -0.1388496 1.262659 -0.8684566
          [,71]    [,72]     [,73]     [,74]     [,75]      [,76]      [,77]
[1,] -0.4221002 -1.32033 0.2431552 0.5540992 0.0033822 0.01651098 -0.5716068
[2,] -0.4221002 -1.32033 0.2431552 0.5540992 0.0033822 0.01651098 -0.5716068
         [,78]     [,79]    [,80]    [,81]    [,82]      [,83]     [,84]
[1,] -0.585257 -1.630713 0.285135 1.015657 1.619763 -0.1291542 0.7842321
[2,] -0.585257 -1.630713 0.285135 1.015657 1.619763 -0.1291542 0.7842321
         [,85] [,86]      [,87]    [,88]      [,89]     [,90]    [,91]
[1,] 0.6652696 1.329 -0.1107119 1.495616 -0.1945889 0.4163146 1.291151
[2,] 0.6652696 1.329 -0.1107119 1.495616 -0.1945889 0.4163146 1.291151
          [,92]     [,93]     [,94]     [,95]    [,96]     [,97]    [,98]
[1,] -0.4359508 -1.241943 0.1563219 0.1063708 -1.22051 0.4838192 1.018018
[2,] -0.4359508 -1.241943 0.1563219 0.1063708 -1.22051 0.4838192 1.018018
         [,99]    [,100]
[1,] 0.6095698 0.7367452
[2,] 0.6095698 0.7367452
> 
> 
> Max(tmp2)
[1] 2.105913
> Min(tmp2)
[1] -2.92497
> mean(tmp2)
[1] -0.06098094
> Sum(tmp2)
[1] -6.098094
> Var(tmp2)
[1] 1.049973
> 
> rowMeans(tmp2)
  [1]  0.493481654 -0.315347617 -0.881037281  0.263971340  0.671221645
  [6] -0.112153989 -0.741063692  0.508692801 -0.890523887  1.141137984
 [11] -0.481908952  0.096442349 -1.635154999 -1.417934207 -0.227244407
 [16]  0.353917714  0.505454050 -0.925027061  1.222601180  0.281100911
 [21]  0.065169366  0.074215265  0.292493668 -0.451177824  0.560771690
 [26]  0.489671118 -0.680209878  0.892626673 -0.192588356  0.055926783
 [31]  1.013825031  0.612085321 -0.841787748  0.755860508 -0.632496017
 [36] -0.209488445 -1.787500327  0.818627662  0.606822057  1.032446108
 [41] -0.027477483  0.235040438 -1.479294609 -0.149495546 -0.873720503
 [46]  0.841638037 -0.519068905 -2.341137542 -1.269015366 -0.275945909
 [51]  2.105912822  0.136137351 -0.337154733 -0.093161376  1.200500058
 [56]  0.286901040 -0.311336618 -1.112643429 -0.606289826  1.576992162
 [61]  1.134813183 -2.410300802 -2.164665300 -2.924969761 -1.606643936
 [66]  1.032971505 -1.623589241 -2.330419340  0.147316988  1.062366952
 [71]  0.647170290  0.294255302  0.157017469  1.074629934 -1.566548258
 [76]  0.790843429  0.126495349  1.888427282  2.025509147 -1.406750151
 [81]  0.182271488 -0.514665113 -0.129830026 -0.701963073  1.162558354
 [86]  1.027619542  0.424475977 -0.310476661 -0.183742668  0.644178661
 [91] -0.005864958  0.430044960  1.006022859 -1.788976437 -0.215337190
 [96] -0.202561961 -0.731733302  1.694448278 -0.245458874  0.639667654
> rowSums(tmp2)
  [1]  0.493481654 -0.315347617 -0.881037281  0.263971340  0.671221645
  [6] -0.112153989 -0.741063692  0.508692801 -0.890523887  1.141137984
 [11] -0.481908952  0.096442349 -1.635154999 -1.417934207 -0.227244407
 [16]  0.353917714  0.505454050 -0.925027061  1.222601180  0.281100911
 [21]  0.065169366  0.074215265  0.292493668 -0.451177824  0.560771690
 [26]  0.489671118 -0.680209878  0.892626673 -0.192588356  0.055926783
 [31]  1.013825031  0.612085321 -0.841787748  0.755860508 -0.632496017
 [36] -0.209488445 -1.787500327  0.818627662  0.606822057  1.032446108
 [41] -0.027477483  0.235040438 -1.479294609 -0.149495546 -0.873720503
 [46]  0.841638037 -0.519068905 -2.341137542 -1.269015366 -0.275945909
 [51]  2.105912822  0.136137351 -0.337154733 -0.093161376  1.200500058
 [56]  0.286901040 -0.311336618 -1.112643429 -0.606289826  1.576992162
 [61]  1.134813183 -2.410300802 -2.164665300 -2.924969761 -1.606643936
 [66]  1.032971505 -1.623589241 -2.330419340  0.147316988  1.062366952
 [71]  0.647170290  0.294255302  0.157017469  1.074629934 -1.566548258
 [76]  0.790843429  0.126495349  1.888427282  2.025509147 -1.406750151
 [81]  0.182271488 -0.514665113 -0.129830026 -0.701963073  1.162558354
 [86]  1.027619542  0.424475977 -0.310476661 -0.183742668  0.644178661
 [91] -0.005864958  0.430044960  1.006022859 -1.788976437 -0.215337190
 [96] -0.202561961 -0.731733302  1.694448278 -0.245458874  0.639667654
> 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.493481654 -0.315347617 -0.881037281  0.263971340  0.671221645
  [6] -0.112153989 -0.741063692  0.508692801 -0.890523887  1.141137984
 [11] -0.481908952  0.096442349 -1.635154999 -1.417934207 -0.227244407
 [16]  0.353917714  0.505454050 -0.925027061  1.222601180  0.281100911
 [21]  0.065169366  0.074215265  0.292493668 -0.451177824  0.560771690
 [26]  0.489671118 -0.680209878  0.892626673 -0.192588356  0.055926783
 [31]  1.013825031  0.612085321 -0.841787748  0.755860508 -0.632496017
 [36] -0.209488445 -1.787500327  0.818627662  0.606822057  1.032446108
 [41] -0.027477483  0.235040438 -1.479294609 -0.149495546 -0.873720503
 [46]  0.841638037 -0.519068905 -2.341137542 -1.269015366 -0.275945909
 [51]  2.105912822  0.136137351 -0.337154733 -0.093161376  1.200500058
 [56]  0.286901040 -0.311336618 -1.112643429 -0.606289826  1.576992162
 [61]  1.134813183 -2.410300802 -2.164665300 -2.924969761 -1.606643936
 [66]  1.032971505 -1.623589241 -2.330419340  0.147316988  1.062366952
 [71]  0.647170290  0.294255302  0.157017469  1.074629934 -1.566548258
 [76]  0.790843429  0.126495349  1.888427282  2.025509147 -1.406750151
 [81]  0.182271488 -0.514665113 -0.129830026 -0.701963073  1.162558354
 [86]  1.027619542  0.424475977 -0.310476661 -0.183742668  0.644178661
 [91] -0.005864958  0.430044960  1.006022859 -1.788976437 -0.215337190
 [96] -0.202561961 -0.731733302  1.694448278 -0.245458874  0.639667654
> rowMin(tmp2)
  [1]  0.493481654 -0.315347617 -0.881037281  0.263971340  0.671221645
  [6] -0.112153989 -0.741063692  0.508692801 -0.890523887  1.141137984
 [11] -0.481908952  0.096442349 -1.635154999 -1.417934207 -0.227244407
 [16]  0.353917714  0.505454050 -0.925027061  1.222601180  0.281100911
 [21]  0.065169366  0.074215265  0.292493668 -0.451177824  0.560771690
 [26]  0.489671118 -0.680209878  0.892626673 -0.192588356  0.055926783
 [31]  1.013825031  0.612085321 -0.841787748  0.755860508 -0.632496017
 [36] -0.209488445 -1.787500327  0.818627662  0.606822057  1.032446108
 [41] -0.027477483  0.235040438 -1.479294609 -0.149495546 -0.873720503
 [46]  0.841638037 -0.519068905 -2.341137542 -1.269015366 -0.275945909
 [51]  2.105912822  0.136137351 -0.337154733 -0.093161376  1.200500058
 [56]  0.286901040 -0.311336618 -1.112643429 -0.606289826  1.576992162
 [61]  1.134813183 -2.410300802 -2.164665300 -2.924969761 -1.606643936
 [66]  1.032971505 -1.623589241 -2.330419340  0.147316988  1.062366952
 [71]  0.647170290  0.294255302  0.157017469  1.074629934 -1.566548258
 [76]  0.790843429  0.126495349  1.888427282  2.025509147 -1.406750151
 [81]  0.182271488 -0.514665113 -0.129830026 -0.701963073  1.162558354
 [86]  1.027619542  0.424475977 -0.310476661 -0.183742668  0.644178661
 [91] -0.005864958  0.430044960  1.006022859 -1.788976437 -0.215337190
 [96] -0.202561961 -0.731733302  1.694448278 -0.245458874  0.639667654
> 
> colMeans(tmp2)
[1] -0.06098094
> colSums(tmp2)
[1] -6.098094
> colVars(tmp2)
[1] 1.049973
> colSd(tmp2)
[1] 1.024682
> colMax(tmp2)
[1] 2.105913
> colMin(tmp2)
[1] -2.92497
> colMedians(tmp2)
[1] 0.06054807
> colRanges(tmp2)
          [,1]
[1,] -2.924970
[2,]  2.105913
> 
> dataset1 <- matrix(dataset1,1,100)
> 
> agree.checks(tmp,dataset1)
> 
> dataset2 <- matrix(dataset2,100,1)
> agree.checks(tmp2,dataset2)
>   
> 
> tmp <- createBufferedMatrix(10,10)
> 
> tmp[1:10,1:10] <- rnorm(100)
> colApply(tmp,sum)
 [1] -1.8433734  0.9495175  0.1744588  2.1653910  1.0181354  7.9053214
 [7] -1.1987436 -1.8572734 -7.6711688  1.6661633
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.0154142
[2,] -0.7031244
[3,] -0.0669944
[4,]  0.1611697
[5,]  0.6148831
> 
> rowApply(tmp,sum)
 [1] -4.9682491 -0.1247714 -0.6019382 -1.6780549  0.7324054 -1.3228675
 [7]  1.6764142  4.7364369  1.5063311  1.3527220
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    8    3    4    2    7    4    7    4    8     4
 [2,]    9    4    8    9    1    2    6    7    9     2
 [3,]    7    1   10    6    6    1    5    3    4     9
 [4,]    3    8    7    7    9   10    4    6    5     7
 [5,]    1   10    5    5    5    3    9    9    1     6
 [6,]   10    9    9    3   10    9    1    8   10    10
 [7,]    4    6    2    1    3    5   10   10    7     3
 [8,]    5    7    1   10    2    7    8    2    2     5
 [9,]    2    2    3    4    8    6    2    1    6     1
[10,]    6    5    6    8    4    8    3    5    3     8
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1] -0.2460725  1.5232529 -0.5198162  1.6324397 -0.1600375  2.2402276
 [7] -0.1451117  0.2662816  1.4116585 -1.5330696 -0.7440861  0.9726216
[13] -3.0770522  0.8204649 -0.1440756 -0.2708017  0.1992389 -2.7806756
[19]  0.1986708 -1.0243825
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.9644344
[2,] -0.6355363
[3,] -0.3663766
[4,]  0.2755795
[5,]  2.4446953
> 
> rowApply(tmp,sum)
[1] -3.7089733  0.7594751  1.2323349  0.7854544 -0.4486159
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]    7   20    5    1   14
[2,]    5   14    2   16   20
[3,]   13   11   15    4    3
[4,]   12   17    4   18   16
[5,]    6    4   16   12   12
> 
> 
> as.matrix(tmp)
           [,1]       [,2]        [,3]        [,4]       [,5]      [,6]
[1,] -0.3663766 -0.6420781  0.06428481  0.02566583 -0.3698509 0.2722031
[2,]  2.4446953  0.6632251  0.58467007  0.88332760 -1.1163184 0.8363968
[3,] -0.6355363 -0.9700544  0.73590327 -0.71773373  0.9294862 0.1928100
[4,] -1.9644344  0.6355532 -0.85142983  1.04640711  0.2492855 0.2741360
[5,]  0.2755795  1.8366071 -1.05324454  0.39477289  0.1473602 0.6646817
            [,7]       [,8]       [,9]      [,10]      [,11]       [,12]
[1,] -1.54121402  0.2117899  0.2927039  0.4873631  0.7130402 -0.08824722
[2,]  1.07601310  0.6418962  0.6955351  0.2076656 -0.3463667  0.11605623
[3,] -0.07341001 -0.1616078 -0.1299746 -0.1887159 -2.4765872  1.24705680
[4,]  0.37028857 -0.3119416 -0.8234534 -0.9594690  1.1215095  0.05856291
[5,]  0.02321062 -0.1138551  1.3768476 -1.0799134  0.2443182 -0.36080711
           [,13]       [,14]      [,15]      [,16]      [,17]       [,18]
[1,]  0.61063266 -0.09968643  0.1511567 -1.2281253 -0.1666057 -0.02811669
[2,] -1.74157674 -0.10879556 -2.5339579 -0.9737676  0.6561093 -1.23192464
[3,] -0.54473968  1.21896580  1.4821003  1.0347722  0.1908047  0.46445558
[4,] -1.34366058  0.14309582  0.1599480  1.2598993  0.2359464  0.09148156
[5,] -0.05770783 -0.33311474  0.5966772 -0.3635803 -0.7170159 -2.07657137
          [,19]      [,20]
[1,] -0.8290941 -1.1784182
[2,]  1.0187735 -1.0121814
[3,] -0.8277740  0.4621137
[4,]  0.5586237  0.8351057
[5,]  0.2781417 -0.1310023
> 
> 
> is.BufferedMatrix(tmp)
[1] TRUE
> 
> as.BufferedMatrix(as.matrix(tmp))
BufferedMatrix object
Matrix size:  5 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  800  bytes.
> 
> 
> 
> subBufferedMatrix(tmp,1:5,1:5)
BufferedMatrix object
Matrix size:  5 5 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  652  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  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.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  480  bytes.
> 
> 
> rm(tmp)
> 
> 
> ###
> ### Testing colnames and rownames
> ###
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> 
> 
> colnames(tmp)
NULL
> rownames(tmp)
NULL
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> colnames(tmp)
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"
> rownames(tmp)
[1] "row1" "row2" "row3" "row4" "row5"
> 
> 
> tmp["row1",]
          col1      col2       col3       col4     col5       col6      col7
row1 0.9915942 -1.104467 -0.5216685 0.04806897 1.316813 -0.7039656 -1.399208
         col8      col9      col10     col11      col12      col13     col14
row1 1.399338 -0.550503 -0.2031881 0.9174887 -0.2335711 -0.6528275 0.4924998
          col15    col16      col17     col18    col19    col20
row1 -0.3817904 1.025972 -0.1492354 -1.115681 1.334333 1.097602
> tmp[,"col10"]
          col10
row1 -0.2031881
row2  0.2102300
row3  0.6837780
row4 -0.8152872
row5 -0.6119932
> tmp[c("row1","row5"),]
          col1       col2       col3       col4      col5       col6       col7
row1 0.9915942 -1.1044674 -0.5216685 0.04806897 1.3168133 -0.7039656 -1.3992080
row5 0.3845644  0.2601818 -1.5562972 3.07843960 0.7354053 -0.6160568 -0.4260069
          col8       col9      col10     col11      col12      col13     col14
row1 1.3993384 -0.5505030 -0.2031881 0.9174887 -0.2335711 -0.6528275 0.4924998
row5 0.4071861 -0.6047704 -0.6119932 0.2491464  0.6543105 -0.5965215 0.3296427
          col15     col16      col17     col18     col19     col20
row1 -0.3817904  1.025972 -0.1492354 -1.115681  1.334333 1.0976015
row5 -0.6385258 -1.016950 -0.5966030  2.658521 -1.704422 0.4431797
> tmp[,c("col6","col20")]
           col6      col20
row1 -0.7039656  1.0976015
row2  0.8716996 -0.1875459
row3 -0.4740242  0.3952966
row4  1.0734751 -0.9801784
row5 -0.6160568  0.4431797
> tmp[c("row1","row5"),c("col6","col20")]
           col6     col20
row1 -0.7039656 1.0976015
row5 -0.6160568 0.4431797
> 
> 
> 
> 
> 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 48.16263 52.79021 49.33961 49.01735 51.05817 106.1267 50.61687 49.8604
         col9    col10   col11    col12    col13    col14    col15    col16
row1 50.49566 51.08517 50.3601 50.16483 49.91913 48.94552 49.92465 51.07028
        col17    col18    col19   col20
row1 49.56969 49.02954 50.12688 104.281
> tmp[,"col10"]
        col10
row1 51.08517
row2 29.73894
row3 28.49867
row4 29.20883
row5 48.50433
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 48.16263 52.79021 49.33961 49.01735 51.05817 106.1267 50.61687 49.86040
row5 51.05025 51.32096 49.86683 50.26519 50.29575 103.2260 50.63496 48.75537
         col9    col10    col11    col12    col13    col14    col15    col16
row1 50.49566 51.08517 50.36010 50.16483 49.91913 48.94552 49.92465 51.07028
row5 50.24363 48.50433 51.34861 50.73142 52.70726 49.53592 50.13036 50.03322
        col17    col18    col19    col20
row1 49.56969 49.02954 50.12688 104.2810
row5 49.61000 50.89352 49.47621 105.3619
> tmp[,c("col6","col20")]
          col6     col20
row1 106.12671 104.28097
row2  75.04804  74.39226
row3  75.60846  75.34157
row4  73.00378  75.66806
row5 103.22597 105.36193
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 106.1267 104.2810
row5 103.2260 105.3619
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 106.1267 104.2810
row5 103.2260 105.3619
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,] -0.2219590
[2,] -0.9170426
[3,]  0.6122803
[4,] -1.5905186
[5,] -0.8597124
> tmp[,c("col17","col7")]
          col17       col7
[1,]  0.2066780  0.5948120
[2,] -0.3877150 -0.7086212
[3,] -0.7958512 -0.7916765
[4,]  0.1475964 -0.7403048
[5,] -0.1579246  1.3161870
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
            col6      col20
[1,]  0.92904490 -0.8616276
[2,] -0.94531208 -0.6970962
[3,] -0.45756429  1.6660925
[4,] -0.09246556  0.9010874
[5,]  0.29228411  0.3114403
> subBufferedMatrix(tmp,1,c("col6"))[,1]
          col1
[1,] 0.9290449
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,]  0.9290449
[2,] -0.9453121
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> 
> 
> 
> subBufferedMatrix(tmp,c("row3","row1"),)[,1:20]
           [,1]       [,2]       [,3]      [,4]      [,5]        [,6]
row3  0.9231704 -1.3947386 -0.2016642 -1.490280 0.1318030 1.169182356
row1 -0.1731490 -0.2063028  0.4370127  1.342234 0.8995727 0.006268307
           [,7]       [,8]       [,9]      [,10]      [,11]      [,12]
row3 -2.0031829 -0.4970903 -0.7601815 -2.8683042 -0.6820732 1.62826571
row1 -0.2084626 -0.8599899 -0.3804515 -0.5154253  1.6858803 0.03973353
         [,13]      [,14]      [,15]       [,16]      [,17]     [,18]
row3 -1.451713 -0.5528809  0.4200463 -0.06275632 -2.0906933 0.2440216
row1 -1.218614 -1.4337433 -2.4947427  0.18682559  0.7286536 0.4329638
          [,19]       [,20]
row3 -0.5628226 0.007463734
row1 -0.3874550 0.328183161
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
           [,1]     [,2]      [,3]      [,4]       [,5]     [,6]     [,7]
row2 -0.2374654 1.482456 0.3802404 -1.114026 -0.5916736 1.358725 1.828222
          [,8]      [,9]    [,10]
row2 -1.186975 0.7542823 1.065006
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
          [,1]     [,2]      [,3]      [,4]     [,5]      [,6]      [,7]
row5 -1.050502 -1.17147 0.5500619 0.4491036 1.326986 -0.122938 0.8110991
         [,8]     [,9]     [,10]      [,11]      [,12]    [,13]     [,14]
row5 -2.14365 1.240295 0.7384387 -0.4207592 -0.4083205 1.530399 0.5135113
        [,15]       [,16]     [,17]      [,18]      [,19]    [,20]
row5 1.939279 -0.04858918 -0.374936 -0.1781138 -0.6454532 1.425446
> 
> 
> 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: 0x5687ec660c60>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM25577391bd833" 
 [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2557737a2c241f"
 [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM255773362f6cc8"
 [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2557733e31aba5"
 [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM255773273e6b73"
 [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2557734c07a493"
 [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2557736f50e9d2"
 [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM255773163a8391"
 [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2557731ee5f125"
[10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM25577379abfb6b"
[11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM25577347e25f3c"
[12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2557731e25e6dd"
[13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2557737ca81012"
[14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2557735545d5cd"
[15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM25577320cc933c"
> 
> 
> ### 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: 0x5687eceeca50>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x5687eceeca50>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x5687eceeca50>
> rowMedians(tmp)
  [1] -0.307682127  0.258448583 -0.235205329 -0.012516549 -0.295975777
  [6]  0.668073644  0.371051470  0.015219833 -0.120399928 -0.091107645
 [11] -0.361728744 -0.058817905 -0.199770823  0.986700479 -0.148731943
 [16] -0.167616378 -0.012273643  0.781179183 -0.103818207  0.695098509
 [21] -0.303304346  0.125090172  0.583933694 -0.385092240  0.328951056
 [26]  0.064616193 -0.191852862 -0.072523134  0.438103546  0.269529899
 [31]  0.035430210 -0.442886494 -0.148819039  0.304739037  0.001002178
 [36] -0.218692892  0.273098763 -0.356356331 -0.130539853  0.042995732
 [41] -0.208233303 -0.106072312  0.103836726  0.235725941  0.125754337
 [46] -0.180701645  0.027941411  0.036150795 -0.363406007  0.137926843
 [51] -0.074713808  0.115429669  0.158744281  0.052012579  0.041769607
 [56]  0.090934479  0.355466317  0.434723591  0.218796154 -0.365800767
 [61]  0.267363982  0.078608421 -0.532453724 -0.157760875  0.385012752
 [66] -0.087759240 -0.215292551 -0.277974995 -0.007834309 -0.016894135
 [71]  0.046525256 -0.278633964  0.245984799 -0.140560918  0.302534448
 [76]  0.460864677 -0.312877926  0.334348166 -0.522164293  0.230362166
 [81]  0.213560825  0.437657024 -0.070273277  0.534365478  0.670036628
 [86]  0.313405822 -0.463321097  0.006298191 -0.100432235  0.047000500
 [91] -0.619462217 -0.236824648  0.454946773  0.579835730 -0.164521890
 [96] -0.017826560  0.357855698  0.436841884 -0.471372066  0.063223205
[101] -0.610562733 -0.150707346 -0.063628171  0.265357381 -0.350959366
[106] -0.293158596 -0.061877297 -0.159278128 -0.107295692 -0.366522456
[111] -0.006046953  0.170712042 -0.178970119 -0.022306700  0.196016920
[116]  0.404322854  0.387885319  0.233535488 -0.061926142 -0.183152845
[121] -0.268257923 -0.284075343 -0.081941665  0.095416134  0.289026589
[126] -0.003944511 -0.202659685  0.303865115  0.170241436 -0.288104477
[131]  0.181617653 -0.035812714 -0.459323289 -0.193302495 -0.086268425
[136] -0.595976569 -0.101074928 -0.070462922  0.295293464 -0.266925589
[141]  0.091550752 -0.310085182 -0.386128489  0.047611363  0.114754549
[146]  0.028368867 -0.410769838  0.381115895  0.215825588  0.429936522
[151]  0.064073517  0.567540798 -0.150312083 -0.061763628 -0.056120626
[156]  0.258350305 -0.047865202  0.047778610  0.040381476  0.008848636
[161]  0.296243576 -0.024170960  0.003067170 -0.270499262 -0.191686800
[166] -0.097755046 -0.247838923 -0.111820206  0.235701508  0.009272752
[171]  0.228870837  0.460054008 -0.106424836  0.016442224  0.072746592
[176]  0.210024024 -0.202559784 -0.045352357  0.664077277  0.068994251
[181] -0.276053062 -0.514642436 -0.658866293  0.023475837 -0.275829140
[186] -0.081317063  0.001392340  0.334028947 -0.299424527 -0.349306597
[191] -0.517022390  0.148602431 -0.235890277 -0.082097219  0.038015305
[196]  0.598877981 -0.360107475  0.063969670 -0.203303556 -0.157918509
[201] -0.258082640 -0.168677914 -0.309489208  0.066135911  0.216556239
[206]  0.387104742  0.081677377  0.106273457  0.746905878 -0.023810650
[211]  0.044522676 -0.361528322  0.358035848 -0.670478602  0.364890579
[216]  0.219585022 -0.248446399 -0.094250745  0.267287471  0.074390879
[221] -0.048270677  0.071602119  0.193633387 -0.751639574  0.046119242
[226]  0.314244594 -0.269294075  0.286793766  0.024254374 -0.234888276
> 
> proc.time()
   user  system elapsed 
  1.306   0.787   1.960 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R version 4.5.1 (2025-06-13) -- "Great Square Root"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

<pointer: 0x5cfbcf74ac20>
> .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: 0x5cfbcf74ac20>
> .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: 0x5cfbcf74ac20>
> .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: 0x5cfbcf74ac20>
> 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: 0x5cfbcf89c040>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5cfbcf89c040>
> .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: 0x5cfbcf89c040>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5cfbcf89c040>
> .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: 0x5cfbcf89c040>
> 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: 0x5cfbcf48b2e0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5cfbcf48b2e0>
> .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: 0x5cfbcf48b2e0>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x5cfbcf48b2e0>
> .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: 0x5cfbcf48b2e0>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x5cfbcf48b2e0>
> .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: 0x5cfbcf48b2e0>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x5cfbcf48b2e0>
> .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: 0x5cfbcf48b2e0>
> 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: 0x5cfbd1a45150>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x5cfbd1a45150>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5cfbd1a45150>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5cfbd1a45150>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile2558c91eb86001" "BufferedMatrixFile2558c96bf9c9a9"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile2558c91eb86001" "BufferedMatrixFile2558c96bf9c9a9"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x5cfbcf9fcf50>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5cfbcf9fcf50>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x5cfbcf9fcf50>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x5cfbcf9fcf50>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x5cfbcf9fcf50>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x5cfbcf9fcf50>
> .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: 0x5cfbd04eea40>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5cfbd04eea40>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x5cfbd04eea40>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x5cfbd04eea40>
> 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: 0x5cfbcfeda560>
> .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: 0x5cfbcfeda560>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.278   0.149   0.294 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R version 4.5.1 (2025-06-13) -- "Great Square Root"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> Temp <- createBufferedMatrix(100)
> dim(Temp)
[1] 100   0
> buffer.dim(Temp)
[1] 1 1
> 
> 
> proc.time()
   user  system elapsed 
  0.300   0.135   0.301 

Example timings