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

This page was generated on 2025-03-14 11:39 -0400 (Fri, 14 Mar 2025).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo1Linux (Ubuntu 24.04.1 LTS)x86_64R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" 4781
palomino7Windows Server 2022 Datacenterx64R Under development (unstable) (2025-03-01 r87860 ucrt) -- "Unsuffered Consequences" 4537
lconwaymacOS 12.7.1 Montereyx86_64R Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" 4567
kjohnson3macOS 13.7.1 Venturaarm64R Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" 4519
kunpeng2Linux (openEuler 24.03 LTS)aarch64R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" 4451
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 248/2309HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.71.1  (landing page)
Ben Bolstad
Snapshot Date: 2025-03-13 13:40 -0400 (Thu, 13 Mar 2025)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: devel
git_last_commit: 824836d
git_last_commit_date: 2024-12-14 17:47:34 -0400 (Sat, 14 Dec 2024)
nebbiolo1Linux (Ubuntu 24.04.1 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
palomino7Windows Server 2022 Datacenter / x64  OK    OK    OK    OK  UNNEEDED, same version is already published
lconwaymacOS 12.7.1 Monterey / x86_64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kjohnson3macOS 13.7.1 Ventura / arm64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kunpeng2Linux (openEuler 24.03 LTS) / aarch64  OK    OK    OK  


CHECK results for BufferedMatrix on nebbiolo1

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.71.1
Command: /home/biocbuild/bbs-3.21-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.21-bioc/R/site-library --timings BufferedMatrix_1.71.1.tar.gz
StartedAt: 2025-03-13 20:22:25 -0400 (Thu, 13 Mar 2025)
EndedAt: 2025-03-13 20:22:50 -0400 (Thu, 13 Mar 2025)
EllapsedTime: 25.0 seconds
RetCode: 0
Status:   OK  
CheckDir: BufferedMatrix.Rcheck
Warnings: 0

Command output

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


* using log directory ‘/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck’
* using R Under development (unstable) (2025-02-19 r87757)
* 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.2 LTS
* using session charset: UTF-8
* checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK
* this is package ‘BufferedMatrix’ version ‘1.71.1’
* 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.21-bioc/meat/BufferedMatrix.Rcheck/00check.log’
for details.


Installation output

BufferedMatrix.Rcheck/00install.out

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


* installing to library ‘/home/biocbuild/bbs-3.21-bioc/R/site-library’
* installing *source* package ‘BufferedMatrix’ ...
** this is package ‘BufferedMatrix’ version ‘1.71.1’
** 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.21-bioc/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c RBufferedMatrix.c -o RBufferedMatrix.o
gcc -std=gnu2x -I"/home/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o
gcc -std=gnu2x -I"/home/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o
gcc -std=gnu2x -I"/home/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c init_package.c -o init_package.o
gcc -std=gnu2x -shared -L/home/biocbuild/bbs-3.21-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.21-bioc/R/lib -lR
installing to /home/biocbuild/bbs-3.21-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 Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences"
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.247   0.056   0.291 

BufferedMatrix.Rcheck/tests/objectTesting.Rout

R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences"
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.21-bioc/meat/BufferedMatrix.Rcheck/tests"
> prefix(tmp3)
[1] "BM"
> 
> ## testing if we can remove these objects
> rm(tmp, tmp2, tmp3)
> gc()
         used (Mb) gc trigger (Mb) max used (Mb)
Ncells 477833 25.6    1045335 55.9   639802 34.2
Vcells 884275  6.8    8388608 64.0  2080986 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 Mar 13 20:22:40 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 Mar 13 20:22:40 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: 0x5e623d68cb80>
> 
> 
> 
> 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 Mar 13 20:22:41 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 Mar 13 20:22:41 2025"
> 
> ColMode(tmp2)
<pointer: 0x5e623d68cb80>
> 
> 
> 
> ### 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.8865752 1.3770977  0.200330353 -1.622368
[2,]  0.5127652 0.6391073  0.007943289  1.074620
[3,]  1.2474559 0.1225465  0.530903229 -1.170024
[4,] -0.9703740 1.4018453 -0.925687637  0.489023
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.21-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.8865752 1.3770977 0.200330353 1.622368
[2,]  0.5127652 0.6391073 0.007943289 1.074620
[3,]  1.2474559 0.1225465 0.530903229 1.170024
[4,]  0.9703740 1.4018453 0.925687637 0.489023
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.21-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.9943272 1.1734981 0.44758279 1.2737222
[2,] 0.7160762 0.7994419 0.08912513 1.0366388
[3,] 1.1168957 0.3500664 0.72863106 1.0816764
[4,] 0.9850756 1.1839955 0.96212662 0.6993018
> 
> 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.21-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.82985 38.11208 29.67616 39.35959
[2,]  32.67353 33.63353 25.89919 36.44101
[3,]  37.41641 28.62321 32.81721 36.98679
[4,]  35.82113 38.24180 35.54695 32.48204
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x5e623c0e6f10>
> exp(tmp5)
<pointer: 0x5e623c0e6f10>
> log(tmp5,2)
<pointer: 0x5e623c0e6f10>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 467.9539
> Min(tmp5)
[1] 53.90578
> mean(tmp5)
[1] 73.78319
> Sum(tmp5)
[1] 14756.64
> Var(tmp5)
[1] 859.5231
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 93.84801 68.82297 74.38201 71.53470 71.44584 69.20199 75.11010 70.52059
 [9] 69.08196 73.88370
> rowSums(tmp5)
 [1] 1876.960 1376.459 1487.640 1430.694 1428.917 1384.040 1502.202 1410.412
 [9] 1381.639 1477.674
> rowVars(tmp5)
 [1] 7866.62307   66.47716   76.85766   55.45104   98.35909   96.43106
 [7]   45.67971   52.18083   55.53252   69.22105
> rowSd(tmp5)
 [1] 88.693986  8.153353  8.766850  7.446546  9.917615  9.819932  6.758676
 [8]  7.223630  7.452015  8.319919
> rowMax(tmp5)
 [1] 467.95387  81.98610  92.81798  85.19435  86.78587  85.13768  85.69342
 [8]  80.67275  87.43779  89.87976
> rowMin(tmp5)
 [1] 55.09996 53.90578 59.57546 56.20429 54.94681 55.57545 62.63533 59.26945
 [9] 55.74380 59.22722
> 
> colMeans(tmp5)
 [1] 111.60261  75.22488  68.23267  75.82441  70.20436  69.48119  74.50724
 [8]  71.44742  71.12016  71.04375  71.50370  68.77095  69.97866  72.64404
[15]  68.01659  76.22613  73.27448  74.15956  70.05956  72.34137
> colSums(tmp5)
 [1] 1116.0261  752.2488  682.3267  758.2441  702.0436  694.8119  745.0724
 [8]  714.4742  711.2016  710.4375  715.0370  687.7095  699.7866  726.4404
[15]  680.1659  762.2613  732.7448  741.5956  700.5956  723.4137
> colVars(tmp5)
 [1] 15743.02451    55.91176   112.71428    58.61143    67.39417    86.83702
 [7]    38.78733    89.85073   112.84758    65.63914    59.99456    71.40181
[13]   115.38823   100.81717    52.17318    48.71546   110.51200    63.58421
[19]    42.26761   107.52791
> colSd(tmp5)
 [1] 125.471210   7.477416  10.616698   7.655810   8.209395   9.318639
 [7]   6.227947   9.478962  10.622974   8.101799   7.745616   8.449959
[13]  10.741891  10.040775   7.223100   6.979646  10.512469   7.973971
[19]   6.501354  10.369566
> colMax(tmp5)
 [1] 467.95387  87.43779  85.13768  83.64145  83.65741  79.64115  82.30977
 [8]  86.78587  85.74958  87.02611  85.69342  84.14895  85.10814  87.34543
[15]  76.39931  85.19435  92.81798  89.87976  77.26463  89.88945
> colMin(tmp5)
 [1] 58.02927 59.57546 53.90578 57.74338 59.88574 55.42848 64.62974 59.91703
 [9] 55.74380 58.14905 60.70685 54.54316 57.06899 55.57545 54.94681 65.67543
[17] 61.02533 62.78336 55.09996 55.80696
> 
> 
> ### 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] 93.84801 68.82297 74.38201 71.53470 71.44584 69.20199 75.11010       NA
 [9] 69.08196 73.88370
> rowSums(tmp5)
 [1] 1876.960 1376.459 1487.640 1430.694 1428.917 1384.040 1502.202       NA
 [9] 1381.639 1477.674
> rowVars(tmp5)
 [1] 7866.62307   66.47716   76.85766   55.45104   98.35909   96.43106
 [7]   45.67971   52.30026   55.53252   69.22105
> rowSd(tmp5)
 [1] 88.693986  8.153353  8.766850  7.446546  9.917615  9.819932  6.758676
 [8]  7.231892  7.452015  8.319919
> rowMax(tmp5)
 [1] 467.95387  81.98610  92.81798  85.19435  86.78587  85.13768  85.69342
 [8]        NA  87.43779  89.87976
> rowMin(tmp5)
 [1] 55.09996 53.90578 59.57546 56.20429 54.94681 55.57545 62.63533       NA
 [9] 55.74380 59.22722
> 
> colMeans(tmp5)
 [1] 111.60261  75.22488  68.23267  75.82441  70.20436  69.48119  74.50724
 [8]  71.44742  71.12016  71.04375  71.50370  68.77095  69.97866        NA
[15]  68.01659  76.22613  73.27448  74.15956  70.05956  72.34137
> colSums(tmp5)
 [1] 1116.0261  752.2488  682.3267  758.2441  702.0436  694.8119  745.0724
 [8]  714.4742  711.2016  710.4375  715.0370  687.7095  699.7866        NA
[15]  680.1659  762.2613  732.7448  741.5956  700.5956  723.4137
> colVars(tmp5)
 [1] 15743.02451    55.91176   112.71428    58.61143    67.39417    86.83702
 [7]    38.78733    89.85073   112.84758    65.63914    59.99456    71.40181
[13]   115.38823          NA    52.17318    48.71546   110.51200    63.58421
[19]    42.26761   107.52791
> colSd(tmp5)
 [1] 125.471210   7.477416  10.616698   7.655810   8.209395   9.318639
 [7]   6.227947   9.478962  10.622974   8.101799   7.745616   8.449959
[13]  10.741891         NA   7.223100   6.979646  10.512469   7.973971
[19]   6.501354  10.369566
> colMax(tmp5)
 [1] 467.95387  87.43779  85.13768  83.64145  83.65741  79.64115  82.30977
 [8]  86.78587  85.74958  87.02611  85.69342  84.14895  85.10814        NA
[15]  76.39931  85.19435  92.81798  89.87976  77.26463  89.88945
> colMin(tmp5)
 [1] 58.02927 59.57546 53.90578 57.74338 59.88574 55.42848 64.62974 59.91703
 [9] 55.74380 58.14905 60.70685 54.54316 57.06899       NA 54.94681 65.67543
[17] 61.02533 62.78336 55.09996 55.80696
> 
> Max(tmp5,na.rm=TRUE)
[1] 467.9539
> Min(tmp5,na.rm=TRUE)
[1] 53.90578
> mean(tmp5,na.rm=TRUE)
[1] 73.76494
> Sum(tmp5,na.rm=TRUE)
[1] 14679.22
> Var(tmp5,na.rm=TRUE)
[1] 863.7972
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 93.84801 68.82297 74.38201 71.53470 71.44584 69.20199 75.11010 70.15774
 [9] 69.08196 73.88370
> rowSums(tmp5,na.rm=TRUE)
 [1] 1876.960 1376.459 1487.640 1430.694 1428.917 1384.040 1502.202 1332.997
 [9] 1381.639 1477.674
> rowVars(tmp5,na.rm=TRUE)
 [1] 7866.62307   66.47716   76.85766   55.45104   98.35909   96.43106
 [7]   45.67971   52.30026   55.53252   69.22105
> rowSd(tmp5,na.rm=TRUE)
 [1] 88.693986  8.153353  8.766850  7.446546  9.917615  9.819932  6.758676
 [8]  7.231892  7.452015  8.319919
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.95387  81.98610  92.81798  85.19435  86.78587  85.13768  85.69342
 [8]  80.67275  87.43779  89.87976
> rowMin(tmp5,na.rm=TRUE)
 [1] 55.09996 53.90578 59.57546 56.20429 54.94681 55.57545 62.63533 59.26945
 [9] 55.74380 59.22722
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 111.60261  75.22488  68.23267  75.82441  70.20436  69.48119  74.50724
 [8]  71.44742  71.12016  71.04375  71.50370  68.77095  69.97866  72.11396
[15]  68.01659  76.22613  73.27448  74.15956  70.05956  72.34137
> colSums(tmp5,na.rm=TRUE)
 [1] 1116.0261  752.2488  682.3267  758.2441  702.0436  694.8119  745.0724
 [8]  714.4742  711.2016  710.4375  715.0370  687.7095  699.7866  649.0257
[15]  680.1659  762.2613  732.7448  741.5956  700.5956  723.4137
> colVars(tmp5,na.rm=TRUE)
 [1] 15743.02451    55.91176   112.71428    58.61143    67.39417    86.83702
 [7]    38.78733    89.85073   112.84758    65.63914    59.99456    71.40181
[13]   115.38823   110.25826    52.17318    48.71546   110.51200    63.58421
[19]    42.26761   107.52791
> colSd(tmp5,na.rm=TRUE)
 [1] 125.471210   7.477416  10.616698   7.655810   8.209395   9.318639
 [7]   6.227947   9.478962  10.622974   8.101799   7.745616   8.449959
[13]  10.741891  10.500393   7.223100   6.979646  10.512469   7.973971
[19]   6.501354  10.369566
> colMax(tmp5,na.rm=TRUE)
 [1] 467.95387  87.43779  85.13768  83.64145  83.65741  79.64115  82.30977
 [8]  86.78587  85.74958  87.02611  85.69342  84.14895  85.10814  87.34543
[15]  76.39931  85.19435  92.81798  89.87976  77.26463  89.88945
> colMin(tmp5,na.rm=TRUE)
 [1] 58.02927 59.57546 53.90578 57.74338 59.88574 55.42848 64.62974 59.91703
 [9] 55.74380 58.14905 60.70685 54.54316 57.06899 55.57545 54.94681 65.67543
[17] 61.02533 62.78336 55.09996 55.80696
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 93.84801 68.82297 74.38201 71.53470 71.44584 69.20199 75.11010      NaN
 [9] 69.08196 73.88370
> rowSums(tmp5,na.rm=TRUE)
 [1] 1876.960 1376.459 1487.640 1430.694 1428.917 1384.040 1502.202    0.000
 [9] 1381.639 1477.674
> rowVars(tmp5,na.rm=TRUE)
 [1] 7866.62307   66.47716   76.85766   55.45104   98.35909   96.43106
 [7]   45.67971         NA   55.53252   69.22105
> rowSd(tmp5,na.rm=TRUE)
 [1] 88.693986  8.153353  8.766850  7.446546  9.917615  9.819932  6.758676
 [8]        NA  7.452015  8.319919
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.95387  81.98610  92.81798  85.19435  86.78587  85.13768  85.69342
 [8]        NA  87.43779  89.87976
> rowMin(tmp5,na.rm=TRUE)
 [1] 55.09996 53.90578 59.57546 56.20429 54.94681 55.57545 62.63533       NA
 [9] 55.74380 59.22722
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 117.19138  75.13475  67.72473  75.48707  71.35088  68.35231  75.60474
 [8]  70.42239  70.53777  71.02795  71.93050  69.21790  69.01975       NaN
[15]  68.98849  76.40142  74.31226  74.96950  69.66412  73.46208
> colSums(tmp5,na.rm=TRUE)
 [1] 1054.7224  676.2128  609.5225  679.3837  642.1579  615.1708  680.4427
 [8]  633.8015  634.8399  639.2516  647.3745  622.9611  621.1778    0.0000
[15]  620.8965  687.6128  668.8104  674.7255  626.9771  661.1587
> colVars(tmp5,na.rm=TRUE)
 [1] 17359.51627    62.80935   123.90097    64.65768    61.03040    83.35489
 [7]    30.08506    89.26170   123.13777    73.84122    65.44458    78.07973
[13]   119.46742          NA    48.06808    54.45921   112.20992    64.15222
[19]    45.79187   106.83896
> colSd(tmp5,na.rm=TRUE)
 [1] 131.755517   7.925235  11.131081   8.041000   7.812196   9.129890
 [7]   5.484985   9.447841  11.096746   8.593092   8.089782   8.836273
[13]  10.930115         NA   6.933115   7.379648  10.592918   8.009508
[19]   6.766969  10.336293
> colMax(tmp5,na.rm=TRUE)
 [1] 467.95387  87.43779  85.13768  83.64145  83.65741  78.23371  82.30977
 [8]  86.78587  85.74958  87.02611  85.69342  84.14895  85.10814      -Inf
[15]  76.39931  85.19435  92.81798  89.87976  77.26463  89.88945
> colMin(tmp5,na.rm=TRUE)
 [1] 58.02927 59.57546 53.90578 57.74338 62.16921 55.42848 68.25450 59.91703
 [9] 55.74380 58.14905 60.70685 54.54316 57.06899      Inf 54.94681 65.67543
[17] 61.02533 62.78336 55.09996 55.80696
> 
> 
> 
> 
> 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] 217.2282 199.2012 122.0530 245.3524 134.4619 189.7884 266.3850 190.8704
 [9] 121.2708 269.8761
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 217.2282 199.2012 122.0530 245.3524 134.4619 189.7884 266.3850 190.8704
 [9] 121.2708 269.8761
> 
> 
> 
> copymatrix <- matrix(rnorm(200,150,15),10,20)
> 
> tmp5[1:10,1:20] <- copymatrix
> which.row <- 1
> which.col  <- 3
> cat(which.row," ",which.col,"\n")
1   3 
> tmp5[which.row,which.col] <- NA
> copymatrix[which.row,which.col] <- NA
> 
> colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE)
 [1] -1.136868e-13  0.000000e+00  1.421085e-14 -5.684342e-14 -2.842171e-14
 [6]  1.421085e-14 -1.705303e-13  0.000000e+00  2.842171e-13 -1.136868e-13
[11] -2.842171e-14  0.000000e+00  2.842171e-14  2.273737e-13 -4.263256e-13
[16] -1.421085e-13 -2.842171e-14  1.136868e-13  0.000000e+00  5.684342e-14
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## making sure these things agree
> ##
> ## first when there is no NA
> 
> 
> 
> agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){
+ 
+   if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Max")
+   }
+   
+ 
+   if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Min")
+   }
+ 
+ 
+   if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){
+ 
+     cat(Sum(buff.matrix,na.rm=TRUE),"\n")
+     cat(sum(r.matrix,na.rm=TRUE),"\n")
+     cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n")
+     
+     stop("No agreement in Sum")
+   }
+   
+   if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){
+     stop("No agreement in mean")
+   }
+   
+   
+   if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){
+     stop("No agreement in Var")
+   }
+   
+   
+ 
+   if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowMeans")
+   }
+   
+   
+   if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colMeans")
+   }
+   
+   
+   if(any(abs(rowSums(buff.matrix,na.rm=TRUE)  -  apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in rowSums")
+   }
+   
+   
+   if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colSums")
+   }
+   
+   ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when 
+   ### computing variance
+   my.Var <- function(x,na.rm=FALSE){
+    if (all(is.na(x))){
+      return(NA)
+    } else {
+      var(x,na.rm=na.rm)
+    }
+ 
+   }
+   
+   if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+   
+   
+   if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+ 
+ 
+   if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+ 
+   if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+   
+   
+   if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+   
+ 
+   if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+ 
+   if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMedian")
+   }
+ 
+   if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colRanges")
+   }
+ 
+ 
+   
+ }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> for (rep in 1:20){
+   copymatrix <- matrix(rnorm(200,150,15),10,20)
+   
+   tmp5[1:10,1:20] <- copymatrix
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ## now lets assign some NA values and check agreement
+ 
+   which.row <- sample(1:10,1,replace=TRUE)
+   which.col  <- sample(1:20,1,replace=TRUE)
+   
+   cat(which.row," ",which.col,"\n")
+   
+   tmp5[which.row,which.col] <- NA
+   copymatrix[which.row,which.col] <- NA
+   
+   agree.checks(tmp5,copymatrix)
+ 
+   ## make an entire row NA
+   tmp5[which.row,] <- NA
+   copymatrix[which.row,] <- NA
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ### also make an entire col NA
+   tmp5[,which.col] <- NA
+   copymatrix[,which.col] <- NA
+ 
+   agree.checks(tmp5,copymatrix)
+ 
+   ### now make 1 element non NA with NA in the rest of row and column
+ 
+   tmp5[which.row,which.col] <- rnorm(1,150,15)
+   copymatrix[which.row,which.col] <- tmp5[which.row,which.col]
+ 
+   agree.checks(tmp5,copymatrix)
+ }
4   1 
2   11 
7   9 
9   13 
2   18 
9   16 
1   11 
3   10 
5   7 
7   16 
10   6 
4   6 
2   20 
7   1 
3   11 
10   5 
1   4 
3   6 
3   13 
3   19 
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.178666
> Min(tmp)
[1] -2.099094
> mean(tmp)
[1] 0.002143267
> Sum(tmp)
[1] 0.2143267
> Var(tmp)
[1] 0.7367972
> 
> rowMeans(tmp)
[1] 0.002143267
> rowSums(tmp)
[1] 0.2143267
> rowVars(tmp)
[1] 0.7367972
> rowSd(tmp)
[1] 0.8583689
> rowMax(tmp)
[1] 2.178666
> rowMin(tmp)
[1] -2.099094
> 
> colMeans(tmp)
  [1]  0.36125747  0.14323540  0.40513656  0.03575163  0.66875909  0.05171213
  [7] -1.12416921  0.16545994  0.57302209  0.19677217  0.10810015 -1.78122562
 [13] -1.53445596 -0.84273932  0.26027993  0.21073279  0.01577188  0.70354142
 [19] -0.57771200  0.12955825 -0.20550799 -0.66209260  0.59266383  1.17445172
 [25] -0.86086059  0.24536624  0.27477733  0.86957993  0.34482576  0.04311561
 [31] -1.03699626 -2.09909410  0.86829081 -1.76560492 -0.98868980 -0.32913677
 [37]  0.27966231  0.74342143 -0.13542158 -1.90403792  0.36182834 -0.14315469
 [43] -0.25214461  1.58644727  1.53394536 -2.04938538 -0.54426675  1.54929179
 [49] -0.73966597  0.89348164  0.32271954 -0.60269246  0.38828111  1.75211452
 [55]  0.18144272 -0.02358513 -0.23305612  0.40572657  0.57923187 -1.04240345
 [61]  1.26441524 -0.16703640 -0.21600113  0.27560503 -0.42379558  1.22812733
 [67] -1.15317078 -0.54918287  0.31898417  1.08463204  0.28120016 -0.10093868
 [73]  0.80543874 -0.57418010  2.17866613 -0.43874397  0.48201360 -0.05488516
 [79]  0.23791536  0.88615684  0.13305947  1.20076934 -0.29385841  0.87309348
 [85]  0.10921776 -0.83161426  0.06798765 -0.85257394  0.69154512 -1.20095851
 [91] -0.36108448 -1.91280473  0.58772018 -0.54155396 -0.68473539  0.95857010
 [97] -0.40527996 -0.79544383  0.08609208  0.47930160
> colSums(tmp)
  [1]  0.36125747  0.14323540  0.40513656  0.03575163  0.66875909  0.05171213
  [7] -1.12416921  0.16545994  0.57302209  0.19677217  0.10810015 -1.78122562
 [13] -1.53445596 -0.84273932  0.26027993  0.21073279  0.01577188  0.70354142
 [19] -0.57771200  0.12955825 -0.20550799 -0.66209260  0.59266383  1.17445172
 [25] -0.86086059  0.24536624  0.27477733  0.86957993  0.34482576  0.04311561
 [31] -1.03699626 -2.09909410  0.86829081 -1.76560492 -0.98868980 -0.32913677
 [37]  0.27966231  0.74342143 -0.13542158 -1.90403792  0.36182834 -0.14315469
 [43] -0.25214461  1.58644727  1.53394536 -2.04938538 -0.54426675  1.54929179
 [49] -0.73966597  0.89348164  0.32271954 -0.60269246  0.38828111  1.75211452
 [55]  0.18144272 -0.02358513 -0.23305612  0.40572657  0.57923187 -1.04240345
 [61]  1.26441524 -0.16703640 -0.21600113  0.27560503 -0.42379558  1.22812733
 [67] -1.15317078 -0.54918287  0.31898417  1.08463204  0.28120016 -0.10093868
 [73]  0.80543874 -0.57418010  2.17866613 -0.43874397  0.48201360 -0.05488516
 [79]  0.23791536  0.88615684  0.13305947  1.20076934 -0.29385841  0.87309348
 [85]  0.10921776 -0.83161426  0.06798765 -0.85257394  0.69154512 -1.20095851
 [91] -0.36108448 -1.91280473  0.58772018 -0.54155396 -0.68473539  0.95857010
 [97] -0.40527996 -0.79544383  0.08609208  0.47930160
> 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.36125747  0.14323540  0.40513656  0.03575163  0.66875909  0.05171213
  [7] -1.12416921  0.16545994  0.57302209  0.19677217  0.10810015 -1.78122562
 [13] -1.53445596 -0.84273932  0.26027993  0.21073279  0.01577188  0.70354142
 [19] -0.57771200  0.12955825 -0.20550799 -0.66209260  0.59266383  1.17445172
 [25] -0.86086059  0.24536624  0.27477733  0.86957993  0.34482576  0.04311561
 [31] -1.03699626 -2.09909410  0.86829081 -1.76560492 -0.98868980 -0.32913677
 [37]  0.27966231  0.74342143 -0.13542158 -1.90403792  0.36182834 -0.14315469
 [43] -0.25214461  1.58644727  1.53394536 -2.04938538 -0.54426675  1.54929179
 [49] -0.73966597  0.89348164  0.32271954 -0.60269246  0.38828111  1.75211452
 [55]  0.18144272 -0.02358513 -0.23305612  0.40572657  0.57923187 -1.04240345
 [61]  1.26441524 -0.16703640 -0.21600113  0.27560503 -0.42379558  1.22812733
 [67] -1.15317078 -0.54918287  0.31898417  1.08463204  0.28120016 -0.10093868
 [73]  0.80543874 -0.57418010  2.17866613 -0.43874397  0.48201360 -0.05488516
 [79]  0.23791536  0.88615684  0.13305947  1.20076934 -0.29385841  0.87309348
 [85]  0.10921776 -0.83161426  0.06798765 -0.85257394  0.69154512 -1.20095851
 [91] -0.36108448 -1.91280473  0.58772018 -0.54155396 -0.68473539  0.95857010
 [97] -0.40527996 -0.79544383  0.08609208  0.47930160
> colMin(tmp)
  [1]  0.36125747  0.14323540  0.40513656  0.03575163  0.66875909  0.05171213
  [7] -1.12416921  0.16545994  0.57302209  0.19677217  0.10810015 -1.78122562
 [13] -1.53445596 -0.84273932  0.26027993  0.21073279  0.01577188  0.70354142
 [19] -0.57771200  0.12955825 -0.20550799 -0.66209260  0.59266383  1.17445172
 [25] -0.86086059  0.24536624  0.27477733  0.86957993  0.34482576  0.04311561
 [31] -1.03699626 -2.09909410  0.86829081 -1.76560492 -0.98868980 -0.32913677
 [37]  0.27966231  0.74342143 -0.13542158 -1.90403792  0.36182834 -0.14315469
 [43] -0.25214461  1.58644727  1.53394536 -2.04938538 -0.54426675  1.54929179
 [49] -0.73966597  0.89348164  0.32271954 -0.60269246  0.38828111  1.75211452
 [55]  0.18144272 -0.02358513 -0.23305612  0.40572657  0.57923187 -1.04240345
 [61]  1.26441524 -0.16703640 -0.21600113  0.27560503 -0.42379558  1.22812733
 [67] -1.15317078 -0.54918287  0.31898417  1.08463204  0.28120016 -0.10093868
 [73]  0.80543874 -0.57418010  2.17866613 -0.43874397  0.48201360 -0.05488516
 [79]  0.23791536  0.88615684  0.13305947  1.20076934 -0.29385841  0.87309348
 [85]  0.10921776 -0.83161426  0.06798765 -0.85257394  0.69154512 -1.20095851
 [91] -0.36108448 -1.91280473  0.58772018 -0.54155396 -0.68473539  0.95857010
 [97] -0.40527996 -0.79544383  0.08609208  0.47930160
> colMedians(tmp)
  [1]  0.36125747  0.14323540  0.40513656  0.03575163  0.66875909  0.05171213
  [7] -1.12416921  0.16545994  0.57302209  0.19677217  0.10810015 -1.78122562
 [13] -1.53445596 -0.84273932  0.26027993  0.21073279  0.01577188  0.70354142
 [19] -0.57771200  0.12955825 -0.20550799 -0.66209260  0.59266383  1.17445172
 [25] -0.86086059  0.24536624  0.27477733  0.86957993  0.34482576  0.04311561
 [31] -1.03699626 -2.09909410  0.86829081 -1.76560492 -0.98868980 -0.32913677
 [37]  0.27966231  0.74342143 -0.13542158 -1.90403792  0.36182834 -0.14315469
 [43] -0.25214461  1.58644727  1.53394536 -2.04938538 -0.54426675  1.54929179
 [49] -0.73966597  0.89348164  0.32271954 -0.60269246  0.38828111  1.75211452
 [55]  0.18144272 -0.02358513 -0.23305612  0.40572657  0.57923187 -1.04240345
 [61]  1.26441524 -0.16703640 -0.21600113  0.27560503 -0.42379558  1.22812733
 [67] -1.15317078 -0.54918287  0.31898417  1.08463204  0.28120016 -0.10093868
 [73]  0.80543874 -0.57418010  2.17866613 -0.43874397  0.48201360 -0.05488516
 [79]  0.23791536  0.88615684  0.13305947  1.20076934 -0.29385841  0.87309348
 [85]  0.10921776 -0.83161426  0.06798765 -0.85257394  0.69154512 -1.20095851
 [91] -0.36108448 -1.91280473  0.58772018 -0.54155396 -0.68473539  0.95857010
 [97] -0.40527996 -0.79544383  0.08609208  0.47930160
> colRanges(tmp)
          [,1]      [,2]      [,3]       [,4]      [,5]       [,6]      [,7]
[1,] 0.3612575 0.1432354 0.4051366 0.03575163 0.6687591 0.05171213 -1.124169
[2,] 0.3612575 0.1432354 0.4051366 0.03575163 0.6687591 0.05171213 -1.124169
          [,8]      [,9]     [,10]     [,11]     [,12]     [,13]      [,14]
[1,] 0.1654599 0.5730221 0.1967722 0.1081001 -1.781226 -1.534456 -0.8427393
[2,] 0.1654599 0.5730221 0.1967722 0.1081001 -1.781226 -1.534456 -0.8427393
         [,15]     [,16]      [,17]     [,18]     [,19]     [,20]     [,21]
[1,] 0.2602799 0.2107328 0.01577188 0.7035414 -0.577712 0.1295583 -0.205508
[2,] 0.2602799 0.2107328 0.01577188 0.7035414 -0.577712 0.1295583 -0.205508
          [,22]     [,23]    [,24]      [,25]     [,26]     [,27]     [,28]
[1,] -0.6620926 0.5926638 1.174452 -0.8608606 0.2453662 0.2747773 0.8695799
[2,] -0.6620926 0.5926638 1.174452 -0.8608606 0.2453662 0.2747773 0.8695799
         [,29]      [,30]     [,31]     [,32]     [,33]     [,34]      [,35]
[1,] 0.3448258 0.04311561 -1.036996 -2.099094 0.8682908 -1.765605 -0.9886898
[2,] 0.3448258 0.04311561 -1.036996 -2.099094 0.8682908 -1.765605 -0.9886898
          [,36]     [,37]     [,38]      [,39]     [,40]     [,41]      [,42]
[1,] -0.3291368 0.2796623 0.7434214 -0.1354216 -1.904038 0.3618283 -0.1431547
[2,] -0.3291368 0.2796623 0.7434214 -0.1354216 -1.904038 0.3618283 -0.1431547
          [,43]    [,44]    [,45]     [,46]      [,47]    [,48]     [,49]
[1,] -0.2521446 1.586447 1.533945 -2.049385 -0.5442667 1.549292 -0.739666
[2,] -0.2521446 1.586447 1.533945 -2.049385 -0.5442667 1.549292 -0.739666
         [,50]     [,51]      [,52]     [,53]    [,54]     [,55]       [,56]
[1,] 0.8934816 0.3227195 -0.6026925 0.3882811 1.752115 0.1814427 -0.02358513
[2,] 0.8934816 0.3227195 -0.6026925 0.3882811 1.752115 0.1814427 -0.02358513
          [,57]     [,58]     [,59]     [,60]    [,61]      [,62]      [,63]
[1,] -0.2330561 0.4057266 0.5792319 -1.042403 1.264415 -0.1670364 -0.2160011
[2,] -0.2330561 0.4057266 0.5792319 -1.042403 1.264415 -0.1670364 -0.2160011
        [,64]      [,65]    [,66]     [,67]      [,68]     [,69]    [,70]
[1,] 0.275605 -0.4237956 1.228127 -1.153171 -0.5491829 0.3189842 1.084632
[2,] 0.275605 -0.4237956 1.228127 -1.153171 -0.5491829 0.3189842 1.084632
         [,71]      [,72]     [,73]      [,74]    [,75]     [,76]     [,77]
[1,] 0.2812002 -0.1009387 0.8054387 -0.5741801 2.178666 -0.438744 0.4820136
[2,] 0.2812002 -0.1009387 0.8054387 -0.5741801 2.178666 -0.438744 0.4820136
           [,78]     [,79]     [,80]     [,81]    [,82]      [,83]     [,84]
[1,] -0.05488516 0.2379154 0.8861568 0.1330595 1.200769 -0.2938584 0.8730935
[2,] -0.05488516 0.2379154 0.8861568 0.1330595 1.200769 -0.2938584 0.8730935
         [,85]      [,86]      [,87]      [,88]     [,89]     [,90]      [,91]
[1,] 0.1092178 -0.8316143 0.06798765 -0.8525739 0.6915451 -1.200959 -0.3610845
[2,] 0.1092178 -0.8316143 0.06798765 -0.8525739 0.6915451 -1.200959 -0.3610845
         [,92]     [,93]     [,94]      [,95]     [,96]    [,97]      [,98]
[1,] -1.912805 0.5877202 -0.541554 -0.6847354 0.9585701 -0.40528 -0.7954438
[2,] -1.912805 0.5877202 -0.541554 -0.6847354 0.9585701 -0.40528 -0.7954438
          [,99]    [,100]
[1,] 0.08609208 0.4793016
[2,] 0.08609208 0.4793016
> 
> 
> Max(tmp2)
[1] 3.294584
> Min(tmp2)
[1] -2.479939
> mean(tmp2)
[1] -0.03044323
> Sum(tmp2)
[1] -3.044323
> Var(tmp2)
[1] 1.207685
> 
> rowMeans(tmp2)
  [1]  0.443532158  0.564409985  0.027610491  1.697239404  1.031265486
  [6] -0.210011687 -1.081482584  1.368032543 -1.599241044 -0.687324457
 [11]  0.890944792  0.180847091 -0.407176299 -0.703630013 -0.698104058
 [16]  0.037498960 -0.826614651 -0.537855269 -1.635267082  1.114251361
 [21] -1.043875256  0.528796112  0.605618000  3.294584147 -1.903533068
 [26] -1.127512723 -1.637951832  0.327333505  0.543746343 -1.659854877
 [31] -0.775582392 -0.512641193 -1.413651254  0.228750766  0.593037225
 [36]  0.724868492  0.001354165  0.137777456  0.545245145  0.409985541
 [41] -0.703684618 -0.513226182  0.057404437 -1.162520245  0.236041399
 [46]  1.924290701  1.867705655 -0.292987690 -0.041685183 -0.517255458
 [51]  1.625647566 -0.346356304  0.209610917  0.158884484  0.219016845
 [56]  2.076722119  2.622668199 -0.148573623  1.357214749 -1.375272356
 [61]  0.591549802 -1.583778935 -1.369779698 -2.479938724  2.173376337
 [66]  1.602392473  0.888830318 -0.317312075  0.817013988  0.165326796
 [71]  0.063768161 -1.285493573 -1.533350490  0.989752190  0.895155849
 [76]  0.069423225 -0.732644971 -2.469528891 -0.222421991  0.767432812
 [81] -0.108890992 -0.261692689  0.182734585  0.891357584 -0.405968629
 [86] -0.976592305  0.470656705 -0.046628457 -0.723549616 -1.608264218
 [91] -0.442911761 -0.290448164  0.262533032 -0.819190536  0.334147458
 [96] -0.403914189  2.157803073 -0.981654300  0.009106314 -1.401793442
> rowSums(tmp2)
  [1]  0.443532158  0.564409985  0.027610491  1.697239404  1.031265486
  [6] -0.210011687 -1.081482584  1.368032543 -1.599241044 -0.687324457
 [11]  0.890944792  0.180847091 -0.407176299 -0.703630013 -0.698104058
 [16]  0.037498960 -0.826614651 -0.537855269 -1.635267082  1.114251361
 [21] -1.043875256  0.528796112  0.605618000  3.294584147 -1.903533068
 [26] -1.127512723 -1.637951832  0.327333505  0.543746343 -1.659854877
 [31] -0.775582392 -0.512641193 -1.413651254  0.228750766  0.593037225
 [36]  0.724868492  0.001354165  0.137777456  0.545245145  0.409985541
 [41] -0.703684618 -0.513226182  0.057404437 -1.162520245  0.236041399
 [46]  1.924290701  1.867705655 -0.292987690 -0.041685183 -0.517255458
 [51]  1.625647566 -0.346356304  0.209610917  0.158884484  0.219016845
 [56]  2.076722119  2.622668199 -0.148573623  1.357214749 -1.375272356
 [61]  0.591549802 -1.583778935 -1.369779698 -2.479938724  2.173376337
 [66]  1.602392473  0.888830318 -0.317312075  0.817013988  0.165326796
 [71]  0.063768161 -1.285493573 -1.533350490  0.989752190  0.895155849
 [76]  0.069423225 -0.732644971 -2.469528891 -0.222421991  0.767432812
 [81] -0.108890992 -0.261692689  0.182734585  0.891357584 -0.405968629
 [86] -0.976592305  0.470656705 -0.046628457 -0.723549616 -1.608264218
 [91] -0.442911761 -0.290448164  0.262533032 -0.819190536  0.334147458
 [96] -0.403914189  2.157803073 -0.981654300  0.009106314 -1.401793442
> rowVars(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowSd(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowMax(tmp2)
  [1]  0.443532158  0.564409985  0.027610491  1.697239404  1.031265486
  [6] -0.210011687 -1.081482584  1.368032543 -1.599241044 -0.687324457
 [11]  0.890944792  0.180847091 -0.407176299 -0.703630013 -0.698104058
 [16]  0.037498960 -0.826614651 -0.537855269 -1.635267082  1.114251361
 [21] -1.043875256  0.528796112  0.605618000  3.294584147 -1.903533068
 [26] -1.127512723 -1.637951832  0.327333505  0.543746343 -1.659854877
 [31] -0.775582392 -0.512641193 -1.413651254  0.228750766  0.593037225
 [36]  0.724868492  0.001354165  0.137777456  0.545245145  0.409985541
 [41] -0.703684618 -0.513226182  0.057404437 -1.162520245  0.236041399
 [46]  1.924290701  1.867705655 -0.292987690 -0.041685183 -0.517255458
 [51]  1.625647566 -0.346356304  0.209610917  0.158884484  0.219016845
 [56]  2.076722119  2.622668199 -0.148573623  1.357214749 -1.375272356
 [61]  0.591549802 -1.583778935 -1.369779698 -2.479938724  2.173376337
 [66]  1.602392473  0.888830318 -0.317312075  0.817013988  0.165326796
 [71]  0.063768161 -1.285493573 -1.533350490  0.989752190  0.895155849
 [76]  0.069423225 -0.732644971 -2.469528891 -0.222421991  0.767432812
 [81] -0.108890992 -0.261692689  0.182734585  0.891357584 -0.405968629
 [86] -0.976592305  0.470656705 -0.046628457 -0.723549616 -1.608264218
 [91] -0.442911761 -0.290448164  0.262533032 -0.819190536  0.334147458
 [96] -0.403914189  2.157803073 -0.981654300  0.009106314 -1.401793442
> rowMin(tmp2)
  [1]  0.443532158  0.564409985  0.027610491  1.697239404  1.031265486
  [6] -0.210011687 -1.081482584  1.368032543 -1.599241044 -0.687324457
 [11]  0.890944792  0.180847091 -0.407176299 -0.703630013 -0.698104058
 [16]  0.037498960 -0.826614651 -0.537855269 -1.635267082  1.114251361
 [21] -1.043875256  0.528796112  0.605618000  3.294584147 -1.903533068
 [26] -1.127512723 -1.637951832  0.327333505  0.543746343 -1.659854877
 [31] -0.775582392 -0.512641193 -1.413651254  0.228750766  0.593037225
 [36]  0.724868492  0.001354165  0.137777456  0.545245145  0.409985541
 [41] -0.703684618 -0.513226182  0.057404437 -1.162520245  0.236041399
 [46]  1.924290701  1.867705655 -0.292987690 -0.041685183 -0.517255458
 [51]  1.625647566 -0.346356304  0.209610917  0.158884484  0.219016845
 [56]  2.076722119  2.622668199 -0.148573623  1.357214749 -1.375272356
 [61]  0.591549802 -1.583778935 -1.369779698 -2.479938724  2.173376337
 [66]  1.602392473  0.888830318 -0.317312075  0.817013988  0.165326796
 [71]  0.063768161 -1.285493573 -1.533350490  0.989752190  0.895155849
 [76]  0.069423225 -0.732644971 -2.469528891 -0.222421991  0.767432812
 [81] -0.108890992 -0.261692689  0.182734585  0.891357584 -0.405968629
 [86] -0.976592305  0.470656705 -0.046628457 -0.723549616 -1.608264218
 [91] -0.442911761 -0.290448164  0.262533032 -0.819190536  0.334147458
 [96] -0.403914189  2.157803073 -0.981654300  0.009106314 -1.401793442
> 
> colMeans(tmp2)
[1] -0.03044323
> colSums(tmp2)
[1] -3.044323
> colVars(tmp2)
[1] 1.207685
> colSd(tmp2)
[1] 1.098947
> colMax(tmp2)
[1] 3.294584
> colMin(tmp2)
[1] -2.479939
> colMedians(tmp2)
[1] 0.00523024
> colRanges(tmp2)
          [,1]
[1,] -2.479939
[2,]  3.294584
> 
> dataset1 <- matrix(dataset1,1,100)
> 
> agree.checks(tmp,dataset1)
> 
> dataset2 <- matrix(dataset2,100,1)
> agree.checks(tmp2,dataset2)
>   
> 
> tmp <- createBufferedMatrix(10,10)
> 
> tmp[1:10,1:10] <- rnorm(100)
> colApply(tmp,sum)
 [1]  0.5829849  2.2562281  3.1493472 -1.3208793 -3.5129543  4.5542806
 [7]  5.5112432 -2.1396987  3.3090442  0.9936656
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.1410692
[2,] -0.3635156
[3,]  0.3566815
[4,]  0.4579558
[5,]  0.8198380
> 
> rowApply(tmp,sum)
 [1]  3.2329646  3.5984138 -0.4254712 -3.6220849 -3.4977577  1.5361444
 [7]  5.2887458 -0.9361878  5.0116817  3.1968129
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    5    2    6    7    6    2    6    4    7     6
 [2,]    9    9    9    3    2    3   10    3    4     5
 [3,]    4    3    7    1    5    7    9   10    8    10
 [4,]    1    6    8    5   10    1    4    1   10     3
 [5,]    7    7    1    4    7    5    2    6    3     2
 [6,]    6    5   10    9    8    6    3    7    2     8
 [7,]   10    1    5    8    4   10    8    5    6     1
 [8,]    3   10    2    2    9    9    7    2    1     4
 [9,]    8    4    3   10    1    4    5    9    5     9
[10,]    2    8    4    6    3    8    1    8    9     7
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1] -4.64144731 -1.15897945 -1.69598427  1.13158210  2.89063576  0.93188557
 [7]  1.08553397  0.62681921 -0.61906670 -0.65860954 -2.02731450 -0.03024681
[13]  3.52075307  3.71430054 -0.76248074  5.14267206 -0.94947814 -1.76110482
[19] -1.54608519 -3.54576882
> colApply(tmp,quantile)[,1]
            [,1]
[1,] -2.03896865
[2,] -1.49549172
[3,] -1.40673880
[4,] -0.07676733
[5,]  0.37651919
> 
> rowApply(tmp,sum)
[1] -1.9025379  2.1299373 -1.4561732  0.3692263  0.5071636
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   13    9    1    1    2
[2,]    4    4    9   16   12
[3,]    5    6    6    7   17
[4,]    7    3   11   14   20
[5,]   16   19   20   15    3
> 
> 
> as.matrix(tmp)
            [,1]       [,2]       [,3]        [,4]       [,5]       [,6]
[1,]  0.37651919 -1.2135697 -1.1722469 -0.82278744  1.0320149 -0.2070896
[2,] -0.07676733 -0.6774453 -0.4360780 -0.83645187  1.0463338  0.4904281
[3,] -1.49549172 -0.1865537 -0.6980690 -0.02672689  1.5106147 -0.4896120
[4,] -2.03896865  0.7258784 -0.4547475  0.57635842  0.6747832  0.2267382
[5,] -1.40673880  0.1927109  1.0651572  2.24118988 -1.3731109  0.9114209
           [,7]        [,8]        [,9]      [,10]      [,11]       [,12]
[1,] -1.2874622 -0.28184667 -0.06894593  1.1065850 -1.6198800  1.56930339
[2,]  0.3801791 -0.45228049 -0.03892764  0.4358045 -0.2687853  0.11497626
[3,]  1.1169246  0.64308986  0.61581903  0.5216908  0.3796381 -0.09635393
[4,]  1.0796480 -0.08209227 -0.87224851 -1.2227600  0.4360463 -0.90288048
[5,] -0.2037554  0.79994878 -0.25476366 -1.4999299 -0.9543336 -0.71529206
         [,13]      [,14]       [,15]     [,16]      [,17]      [,18]
[1,] 0.3799670  1.3348088 -0.15786483 0.9834133  1.3796312 -0.6662252
[2,] 0.6856440  0.7869825  0.70261286 0.7812315 -0.2190687 -1.2961407
[3,] 0.1318368 -0.6784788 -1.04689489 1.0240638 -1.2803640 -0.7061248
[4,] 0.8776789  2.0476453 -0.06050501 0.2647434  0.3139047  1.4191839
[5,] 1.4456264  0.2233427 -0.19982887 2.0892201 -1.1435814 -0.5117981
          [,19]      [,20]
[1,] -1.0438815 -1.5229807
[2,]  2.0373063 -1.0296163
[3,] -1.4740291  0.7788479
[4,] -0.6538013 -1.9853787
[5,] -0.4116796  0.2133589
> 
> 
> 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.21-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  800  bytes.
> 
> 
> 
> subBufferedMatrix(tmp,1:5,1:5)
BufferedMatrix object
Matrix size:  5 5 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  652  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.21-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.21-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  480  bytes.
> 
> 
> rm(tmp)
> 
> 
> ###
> ### Testing colnames and rownames
> ###
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> 
> 
> colnames(tmp)
NULL
> rownames(tmp)
NULL
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> colnames(tmp)
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"
> rownames(tmp)
[1] "row1" "row2" "row3" "row4" "row5"
> 
> 
> tmp["row1",]
          col1        col2       col3       col4      col5       col6      col7
row1 -1.800605 -0.04231536 -0.9133605 -0.1736808 0.3097549 -0.9625367 -1.175631
           col8     col9      col10     col11    col12     col13    col14
row1 -0.4193157 0.391823 0.03804803 -1.116507 1.324246 0.4183033 0.212143
        col15      col16      col17      col18      col19     col20
row1 -1.49689 -0.5308622 -0.6603987 -0.3893979 -0.4448098 0.1710198
> tmp[,"col10"]
           col10
row1  0.03804803
row2 -0.10392910
row3  0.11857269
row4  0.68681004
row5 -0.09353124
> tmp[c("row1","row5"),]
           col1        col2       col3       col4      col5       col6
row1 -1.8006049 -0.04231536 -0.9133605 -0.1736808 0.3097549 -0.9625367
row5  0.6156014  1.02386090 -1.2717363  1.8800783 0.4006827 -0.9492979
          col7       col8     col9       col10      col11     col12      col13
row1 -1.175631 -0.4193157 0.391823  0.03804803 -1.1165069 1.3242455 0.41830330
row5  0.978672  1.6581101 0.447192 -0.09353124 -0.5016924 0.6188846 0.08616556
        col14      col15      col16      col17      col18      col19     col20
row1 0.212143 -1.4968896 -0.5308622 -0.6603987 -0.3893979 -0.4448098 0.1710198
row5 1.129231 -0.6349809  1.5811507 -0.7639146 -0.4762903 -1.1195961 0.8969751
> tmp[,c("col6","col20")]
            col6      col20
row1 -0.96253672  0.1710198
row2  0.99335197 -1.0235804
row3 -1.44618917  2.7157537
row4 -0.04358788 -1.0130309
row5 -0.94929790  0.8969751
> tmp[c("row1","row5"),c("col6","col20")]
           col6     col20
row1 -0.9625367 0.1710198
row5 -0.9492979 0.8969751
> 
> 
> 
> 
> tmp["row1",] <- rnorm(20,mean=10)
> tmp[,"col10"] <- rnorm(5,mean=30)
> tmp[c("row1","row5"),] <- rnorm(40,mean=50)
> tmp[,c("col6","col20")] <- rnorm(10,mean=75)
> tmp[c("row1","row5"),c("col6","col20")]  <- rnorm(4,mean=105)
> 
> tmp["row1",]
         col1     col2     col3     col4     col5     col6    col7     col8
row1 50.62479 49.15526 49.39846 50.35642 49.43609 104.2273 50.0241 51.64468
        col9    col10    col11    col12    col13    col14    col15    col16
row1 50.3609 49.02213 48.71953 48.49696 49.68421 50.59675 47.95633 50.80433
        col17   col18    col19    col20
row1 49.04715 48.5686 48.93336 102.9855
> tmp[,"col10"]
        col10
row1 49.02213
row2 31.85264
row3 29.14521
row4 31.06794
row5 50.85064
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 50.62479 49.15526 49.39846 50.35642 49.43609 104.2273 50.02410 51.64468
row5 49.43694 49.44805 49.16846 49.15225 50.68486 104.9758 50.64032 49.67869
         col9    col10    col11    col12    col13    col14    col15    col16
row1 50.36090 49.02213 48.71953 48.49696 49.68421 50.59675 47.95633 50.80433
row5 49.60942 50.85064 49.36215 49.80788 50.61449 49.00467 49.32216 49.28840
        col17    col18    col19    col20
row1 49.04715 48.56860 48.93336 102.9855
row5 50.40940 48.50642 49.60321 105.3137
> tmp[,c("col6","col20")]
          col6     col20
row1 104.22731 102.98549
row2  73.96369  75.76178
row3  74.60252  74.32849
row4  73.38415  73.47180
row5 104.97583 105.31367
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 104.2273 102.9855
row5 104.9758 105.3137
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 104.2273 102.9855
row5 104.9758 105.3137
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,]  0.1522282
[2,] -0.1626864
[3,]  1.1522438
[4,]  0.7979575
[5,]  0.6942896
> tmp[,c("col17","col7")]
          col17       col7
[1,]  0.6091525  1.1893453
[2,] -0.7089254  0.1149035
[3,]  0.9711246 -1.0758801
[4,] -0.8099462 -0.7664378
[5,] -0.7066731  1.9121988
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6      col20
[1,]  0.8454829 -0.3696009
[2,] -0.1169377  0.6839246
[3,] -0.2094740 -0.9096636
[4,]  0.6555435  0.6860671
[5,] -1.5539775 -0.2876842
> subBufferedMatrix(tmp,1,c("col6"))[,1]
          col1
[1,] 0.8454829
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,]  0.8454829
[2,] -0.1169377
> 
> 
> 
> 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 -1.1617028 -1.018979449  1.1330607 -1.0068480 -0.09424234 -1.019264
row1 -0.1762983 -0.008016456 -0.1408913 -0.9350065  0.92635083 -1.195637
             [,7]        [,8]       [,9]      [,10]       [,11]      [,12]
row3 -1.103748061 -0.01132365 -0.9568491 -1.0782207  0.01027674 -0.3048244
row1  0.002535883 -1.73133806 -1.2720585 -0.3567968 -0.30340038 -1.2188742
         [,13]      [,14]      [,15]      [,16]      [,17]       [,18]
row3 0.1058452 -0.7853425 -0.1009585 -0.3425564 -0.1461619 -0.08714025
row1 0.4840296 -2.6319934 -0.6708420 -0.8482340 -0.8618292  0.03382070
          [,19]      [,20]
row3 -1.7105779 -0.2396672
row1  0.1967489  0.2810343
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
           [,1]        [,2]    [,3]      [,4]       [,5]       [,6]      [,7]
row2 -0.9692918 -0.09603053 1.65676 -1.159746 -0.4288515 -0.2899652 0.8067488
           [,8]     [,9]      [,10]
row2 -0.3592836 1.044431 -0.8995034
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
          [,1]      [,2]      [,3]      [,4]     [,5]       [,6]     [,7]
row5 -1.329189 0.7386501 -1.547354 0.7610348 -1.62183 -0.5293277 0.197466
           [,8]      [,9]      [,10]     [,11]      [,12]     [,13]      [,14]
row5 -0.6839152 0.4547396 -0.3201649 0.4826546 -0.8699325 0.3486154 -0.7315235
          [,15]      [,16]    [,17]    [,18]    [,19]      [,20]
row5 -0.5407223 -0.1086289 1.056208 2.457398 2.830191 -0.8947691
> 
> 
> 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: 0x5e623e10e5d0>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e12502c13"
 [2] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e37b543ae"
 [3] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e1a91c8b9"
 [4] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e4c22f014"
 [5] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e3b6be699"
 [6] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e12722aca"
 [7] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e5eaf9bf9"
 [8] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e1bde5705"
 [9] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e73916a82"
[10] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e5c470788"
[11] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e7804a331"
[12] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e29c82f7e"
[13] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e6f97a815"
[14] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e3c34e394"
[15] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1dfe7e74ffc485"
> 
> 
> ### 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: 0x5e623dd7de10>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x5e623dd7de10>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x5e623dd7de10>
> rowMedians(tmp)
  [1]  0.3394805169  0.0218873683 -0.0479955495 -0.1721158374 -0.2931076517
  [6]  0.2130394639  0.0204855863  0.5717936886  0.2968500479  0.1749007136
 [11]  0.2904344236 -0.8584258171 -0.0491539585 -0.0807747737 -0.0440244989
 [16] -0.0022149709  0.3592588438 -0.3333641305 -0.5693225435  0.4792621004
 [21] -0.1423853914 -0.2729966996 -0.3682259632  0.6583958125 -0.1287448317
 [26] -0.0300343025 -0.3992469288 -0.3033944522 -0.4548519693  0.3182789445
 [31]  0.0333961244 -0.4799667656 -0.3047689089 -0.0499023319  0.1201914104
 [36] -0.0027031200  0.1999334292 -0.1984655792 -0.4677630675  0.0319751700
 [41] -0.2771117505  0.1072047777 -0.3735990955  0.0029534881  0.2697633472
 [46] -0.3316900453 -0.4808151572 -0.0550560951 -0.4764223580 -0.6560453127
 [51]  0.2620617716  0.2455497531 -0.3716388201 -0.2567296040  0.1658683937
 [56]  0.1841631862  0.1874931402  0.1517322202 -0.2607498590 -0.1415264292
 [61]  0.0620614671 -0.1949968177 -0.3805634958 -0.1605882481 -0.3471051320
 [66]  0.1464832920  0.3185318028 -0.2961376764  0.2798439609 -0.2793978401
 [71] -0.5412092897 -0.1573850940  0.1940670348  0.3412490715  0.3521357480
 [76]  0.5443500800  0.0338187334  0.3424669136  0.6939469584 -0.0228314508
 [81]  0.1556383869  0.1539345866  0.2656526025 -0.2250571941 -0.3220268565
 [86] -0.0866684715  0.1745999820  0.0414650545 -0.2694555474 -0.1364695329
 [91]  0.2895984946 -0.2522266223 -0.6702153417  0.3340960681  0.2529613821
 [96]  0.1081455104  0.5140739428  0.2669941694  0.3627761274  0.1691425668
[101]  0.6345212823 -0.4855892545 -0.3605473877  0.1138192412 -0.1355351684
[106]  0.6384100808  0.1272295062  0.2740870340  0.2738525298  0.4463313946
[111] -0.3865915580 -0.0269245120 -0.1149988245  0.3971502444 -0.0116062386
[116]  0.2080319100  0.2317685118  0.2010774781 -0.0377591143  0.0907951374
[121] -0.4339622595 -0.0639226728  0.4079831519 -0.1377459712 -0.0335966787
[126]  0.1094523423 -0.0449812620 -0.0280648748  0.5333521129 -0.2014924407
[131] -0.2037346563  0.0677334397  0.3375244264 -0.3717472420  0.0007657528
[136]  0.2390679628  0.3429580659  0.3779482279  0.0081960430  0.3629381014
[141]  0.2233702942 -0.4211145236  0.0473887377  0.1014059191 -0.2132628900
[146]  0.1847949364 -0.5629759230  0.0432202289  0.2864338847  0.1458968236
[151] -0.1192312182  0.0616162905 -0.0763635890  0.5042977284  0.1261258261
[156] -0.5405995374  0.3440093551  0.3534475096  0.3189783726 -0.1551039105
[161]  0.0790509786  0.0163160425 -0.3582421899  0.3806771891 -0.2575320944
[166] -0.7426897077  0.1978028301 -0.3936683484  0.1861698717  0.0564168277
[171]  0.1555666998 -0.3571950001  0.0475410873  0.2925842613  0.1429381231
[176] -0.2544623480  0.0304083784 -0.2343163548  0.7484034957  0.1445429322
[181] -0.8785870836 -0.0028915606 -0.4473055576 -0.0809831461 -0.0886088335
[186] -0.3043175302 -0.3522562991 -0.1698984465 -0.0160567682 -0.4274052621
[191] -0.1544621270 -0.1361458156  0.6111838301  0.3110077579  0.1442541864
[196]  0.1529470839  0.2875484400 -0.3373796600  0.1411757656 -0.5542007478
[201] -0.0818751719 -0.1247319809 -0.3180250952 -0.3775094945  0.1534957363
[206]  0.1903596486  0.0839966681  0.4281742295  0.1627499275  0.3970809085
[211] -0.0618409023 -0.4282606116  0.1353904391 -0.1840262846  0.0030467061
[216] -0.3447298260 -0.1675031287  0.4348955691  0.0017465603  0.1349035763
[221] -0.2171829733  0.1658992986  0.0145300345  0.2626553039 -0.4521248022
[226]  0.2726870927 -0.1380239691 -0.0858283686 -0.3351856756 -0.1774934076
> 
> proc.time()
   user  system elapsed 
  1.348   1.467   2.802 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout

R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences"
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: 0x5895a2986640>
> .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: 0x5895a2986640>
> .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: 0x5895a2986640>
> .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: 0x5895a2986640>
> 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: 0x5895a3227420>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5895a3227420>
> .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: 0x5895a3227420>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5895a3227420>
> .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: 0x5895a3227420>
> 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: 0x5895a1d11c30>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5895a1d11c30>
> .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: 0x5895a1d11c30>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x5895a1d11c30>
> .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: 0x5895a1d11c30>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x5895a1d11c30>
> .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: 0x5895a1d11c30>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x5895a1d11c30>
> .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: 0x5895a1d11c30>
> 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: 0x5895a1c15090>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x5895a1c15090>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5895a1c15090>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5895a1c15090>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile1dff061bf18ee3" "BufferedMatrixFile1dff0667ef7ce9"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile1dff061bf18ee3" "BufferedMatrixFile1dff0667ef7ce9"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x5895a3e58400>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5895a3e58400>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x5895a3e58400>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x5895a3e58400>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x5895a3e58400>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x5895a3e58400>
> .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: 0x5895a42c5c80>
> .Call("R_bm_AddColumn",P)
<pointer: 0x5895a42c5c80>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x5895a42c5c80>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x5895a42c5c80>
> 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: 0x5895a430ff80>
> .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: 0x5895a430ff80>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.242   0.059   0.289 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout

R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences"
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.253   0.046   0.284 

Example timings