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

This page was generated on 2025-12-22 12:03 -0500 (Mon, 22 Dec 2025).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 24.04.3 LTS)x86_644.5.2 (2025-10-31) -- "[Not] Part in a Rumble" 4883
merida1macOS 12.7.6 Montereyx86_644.5.2 (2025-10-31) -- "[Not] Part in a Rumble" 4673
kjohnson1macOS 13.7.5 Venturaarm644.5.2 Patched (2025-11-04 r88984) -- "[Not] Part in a Rumble" 4607
taishanLinux (openEuler 24.03 LTS)aarch644.5.0 (2025-04-11) -- "How About a Twenty-Six" 4671
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 257/2361HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.74.0  (landing page)
Ben Bolstad
Snapshot Date: 2025-12-18 13:45 -0500 (Thu, 18 Dec 2025)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: RELEASE_3_22
git_last_commit: d2ce144
git_last_commit_date: 2025-10-29 09:58:55 -0500 (Wed, 29 Oct 2025)
nebbiolo2Linux (Ubuntu 24.04.3 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
merida1macOS 12.7.6 Monterey / x86_64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kjohnson1macOS 13.7.5 Ventura / arm64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
taishanLinux (openEuler 24.03 LTS) / aarch64  OK    OK    OK  


CHECK results for BufferedMatrix on nebbiolo2

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

raw results


Summary

Package: BufferedMatrix
Version: 1.74.0
Command: /home/biocbuild/bbs-3.22-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.22-bioc/R/site-library --timings BufferedMatrix_1.74.0.tar.gz
StartedAt: 2025-12-18 21:41:11 -0500 (Thu, 18 Dec 2025)
EndedAt: 2025-12-18 21:41:35 -0500 (Thu, 18 Dec 2025)
EllapsedTime: 24.0 seconds
RetCode: 0
Status:   OK  
CheckDir: BufferedMatrix.Rcheck
Warnings: 0

Command output

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


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

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


Installation output

BufferedMatrix.Rcheck/00install.out

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


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

Tests output

BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

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

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

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

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

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

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

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

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

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

[[1]]
[1] 0

> 
> proc.time()
   user  system elapsed 
  0.266   0.054   0.305 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> 
> ### this is used to control how many repetitions in something below
> ### higher values result in more checks.
> nreps <-100 ##20000
> 
> 
> ## test creation and some simple assignments and subsetting operations
> 
> ## first on single elements
> tmp <- createBufferedMatrix(1000,10)
> 
> tmp[10,5]
[1] 0
> tmp[10,5] <- 10
> tmp[10,5]
[1] 10
> tmp[10,5] <- 12.445
> tmp[10,5]
[1] 12.445
> 
> 
> 
> ## now testing accessing multiple elements
> tmp2 <- createBufferedMatrix(10,20)
> 
> 
> tmp2[3,1] <- 51.34
> tmp2[9,2] <- 9.87654
> tmp2[,1:2]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[,-(3:20)]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[3,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,] 51.34    0    0    0    0    0    0    0    0     0     0     0     0
     [,14] [,15] [,16] [,17] [,18] [,19] [,20]
[1,]     0     0     0     0     0     0     0
> tmp2[-3,]
      [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]    0 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19] [,20]
 [1,]     0     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0     0
> tmp2[2,1:3]
     [,1] [,2] [,3]
[1,]    0    0    0
> tmp2[3:9,1:3]
      [,1]    [,2] [,3]
[1,] 51.34 0.00000    0
[2,]  0.00 0.00000    0
[3,]  0.00 0.00000    0
[4,]  0.00 0.00000    0
[5,]  0.00 0.00000    0
[6,]  0.00 0.00000    0
[7,]  0.00 9.87654    0
> tmp2[-4,-4]
       [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,] 51.34 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]  0.00 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19]
 [1,]     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0
> 
> ## now testing accessing/assigning multiple elements
> tmp3 <- createBufferedMatrix(10,10)
> 
> for (i in 1:10){
+   for (j in 1:10){
+     tmp3[i,j] <- (j-1)*10 + i
+   }
+ }
> 
> tmp3[2:4,2:4]
     [,1] [,2] [,3]
[1,]   12   22   32
[2,]   13   23   33
[3,]   14   24   34
> tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]   11   21   31   11   21   31   91    1   11     1    11    21    31
 [2,]   12   22   32   12   22   32   92    2   12     2    12    22    32
 [3,]   13   23   33   13   23   33   93    3   13     3    13    23    33
 [4,]   14   24   34   14   24   34   94    4   14     4    14    24    34
 [5,]   15   25   35   15   25   35   95    5   15     5    15    25    35
 [6,]   16   26   36   16   26   36   96    6   16     6    16    26    36
 [7,]   17   27   37   17   27   37   97    7   17     7    17    27    37
 [8,]   18   28   38   18   28   38   98    8   18     8    18    28    38
 [9,]   19   29   39   19   29   39   99    9   19     9    19    29    39
      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
 [1,]    41    51    61    71    81    91    91    81    71    61    51    41
 [2,]    42    52    62    72    82    92    92    82    72    62    52    42
 [3,]    43    53    63    73    83    93    93    83    73    63    53    43
 [4,]    44    54    64    74    84    94    94    84    74    64    54    44
 [5,]    45    55    65    75    85    95    95    85    75    65    55    45
 [6,]    46    56    66    76    86    96    96    86    76    66    56    46
 [7,]    47    57    67    77    87    97    97    87    77    67    57    47
 [8,]    48    58    68    78    88    98    98    88    78    68    58    48
 [9,]    49    59    69    79    89    99    99    89    79    69    59    49
      [,26] [,27] [,28] [,29]
 [1,]    31    21    11     1
 [2,]    32    22    12     2
 [3,]    33    23    13     3
 [4,]    34    24    14     4
 [5,]    35    25    15     5
 [6,]    36    26    16     6
 [7,]    37    27    17     7
 [8,]    38    28    18     8
 [9,]    39    29    19     9
> tmp3[-c(1:5),-c(6:10)]
     [,1] [,2] [,3] [,4] [,5]
[1,]    6   16   26   36   46
[2,]    7   17   27   37   47
[3,]    8   18   28   38   48
[4,]    9   19   29   39   49
[5,]   10   20   30   40   50
> 
> ## assignment of whole columns
> tmp3[,1] <- c(1:10*100.0)
> tmp3[,1:2] <- tmp3[,1:2]*100
> tmp3[,1:2] <- tmp3[,2:1]
> tmp3[,1:2]
      [,1]  [,2]
 [1,] 1100 1e+04
 [2,] 1200 2e+04
 [3,] 1300 3e+04
 [4,] 1400 4e+04
 [5,] 1500 5e+04
 [6,] 1600 6e+04
 [7,] 1700 7e+04
 [8,] 1800 8e+04
 [9,] 1900 9e+04
[10,] 2000 1e+05
> 
> 
> tmp3[,-1] <- tmp3[,1:9]
> tmp3[,1:10]
      [,1] [,2]  [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,] 1100 1100 1e+04   21   31   41   51   61   71    81
 [2,] 1200 1200 2e+04   22   32   42   52   62   72    82
 [3,] 1300 1300 3e+04   23   33   43   53   63   73    83
 [4,] 1400 1400 4e+04   24   34   44   54   64   74    84
 [5,] 1500 1500 5e+04   25   35   45   55   65   75    85
 [6,] 1600 1600 6e+04   26   36   46   56   66   76    86
 [7,] 1700 1700 7e+04   27   37   47   57   67   77    87
 [8,] 1800 1800 8e+04   28   38   48   58   68   78    88
 [9,] 1900 1900 9e+04   29   39   49   59   69   79    89
[10,] 2000 2000 1e+05   30   40   50   60   70   80    90
> 
> tmp3[,1:2] <- rep(1,10)
> tmp3[,1:2] <- rep(1,20)
> tmp3[,1:2] <- matrix(c(1:5),1,5)
> 
> tmp3[,-c(1:8)] <- matrix(c(1:5),1,5)
> 
> tmp3[1,] <- 1:10
> tmp3[1,]
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    1    2    3    4    5    6    7    8    9    10
> tmp3[-1,] <- c(1,2)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    2    1    2    1    2    1    2    1    2     1
[10,]    1    2    1    2    1    2    1    2    1     2
> tmp3[-c(1:8),] <- matrix(c(1:5),1,5)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    1    3    5    2    4    1    3    5    2     4
[10,]    2    4    1    3    5    2    4    1    3     5
> 
> 
> tmp3[1:2,1:2] <- 5555.04
> tmp3[-(1:2),1:2] <- 1234.56789
> 
> 
> 
> ## testing accessors for the directory and prefix
> directory(tmp3)
[1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests"
> prefix(tmp3)
[1] "BM"
> 
> ## testing if we can remove these objects
> rm(tmp, tmp2, tmp3)
> gc()
         used (Mb) gc trigger (Mb) max used (Mb)
Ncells 478284 25.6    1046725   56   639600 34.2
Vcells 884773  6.8    8388608   64  2081613 15.9
> 
> 
> 
> 
> ##
> ## checking reads
> ##
> 
> tmp2 <- createBufferedMatrix(10,20)
> 
> test.sample <- rnorm(10*20)
> 
> tmp2[1:10,1:20] <- test.sample
> 
> test.matrix <- matrix(test.sample,10,20)
> 
> ## testing reads
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Thu Dec 18 21:41:27 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] "Thu Dec 18 21:41:27 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: 0x5fad78846370>
> 
> 
> 
> 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] "Thu Dec 18 21:41:27 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] "Thu Dec 18 21:41:27 2025"
> 
> ColMode(tmp2)
<pointer: 0x5fad78846370>
> 
> 
> 
> ### 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.8363270  1.7826856  0.06249236  0.01054185
[2,] -0.6918603  1.7781864 -1.25328293 -1.22525878
[3,] -1.3592210 -0.5431543 -0.70922838 -0.17974152
[4,] -0.2487214  2.5276597 -0.35234951  1.44354760
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
           [,1]      [,2]       [,3]       [,4]
[1,] 99.8363270 1.7826856 0.06249236 0.01054185
[2,]  0.6918603 1.7781864 1.25328293 1.22525878
[3,]  1.3592210 0.5431543 0.70922838 0.17974152
[4,]  0.2487214 2.5276597 0.35234951 1.44354760
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]      [,3]      [,4]
[1,] 9.9918130 1.335172 0.2499847 0.1026735
[2,] 0.8317814 1.333487 1.1195012 1.1069141
[3,] 1.1658563 0.736990 0.8421570 0.4239593
[4,] 0.4987197 1.589862 0.5935904 1.2014773
> 
> my.function <- function(x,power){
+   (x+5)^power
+ }
> 
> ewApply(tmp5,my.function,power=2)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 224.75446 40.13441 27.56234 26.03728
[2,]  34.00967 40.11305 37.44829 37.29440
[3,]  38.01778 32.91305 34.13080 29.41933
[4,]  30.23592 43.42628 31.28825 38.45832
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x5fad798429b0>
> exp(tmp5)
<pointer: 0x5fad798429b0>
> log(tmp5,2)
<pointer: 0x5fad798429b0>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 467.797
> Min(tmp5)
[1] 53.16171
> mean(tmp5)
[1] 73.00034
> Sum(tmp5)
[1] 14600.07
> Var(tmp5)
[1] 871.9353
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 87.30309 71.80242 70.10956 73.48179 72.67401 71.34192 71.40206 69.13724
 [9] 70.63539 72.11597
> rowSums(tmp5)
 [1] 1746.062 1436.048 1402.191 1469.636 1453.480 1426.838 1428.041 1382.745
 [9] 1412.708 1442.319
> rowVars(tmp5)
 [1] 8091.49245  121.60206   69.78395  133.15832  104.14639   70.27986
 [7]   78.96864   57.90514   63.31700   87.71908
> rowSd(tmp5)
 [1] 89.952723 11.027333  8.353679 11.539425 10.205214  8.383308  8.886430
 [8]  7.609542  7.957198  9.365847
> rowMax(tmp5)
 [1] 467.79696  96.94169  95.44379  96.43501  93.71697  90.31495  87.15592
 [8]  81.19905  83.00931  88.70734
> rowMin(tmp5)
 [1] 54.19318 54.53875 60.17084 56.43358 56.63625 56.06917 55.30451 53.16171
 [9] 57.66131 55.69346
> 
> colMeans(tmp5)
 [1] 113.16801  78.24360  66.90734  73.27172  75.44586  64.53802  75.00622
 [8]  72.83571  70.27771  69.51002  73.61553  74.74307  69.03423  71.30910
[15]  70.89458  61.25025  74.98844  67.92566  70.78138  66.26043
> colSums(tmp5)
 [1] 1131.6801  782.4360  669.0734  732.7172  754.4586  645.3802  750.0622
 [8]  728.3571  702.7771  695.1002  736.1553  747.4307  690.3423  713.0910
[15]  708.9458  612.5025  749.8844  679.2566  707.8138  662.6043
> colVars(tmp5)
 [1] 15579.06494    47.04360    97.77917   125.07948    67.63751    26.43832
 [7]    64.90298   141.63167    44.38786    71.06686    77.09323   129.85616
[13]    92.43572    58.73385    29.55439    49.88095   146.57164    56.87400
[19]    63.18306    61.43376
> colSd(tmp5)
 [1] 124.816125   6.858834   9.888335  11.183894   8.224203   5.141821
 [7]   8.056239  11.900910   6.662421   8.430116   8.780275  11.395445
[13]   9.614350   7.663801   5.436395   7.062644  12.106677   7.541485
[19]   7.948777   7.837969
> colMax(tmp5)
 [1] 467.79696  90.38610  86.44571  87.15592  92.52280  73.85869  90.31495
 [8]  96.94169  81.41148  88.70734  85.73961  93.71697  83.00931  85.29839
[15]  78.21948  79.30815  96.43501  76.95462  80.34855  77.49392
> colMin(tmp5)
 [1] 62.15951 68.50421 56.06917 54.19318 61.59425 58.59142 60.87064 58.96559
 [9] 59.90040 57.48575 56.22519 61.06365 53.16171 58.71082 63.13164 54.53875
[17] 58.60996 55.30451 57.66131 56.43358
> 
> 
> ### 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] 87.30309 71.80242 70.10956 73.48179       NA 71.34192 71.40206 69.13724
 [9] 70.63539 72.11597
> rowSums(tmp5)
 [1] 1746.062 1436.048 1402.191 1469.636       NA 1426.838 1428.041 1382.745
 [9] 1412.708 1442.319
> rowVars(tmp5)
 [1] 8091.49245  121.60206   69.78395  133.15832  108.62654   70.27986
 [7]   78.96864   57.90514   63.31700   87.71908
> rowSd(tmp5)
 [1] 89.952723 11.027333  8.353679 11.539425 10.422406  8.383308  8.886430
 [8]  7.609542  7.957198  9.365847
> rowMax(tmp5)
 [1] 467.79696  96.94169  95.44379  96.43501        NA  90.31495  87.15592
 [8]  81.19905  83.00931  88.70734
> rowMin(tmp5)
 [1] 54.19318 54.53875 60.17084 56.43358       NA 56.06917 55.30451 53.16171
 [9] 57.66131 55.69346
> 
> colMeans(tmp5)
 [1] 113.16801  78.24360  66.90734  73.27172  75.44586  64.53802  75.00622
 [8]  72.83571  70.27771  69.51002  73.61553  74.74307  69.03423  71.30910
[15]  70.89458  61.25025  74.98844  67.92566  70.78138        NA
> colSums(tmp5)
 [1] 1131.6801  782.4360  669.0734  732.7172  754.4586  645.3802  750.0622
 [8]  728.3571  702.7771  695.1002  736.1553  747.4307  690.3423  713.0910
[15]  708.9458  612.5025  749.8844  679.2566  707.8138        NA
> colVars(tmp5)
 [1] 15579.06494    47.04360    97.77917   125.07948    67.63751    26.43832
 [7]    64.90298   141.63167    44.38786    71.06686    77.09323   129.85616
[13]    92.43572    58.73385    29.55439    49.88095   146.57164    56.87400
[19]    63.18306          NA
> colSd(tmp5)
 [1] 124.816125   6.858834   9.888335  11.183894   8.224203   5.141821
 [7]   8.056239  11.900910   6.662421   8.430116   8.780275  11.395445
[13]   9.614350   7.663801   5.436395   7.062644  12.106677   7.541485
[19]   7.948777         NA
> colMax(tmp5)
 [1] 467.79696  90.38610  86.44571  87.15592  92.52280  73.85869  90.31495
 [8]  96.94169  81.41148  88.70734  85.73961  93.71697  83.00931  85.29839
[15]  78.21948  79.30815  96.43501  76.95462  80.34855        NA
> colMin(tmp5)
 [1] 62.15951 68.50421 56.06917 54.19318 61.59425 58.59142 60.87064 58.96559
 [9] 59.90040 57.48575 56.22519 61.06365 53.16171 58.71082 63.13164 54.53875
[17] 58.60996 55.30451 57.66131       NA
> 
> Max(tmp5,na.rm=TRUE)
[1] 467.797
> Min(tmp5,na.rm=TRUE)
[1] 53.16171
> mean(tmp5,na.rm=TRUE)
[1] 72.97824
> Sum(tmp5,na.rm=TRUE)
[1] 14522.67
> Var(tmp5,na.rm=TRUE)
[1] 876.2408
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 87.30309 71.80242 70.10956 73.48179 72.42531 71.34192 71.40206 69.13724
 [9] 70.63539 72.11597
> rowSums(tmp5,na.rm=TRUE)
 [1] 1746.062 1436.048 1402.191 1469.636 1376.081 1426.838 1428.041 1382.745
 [9] 1412.708 1442.319
> rowVars(tmp5,na.rm=TRUE)
 [1] 8091.49245  121.60206   69.78395  133.15832  108.62654   70.27986
 [7]   78.96864   57.90514   63.31700   87.71908
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.952723 11.027333  8.353679 11.539425 10.422406  8.383308  8.886430
 [8]  7.609542  7.957198  9.365847
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.79696  96.94169  95.44379  96.43501  93.71697  90.31495  87.15592
 [8]  81.19905  83.00931  88.70734
> rowMin(tmp5,na.rm=TRUE)
 [1] 54.19318 54.53875 60.17084 56.43358 56.63625 56.06917 55.30451 53.16171
 [9] 57.66131 55.69346
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 113.16801  78.24360  66.90734  73.27172  75.44586  64.53802  75.00622
 [8]  72.83571  70.27771  69.51002  73.61553  74.74307  69.03423  71.30910
[15]  70.89458  61.25025  74.98844  67.92566  70.78138  65.02278
> colSums(tmp5,na.rm=TRUE)
 [1] 1131.6801  782.4360  669.0734  732.7172  754.4586  645.3802  750.0622
 [8]  728.3571  702.7771  695.1002  736.1553  747.4307  690.3423  713.0910
[15]  708.9458  612.5025  749.8844  679.2566  707.8138  585.2050
> colVars(tmp5,na.rm=TRUE)
 [1] 15579.06494    47.04360    97.77917   125.07948    67.63751    26.43832
 [7]    64.90298   141.63167    44.38786    71.06686    77.09323   129.85616
[13]    92.43572    58.73385    29.55439    49.88095   146.57164    56.87400
[19]    63.18306    51.88040
> colSd(tmp5,na.rm=TRUE)
 [1] 124.816125   6.858834   9.888335  11.183894   8.224203   5.141821
 [7]   8.056239  11.900910   6.662421   8.430116   8.780275  11.395445
[13]   9.614350   7.663801   5.436395   7.062644  12.106677   7.541485
[19]   7.948777   7.202805
> colMax(tmp5,na.rm=TRUE)
 [1] 467.79696  90.38610  86.44571  87.15592  92.52280  73.85869  90.31495
 [8]  96.94169  81.41148  88.70734  85.73961  93.71697  83.00931  85.29839
[15]  78.21948  79.30815  96.43501  76.95462  80.34855  77.49392
> colMin(tmp5,na.rm=TRUE)
 [1] 62.15951 68.50421 56.06917 54.19318 61.59425 58.59142 60.87064 58.96559
 [9] 59.90040 57.48575 56.22519 61.06365 53.16171 58.71082 63.13164 54.53875
[17] 58.60996 55.30451 57.66131 56.43358
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 87.30309 71.80242 70.10956 73.48179      NaN 71.34192 71.40206 69.13724
 [9] 70.63539 72.11597
> rowSums(tmp5,na.rm=TRUE)
 [1] 1746.062 1436.048 1402.191 1469.636    0.000 1426.838 1428.041 1382.745
 [9] 1412.708 1442.319
> rowVars(tmp5,na.rm=TRUE)
 [1] 8091.49245  121.60206   69.78395  133.15832         NA   70.27986
 [7]   78.96864   57.90514   63.31700   87.71908
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.952723 11.027333  8.353679 11.539425        NA  8.383308  8.886430
 [8]  7.609542  7.957198  9.365847
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.79696  96.94169  95.44379  96.43501        NA  90.31495  87.15592
 [8]  81.19905  83.00931  88.70734
> rowMin(tmp5,na.rm=TRUE)
 [1] 54.19318 54.53875 60.17084 56.43358       NA 56.06917 55.30451 53.16171
 [9] 57.66131 55.69346
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 118.83562  77.71044  66.39087  74.59156  75.29337  65.08820  75.05193
 [8]  71.25584  70.17468  70.84605  72.26841  72.63485  69.09347  71.13670
[15]  70.73328  61.76291  75.85055  67.27219  69.71836       NaN
> colSums(tmp5,na.rm=TRUE)
 [1] 1069.5205  699.3940  597.5178  671.3240  677.6403  585.7938  675.4674
 [8]  641.3025  631.5721  637.6145  650.4157  653.7137  621.8412  640.2303
[15]  636.5995  555.8662  682.6550  605.4497  627.4653    0.0000
> colVars(tmp5,na.rm=TRUE)
 [1] 17165.07775    49.72619   107.00070   121.11722    75.83060    26.33786
 [7]    72.99236   131.25580    49.81691    59.86924    66.31415    96.08692
[13]   103.95071    65.74122    32.95601    53.15926   156.53170    59.17932
[19]    58.36835          NA
> colSd(tmp5,na.rm=TRUE)
 [1] 131.015563   7.051680  10.344114  11.005327   8.708076   5.132043
 [7]   8.543556  11.456692   7.058110   7.737522   8.143350   9.802394
[13]  10.195622   8.108096   5.740733   7.291040  12.511263   7.692809
[19]   7.639918         NA
> colMax(tmp5,na.rm=TRUE)
 [1] 467.79696  90.38610  86.44571  87.15592  92.52280  73.85869  90.31495
 [8]  96.94169  81.41148  88.70734  81.00292  87.46622  83.00931  85.29839
[15]  78.21948  79.30815  96.43501  76.95462  78.48373      -Inf
> colMin(tmp5,na.rm=TRUE)
 [1] 62.93210 68.50421 56.06917 54.19318 61.59425 58.59142 60.87064 58.96559
 [9] 59.90040 60.86350 56.22519 61.06365 53.16171 58.71082 63.13164 54.53875
[17] 58.60996 55.30451 57.66131      Inf
> 
> 
> 
> 
> 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] 202.5495 172.6320 120.8239 342.8157 260.6911 141.3241 220.3597 229.2783
 [9] 175.9271 237.8820
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 202.5495 172.6320 120.8239 342.8157 260.6911 141.3241 220.3597 229.2783
 [9] 175.9271 237.8820
> 
> 
> 
> 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] -2.842171e-14  0.000000e+00 -8.526513e-14 -8.526513e-14 -5.684342e-14
 [6] -1.136868e-13 -1.136868e-13 -2.842171e-14 -5.684342e-14 -3.410605e-13
[11]  5.684342e-14  0.000000e+00 -5.684342e-14  0.000000e+00 -1.136868e-13
[16] -2.842171e-13  5.684342e-14  0.000000e+00 -2.131628e-14  1.421085e-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)
+ }
7   19 
1   19 
8   2 
1   2 
10   19 
9   7 
9   10 
7   7 
7   3 
6   15 
1   16 
8   19 
10   7 
8   14 
7   10 
2   13 
4   8 
10   1 
6   5 
3   2 
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.568278
> Min(tmp)
[1] -2.703916
> mean(tmp)
[1] -0.08147798
> Sum(tmp)
[1] -8.147798
> Var(tmp)
[1] 1.017303
> 
> rowMeans(tmp)
[1] -0.08147798
> rowSums(tmp)
[1] -8.147798
> rowVars(tmp)
[1] 1.017303
> rowSd(tmp)
[1] 1.008615
> rowMax(tmp)
[1] 2.568278
> rowMin(tmp)
[1] -2.703916
> 
> colMeans(tmp)
  [1]  0.03323449  0.14463382  1.23034078 -0.32691146  0.51770957 -1.22680479
  [7]  0.41916124 -0.36587853 -1.14813087  1.02641964 -0.58966770 -0.71564053
 [13] -0.44232675  0.05576963 -0.41639459  0.57659546 -0.63933989 -0.94695850
 [19]  0.34475269 -0.44089898  1.48258928  0.78050863  0.33429996 -0.97914344
 [25]  1.38999400 -1.21828573  0.27980125  0.74308001 -1.59089064 -1.15147675
 [31]  0.37194112  0.95489662 -0.28881869  0.03959818  0.13718343  2.26964581
 [37]  0.84422524 -0.27682115  0.54048771 -0.32929379  0.49764303 -0.44005484
 [43] -0.33725606 -0.62406909 -0.28184994 -1.02221434 -0.62400865  0.93606754
 [49]  0.59226466 -0.98876244 -0.31382444  0.40153143  0.11869658 -1.60747327
 [55] -0.69740519  1.49505195 -0.78180740 -0.39501682 -0.69121149 -1.69386782
 [61]  1.40462589 -2.05380755 -2.04284520 -0.18713806  1.21954582  0.10926703
 [67] -0.35927798 -2.70391591  0.96299589  0.94738322 -0.21653567 -1.36510281
 [73]  0.30269123 -1.49777604 -0.51421292  0.64517040 -2.36509202 -0.23513468
 [79]  2.56827828  0.19868970  1.25916873 -0.42589116  0.56848401  0.84232821
 [85] -0.35942499  0.35672055 -0.65217648  0.60695517  2.04433513 -0.81166024
 [91]  1.13951593 -0.52701538  0.30089956 -1.37475201 -1.14361966 -0.69080574
 [97]  0.75599792  1.95545255 -1.09756886 -0.67816886
> colSums(tmp)
  [1]  0.03323449  0.14463382  1.23034078 -0.32691146  0.51770957 -1.22680479
  [7]  0.41916124 -0.36587853 -1.14813087  1.02641964 -0.58966770 -0.71564053
 [13] -0.44232675  0.05576963 -0.41639459  0.57659546 -0.63933989 -0.94695850
 [19]  0.34475269 -0.44089898  1.48258928  0.78050863  0.33429996 -0.97914344
 [25]  1.38999400 -1.21828573  0.27980125  0.74308001 -1.59089064 -1.15147675
 [31]  0.37194112  0.95489662 -0.28881869  0.03959818  0.13718343  2.26964581
 [37]  0.84422524 -0.27682115  0.54048771 -0.32929379  0.49764303 -0.44005484
 [43] -0.33725606 -0.62406909 -0.28184994 -1.02221434 -0.62400865  0.93606754
 [49]  0.59226466 -0.98876244 -0.31382444  0.40153143  0.11869658 -1.60747327
 [55] -0.69740519  1.49505195 -0.78180740 -0.39501682 -0.69121149 -1.69386782
 [61]  1.40462589 -2.05380755 -2.04284520 -0.18713806  1.21954582  0.10926703
 [67] -0.35927798 -2.70391591  0.96299589  0.94738322 -0.21653567 -1.36510281
 [73]  0.30269123 -1.49777604 -0.51421292  0.64517040 -2.36509202 -0.23513468
 [79]  2.56827828  0.19868970  1.25916873 -0.42589116  0.56848401  0.84232821
 [85] -0.35942499  0.35672055 -0.65217648  0.60695517  2.04433513 -0.81166024
 [91]  1.13951593 -0.52701538  0.30089956 -1.37475201 -1.14361966 -0.69080574
 [97]  0.75599792  1.95545255 -1.09756886 -0.67816886
> 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.03323449  0.14463382  1.23034078 -0.32691146  0.51770957 -1.22680479
  [7]  0.41916124 -0.36587853 -1.14813087  1.02641964 -0.58966770 -0.71564053
 [13] -0.44232675  0.05576963 -0.41639459  0.57659546 -0.63933989 -0.94695850
 [19]  0.34475269 -0.44089898  1.48258928  0.78050863  0.33429996 -0.97914344
 [25]  1.38999400 -1.21828573  0.27980125  0.74308001 -1.59089064 -1.15147675
 [31]  0.37194112  0.95489662 -0.28881869  0.03959818  0.13718343  2.26964581
 [37]  0.84422524 -0.27682115  0.54048771 -0.32929379  0.49764303 -0.44005484
 [43] -0.33725606 -0.62406909 -0.28184994 -1.02221434 -0.62400865  0.93606754
 [49]  0.59226466 -0.98876244 -0.31382444  0.40153143  0.11869658 -1.60747327
 [55] -0.69740519  1.49505195 -0.78180740 -0.39501682 -0.69121149 -1.69386782
 [61]  1.40462589 -2.05380755 -2.04284520 -0.18713806  1.21954582  0.10926703
 [67] -0.35927798 -2.70391591  0.96299589  0.94738322 -0.21653567 -1.36510281
 [73]  0.30269123 -1.49777604 -0.51421292  0.64517040 -2.36509202 -0.23513468
 [79]  2.56827828  0.19868970  1.25916873 -0.42589116  0.56848401  0.84232821
 [85] -0.35942499  0.35672055 -0.65217648  0.60695517  2.04433513 -0.81166024
 [91]  1.13951593 -0.52701538  0.30089956 -1.37475201 -1.14361966 -0.69080574
 [97]  0.75599792  1.95545255 -1.09756886 -0.67816886
> colMin(tmp)
  [1]  0.03323449  0.14463382  1.23034078 -0.32691146  0.51770957 -1.22680479
  [7]  0.41916124 -0.36587853 -1.14813087  1.02641964 -0.58966770 -0.71564053
 [13] -0.44232675  0.05576963 -0.41639459  0.57659546 -0.63933989 -0.94695850
 [19]  0.34475269 -0.44089898  1.48258928  0.78050863  0.33429996 -0.97914344
 [25]  1.38999400 -1.21828573  0.27980125  0.74308001 -1.59089064 -1.15147675
 [31]  0.37194112  0.95489662 -0.28881869  0.03959818  0.13718343  2.26964581
 [37]  0.84422524 -0.27682115  0.54048771 -0.32929379  0.49764303 -0.44005484
 [43] -0.33725606 -0.62406909 -0.28184994 -1.02221434 -0.62400865  0.93606754
 [49]  0.59226466 -0.98876244 -0.31382444  0.40153143  0.11869658 -1.60747327
 [55] -0.69740519  1.49505195 -0.78180740 -0.39501682 -0.69121149 -1.69386782
 [61]  1.40462589 -2.05380755 -2.04284520 -0.18713806  1.21954582  0.10926703
 [67] -0.35927798 -2.70391591  0.96299589  0.94738322 -0.21653567 -1.36510281
 [73]  0.30269123 -1.49777604 -0.51421292  0.64517040 -2.36509202 -0.23513468
 [79]  2.56827828  0.19868970  1.25916873 -0.42589116  0.56848401  0.84232821
 [85] -0.35942499  0.35672055 -0.65217648  0.60695517  2.04433513 -0.81166024
 [91]  1.13951593 -0.52701538  0.30089956 -1.37475201 -1.14361966 -0.69080574
 [97]  0.75599792  1.95545255 -1.09756886 -0.67816886
> colMedians(tmp)
  [1]  0.03323449  0.14463382  1.23034078 -0.32691146  0.51770957 -1.22680479
  [7]  0.41916124 -0.36587853 -1.14813087  1.02641964 -0.58966770 -0.71564053
 [13] -0.44232675  0.05576963 -0.41639459  0.57659546 -0.63933989 -0.94695850
 [19]  0.34475269 -0.44089898  1.48258928  0.78050863  0.33429996 -0.97914344
 [25]  1.38999400 -1.21828573  0.27980125  0.74308001 -1.59089064 -1.15147675
 [31]  0.37194112  0.95489662 -0.28881869  0.03959818  0.13718343  2.26964581
 [37]  0.84422524 -0.27682115  0.54048771 -0.32929379  0.49764303 -0.44005484
 [43] -0.33725606 -0.62406909 -0.28184994 -1.02221434 -0.62400865  0.93606754
 [49]  0.59226466 -0.98876244 -0.31382444  0.40153143  0.11869658 -1.60747327
 [55] -0.69740519  1.49505195 -0.78180740 -0.39501682 -0.69121149 -1.69386782
 [61]  1.40462589 -2.05380755 -2.04284520 -0.18713806  1.21954582  0.10926703
 [67] -0.35927798 -2.70391591  0.96299589  0.94738322 -0.21653567 -1.36510281
 [73]  0.30269123 -1.49777604 -0.51421292  0.64517040 -2.36509202 -0.23513468
 [79]  2.56827828  0.19868970  1.25916873 -0.42589116  0.56848401  0.84232821
 [85] -0.35942499  0.35672055 -0.65217648  0.60695517  2.04433513 -0.81166024
 [91]  1.13951593 -0.52701538  0.30089956 -1.37475201 -1.14361966 -0.69080574
 [97]  0.75599792  1.95545255 -1.09756886 -0.67816886
> colRanges(tmp)
           [,1]      [,2]     [,3]       [,4]      [,5]      [,6]      [,7]
[1,] 0.03323449 0.1446338 1.230341 -0.3269115 0.5177096 -1.226805 0.4191612
[2,] 0.03323449 0.1446338 1.230341 -0.3269115 0.5177096 -1.226805 0.4191612
           [,8]      [,9]   [,10]      [,11]      [,12]      [,13]      [,14]
[1,] -0.3658785 -1.148131 1.02642 -0.5896677 -0.7156405 -0.4423267 0.05576963
[2,] -0.3658785 -1.148131 1.02642 -0.5896677 -0.7156405 -0.4423267 0.05576963
          [,15]     [,16]      [,17]      [,18]     [,19]     [,20]    [,21]
[1,] -0.4163946 0.5765955 -0.6393399 -0.9469585 0.3447527 -0.440899 1.482589
[2,] -0.4163946 0.5765955 -0.6393399 -0.9469585 0.3447527 -0.440899 1.482589
         [,22]  [,23]      [,24]    [,25]     [,26]     [,27]   [,28]     [,29]
[1,] 0.7805086 0.3343 -0.9791434 1.389994 -1.218286 0.2798013 0.74308 -1.590891
[2,] 0.7805086 0.3343 -0.9791434 1.389994 -1.218286 0.2798013 0.74308 -1.590891
         [,30]     [,31]     [,32]      [,33]      [,34]     [,35]    [,36]
[1,] -1.151477 0.3719411 0.9548966 -0.2888187 0.03959818 0.1371834 2.269646
[2,] -1.151477 0.3719411 0.9548966 -0.2888187 0.03959818 0.1371834 2.269646
         [,37]      [,38]     [,39]      [,40]    [,41]      [,42]      [,43]
[1,] 0.8442252 -0.2768211 0.5404877 -0.3292938 0.497643 -0.4400548 -0.3372561
[2,] 0.8442252 -0.2768211 0.5404877 -0.3292938 0.497643 -0.4400548 -0.3372561
          [,44]      [,45]     [,46]      [,47]     [,48]     [,49]      [,50]
[1,] -0.6240691 -0.2818499 -1.022214 -0.6240087 0.9360675 0.5922647 -0.9887624
[2,] -0.6240691 -0.2818499 -1.022214 -0.6240087 0.9360675 0.5922647 -0.9887624
          [,51]     [,52]     [,53]     [,54]      [,55]    [,56]      [,57]
[1,] -0.3138244 0.4015314 0.1186966 -1.607473 -0.6974052 1.495052 -0.7818074
[2,] -0.3138244 0.4015314 0.1186966 -1.607473 -0.6974052 1.495052 -0.7818074
          [,58]      [,59]     [,60]    [,61]     [,62]     [,63]      [,64]
[1,] -0.3950168 -0.6912115 -1.693868 1.404626 -2.053808 -2.042845 -0.1871381
[2,] -0.3950168 -0.6912115 -1.693868 1.404626 -2.053808 -2.042845 -0.1871381
        [,65]    [,66]     [,67]     [,68]     [,69]     [,70]      [,71]
[1,] 1.219546 0.109267 -0.359278 -2.703916 0.9629959 0.9473832 -0.2165357
[2,] 1.219546 0.109267 -0.359278 -2.703916 0.9629959 0.9473832 -0.2165357
         [,72]     [,73]     [,74]      [,75]     [,76]     [,77]      [,78]
[1,] -1.365103 0.3026912 -1.497776 -0.5142129 0.6451704 -2.365092 -0.2351347
[2,] -1.365103 0.3026912 -1.497776 -0.5142129 0.6451704 -2.365092 -0.2351347
        [,79]     [,80]    [,81]      [,82]    [,83]     [,84]     [,85]
[1,] 2.568278 0.1986897 1.259169 -0.4258912 0.568484 0.8423282 -0.359425
[2,] 2.568278 0.1986897 1.259169 -0.4258912 0.568484 0.8423282 -0.359425
         [,86]      [,87]     [,88]    [,89]      [,90]    [,91]      [,92]
[1,] 0.3567205 -0.6521765 0.6069552 2.044335 -0.8116602 1.139516 -0.5270154
[2,] 0.3567205 -0.6521765 0.6069552 2.044335 -0.8116602 1.139516 -0.5270154
         [,93]     [,94]    [,95]      [,96]     [,97]    [,98]     [,99]
[1,] 0.3008996 -1.374752 -1.14362 -0.6908057 0.7559979 1.955453 -1.097569
[2,] 0.3008996 -1.374752 -1.14362 -0.6908057 0.7559979 1.955453 -1.097569
         [,100]
[1,] -0.6781689
[2,] -0.6781689
> 
> 
> Max(tmp2)
[1] 2.505039
> Min(tmp2)
[1] -2.551236
> mean(tmp2)
[1] 0.05662628
> Sum(tmp2)
[1] 5.662628
> Var(tmp2)
[1] 0.9836463
> 
> rowMeans(tmp2)
  [1]  1.200568809 -0.551678356  0.870599514 -1.892060008  1.663016806
  [6]  0.371096666  0.786264938  0.610086518 -1.150238253  0.754964229
 [11]  0.903964336 -0.040051584  1.419290965  0.119725410 -0.294286649
 [16]  0.395277582 -1.440369345  0.452767951  1.097008139 -0.408377572
 [21]  0.450149856 -0.951230385  1.422382412  1.273621586  0.806188982
 [26] -0.939478758 -1.289486108  0.258579285  0.393355969 -1.096841719
 [31]  0.540231555  0.007371603 -1.017249971  0.797606646 -0.461850318
 [36] -1.004977080  2.505038930 -0.266544458  1.810533452  1.147226685
 [41]  0.329106827  0.386373890  0.576095876  0.954803954  0.023839883
 [46] -0.912670378  0.547793564 -0.573678373  0.345394174  1.069233073
 [51]  0.158446692 -0.934127471 -1.117936352 -0.839977599  0.159063858
 [56]  0.081390517 -1.964115026  0.657716115 -0.580331000 -1.826859797
 [61] -0.577294692 -1.484803092 -0.117148793 -0.387579858 -1.816624874
 [66]  0.778805260 -0.400343672  0.155027746  0.637338341  0.304307786
 [71] -2.551235933  0.491077301 -0.632118068  1.268049867  1.229621898
 [76] -1.101152136 -1.197080474  1.238885505  1.788772838 -1.423498570
 [81] -0.516375766  0.694923983  0.529102332  1.897339231  0.639236843
 [86] -0.630266876 -0.024895945 -1.313103483  0.291374365  1.074882039
 [91] -0.394960331 -0.595189060  0.172102244 -0.894824233  1.486376763
 [96]  0.090431105 -0.006333834  1.175774982 -0.325869910  0.318136925
> rowSums(tmp2)
  [1]  1.200568809 -0.551678356  0.870599514 -1.892060008  1.663016806
  [6]  0.371096666  0.786264938  0.610086518 -1.150238253  0.754964229
 [11]  0.903964336 -0.040051584  1.419290965  0.119725410 -0.294286649
 [16]  0.395277582 -1.440369345  0.452767951  1.097008139 -0.408377572
 [21]  0.450149856 -0.951230385  1.422382412  1.273621586  0.806188982
 [26] -0.939478758 -1.289486108  0.258579285  0.393355969 -1.096841719
 [31]  0.540231555  0.007371603 -1.017249971  0.797606646 -0.461850318
 [36] -1.004977080  2.505038930 -0.266544458  1.810533452  1.147226685
 [41]  0.329106827  0.386373890  0.576095876  0.954803954  0.023839883
 [46] -0.912670378  0.547793564 -0.573678373  0.345394174  1.069233073
 [51]  0.158446692 -0.934127471 -1.117936352 -0.839977599  0.159063858
 [56]  0.081390517 -1.964115026  0.657716115 -0.580331000 -1.826859797
 [61] -0.577294692 -1.484803092 -0.117148793 -0.387579858 -1.816624874
 [66]  0.778805260 -0.400343672  0.155027746  0.637338341  0.304307786
 [71] -2.551235933  0.491077301 -0.632118068  1.268049867  1.229621898
 [76] -1.101152136 -1.197080474  1.238885505  1.788772838 -1.423498570
 [81] -0.516375766  0.694923983  0.529102332  1.897339231  0.639236843
 [86] -0.630266876 -0.024895945 -1.313103483  0.291374365  1.074882039
 [91] -0.394960331 -0.595189060  0.172102244 -0.894824233  1.486376763
 [96]  0.090431105 -0.006333834  1.175774982 -0.325869910  0.318136925
> 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.200568809 -0.551678356  0.870599514 -1.892060008  1.663016806
  [6]  0.371096666  0.786264938  0.610086518 -1.150238253  0.754964229
 [11]  0.903964336 -0.040051584  1.419290965  0.119725410 -0.294286649
 [16]  0.395277582 -1.440369345  0.452767951  1.097008139 -0.408377572
 [21]  0.450149856 -0.951230385  1.422382412  1.273621586  0.806188982
 [26] -0.939478758 -1.289486108  0.258579285  0.393355969 -1.096841719
 [31]  0.540231555  0.007371603 -1.017249971  0.797606646 -0.461850318
 [36] -1.004977080  2.505038930 -0.266544458  1.810533452  1.147226685
 [41]  0.329106827  0.386373890  0.576095876  0.954803954  0.023839883
 [46] -0.912670378  0.547793564 -0.573678373  0.345394174  1.069233073
 [51]  0.158446692 -0.934127471 -1.117936352 -0.839977599  0.159063858
 [56]  0.081390517 -1.964115026  0.657716115 -0.580331000 -1.826859797
 [61] -0.577294692 -1.484803092 -0.117148793 -0.387579858 -1.816624874
 [66]  0.778805260 -0.400343672  0.155027746  0.637338341  0.304307786
 [71] -2.551235933  0.491077301 -0.632118068  1.268049867  1.229621898
 [76] -1.101152136 -1.197080474  1.238885505  1.788772838 -1.423498570
 [81] -0.516375766  0.694923983  0.529102332  1.897339231  0.639236843
 [86] -0.630266876 -0.024895945 -1.313103483  0.291374365  1.074882039
 [91] -0.394960331 -0.595189060  0.172102244 -0.894824233  1.486376763
 [96]  0.090431105 -0.006333834  1.175774982 -0.325869910  0.318136925
> rowMin(tmp2)
  [1]  1.200568809 -0.551678356  0.870599514 -1.892060008  1.663016806
  [6]  0.371096666  0.786264938  0.610086518 -1.150238253  0.754964229
 [11]  0.903964336 -0.040051584  1.419290965  0.119725410 -0.294286649
 [16]  0.395277582 -1.440369345  0.452767951  1.097008139 -0.408377572
 [21]  0.450149856 -0.951230385  1.422382412  1.273621586  0.806188982
 [26] -0.939478758 -1.289486108  0.258579285  0.393355969 -1.096841719
 [31]  0.540231555  0.007371603 -1.017249971  0.797606646 -0.461850318
 [36] -1.004977080  2.505038930 -0.266544458  1.810533452  1.147226685
 [41]  0.329106827  0.386373890  0.576095876  0.954803954  0.023839883
 [46] -0.912670378  0.547793564 -0.573678373  0.345394174  1.069233073
 [51]  0.158446692 -0.934127471 -1.117936352 -0.839977599  0.159063858
 [56]  0.081390517 -1.964115026  0.657716115 -0.580331000 -1.826859797
 [61] -0.577294692 -1.484803092 -0.117148793 -0.387579858 -1.816624874
 [66]  0.778805260 -0.400343672  0.155027746  0.637338341  0.304307786
 [71] -2.551235933  0.491077301 -0.632118068  1.268049867  1.229621898
 [76] -1.101152136 -1.197080474  1.238885505  1.788772838 -1.423498570
 [81] -0.516375766  0.694923983  0.529102332  1.897339231  0.639236843
 [86] -0.630266876 -0.024895945 -1.313103483  0.291374365  1.074882039
 [91] -0.394960331 -0.595189060  0.172102244 -0.894824233  1.486376763
 [96]  0.090431105 -0.006333834  1.175774982 -0.325869910  0.318136925
> 
> colMeans(tmp2)
[1] 0.05662628
> colSums(tmp2)
[1] 5.662628
> colVars(tmp2)
[1] 0.9836463
> colSd(tmp2)
[1] 0.9917894
> colMax(tmp2)
[1] 2.505039
> colMin(tmp2)
[1] -2.551236
> colMedians(tmp2)
[1] 0.1587553
> colRanges(tmp2)
          [,1]
[1,] -2.551236
[2,]  2.505039
> 
> dataset1 <- matrix(dataset1,1,100)
> 
> agree.checks(tmp,dataset1)
> 
> dataset2 <- matrix(dataset2,100,1)
> agree.checks(tmp2,dataset2)
>   
> 
> tmp <- createBufferedMatrix(10,10)
> 
> tmp[1:10,1:10] <- rnorm(100)
> colApply(tmp,sum)
 [1]  1.2667437  2.1630281  2.7619782  0.9180075  4.4737191  0.2485388
 [7] -3.1413688 -0.4118114 -4.4940541  0.8770260
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.7167488
[2,] -0.4922720
[3,]  0.1605754
[4,]  0.8699568
[5,]  2.0142164
> 
> rowApply(tmp,sum)
 [1]  2.9796863 -1.3027685  0.3462088 -0.5437273 -0.4072689  2.9685571
 [7]  0.8287750 -2.4469197  5.2263754 -2.9871110
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    3    8    5    4    6   10    1    9    10
 [2,]   10    8    7    6   10    2    6   10    5     1
 [3,]    7    9   10    3    9    1    5    7   10     3
 [4,]    9    4    5    4    1    9    9    6    4     4
 [5,]    3   10    6    7    7    7    7    8    8     5
 [6,]    4    6    3   10    8   10    8    9    1     2
 [7,]    5    2    9    1    3    4    3    2    3     6
 [8,]    6    7    2    9    2    3    4    3    7     8
 [9,]    8    1    1    2    6    5    1    4    2     9
[10,]    2    5    4    8    5    8    2    5    6     7
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1]  0.1236511 -0.8824673  1.7312796  1.1049001  2.9980738  0.3849813
 [7]  0.5145946 -1.5271609 -3.2954353  3.0360268 -1.1731496 -1.1861567
[13] -1.3796336  2.3608836 -2.4646965 -0.5244911 -3.1438824 -1.1171619
[19] -0.4424304 -1.2828715
> colApply(tmp,quantile)[,1]
            [,1]
[1,] -1.46366093
[2,] -0.42434376
[3,]  0.08566395
[4,]  0.81367020
[5,]  1.11232165
> 
> rowApply(tmp,sum)
[1] -1.588097 -1.343003  2.723310 -4.190575 -1.766782
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]    4   10   17   18   10
[2,]   16   13    4    4   12
[3,]    9   16   11   13   16
[4,]    5   15    5   20   14
[5,]   10   19   18    9   17
> 
> 
> as.matrix(tmp)
            [,1]        [,2]       [,3]       [,4]       [,5]        [,6]
[1,] -1.46366093  0.87549900 0.02699483 -0.7259385  0.1534252  1.08375398
[2,] -0.42434376 -0.07912156 0.72973873  0.7206667  1.1350984  0.84413283
[3,]  1.11232165 -0.82339587 0.18405543 -0.7570154  1.4548834 -0.03156602
[4,]  0.81367020 -1.15100381 0.22518258  1.5179601 -0.4580186 -0.27203594
[5,]  0.08566395  0.29555495 0.56530799  0.3492273  0.7126853 -1.23930358
           [,7]       [,8]       [,9]      [,10]        [,11]      [,12]
[1,] -0.4478227  0.6449802  0.5250325  1.4617429  0.372315826 -1.6811802
[2,]  0.9892658 -0.4313654 -0.4262559 -1.8077504 -0.441597707 -1.3173086
[3,]  2.5109517 -0.4009895 -1.1807309  0.9935841 -1.890470984  2.3211149
[4,] -0.6740711 -1.6817054 -1.6349360  1.0081232  0.784811781 -0.8031775
[5,] -1.8637292  0.3419191 -0.5785450  1.3803270  0.001791449  0.2943947
          [,13]      [,14]      [,15]        [,16]      [,17]      [,18]
[1,]  0.1545331  1.1484107 -0.4831509  0.297944603 -2.1861494  0.9963525
[2,] -0.2207777 -0.3459035 -0.8313460 -1.184560899 -0.4487544 -0.6952714
[3,]  0.4812334  0.3823998 -0.5403463  0.910820581 -1.8152528 -0.5141692
[4,] -1.1540626  0.4113040 -1.0626770 -0.006219706  0.3623559  0.7185875
[5,] -0.6405598  0.7646725  0.4528236 -0.542475719  0.9439183 -1.6226614
          [,19]      [,20]
[1,] -1.6535110 -0.6876685
[2,]  2.3914226  0.5010295
[3,]  0.7946693 -0.4687871
[4,] -0.6882139 -0.4464491
[5,] -1.2867974 -0.1809962
> 
> 
> is.BufferedMatrix(tmp)
[1] TRUE
> 
> as.BufferedMatrix(as.matrix(tmp))
BufferedMatrix object
Matrix size:  5 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  800  bytes.
> 
> 
> 
> subBufferedMatrix(tmp,1:5,1:5)
BufferedMatrix object
Matrix size:  5 5 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  654  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.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:    /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  480  bytes.
> 
> 
> rm(tmp)
> 
> 
> ###
> ### Testing colnames and rownames
> ###
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> 
> 
> colnames(tmp)
NULL
> rownames(tmp)
NULL
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> colnames(tmp)
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"
> rownames(tmp)
[1] "row1" "row2" "row3" "row4" "row5"
> 
> 
> tmp["row1",]
          col1       col2      col3      col4     col5     col6     col7
row1 0.1455789 -0.5800605 0.3101277 -1.780399 1.059234 1.376793 1.467429
          col8     col9     col10     col11       col12     col13    col14
row1 0.1939619 2.463398 0.7042621 0.5321449 -0.08630906 0.5681436 1.901193
         col15      col16      col17     col18    col19     col20
row1 0.1697285 -0.2395976 -0.3733492 -1.329782 0.145084 0.7653684
> tmp[,"col10"]
          col10
row1  0.7042621
row2 -0.9971576
row3 -0.3368011
row4 -1.7153439
row5  1.0944258
> tmp[c("row1","row5"),]
           col1       col2       col3      col4      col5      col6      col7
row1  0.1455789 -0.5800605  0.3101277 -1.780399  1.059234  1.376793 1.4674288
row5 -0.1248405  1.3690270 -0.1711670 -1.904556 -0.922453 -1.036582 0.1749473
           col8        col9     col10      col11       col12      col13
row1 0.19396192  2.46339843 0.7042621  0.5321449 -0.08630906  0.5681436
row5 0.02168566 -0.03306341 1.0944258 -0.3140946  1.10629759 -0.8284332
        col14      col15      col16      col17      col18     col19      col20
row1 1.901193  0.1697285 -0.2395976 -0.3733492 -1.3297823 0.1450840  0.7653684
row5 0.346496 -1.2812121  0.9264688  1.7747859 -0.5342512 0.6142905 -1.3998392
> tmp[,c("col6","col20")]
            col6      col20
row1  1.37679276  0.7653684
row2  0.10066516 -0.4621124
row3 -0.66501945 -0.2590081
row4 -0.02111383  0.2294264
row5 -1.03658243 -1.3998392
> tmp[c("row1","row5"),c("col6","col20")]
          col6      col20
row1  1.376793  0.7653684
row5 -1.036582 -1.3998392
> 
> 
> 
> 
> tmp["row1",] <- rnorm(20,mean=10)
> tmp[,"col10"] <- rnorm(5,mean=30)
> tmp[c("row1","row5"),] <- rnorm(40,mean=50)
> tmp[,c("col6","col20")] <- rnorm(10,mean=75)
> tmp[c("row1","row5"),c("col6","col20")]  <- rnorm(4,mean=105)
> 
> tmp["row1",]
        col1     col2     col3     col4     col5   col6     col7     col8
row1 49.7843 48.61557 48.43711 49.86045 50.11527 105.43 49.98439 50.14392
         col9    col10    col11   col12    col13    col14    col15    col16
row1 50.27931 49.51108 49.12514 50.1857 50.30955 47.68427 48.87473 48.81595
        col17    col18    col19    col20
row1 47.84374 49.93119 49.28298 105.4699
> tmp[,"col10"]
        col10
row1 49.51108
row2 31.82891
row3 30.99464
row4 29.10397
row5 50.43730
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 49.78430 48.61557 48.43711 49.86045 50.11527 105.4300 49.98439 50.14392
row5 50.59514 51.63356 51.39106 51.05550 51.02286 106.1404 48.77288 51.91647
         col9    col10    col11    col12    col13    col14    col15    col16
row1 50.27931 49.51108 49.12514 50.18570 50.30955 47.68427 48.87473 48.81595
row5 50.62299 50.43730 48.46900 49.21713 50.49400 50.00986 50.75846 50.15732
        col17    col18    col19    col20
row1 47.84374 49.93119 49.28298 105.4699
row5 51.39880 48.99719 49.56583 106.9813
> tmp[,c("col6","col20")]
          col6     col20
row1 105.43000 105.46994
row2  75.42812  74.59760
row3  75.43675  75.09124
row4  76.04681  75.41533
row5 106.14037 106.98135
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 105.4300 105.4699
row5 106.1404 106.9813
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 105.4300 105.4699
row5 106.1404 106.9813
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,] -1.2356255
[2,] -1.0113597
[3,] -1.3545247
[4,]  0.1312242
[5,] -0.6673746
> tmp[,c("col17","col7")]
          col17        col7
[1,] -0.6006721  0.09787989
[2,] -0.2599604 -1.37586078
[3,] -1.2213511  0.67197856
[4,] -0.5200030  0.43203451
[5,] -0.7428715  0.64240922
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6      col20
[1,] -0.8053474  0.9407064
[2,]  1.0464735 -0.4874619
[3,] -0.2160524  0.6604944
[4,]  0.6028660  0.2766408
[5,]  1.1198610 -0.9472904
> subBufferedMatrix(tmp,1,c("col6"))[,1]
           col1
[1,] -0.8053474
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,] -0.8053474
[2,]  1.0464735
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> 
> 
> 
> subBufferedMatrix(tmp,c("row3","row1"),)[,1:20]
           [,1]       [,2]       [,3]       [,4]       [,5]       [,6]
row3 -0.3229624 -1.8418744 -0.3191844  0.4564585 0.08839033 -0.6064936
row1  0.4362268  0.5581543  0.6976593 -0.7479290 1.32888810  0.2794560
          [,7]       [,8]       [,9]      [,10]     [,11]       [,12]     [,13]
row3 -1.979514  0.6609832  1.5591540 -1.4063098 0.1632139 -0.93780818 0.5727266
row1  1.288317 -0.8810342 -0.5324319 -0.8118171 2.2234172  0.07765901 0.1457800
            [,14]      [,15]      [,16]     [,17]     [,18]      [,19]
row3 -0.009968763 -0.8092478  2.3903957 -1.155683 -1.990228 -0.2262833
row1  1.090036594 -0.6584661 -0.4800554 -1.104331  1.121634 -0.3233923
           [,20]
row3 -0.02287181
row1 -1.27626772
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
            [,1]       [,2]      [,3]      [,4]      [,5]     [,6]     [,7]
row2 -0.07533508 0.01643537 -1.368188 0.1816378 0.3099384 -1.10482 1.656145
           [,8]      [,9]      [,10]
row2 -0.1510324 0.7453359 -0.2253805
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
           [,1]       [,2]     [,3]       [,4]      [,5]     [,6]    [,7]
row5 -0.2408349 -0.7278865 -1.79315 -0.3314085 -2.295102 1.136149 2.19462
          [,8]      [,9]    [,10]      [,11]     [,12]       [,13]     [,14]
row5 -1.670131 0.2177701 2.130865 -0.1546007 -1.417523 -0.04360703 0.5293652
          [,15]     [,16]     [,17]     [,18]     [,19]      [,20]
row5 0.01488401 -1.373301 -1.762504 0.3304948 0.3844186 -0.2259935
> 
> 
> 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: 0x5fad77e9c4e0>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d82bef6155"
 [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d820c99d2d"
 [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d822642b48"
 [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d8691e5261"
 [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d8748e7af6"
 [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d83790aa89"
 [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d8324f4f58"
 [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d841c018ff"
 [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d831204144"
[10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d83c62dc84"
[11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d86b6020ec"
[12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d8311a9050"
[13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d874b68c46"
[14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d8d75d8b3" 
[15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1fb3d87d79d3d7"
> 
> 
> ### 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: 0x5fad7757da40>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x5fad7757da40>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x5fad7757da40>
> rowMedians(tmp)
  [1]  0.4298792793  0.4841097805 -0.0084987892 -0.3053688777  0.3174583860
  [6] -0.3828305113  0.1219802867  0.6062573276  0.0407894646 -0.4456377035
 [11]  0.4114905759  0.0325147995 -0.4782145697  0.3870749492  0.2480076332
 [16] -0.3224191083  0.2907469191 -0.2272366567  0.3625491080  0.4475011211
 [21]  0.3109829161  0.1732825428 -0.1051360577 -0.3461294029 -0.1443282480
 [26]  0.3143610685 -0.1748360667  0.2263194579 -0.1547649115  0.0216744165
 [31]  0.3808636972  0.5923143372 -0.0870951409 -0.3416851421  0.5385865585
 [36] -0.0210927144  0.4495841914 -0.0430269406  0.1030511977 -0.6161596841
 [41]  0.2882481347  0.1277051582  0.3051621403  0.2032233146  0.1678084546
 [46]  0.3903269120  0.3496773090 -0.2212242901  0.1528982581 -0.2957829925
 [51]  0.0873989070  0.2158733608 -0.0080327255 -0.4488986806  0.3566569559
 [56]  0.3902771749 -0.1496674564  0.0370007730 -0.2344958920 -0.0190470253
 [61] -0.2854942093  0.0930302293 -0.3073111639  0.0319166965  0.0923078496
 [66]  0.3217357278 -0.1990257429  0.3816107168  0.3442257995  0.4466994330
 [71]  0.3683947277 -0.1440543492  0.0153302405 -0.1271745962  0.0003915543
 [76]  0.1512360413  0.0594413604 -0.6286619244 -0.2240575317  0.0373025275
 [81]  0.4327775098 -0.1390016935  0.3517887676 -0.1477606210  0.1744875917
 [86]  0.1219191608  0.2478068542 -0.2959137123 -0.6586810055  0.0068083821
 [91] -0.2402251563  0.1999473079  0.3505452089 -0.2702949845 -0.2999841299
 [96] -0.1833597659  0.0947559462  0.2002626065 -0.1777192177 -0.0130230908
[101]  0.0148361847 -0.2930041583  0.2126828531  0.1308400668  0.0989340559
[106]  0.1824366310  0.4711500992 -0.0332857503 -0.2212661092  0.4672083626
[111] -0.3354307734 -0.1576723934 -0.1370355420  0.1328133976  0.1410946037
[116] -0.1655569098 -0.0955871080 -0.0386837101  0.2803675698  0.1805214754
[121] -0.2504304322 -0.4143397180  0.0879972977 -0.3187478588  0.3662441309
[126] -0.1187477506 -0.2392604823 -0.7664683088 -0.2304126443 -0.3695421714
[131] -0.1205500518 -0.2552668448 -0.2339337662 -0.2735720792  0.2221236882
[136] -0.1703471062  0.5867382945 -0.0361881091  0.2522358252  0.0305094169
[141] -0.0248337430  0.2164768083 -0.3616267632 -0.1440940939  0.3455815798
[146]  0.1002349387 -0.3754834971  0.0200394510  0.1940700332 -0.1454285498
[151] -0.3070256397  0.0015460163 -0.0412934225  0.0187615269  0.4431829097
[156] -0.3851552386  0.3515530578  0.4900041311 -0.0554879234 -0.0568382015
[161] -0.0445767627 -0.0552580876 -0.1269199837  0.1439932850 -0.2535939161
[166]  0.6277895531  0.5220915236 -0.1367713823 -0.1941933449 -0.4915122985
[171]  0.0330521636  0.0553559112  0.1165644098  0.1467661790 -0.1245037559
[176] -0.4725922063  0.5510546050  0.1349131338  0.0101043484  0.3270258670
[181]  0.4812453484  0.0207842400 -0.2722041644 -0.0007474017 -0.3247485125
[186] -0.3962629553 -0.3677305237  0.3958688611  0.4051181569 -0.1875518301
[191] -0.5587700358  0.0796455072  0.9805461277  0.4920919890  0.1581051404
[196] -0.8151708623 -0.2592681976  0.2868966432  0.0141479678  0.0122698253
[201]  0.2023626457  0.3967623537 -0.0812694423 -0.2199266741  0.0256772291
[206] -0.0815223838 -0.3114483884  0.5131889238 -0.2397256107  0.0396133467
[211] -0.2564784118 -0.5658307426  0.0623395449 -0.3712385155  0.3699285980
[216] -0.5532722080  0.3522446890 -0.3809115004  0.2076531039 -0.2895463394
[221]  0.2083188043 -0.2953264095  0.1223109213 -0.1233906934 -0.0778942189
[226]  0.4100655788 -0.3306323548 -0.0500189373  0.1427180881  0.1498522920
> 
> proc.time()
   user  system elapsed 
  1.246   0.657   1.892 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

<pointer: 0x5fa2ddaab370>
> .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: 0x5fa2ddaab370>
> .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: 0x5fa2ddaab370>
> .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: 0x5fa2ddaab370>
> 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: 0x5fa2dda931c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fa2dda931c0>
> .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: 0x5fa2dda931c0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fa2dda931c0>
> .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: 0x5fa2dda931c0>
> 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: 0x5fa2ddd76120>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fa2ddd76120>
> .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: 0x5fa2ddd76120>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x5fa2ddd76120>
> .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: 0x5fa2ddd76120>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x5fa2ddd76120>
> .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: 0x5fa2ddd76120>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x5fa2ddd76120>
> .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: 0x5fa2ddd76120>
> 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: 0x5fa2dcac6390>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x5fa2dcac6390>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fa2dcac6390>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fa2dcac6390>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile1fb6593a5d5867" "BufferedMatrixFile1fb65941f270b1"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile1fb6593a5d5867" "BufferedMatrixFile1fb65941f270b1"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fa2dc9bd3d0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fa2dc9bd3d0>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x5fa2dc9bd3d0>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x5fa2dc9bd3d0>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x5fa2dc9bd3d0>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x5fa2dc9bd3d0>
> .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: 0x5fa2de4f2fa0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5fa2de4f2fa0>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x5fa2de4f2fa0>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x5fa2de4f2fa0>
> 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: 0x5fa2dcccaff0>
> .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: 0x5fa2dcccaff0>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.250   0.055   0.294 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> Temp <- createBufferedMatrix(100)
> dim(Temp)
[1] 100   0
> buffer.dim(Temp)
[1] 1 1
> 
> 
> proc.time()
   user  system elapsed 
  0.252   0.036   0.278 

Example timings