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

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

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 24.04.3 LTS)x86_644.5.1 Patched (2025-08-23 r88802) -- "Great Square Root" 4853
lconwaymacOS 12.7.1 Montereyx86_644.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" 4640
kjohnson3macOS 13.7.7 Venturaarm644.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" 4585
taishanLinux (openEuler 24.03 LTS)aarch644.5.0 (2025-04-11) -- "How About a Twenty-Six" 4576
Click on any hostname to see more info about the system (e.g. compilers)      (*) as reported by 'uname -p', except on Windows and Mac OS X

Package 255/2341HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.73.0  (landing page)
Ben Bolstad
Snapshot Date: 2025-10-03 13:45 -0400 (Fri, 03 Oct 2025)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: devel
git_last_commit: 0147962
git_last_commit_date: 2025-04-15 09:39:39 -0400 (Tue, 15 Apr 2025)
nebbiolo2Linux (Ubuntu 24.04.3 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
lconwaymacOS 12.7.1 Monterey / x86_64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kjohnson3macOS 13.7.7 Ventura / arm64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
taishanLinux (openEuler 24.03 LTS) / aarch64  OK    OK    OK  


CHECK results for BufferedMatrix on kjohnson3

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

raw results


Summary

Package: BufferedMatrix
Version: 1.73.0
Command: /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz
StartedAt: 2025-10-03 18:31:24 -0400 (Fri, 03 Oct 2025)
EndedAt: 2025-10-03 18:31:39 -0400 (Fri, 03 Oct 2025)
EllapsedTime: 15.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.73.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck’
* using R version 4.5.1 Patched (2025-09-10 r88807)
* using platform: aarch64-apple-darwin20
* R was compiled by
    Apple clang version 16.0.0 (clang-1600.0.26.6)
    GNU Fortran (GCC) 14.2.0
* running under: macOS Ventura 13.7.7
* using session charset: UTF-8
* using option ‘--no-vignettes’
* checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK
* this is package ‘BufferedMatrix’ version ‘1.73.0’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘BufferedMatrix’ can be installed ... WARNING
Found the following significant warnings:
  doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
See ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details.
* used C compiler: ‘Apple clang version 15.0.0 (clang-1500.1.0.2.5)’
* used SDK: ‘MacOSX11.3.1.sdk’
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking code files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... NOTE
checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup?
   209 |     $x^{power}$ elementwise of the matrix
       |        ^
prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword
prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details
prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value
prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references
prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso
prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking compiled code ... NOTE
Note: information on .o files is not available
* checking sizes of PDF files under ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... NONE
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘Rcodetesting.R’
  Running ‘c_code_level_tests.R’
  Running ‘objectTesting.R’
  Running ‘rawCalltesting.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE

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


Installation output

BufferedMatrix.Rcheck/00install.out

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


* installing to library ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library’
* installing *source* package ‘BufferedMatrix’ ...
** this is package ‘BufferedMatrix’ version ‘1.73.0’
** using staged installation
** libs
using C compiler: ‘Apple clang version 15.0.0 (clang-1500.1.0.2.5)’
using SDK: ‘MacOSX11.3.1.sdk’
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c RBufferedMatrix.c -o RBufferedMatrix.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/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 arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c init_package.c -o init_package.o
clang -arch arm64 -std=gnu2x -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/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-arm64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’
Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’
Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’
Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’
Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’
Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (BufferedMatrix)

Tests output

BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout


R version 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-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.108   0.032   0.137 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


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

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> 
> ### this is used to control how many repetitions in something below
> ### higher values result in more checks.
> nreps <-100 ##20000
> 
> 
> ## test creation and some simple assignments and subsetting operations
> 
> ## first on single elements
> tmp <- createBufferedMatrix(1000,10)
> 
> tmp[10,5]
[1] 0
> tmp[10,5] <- 10
> tmp[10,5]
[1] 10
> tmp[10,5] <- 12.445
> tmp[10,5]
[1] 12.445
> 
> 
> 
> ## now testing accessing multiple elements
> tmp2 <- createBufferedMatrix(10,20)
> 
> 
> tmp2[3,1] <- 51.34
> tmp2[9,2] <- 9.87654
> tmp2[,1:2]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[,-(3:20)]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[3,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,] 51.34    0    0    0    0    0    0    0    0     0     0     0     0
     [,14] [,15] [,16] [,17] [,18] [,19] [,20]
[1,]     0     0     0     0     0     0     0
> tmp2[-3,]
      [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]    0 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19] [,20]
 [1,]     0     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0     0
> tmp2[2,1:3]
     [,1] [,2] [,3]
[1,]    0    0    0
> tmp2[3:9,1:3]
      [,1]    [,2] [,3]
[1,] 51.34 0.00000    0
[2,]  0.00 0.00000    0
[3,]  0.00 0.00000    0
[4,]  0.00 0.00000    0
[5,]  0.00 0.00000    0
[6,]  0.00 0.00000    0
[7,]  0.00 9.87654    0
> tmp2[-4,-4]
       [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,] 51.34 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]  0.00 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19]
 [1,]     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0
> 
> ## now testing accessing/assigning multiple elements
> tmp3 <- createBufferedMatrix(10,10)
> 
> for (i in 1:10){
+   for (j in 1:10){
+     tmp3[i,j] <- (j-1)*10 + i
+   }
+ }
> 
> tmp3[2:4,2:4]
     [,1] [,2] [,3]
[1,]   12   22   32
[2,]   13   23   33
[3,]   14   24   34
> tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]   11   21   31   11   21   31   91    1   11     1    11    21    31
 [2,]   12   22   32   12   22   32   92    2   12     2    12    22    32
 [3,]   13   23   33   13   23   33   93    3   13     3    13    23    33
 [4,]   14   24   34   14   24   34   94    4   14     4    14    24    34
 [5,]   15   25   35   15   25   35   95    5   15     5    15    25    35
 [6,]   16   26   36   16   26   36   96    6   16     6    16    26    36
 [7,]   17   27   37   17   27   37   97    7   17     7    17    27    37
 [8,]   18   28   38   18   28   38   98    8   18     8    18    28    38
 [9,]   19   29   39   19   29   39   99    9   19     9    19    29    39
      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
 [1,]    41    51    61    71    81    91    91    81    71    61    51    41
 [2,]    42    52    62    72    82    92    92    82    72    62    52    42
 [3,]    43    53    63    73    83    93    93    83    73    63    53    43
 [4,]    44    54    64    74    84    94    94    84    74    64    54    44
 [5,]    45    55    65    75    85    95    95    85    75    65    55    45
 [6,]    46    56    66    76    86    96    96    86    76    66    56    46
 [7,]    47    57    67    77    87    97    97    87    77    67    57    47
 [8,]    48    58    68    78    88    98    98    88    78    68    58    48
 [9,]    49    59    69    79    89    99    99    89    79    69    59    49
      [,26] [,27] [,28] [,29]
 [1,]    31    21    11     1
 [2,]    32    22    12     2
 [3,]    33    23    13     3
 [4,]    34    24    14     4
 [5,]    35    25    15     5
 [6,]    36    26    16     6
 [7,]    37    27    17     7
 [8,]    38    28    18     8
 [9,]    39    29    19     9
> tmp3[-c(1:5),-c(6:10)]
     [,1] [,2] [,3] [,4] [,5]
[1,]    6   16   26   36   46
[2,]    7   17   27   37   47
[3,]    8   18   28   38   48
[4,]    9   19   29   39   49
[5,]   10   20   30   40   50
> 
> ## assignment of whole columns
> tmp3[,1] <- c(1:10*100.0)
> tmp3[,1:2] <- tmp3[,1:2]*100
> tmp3[,1:2] <- tmp3[,2:1]
> tmp3[,1:2]
      [,1]  [,2]
 [1,] 1100 1e+04
 [2,] 1200 2e+04
 [3,] 1300 3e+04
 [4,] 1400 4e+04
 [5,] 1500 5e+04
 [6,] 1600 6e+04
 [7,] 1700 7e+04
 [8,] 1800 8e+04
 [9,] 1900 9e+04
[10,] 2000 1e+05
> 
> 
> tmp3[,-1] <- tmp3[,1:9]
> tmp3[,1:10]
      [,1] [,2]  [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,] 1100 1100 1e+04   21   31   41   51   61   71    81
 [2,] 1200 1200 2e+04   22   32   42   52   62   72    82
 [3,] 1300 1300 3e+04   23   33   43   53   63   73    83
 [4,] 1400 1400 4e+04   24   34   44   54   64   74    84
 [5,] 1500 1500 5e+04   25   35   45   55   65   75    85
 [6,] 1600 1600 6e+04   26   36   46   56   66   76    86
 [7,] 1700 1700 7e+04   27   37   47   57   67   77    87
 [8,] 1800 1800 8e+04   28   38   48   58   68   78    88
 [9,] 1900 1900 9e+04   29   39   49   59   69   79    89
[10,] 2000 2000 1e+05   30   40   50   60   70   80    90
> 
> tmp3[,1:2] <- rep(1,10)
> tmp3[,1:2] <- rep(1,20)
> tmp3[,1:2] <- matrix(c(1:5),1,5)
> 
> tmp3[,-c(1:8)] <- matrix(c(1:5),1,5)
> 
> tmp3[1,] <- 1:10
> tmp3[1,]
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    1    2    3    4    5    6    7    8    9    10
> tmp3[-1,] <- c(1,2)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    2    1    2    1    2    1    2    1    2     1
[10,]    1    2    1    2    1    2    1    2    1     2
> tmp3[-c(1:8),] <- matrix(c(1:5),1,5)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    1    3    5    2    4    1    3    5    2     4
[10,]    2    4    1    3    5    2    4    1    3     5
> 
> 
> tmp3[1:2,1:2] <- 5555.04
> tmp3[-(1:2),1:2] <- 1234.56789
> 
> 
> 
> ## testing accessors for the directory and prefix
> directory(tmp3)
[1] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests"
> prefix(tmp3)
[1] "BM"
> 
> ## testing if we can remove these objects
> rm(tmp, tmp2, tmp3)
> gc()
         used (Mb) gc trigger (Mb) limit (Mb) max used (Mb)
Ncells 480828 25.7    1056624 56.5         NA   634340 33.9
Vcells 891019  6.8    8388608 64.0     196608  2109889 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] "Fri Oct  3 18:31:32 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] "Fri Oct  3 18:31:32 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: 0x6000024fcba0>
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Fri Oct  3 18:31:33 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] "Fri Oct  3 18:31:33 2025"
> 
> ColMode(tmp2)
<pointer: 0x6000024fcba0>
> 
> 
> 
> ### 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.8433503 -1.5786468  1.9141793  1.9075536
[2,] -0.1941510 -0.7311079  0.2613088 -0.4816849
[3,] -0.9676017  0.3384051  0.6577329  1.9439601
[4,] -0.8541350  0.7830303 -0.8657844 -0.2054543
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
           [,1]      [,2]      [,3]      [,4]
[1,] 99.8433503 1.5786468 1.9141793 1.9075536
[2,]  0.1941510 0.7311079 0.2613088 0.4816849
[3,]  0.9676017 0.3384051 0.6577329 1.9439601
[4,]  0.8541350 0.7830303 0.8657844 0.2054543
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]      [,2]      [,3]      [,4]
[1,] 9.9921644 1.2564421 1.3835387 1.3811421
[2,] 0.4406257 0.8550485 0.5111837 0.6940352
[3,] 0.9836675 0.5817260 0.8110073 1.3942597
[4,] 0.9241943 0.8848900 0.9304754 0.4532707
> 
> my.function <- function(x,power){
+   (x+5)^power
+ }
> 
> ewApply(tmp5,my.function,power=2)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 224.76499 39.14307 40.74957 40.71897
[2,]  29.60041 34.28159 30.37315 32.42204
[3,]  35.80428 31.15566 33.76781 40.88656
[4,]  35.09608 34.63193 35.17054 29.73816
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x6000024f4300>
> exp(tmp5)
<pointer: 0x6000024f4300>
> log(tmp5,2)
<pointer: 0x6000024f4300>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 467.8189
> Min(tmp5)
[1] 53.41828
> mean(tmp5)
[1] 72.54693
> Sum(tmp5)
[1] 14509.39
> Var(tmp5)
[1] 871.1598
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 92.57953 68.33046 73.53562 70.56496 68.61151 69.30830 70.45539 69.61563
 [9] 69.28830 73.17963
> rowSums(tmp5)
 [1] 1851.591 1366.609 1470.712 1411.299 1372.230 1386.166 1409.108 1392.313
 [9] 1385.766 1463.593
> rowVars(tmp5)
 [1] 7885.61909   67.05779  118.41795   82.94814   92.41748   79.71323
 [7]   72.73217   61.56413   93.13061   71.75569
> rowSd(tmp5)
 [1] 88.801008  8.188882 10.882001  9.107587  9.613401  8.928226  8.528316
 [8]  7.846281  9.650420  8.470873
> rowMax(tmp5)
 [1] 467.81889  81.13814  99.28117  89.47486  87.01199  88.12077  92.06611
 [8]  88.77680  86.62057  87.85161
> rowMin(tmp5)
 [1] 56.43157 53.41828 60.58847 57.87264 54.44044 54.72743 55.12921 58.91765
 [9] 54.26445 59.83353
> 
> colMeans(tmp5)
 [1] 112.99831  72.12060  72.92209  71.51932  70.46168  75.31443  68.01879
 [8]  70.47459  64.43491  69.31654  65.38846  67.52109  71.03967  67.99109
[15]  72.21158  70.85347  73.46315  73.07407  69.47918  72.33564
> colSums(tmp5)
 [1] 1129.9831  721.2060  729.2209  715.1932  704.6168  753.1443  680.1879
 [8]  704.7459  644.3491  693.1654  653.8846  675.2109  710.3967  679.9109
[15]  722.1158  708.5347  734.6315  730.7407  694.7918  723.3564
> colVars(tmp5)
 [1] 15631.38975    83.88142    52.91544   104.54685    55.62540   151.79296
 [7]    40.40341    48.38874    74.79988    44.24569    89.21847    33.21635
[13]    74.20493    36.82295   183.10089    88.46849   177.17447    74.45172
[19]    70.82085    75.92896
> colSd(tmp5)
 [1] 125.025556   9.158680   7.274300  10.224816   7.458244  12.320429
 [7]   6.356368   6.956202   8.648693   6.651743   9.445553   5.763363
[13]   8.614229   6.068191  13.531478   9.405769  13.310690   8.628541
[19]   8.415513   8.713723
> colMax(tmp5)
 [1] 467.81889  84.87075  84.81488  85.10001  85.86306  92.06611  80.56649
 [8]  79.96293  85.44696  80.93933  78.27014  77.17101  84.95890  75.65963
[15]  99.28117  83.02366  94.89863  84.74642  81.13814  87.01199
> colMin(tmp5)
 [1] 60.20739 54.72743 63.21772 55.12921 62.96591 57.02907 61.88083 58.98746
 [9] 54.91537 58.79890 54.26445 61.77288 54.62074 56.89396 53.41828 54.98157
[17] 56.55213 58.40648 54.44044 61.11265
> 
> 
> ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default)
> 
> 
> which.row <- sample(1:10,1,replace=TRUE)
> which.col  <- sample(1:20,1,replace=TRUE)
> 
> tmp5[which.row,which.col] <- NA
> 
> Max(tmp5)
[1] NA
> Min(tmp5)
[1] NA
> mean(tmp5)
[1] NA
> Sum(tmp5)
[1] NA
> Var(tmp5)
[1] NA
> 
> rowMeans(tmp5)
 [1] 92.57953 68.33046 73.53562 70.56496 68.61151 69.30830 70.45539 69.61563
 [9] 69.28830       NA
> rowSums(tmp5)
 [1] 1851.591 1366.609 1470.712 1411.299 1372.230 1386.166 1409.108 1392.313
 [9] 1385.766       NA
> rowVars(tmp5)
 [1] 7885.61909   67.05779  118.41795   82.94814   92.41748   79.71323
 [7]   72.73217   61.56413   93.13061   75.47200
> rowSd(tmp5)
 [1] 88.801008  8.188882 10.882001  9.107587  9.613401  8.928226  8.528316
 [8]  7.846281  9.650420  8.687462
> rowMax(tmp5)
 [1] 467.81889  81.13814  99.28117  89.47486  87.01199  88.12077  92.06611
 [8]  88.77680  86.62057        NA
> rowMin(tmp5)
 [1] 56.43157 53.41828 60.58847 57.87264 54.44044 54.72743 55.12921 58.91765
 [9] 54.26445       NA
> 
> colMeans(tmp5)
 [1] 112.99831  72.12060  72.92209        NA  70.46168  75.31443  68.01879
 [8]  70.47459  64.43491  69.31654  65.38846  67.52109  71.03967  67.99109
[15]  72.21158  70.85347  73.46315  73.07407  69.47918  72.33564
> colSums(tmp5)
 [1] 1129.9831  721.2060  729.2209        NA  704.6168  753.1443  680.1879
 [8]  704.7459  644.3491  693.1654  653.8846  675.2109  710.3967  679.9109
[15]  722.1158  708.5347  734.6315  730.7407  694.7918  723.3564
> colVars(tmp5)
 [1] 15631.38975    83.88142    52.91544          NA    55.62540   151.79296
 [7]    40.40341    48.38874    74.79988    44.24569    89.21847    33.21635
[13]    74.20493    36.82295   183.10089    88.46849   177.17447    74.45172
[19]    70.82085    75.92896
> colSd(tmp5)
 [1] 125.025556   9.158680   7.274300         NA   7.458244  12.320429
 [7]   6.356368   6.956202   8.648693   6.651743   9.445553   5.763363
[13]   8.614229   6.068191  13.531478   9.405769  13.310690   8.628541
[19]   8.415513   8.713723
> colMax(tmp5)
 [1] 467.81889  84.87075  84.81488        NA  85.86306  92.06611  80.56649
 [8]  79.96293  85.44696  80.93933  78.27014  77.17101  84.95890  75.65963
[15]  99.28117  83.02366  94.89863  84.74642  81.13814  87.01199
> colMin(tmp5)
 [1] 60.20739 54.72743 63.21772       NA 62.96591 57.02907 61.88083 58.98746
 [9] 54.91537 58.79890 54.26445 61.77288 54.62074 56.89396 53.41828 54.98157
[17] 56.55213 58.40648 54.44044 61.11265
> 
> Max(tmp5,na.rm=TRUE)
[1] 467.8189
> Min(tmp5,na.rm=TRUE)
[1] 53.41828
> mean(tmp5,na.rm=TRUE)
[1] 72.55455
> Sum(tmp5,na.rm=TRUE)
[1] 14438.36
> Var(tmp5,na.rm=TRUE)
[1] 875.5479
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 92.57953 68.33046 73.53562 70.56496 68.61151 69.30830 70.45539 69.61563
 [9] 69.28830 73.29275
> rowSums(tmp5,na.rm=TRUE)
 [1] 1851.591 1366.609 1470.712 1411.299 1372.230 1386.166 1409.108 1392.313
 [9] 1385.766 1392.562
> rowVars(tmp5,na.rm=TRUE)
 [1] 7885.61909   67.05779  118.41795   82.94814   92.41748   79.71323
 [7]   72.73217   61.56413   93.13061   75.47200
> rowSd(tmp5,na.rm=TRUE)
 [1] 88.801008  8.188882 10.882001  9.107587  9.613401  8.928226  8.528316
 [8]  7.846281  9.650420  8.687462
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.81889  81.13814  99.28117  89.47486  87.01199  88.12077  92.06611
 [8]  88.77680  86.62057  87.85161
> rowMin(tmp5,na.rm=TRUE)
 [1] 56.43157 53.41828 60.58847 57.87264 54.44044 54.72743 55.12921 58.91765
 [9] 54.26445 59.83353
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 112.99831  72.12060  72.92209  71.57364  70.46168  75.31443  68.01879
 [8]  70.47459  64.43491  69.31654  65.38846  67.52109  71.03967  67.99109
[15]  72.21158  70.85347  73.46315  73.07407  69.47918  72.33564
> colSums(tmp5,na.rm=TRUE)
 [1] 1129.9831  721.2060  729.2209  644.1628  704.6168  753.1443  680.1879
 [8]  704.7459  644.3491  693.1654  653.8846  675.2109  710.3967  679.9109
[15]  722.1158  708.5347  734.6315  730.7407  694.7918  723.3564
> colVars(tmp5,na.rm=TRUE)
 [1] 15631.38975    83.88142    52.91544   117.58202    55.62540   151.79296
 [7]    40.40341    48.38874    74.79988    44.24569    89.21847    33.21635
[13]    74.20493    36.82295   183.10089    88.46849   177.17447    74.45172
[19]    70.82085    75.92896
> colSd(tmp5,na.rm=TRUE)
 [1] 125.025556   9.158680   7.274300  10.843524   7.458244  12.320429
 [7]   6.356368   6.956202   8.648693   6.651743   9.445553   5.763363
[13]   8.614229   6.068191  13.531478   9.405769  13.310690   8.628541
[19]   8.415513   8.713723
> colMax(tmp5,na.rm=TRUE)
 [1] 467.81889  84.87075  84.81488  85.10001  85.86306  92.06611  80.56649
 [8]  79.96293  85.44696  80.93933  78.27014  77.17101  84.95890  75.65963
[15]  99.28117  83.02366  94.89863  84.74642  81.13814  87.01199
> colMin(tmp5,na.rm=TRUE)
 [1] 60.20739 54.72743 63.21772 55.12921 62.96591 57.02907 61.88083 58.98746
 [9] 54.91537 58.79890 54.26445 61.77288 54.62074 56.89396 53.41828 54.98157
[17] 56.55213 58.40648 54.44044 61.11265
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 92.57953 68.33046 73.53562 70.56496 68.61151 69.30830 70.45539 69.61563
 [9] 69.28830      NaN
> rowSums(tmp5,na.rm=TRUE)
 [1] 1851.591 1366.609 1470.712 1411.299 1372.230 1386.166 1409.108 1392.313
 [9] 1385.766    0.000
> rowVars(tmp5,na.rm=TRUE)
 [1] 7885.61909   67.05779  118.41795   82.94814   92.41748   79.71323
 [7]   72.73217   61.56413   93.13061         NA
> rowSd(tmp5,na.rm=TRUE)
 [1] 88.801008  8.188882 10.882001  9.107587  9.613401  8.928226  8.528316
 [8]  7.846281  9.650420        NA
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.81889  81.13814  99.28117  89.47486  87.01199  88.12077  92.06611
 [8]  88.77680  86.62057        NA
> rowMin(tmp5,na.rm=TRUE)
 [1] 56.43157 53.41828 60.58847 57.87264 54.44044 54.72743 55.12921 58.91765
 [9] 54.26445       NA
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 116.82148  71.35109  73.48874       NaN  68.75042  75.10359  68.69099
 [8]  70.86336  64.58222  68.02512  66.00567  66.87441  69.49309  67.43278
[15]  72.33818  71.61565  71.86443  73.21112  68.20723  73.23943
> colSums(tmp5,na.rm=TRUE)
 [1] 1051.3933  642.1599  661.3986    0.0000  618.7538  675.9323  618.2189
 [8]  637.7703  581.2400  612.2261  594.0511  601.8697  625.4378  606.8951
[15]  651.0436  644.5409  646.7799  658.9001  613.8650  659.1549
> colVars(tmp5,na.rm=TRUE)
 [1] 17420.87606    87.70504    55.91766          NA    29.63380   170.26699
 [7]    40.37048    52.73698    83.90572    31.01401    96.08506    32.66380
[13]    56.57155    37.91919   205.80821    92.99162   170.56740    83.54689
[19]    61.47260    76.23072
> colSd(tmp5,na.rm=TRUE)
 [1] 131.988166   9.365097   7.477811         NA   5.443694  13.048639
 [7]   6.353777   7.262023   9.160006   5.569022   9.802299   5.715225
[13]   7.521406   6.157856  14.346017   9.643216  13.060145   9.140399
[19]   7.840446   8.731021
> colMax(tmp5,na.rm=TRUE)
 [1] 467.81889  84.87075  84.81488      -Inf  79.70016  92.06611  80.56649
 [8]  79.96293  85.44696  74.79513  78.27014  77.17101  78.18646  75.65963
[15]  99.28117  83.02366  94.89863  84.74642  81.13814  87.01199
> colMin(tmp5,na.rm=TRUE)
 [1] 60.20739 54.72743 63.21772      Inf 62.96591 57.02907 61.88083 58.98746
 [9] 54.91537 58.79890 54.26445 61.77288 54.62074 56.89396 53.41828 54.98157
[17] 56.55213 58.40648 54.44044 61.11265
> 
> 
> 
> 
> 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] 236.1647 271.8796 271.5846 243.3815 139.1656 280.8164 182.5721 126.5168
 [9] 194.1746 260.3239
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 236.1647 271.8796 271.5846 243.3815 139.1656 280.8164 182.5721 126.5168
 [9] 194.1746 260.3239
> 
> 
> 
> 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]  0.000000e+00  2.842171e-14  1.136868e-13  0.000000e+00 -5.684342e-14
 [6]  0.000000e+00  7.105427e-14  8.526513e-14 -2.842171e-14 -1.136868e-13
[11]  0.000000e+00  0.000000e+00  1.136868e-13  9.947598e-14 -2.273737e-13
[16]  0.000000e+00 -1.705303e-13 -2.842171e-14 -1.421085e-14 -8.526513e-14
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## making sure these things agree
> ##
> ## first when there is no NA
> 
> 
> 
> agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){
+ 
+   if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Max")
+   }
+   
+ 
+   if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Min")
+   }
+ 
+ 
+   if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){
+ 
+     cat(Sum(buff.matrix,na.rm=TRUE),"\n")
+     cat(sum(r.matrix,na.rm=TRUE),"\n")
+     cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n")
+     
+     stop("No agreement in Sum")
+   }
+   
+   if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){
+     stop("No agreement in mean")
+   }
+   
+   
+   if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){
+     stop("No agreement in Var")
+   }
+   
+   
+ 
+   if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowMeans")
+   }
+   
+   
+   if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colMeans")
+   }
+   
+   
+   if(any(abs(rowSums(buff.matrix,na.rm=TRUE)  -  apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in rowSums")
+   }
+   
+   
+   if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colSums")
+   }
+   
+   ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when 
+   ### computing variance
+   my.Var <- function(x,na.rm=FALSE){
+    if (all(is.na(x))){
+      return(NA)
+    } else {
+      var(x,na.rm=na.rm)
+    }
+ 
+   }
+   
+   if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+   
+   
+   if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+ 
+ 
+   if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+ 
+   if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+   
+   
+   if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+   
+ 
+   if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+ 
+   if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMedian")
+   }
+ 
+   if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colRanges")
+   }
+ 
+ 
+   
+ }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> for (rep in 1:20){
+   copymatrix <- matrix(rnorm(200,150,15),10,20)
+   
+   tmp5[1:10,1:20] <- copymatrix
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ## now lets assign some NA values and check agreement
+ 
+   which.row <- sample(1:10,1,replace=TRUE)
+   which.col  <- sample(1:20,1,replace=TRUE)
+   
+   cat(which.row," ",which.col,"\n")
+   
+   tmp5[which.row,which.col] <- NA
+   copymatrix[which.row,which.col] <- NA
+   
+   agree.checks(tmp5,copymatrix)
+ 
+   ## make an entire row NA
+   tmp5[which.row,] <- NA
+   copymatrix[which.row,] <- NA
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ### also make an entire col NA
+   tmp5[,which.col] <- NA
+   copymatrix[,which.col] <- NA
+ 
+   agree.checks(tmp5,copymatrix)
+ 
+   ### now make 1 element non NA with NA in the rest of row and column
+ 
+   tmp5[which.row,which.col] <- rnorm(1,150,15)
+   copymatrix[which.row,which.col] <- tmp5[which.row,which.col]
+ 
+   agree.checks(tmp5,copymatrix)
+ }
4   10 
5   18 
8   11 
2   11 
2   12 
8   6 
1   16 
1   12 
9   14 
6   10 
4   14 
1   11 
6   2 
7   7 
6   19 
7   13 
7   9 
5   2 
5   20 
2   12 
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.235438
> Min(tmp)
[1] -2.11324
> mean(tmp)
[1] -0.0001738499
> Sum(tmp)
[1] -0.01738499
> Var(tmp)
[1] 0.8981481
> 
> rowMeans(tmp)
[1] -0.0001738499
> rowSums(tmp)
[1] -0.01738499
> rowVars(tmp)
[1] 0.8981481
> rowSd(tmp)
[1] 0.9477067
> rowMax(tmp)
[1] 2.235438
> rowMin(tmp)
[1] -2.11324
> 
> colMeans(tmp)
  [1]  0.516197123  0.611815049 -0.436061869  0.427490743 -1.159860654
  [6] -1.578263034 -0.676145828 -0.254589536 -1.660160081 -0.699024733
 [11]  0.112533507  0.427416303 -1.476449748  0.397234819  0.579652865
 [16] -0.902140030 -0.004798942 -0.217807557 -0.454352721  0.689827025
 [21] -1.529578649  0.489081862  0.078172342  0.178261007 -1.425520547
 [26]  0.738468238  0.090104159  1.384170151  0.619310303  0.469156450
 [31]  0.352380763 -0.734349480  2.235438276  0.344000288  1.115510253
 [36]  1.091180037  0.949792286 -0.809301412  0.865388338 -0.268247338
 [41] -0.188950949 -1.453456521  0.687822081  0.800685710 -0.469372967
 [46] -0.722152436 -2.113239942  1.094459352 -1.312417668  0.452734588
 [51] -0.373167462  1.396168523  1.391953754  0.060037255 -0.611852752
 [56]  1.134564407 -0.889555180  0.195563790 -1.096946815 -0.330332268
 [61] -0.132434074 -0.053461478 -0.688639329  1.158164820 -0.165614987
 [66]  0.684235936  0.963916198  0.080934222 -1.917224233  0.169103207
 [71]  0.614616939 -0.764055606  0.338875560  0.674894288 -0.453986289
 [76]  1.344686048  0.184668835  0.160990076  0.886968377  0.894569878
 [81]  1.967833071 -0.037127776  0.769285682 -0.047593035  1.227662027
 [86] -1.943373558 -1.878047774  1.144127246 -2.061389693 -0.165995722
 [91] -0.066177267  0.558382547  0.983762822 -0.407458057 -1.072898589
 [96] -1.530047323  0.529293162  0.968183269 -0.973429566 -0.092059366
> colSums(tmp)
  [1]  0.516197123  0.611815049 -0.436061869  0.427490743 -1.159860654
  [6] -1.578263034 -0.676145828 -0.254589536 -1.660160081 -0.699024733
 [11]  0.112533507  0.427416303 -1.476449748  0.397234819  0.579652865
 [16] -0.902140030 -0.004798942 -0.217807557 -0.454352721  0.689827025
 [21] -1.529578649  0.489081862  0.078172342  0.178261007 -1.425520547
 [26]  0.738468238  0.090104159  1.384170151  0.619310303  0.469156450
 [31]  0.352380763 -0.734349480  2.235438276  0.344000288  1.115510253
 [36]  1.091180037  0.949792286 -0.809301412  0.865388338 -0.268247338
 [41] -0.188950949 -1.453456521  0.687822081  0.800685710 -0.469372967
 [46] -0.722152436 -2.113239942  1.094459352 -1.312417668  0.452734588
 [51] -0.373167462  1.396168523  1.391953754  0.060037255 -0.611852752
 [56]  1.134564407 -0.889555180  0.195563790 -1.096946815 -0.330332268
 [61] -0.132434074 -0.053461478 -0.688639329  1.158164820 -0.165614987
 [66]  0.684235936  0.963916198  0.080934222 -1.917224233  0.169103207
 [71]  0.614616939 -0.764055606  0.338875560  0.674894288 -0.453986289
 [76]  1.344686048  0.184668835  0.160990076  0.886968377  0.894569878
 [81]  1.967833071 -0.037127776  0.769285682 -0.047593035  1.227662027
 [86] -1.943373558 -1.878047774  1.144127246 -2.061389693 -0.165995722
 [91] -0.066177267  0.558382547  0.983762822 -0.407458057 -1.072898589
 [96] -1.530047323  0.529293162  0.968183269 -0.973429566 -0.092059366
> colVars(tmp)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> colSd(tmp)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> colMax(tmp)
  [1]  0.516197123  0.611815049 -0.436061869  0.427490743 -1.159860654
  [6] -1.578263034 -0.676145828 -0.254589536 -1.660160081 -0.699024733
 [11]  0.112533507  0.427416303 -1.476449748  0.397234819  0.579652865
 [16] -0.902140030 -0.004798942 -0.217807557 -0.454352721  0.689827025
 [21] -1.529578649  0.489081862  0.078172342  0.178261007 -1.425520547
 [26]  0.738468238  0.090104159  1.384170151  0.619310303  0.469156450
 [31]  0.352380763 -0.734349480  2.235438276  0.344000288  1.115510253
 [36]  1.091180037  0.949792286 -0.809301412  0.865388338 -0.268247338
 [41] -0.188950949 -1.453456521  0.687822081  0.800685710 -0.469372967
 [46] -0.722152436 -2.113239942  1.094459352 -1.312417668  0.452734588
 [51] -0.373167462  1.396168523  1.391953754  0.060037255 -0.611852752
 [56]  1.134564407 -0.889555180  0.195563790 -1.096946815 -0.330332268
 [61] -0.132434074 -0.053461478 -0.688639329  1.158164820 -0.165614987
 [66]  0.684235936  0.963916198  0.080934222 -1.917224233  0.169103207
 [71]  0.614616939 -0.764055606  0.338875560  0.674894288 -0.453986289
 [76]  1.344686048  0.184668835  0.160990076  0.886968377  0.894569878
 [81]  1.967833071 -0.037127776  0.769285682 -0.047593035  1.227662027
 [86] -1.943373558 -1.878047774  1.144127246 -2.061389693 -0.165995722
 [91] -0.066177267  0.558382547  0.983762822 -0.407458057 -1.072898589
 [96] -1.530047323  0.529293162  0.968183269 -0.973429566 -0.092059366
> colMin(tmp)
  [1]  0.516197123  0.611815049 -0.436061869  0.427490743 -1.159860654
  [6] -1.578263034 -0.676145828 -0.254589536 -1.660160081 -0.699024733
 [11]  0.112533507  0.427416303 -1.476449748  0.397234819  0.579652865
 [16] -0.902140030 -0.004798942 -0.217807557 -0.454352721  0.689827025
 [21] -1.529578649  0.489081862  0.078172342  0.178261007 -1.425520547
 [26]  0.738468238  0.090104159  1.384170151  0.619310303  0.469156450
 [31]  0.352380763 -0.734349480  2.235438276  0.344000288  1.115510253
 [36]  1.091180037  0.949792286 -0.809301412  0.865388338 -0.268247338
 [41] -0.188950949 -1.453456521  0.687822081  0.800685710 -0.469372967
 [46] -0.722152436 -2.113239942  1.094459352 -1.312417668  0.452734588
 [51] -0.373167462  1.396168523  1.391953754  0.060037255 -0.611852752
 [56]  1.134564407 -0.889555180  0.195563790 -1.096946815 -0.330332268
 [61] -0.132434074 -0.053461478 -0.688639329  1.158164820 -0.165614987
 [66]  0.684235936  0.963916198  0.080934222 -1.917224233  0.169103207
 [71]  0.614616939 -0.764055606  0.338875560  0.674894288 -0.453986289
 [76]  1.344686048  0.184668835  0.160990076  0.886968377  0.894569878
 [81]  1.967833071 -0.037127776  0.769285682 -0.047593035  1.227662027
 [86] -1.943373558 -1.878047774  1.144127246 -2.061389693 -0.165995722
 [91] -0.066177267  0.558382547  0.983762822 -0.407458057 -1.072898589
 [96] -1.530047323  0.529293162  0.968183269 -0.973429566 -0.092059366
> colMedians(tmp)
  [1]  0.516197123  0.611815049 -0.436061869  0.427490743 -1.159860654
  [6] -1.578263034 -0.676145828 -0.254589536 -1.660160081 -0.699024733
 [11]  0.112533507  0.427416303 -1.476449748  0.397234819  0.579652865
 [16] -0.902140030 -0.004798942 -0.217807557 -0.454352721  0.689827025
 [21] -1.529578649  0.489081862  0.078172342  0.178261007 -1.425520547
 [26]  0.738468238  0.090104159  1.384170151  0.619310303  0.469156450
 [31]  0.352380763 -0.734349480  2.235438276  0.344000288  1.115510253
 [36]  1.091180037  0.949792286 -0.809301412  0.865388338 -0.268247338
 [41] -0.188950949 -1.453456521  0.687822081  0.800685710 -0.469372967
 [46] -0.722152436 -2.113239942  1.094459352 -1.312417668  0.452734588
 [51] -0.373167462  1.396168523  1.391953754  0.060037255 -0.611852752
 [56]  1.134564407 -0.889555180  0.195563790 -1.096946815 -0.330332268
 [61] -0.132434074 -0.053461478 -0.688639329  1.158164820 -0.165614987
 [66]  0.684235936  0.963916198  0.080934222 -1.917224233  0.169103207
 [71]  0.614616939 -0.764055606  0.338875560  0.674894288 -0.453986289
 [76]  1.344686048  0.184668835  0.160990076  0.886968377  0.894569878
 [81]  1.967833071 -0.037127776  0.769285682 -0.047593035  1.227662027
 [86] -1.943373558 -1.878047774  1.144127246 -2.061389693 -0.165995722
 [91] -0.066177267  0.558382547  0.983762822 -0.407458057 -1.072898589
 [96] -1.530047323  0.529293162  0.968183269 -0.973429566 -0.092059366
> colRanges(tmp)
          [,1]     [,2]       [,3]      [,4]      [,5]      [,6]       [,7]
[1,] 0.5161971 0.611815 -0.4360619 0.4274907 -1.159861 -1.578263 -0.6761458
[2,] 0.5161971 0.611815 -0.4360619 0.4274907 -1.159861 -1.578263 -0.6761458
           [,8]     [,9]      [,10]     [,11]     [,12]    [,13]     [,14]
[1,] -0.2545895 -1.66016 -0.6990247 0.1125335 0.4274163 -1.47645 0.3972348
[2,] -0.2545895 -1.66016 -0.6990247 0.1125335 0.4274163 -1.47645 0.3972348
         [,15]    [,16]        [,17]      [,18]      [,19]    [,20]     [,21]
[1,] 0.5796529 -0.90214 -0.004798942 -0.2178076 -0.4543527 0.689827 -1.529579
[2,] 0.5796529 -0.90214 -0.004798942 -0.2178076 -0.4543527 0.689827 -1.529579
         [,22]      [,23]    [,24]     [,25]     [,26]      [,27]   [,28]
[1,] 0.4890819 0.07817234 0.178261 -1.425521 0.7384682 0.09010416 1.38417
[2,] 0.4890819 0.07817234 0.178261 -1.425521 0.7384682 0.09010416 1.38417
         [,29]     [,30]     [,31]      [,32]    [,33]     [,34]   [,35]
[1,] 0.6193103 0.4691564 0.3523808 -0.7343495 2.235438 0.3440003 1.11551
[2,] 0.6193103 0.4691564 0.3523808 -0.7343495 2.235438 0.3440003 1.11551
       [,36]     [,37]      [,38]     [,39]      [,40]      [,41]     [,42]
[1,] 1.09118 0.9497923 -0.8093014 0.8653883 -0.2682473 -0.1889509 -1.453457
[2,] 1.09118 0.9497923 -0.8093014 0.8653883 -0.2682473 -0.1889509 -1.453457
         [,43]     [,44]     [,45]      [,46]    [,47]    [,48]     [,49]
[1,] 0.6878221 0.8006857 -0.469373 -0.7221524 -2.11324 1.094459 -1.312418
[2,] 0.6878221 0.8006857 -0.469373 -0.7221524 -2.11324 1.094459 -1.312418
         [,50]      [,51]    [,52]    [,53]      [,54]      [,55]    [,56]
[1,] 0.4527346 -0.3731675 1.396169 1.391954 0.06003726 -0.6118528 1.134564
[2,] 0.4527346 -0.3731675 1.396169 1.391954 0.06003726 -0.6118528 1.134564
          [,57]     [,58]     [,59]      [,60]      [,61]       [,62]
[1,] -0.8895552 0.1955638 -1.096947 -0.3303323 -0.1324341 -0.05346148
[2,] -0.8895552 0.1955638 -1.096947 -0.3303323 -0.1324341 -0.05346148
          [,63]    [,64]     [,65]     [,66]     [,67]      [,68]     [,69]
[1,] -0.6886393 1.158165 -0.165615 0.6842359 0.9639162 0.08093422 -1.917224
[2,] -0.6886393 1.158165 -0.165615 0.6842359 0.9639162 0.08093422 -1.917224
         [,70]     [,71]      [,72]     [,73]     [,74]      [,75]    [,76]
[1,] 0.1691032 0.6146169 -0.7640556 0.3388756 0.6748943 -0.4539863 1.344686
[2,] 0.1691032 0.6146169 -0.7640556 0.3388756 0.6748943 -0.4539863 1.344686
         [,77]     [,78]     [,79]     [,80]    [,81]       [,82]     [,83]
[1,] 0.1846688 0.1609901 0.8869684 0.8945699 1.967833 -0.03712778 0.7692857
[2,] 0.1846688 0.1609901 0.8869684 0.8945699 1.967833 -0.03712778 0.7692857
           [,84]    [,85]     [,86]     [,87]    [,88]    [,89]      [,90]
[1,] -0.04759304 1.227662 -1.943374 -1.878048 1.144127 -2.06139 -0.1659957
[2,] -0.04759304 1.227662 -1.943374 -1.878048 1.144127 -2.06139 -0.1659957
           [,91]     [,92]     [,93]      [,94]     [,95]     [,96]     [,97]
[1,] -0.06617727 0.5583825 0.9837628 -0.4074581 -1.072899 -1.530047 0.5292932
[2,] -0.06617727 0.5583825 0.9837628 -0.4074581 -1.072899 -1.530047 0.5292932
         [,98]      [,99]      [,100]
[1,] 0.9681833 -0.9734296 -0.09205937
[2,] 0.9681833 -0.9734296 -0.09205937
> 
> 
> Max(tmp2)
[1] 2.316377
> Min(tmp2)
[1] -2.36343
> mean(tmp2)
[1] 0.01291475
> Sum(tmp2)
[1] 1.291475
> Var(tmp2)
[1] 0.9674074
> 
> rowMeans(tmp2)
  [1] -1.348305346 -0.244028980 -0.581872589 -1.256818401  0.290618485
  [6]  1.184164969 -1.595461769 -1.304871069  0.284968256  0.056980046
 [11] -0.295646853  0.011234306 -0.848929857  0.027093655  1.330555911
 [16]  1.018250061  1.316681813  0.475678215 -0.789614870  0.145589249
 [21] -0.363970051 -0.677197443 -1.469134877  1.288299435  2.057353433
 [26]  1.392729036  0.689989581 -0.004503883 -1.159204474 -1.082645341
 [31] -1.071473172 -0.351333131 -1.692140687  1.171945020  0.970425179
 [36]  0.924621548  1.572782544  1.074154964  0.602397866  0.308947841
 [41] -0.991656840 -2.093523867  0.722685324  0.828665712 -1.549169444
 [46] -0.091636935  0.022930634 -0.466923359  1.030523446 -1.345432237
 [51] -1.039058257  0.059004718 -0.277877186  0.250490421  0.830457795
 [56] -1.154923325  0.740316730 -1.664770494  1.210511281 -0.293875956
 [61] -0.935698358  0.860150548  0.376548544 -0.864311772 -0.671631817
 [66]  1.840194612 -1.570672534  1.426774628 -0.181765172  0.818462842
 [71] -0.134577097 -0.424076820  1.120213855 -0.152674067 -0.184014396
 [76]  1.501032928  0.466473420  0.384179411  2.316377353  1.056381944
 [81] -0.420176380  0.162663736  0.336953503 -0.309668083 -0.161637403
 [86] -2.363430321  0.012263136 -0.044983632  1.099672251  1.115685979
 [91] -0.341077640 -0.877240056  1.338826163 -0.016804571 -0.062033849
 [96] -0.253753232 -0.541273814 -0.521756965 -0.897945540  0.204776710
> rowSums(tmp2)
  [1] -1.348305346 -0.244028980 -0.581872589 -1.256818401  0.290618485
  [6]  1.184164969 -1.595461769 -1.304871069  0.284968256  0.056980046
 [11] -0.295646853  0.011234306 -0.848929857  0.027093655  1.330555911
 [16]  1.018250061  1.316681813  0.475678215 -0.789614870  0.145589249
 [21] -0.363970051 -0.677197443 -1.469134877  1.288299435  2.057353433
 [26]  1.392729036  0.689989581 -0.004503883 -1.159204474 -1.082645341
 [31] -1.071473172 -0.351333131 -1.692140687  1.171945020  0.970425179
 [36]  0.924621548  1.572782544  1.074154964  0.602397866  0.308947841
 [41] -0.991656840 -2.093523867  0.722685324  0.828665712 -1.549169444
 [46] -0.091636935  0.022930634 -0.466923359  1.030523446 -1.345432237
 [51] -1.039058257  0.059004718 -0.277877186  0.250490421  0.830457795
 [56] -1.154923325  0.740316730 -1.664770494  1.210511281 -0.293875956
 [61] -0.935698358  0.860150548  0.376548544 -0.864311772 -0.671631817
 [66]  1.840194612 -1.570672534  1.426774628 -0.181765172  0.818462842
 [71] -0.134577097 -0.424076820  1.120213855 -0.152674067 -0.184014396
 [76]  1.501032928  0.466473420  0.384179411  2.316377353  1.056381944
 [81] -0.420176380  0.162663736  0.336953503 -0.309668083 -0.161637403
 [86] -2.363430321  0.012263136 -0.044983632  1.099672251  1.115685979
 [91] -0.341077640 -0.877240056  1.338826163 -0.016804571 -0.062033849
 [96] -0.253753232 -0.541273814 -0.521756965 -0.897945540  0.204776710
> 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] -1.348305346 -0.244028980 -0.581872589 -1.256818401  0.290618485
  [6]  1.184164969 -1.595461769 -1.304871069  0.284968256  0.056980046
 [11] -0.295646853  0.011234306 -0.848929857  0.027093655  1.330555911
 [16]  1.018250061  1.316681813  0.475678215 -0.789614870  0.145589249
 [21] -0.363970051 -0.677197443 -1.469134877  1.288299435  2.057353433
 [26]  1.392729036  0.689989581 -0.004503883 -1.159204474 -1.082645341
 [31] -1.071473172 -0.351333131 -1.692140687  1.171945020  0.970425179
 [36]  0.924621548  1.572782544  1.074154964  0.602397866  0.308947841
 [41] -0.991656840 -2.093523867  0.722685324  0.828665712 -1.549169444
 [46] -0.091636935  0.022930634 -0.466923359  1.030523446 -1.345432237
 [51] -1.039058257  0.059004718 -0.277877186  0.250490421  0.830457795
 [56] -1.154923325  0.740316730 -1.664770494  1.210511281 -0.293875956
 [61] -0.935698358  0.860150548  0.376548544 -0.864311772 -0.671631817
 [66]  1.840194612 -1.570672534  1.426774628 -0.181765172  0.818462842
 [71] -0.134577097 -0.424076820  1.120213855 -0.152674067 -0.184014396
 [76]  1.501032928  0.466473420  0.384179411  2.316377353  1.056381944
 [81] -0.420176380  0.162663736  0.336953503 -0.309668083 -0.161637403
 [86] -2.363430321  0.012263136 -0.044983632  1.099672251  1.115685979
 [91] -0.341077640 -0.877240056  1.338826163 -0.016804571 -0.062033849
 [96] -0.253753232 -0.541273814 -0.521756965 -0.897945540  0.204776710
> rowMin(tmp2)
  [1] -1.348305346 -0.244028980 -0.581872589 -1.256818401  0.290618485
  [6]  1.184164969 -1.595461769 -1.304871069  0.284968256  0.056980046
 [11] -0.295646853  0.011234306 -0.848929857  0.027093655  1.330555911
 [16]  1.018250061  1.316681813  0.475678215 -0.789614870  0.145589249
 [21] -0.363970051 -0.677197443 -1.469134877  1.288299435  2.057353433
 [26]  1.392729036  0.689989581 -0.004503883 -1.159204474 -1.082645341
 [31] -1.071473172 -0.351333131 -1.692140687  1.171945020  0.970425179
 [36]  0.924621548  1.572782544  1.074154964  0.602397866  0.308947841
 [41] -0.991656840 -2.093523867  0.722685324  0.828665712 -1.549169444
 [46] -0.091636935  0.022930634 -0.466923359  1.030523446 -1.345432237
 [51] -1.039058257  0.059004718 -0.277877186  0.250490421  0.830457795
 [56] -1.154923325  0.740316730 -1.664770494  1.210511281 -0.293875956
 [61] -0.935698358  0.860150548  0.376548544 -0.864311772 -0.671631817
 [66]  1.840194612 -1.570672534  1.426774628 -0.181765172  0.818462842
 [71] -0.134577097 -0.424076820  1.120213855 -0.152674067 -0.184014396
 [76]  1.501032928  0.466473420  0.384179411  2.316377353  1.056381944
 [81] -0.420176380  0.162663736  0.336953503 -0.309668083 -0.161637403
 [86] -2.363430321  0.012263136 -0.044983632  1.099672251  1.115685979
 [91] -0.341077640 -0.877240056  1.338826163 -0.016804571 -0.062033849
 [96] -0.253753232 -0.541273814 -0.521756965 -0.897945540  0.204776710
> 
> colMeans(tmp2)
[1] 0.01291475
> colSums(tmp2)
[1] 1.291475
> colVars(tmp2)
[1] 0.9674074
> colSd(tmp2)
[1] 0.9835687
> colMax(tmp2)
[1] 2.316377
> colMin(tmp2)
[1] -2.36343
> colMedians(tmp2)
[1] -0.01065423
> colRanges(tmp2)
          [,1]
[1,] -2.363430
[2,]  2.316377
> 
> dataset1 <- matrix(dataset1,1,100)
> 
> agree.checks(tmp,dataset1)
> 
> dataset2 <- matrix(dataset2,100,1)
> agree.checks(tmp2,dataset2)
>   
> 
> tmp <- createBufferedMatrix(10,10)
> 
> tmp[1:10,1:10] <- rnorm(100)
> colApply(tmp,sum)
 [1] -0.2170796 -4.9986254  0.5381088  6.2057227  4.3081117 -6.3456258
 [7] -0.5266339  3.7045224 -1.8135733  5.7686725
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -2.5863175
[2,] -0.4411161
[3,] -0.1047584
[4,]  0.6298764
[5,]  1.5658475
> 
> rowApply(tmp,sum)
 [1] -3.65760307  0.90597467  5.93018163  0.29096257 -0.57644249  0.95863288
 [7]  1.44060074  2.64844532 -1.23882901 -0.07832325
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    9    6    2   10    6    6    4    9    4     1
 [2,]    1    1    7    1    4    3    1    8    6     6
 [3,]    2    8    4    5    1    4    9    5    2    10
 [4,]    8    5    5    8    9    9   10    6    9     4
 [5,]   10   10    6    4   10    2    7    1    8     5
 [6,]    3    3    9    6    3    1    5    3    1     7
 [7,]    6    4    3    3    8    8    2    4    5     3
 [8,]    5    2   10    9    2   10    8    7    3     8
 [9,]    4    9    8    2    5    7    6    2    7     2
[10,]    7    7    1    7    7    5    3   10   10     9
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1]  4.2056823  0.2949771 -1.2697793 -2.3160855  1.5378611  2.4058693
 [7]  0.6960063 -2.6802074  0.5490879 -0.9059771 -3.9120436 -2.4048042
[13]  0.3953194  4.2138239  1.3765591  1.2939285 -2.0022194  1.6820885
[19] -0.4658175  0.9395937
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -0.8907970
[2,] -0.1290778
[3,]  0.1770352
[4,]  2.4555849
[5,]  2.5929370
> 
> rowApply(tmp,sum)
[1] -7.0107830  0.9000060  2.8396959  7.0593839 -0.1544398
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   10   20   11   20    5
[2,]   13   13    7   10    7
[3,]   11   17    2    3    9
[4,]    5    3    4   16    6
[5,]   20    8   18    1   18
> 
> 
> as.matrix(tmp)
           [,1]        [,2]        [,3]       [,4]       [,5]       [,6]
[1,] -0.1290778 -0.04164082 -0.09551428 -1.0370428  1.3131976 -0.2122349
[2,]  2.5929370  0.69007150  1.02086451 -1.0726390 -0.6212069  0.8001467
[3,]  0.1770352 -0.37642338 -0.97558056 -0.8844186  1.7359316  1.7587242
[4,]  2.4555849  0.46392000 -0.86841796  1.3049233 -1.9734550  0.4674129
[5,] -0.8907970 -0.44095023 -0.35113098 -0.6269084  1.0833938 -0.4081797
             [,7]       [,8]       [,9]      [,10]      [,11]      [,12]
[1,] -0.511035441 -1.2292320 -2.2887002 -0.6399892 -1.5344306 -0.0384765
[2,] -0.403014461  0.3114099 -0.8078514 -0.2657790 -0.8536494 -0.9795258
[3,]  0.005347497 -0.8684073  1.8841940  0.1614003 -0.3831281  0.3937524
[4,]  1.067863086 -0.8024971  0.5959343 -0.6146564  0.4362627 -0.7182240
[5,]  0.536845579 -0.0914808  1.1655111  0.4530471 -1.5770983 -1.0623303
          [,13]     [,14]      [,15]       [,16]      [,17]      [,18]
[1,] -0.6763589 0.4493087  0.2038325 -0.09263745  0.7282193 -2.2683600
[2,]  0.7744038 1.8282035 -2.2513509  1.37280652 -1.6462750  0.8835107
[3,]  0.6887933 0.3107604  0.9181609  0.21605070 -0.9075145  0.3701172
[4,] -1.0591551 1.3322180  1.7734352 -0.86150319  1.1093875  1.0776252
[5,]  0.6676362 0.2933334  0.7324813  0.65921194 -1.2860367  1.6191954
          [,19]      [,20]
[1,]  0.2018116  0.8875781
[2,] -0.8215902  0.3485338
[3,] -1.1541123 -0.2309871
[4,]  2.2238554 -0.3511297
[5,] -0.9157819  0.2855987
> 
> 
> is.BufferedMatrix(tmp)
[1] TRUE
> 
> as.BufferedMatrix(as.matrix(tmp))
BufferedMatrix object
Matrix size:  5 20 
Buffer size:  1 1 
Directory:    /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  800  bytes.
> 
> 
> 
> subBufferedMatrix(tmp,1:5,1:5)
BufferedMatrix object
Matrix size:  5 5 
Buffer size:  1 1 
Directory:    /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  653  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  565  bytes.
Disk usage :  160  bytes.
> subBufferedMatrix(tmp,1:3,)
BufferedMatrix object
Matrix size:  3 20 
Buffer size:  1 1 
Directory:    /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  480  bytes.
> 
> 
> rm(tmp)
> 
> 
> ###
> ### Testing colnames and rownames
> ###
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> 
> 
> colnames(tmp)
NULL
> rownames(tmp)
NULL
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> colnames(tmp)
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"
> rownames(tmp)
[1] "row1" "row2" "row3" "row4" "row5"
> 
> 
> tmp["row1",]
        col1    col2      col3      col4     col5       col6      col7
row1 1.27475 1.49458 0.6975369 0.7156052 1.327338 -0.7978994 0.2335818
           col8      col9      col10     col11     col12      col13     col14
row1 -0.1736923 -0.059203 0.09967723 -1.065725 0.4923768 0.09066884 -0.629106
         col15     col16    col17     col18     col19     col20
row1 0.9289086 0.3109203 0.048317 -1.143472 0.6382645 0.3714423
> tmp[,"col10"]
           col10
row1  0.09967723
row2  0.93117470
row3  1.49274081
row4 -0.51809181
row5  1.05038283
> tmp[c("row1","row5"),]
         col1     col2      col3      col4       col5       col6       col7
row1 1.274750  1.49458 0.6975369 0.7156052 1.32733848 -0.7978994 0.23358180
row5 1.349772 -2.68529 0.5412871 0.4498792 0.06322296  0.5181038 0.08738826
           col8      col9      col10      col11       col12      col13
row1 -0.1736923 -0.059203 0.09967723 -1.0657246  0.49237679 0.09066884
row5 -1.0037992 -1.215814 1.05038283  0.6607725 -0.02777397 0.95028862
         col14      col15      col16     col17      col18      col19      col20
row1 -0.629106  0.9289086  0.3109203  0.048317 -1.1434719  0.6382645  0.3714423
row5 -1.012299 -0.6260773 -1.1462892 -1.260900 -0.8379501 -0.3850652 -1.0920756
> tmp[,c("col6","col20")]
           col6       col20
row1 -0.7978994  0.37144226
row2 -0.8968021 -1.08727915
row3  1.2237227 -0.01115002
row4  2.0315443 -0.35155086
row5  0.5181038 -1.09207561
> tmp[c("row1","row5"),c("col6","col20")]
           col6      col20
row1 -0.7978994  0.3714423
row5  0.5181038 -1.0920756
> 
> 
> 
> 
> 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 52.09907 49.36991 49.38873 49.47367 49.24205 105.3022 50.02841 50.10727
         col9    col10    col11    col12    col13    col14    col15    col16
row1 50.08636 50.93804 49.57116 51.40839 51.33436 49.67286 50.18503 48.57393
        col17    col18  col19    col20
row1 49.41343 49.92163 50.701 105.7793
> tmp[,"col10"]
        col10
row1 50.93804
row2 30.24543
row3 29.43608
row4 31.39836
row5 49.56191
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 52.09907 49.36991 49.38873 49.47367 49.24205 105.3022 50.02841 50.10727
row5 51.18305 50.91713 51.15926 50.18188 50.82321 103.9548 49.98129 48.49401
         col9    col10    col11    col12    col13    col14    col15    col16
row1 50.08636 50.93804 49.57116 51.40839 51.33436 49.67286 50.18503 48.57393
row5 50.14776 49.56191 48.79536 49.91973 49.30190 49.52922 50.87328 48.49633
        col17    col18    col19    col20
row1 49.41343 49.92163 50.70100 105.7793
row5 50.22109 48.88623 48.33776 104.7068
> tmp[,c("col6","col20")]
          col6     col20
row1 105.30224 105.77931
row2  73.29761  75.94293
row3  74.03513  73.38675
row4  73.97368  77.29313
row5 103.95478 104.70682
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 105.3022 105.7793
row5 103.9548 104.7068
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 105.3022 105.7793
row5 103.9548 104.7068
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
           col13
[1,] -0.34164259
[2,] -1.06014163
[3,]  0.96923749
[4,]  1.84459177
[5,]  0.00056615
> tmp[,c("col17","col7")]
           col17       col7
[1,]  0.20754806 -0.7920588
[2,] -0.64948980  0.3066525
[3,] -0.02509576  0.2638955
[4,]  0.19955144  1.6094266
[5,] -0.34982062  0.4220036
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6      col20
[1,]  1.3693647 -0.1016813
[2,] -0.6787722  2.2668123
[3,]  0.4062143  0.7334119
[4,]  0.3278346 -1.0548806
[5,] -1.0962370  1.1747957
> subBufferedMatrix(tmp,1,c("col6"))[,1]
         col1
[1,] 1.369365
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,]  1.3693647
[2,] -0.6787722
> 
> 
> 
> 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.3606390  0.1520723 0.9033750  1.339499 1.5475829 -0.6315780  2.005671
row1 0.4911255 -0.8635034 0.0260379 -1.319728 0.5286998 -0.2089202 -1.194677
           [,8]      [,9]      [,10]       [,11]      [,12]       [,13]
row3 -0.1890101 3.1132339 -0.1628107 -0.01025498 -0.6329065  0.03905179
row1 -1.3552072 0.6853279  0.7864873  0.99994829 -1.6410615 -0.03959029
          [,14]      [,15]      [,16]      [,17]      [,18]      [,19]
row3 -0.6650896  0.3766145 -0.6704937 -0.8980431 0.07581054 -0.8524864
row1 -0.2348236 -0.4396162  0.1800778 -0.2250770 0.01852766  0.3782754
          [,20]
row3  0.1283266
row1 -1.0433960
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
           [,1]      [,2]        [,3]      [,4]      [,5]       [,6]    [,7]
row2 -0.3460041 0.1133568 -0.06375017 -0.255326 -2.331769 -0.2840361 0.87589
        [,8]       [,9]     [,10]
row2 1.56003 -0.3976945 -1.671806
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
          [,1]      [,2]       [,3]        [,4]     [,5]      [,6]       [,7]
row5 -1.612663 0.4888706 0.08432011 -0.05371445 2.115279 -1.905184 -0.1410343
          [,8]       [,9]      [,10]     [,11]      [,12]     [,13]    [,14]
row5 0.6144736 -0.3151911 -0.7051251 0.1899458 -0.9427781 -1.154691 2.466355
          [,15]      [,16]      [,17]     [,18]      [,19]    [,20]
row5 -0.6122908 -0.3677727 -0.2182564 0.3436341 -0.3401508 1.732861
> 
> 
> 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: 0x6000024f8420>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c730b1482"
 [2] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c5c6f9dcf"
 [3] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c23e1b072"
 [4] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c36071ec5"
 [5] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6cd753339" 
 [6] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c975ea16" 
 [7] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c1c5b4f34"
 [8] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c2eaced77"
 [9] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c5b1a3791"
[10] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c16363f51"
[11] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c4376ea3b"
[12] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c340bea17"
[13] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c7a35a6b2"
[14] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c58532ecc"
[15] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM13d6c3d258061"
> 
> 
> ### 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: 0x6000024f4840>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x6000024f4840>
Warning message:
In dir.create(new.directory) :
  '/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x6000024f4840>
> rowMedians(tmp)
  [1] -0.587217356 -0.118085965  0.372753170 -0.043942473 -0.046760710
  [6]  0.415036861  0.336259688 -0.338558931 -0.354087917  0.470134120
 [11]  0.131086803 -0.105659958  0.460679044  0.476112233  0.450081804
 [16] -0.234213692 -0.022571818  0.805685176 -0.197004216 -0.216082330
 [21]  0.208593347 -0.460287823  0.194511839  0.360321758  0.651824478
 [26]  0.094243681 -0.111198425 -0.390883935  0.258224308 -0.536842239
 [31] -0.312112729 -0.478883371  0.336042345  0.198330915 -0.071633307
 [36]  0.184444094  0.089081902  0.465041923 -0.184190281  0.222508626
 [41] -0.113168907  0.148521529 -0.147152564  0.372293942 -0.224106346
 [46]  0.036455914  0.051027767  0.241753334 -0.348067171  0.356589854
 [51]  0.266286525  0.174582962 -0.370940211 -0.408865927 -0.481467966
 [56]  0.208128530  0.261188912  0.605621234  0.128329209  0.006545635
 [61]  0.138613816 -0.154249106  0.103964524 -0.068037615 -0.515995735
 [66] -0.384749874  0.186154272  0.181308039  0.020526807 -0.044161787
 [71] -0.553713542  0.455054630 -0.294551930 -0.336142950 -0.206005812
 [76] -0.403228092  0.228320724  0.063969795 -0.305331125 -0.173651141
 [81] -0.206851742  0.062851879 -0.066698086  0.106407021  0.402011680
 [86]  0.194229017  0.540361204 -0.244107167 -0.317202155  0.044116785
 [91]  0.816898142  0.015151539 -0.195163891 -0.136960625  0.034394361
 [96]  0.127619283  0.302616777  0.266917169 -0.429906403 -0.256764405
[101]  0.375595671  0.296305772 -0.227519795 -0.382617978 -0.035433781
[106]  0.046817952 -0.167621165  0.346172975  0.138698515  0.049116250
[111] -0.169570865 -0.341657203 -0.253098209  0.006983665 -0.164112397
[116] -0.721182395 -0.147905885 -0.124353064  0.237441030 -0.264564223
[121]  0.009133390 -0.022066826 -0.137625520  0.140550054  0.182456955
[126]  0.040905406  0.244277465  0.002045225 -0.484013871  0.179093197
[131] -0.110935252 -0.003317092  0.744977441 -0.692024595 -0.302844973
[136] -0.153102560 -0.134837960 -0.388140623 -0.106511299  0.060354955
[141] -0.072722549  0.325169208  0.076934505 -0.275418264  0.375970077
[146]  0.408833816  0.281705964 -0.224238253 -0.697304703  0.103569152
[151]  0.454609769  0.184631526  0.655985347  0.441553483  0.018026125
[156] -0.234020663 -0.145349523  0.003685552 -0.027889011 -0.340425371
[161]  0.181368783  0.077366031  0.117517776 -0.406938756 -0.060176614
[166]  0.091660788 -0.047185624  0.277458314  0.112438631  0.277194427
[171]  0.205948385  0.177524261  0.373670581 -0.328341952  0.130887276
[176] -0.024296351 -0.461933126 -0.601175708  0.308155987  0.794693831
[181]  0.390645052  0.026837962 -0.252911027  0.285259031  0.554595484
[186]  0.017395500  0.210216617  0.087254721 -0.545024990  0.192991868
[191]  0.086759319 -0.656416018 -0.487653821  0.037833156 -0.248559743
[196] -0.186250521  0.626437513  0.135571909  0.048631825 -0.173886602
[201]  0.103584608  0.091316584  0.128598297 -0.564742764 -0.119657238
[206] -0.522569665  0.159066950  0.423884564  0.091475583 -0.051662250
[211]  0.497371433 -0.121195138  0.604102222 -0.343757210 -0.013355430
[216]  0.040125000  0.068628431  0.051689196 -0.202586600 -0.576201479
[221]  0.321998539 -0.440018906 -0.057997967 -0.066024084  0.018030855
[226] -0.743503824  0.645785079 -0.167266588 -0.109716623  0.182607142
> 
> proc.time()
   user  system elapsed 
  0.630   3.179   3.974 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R version 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-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: 0x6000000b8000>
> .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: 0x6000000b8000>
> .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: 0x6000000b8000>
> .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: 0x6000000b8000>
> 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: 0x6000000b80c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000000b80c0>
> .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: 0x6000000b80c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000000b80c0>
> .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: 0x6000000b80c0>
> 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: 0x6000000b82a0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000000b82a0>
> .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: 0x6000000b82a0>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x6000000b82a0>
> .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: 0x6000000b82a0>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x6000000b82a0>
> .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: 0x6000000b82a0>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x6000000b82a0>
> .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: 0x6000000b82a0>
> 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: 0x6000000b8480>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x6000000b8480>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000000b8480>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000000b8480>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile141b02d40b112" "BufferedMatrixFile141b043f39708"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile141b02d40b112" "BufferedMatrixFile141b043f39708"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000000b8720>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000000b8720>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x6000000b8720>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x6000000b8720>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x6000000b8720>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x6000000b8720>
> .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: 0x6000000b8900>
> .Call("R_bm_AddColumn",P)
<pointer: 0x6000000b8900>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x6000000b8900>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x6000000b8900>
> 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: 0x6000000b8ae0>
> .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: 0x6000000b8ae0>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.107   0.035   0.138 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R version 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: aarch64-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.110   0.022   0.128 

Example timings