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

This page was generated on 2025-10-16 11:38 -0400 (Thu, 16 Oct 2025).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo1Linux (Ubuntu 24.04.3 LTS)x86_644.5.1 (2025-06-13) -- "Great Square Root" 4833
merida1macOS 12.7.6 Montereyx86_644.5.1 RC (2025-06-05 r88288) -- "Great Square Root" 4614
kjohnson1macOS 13.7.5 Venturaarm644.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" 4555
kunpeng2Linux (openEuler 24.03 LTS)aarch64R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" 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 252/2341HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.72.0  (landing page)
Ben Bolstad
Snapshot Date: 2025-10-13 13:40 -0400 (Mon, 13 Oct 2025)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: RELEASE_3_21
git_last_commit: aa9e634
git_last_commit_date: 2025-04-15 09:39:39 -0400 (Tue, 15 Apr 2025)
nebbiolo1Linux (Ubuntu 24.04.3 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
merida1macOS 12.7.6 Monterey / x86_64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kjohnson1macOS 13.7.5 Ventura / arm64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kunpeng2Linux (openEuler 24.03 LTS) / aarch64  OK    OK    OK  


CHECK results for BufferedMatrix on merida1

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.72.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.72.0.tar.gz
StartedAt: 2025-10-14 00:56:46 -0400 (Tue, 14 Oct 2025)
EndedAt: 2025-10-14 00:58:02 -0400 (Tue, 14 Oct 2025)
EllapsedTime: 76.2 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.72.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck’
* using R version 4.5.1 RC (2025-06-05 r88288)
* 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.72.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.21-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.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.21-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.72.0’
** using staged installation
** libs
using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’
using SDK: ‘MacOSX11.3.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 RC (2025-06-05 r88288) -- "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.575   0.203   0.758 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R version 4.5.1 RC (2025-06-05 r88288) -- "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.21-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 480849 25.7    1056621 56.5         NA   634465 33.9
Vcells 891080  6.8    8388608 64.0      65536  2108740 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] "Tue Oct 14 00:57:20 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] "Tue Oct 14 00:57:21 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: 0x600002c48000>
> 
> 
> 
> 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] "Tue Oct 14 00:57:28 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] "Tue Oct 14 00:57:31 2025"
> 
> ColMode(tmp2)
<pointer: 0x600002c48000>
> 
> 
> 
> ### Now testing assignments
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+ 
+   new.data <- rnorm(20)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,] <- new.data
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   new.data <- rnorm(10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+ 
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[,which.col] <- new.data
+   test.matrix[,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.col <- which.col
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   new.data <- matrix(rnorm(50),5,10)
+   tmp2[which.row,] <- new.data
+   test.matrix[which.row,]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+ }
> 
> 
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col  <- sample(1:20,5,replace=TRUE)
+   new.data <- matrix(rnorm(25),5,5)
+   tmp2[which.row,which.col] <- new.data
+   test.matrix[which.row,which.col]<- new.data
+   
+   if (rep > 1){
+     if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){
+       cat("incorrect agreement")
+       break;
+     }
+   }
+   prev.row <- which.row
+   prev.col <- which.col
+ }
> 
> 
> 
> 
> ###
> ###
> ### testing some more functions
> ###
> 
> 
> 
> ## duplication function
> tmp5 <- duplicate(tmp2)
> 
> # making sure really did copy everything.
> tmp5[1,1] <- tmp5[1,1] +100.00
> 
> if (tmp5[1,1] == tmp2[1,1]){
+   stop("Problem with duplication")
+ }
> 
> 
> 
> 
> ### testing elementwise applying of functions
> 
> tmp5[1:4,1:4]
           [,1]       [,2]        [,3]       [,4]
[1,] 99.6864316  3.0467593  0.07487724  1.7748525
[2,]  1.0844363  0.6127982 -0.15486872  0.5912668
[3,] -0.6980916  1.2121693 -0.41852799 -0.6258008
[4,] -0.2922984 -1.0588463  2.10662049 -0.7946823
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
           [,1]      [,2]       [,3]      [,4]
[1,] 99.6864316 3.0467593 0.07487724 1.7748525
[2,]  1.0844363 0.6127982 0.15486872 0.5912668
[3,]  0.6980916 1.2121693 0.41852799 0.6258008
[4,]  0.2922984 1.0588463 2.10662049 0.7946823
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]      [,2]      [,3]      [,4]
[1,] 9.9843093 1.7454969 0.2736371 1.3322359
[2,] 1.0413627 0.7828143 0.3935336 0.7689388
[3,] 0.8355188 1.1009856 0.6469374 0.7910757
[4,] 0.5406462 1.0290026 1.4514202 0.8914495
> 
> 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.21-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 224.52952 45.50173 27.81125 40.09721
[2,]  36.49806 33.44094 29.09021 33.28065
[3,]  34.05328 37.22203 31.88790 33.53656
[4,]  30.69876 36.34887 41.62082 34.70918
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x600002c7c0c0>
> exp(tmp5)
<pointer: 0x600002c7c0c0>
> log(tmp5,2)
<pointer: 0x600002c7c0c0>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 467.3288
> Min(tmp5)
[1] 53.21017
> mean(tmp5)
[1] 72.90415
> Sum(tmp5)
[1] 14580.83
> Var(tmp5)
[1] 859.4349
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 89.06300 71.37665 70.12251 71.31681 71.87003 70.16178 71.00060 71.10184
 [9] 70.27453 72.75375
> rowSums(tmp5)
 [1] 1781.260 1427.533 1402.450 1426.336 1437.401 1403.236 1420.012 1422.037
 [9] 1405.491 1455.075
> rowVars(tmp5)
 [1] 8023.58761   45.62319   62.47906   72.63300   70.75420  108.22356
 [7]   48.63632   61.04377  108.45994   88.32720
> rowSd(tmp5)
 [1] 89.574481  6.754494  7.904369  8.522499  8.411552 10.403055  6.973974
 [8]  7.813051 10.414410  9.398255
> rowMax(tmp5)
 [1] 467.32879  82.19013  82.95261  86.90222  88.05915  93.31769  87.61246
 [8]  87.50941  89.32992  94.92410
> rowMin(tmp5)
 [1] 56.72026 57.34516 55.19291 59.11401 55.29387 55.38851 56.82417 57.13455
 [9] 53.21017 56.44008
> 
> colMeans(tmp5)
 [1] 113.09854  73.35202  69.83224  76.49297  70.93127  75.22437  64.41761
 [8]  73.49437  71.82126  72.96672  71.48272  67.53282  69.48560  70.83590
[15]  67.03168  71.40923  71.46035  69.88617  69.57655  67.75061
> colSums(tmp5)
 [1] 1130.9854  733.5202  698.3224  764.9297  709.3127  752.2437  644.1761
 [8]  734.9437  718.2126  729.6672  714.8272  675.3282  694.8560  708.3590
[15]  670.3168  714.0923  714.6035  698.8617  695.7655  677.5061
> colVars(tmp5)
 [1] 15516.21944   118.06174    96.04412    65.68730    68.62614   107.58228
 [7]    29.96059    95.36198    29.28307    63.23742    67.95938    45.75094
[13]    83.34640   109.40280    42.11218    38.67665    88.08867   127.74240
[19]    75.80629    74.87967
> colSd(tmp5)
 [1] 124.564118  10.865622   9.800210   8.104770   8.284090  10.372188
 [7]   5.473627   9.765346   5.411383   7.952196   8.243748   6.763944
[13]   9.129425  10.459579   6.489390   6.219055   9.385557  11.302319
[19]   8.706681   8.653304
> colMax(tmp5)
 [1] 467.32879  94.70588  86.62829  94.92410  87.61246  87.50941  73.71000
 [8]  89.32992  79.24439  83.20877  85.48942  78.91109  81.33473  88.05915
[15]  75.34558  79.19254  84.52800  93.31769  81.69050  77.82372
> colMin(tmp5)
 [1] 63.89545 56.95063 55.63823 69.26932 61.89084 53.80289 56.72026 56.90889
 [9] 64.31416 60.25560 60.28508 55.19291 57.05516 53.70511 55.29387 56.96368
[17] 53.21017 56.82083 56.44008 55.38851
> 
> 
> ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default)
> 
> 
> which.row <- sample(1:10,1,replace=TRUE)
> which.col  <- sample(1:20,1,replace=TRUE)
> 
> tmp5[which.row,which.col] <- NA
> 
> Max(tmp5)
[1] NA
> Min(tmp5)
[1] NA
> mean(tmp5)
[1] NA
> Sum(tmp5)
[1] NA
> Var(tmp5)
[1] NA
> 
> rowMeans(tmp5)
 [1] 89.06300 71.37665       NA 71.31681 71.87003 70.16178 71.00060 71.10184
 [9] 70.27453 72.75375
> rowSums(tmp5)
 [1] 1781.260 1427.533       NA 1426.336 1437.401 1403.236 1420.012 1422.037
 [9] 1405.491 1455.075
> rowVars(tmp5)
 [1] 8023.58761   45.62319   65.68679   72.63300   70.75420  108.22356
 [7]   48.63632   61.04377  108.45994   88.32720
> rowSd(tmp5)
 [1] 89.574481  6.754494  8.104739  8.522499  8.411552 10.403055  6.973974
 [8]  7.813051 10.414410  9.398255
> rowMax(tmp5)
 [1] 467.32879  82.19013        NA  86.90222  88.05915  93.31769  87.61246
 [8]  87.50941  89.32992  94.92410
> rowMin(tmp5)
 [1] 56.72026 57.34516       NA 59.11401 55.29387 55.38851 56.82417 57.13455
 [9] 53.21017 56.44008
> 
> colMeans(tmp5)
 [1] 113.09854  73.35202  69.83224  76.49297  70.93127  75.22437  64.41761
 [8]  73.49437  71.82126  72.96672        NA  67.53282  69.48560  70.83590
[15]  67.03168  71.40923  71.46035  69.88617  69.57655  67.75061
> colSums(tmp5)
 [1] 1130.9854  733.5202  698.3224  764.9297  709.3127  752.2437  644.1761
 [8]  734.9437  718.2126  729.6672        NA  675.3282  694.8560  708.3590
[15]  670.3168  714.0923  714.6035  698.8617  695.7655  677.5061
> colVars(tmp5)
 [1] 15516.21944   118.06174    96.04412    65.68730    68.62614   107.58228
 [7]    29.96059    95.36198    29.28307    63.23742          NA    45.75094
[13]    83.34640   109.40280    42.11218    38.67665    88.08867   127.74240
[19]    75.80629    74.87967
> colSd(tmp5)
 [1] 124.564118  10.865622   9.800210   8.104770   8.284090  10.372188
 [7]   5.473627   9.765346   5.411383   7.952196         NA   6.763944
[13]   9.129425  10.459579   6.489390   6.219055   9.385557  11.302319
[19]   8.706681   8.653304
> colMax(tmp5)
 [1] 467.32879  94.70588  86.62829  94.92410  87.61246  87.50941  73.71000
 [8]  89.32992  79.24439  83.20877        NA  78.91109  81.33473  88.05915
[15]  75.34558  79.19254  84.52800  93.31769  81.69050  77.82372
> colMin(tmp5)
 [1] 63.89545 56.95063 55.63823 69.26932 61.89084 53.80289 56.72026 56.90889
 [9] 64.31416 60.25560       NA 55.19291 57.05516 53.70511 55.29387 56.96368
[17] 53.21017 56.82083 56.44008 55.38851
> 
> Max(tmp5,na.rm=TRUE)
[1] 467.3288
> Min(tmp5,na.rm=TRUE)
[1] 53.21017
> mean(tmp5,na.rm=TRUE)
[1] 72.92879
> Sum(tmp5,na.rm=TRUE)
[1] 14512.83
> Var(tmp5,na.rm=TRUE)
[1] 863.6535
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 89.06300 71.37665 70.23419 71.31681 71.87003 70.16178 71.00060 71.10184
 [9] 70.27453 72.75375
> rowSums(tmp5,na.rm=TRUE)
 [1] 1781.260 1427.533 1334.450 1426.336 1437.401 1403.236 1420.012 1422.037
 [9] 1405.491 1455.075
> rowVars(tmp5,na.rm=TRUE)
 [1] 8023.58761   45.62319   65.68679   72.63300   70.75420  108.22356
 [7]   48.63632   61.04377  108.45994   88.32720
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.574481  6.754494  8.104739  8.522499  8.411552 10.403055  6.973974
 [8]  7.813051 10.414410  9.398255
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.32879  82.19013  82.95261  86.90222  88.05915  93.31769  87.61246
 [8]  87.50941  89.32992  94.92410
> rowMin(tmp5,na.rm=TRUE)
 [1] 56.72026 57.34516 55.19291 59.11401 55.29387 55.38851 56.82417 57.13455
 [9] 53.21017 56.44008
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 113.09854  73.35202  69.83224  76.49297  70.93127  75.22437  64.41761
 [8]  73.49437  71.82126  72.96672  71.86963  67.53282  69.48560  70.83590
[15]  67.03168  71.40923  71.46035  69.88617  69.57655  67.75061
> colSums(tmp5,na.rm=TRUE)
 [1] 1130.9854  733.5202  698.3224  764.9297  709.3127  752.2437  644.1761
 [8]  734.9437  718.2126  729.6672  646.8267  675.3282  694.8560  708.3590
[15]  670.3168  714.0923  714.6035  698.8617  695.7655  677.5061
> colVars(tmp5,na.rm=TRUE)
 [1] 15516.21944   118.06174    96.04412    65.68730    68.62614   107.58228
 [7]    29.96059    95.36198    29.28307    63.23742    74.77017    45.75094
[13]    83.34640   109.40280    42.11218    38.67665    88.08867   127.74240
[19]    75.80629    74.87967
> colSd(tmp5,na.rm=TRUE)
 [1] 124.564118  10.865622   9.800210   8.104770   8.284090  10.372188
 [7]   5.473627   9.765346   5.411383   7.952196   8.646975   6.763944
[13]   9.129425  10.459579   6.489390   6.219055   9.385557  11.302319
[19]   8.706681   8.653304
> colMax(tmp5,na.rm=TRUE)
 [1] 467.32879  94.70588  86.62829  94.92410  87.61246  87.50941  73.71000
 [8]  89.32992  79.24439  83.20877  85.48942  78.91109  81.33473  88.05915
[15]  75.34558  79.19254  84.52800  93.31769  81.69050  77.82372
> colMin(tmp5,na.rm=TRUE)
 [1] 63.89545 56.95063 55.63823 69.26932 61.89084 53.80289 56.72026 56.90889
 [9] 64.31416 60.25560 60.28508 55.19291 57.05516 53.70511 55.29387 56.96368
[17] 53.21017 56.82083 56.44008 55.38851
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 89.06300 71.37665      NaN 71.31681 71.87003 70.16178 71.00060 71.10184
 [9] 70.27453 72.75375
> rowSums(tmp5,na.rm=TRUE)
 [1] 1781.260 1427.533    0.000 1426.336 1437.401 1403.236 1420.012 1422.037
 [9] 1405.491 1455.075
> rowVars(tmp5,na.rm=TRUE)
 [1] 8023.58761   45.62319         NA   72.63300   70.75420  108.22356
 [7]   48.63632   61.04377  108.45994   88.32720
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.574481  6.754494        NA  8.522499  8.411552 10.403055  6.973974
 [8]  7.813051 10.414410  9.398255
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.32879  82.19013        NA  86.90222  88.05915  93.31769  87.61246
 [8]  87.50941  89.32992  94.92410
> rowMin(tmp5,na.rm=TRUE)
 [1] 56.72026 57.34516       NA 59.11401 55.29387 55.38851 56.82417 57.13455
 [9] 53.21017 56.44008
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 117.78977  72.89416  70.21688  77.23642  71.32547  74.36568  63.38512
 [8]  74.19069  72.65538  72.16108       NaN  68.90393  68.44113  71.14845
[15]  66.63412  73.01430  70.56587  71.33787  69.34254  66.78594
> colSums(tmp5,na.rm=TRUE)
 [1] 1060.1079  656.0474  631.9519  695.1278  641.9292  669.2911  570.4661
 [8]  667.7162  653.8984  649.4497    0.0000  620.1353  615.9702  640.3360
[15]  599.7071  657.1287  635.0928  642.0408  624.0828  601.0735
> colVars(tmp5,na.rm=TRUE)
 [1] 17208.16063   130.46105   106.38523    67.68019    75.45624   112.73484
 [7]    21.71281   101.82750    25.11614    63.84008          NA    30.32070
[13]    81.49206   121.97918    45.59813    14.52873    90.09877   120.00145
[19]    84.66599    73.77061
> colSd(tmp5,na.rm=TRUE)
 [1] 131.179879  11.421955  10.314322   8.226797   8.686555  10.617666
 [7]   4.659700  10.090961   5.011601   7.989999         NA   5.506424
[13]   9.027295  11.044418   6.752639   3.811657   9.492037  10.954517
[19]   9.201412   8.588982
> colMax(tmp5,na.rm=TRUE)
 [1] 467.32879  94.70588  86.62829  94.92410  87.61246  87.50941  68.18591
 [8]  89.32992  79.24439  83.20877      -Inf  78.91109  81.33473  88.05915
[15]  75.34558  79.19254  84.52800  93.31769  81.69050  77.82372
> colMin(tmp5,na.rm=TRUE)
 [1] 63.89545 56.95063 55.63823 69.26932 61.89084 53.80289 56.72026 56.90889
 [9] 64.89869 60.25560      Inf 60.60047 57.05516 53.70511 55.29387 66.25654
[17] 53.21017 59.18801 56.44008 55.38851
> 
> 
> 
> 
> 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] 229.9115 190.8664 147.0501 221.4971 228.8857 292.0697 218.9553 217.9360
 [9] 234.9761 109.8400
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 229.9115 190.8664 147.0501 221.4971 228.8857 292.0697 218.9553 217.9360
 [9] 234.9761 109.8400
> 
> 
> 
> 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  1.421085e-13  3.410605e-13 -2.842171e-14
 [6] -1.421085e-13 -3.410605e-13 -2.273737e-13 -2.842171e-14  0.000000e+00
[11]  1.136868e-13 -2.842171e-14  2.842171e-14  8.526513e-14  1.136868e-13
[16] -8.526513e-14  5.684342e-14 -2.842171e-14  0.000000e+00 -5.684342e-14
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## making sure these things agree
> ##
> ## first when there is no NA
> 
> 
> 
> agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){
+ 
+   if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Max")
+   }
+   
+ 
+   if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Min")
+   }
+ 
+ 
+   if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){
+ 
+     cat(Sum(buff.matrix,na.rm=TRUE),"\n")
+     cat(sum(r.matrix,na.rm=TRUE),"\n")
+     cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n")
+     
+     stop("No agreement in Sum")
+   }
+   
+   if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){
+     stop("No agreement in mean")
+   }
+   
+   
+   if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){
+     stop("No agreement in Var")
+   }
+   
+   
+ 
+   if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowMeans")
+   }
+   
+   
+   if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colMeans")
+   }
+   
+   
+   if(any(abs(rowSums(buff.matrix,na.rm=TRUE)  -  apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in rowSums")
+   }
+   
+   
+   if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colSums")
+   }
+   
+   ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when 
+   ### computing variance
+   my.Var <- function(x,na.rm=FALSE){
+    if (all(is.na(x))){
+      return(NA)
+    } else {
+      var(x,na.rm=na.rm)
+    }
+ 
+   }
+   
+   if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+   
+   
+   if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+ 
+ 
+   if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+ 
+   if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+   
+   
+   if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+   
+ 
+   if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+ 
+   if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMedian")
+   }
+ 
+   if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colRanges")
+   }
+ 
+ 
+   
+ }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> for (rep in 1:20){
+   copymatrix <- matrix(rnorm(200,150,15),10,20)
+   
+   tmp5[1:10,1:20] <- copymatrix
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ## now lets assign some NA values and check agreement
+ 
+   which.row <- sample(1:10,1,replace=TRUE)
+   which.col  <- sample(1:20,1,replace=TRUE)
+   
+   cat(which.row," ",which.col,"\n")
+   
+   tmp5[which.row,which.col] <- NA
+   copymatrix[which.row,which.col] <- NA
+   
+   agree.checks(tmp5,copymatrix)
+ 
+   ## make an entire row NA
+   tmp5[which.row,] <- NA
+   copymatrix[which.row,] <- NA
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ### also make an entire col NA
+   tmp5[,which.col] <- NA
+   copymatrix[,which.col] <- NA
+ 
+   agree.checks(tmp5,copymatrix)
+ 
+   ### now make 1 element non NA with NA in the rest of row and column
+ 
+   tmp5[which.row,which.col] <- rnorm(1,150,15)
+   copymatrix[which.row,which.col] <- tmp5[which.row,which.col]
+ 
+   agree.checks(tmp5,copymatrix)
+ }
6   9 
5   1 
7   7 
3   15 
1   6 
7   11 
2   1 
7   5 
4   9 
7   20 
4   4 
8   17 
9   5 
4   15 
2   16 
9   8 
4   20 
5   9 
7   1 
7   18 
There were 50 or more warnings (use warnings() to see the first 50)
> 
> 
> ### now test 1 by n and n by 1 matrix
> 
> 
> err.tol <- 1e-12
> 
> rm(tmp5)
> 
> dataset1 <- rnorm(100)
> dataset2 <- rnorm(100)
> 
> tmp <- createBufferedMatrix(1,100)
> tmp[1,] <- dataset1
> 
> tmp2 <- createBufferedMatrix(100,1)
> tmp2[,1] <- dataset2
> 
> 
> 
> 
> 
> Max(tmp)
[1] 2.420993
> Min(tmp)
[1] -2.33863
> mean(tmp)
[1] 0.09909588
> Sum(tmp)
[1] 9.909588
> Var(tmp)
[1] 1.150233
> 
> rowMeans(tmp)
[1] 0.09909588
> rowSums(tmp)
[1] 9.909588
> rowVars(tmp)
[1] 1.150233
> rowSd(tmp)
[1] 1.072489
> rowMax(tmp)
[1] 2.420993
> rowMin(tmp)
[1] -2.33863
> 
> colMeans(tmp)
  [1] -1.226329362 -0.666096891  0.347852430  0.491371905  0.327639736
  [6] -0.522378042  0.077776616  0.378111129  0.699757878  1.002341465
 [11]  0.131041334 -1.654636495 -0.767316617 -0.525868552  2.168264623
 [16]  1.092581528  0.512858435  1.501451357  2.420992760 -1.824799113
 [21] -1.660990721 -0.357671007  0.024083767  0.417199256 -0.022030122
 [26] -0.160088720  0.631133912  1.325780348 -0.501583770  0.783224118
 [31]  0.955750519  0.829889362 -1.319742343 -0.130133953  1.105041405
 [36]  2.046299969  0.589918303  0.647194478  1.196672465 -2.338629528
 [41]  0.796843640  0.191142835  0.746343606  0.670894241 -0.924317226
 [46]  1.076112352  0.434799959  1.513488000  0.485753396 -1.308832739
 [51]  0.365918602  0.227730186 -1.615076503  0.738524372 -0.765815244
 [56] -0.871512790  0.321705427 -0.477006508 -0.420540366 -1.827807257
 [61]  0.402294619  1.082681346 -0.807254308 -0.007891242 -0.607583055
 [66]  1.665190987 -0.945081955 -0.860759940 -0.740204752 -0.069412916
 [71] -0.496157165 -0.507074461 -1.941813490 -1.134876845  0.908632824
 [76]  0.549195656  1.995771183  1.190328155 -1.476016878  0.265487487
 [81]  0.317651684  0.066884869  0.982317169  0.864195837  0.405942074
 [86] -0.713422278  2.102619414 -1.205218704 -1.363996189 -1.368144279
 [91]  0.009630704 -0.815122046 -0.059415686  2.286025102  0.312164606
 [96] -1.342966862 -0.794635637  2.404425011  1.300083758  0.670832146
> colSums(tmp)
  [1] -1.226329362 -0.666096891  0.347852430  0.491371905  0.327639736
  [6] -0.522378042  0.077776616  0.378111129  0.699757878  1.002341465
 [11]  0.131041334 -1.654636495 -0.767316617 -0.525868552  2.168264623
 [16]  1.092581528  0.512858435  1.501451357  2.420992760 -1.824799113
 [21] -1.660990721 -0.357671007  0.024083767  0.417199256 -0.022030122
 [26] -0.160088720  0.631133912  1.325780348 -0.501583770  0.783224118
 [31]  0.955750519  0.829889362 -1.319742343 -0.130133953  1.105041405
 [36]  2.046299969  0.589918303  0.647194478  1.196672465 -2.338629528
 [41]  0.796843640  0.191142835  0.746343606  0.670894241 -0.924317226
 [46]  1.076112352  0.434799959  1.513488000  0.485753396 -1.308832739
 [51]  0.365918602  0.227730186 -1.615076503  0.738524372 -0.765815244
 [56] -0.871512790  0.321705427 -0.477006508 -0.420540366 -1.827807257
 [61]  0.402294619  1.082681346 -0.807254308 -0.007891242 -0.607583055
 [66]  1.665190987 -0.945081955 -0.860759940 -0.740204752 -0.069412916
 [71] -0.496157165 -0.507074461 -1.941813490 -1.134876845  0.908632824
 [76]  0.549195656  1.995771183  1.190328155 -1.476016878  0.265487487
 [81]  0.317651684  0.066884869  0.982317169  0.864195837  0.405942074
 [86] -0.713422278  2.102619414 -1.205218704 -1.363996189 -1.368144279
 [91]  0.009630704 -0.815122046 -0.059415686  2.286025102  0.312164606
 [96] -1.342966862 -0.794635637  2.404425011  1.300083758  0.670832146
> 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] -1.226329362 -0.666096891  0.347852430  0.491371905  0.327639736
  [6] -0.522378042  0.077776616  0.378111129  0.699757878  1.002341465
 [11]  0.131041334 -1.654636495 -0.767316617 -0.525868552  2.168264623
 [16]  1.092581528  0.512858435  1.501451357  2.420992760 -1.824799113
 [21] -1.660990721 -0.357671007  0.024083767  0.417199256 -0.022030122
 [26] -0.160088720  0.631133912  1.325780348 -0.501583770  0.783224118
 [31]  0.955750519  0.829889362 -1.319742343 -0.130133953  1.105041405
 [36]  2.046299969  0.589918303  0.647194478  1.196672465 -2.338629528
 [41]  0.796843640  0.191142835  0.746343606  0.670894241 -0.924317226
 [46]  1.076112352  0.434799959  1.513488000  0.485753396 -1.308832739
 [51]  0.365918602  0.227730186 -1.615076503  0.738524372 -0.765815244
 [56] -0.871512790  0.321705427 -0.477006508 -0.420540366 -1.827807257
 [61]  0.402294619  1.082681346 -0.807254308 -0.007891242 -0.607583055
 [66]  1.665190987 -0.945081955 -0.860759940 -0.740204752 -0.069412916
 [71] -0.496157165 -0.507074461 -1.941813490 -1.134876845  0.908632824
 [76]  0.549195656  1.995771183  1.190328155 -1.476016878  0.265487487
 [81]  0.317651684  0.066884869  0.982317169  0.864195837  0.405942074
 [86] -0.713422278  2.102619414 -1.205218704 -1.363996189 -1.368144279
 [91]  0.009630704 -0.815122046 -0.059415686  2.286025102  0.312164606
 [96] -1.342966862 -0.794635637  2.404425011  1.300083758  0.670832146
> colMin(tmp)
  [1] -1.226329362 -0.666096891  0.347852430  0.491371905  0.327639736
  [6] -0.522378042  0.077776616  0.378111129  0.699757878  1.002341465
 [11]  0.131041334 -1.654636495 -0.767316617 -0.525868552  2.168264623
 [16]  1.092581528  0.512858435  1.501451357  2.420992760 -1.824799113
 [21] -1.660990721 -0.357671007  0.024083767  0.417199256 -0.022030122
 [26] -0.160088720  0.631133912  1.325780348 -0.501583770  0.783224118
 [31]  0.955750519  0.829889362 -1.319742343 -0.130133953  1.105041405
 [36]  2.046299969  0.589918303  0.647194478  1.196672465 -2.338629528
 [41]  0.796843640  0.191142835  0.746343606  0.670894241 -0.924317226
 [46]  1.076112352  0.434799959  1.513488000  0.485753396 -1.308832739
 [51]  0.365918602  0.227730186 -1.615076503  0.738524372 -0.765815244
 [56] -0.871512790  0.321705427 -0.477006508 -0.420540366 -1.827807257
 [61]  0.402294619  1.082681346 -0.807254308 -0.007891242 -0.607583055
 [66]  1.665190987 -0.945081955 -0.860759940 -0.740204752 -0.069412916
 [71] -0.496157165 -0.507074461 -1.941813490 -1.134876845  0.908632824
 [76]  0.549195656  1.995771183  1.190328155 -1.476016878  0.265487487
 [81]  0.317651684  0.066884869  0.982317169  0.864195837  0.405942074
 [86] -0.713422278  2.102619414 -1.205218704 -1.363996189 -1.368144279
 [91]  0.009630704 -0.815122046 -0.059415686  2.286025102  0.312164606
 [96] -1.342966862 -0.794635637  2.404425011  1.300083758  0.670832146
> colMedians(tmp)
  [1] -1.226329362 -0.666096891  0.347852430  0.491371905  0.327639736
  [6] -0.522378042  0.077776616  0.378111129  0.699757878  1.002341465
 [11]  0.131041334 -1.654636495 -0.767316617 -0.525868552  2.168264623
 [16]  1.092581528  0.512858435  1.501451357  2.420992760 -1.824799113
 [21] -1.660990721 -0.357671007  0.024083767  0.417199256 -0.022030122
 [26] -0.160088720  0.631133912  1.325780348 -0.501583770  0.783224118
 [31]  0.955750519  0.829889362 -1.319742343 -0.130133953  1.105041405
 [36]  2.046299969  0.589918303  0.647194478  1.196672465 -2.338629528
 [41]  0.796843640  0.191142835  0.746343606  0.670894241 -0.924317226
 [46]  1.076112352  0.434799959  1.513488000  0.485753396 -1.308832739
 [51]  0.365918602  0.227730186 -1.615076503  0.738524372 -0.765815244
 [56] -0.871512790  0.321705427 -0.477006508 -0.420540366 -1.827807257
 [61]  0.402294619  1.082681346 -0.807254308 -0.007891242 -0.607583055
 [66]  1.665190987 -0.945081955 -0.860759940 -0.740204752 -0.069412916
 [71] -0.496157165 -0.507074461 -1.941813490 -1.134876845  0.908632824
 [76]  0.549195656  1.995771183  1.190328155 -1.476016878  0.265487487
 [81]  0.317651684  0.066884869  0.982317169  0.864195837  0.405942074
 [86] -0.713422278  2.102619414 -1.205218704 -1.363996189 -1.368144279
 [91]  0.009630704 -0.815122046 -0.059415686  2.286025102  0.312164606
 [96] -1.342966862 -0.794635637  2.404425011  1.300083758  0.670832146
> colRanges(tmp)
          [,1]       [,2]      [,3]      [,4]      [,5]      [,6]       [,7]
[1,] -1.226329 -0.6660969 0.3478524 0.4913719 0.3276397 -0.522378 0.07777662
[2,] -1.226329 -0.6660969 0.3478524 0.4913719 0.3276397 -0.522378 0.07777662
          [,8]      [,9]    [,10]     [,11]     [,12]      [,13]      [,14]
[1,] 0.3781111 0.6997579 1.002341 0.1310413 -1.654636 -0.7673166 -0.5258686
[2,] 0.3781111 0.6997579 1.002341 0.1310413 -1.654636 -0.7673166 -0.5258686
        [,15]    [,16]     [,17]    [,18]    [,19]     [,20]     [,21]
[1,] 2.168265 1.092582 0.5128584 1.501451 2.420993 -1.824799 -1.660991
[2,] 2.168265 1.092582 0.5128584 1.501451 2.420993 -1.824799 -1.660991
         [,22]      [,23]     [,24]       [,25]      [,26]     [,27]   [,28]
[1,] -0.357671 0.02408377 0.4171993 -0.02203012 -0.1600887 0.6311339 1.32578
[2,] -0.357671 0.02408377 0.4171993 -0.02203012 -0.1600887 0.6311339 1.32578
          [,29]     [,30]     [,31]     [,32]     [,33]     [,34]    [,35]
[1,] -0.5015838 0.7832241 0.9557505 0.8298894 -1.319742 -0.130134 1.105041
[2,] -0.5015838 0.7832241 0.9557505 0.8298894 -1.319742 -0.130134 1.105041
      [,36]     [,37]     [,38]    [,39]    [,40]     [,41]     [,42]     [,43]
[1,] 2.0463 0.5899183 0.6471945 1.196672 -2.33863 0.7968436 0.1911428 0.7463436
[2,] 2.0463 0.5899183 0.6471945 1.196672 -2.33863 0.7968436 0.1911428 0.7463436
         [,44]      [,45]    [,46]  [,47]    [,48]     [,49]     [,50]
[1,] 0.6708942 -0.9243172 1.076112 0.4348 1.513488 0.4857534 -1.308833
[2,] 0.6708942 -0.9243172 1.076112 0.4348 1.513488 0.4857534 -1.308833
         [,51]     [,52]     [,53]     [,54]      [,55]      [,56]     [,57]
[1,] 0.3659186 0.2277302 -1.615077 0.7385244 -0.7658152 -0.8715128 0.3217054
[2,] 0.3659186 0.2277302 -1.615077 0.7385244 -0.7658152 -0.8715128 0.3217054
          [,58]      [,59]     [,60]     [,61]    [,62]      [,63]        [,64]
[1,] -0.4770065 -0.4205404 -1.827807 0.4022946 1.082681 -0.8072543 -0.007891242
[2,] -0.4770065 -0.4205404 -1.827807 0.4022946 1.082681 -0.8072543 -0.007891242
          [,65]    [,66]     [,67]      [,68]      [,69]       [,70]      [,71]
[1,] -0.6075831 1.665191 -0.945082 -0.8607599 -0.7402048 -0.06941292 -0.4961572
[2,] -0.6075831 1.665191 -0.945082 -0.8607599 -0.7402048 -0.06941292 -0.4961572
          [,72]     [,73]     [,74]     [,75]     [,76]    [,77]    [,78]
[1,] -0.5070745 -1.941813 -1.134877 0.9086328 0.5491957 1.995771 1.190328
[2,] -0.5070745 -1.941813 -1.134877 0.9086328 0.5491957 1.995771 1.190328
         [,79]     [,80]     [,81]      [,82]     [,83]     [,84]     [,85]
[1,] -1.476017 0.2654875 0.3176517 0.06688487 0.9823172 0.8641958 0.4059421
[2,] -1.476017 0.2654875 0.3176517 0.06688487 0.9823172 0.8641958 0.4059421
          [,86]    [,87]     [,88]     [,89]     [,90]       [,91]     [,92]
[1,] -0.7134223 2.102619 -1.205219 -1.363996 -1.368144 0.009630704 -0.815122
[2,] -0.7134223 2.102619 -1.205219 -1.363996 -1.368144 0.009630704 -0.815122
           [,93]    [,94]     [,95]     [,96]      [,97]    [,98]    [,99]
[1,] -0.05941569 2.286025 0.3121646 -1.342967 -0.7946356 2.404425 1.300084
[2,] -0.05941569 2.286025 0.3121646 -1.342967 -0.7946356 2.404425 1.300084
        [,100]
[1,] 0.6708321
[2,] 0.6708321
> 
> 
> Max(tmp2)
[1] 2.549555
> Min(tmp2)
[1] -1.733014
> mean(tmp2)
[1] 0.2461939
> Sum(tmp2)
[1] 24.61939
> Var(tmp2)
[1] 0.835793
> 
> rowMeans(tmp2)
  [1]  0.436685665  1.252622478 -1.470252635  0.763331233 -1.263480833
  [6] -0.445537654  0.347347881  0.543594137 -0.214807010 -0.169028580
 [11]  0.293041396  0.776161786  1.388408340  2.247274880 -0.648041320
 [16]  0.054442428  0.239734906 -0.579682247 -0.640643283  2.066193598
 [21]  1.292511212  1.381141188  0.857263087 -0.716172255  1.191438345
 [26]  0.035225245  0.124498436  0.158607111 -1.008376370  1.871047028
 [31] -0.285552496  1.244601292  0.212690369 -1.121641772  0.614635330
 [36]  0.613659702  0.128836069  0.789879622  0.408614554  1.332311312
 [41] -0.737361222 -0.145340598  1.125065632  0.971283753 -1.073413947
 [46]  0.913690346 -1.509809285 -1.733014084  0.011760828  0.251501200
 [51]  2.317410820  1.073465124  1.334818120  0.132024405  0.001401135
 [56]  0.190837347 -0.760865344 -0.613107104  0.779242235 -1.012846284
 [61] -0.333543419 -0.309990826 -0.854453714  0.693548767 -0.557175922
 [66]  0.306594727 -0.083564604  0.644717212 -1.330695065  1.532875252
 [71] -1.245716234 -0.096850350  1.055049878 -0.289870576 -0.574372674
 [76]  0.296160905  0.929269327 -0.627118190 -0.649917790  0.443003490
 [81]  0.966147503  0.545065077  0.662291071  1.123214806 -0.374068122
 [86]  1.754675280  0.070057279  0.665005654 -0.983895784  2.549555395
 [91] -0.013517931  0.507569945 -0.745705261 -0.057853121 -0.361900359
 [96]  1.162452546 -0.288771378  0.810336226  0.835067069  1.226393009
> rowSums(tmp2)
  [1]  0.436685665  1.252622478 -1.470252635  0.763331233 -1.263480833
  [6] -0.445537654  0.347347881  0.543594137 -0.214807010 -0.169028580
 [11]  0.293041396  0.776161786  1.388408340  2.247274880 -0.648041320
 [16]  0.054442428  0.239734906 -0.579682247 -0.640643283  2.066193598
 [21]  1.292511212  1.381141188  0.857263087 -0.716172255  1.191438345
 [26]  0.035225245  0.124498436  0.158607111 -1.008376370  1.871047028
 [31] -0.285552496  1.244601292  0.212690369 -1.121641772  0.614635330
 [36]  0.613659702  0.128836069  0.789879622  0.408614554  1.332311312
 [41] -0.737361222 -0.145340598  1.125065632  0.971283753 -1.073413947
 [46]  0.913690346 -1.509809285 -1.733014084  0.011760828  0.251501200
 [51]  2.317410820  1.073465124  1.334818120  0.132024405  0.001401135
 [56]  0.190837347 -0.760865344 -0.613107104  0.779242235 -1.012846284
 [61] -0.333543419 -0.309990826 -0.854453714  0.693548767 -0.557175922
 [66]  0.306594727 -0.083564604  0.644717212 -1.330695065  1.532875252
 [71] -1.245716234 -0.096850350  1.055049878 -0.289870576 -0.574372674
 [76]  0.296160905  0.929269327 -0.627118190 -0.649917790  0.443003490
 [81]  0.966147503  0.545065077  0.662291071  1.123214806 -0.374068122
 [86]  1.754675280  0.070057279  0.665005654 -0.983895784  2.549555395
 [91] -0.013517931  0.507569945 -0.745705261 -0.057853121 -0.361900359
 [96]  1.162452546 -0.288771378  0.810336226  0.835067069  1.226393009
> 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.436685665  1.252622478 -1.470252635  0.763331233 -1.263480833
  [6] -0.445537654  0.347347881  0.543594137 -0.214807010 -0.169028580
 [11]  0.293041396  0.776161786  1.388408340  2.247274880 -0.648041320
 [16]  0.054442428  0.239734906 -0.579682247 -0.640643283  2.066193598
 [21]  1.292511212  1.381141188  0.857263087 -0.716172255  1.191438345
 [26]  0.035225245  0.124498436  0.158607111 -1.008376370  1.871047028
 [31] -0.285552496  1.244601292  0.212690369 -1.121641772  0.614635330
 [36]  0.613659702  0.128836069  0.789879622  0.408614554  1.332311312
 [41] -0.737361222 -0.145340598  1.125065632  0.971283753 -1.073413947
 [46]  0.913690346 -1.509809285 -1.733014084  0.011760828  0.251501200
 [51]  2.317410820  1.073465124  1.334818120  0.132024405  0.001401135
 [56]  0.190837347 -0.760865344 -0.613107104  0.779242235 -1.012846284
 [61] -0.333543419 -0.309990826 -0.854453714  0.693548767 -0.557175922
 [66]  0.306594727 -0.083564604  0.644717212 -1.330695065  1.532875252
 [71] -1.245716234 -0.096850350  1.055049878 -0.289870576 -0.574372674
 [76]  0.296160905  0.929269327 -0.627118190 -0.649917790  0.443003490
 [81]  0.966147503  0.545065077  0.662291071  1.123214806 -0.374068122
 [86]  1.754675280  0.070057279  0.665005654 -0.983895784  2.549555395
 [91] -0.013517931  0.507569945 -0.745705261 -0.057853121 -0.361900359
 [96]  1.162452546 -0.288771378  0.810336226  0.835067069  1.226393009
> rowMin(tmp2)
  [1]  0.436685665  1.252622478 -1.470252635  0.763331233 -1.263480833
  [6] -0.445537654  0.347347881  0.543594137 -0.214807010 -0.169028580
 [11]  0.293041396  0.776161786  1.388408340  2.247274880 -0.648041320
 [16]  0.054442428  0.239734906 -0.579682247 -0.640643283  2.066193598
 [21]  1.292511212  1.381141188  0.857263087 -0.716172255  1.191438345
 [26]  0.035225245  0.124498436  0.158607111 -1.008376370  1.871047028
 [31] -0.285552496  1.244601292  0.212690369 -1.121641772  0.614635330
 [36]  0.613659702  0.128836069  0.789879622  0.408614554  1.332311312
 [41] -0.737361222 -0.145340598  1.125065632  0.971283753 -1.073413947
 [46]  0.913690346 -1.509809285 -1.733014084  0.011760828  0.251501200
 [51]  2.317410820  1.073465124  1.334818120  0.132024405  0.001401135
 [56]  0.190837347 -0.760865344 -0.613107104  0.779242235 -1.012846284
 [61] -0.333543419 -0.309990826 -0.854453714  0.693548767 -0.557175922
 [66]  0.306594727 -0.083564604  0.644717212 -1.330695065  1.532875252
 [71] -1.245716234 -0.096850350  1.055049878 -0.289870576 -0.574372674
 [76]  0.296160905  0.929269327 -0.627118190 -0.649917790  0.443003490
 [81]  0.966147503  0.545065077  0.662291071  1.123214806 -0.374068122
 [86]  1.754675280  0.070057279  0.665005654 -0.983895784  2.549555395
 [91] -0.013517931  0.507569945 -0.745705261 -0.057853121 -0.361900359
 [96]  1.162452546 -0.288771378  0.810336226  0.835067069  1.226393009
> 
> colMeans(tmp2)
[1] 0.2461939
> colSums(tmp2)
[1] 24.61939
> colVars(tmp2)
[1] 0.835793
> colSd(tmp2)
[1] 0.9142172
> colMax(tmp2)
[1] 2.549555
> colMin(tmp2)
[1] -1.733014
> colMedians(tmp2)
[1] 0.2262126
> colRanges(tmp2)
          [,1]
[1,] -1.733014
[2,]  2.549555
> 
> 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.3702167 -3.0662662 -0.2883026  0.4188834 -0.7566329  7.3921867
 [7] -5.3221025  3.4675810  4.0019453  2.1231034
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.8463179
[2,] -0.7148769
[3,] -0.0254258
[4,]  0.5180747
[5,]  1.2288387
> 
> rowApply(tmp,sum)
 [1]  2.3707412  2.6115091  3.0772818  1.7885163  4.4524407  2.0456368
 [7] -6.6666552 -0.3141839 -3.8723492  1.1072414
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    9    5    6    3    6    1    5    8    1     4
 [2,]    7    2    1    5    4    5    3    5    3     5
 [3,]    3    8    2    2   10    7   10    3    6     1
 [4,]    5    3    8   10    7    9    1    9    5     2
 [5,]   10    4   10    1    1    4    9    2    2     7
 [6,]    8   10    9    4    5    8    6    7    9     8
 [7,]    6    1    5    9    2    2    2    6    4     3
 [8,]    2    6    7    6    8    3    4    4   10     9
 [9,]    4    7    3    7    3    6    7   10    7    10
[10,]    1    9    4    8    9   10    8    1    8     6
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1] -0.1753930 -1.9116103 -3.8067052  0.6848522  2.0786863  1.7858159
 [7]  3.3947282 -1.4035953  1.6775430  0.3489042  1.6261863 -1.7681317
[13]  2.9885029  2.3561632  4.7594417  3.2773627 -1.1236465  1.5847080
[19] -2.7185386 -0.3472857
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.4706567
[2,] -0.5756225
[3,] -0.2322623
[4,]  0.8441378
[5,]  1.2590108
> 
> rowApply(tmp,sum)
[1] 12.288057 -1.987458  4.184630 -3.681415  2.504175
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   16   19    5    2    5
[2,]    3    5    6    4   12
[3,]    5    3    2   14    1
[4,]   17    4    9   13    9
[5,]    2   17   15   19   17
> 
> 
> as.matrix(tmp)
           [,1]       [,2]       [,3]        [,4]       [,5]        [,6]
[1,]  1.2590108 -0.5321077  0.1178291  1.28467718 -1.6700913  0.34525837
[2,]  0.8441378 -0.5724843 -0.7661748 -0.70767905  0.6266080 -0.09747284
[3,] -0.2322623 -0.1213554 -1.9393844  0.09601574  0.7850219  1.40785145
[4,] -1.4706567 -1.0786277  0.3268520  0.06698240  1.1386386  1.48492660
[5,] -0.5756225  0.3929649 -1.5458271 -0.05514412  1.1985091 -1.35474769
           [,7]       [,8]       [,9]       [,10]       [,11]      [,12]
[1,] 1.08288264  1.1481090  1.1828022  0.60156610 -0.20357309  0.1755095
[2,] 0.03937482 -2.3867425 -0.3996348 -1.46186945 -0.04189886 -0.4298102
[3,] 0.05283432  0.2449113  0.3872340  0.09569219  0.82332336  0.5034109
[4,] 0.75341616  0.8371279 -0.7152591  0.53095445 -0.31394395 -1.7739236
[5,] 1.46622028 -1.2470010  1.2224008  0.58256095  1.36227884 -0.2433184
          [,13]      [,14]     [,15]      [,16]       [,17]      [,18]
[1,]  1.9611037  2.0091834 2.7353309  0.3324520  0.74150243  1.2125790
[2,]  0.1044870  0.6672241 0.2394873  2.7709189  0.27427077  0.2279592
[3,]  1.0135795  2.1816844 0.2514498  1.4533629 -1.96342380  0.5148537
[4,] -0.6586064 -1.4207168 0.5797447 -1.0471882 -0.02964154 -0.7282865
[5,]  0.5679390 -1.0812118 0.9534289 -0.2321829 -0.14635436  0.3576026
           [,19]       [,20]
[1,] -2.05508245  0.55911504
[2,] -0.46620934 -0.45195016
[3,] -0.32742788 -1.04274192
[4,] -0.07950106 -0.08370586
[5,]  0.20968219  0.67199725
> 
> 
> 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.21-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.21-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  649  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  563  bytes.
Disk usage :  160  bytes.
> subBufferedMatrix(tmp,1:3,)
BufferedMatrix object
Matrix size:  3 20 
Buffer size:  1 1 
Directory:    /Users/biocbuild/bbs-3.21-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.3156844 -0.1350859 -0.9070864 0.9245621 -0.09470027 0.04632339 1.921389
           col8       col9     col10      col11     col12    col13     col14
row1 -0.6682362 -0.3032509 0.7971933 0.06062368 -1.354081 1.311621 0.8379505
         col15    col16    col17     col18      col19     col20
row1 -1.208254 1.668947 1.631698 0.1766428 -0.5741731 0.2302509
> tmp[,"col10"]
         col10
row1 0.7971933
row2 0.2889093
row3 1.0736637
row4 1.9192013
row5 1.2298183
> tmp[c("row1","row5"),]
          col1       col2       col3      col4        col5        col6
row1 0.3156844 -0.1350859 -0.9070864 0.9245621 -0.09470027  0.04632339
row5 0.7461059 -0.9644909 -1.8837545 0.2975828  0.63581873 -1.51331220
          col7       col8       col9     col10      col11     col12     col13
row1 1.9213894 -0.6682362 -0.3032509 0.7971933 0.06062368 -1.354081 1.3116209
row5 0.6452198 -0.8361654  0.5006765 1.2298183 0.54147864 -1.966684 0.5371805
         col14      col15     col16    col17       col18      col19     col20
row1 0.8379505 -1.2082540  1.668947 1.631698  0.17664277 -0.5741731 0.2302509
row5 0.5433819 -0.7485104 -0.194977 1.966726 -0.06354905 -1.0193192 2.3929274
> tmp[,c("col6","col20")]
            col6      col20
row1  0.04632339  0.2302509
row2 -0.87899601 -1.1542572
row3  1.56397886 -0.1101494
row4  0.08469368  0.1972253
row5 -1.51331220  2.3929274
> tmp[c("row1","row5"),c("col6","col20")]
            col6     col20
row1  0.04632339 0.2302509
row5 -1.51331220 2.3929274
> 
> 
> 
> 
> tmp["row1",] <- rnorm(20,mean=10)
> tmp[,"col10"] <- rnorm(5,mean=30)
> tmp[c("row1","row5"),] <- rnorm(40,mean=50)
> tmp[,c("col6","col20")] <- rnorm(10,mean=75)
> tmp[c("row1","row5"),c("col6","col20")]  <- rnorm(4,mean=105)
> 
> tmp["row1",]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 50.82284 49.62417 50.73611 49.71264 50.05302 106.5835 47.73029 52.14077
         col9    col10    col11    col12    col13    col14    col15    col16
row1 50.10001 48.54838 50.56556 51.38064 51.02991 49.81249 50.05098 49.02911
        col17    col18    col19    col20
row1 49.86146 49.21891 50.25462 103.9567
> tmp[,"col10"]
        col10
row1 48.54838
row2 28.76100
row3 30.55237
row4 30.51079
row5 51.00371
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 50.82284 49.62417 50.73611 49.71264 50.05302 106.5835 47.73029 52.14077
row5 50.69431 49.39258 50.68115 50.08407 49.37245 103.8140 51.08146 49.28454
         col9    col10    col11    col12    col13    col14    col15    col16
row1 50.10001 48.54838 50.56556 51.38064 51.02991 49.81249 50.05098 49.02911
row5 48.88768 51.00371 47.72124 48.82106 48.90169 51.52910 50.19867 50.03629
        col17    col18    col19    col20
row1 49.86146 49.21891 50.25462 103.9567
row5 51.98078 48.52536 49.53997 106.0313
> tmp[,c("col6","col20")]
          col6     col20
row1 106.58348 103.95672
row2  74.63809  74.47145
row3  73.77573  76.46019
row4  75.80323  74.42722
row5 103.81400 106.03127
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 106.5835 103.9567
row5 103.8140 106.0313
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 106.5835 103.9567
row5 103.8140 106.0313
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,] -0.2599470
[2,]  0.7048766
[3,]  0.5704328
[4,] -1.2076764
[5,]  0.3989543
> tmp[,c("col17","col7")]
          col17        col7
[1,] 0.15409001 -0.10656531
[2,] 0.03613332  0.04226192
[3,] 0.13183867 -0.38000161
[4,] 0.63588395 -0.73787541
[5,] 0.50820800  0.15133505
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6      col20
[1,] -1.3281909  1.2968825
[2,]  0.4283609  1.1700884
[3,] -1.0563534 -1.4825168
[4,] -0.6502708  0.1809459
[5,] -0.4301900 -0.7571735
> subBufferedMatrix(tmp,1,c("col6"))[,1]
          col1
[1,] -1.328191
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,] -1.3281909
[2,]  0.4283609
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> 
> 
> 
> subBufferedMatrix(tmp,c("row3","row1"),)[,1:20]
           [,1]      [,2]       [,3]       [,4]       [,5]       [,6]      [,7]
row3  0.4698016 0.3926394 -0.3749630 -0.6774789 -0.1818508 -1.8379016 1.3712295
row1 -2.9402950 0.6351069 -0.9760078  1.5514045  2.2749720  0.6151058 0.2258485
          [,8]       [,9]      [,10]      [,11]      [,12]     [,13]      [,14]
row3 0.6316924  0.6532430  0.1498284 -0.7601041 -0.7501855 0.7620686 -0.5621490
row1 0.4964715 -0.4801292 -1.1000738  0.2178844  0.2390507 1.0978503 -0.1368206
          [,15]       [,16]       [,17]      [,18]     [,19]      [,20]
row3  1.1440133  0.06110319 -0.14153369 -0.3721972 0.3608477 0.52124011
row1 -0.7247986 -0.07397470 -0.02944779 -0.4846055 0.5369096 0.05321335
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
         [,1]       [,2]       [,3]     [,4]      [,5]      [,6]       [,7]
row2 1.257702 -0.1124005 -0.7740254 1.008057 -1.478709 0.2169304 -0.2040497
         [,8]      [,9]     [,10]
row2 1.341997 0.5008331 -1.261974
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
           [,1]     [,2]     [,3]        [,4]      [,5]      [,6]      [,7]
row5 -0.4489534 2.434611 1.400822 -0.08274955 0.9360344 -1.161355 -1.809969
        [,8]      [,9]    [,10]     [,11]     [,12]     [,13]      [,14]
row5 -1.0654 -1.598234 0.470049 -2.201122 -1.195823 -0.767715 -0.3983421
         [,15]    [,16]      [,17]     [,18]     [,19]     [,20]
row5 0.4583561 2.035152 -0.1969673 0.7268614 -1.627633 -1.533671
> 
> 
> 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: 0x600002c700c0>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb53650d1aaf"
 [2] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb533f530afd"
 [3] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb5364f68885"
 [4] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb53757d078b"
 [5] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb53637a72ef"
 [6] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb537c0fdbee"
 [7] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb53753025e3"
 [8] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb532c079630"
 [9] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb5326153fe5"
[10] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb533d15e6eb"
[11] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb5368eb6da1"
[12] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb53386a9ad7"
[13] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb535edbb630"
[14] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb532a9639f7"
[15] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMbb536cb79cf8"
> 
> 
> ### 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: 0x600002c34060>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x600002c34060>
Warning message:
In dir.create(new.directory) :
  '/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x600002c34060>
> rowMedians(tmp)
  [1]  0.120727121  0.469381455  0.111095363  0.182059899 -0.600605625
  [6]  0.090239735  0.361217889 -0.452812447 -0.205428327  0.325419811
 [11] -0.428226998  0.012617986  0.106724323  0.019910070  0.125223482
 [16] -0.386083653 -0.430863262  0.264796231 -0.026626847  0.017329615
 [21]  0.460984276 -0.009834660 -0.122313409 -0.214423188 -0.042298665
 [26] -0.354514091  0.113630648 -0.189376852 -0.203551951 -0.119640138
 [31]  0.381668586  0.349380823  0.444469330 -0.027817610 -0.354256006
 [36] -0.217086489  0.102374320 -0.008517743 -0.130589348  0.031232592
 [41]  0.132308270 -0.925399462  0.319226711 -0.054589399  0.101158217
 [46] -0.229538655 -0.158851520 -0.123172794  0.611024285 -0.086148489
 [51] -0.081660756 -0.286947743  0.571575775 -0.157816251  0.179504056
 [56]  0.178696503  0.421437288  0.375550480 -0.098164185 -0.602039570
 [61] -0.115015879  0.027793955 -0.204617508 -0.459615127  0.274663180
 [66] -0.019570124  0.356436032 -1.006680430 -0.272946269  0.020055604
 [71]  0.242579817 -0.123165339  0.308105586 -0.029828341 -0.396186431
 [76] -0.453571979  0.026032353 -0.168447072 -0.082342328 -0.066125304
 [81] -0.659215472  0.011283565 -0.067008004 -0.460140337  0.475053092
 [86]  0.458587657  0.031175609  0.499842106  0.549065687 -0.269476900
 [91] -0.058712470  0.010747543  0.015729705  0.450392904 -0.020061826
 [96] -0.252002069  0.376755021  0.066968496 -0.346871395 -0.041510497
[101] -0.104508276  0.420049532  0.529434713  0.094190577  0.435126458
[106] -0.185835659  0.070170846  0.171080209  0.623863372 -0.060174191
[111] -0.547746290 -0.194092521  0.541697531  0.066586033 -0.276507793
[116]  0.205509360  0.911071197  0.323185438 -0.479571644 -0.383519155
[121] -0.170975164 -0.019369350  0.737206175  0.251406848 -0.086919686
[126] -0.599494499  0.142064466 -0.395026813  0.150516880 -0.162222514
[131]  0.458624480 -0.116085452  0.282593869  0.210974031  0.012237487
[136] -0.016360064 -0.292631011 -0.003491023  0.396051416  0.704876696
[141] -0.432484187 -0.505908368 -0.315912187  0.467929006  0.037494603
[146]  0.304833497  0.590506612  0.457274520 -0.381650900  0.559145347
[151] -0.334624286  0.088018864  0.045808857  0.605298873 -0.118826364
[156]  0.210863614  0.058352403  0.524603332 -0.148161684  0.020257432
[161] -0.020624944 -0.238599002  0.819999679  0.260634131  0.399672456
[166] -0.317903151  0.457468377  0.034665930  0.248110264  0.394172514
[171]  0.184715839  0.046536497  0.002027884  0.376774292  0.443447484
[176]  0.086378127  0.366031494  0.529954142  0.260058043 -0.028380003
[181]  0.002958350  0.012281587 -0.298468876 -0.377398585 -0.295038491
[186] -0.114950628 -0.101898067  0.326036830  0.381476769  0.102853752
[191]  0.207626373  0.194543976  0.024279430  0.142230535 -0.171756985
[196] -0.142310649 -0.142358376 -0.006047434  0.023223143 -0.107053576
[201] -0.196650828  0.328525297 -0.062730577  0.371255072  0.646712749
[206]  0.152976132  0.405801990 -0.106744944  0.079656497  0.132877450
[211] -0.037229331  0.039591894  0.290757374 -0.196999366 -0.118832232
[216] -0.177101599 -0.202951974 -0.242610339 -0.053155197 -0.380237386
[221] -0.380510060 -0.138318482  0.386462635 -0.179371599  0.214319596
[226] -0.004248100 -0.603449363 -0.310040160  0.851830645  0.059798441
> 
> proc.time()
   user  system elapsed 
  5.066  18.949  30.842 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R version 4.5.1 RC (2025-06-05 r88288) -- "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: 0x6000018e8060>
> .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: 0x6000018e8060>
> .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: 0x6000018e8060>
> .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: 0x6000018e8060>
> 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: 0x6000018cc000>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000018cc000>
> .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: 0x6000018cc000>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000018cc000>
> .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: 0x6000018cc000>
> 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: 0x6000018cc180>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000018cc180>
> .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: 0x6000018cc180>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x6000018cc180>
> .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: 0x6000018cc180>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x6000018cc180>
> .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: 0x6000018cc180>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x6000018cc180>
> .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: 0x6000018cc180>
> 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: 0x6000018cc360>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x6000018cc360>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000018cc360>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000018cc360>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFilec2f632ac450c" "BufferedMatrixFilec2f64a3e1848"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFilec2f632ac450c" "BufferedMatrixFilec2f64a3e1848"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000018a4000>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000018a4000>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x6000018a4000>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x6000018a4000>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x6000018a4000>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x6000018a4000>
> .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: 0x6000018cc6c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000018cc6c0>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x6000018cc6c0>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x6000018cc6c0>
> 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: 0x6000018cc8a0>
> .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: 0x6000018cc8a0>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.591   0.218   0.789 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R version 4.5.1 RC (2025-06-05 r88288) -- "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.584   0.137   0.712 

Example timings