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

This page was generated on 2025-10-13 12:04 -0400 (Mon, 13 Oct 2025).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 24.04.3 LTS)x86_644.5.1 Patched (2025-08-23 r88802) -- "Great Square Root" 4864
lconwaymacOS 12.7.1 Montereyx86_644.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" 4652
kjohnson3macOS 13.7.7 Venturaarm644.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" 4597
taishanLinux (openEuler 24.03 LTS)aarch644.5.0 (2025-04-11) -- "How About a Twenty-Six" 4586
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 255/2346HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.73.0  (landing page)
Ben Bolstad
Snapshot Date: 2025-10-12 13:45 -0400 (Sun, 12 Oct 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 lconway

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: /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz
StartedAt: 2025-10-12 20:28:22 -0400 (Sun, 12 Oct 2025)
EndedAt: 2025-10-12 20:30:14 -0400 (Sun, 12 Oct 2025)
EllapsedTime: 111.4 seconds
RetCode: 0
Status:   WARNINGS  
CheckDir: BufferedMatrix.Rcheck
Warnings: 1

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck’
* using R version 4.5.1 Patched (2025-09-10 r88807)
* using platform: x86_64-apple-darwin20
* R was compiled by
    Apple clang version 14.0.0 (clang-1400.0.29.202)
    GNU Fortran (GCC) 14.2.0
* running under: macOS Monterey 12.7.6
* using session charset: UTF-8
* using option ‘--no-vignettes’
* 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 ... WARNING
Found the following significant warnings:
  doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
See ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details.
* used C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’
* used SDK: ‘MacOSX11.3.1.sdk’
* 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 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 sizes of PDF files under ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... NONE
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘Rcodetesting.R’
  Running ‘c_code_level_tests.R’
  Running ‘objectTesting.R’
  Running ‘rawCalltesting.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE

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


Installation output

BufferedMatrix.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix
###
##############################################################################
##############################################################################


* installing to library ‘/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library’
* installing *source* package ‘BufferedMatrix’ ...
** this is package ‘BufferedMatrix’ version ‘1.73.0’
** using staged installation
** libs
using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’
using SDK: ‘MacOSX11.3.1.sdk’
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c RBufferedMatrix.c -o RBufferedMatrix.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o
doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
  if (!(Matrix->readonly) & setting){
      ^                   ~
doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first
  if (!(Matrix->readonly) & setting){
      ^
       (                           )
doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning
  if (!(Matrix->readonly) & setting){
      ^
      (                  )
doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function]
static int sort_double(const double *a1,const double *a2){
           ^
2 warnings generated.
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c init_package.c -o init_package.o
clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R
installing to /Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/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 Patched (2025-09-10 r88807) -- "Great Square Root"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin20

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.360   0.175   0.851 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R version 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin20

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] "/Users/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) limit (Mb) max used (Mb)
Ncells 480848 25.7    1056620 56.5         NA   634462 33.9
Vcells 891079  6.8    8388608 64.0      98304  2108714 16.1
> 
> 
> 
> 
> ##
> ## 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] "Sun Oct 12 20:28:50 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] "Sun Oct 12 20:28:52 2025"
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> 
> 
> RowMode(tmp2)
<pointer: 0x6000019f8000>
> 
> 
> 
> 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] "Sun Oct 12 20:29:16 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] "Sun Oct 12 20:29:25 2025"
> 
> ColMode(tmp2)
<pointer: 0x6000019f8000>
> 
> 
> 
> ### Now testing assignments
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+ 
+   new.data <- rnorm(20)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,] <- new.data
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   new.data <- rnorm(10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+ 
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col  <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(25),5,5)
+   tmp2[which.row,which.col] <- new.data
+   test.matrix[which.row,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> ###
> ###
> ### testing some more functions
> ###
> 
> 
> 
> ## duplication function
> tmp5 <- duplicate(tmp2)
> 
> # making sure really did copy everything.
> tmp5[1,1] <- tmp5[1,1] +100.00
> 
> if (tmp5[1,1] == tmp2[1,1]){
+   stop("Problem with duplication")
+ }
> 
> 
> 
> 
> ### testing elementwise applying of functions
> 
> tmp5[1:4,1:4]
            [,1]       [,2]        [,3]       [,4]
[1,] 100.0286675  0.5147302 -0.03107233 -2.1798147
[2,]  -0.3995553  0.8834863  0.64490730  1.6604207
[3,]   1.1426208  1.0826454 -0.30496617  0.1625261
[4,]   0.3813134 -0.6325070 -0.71673363 -0.5928637
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /Users/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,] 100.0286675 0.5147302 0.03107233 2.1798147
[2,]   0.3995553 0.8834863 0.64490730 1.6604207
[3,]   1.1426208 1.0826454 0.30496617 0.1625261
[4,]   0.3813134 0.6325070 0.71673363 0.5928637
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /Users/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,] 10.0014333 0.7174470 0.1762735 1.4764195
[2,]  0.6321038 0.9399395 0.8030612 1.2885731
[3,]  1.0689344 1.0405025 0.5522374 0.4031452
[4,]  0.6175057 0.7953031 0.8466012 0.7699764
> 
> 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:    /Users/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,] 225.04300 32.68920 26.79381 41.94401
[2,]  31.72059 35.28288 33.67552 39.54615
[3,]  36.83196 36.48767 30.82734 29.19398
[4,]  31.55637 33.58554 34.18275 33.29263
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x6000019e0000>
> exp(tmp5)
<pointer: 0x6000019e0000>
> log(tmp5,2)
<pointer: 0x6000019e0000>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 468.3975
> Min(tmp5)
[1] 52.699
> mean(tmp5)
[1] 72.45231
> Sum(tmp5)
[1] 14490.46
> Var(tmp5)
[1] 871.1326
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 91.86080 72.53680 71.14375 71.41977 66.07180 71.37667 71.20213 69.68802
 [9] 69.71830 69.50509
> rowSums(tmp5)
 [1] 1837.216 1450.736 1422.875 1428.395 1321.436 1427.533 1424.043 1393.760
 [9] 1394.366 1390.102
> rowVars(tmp5)
 [1] 7955.12455   74.66628  108.81488   60.53816   73.58629   90.95123
 [7]   92.28405   55.08504   77.42305   65.27560
> rowSd(tmp5)
 [1] 89.191505  8.640965 10.431437  7.780627  8.578245  9.536835  9.606459
 [8]  7.421930  8.799037  8.079332
> rowMax(tmp5)
 [1] 468.39752  92.82984  84.60319  83.81959  85.40869  87.78999  84.34203
 [8]  85.99230  85.47032  83.68679
> rowMin(tmp5)
 [1] 55.76780 58.26087 52.69900 59.05425 53.34551 55.17725 55.41327 59.73626
 [9] 54.66615 57.19196
> 
> colMeans(tmp5)
 [1] 110.41483  73.03909  70.66802  72.01135  71.76644  64.70924  73.68326
 [8]  75.53440  68.38537  68.74324  71.70102  70.45608  67.95266  68.65979
[15]  70.80706  69.94933  69.47177  73.70322  69.56828  67.82179
> colSums(tmp5)
 [1] 1104.1483  730.3909  706.6802  720.1135  717.6644  647.0924  736.8326
 [8]  755.3440  683.8537  687.4324  717.0102  704.5608  679.5266  686.5979
[15]  708.0706  699.4933  694.7177  737.0322  695.6828  678.2179
> colVars(tmp5)
 [1] 15901.29018    93.35286    72.83692   110.85565    88.65098   108.55178
 [7]    74.05514    50.23725    88.91002    93.10226   112.09405   107.66119
[13]   115.99157    17.47387    90.52689    70.26638    71.32242    46.91509
[19]    64.83795    66.14358
> colSd(tmp5)
 [1] 126.100318   9.661928   8.534455  10.528801   9.415465  10.418819
 [7]   8.605530   7.087824   9.429211   9.648951  10.587448  10.375991
[13]  10.769938   4.180176   9.514562   8.382504   8.445260   6.849459
[19]   8.052202   8.132871
> colMax(tmp5)
 [1] 468.39752  85.99230  87.78999  87.30096  83.68679  85.47032  83.92947
 [8]  85.77984  81.91359  83.40392  87.07409  84.34203  83.67313  77.21413
[15]  92.82984  81.30830  80.06549  82.10253  80.10512  80.00284
> colMin(tmp5)
 [1] 53.34551 57.85321 55.76780 56.60378 56.72295 52.78233 62.45924 65.05830
 [9] 57.74821 57.84832 56.50281 54.71627 55.41327 62.72809 61.52130 56.49762
[17] 54.66615 64.12805 52.69900 59.73626
> 
> 
> ### 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] 91.86080 72.53680 71.14375 71.41977 66.07180       NA 71.20213 69.68802
 [9] 69.71830 69.50509
> rowSums(tmp5)
 [1] 1837.216 1450.736 1422.875 1428.395 1321.436       NA 1424.043 1393.760
 [9] 1394.366 1390.102
> rowVars(tmp5)
 [1] 7955.12455   74.66628  108.81488   60.53816   73.58629   94.51643
 [7]   92.28405   55.08504   77.42305   65.27560
> rowSd(tmp5)
 [1] 89.191505  8.640965 10.431437  7.780627  8.578245  9.721956  9.606459
 [8]  7.421930  8.799037  8.079332
> rowMax(tmp5)
 [1] 468.39752  92.82984  84.60319  83.81959  85.40869        NA  84.34203
 [8]  85.99230  85.47032  83.68679
> rowMin(tmp5)
 [1] 55.76780 58.26087 52.69900 59.05425 53.34551       NA 55.41327 59.73626
 [9] 54.66615 57.19196
> 
> colMeans(tmp5)
 [1] 110.41483  73.03909  70.66802  72.01135  71.76644  64.70924  73.68326
 [8]  75.53440  68.38537  68.74324  71.70102  70.45608  67.95266  68.65979
[15]  70.80706  69.94933        NA  73.70322  69.56828  67.82179
> colSums(tmp5)
 [1] 1104.1483  730.3909  706.6802  720.1135  717.6644  647.0924  736.8326
 [8]  755.3440  683.8537  687.4324  717.0102  704.5608  679.5266  686.5979
[15]  708.0706  699.4933        NA  737.0322  695.6828  678.2179
> colVars(tmp5)
 [1] 15901.29018    93.35286    72.83692   110.85565    88.65098   108.55178
 [7]    74.05514    50.23725    88.91002    93.10226   112.09405   107.66119
[13]   115.99157    17.47387    90.52689    70.26638          NA    46.91509
[19]    64.83795    66.14358
> colSd(tmp5)
 [1] 126.100318   9.661928   8.534455  10.528801   9.415465  10.418819
 [7]   8.605530   7.087824   9.429211   9.648951  10.587448  10.375991
[13]  10.769938   4.180176   9.514562   8.382504         NA   6.849459
[19]   8.052202   8.132871
> colMax(tmp5)
 [1] 468.39752  85.99230  87.78999  87.30096  83.68679  85.47032  83.92947
 [8]  85.77984  81.91359  83.40392  87.07409  84.34203  83.67313  77.21413
[15]  92.82984  81.30830        NA  82.10253  80.10512  80.00284
> colMin(tmp5)
 [1] 53.34551 57.85321 55.76780 56.60378 56.72295 52.78233 62.45924 65.05830
 [9] 57.74821 57.84832 56.50281 54.71627 55.41327 62.72809 61.52130 56.49762
[17]       NA 64.12805 52.69900 59.73626
> 
> Max(tmp5,na.rm=TRUE)
[1] 468.3975
> Min(tmp5,na.rm=TRUE)
[1] 52.699
> mean(tmp5,na.rm=TRUE)
[1] 72.43237
> Sum(tmp5,na.rm=TRUE)
[1] 14414.04
> Var(tmp5,na.rm=TRUE)
[1] 875.4524
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 91.86080 72.53680 71.14375 71.41977 66.07180 71.11121 71.20213 69.68802
 [9] 69.71830 69.50509
> rowSums(tmp5,na.rm=TRUE)
 [1] 1837.216 1450.736 1422.875 1428.395 1321.436 1351.113 1424.043 1393.760
 [9] 1394.366 1390.102
> rowVars(tmp5,na.rm=TRUE)
 [1] 7955.12455   74.66628  108.81488   60.53816   73.58629   94.51643
 [7]   92.28405   55.08504   77.42305   65.27560
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.191505  8.640965 10.431437  7.780627  8.578245  9.721956  9.606459
 [8]  7.421930  8.799037  8.079332
> rowMax(tmp5,na.rm=TRUE)
 [1] 468.39752  92.82984  84.60319  83.81959  85.40869  87.78999  84.34203
 [8]  85.99230  85.47032  83.68679
> rowMin(tmp5,na.rm=TRUE)
 [1] 55.76780 58.26087 52.69900 59.05425 53.34551 55.17725 55.41327 59.73626
 [9] 54.66615 57.19196
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 110.41483  73.03909  70.66802  72.01135  71.76644  64.70924  73.68326
 [8]  75.53440  68.38537  68.74324  71.70102  70.45608  67.95266  68.65979
[15]  70.80706  69.94933  68.69971  73.70322  69.56828  67.82179
> colSums(tmp5,na.rm=TRUE)
 [1] 1104.1483  730.3909  706.6802  720.1135  717.6644  647.0924  736.8326
 [8]  755.3440  683.8537  687.4324  717.0102  704.5608  679.5266  686.5979
[15]  708.0706  699.4933  618.2974  737.0322  695.6828  678.2179
> colVars(tmp5,na.rm=TRUE)
 [1] 15901.29018    93.35286    72.83692   110.85565    88.65098   108.55178
 [7]    74.05514    50.23725    88.91002    93.10226   112.09405   107.66119
[13]   115.99157    17.47387    90.52689    70.26638    73.53179    46.91509
[19]    64.83795    66.14358
> colSd(tmp5,na.rm=TRUE)
 [1] 126.100318   9.661928   8.534455  10.528801   9.415465  10.418819
 [7]   8.605530   7.087824   9.429211   9.648951  10.587448  10.375991
[13]  10.769938   4.180176   9.514562   8.382504   8.575068   6.849459
[19]   8.052202   8.132871
> colMax(tmp5,na.rm=TRUE)
 [1] 468.39752  85.99230  87.78999  87.30096  83.68679  85.47032  83.92947
 [8]  85.77984  81.91359  83.40392  87.07409  84.34203  83.67313  77.21413
[15]  92.82984  81.30830  80.06549  82.10253  80.10512  80.00284
> colMin(tmp5,na.rm=TRUE)
 [1] 53.34551 57.85321 55.76780 56.60378 56.72295 52.78233 62.45924 65.05830
 [9] 57.74821 57.84832 56.50281 54.71627 55.41327 62.72809 61.52130 56.49762
[17] 54.66615 64.12805 52.69900 59.73626
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 91.86080 72.53680 71.14375 71.41977 66.07180      NaN 71.20213 69.68802
 [9] 69.71830 69.50509
> rowSums(tmp5,na.rm=TRUE)
 [1] 1837.216 1450.736 1422.875 1428.395 1321.436    0.000 1424.043 1393.760
 [9] 1394.366 1390.102
> rowVars(tmp5,na.rm=TRUE)
 [1] 7955.12455   74.66628  108.81488   60.53816   73.58629         NA
 [7]   92.28405   55.08504   77.42305   65.27560
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.191505  8.640965 10.431437  7.780627  8.578245        NA  9.606459
 [8]  7.421930  8.799037  8.079332
> rowMax(tmp5,na.rm=TRUE)
 [1] 468.39752  92.82984  84.60319  83.81959  85.40869        NA  84.34203
 [8]  85.99230  85.47032  83.68679
> rowMin(tmp5,na.rm=TRUE)
 [1] 55.76780 58.26087 52.69900 59.05425 53.34551       NA 55.41327 59.73626
 [9] 54.66615 57.19196
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 113.13800  71.89976  68.76558  72.71544  73.03025  65.76834  74.38865
 [8]  76.69842  69.03777  68.35512  69.99290  69.95320  67.25165  68.65776
[15]  71.07128  71.44397       NaN  74.06958  69.56619  66.93301
> colSums(tmp5,na.rm=TRUE)
 [1] 1018.2420  647.0979  618.8902  654.4390  657.2722  591.9151  669.4978
 [8]  690.2858  621.3399  615.1961  629.9361  629.5788  605.2649  617.9199
[15]  639.6415  642.9957    0.0000  666.6263  626.0957  602.3970
> colVars(tmp5,na.rm=TRUE)
 [1] 17805.52529    90.41873    41.22461   119.13549    81.76366   109.50148
 [7]    77.71444    41.27400    95.23549   103.04534    93.28201   118.27388
[13]   124.96210    19.65805   101.05737    53.91792          NA    51.26947
[19]    72.94264    65.52463
> colSd(tmp5,na.rm=TRUE)
 [1] 133.437346   9.508877   6.420639  10.914920   9.042326  10.464296
 [7]   8.815579   6.424485   9.758867  10.151125   9.658261  10.875380
[13]  11.178645   4.433740  10.052729   7.342882         NA   7.160270
[19]   8.540647   8.094729
> colMax(tmp5,na.rm=TRUE)
 [1] 468.39752  85.99230  77.20594  87.30096  83.68679  85.47032  83.92947
 [8]  85.77984  81.91359  83.40392  84.60319  84.34203  83.67313  77.21413
[15]  92.82984  81.30830      -Inf  82.10253  80.10512  80.00284
> colMin(tmp5,na.rm=TRUE)
 [1] 53.34551 57.85321 55.76780 56.60378 56.72295 52.78233 62.45924 68.64706
 [9] 57.74821 57.84832 56.50281 54.71627 55.41327 62.72809 61.52130 62.43829
[17]      Inf 64.12805 52.69900 59.73626
> 
> 
> 
> 
> 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] 146.1431 107.9669 161.9040 219.0416 363.0176 272.1904 211.7721 366.5609
 [9] 221.7057 152.1041
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 146.1431 107.9669 161.9040 219.0416 363.0176 272.1904 211.7721 366.5609
 [9] 221.7057 152.1041
> 
> 
> 
> copymatrix <- matrix(rnorm(200,150,15),10,20)
> 
> tmp5[1:10,1:20] <- copymatrix
> which.row <- 1
> which.col  <- 3
> cat(which.row," ",which.col,"\n")
1   3 
> tmp5[which.row,which.col] <- NA
> copymatrix[which.row,which.col] <- NA
> 
> colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE)
 [1] -1.705303e-13  0.000000e+00  2.842171e-14  0.000000e+00 -1.705303e-13
 [6] -1.136868e-13 -3.410605e-13  0.000000e+00  1.705303e-13  5.684342e-14
[11] -2.842171e-14  2.842171e-14  1.421085e-14  1.705303e-13  5.684342e-14
[16]  5.684342e-14 -8.526513e-14  1.136868e-13  2.842171e-14  1.136868e-13
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## making sure these things agree
> ##
> ## first when there is no NA
> 
> 
> 
> agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){
+ 
+   if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Max")
+   }
+   
+ 
+   if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Min")
+   }
+ 
+ 
+   if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){
+ 
+     cat(Sum(buff.matrix,na.rm=TRUE),"\n")
+     cat(sum(r.matrix,na.rm=TRUE),"\n")
+     cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n")
+     
+     stop("No agreement in Sum")
+   }
+   
+   if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){
+     stop("No agreement in mean")
+   }
+   
+   
+   if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){
+     stop("No agreement in Var")
+   }
+   
+   
+ 
+   if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowMeans")
+   }
+   
+   
+   if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colMeans")
+   }
+   
+   
+   if(any(abs(rowSums(buff.matrix,na.rm=TRUE)  -  apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in rowSums")
+   }
+   
+   
+   if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colSums")
+   }
+   
+   ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when 
+   ### computing variance
+   my.Var <- function(x,na.rm=FALSE){
+    if (all(is.na(x))){
+      return(NA)
+    } else {
+      var(x,na.rm=na.rm)
+    }
+ 
+   }
+   
+   if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+   
+   
+   if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+ 
+ 
+   if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+ 
+   if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+   
+   
+   if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+   
+ 
+   if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+ 
+   if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMedian")
+   }
+ 
+   if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colRanges")
+   }
+ 
+ 
+   
+ }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> for (rep in 1:20){
+   copymatrix <- matrix(rnorm(200,150,15),10,20)
+   
+   tmp5[1:10,1:20] <- copymatrix
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ## now lets assign some NA values and check agreement
+ 
+   which.row <- sample(1:10,1,replace=TRUE)
+   which.col  <- sample(1:20,1,replace=TRUE)
+   
+   cat(which.row," ",which.col,"\n")
+   
+   tmp5[which.row,which.col] <- NA
+   copymatrix[which.row,which.col] <- NA
+   
+   agree.checks(tmp5,copymatrix)
+ 
+   ## make an entire row NA
+   tmp5[which.row,] <- NA
+   copymatrix[which.row,] <- NA
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ### also make an entire col NA
+   tmp5[,which.col] <- NA
+   copymatrix[,which.col] <- NA
+ 
+   agree.checks(tmp5,copymatrix)
+ 
+   ### now make 1 element non NA with NA in the rest of row and column
+ 
+   tmp5[which.row,which.col] <- rnorm(1,150,15)
+   copymatrix[which.row,which.col] <- tmp5[which.row,which.col]
+ 
+   agree.checks(tmp5,copymatrix)
+ }
3   16 
9   20 
1   20 
8   18 
4   3 
5   9 
3   2 
2   13 
8   20 
7   18 
2   19 
3   17 
7   16 
5   19 
6   14 
5   13 
2   10 
7   14 
9   11 
3   8 
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] 1.910749
> Min(tmp)
[1] -1.945917
> mean(tmp)
[1] -0.03186931
> Sum(tmp)
[1] -3.186931
> Var(tmp)
[1] 0.8907916
> 
> rowMeans(tmp)
[1] -0.03186931
> rowSums(tmp)
[1] -3.186931
> rowVars(tmp)
[1] 0.8907916
> rowSd(tmp)
[1] 0.9438176
> rowMax(tmp)
[1] 1.910749
> rowMin(tmp)
[1] -1.945917
> 
> colMeans(tmp)
  [1]  0.078482226 -0.928120477 -1.540397338  0.632599303  0.118958200
  [6] -0.872003271 -0.511158180  0.712654928  0.034247777  0.684975090
 [11]  1.463264196  0.115904377  0.119461464  0.540296474 -0.279672497
 [16] -0.378208254 -1.662199397 -0.779801072 -1.331237159 -0.411669168
 [21] -1.568399182 -0.859330766  0.571492183  1.406978595  0.272476266
 [26]  0.415474213 -0.495669243  0.444537350  1.170070840  0.999146445
 [31]  0.911630461 -1.257038185  0.671331562 -0.239124952 -0.464077801
 [36] -1.344712829 -0.803635966 -0.901445539 -1.520502737 -0.457098702
 [41]  0.505014456  0.115429757  0.441471513  1.208629786 -1.196750602
 [46] -0.311632502 -0.807734649  1.910748796  1.268459591  0.451900919
 [51]  1.582515058 -0.500730151  1.904207800 -0.440214335  0.405414226
 [56]  0.008853868 -0.189445982  1.730053195 -1.757677743  0.648103189
 [61]  1.093165306  0.039412972  1.551318313 -1.143677317  0.561158463
 [66]  0.280159851 -1.778984524 -1.003204300  0.289172591  1.237734914
 [71] -1.505478030  0.443184920  1.084824936  0.027230626 -0.019148108
 [76] -1.945916562  0.302093017  0.328091995  0.567015206  1.148935482
 [81] -0.719111436 -1.322588628 -1.210568878  0.649806958  0.766002180
 [86]  0.038143888  1.374614758 -1.432908259 -0.403353261 -0.895212543
 [91]  0.586496660  0.037862452 -0.997465377 -1.042396357  0.040506733
 [96]  0.701672948  0.211496918 -0.988343582 -0.355189464  0.481418076
> colSums(tmp)
  [1]  0.078482226 -0.928120477 -1.540397338  0.632599303  0.118958200
  [6] -0.872003271 -0.511158180  0.712654928  0.034247777  0.684975090
 [11]  1.463264196  0.115904377  0.119461464  0.540296474 -0.279672497
 [16] -0.378208254 -1.662199397 -0.779801072 -1.331237159 -0.411669168
 [21] -1.568399182 -0.859330766  0.571492183  1.406978595  0.272476266
 [26]  0.415474213 -0.495669243  0.444537350  1.170070840  0.999146445
 [31]  0.911630461 -1.257038185  0.671331562 -0.239124952 -0.464077801
 [36] -1.344712829 -0.803635966 -0.901445539 -1.520502737 -0.457098702
 [41]  0.505014456  0.115429757  0.441471513  1.208629786 -1.196750602
 [46] -0.311632502 -0.807734649  1.910748796  1.268459591  0.451900919
 [51]  1.582515058 -0.500730151  1.904207800 -0.440214335  0.405414226
 [56]  0.008853868 -0.189445982  1.730053195 -1.757677743  0.648103189
 [61]  1.093165306  0.039412972  1.551318313 -1.143677317  0.561158463
 [66]  0.280159851 -1.778984524 -1.003204300  0.289172591  1.237734914
 [71] -1.505478030  0.443184920  1.084824936  0.027230626 -0.019148108
 [76] -1.945916562  0.302093017  0.328091995  0.567015206  1.148935482
 [81] -0.719111436 -1.322588628 -1.210568878  0.649806958  0.766002180
 [86]  0.038143888  1.374614758 -1.432908259 -0.403353261 -0.895212543
 [91]  0.586496660  0.037862452 -0.997465377 -1.042396357  0.040506733
 [96]  0.701672948  0.211496918 -0.988343582 -0.355189464  0.481418076
> 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.078482226 -0.928120477 -1.540397338  0.632599303  0.118958200
  [6] -0.872003271 -0.511158180  0.712654928  0.034247777  0.684975090
 [11]  1.463264196  0.115904377  0.119461464  0.540296474 -0.279672497
 [16] -0.378208254 -1.662199397 -0.779801072 -1.331237159 -0.411669168
 [21] -1.568399182 -0.859330766  0.571492183  1.406978595  0.272476266
 [26]  0.415474213 -0.495669243  0.444537350  1.170070840  0.999146445
 [31]  0.911630461 -1.257038185  0.671331562 -0.239124952 -0.464077801
 [36] -1.344712829 -0.803635966 -0.901445539 -1.520502737 -0.457098702
 [41]  0.505014456  0.115429757  0.441471513  1.208629786 -1.196750602
 [46] -0.311632502 -0.807734649  1.910748796  1.268459591  0.451900919
 [51]  1.582515058 -0.500730151  1.904207800 -0.440214335  0.405414226
 [56]  0.008853868 -0.189445982  1.730053195 -1.757677743  0.648103189
 [61]  1.093165306  0.039412972  1.551318313 -1.143677317  0.561158463
 [66]  0.280159851 -1.778984524 -1.003204300  0.289172591  1.237734914
 [71] -1.505478030  0.443184920  1.084824936  0.027230626 -0.019148108
 [76] -1.945916562  0.302093017  0.328091995  0.567015206  1.148935482
 [81] -0.719111436 -1.322588628 -1.210568878  0.649806958  0.766002180
 [86]  0.038143888  1.374614758 -1.432908259 -0.403353261 -0.895212543
 [91]  0.586496660  0.037862452 -0.997465377 -1.042396357  0.040506733
 [96]  0.701672948  0.211496918 -0.988343582 -0.355189464  0.481418076
> colMin(tmp)
  [1]  0.078482226 -0.928120477 -1.540397338  0.632599303  0.118958200
  [6] -0.872003271 -0.511158180  0.712654928  0.034247777  0.684975090
 [11]  1.463264196  0.115904377  0.119461464  0.540296474 -0.279672497
 [16] -0.378208254 -1.662199397 -0.779801072 -1.331237159 -0.411669168
 [21] -1.568399182 -0.859330766  0.571492183  1.406978595  0.272476266
 [26]  0.415474213 -0.495669243  0.444537350  1.170070840  0.999146445
 [31]  0.911630461 -1.257038185  0.671331562 -0.239124952 -0.464077801
 [36] -1.344712829 -0.803635966 -0.901445539 -1.520502737 -0.457098702
 [41]  0.505014456  0.115429757  0.441471513  1.208629786 -1.196750602
 [46] -0.311632502 -0.807734649  1.910748796  1.268459591  0.451900919
 [51]  1.582515058 -0.500730151  1.904207800 -0.440214335  0.405414226
 [56]  0.008853868 -0.189445982  1.730053195 -1.757677743  0.648103189
 [61]  1.093165306  0.039412972  1.551318313 -1.143677317  0.561158463
 [66]  0.280159851 -1.778984524 -1.003204300  0.289172591  1.237734914
 [71] -1.505478030  0.443184920  1.084824936  0.027230626 -0.019148108
 [76] -1.945916562  0.302093017  0.328091995  0.567015206  1.148935482
 [81] -0.719111436 -1.322588628 -1.210568878  0.649806958  0.766002180
 [86]  0.038143888  1.374614758 -1.432908259 -0.403353261 -0.895212543
 [91]  0.586496660  0.037862452 -0.997465377 -1.042396357  0.040506733
 [96]  0.701672948  0.211496918 -0.988343582 -0.355189464  0.481418076
> colMedians(tmp)
  [1]  0.078482226 -0.928120477 -1.540397338  0.632599303  0.118958200
  [6] -0.872003271 -0.511158180  0.712654928  0.034247777  0.684975090
 [11]  1.463264196  0.115904377  0.119461464  0.540296474 -0.279672497
 [16] -0.378208254 -1.662199397 -0.779801072 -1.331237159 -0.411669168
 [21] -1.568399182 -0.859330766  0.571492183  1.406978595  0.272476266
 [26]  0.415474213 -0.495669243  0.444537350  1.170070840  0.999146445
 [31]  0.911630461 -1.257038185  0.671331562 -0.239124952 -0.464077801
 [36] -1.344712829 -0.803635966 -0.901445539 -1.520502737 -0.457098702
 [41]  0.505014456  0.115429757  0.441471513  1.208629786 -1.196750602
 [46] -0.311632502 -0.807734649  1.910748796  1.268459591  0.451900919
 [51]  1.582515058 -0.500730151  1.904207800 -0.440214335  0.405414226
 [56]  0.008853868 -0.189445982  1.730053195 -1.757677743  0.648103189
 [61]  1.093165306  0.039412972  1.551318313 -1.143677317  0.561158463
 [66]  0.280159851 -1.778984524 -1.003204300  0.289172591  1.237734914
 [71] -1.505478030  0.443184920  1.084824936  0.027230626 -0.019148108
 [76] -1.945916562  0.302093017  0.328091995  0.567015206  1.148935482
 [81] -0.719111436 -1.322588628 -1.210568878  0.649806958  0.766002180
 [86]  0.038143888  1.374614758 -1.432908259 -0.403353261 -0.895212543
 [91]  0.586496660  0.037862452 -0.997465377 -1.042396357  0.040506733
 [96]  0.701672948  0.211496918 -0.988343582 -0.355189464  0.481418076
> colRanges(tmp)
           [,1]       [,2]      [,3]      [,4]      [,5]       [,6]       [,7]
[1,] 0.07848223 -0.9281205 -1.540397 0.6325993 0.1189582 -0.8720033 -0.5111582
[2,] 0.07848223 -0.9281205 -1.540397 0.6325993 0.1189582 -0.8720033 -0.5111582
          [,8]       [,9]     [,10]    [,11]     [,12]     [,13]     [,14]
[1,] 0.7126549 0.03424778 0.6849751 1.463264 0.1159044 0.1194615 0.5402965
[2,] 0.7126549 0.03424778 0.6849751 1.463264 0.1159044 0.1194615 0.5402965
          [,15]      [,16]     [,17]      [,18]     [,19]      [,20]     [,21]
[1,] -0.2796725 -0.3782083 -1.662199 -0.7798011 -1.331237 -0.4116692 -1.568399
[2,] -0.2796725 -0.3782083 -1.662199 -0.7798011 -1.331237 -0.4116692 -1.568399
          [,22]     [,23]    [,24]     [,25]     [,26]      [,27]     [,28]
[1,] -0.8593308 0.5714922 1.406979 0.2724763 0.4154742 -0.4956692 0.4445373
[2,] -0.8593308 0.5714922 1.406979 0.2724763 0.4154742 -0.4956692 0.4445373
        [,29]     [,30]     [,31]     [,32]     [,33]     [,34]      [,35]
[1,] 1.170071 0.9991464 0.9116305 -1.257038 0.6713316 -0.239125 -0.4640778
[2,] 1.170071 0.9991464 0.9116305 -1.257038 0.6713316 -0.239125 -0.4640778
         [,36]     [,37]      [,38]     [,39]      [,40]     [,41]     [,42]
[1,] -1.344713 -0.803636 -0.9014455 -1.520503 -0.4570987 0.5050145 0.1154298
[2,] -1.344713 -0.803636 -0.9014455 -1.520503 -0.4570987 0.5050145 0.1154298
         [,43]   [,44]     [,45]      [,46]      [,47]    [,48]   [,49]
[1,] 0.4414715 1.20863 -1.196751 -0.3116325 -0.8077346 1.910749 1.26846
[2,] 0.4414715 1.20863 -1.196751 -0.3116325 -0.8077346 1.910749 1.26846
         [,50]    [,51]      [,52]    [,53]      [,54]     [,55]       [,56]
[1,] 0.4519009 1.582515 -0.5007302 1.904208 -0.4402143 0.4054142 0.008853868
[2,] 0.4519009 1.582515 -0.5007302 1.904208 -0.4402143 0.4054142 0.008853868
         [,57]    [,58]     [,59]     [,60]    [,61]      [,62]    [,63]
[1,] -0.189446 1.730053 -1.757678 0.6481032 1.093165 0.03941297 1.551318
[2,] -0.189446 1.730053 -1.757678 0.6481032 1.093165 0.03941297 1.551318
         [,64]     [,65]     [,66]     [,67]     [,68]     [,69]    [,70]
[1,] -1.143677 0.5611585 0.2801599 -1.778985 -1.003204 0.2891726 1.237735
[2,] -1.143677 0.5611585 0.2801599 -1.778985 -1.003204 0.2891726 1.237735
         [,71]     [,72]    [,73]      [,74]       [,75]     [,76]    [,77]
[1,] -1.505478 0.4431849 1.084825 0.02723063 -0.01914811 -1.945917 0.302093
[2,] -1.505478 0.4431849 1.084825 0.02723063 -0.01914811 -1.945917 0.302093
        [,78]     [,79]    [,80]      [,81]     [,82]     [,83]    [,84]
[1,] 0.328092 0.5670152 1.148935 -0.7191114 -1.322589 -1.210569 0.649807
[2,] 0.328092 0.5670152 1.148935 -0.7191114 -1.322589 -1.210569 0.649807
         [,85]      [,86]    [,87]     [,88]      [,89]      [,90]     [,91]
[1,] 0.7660022 0.03814389 1.374615 -1.432908 -0.4033533 -0.8952125 0.5864967
[2,] 0.7660022 0.03814389 1.374615 -1.432908 -0.4033533 -0.8952125 0.5864967
          [,92]      [,93]     [,94]      [,95]     [,96]     [,97]      [,98]
[1,] 0.03786245 -0.9974654 -1.042396 0.04050673 0.7016729 0.2114969 -0.9883436
[2,] 0.03786245 -0.9974654 -1.042396 0.04050673 0.7016729 0.2114969 -0.9883436
          [,99]    [,100]
[1,] -0.3551895 0.4814181
[2,] -0.3551895 0.4814181
> 
> 
> Max(tmp2)
[1] 1.67617
> Min(tmp2)
[1] -3.204137
> mean(tmp2)
[1] -0.0224827
> Sum(tmp2)
[1] -2.24827
> Var(tmp2)
[1] 0.9090627
> 
> rowMeans(tmp2)
  [1]  0.43478771  1.47974411 -0.39860967 -0.34173000 -0.52393744  1.09028336
  [7]  1.13265838 -1.14819143 -0.66723304 -0.12499104  0.04061691 -0.59934721
 [13]  0.88666629  0.05551185 -1.63196150  0.65369050  0.24048190  0.62678692
 [19] -0.68880372 -0.07071675 -0.11541751  1.24976708 -2.13511388 -0.35821315
 [25]  0.04460318 -1.55159391 -0.28608720 -0.02064841  0.90215905  0.46619122
 [31] -0.25921933 -0.70491403 -0.40454710  0.45359702 -0.91480794  0.12190792
 [37] -0.90713104 -0.35746734  0.21164082  0.11410864  1.32365950 -0.81596471
 [43] -0.11993752  0.91351343  0.81420998  1.53535481  0.53957086 -0.33672530
 [49]  0.39931605 -0.65178674  0.09119851 -0.67757802  1.48496081  1.22853605
 [55]  0.59041858 -0.11513704 -0.53960161 -1.23685341 -0.89986007  1.67617035
 [61] -1.03553026 -1.14609590 -0.61537718  0.22625033  0.57147921 -0.41273412
 [67] -0.36577172 -0.40633889  0.34979181 -1.96027981 -3.20413734 -0.57956578
 [73]  0.86056540 -1.02804583  1.32555776  0.56114956 -0.25874191 -1.57150075
 [79]  1.20641393  0.19077670  1.35020079  0.60349595  0.05635594  1.40209396
 [85] -0.57487504 -0.93666595  0.74164131  0.63435975  0.56872217 -0.97855747
 [91] -1.34306174 -1.88585405  1.19471278  0.10018110  1.37706419  0.48371229
 [97]  0.04465220  0.78520113 -1.40744470  1.62994514
> rowSums(tmp2)
  [1]  0.43478771  1.47974411 -0.39860967 -0.34173000 -0.52393744  1.09028336
  [7]  1.13265838 -1.14819143 -0.66723304 -0.12499104  0.04061691 -0.59934721
 [13]  0.88666629  0.05551185 -1.63196150  0.65369050  0.24048190  0.62678692
 [19] -0.68880372 -0.07071675 -0.11541751  1.24976708 -2.13511388 -0.35821315
 [25]  0.04460318 -1.55159391 -0.28608720 -0.02064841  0.90215905  0.46619122
 [31] -0.25921933 -0.70491403 -0.40454710  0.45359702 -0.91480794  0.12190792
 [37] -0.90713104 -0.35746734  0.21164082  0.11410864  1.32365950 -0.81596471
 [43] -0.11993752  0.91351343  0.81420998  1.53535481  0.53957086 -0.33672530
 [49]  0.39931605 -0.65178674  0.09119851 -0.67757802  1.48496081  1.22853605
 [55]  0.59041858 -0.11513704 -0.53960161 -1.23685341 -0.89986007  1.67617035
 [61] -1.03553026 -1.14609590 -0.61537718  0.22625033  0.57147921 -0.41273412
 [67] -0.36577172 -0.40633889  0.34979181 -1.96027981 -3.20413734 -0.57956578
 [73]  0.86056540 -1.02804583  1.32555776  0.56114956 -0.25874191 -1.57150075
 [79]  1.20641393  0.19077670  1.35020079  0.60349595  0.05635594  1.40209396
 [85] -0.57487504 -0.93666595  0.74164131  0.63435975  0.56872217 -0.97855747
 [91] -1.34306174 -1.88585405  1.19471278  0.10018110  1.37706419  0.48371229
 [97]  0.04465220  0.78520113 -1.40744470  1.62994514
> 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.43478771  1.47974411 -0.39860967 -0.34173000 -0.52393744  1.09028336
  [7]  1.13265838 -1.14819143 -0.66723304 -0.12499104  0.04061691 -0.59934721
 [13]  0.88666629  0.05551185 -1.63196150  0.65369050  0.24048190  0.62678692
 [19] -0.68880372 -0.07071675 -0.11541751  1.24976708 -2.13511388 -0.35821315
 [25]  0.04460318 -1.55159391 -0.28608720 -0.02064841  0.90215905  0.46619122
 [31] -0.25921933 -0.70491403 -0.40454710  0.45359702 -0.91480794  0.12190792
 [37] -0.90713104 -0.35746734  0.21164082  0.11410864  1.32365950 -0.81596471
 [43] -0.11993752  0.91351343  0.81420998  1.53535481  0.53957086 -0.33672530
 [49]  0.39931605 -0.65178674  0.09119851 -0.67757802  1.48496081  1.22853605
 [55]  0.59041858 -0.11513704 -0.53960161 -1.23685341 -0.89986007  1.67617035
 [61] -1.03553026 -1.14609590 -0.61537718  0.22625033  0.57147921 -0.41273412
 [67] -0.36577172 -0.40633889  0.34979181 -1.96027981 -3.20413734 -0.57956578
 [73]  0.86056540 -1.02804583  1.32555776  0.56114956 -0.25874191 -1.57150075
 [79]  1.20641393  0.19077670  1.35020079  0.60349595  0.05635594  1.40209396
 [85] -0.57487504 -0.93666595  0.74164131  0.63435975  0.56872217 -0.97855747
 [91] -1.34306174 -1.88585405  1.19471278  0.10018110  1.37706419  0.48371229
 [97]  0.04465220  0.78520113 -1.40744470  1.62994514
> rowMin(tmp2)
  [1]  0.43478771  1.47974411 -0.39860967 -0.34173000 -0.52393744  1.09028336
  [7]  1.13265838 -1.14819143 -0.66723304 -0.12499104  0.04061691 -0.59934721
 [13]  0.88666629  0.05551185 -1.63196150  0.65369050  0.24048190  0.62678692
 [19] -0.68880372 -0.07071675 -0.11541751  1.24976708 -2.13511388 -0.35821315
 [25]  0.04460318 -1.55159391 -0.28608720 -0.02064841  0.90215905  0.46619122
 [31] -0.25921933 -0.70491403 -0.40454710  0.45359702 -0.91480794  0.12190792
 [37] -0.90713104 -0.35746734  0.21164082  0.11410864  1.32365950 -0.81596471
 [43] -0.11993752  0.91351343  0.81420998  1.53535481  0.53957086 -0.33672530
 [49]  0.39931605 -0.65178674  0.09119851 -0.67757802  1.48496081  1.22853605
 [55]  0.59041858 -0.11513704 -0.53960161 -1.23685341 -0.89986007  1.67617035
 [61] -1.03553026 -1.14609590 -0.61537718  0.22625033  0.57147921 -0.41273412
 [67] -0.36577172 -0.40633889  0.34979181 -1.96027981 -3.20413734 -0.57956578
 [73]  0.86056540 -1.02804583  1.32555776  0.56114956 -0.25874191 -1.57150075
 [79]  1.20641393  0.19077670  1.35020079  0.60349595  0.05635594  1.40209396
 [85] -0.57487504 -0.93666595  0.74164131  0.63435975  0.56872217 -0.97855747
 [91] -1.34306174 -1.88585405  1.19471278  0.10018110  1.37706419  0.48371229
 [97]  0.04465220  0.78520113 -1.40744470  1.62994514
> 
> colMeans(tmp2)
[1] -0.0224827
> colSums(tmp2)
[1] -2.24827
> colVars(tmp2)
[1] 0.9090627
> colSd(tmp2)
[1] 0.9534478
> colMax(tmp2)
[1] 1.67617
> colMin(tmp2)
[1] -3.204137
> colMedians(tmp2)
[1] 0.04261004
> colRanges(tmp2)
          [,1]
[1,] -3.204137
[2,]  1.676170
> 
> 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.7438947  1.8118100  4.3978516 -0.5091717 -4.0295876 -0.8474091
 [7] -0.6336609 -0.4051156  2.4658972 -1.2044572
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.9364402
[2,] -0.6726488
[3,] -0.1817944
[4,]  0.3754228
[5,]  1.3712041
> 
> rowApply(tmp,sum)
 [1]  2.96361192  2.20365172 -5.75669566  4.12084127  0.05759331 -3.09527140
 [7] -0.28543548 -0.57037852 -1.02904727  0.69339221
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    2    4    3   10    3    6    7    9    1     4
 [2,]    5    9    4    5    7   10    2    6    3     9
 [3,]    6   10   10    4    8    5    3    8    4    10
 [4,]    3    2    9    7    4    8    8    3    5     1
 [5,]    1    3    1    9    9    3    9    4    7     2
 [6,]    4    8    5    1   10    9    1    5    6     8
 [7,]   10    5    2    3    6    4    5    2   10     3
 [8,]    9    7    8    6    5    1   10    1    2     7
 [9,]    8    6    6    8    2    7    4    7    8     5
[10,]    7    1    7    2    1    2    6   10    9     6
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1]  0.1008665  0.6440996  0.8634949 -3.1392527 -4.5058361 -0.6783987
 [7] -1.7830640 -2.2491818 -1.4079351 -0.5377230  1.9825680  2.0285525
[13] -3.9465288 -1.1735175  2.3556394  3.0151219  0.2337230  0.6676985
[19] -0.2526639  0.4388722
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.2788961
[2,] -0.4491295
[3,]  0.3197870
[4,]  0.7263752
[5,]  0.7827299
> 
> rowApply(tmp,sum)
[1] -6.7034342 -0.2089957  2.2852714 -0.9542010 -1.7621054
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]    3   15   17   10   15
[2,]   14    3   14   12   17
[3,]    4    7   19   16    9
[4,]   13   10    8    2    2
[5,]    9    8    1    3    3
> 
> 
> as.matrix(tmp)
           [,1]         [,2]       [,3]        [,4]       [,5]       [,6]
[1,] -1.2788961 -0.022916157 -0.9539761 -0.08359956 -0.5425285 -0.6198232
[2,]  0.3197870 -0.895804672 -0.3061612 -0.11127000 -0.2645172 -0.4917262
[3,]  0.7827299  0.716095711  1.5191174  0.01020905 -1.5194261 -0.7355696
[4,] -0.4491295 -0.009236321  0.9179664 -1.10178816 -0.9748480  1.7811469
[5,]  0.7263752  0.855961059 -0.3134515 -1.85280406 -1.2045162 -0.6124265
           [,7]       [,8]       [,9]       [,10]      [,11]      [,12]
[1,] -0.5513668 -2.3442118 -0.2690526  1.74368327  0.4434813  0.8592163
[2,] -0.2309024  0.8681486 -1.2345943  0.05166409 -0.3250229  0.1298793
[3,]  0.4494188  0.7596127 -0.5887128 -0.87388844  1.6067766 -1.5104016
[4,] -0.8239159  1.0416068  0.2369445 -1.50051937 -0.5513852  2.1720682
[5,] -0.6262977 -2.5743382  0.4474800  0.04133743  0.8087183  0.3777904
          [,13]      [,14]      [,15]      [,16]       [,17]      [,18]
[1,] -1.9083884  0.1198435 -0.6796385 -0.4659616  0.82547757  0.2490434
[2,] -1.4597919 -0.6359614  0.8749565  0.9637663  0.05797304  1.2687839
[3,]  0.1988689 -0.3859520  1.0266522  0.3699674  0.35054924  0.4899282
[4,] -0.1085256  0.7170942 -0.8811644  1.1474341 -0.83177617 -0.8681374
[5,] -0.6686918 -0.9885417  2.0148337  0.9999156 -0.16850066 -0.4719195
           [,19]      [,20]
[1,] -0.83644526 -0.3873749
[2,]  1.31397358 -0.1021759
[3,] -1.12923224  0.7485281
[4,]  0.04362853 -0.9116645
[5,]  0.35541153  1.0915594
> 
> 
> is.BufferedMatrix(tmp)
[1] TRUE
> 
> as.BufferedMatrix(as.matrix(tmp))
BufferedMatrix object
Matrix size:  5 20 
Buffer size:  1 1 
Directory:    /Users/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:    /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  655  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  567  bytes.
Disk usage :  160  bytes.
> subBufferedMatrix(tmp,1:3,)
BufferedMatrix object
Matrix size:  3 20 
Buffer size:  1 1 
Directory:    /Users/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.02729558 1.405963 0.2592048 0.6576818 -0.2077211 1.223647 0.05166291
          col8      col9   col10     col11      col12     col13    col14
row1 -2.158435 0.5048047 1.20532 -0.265535 -0.9494859 0.0829037 1.006601
         col15     col16     col17      col18      col19    col20
row1 0.3184526 -1.781521 -1.266628 0.05675986 -0.3656424 1.123368
> tmp[,"col10"]
          col10
row1  1.2053201
row2  0.9388369
row3 -1.4220685
row4  0.4972253
row5  0.9983548
> tmp[c("row1","row5"),]
           col1     col2       col3      col4       col5     col6        col7
row1 0.02729558 1.405963  0.2592048 0.6576818 -0.2077211 1.223647  0.05166291
row5 0.52194276 1.408194 -0.5317153 0.8741244  0.5757025 0.294417 -1.08722739
           col8      col9     col10     col11      col12     col13      col14
row1 -2.1584347 0.5048047 1.2053201 -0.265535 -0.9494859 0.0829037  1.0066009
row5  0.2937769 0.5322890 0.9983548  2.140555 -2.1486682 1.4805348 -0.2036449
         col15      col16      col17       col18      col19      col20
row1 0.3184526 -1.7815210 -1.2666276  0.05675986 -0.3656424 1.12336797
row5 0.1196736  0.9340682 -0.6104031 -1.02853044  0.7157893 0.05526726
> tmp[,c("col6","col20")]
           col6      col20
row1  1.2236466 1.12336797
row2  1.5386455 0.97011211
row3 -0.7108664 1.07552247
row4 -0.2605030 0.79243867
row5  0.2944170 0.05526726
> tmp[c("row1","row5"),c("col6","col20")]
         col6      col20
row1 1.223647 1.12336797
row5 0.294417 0.05526726
> 
> 
> 
> 
> tmp["row1",] <- rnorm(20,mean=10)
> tmp[,"col10"] <- rnorm(5,mean=30)
> tmp[c("row1","row5"),] <- rnorm(40,mean=50)
> tmp[,c("col6","col20")] <- rnorm(10,mean=75)
> tmp[c("row1","row5"),c("col6","col20")]  <- rnorm(4,mean=105)
> 
> tmp["row1",]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 49.89035 51.32689 49.72338 46.29479 50.26776 103.9283 49.53592 49.13774
         col9    col10   col11    col12    col13    col14    col15    col16
row1 49.26001 49.77671 48.1726 50.84944 50.84039 50.89419 49.17928 49.89902
        col17    col18    col19    col20
row1 50.33555 49.33046 51.62099 105.0125
> tmp[,"col10"]
        col10
row1 49.77671
row2 30.28406
row3 30.43287
row4 30.67080
row5 50.40035
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 49.89035 51.32689 49.72338 46.29479 50.26776 103.9283 49.53592 49.13774
row5 51.86569 50.26874 49.22040 49.39712 49.02024 105.3583 50.63343 49.57386
         col9    col10    col11    col12    col13    col14    col15    col16
row1 49.26001 49.77671 48.17260 50.84944 50.84039 50.89419 49.17928 49.89902
row5 50.22587 50.40035 50.34694 50.48222 48.74445 49.77756 50.65991 50.20449
        col17    col18    col19    col20
row1 50.33555 49.33046 51.62099 105.0125
row5 50.28523 49.35137 50.82065 105.8454
> tmp[,c("col6","col20")]
          col6     col20
row1 103.92829 105.01252
row2  75.80358  74.60289
row3  75.58579  73.05653
row4  72.23171  75.24232
row5 105.35834 105.84540
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 103.9283 105.0125
row5 105.3583 105.8454
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 103.9283 105.0125
row5 105.3583 105.8454
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,] -0.4095230
[2,] -1.0676392
[3,]  0.2650336
[4,]  1.3160478
[5,]  0.7274828
> tmp[,c("col17","col7")]
          col17       col7
[1,] -0.7691606 -0.4130799
[2,] -1.4443185 -0.8527765
[3,]  0.1279721 -1.4602970
[4,] -1.0916362 -0.5589963
[5,]  1.5770961  0.7686465
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6       col20
[1,]  0.2223650  0.51914775
[2,]  1.0382091 -0.05251287
[3,]  1.1313522  0.43240911
[4,] -0.8385359 -1.13807084
[5,] -0.5841068 -1.40994570
> subBufferedMatrix(tmp,1,c("col6"))[,1]
         col1
[1,] 0.222365
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
         col6
[1,] 0.222365
[2,] 1.038209
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> 
> 
> 
> subBufferedMatrix(tmp,c("row3","row1"),)[,1:20]
          [,1]      [,2]       [,3]       [,4]      [,5]        [,6]       [,7]
row3  1.457406 0.8340323 -1.2462865 -0.5130275 0.4538627 -0.07326326 -0.1805232
row1 -1.192338 0.1145659 -0.3208531 -0.1430830 1.5773370  1.91754095  0.3071380
          [,8]       [,9]       [,10]     [,11]     [,12]     [,13]      [,14]
row3 1.4032061  0.8074411  1.38090922 0.2547329  2.082008 1.9479104 -0.7715174
row1 0.4470385 -0.6906552 -0.06547183 0.2072737 -1.727735 0.6718206  1.5989489
          [,15]      [,16]     [,17]      [,18]     [,19]       [,20]
row3 -0.9988155 0.03429781  1.412017 0.04774232 0.3489014  0.07716814
row1  0.5788735 1.21186919 -1.843532 0.97394677 0.7284330 -0.29569460
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
          [,1]       [,2]       [,3]     [,4]       [,5]       [,6]       [,7]
row2 0.2238655 0.09384494 -0.3409993 1.116803 -0.6553135 0.05419208 -0.5448447
           [,8]      [,9]     [,10]
row2 -0.3669718 0.2780728 0.6783077
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
           [,1]       [,2]      [,3]      [,4]     [,5]      [,6]      [,7]
row5 -0.2424959 -0.5296245 0.8072873 0.9292234 1.232454 -2.013457 -1.976917
           [,8]       [,9]     [,10]      [,11]     [,12]      [,13]     [,14]
row5 -0.8010988 -0.7850246 -1.747174 -0.3393704 -0.645863 -0.5710496 0.5850045
          [,15]      [,16]     [,17]     [,18]      [,19]    [,20]
row5 -0.4166805 -0.6573197 0.3031115 -1.008037 -0.7630937 1.926781
> 
> 
> 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: 0x6000019ac000>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c317b47119"
 [2] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c3476d2c77"
 [3] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c350825d43"
 [4] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c31eb90300"
 [5] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c347404c2" 
 [6] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c35ce45ed6"
 [7] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c3150e633f"
 [8] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c36395c7e5"
 [9] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c37e76be76"
[10] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c325d275d7"
[11] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c31c3689a7"
[12] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c340874169"
[13] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c36fd77597"
[14] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c32a6945de"
[15] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM151c3656a0792"
> 
> 
> ### 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: 0x6000019e0060>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x6000019e0060>
Warning message:
In dir.create(new.directory) :
  '/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x6000019e0060>
> rowMedians(tmp)
  [1] -0.001064878 -0.339950363 -0.249309476  0.004469878 -0.487582837
  [6] -0.300983194 -0.848982711 -0.343545270  0.365954136  0.111489059
 [11] -0.304425960  0.565453749  0.171585788 -0.310736244  0.202431243
 [16] -0.209218070 -0.205371183  0.439445173  0.480119891  0.565804530
 [21] -0.492925231  0.151118026  0.247847615 -0.538040106 -0.008847785
 [26]  0.074347886  0.054994749  0.034055403  0.175911993  0.087269218
 [31] -0.145818897  0.229564301  0.468530741  0.345683764 -0.291823973
 [36]  0.338179656  0.106028884 -0.150763627 -0.236462673  0.200667060
 [41] -0.300004493  0.615407917  0.297143679 -0.039637876  0.256901516
 [46]  0.099658778  0.277397209  0.036613654 -0.242223185  0.254531235
 [51] -0.100275782 -0.026972757  0.389595845  0.025605930 -0.098730822
 [56]  0.351632853  0.172852001 -0.114482225 -0.018322241  0.291808333
 [61] -0.412487894 -0.070426005  0.327893920  0.036903268  0.077146991
 [66] -0.234667424  0.144484275 -0.021405891  0.737782063  0.074831809
 [71]  0.065460009  0.267002575 -0.053931517 -0.313595647 -0.244501985
 [76] -0.315349127  0.115559633 -0.277082834 -0.172570979 -0.221458432
 [81]  0.227747197  0.064460129  0.952650431 -0.319963192 -0.638609609
 [86] -0.013545167 -0.149277575 -0.510761153 -0.066252013  0.224280704
 [91]  0.200599239 -0.632286020 -0.449398622  0.036540032 -0.179969046
 [96]  0.365037831  0.213404940  0.484611720  0.031173299  0.403422437
[101] -0.267834889 -0.250554007 -0.045573020 -0.274021901  0.150106213
[106] -0.450978014 -0.410672368  0.006751153 -0.027851681 -0.075241221
[111]  0.575814689 -0.311989118 -0.078492339  0.498703420  0.106620763
[116]  0.189280939  0.139972336  0.091971714 -0.257468272 -0.073116521
[121] -0.249552911 -0.500760031 -0.156898632  0.004080202  0.365013388
[126]  0.211880650 -0.288781323  0.292447214  0.029692348 -0.211594726
[131] -0.127127034 -0.083417338  0.116957036  0.939919257 -0.367285015
[136]  0.485268424 -0.362086256  0.352576199  0.658443400  0.041880896
[141] -0.134715882  0.440167610  0.314479361  0.101338465 -0.011353658
[146]  0.663535730 -0.195434402 -0.511351064 -0.121703030 -0.270902830
[151]  0.099719265  0.197567392 -0.262899531  0.309327281 -0.214148783
[156] -0.035750908  0.597272466  0.480098087 -0.246699012 -0.113552974
[161] -0.815779738 -0.287175952  0.222285528  0.172137384  0.542057680
[166] -0.467749090 -0.321390429 -0.041545065  0.494496071  0.161459869
[171] -0.400940566  0.117561597 -0.559945364 -0.002866672  0.334603330
[176]  0.180526381  0.219680860 -0.503523988  0.104028151 -0.335235876
[181]  0.359048658 -0.415761223  0.582464460 -0.061134353  0.271058786
[186]  0.325585773  0.371938936 -0.185204592  0.152981710  0.064618697
[191]  0.062519794  0.160634464 -0.363073654  0.939369619  0.198573420
[196]  0.302420628 -0.490762881 -0.206732343 -0.012450085  0.466305059
[201] -0.307743767  0.025964194 -0.220992921  0.225011268 -0.116586498
[206] -0.537538413  0.640380745  0.175564232  0.111879962 -0.106452265
[211] -0.253984469 -0.051660710  0.250047783  0.168234100 -0.333516893
[216] -0.241986136  0.118078382 -0.165785242  0.319570614  0.001400209
[221]  0.144843659 -0.027519398  0.309344297 -0.466957086  0.029214729
[226] -0.492402705 -0.194484229 -0.242516625  0.115014433  0.210186929
> 
> proc.time()
   user  system elapsed 
  2.901  17.342  77.613 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R version 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin20

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: 0x600000dcc000>
> .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: 0x600000dcc000>
> .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: 0x600000dcc000>
> .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: 0x600000dcc000>
> 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: 0x600000dd40c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x600000dd40c0>
> .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: 0x600000dd40c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x600000dd40c0>
> .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: 0x600000dd40c0>
> 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: 0x600000dd0000>
> .Call("R_bm_AddColumn",P)
<pointer: 0x600000dd0000>
> .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: 0x600000dd0000>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x600000dd0000>
> .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: 0x600000dd0000>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x600000dd0000>
> .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: 0x600000dd0000>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x600000dd0000>
> .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: 0x600000dd0000>
> 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: 0x600000dbc000>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x600000dbc000>
> .Call("R_bm_AddColumn",P)
<pointer: 0x600000dbc000>
> .Call("R_bm_AddColumn",P)
<pointer: 0x600000dbc000>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile163952fe14346" "BufferedMatrixFile163956e07c138"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile163952fe14346" "BufferedMatrixFile163956e07c138"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x600000dbc240>
> .Call("R_bm_AddColumn",P)
<pointer: 0x600000dbc240>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x600000dbc240>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x600000dbc240>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x600000dbc240>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x600000dbc240>
> .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: 0x600000de80c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x600000de80c0>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x600000de80c0>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x600000de80c0>
> 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: 0x600000df4000>
> .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: 0x600000df4000>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.296   0.136   0.425 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R version 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin20

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.342   0.100   0.428 

Example timings