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

This page was generated on 2025-03-20 12:06 -0400 (Thu, 20 Mar 2025).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 24.04.1 LTS)x86_644.4.3 (2025-02-28) -- "Trophy Case" 4756
palomino8Windows Server 2022 Datacenterx644.4.3 (2025-02-28 ucrt) -- "Trophy Case" 4487
merida1macOS 12.7.5 Montereyx86_644.4.3 (2025-02-28) -- "Trophy Case" 4514
kjohnson1macOS 13.6.6 Venturaarm644.4.3 (2025-02-28) -- "Trophy Case" 4441
taishanLinux (openEuler 24.03 LTS)aarch644.4.3 (2025-02-28) -- "Trophy Case" 4406
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 251/2289HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.70.0  (landing page)
Ben Bolstad
Snapshot Date: 2025-03-17 13:00 -0400 (Mon, 17 Mar 2025)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: RELEASE_3_20
git_last_commit: 32b6f6a
git_last_commit_date: 2024-10-29 09:27:20 -0400 (Tue, 29 Oct 2024)
nebbiolo2Linux (Ubuntu 24.04.1 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
palomino8Windows Server 2022 Datacenter / x64  OK    OK    OK    OK  UNNEEDED, same version is already published
merida1macOS 12.7.5 Monterey / x86_64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
kjohnson1macOS 13.6.6 Ventura / arm64  OK    OK    WARNINGS    OK  UNNEEDED, same version is already published
taishanLinux (openEuler 24.03 LTS) / aarch64  OK    OK    OK  


CHECK results for BufferedMatrix on palomino8

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.70.0
Command: F:\biocbuild\bbs-3.20-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.20-bioc\R\library --no-vignettes --timings BufferedMatrix_1.70.0.tar.gz
StartedAt: 2025-03-17 23:28:46 -0400 (Mon, 17 Mar 2025)
EndedAt: 2025-03-17 23:31:24 -0400 (Mon, 17 Mar 2025)
EllapsedTime: 157.9 seconds
RetCode: 0
Status:   OK  
CheckDir: BufferedMatrix.Rcheck
Warnings: 0

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   F:\biocbuild\bbs-3.20-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=F:\biocbuild\bbs-3.20-bioc\R\library --no-vignettes --timings BufferedMatrix_1.70.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory 'F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck'
* using R version 4.4.3 (2025-02-28 ucrt)
* using platform: x86_64-w64-mingw32
* R was compiled by
    gcc.exe (GCC) 13.3.0
    GNU Fortran (GCC) 13.3.0
* running under: Windows Server 2022 x64 (build 20348)
* using session charset: UTF-8
* using option '--no-vignettes'
* checking for file 'BufferedMatrix/DESCRIPTION' ... OK
* this is package 'BufferedMatrix' version '1.70.0'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'BufferedMatrix' can be installed ... OK
* used C compiler: 'gcc.exe (GCC) 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 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 for x64 is not available
File 'F:/biocbuild/bbs-3.20-bioc/R/library/BufferedMatrix/libs/x64/BufferedMatrix.dll':
  Found '_exit', possibly from '_exit' (C)
  Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs nor [v]sprintf. The detected symbols are linked into
the code but might come from libraries and not actually be called.

See 'Writing portable packages' in the 'Writing R Extensions' manual.
* checking sizes of PDF files under 'inst/doc' ... OK
* checking files in 'vignettes' ... OK
* checking examples ... NONE
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
  Running 'Rcodetesting.R'
  Running 'c_code_level_tests.R'
  Running 'objectTesting.R'
  Running 'rawCalltesting.R'
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE

Status: 2 NOTEs
See
  'F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/00check.log'
for details.


Installation output

BufferedMatrix.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   F:\biocbuild\bbs-3.20-bioc\R\bin\R.exe CMD INSTALL BufferedMatrix
###
##############################################################################
##############################################################################


* installing to library 'F:/biocbuild/bbs-3.20-bioc/R/library'
* installing *source* package 'BufferedMatrix' ...
** using staged installation
** libs
using C compiler: 'gcc.exe (GCC) 13.3.0'
gcc  -I"F:/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG     -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c RBufferedMatrix.c -o RBufferedMatrix.o
gcc  -I"F:/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG     -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o
doubleBufferedMatrix.c: In function 'dbm_ReadOnlyMode':
doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses]
 1580 |   if (!(Matrix->readonly) & setting){
      |       ^~~~~~~~~~~~~~~~~~~
doubleBufferedMatrix.c: At top level:
doubleBufferedMatrix.c:3327:12: warning: 'sort_double' defined but not used [-Wunused-function]
 3327 | static int sort_double(const double *a1,const double *a2){
      |            ^~~~~~~~~~~
gcc  -I"F:/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG     -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o
gcc  -I"F:/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG     -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c init_package.c -o init_package.o
gcc -shared -s -static-libgcc -o BufferedMatrix.dll tmp.def RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -LC:/rtools44/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools44/x86_64-w64-mingw32.static.posix/lib -LF:/biocbuild/bbs-3.20-bioc/R/bin/x64 -lR
installing to F:/biocbuild/bbs-3.20-bioc/R/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs/x64
** 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
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (BufferedMatrix)

Tests output

BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout


R version 4.4.3 (2025-02-28 ucrt) -- "Trophy Case"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64

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.28    0.20    0.98 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R version 4.4.3 (2025-02-28 ucrt) -- "Trophy Case"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64

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] "F:/biocbuild/bbs-3.20-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 467958 25.0    1020317 54.5   633411 33.9
Vcells 853502  6.6    8388608 64.0  2003112 15.3
> 
> 
> 
> 
> ##
> ## 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] "Mon Mar 17 23:29:18 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] "Mon Mar 17 23:29:19 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: 0x0000022b4ecff650>
> 
> 
> 
> 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] "Mon Mar 17 23:29:45 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] "Mon Mar 17 23:29:53 2025"
> 
> ColMode(tmp2)
<pointer: 0x0000022b4ecff650>
> 
> 
> 
> ### 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.8907285 -0.6527934  0.1403837 0.18265539
[2,]  0.5715286 -0.7499837 -1.1364350 0.71462639
[3,] -0.2874517 -2.0015868 -1.1547443 1.71566880
[4,]  2.0847808 -0.7040841 -0.2492610 0.06733288
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
           [,1]      [,2]      [,3]       [,4]
[1,] 99.8907285 0.6527934 0.1403837 0.18265539
[2,]  0.5715286 0.7499837 1.1364350 0.71462639
[3,]  0.2874517 2.0015868 1.1547443 1.71566880
[4,]  2.0847808 0.7040841 0.2492610 0.06733288
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]      [,2]      [,3]      [,4]
[1,] 9.9945349 0.8079563 0.3746782 0.4273820
[2,] 0.7559951 0.8660160 1.0660370 0.8453558
[3,] 0.5361452 1.4147745 1.0745903 1.3098354
[4,] 1.4438770 0.8390972 0.4992604 0.2594858
> 
> 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:    F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 224.83608 33.73236 28.88717 29.45648
[2,]  33.13148 34.41014 36.79681 34.16818
[3,]  30.64890 41.14933 36.90065 39.81402
[4,]  41.52355 34.09506 30.24187 27.66219
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x0000022b4ecff950>
> exp(tmp5)
<pointer: 0x0000022b4ecff950>
> log(tmp5,2)
<pointer: 0x0000022b4ecff950>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 467.9668
> Min(tmp5)
[1] 54.20329
> mean(tmp5)
[1] 73.2088
> Sum(tmp5)
[1] 14641.76
> Var(tmp5)
[1] 860.9564
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 90.81604 72.56589 70.66426 69.87782 71.92764 68.13594 72.12188 72.45184
 [9] 71.84653 71.68018
> rowSums(tmp5)
 [1] 1816.321 1451.318 1413.285 1397.556 1438.553 1362.719 1442.438 1449.037
 [9] 1436.931 1433.604
> rowVars(tmp5)
 [1] 7959.88080   62.21160   69.60202   93.51094  117.00485   76.30474
 [7]   32.19247   84.75474   77.28878   64.29678
> rowSd(tmp5)
 [1] 89.218164  7.887433  8.342783  9.670105 10.816878  8.735258  5.673841
 [8]  9.206234  8.791404  8.018528
> rowMax(tmp5)
 [1] 467.96684  85.51534  85.64694  89.67290  95.71571  84.17051  82.39542
 [8]  96.41368  93.76040  84.39151
> rowMin(tmp5)
 [1] 55.64423 55.70372 55.05072 56.30307 56.25948 54.20329 62.22769 56.32907
 [9] 58.78897 56.30942
> 
> colMeans(tmp5)
 [1] 108.39386  72.58416  71.77707  69.24347  69.97089  73.52019  73.01035
 [8]  72.84366  71.74134  74.15003  74.87753  69.50909  67.36146  67.79306
[15]  68.61677  70.15437  71.74038  72.01222  74.90660  69.96953
> colSums(tmp5)
 [1] 1083.9386  725.8416  717.7707  692.4347  699.7089  735.2019  730.1035
 [8]  728.4366  717.4134  741.5003  748.7753  695.0909  673.6146  677.9306
[15]  686.1677  701.5437  717.4038  720.1222  749.0660  699.6953
> colVars(tmp5)
 [1] 16035.33523    56.24696    39.94540    56.63224    21.62176    62.69613
 [7]    55.32426    25.45773    89.83799    67.65427   124.54390    89.41580
[13]    95.06740   150.45595    85.51533   129.01398    67.41123    83.41237
[19]    71.22639    77.31051
> colSd(tmp5)
 [1] 126.630704   7.499797   6.320237   7.525439   4.649921   7.918089
 [7]   7.438028   5.045566   9.478290   8.225221  11.159924   9.455993
[13]   9.750251  12.266049   9.247450  11.358432   8.210434   9.133038
[19]   8.439573   8.792640
> colMax(tmp5)
 [1] 467.96684  85.64694  80.10272  82.86767  76.99673  84.96179  83.03134
 [8]  79.58308  84.17051  85.78225  93.76040  84.99049  83.39441  96.41368
[15]  84.13985  95.71571  85.51534  90.26297  83.81734  81.65806
> colMin(tmp5)
 [1] 56.30942 57.86496 60.12485 57.57523 63.28187 61.18678 59.56564 63.25878
 [9] 55.05072 61.98304 56.32907 54.20329 55.21211 55.64423 57.43408 57.67611
[17] 61.61017 58.68131 56.30307 56.87305
> 
> 
> ### 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]       NA 72.56589 70.66426 69.87782 71.92764 68.13594 72.12188 72.45184
 [9] 71.84653 71.68018
> rowSums(tmp5)
 [1]       NA 1451.318 1413.285 1397.556 1438.553 1362.719 1442.438 1449.037
 [9] 1436.931 1433.604
> rowVars(tmp5)
 [1] 8398.23330   62.21160   69.60202   93.51094  117.00485   76.30474
 [7]   32.19247   84.75474   77.28878   64.29678
> rowSd(tmp5)
 [1] 91.641875  7.887433  8.342783  9.670105 10.816878  8.735258  5.673841
 [8]  9.206234  8.791404  8.018528
> rowMax(tmp5)
 [1]       NA 85.51534 85.64694 89.67290 95.71571 84.17051 82.39542 96.41368
 [9] 93.76040 84.39151
> rowMin(tmp5)
 [1]       NA 55.70372 55.05072 56.30307 56.25948 54.20329 62.22769 56.32907
 [9] 58.78897 56.30942
> 
> colMeans(tmp5)
 [1] 108.39386  72.58416  71.77707  69.24347  69.97089  73.52019  73.01035
 [8]  72.84366        NA  74.15003  74.87753  69.50909  67.36146  67.79306
[15]  68.61677  70.15437  71.74038  72.01222  74.90660  69.96953
> colSums(tmp5)
 [1] 1083.9386  725.8416  717.7707  692.4347  699.7089  735.2019  730.1035
 [8]  728.4366        NA  741.5003  748.7753  695.0909  673.6146  677.9306
[15]  686.1677  701.5437  717.4038  720.1222  749.0660  699.6953
> colVars(tmp5)
 [1] 16035.33523    56.24696    39.94540    56.63224    21.62176    62.69613
 [7]    55.32426    25.45773          NA    67.65427   124.54390    89.41580
[13]    95.06740   150.45595    85.51533   129.01398    67.41123    83.41237
[19]    71.22639    77.31051
> colSd(tmp5)
 [1] 126.630704   7.499797   6.320237   7.525439   4.649921   7.918089
 [7]   7.438028   5.045566         NA   8.225221  11.159924   9.455993
[13]   9.750251  12.266049   9.247450  11.358432   8.210434   9.133038
[19]   8.439573   8.792640
> colMax(tmp5)
 [1] 467.96684  85.64694  80.10272  82.86767  76.99673  84.96179  83.03134
 [8]  79.58308        NA  85.78225  93.76040  84.99049  83.39441  96.41368
[15]  84.13985  95.71571  85.51534  90.26297  83.81734  81.65806
> colMin(tmp5)
 [1] 56.30942 57.86496 60.12485 57.57523 63.28187 61.18678 59.56564 63.25878
 [9]       NA 61.98304 56.32907 54.20329 55.21211 55.64423 57.43408 57.67611
[17] 61.61017 58.68131 56.30307 56.87305
> 
> Max(tmp5,na.rm=TRUE)
[1] 467.9668
> Min(tmp5,na.rm=TRUE)
[1] 54.20329
> mean(tmp5,na.rm=TRUE)
[1] 73.16116
> Sum(tmp5,na.rm=TRUE)
[1] 14559.07
> Var(tmp5,na.rm=TRUE)
[1] 864.8485
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 91.24381 72.56589 70.66426 69.87782 71.92764 68.13594 72.12188 72.45184
 [9] 71.84653 71.68018
> rowSums(tmp5,na.rm=TRUE)
 [1] 1733.632 1451.318 1413.285 1397.556 1438.553 1362.719 1442.438 1449.037
 [9] 1436.931 1433.604
> rowVars(tmp5,na.rm=TRUE)
 [1] 8398.23330   62.21160   69.60202   93.51094  117.00485   76.30474
 [7]   32.19247   84.75474   77.28878   64.29678
> rowSd(tmp5,na.rm=TRUE)
 [1] 91.641875  7.887433  8.342783  9.670105 10.816878  8.735258  5.673841
 [8]  9.206234  8.791404  8.018528
> rowMax(tmp5,na.rm=TRUE)
 [1] 467.96684  85.51534  85.64694  89.67290  95.71571  84.17051  82.39542
 [8]  96.41368  93.76040  84.39151
> rowMin(tmp5,na.rm=TRUE)
 [1] 55.64423 55.70372 55.05072 56.30307 56.25948 54.20329 62.22769 56.32907
 [9] 58.78897 56.30942
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 108.39386  72.58416  71.77707  69.24347  69.97089  73.52019  73.01035
 [8]  72.84366  70.52500  74.15003  74.87753  69.50909  67.36146  67.79306
[15]  68.61677  70.15437  71.74038  72.01222  74.90660  69.96953
> colSums(tmp5,na.rm=TRUE)
 [1] 1083.9386  725.8416  717.7707  692.4347  699.7089  735.2019  730.1035
 [8]  728.4366  634.7250  741.5003  748.7753  695.0909  673.6146  677.9306
[15]  686.1677  701.5437  717.4038  720.1222  749.0660  699.6953
> colVars(tmp5,na.rm=TRUE)
 [1] 16035.33523    56.24696    39.94540    56.63224    21.62176    62.69613
 [7]    55.32426    25.45773    84.42365    67.65427   124.54390    89.41580
[13]    95.06740   150.45595    85.51533   129.01398    67.41123    83.41237
[19]    71.22639    77.31051
> colSd(tmp5,na.rm=TRUE)
 [1] 126.630704   7.499797   6.320237   7.525439   4.649921   7.918089
 [7]   7.438028   5.045566   9.188235   8.225221  11.159924   9.455993
[13]   9.750251  12.266049   9.247450  11.358432   8.210434   9.133038
[19]   8.439573   8.792640
> colMax(tmp5,na.rm=TRUE)
 [1] 467.96684  85.64694  80.10272  82.86767  76.99673  84.96179  83.03134
 [8]  79.58308  84.17051  85.78225  93.76040  84.99049  83.39441  96.41368
[15]  84.13985  95.71571  85.51534  90.26297  83.81734  81.65806
> colMin(tmp5,na.rm=TRUE)
 [1] 56.30942 57.86496 60.12485 57.57523 63.28187 61.18678 59.56564 63.25878
 [9] 55.05072 61.98304 56.32907 54.20329 55.21211 55.64423 57.43408 57.67611
[17] 61.61017 58.68131 56.30307 56.87305
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1]      NaN 72.56589 70.66426 69.87782 71.92764 68.13594 72.12188 72.45184
 [9] 71.84653 71.68018
> rowSums(tmp5,na.rm=TRUE)
 [1]    0.000 1451.318 1413.285 1397.556 1438.553 1362.719 1442.438 1449.037
 [9] 1436.931 1433.604
> rowVars(tmp5,na.rm=TRUE)
 [1]        NA  62.21160  69.60202  93.51094 117.00485  76.30474  32.19247
 [8]  84.75474  77.28878  64.29678
> rowSd(tmp5,na.rm=TRUE)
 [1]        NA  7.887433  8.342783  9.670105 10.816878  8.735258  5.673841
 [8]  9.206234  8.791404  8.018528
> rowMax(tmp5,na.rm=TRUE)
 [1]       NA 85.51534 85.64694 89.67290 95.71571 84.17051 82.39542 96.41368
 [9] 93.76040 84.39151
> rowMin(tmp5,na.rm=TRUE)
 [1]       NA 55.70372 55.05072 56.30307 56.25948 54.20329 62.22769 56.32907
 [9] 58.78897 56.30942
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 68.44130 72.84802 73.07176 70.12499 70.71411 73.68223 72.56899 72.09484
 [9]      NaN 72.85756 75.14295 67.78893 66.53746 69.14293 69.02407 71.54084
[17] 72.67781 72.05542 75.08783 69.12178
> colSums(tmp5,na.rm=TRUE)
 [1] 615.9717 655.6321 657.6459 631.1249 636.4270 663.1401 653.1209 648.8536
 [9]   0.0000 655.7180 676.2866 610.1004 598.8372 622.2863 621.2166 643.8676
[17] 654.1003 648.4988 675.7905 622.0960
> colVars(tmp5,na.rm=TRUE)
 [1]  82.42866  62.49462  26.08103  54.96916  18.11019  70.23776  60.04830
 [8]  22.33164        NA  57.31817 139.31936  67.30473  99.31250 148.76376
[15]  94.33843 123.51477  65.95138  93.81793  79.76020  78.88913
> colSd(tmp5,na.rm=TRUE)
 [1]  9.079023  7.905354  5.106959  7.414119  4.255607  8.380797  7.749084
 [8]  4.725637        NA  7.570876 11.803362  8.203946  9.965566 12.196875
[15]  9.712797 11.113720  8.121045  9.685965  8.930857  8.881955
> colMax(tmp5,na.rm=TRUE)
 [1] 86.42583 85.64694 80.10272 82.86767 76.99673 84.96179 83.03134 78.12480
 [9]     -Inf 84.39151 93.76040 83.74769 83.39441 96.41368 84.13985 95.71571
[17] 85.51534 90.26297 83.81734 81.65806
> colMin(tmp5,na.rm=TRUE)
 [1] 56.30942 57.86496 62.94448 57.57523 63.32772 61.18678 59.56564 63.25878
 [9]      Inf 61.98304 56.32907 54.20329 55.21211 55.70372 57.43408 60.21632
[17] 61.61017 58.68131 56.30307 56.87305
> 
> 
> 
> 
> 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] 220.0455 275.9516 244.0008 170.7105 216.2905 277.2186 194.4417 330.3305
 [9] 222.5068 358.9149
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 220.0455 275.9516 244.0008 170.7105 216.2905 277.2186 194.4417 330.3305
 [9] 222.5068 358.9149
> 
> 
> 
> 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.421085e-14  5.684342e-14  2.131628e-13 -1.989520e-13  1.136868e-13
 [6]  0.000000e+00  2.842171e-14  5.684342e-14  2.842171e-14  1.705303e-13
[11] -2.273737e-13  8.526513e-14  2.273737e-13 -1.421085e-13  0.000000e+00
[16]  5.684342e-14 -5.684342e-14 -5.684342e-14 -1.705303e-13  2.557954e-13
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## making sure these things agree
> ##
> ## first when there is no NA
> 
> 
> 
> agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){
+ 
+   if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Max")
+   }
+   
+ 
+   if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Min")
+   }
+ 
+ 
+   if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){
+ 
+     cat(Sum(buff.matrix,na.rm=TRUE),"\n")
+     cat(sum(r.matrix,na.rm=TRUE),"\n")
+     cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n")
+     
+     stop("No agreement in Sum")
+   }
+   
+   if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){
+     stop("No agreement in mean")
+   }
+   
+   
+   if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){
+     stop("No agreement in Var")
+   }
+   
+   
+ 
+   if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowMeans")
+   }
+   
+   
+   if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colMeans")
+   }
+   
+   
+   if(any(abs(rowSums(buff.matrix,na.rm=TRUE)  -  apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in rowSums")
+   }
+   
+   
+   if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colSums")
+   }
+   
+   ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when 
+   ### computing variance
+   my.Var <- function(x,na.rm=FALSE){
+    if (all(is.na(x))){
+      return(NA)
+    } else {
+      var(x,na.rm=na.rm)
+    }
+ 
+   }
+   
+   if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+   
+   
+   if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+ 
+ 
+   if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+ 
+   if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+   
+   
+   if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+   
+ 
+   if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+ 
+   if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMedian")
+   }
+ 
+   if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colRanges")
+   }
+ 
+ 
+   
+ }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> for (rep in 1:20){
+   copymatrix <- matrix(rnorm(200,150,15),10,20)
+   
+   tmp5[1:10,1:20] <- copymatrix
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ## now lets assign some NA values and check agreement
+ 
+   which.row <- sample(1:10,1,replace=TRUE)
+   which.col  <- sample(1:20,1,replace=TRUE)
+   
+   cat(which.row," ",which.col,"\n")
+   
+   tmp5[which.row,which.col] <- NA
+   copymatrix[which.row,which.col] <- NA
+   
+   agree.checks(tmp5,copymatrix)
+ 
+   ## make an entire row NA
+   tmp5[which.row,] <- NA
+   copymatrix[which.row,] <- NA
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ### also make an entire col NA
+   tmp5[,which.col] <- NA
+   copymatrix[,which.col] <- NA
+ 
+   agree.checks(tmp5,copymatrix)
+ 
+   ### now make 1 element non NA with NA in the rest of row and column
+ 
+   tmp5[which.row,which.col] <- rnorm(1,150,15)
+   copymatrix[which.row,which.col] <- tmp5[which.row,which.col]
+ 
+   agree.checks(tmp5,copymatrix)
+ }
8   10 
1   16 
10   15 
3   1 
1   8 
1   6 
8   20 
8   9 
5   8 
7   8 
2   5 
6   1 
8   20 
10   2 
10   14 
5   6 
2   20 
7   7 
2   8 
8   20 
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.022981
> Min(tmp)
[1] -2.211624
> mean(tmp)
[1] 0.004939772
> Sum(tmp)
[1] 0.4939772
> Var(tmp)
[1] 0.7948357
> 
> rowMeans(tmp)
[1] 0.004939772
> rowSums(tmp)
[1] 0.4939772
> rowVars(tmp)
[1] 0.7948357
> rowSd(tmp)
[1] 0.8915356
> rowMax(tmp)
[1] 2.022981
> rowMin(tmp)
[1] -2.211624
> 
> colMeans(tmp)
  [1] -1.22990684  0.32184229  0.04874561  0.13244773  0.48187821  0.33882586
  [7] -0.72572102  0.65921472  0.50059447 -2.21162352  0.81393807  1.50601160
 [13] -1.08443785 -0.79028969 -0.88728479 -2.19665911  1.28536573 -0.19809914
 [19]  0.01092636 -0.69347784 -0.08154314 -0.87922821 -1.50979902 -0.24913115
 [25] -1.15614934 -0.18354392  0.58974460  0.53481342 -0.74924560  0.18588513
 [31]  0.75455621 -0.09680240 -1.30796352  0.02739043 -0.83682381  0.50477567
 [37]  1.95000826  1.40770897  1.56305271  0.40517907  0.19314535 -1.85341505
 [43]  0.18281184  0.96315064  0.96956257  0.05997712  0.06602166 -0.16523378
 [49] -0.54879408  1.25624388  0.41571295  2.02298086  0.26240675  0.02414519
 [55]  0.91433452  1.44500057 -0.19366689 -0.61745467  0.10662338  0.75205060
 [61]  1.02305556  1.11856526 -1.15292361 -1.82288782  0.52722472  0.91873925
 [67] -0.15341340  0.33648645  0.16444246  0.35610183 -0.56144365  0.44030725
 [73] -0.30584943 -0.71755896 -1.04383219  1.88176423 -0.59996406  0.83831801
 [79]  0.20533670 -1.82899656 -0.91048658 -0.84331197  0.10564420 -0.63314849
 [85]  0.46699982 -0.64712587 -1.17030464 -0.24958826  0.43396725 -0.29373558
 [91]  0.23864974  0.44588884 -1.09631679  0.22347485  0.05476344  0.31991828
 [97]  0.58487350  0.42887605  0.39389844 -0.19320969
> colSums(tmp)
  [1] -1.22990684  0.32184229  0.04874561  0.13244773  0.48187821  0.33882586
  [7] -0.72572102  0.65921472  0.50059447 -2.21162352  0.81393807  1.50601160
 [13] -1.08443785 -0.79028969 -0.88728479 -2.19665911  1.28536573 -0.19809914
 [19]  0.01092636 -0.69347784 -0.08154314 -0.87922821 -1.50979902 -0.24913115
 [25] -1.15614934 -0.18354392  0.58974460  0.53481342 -0.74924560  0.18588513
 [31]  0.75455621 -0.09680240 -1.30796352  0.02739043 -0.83682381  0.50477567
 [37]  1.95000826  1.40770897  1.56305271  0.40517907  0.19314535 -1.85341505
 [43]  0.18281184  0.96315064  0.96956257  0.05997712  0.06602166 -0.16523378
 [49] -0.54879408  1.25624388  0.41571295  2.02298086  0.26240675  0.02414519
 [55]  0.91433452  1.44500057 -0.19366689 -0.61745467  0.10662338  0.75205060
 [61]  1.02305556  1.11856526 -1.15292361 -1.82288782  0.52722472  0.91873925
 [67] -0.15341340  0.33648645  0.16444246  0.35610183 -0.56144365  0.44030725
 [73] -0.30584943 -0.71755896 -1.04383219  1.88176423 -0.59996406  0.83831801
 [79]  0.20533670 -1.82899656 -0.91048658 -0.84331197  0.10564420 -0.63314849
 [85]  0.46699982 -0.64712587 -1.17030464 -0.24958826  0.43396725 -0.29373558
 [91]  0.23864974  0.44588884 -1.09631679  0.22347485  0.05476344  0.31991828
 [97]  0.58487350  0.42887605  0.39389844 -0.19320969
> colVars(tmp)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> colSd(tmp)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> colMax(tmp)
  [1] -1.22990684  0.32184229  0.04874561  0.13244773  0.48187821  0.33882586
  [7] -0.72572102  0.65921472  0.50059447 -2.21162352  0.81393807  1.50601160
 [13] -1.08443785 -0.79028969 -0.88728479 -2.19665911  1.28536573 -0.19809914
 [19]  0.01092636 -0.69347784 -0.08154314 -0.87922821 -1.50979902 -0.24913115
 [25] -1.15614934 -0.18354392  0.58974460  0.53481342 -0.74924560  0.18588513
 [31]  0.75455621 -0.09680240 -1.30796352  0.02739043 -0.83682381  0.50477567
 [37]  1.95000826  1.40770897  1.56305271  0.40517907  0.19314535 -1.85341505
 [43]  0.18281184  0.96315064  0.96956257  0.05997712  0.06602166 -0.16523378
 [49] -0.54879408  1.25624388  0.41571295  2.02298086  0.26240675  0.02414519
 [55]  0.91433452  1.44500057 -0.19366689 -0.61745467  0.10662338  0.75205060
 [61]  1.02305556  1.11856526 -1.15292361 -1.82288782  0.52722472  0.91873925
 [67] -0.15341340  0.33648645  0.16444246  0.35610183 -0.56144365  0.44030725
 [73] -0.30584943 -0.71755896 -1.04383219  1.88176423 -0.59996406  0.83831801
 [79]  0.20533670 -1.82899656 -0.91048658 -0.84331197  0.10564420 -0.63314849
 [85]  0.46699982 -0.64712587 -1.17030464 -0.24958826  0.43396725 -0.29373558
 [91]  0.23864974  0.44588884 -1.09631679  0.22347485  0.05476344  0.31991828
 [97]  0.58487350  0.42887605  0.39389844 -0.19320969
> colMin(tmp)
  [1] -1.22990684  0.32184229  0.04874561  0.13244773  0.48187821  0.33882586
  [7] -0.72572102  0.65921472  0.50059447 -2.21162352  0.81393807  1.50601160
 [13] -1.08443785 -0.79028969 -0.88728479 -2.19665911  1.28536573 -0.19809914
 [19]  0.01092636 -0.69347784 -0.08154314 -0.87922821 -1.50979902 -0.24913115
 [25] -1.15614934 -0.18354392  0.58974460  0.53481342 -0.74924560  0.18588513
 [31]  0.75455621 -0.09680240 -1.30796352  0.02739043 -0.83682381  0.50477567
 [37]  1.95000826  1.40770897  1.56305271  0.40517907  0.19314535 -1.85341505
 [43]  0.18281184  0.96315064  0.96956257  0.05997712  0.06602166 -0.16523378
 [49] -0.54879408  1.25624388  0.41571295  2.02298086  0.26240675  0.02414519
 [55]  0.91433452  1.44500057 -0.19366689 -0.61745467  0.10662338  0.75205060
 [61]  1.02305556  1.11856526 -1.15292361 -1.82288782  0.52722472  0.91873925
 [67] -0.15341340  0.33648645  0.16444246  0.35610183 -0.56144365  0.44030725
 [73] -0.30584943 -0.71755896 -1.04383219  1.88176423 -0.59996406  0.83831801
 [79]  0.20533670 -1.82899656 -0.91048658 -0.84331197  0.10564420 -0.63314849
 [85]  0.46699982 -0.64712587 -1.17030464 -0.24958826  0.43396725 -0.29373558
 [91]  0.23864974  0.44588884 -1.09631679  0.22347485  0.05476344  0.31991828
 [97]  0.58487350  0.42887605  0.39389844 -0.19320969
> colMedians(tmp)
  [1] -1.22990684  0.32184229  0.04874561  0.13244773  0.48187821  0.33882586
  [7] -0.72572102  0.65921472  0.50059447 -2.21162352  0.81393807  1.50601160
 [13] -1.08443785 -0.79028969 -0.88728479 -2.19665911  1.28536573 -0.19809914
 [19]  0.01092636 -0.69347784 -0.08154314 -0.87922821 -1.50979902 -0.24913115
 [25] -1.15614934 -0.18354392  0.58974460  0.53481342 -0.74924560  0.18588513
 [31]  0.75455621 -0.09680240 -1.30796352  0.02739043 -0.83682381  0.50477567
 [37]  1.95000826  1.40770897  1.56305271  0.40517907  0.19314535 -1.85341505
 [43]  0.18281184  0.96315064  0.96956257  0.05997712  0.06602166 -0.16523378
 [49] -0.54879408  1.25624388  0.41571295  2.02298086  0.26240675  0.02414519
 [55]  0.91433452  1.44500057 -0.19366689 -0.61745467  0.10662338  0.75205060
 [61]  1.02305556  1.11856526 -1.15292361 -1.82288782  0.52722472  0.91873925
 [67] -0.15341340  0.33648645  0.16444246  0.35610183 -0.56144365  0.44030725
 [73] -0.30584943 -0.71755896 -1.04383219  1.88176423 -0.59996406  0.83831801
 [79]  0.20533670 -1.82899656 -0.91048658 -0.84331197  0.10564420 -0.63314849
 [85]  0.46699982 -0.64712587 -1.17030464 -0.24958826  0.43396725 -0.29373558
 [91]  0.23864974  0.44588884 -1.09631679  0.22347485  0.05476344  0.31991828
 [97]  0.58487350  0.42887605  0.39389844 -0.19320969
> colRanges(tmp)
          [,1]      [,2]       [,3]      [,4]      [,5]      [,6]      [,7]
[1,] -1.229907 0.3218423 0.04874561 0.1324477 0.4818782 0.3388259 -0.725721
[2,] -1.229907 0.3218423 0.04874561 0.1324477 0.4818782 0.3388259 -0.725721
          [,8]      [,9]     [,10]     [,11]    [,12]     [,13]      [,14]
[1,] 0.6592147 0.5005945 -2.211624 0.8139381 1.506012 -1.084438 -0.7902897
[2,] 0.6592147 0.5005945 -2.211624 0.8139381 1.506012 -1.084438 -0.7902897
          [,15]     [,16]    [,17]      [,18]      [,19]      [,20]       [,21]
[1,] -0.8872848 -2.196659 1.285366 -0.1980991 0.01092636 -0.6934778 -0.08154314
[2,] -0.8872848 -2.196659 1.285366 -0.1980991 0.01092636 -0.6934778 -0.08154314
          [,22]     [,23]      [,24]     [,25]      [,26]     [,27]     [,28]
[1,] -0.8792282 -1.509799 -0.2491311 -1.156149 -0.1835439 0.5897446 0.5348134
[2,] -0.8792282 -1.509799 -0.2491311 -1.156149 -0.1835439 0.5897446 0.5348134
          [,29]     [,30]     [,31]      [,32]     [,33]      [,34]      [,35]
[1,] -0.7492456 0.1858851 0.7545562 -0.0968024 -1.307964 0.02739043 -0.8368238
[2,] -0.7492456 0.1858851 0.7545562 -0.0968024 -1.307964 0.02739043 -0.8368238
         [,36]    [,37]    [,38]    [,39]     [,40]     [,41]     [,42]
[1,] 0.5047757 1.950008 1.407709 1.563053 0.4051791 0.1931454 -1.853415
[2,] 0.5047757 1.950008 1.407709 1.563053 0.4051791 0.1931454 -1.853415
         [,43]     [,44]     [,45]      [,46]      [,47]      [,48]      [,49]
[1,] 0.1828118 0.9631506 0.9695626 0.05997712 0.06602166 -0.1652338 -0.5487941
[2,] 0.1828118 0.9631506 0.9695626 0.05997712 0.06602166 -0.1652338 -0.5487941
        [,50]     [,51]    [,52]     [,53]      [,54]     [,55]    [,56]
[1,] 1.256244 0.4157129 2.022981 0.2624068 0.02414519 0.9143345 1.445001
[2,] 1.256244 0.4157129 2.022981 0.2624068 0.02414519 0.9143345 1.445001
          [,57]      [,58]     [,59]     [,60]    [,61]    [,62]     [,63]
[1,] -0.1936669 -0.6174547 0.1066234 0.7520506 1.023056 1.118565 -1.152924
[2,] -0.1936669 -0.6174547 0.1066234 0.7520506 1.023056 1.118565 -1.152924
         [,64]     [,65]     [,66]      [,67]     [,68]     [,69]     [,70]
[1,] -1.822888 0.5272247 0.9187393 -0.1534134 0.3364865 0.1644425 0.3561018
[2,] -1.822888 0.5272247 0.9187393 -0.1534134 0.3364865 0.1644425 0.3561018
          [,71]     [,72]      [,73]     [,74]     [,75]    [,76]      [,77]
[1,] -0.5614437 0.4403072 -0.3058494 -0.717559 -1.043832 1.881764 -0.5999641
[2,] -0.5614437 0.4403072 -0.3058494 -0.717559 -1.043832 1.881764 -0.5999641
        [,78]     [,79]     [,80]      [,81]     [,82]     [,83]      [,84]
[1,] 0.838318 0.2053367 -1.828997 -0.9104866 -0.843312 0.1056442 -0.6331485
[2,] 0.838318 0.2053367 -1.828997 -0.9104866 -0.843312 0.1056442 -0.6331485
         [,85]      [,86]     [,87]      [,88]     [,89]      [,90]     [,91]
[1,] 0.4669998 -0.6471259 -1.170305 -0.2495883 0.4339673 -0.2937356 0.2386497
[2,] 0.4669998 -0.6471259 -1.170305 -0.2495883 0.4339673 -0.2937356 0.2386497
         [,92]     [,93]     [,94]      [,95]     [,96]     [,97]    [,98]
[1,] 0.4458888 -1.096317 0.2234748 0.05476344 0.3199183 0.5848735 0.428876
[2,] 0.4458888 -1.096317 0.2234748 0.05476344 0.3199183 0.5848735 0.428876
         [,99]     [,100]
[1,] 0.3938984 -0.1932097
[2,] 0.3938984 -0.1932097
> 
> 
> Max(tmp2)
[1] 2.774464
> Min(tmp2)
[1] -2.368664
> mean(tmp2)
[1] 0.06396754
> Sum(tmp2)
[1] 6.396754
> Var(tmp2)
[1] 1.067269
> 
> rowMeans(tmp2)
  [1]  1.01080236 -0.41032605  0.24565920 -2.11588882  0.85357512  0.29789425
  [7]  0.50997005 -0.66365136  1.59572591 -1.40009079 -0.40930127 -1.13418159
 [13]  1.19479561 -1.00208312  1.23205724  0.48796975 -0.15228989 -0.38220023
 [19]  0.31859675 -0.11070990 -0.07959859  1.02722366  1.95109787  1.80014628
 [25] -0.05305813 -0.19373430 -1.55263356 -2.19076308  0.93848398 -0.53545146
 [31]  0.23632791  0.95952083  0.20580549 -0.31648008 -0.91197612  1.70245954
 [37]  0.64723568  0.96181639  0.41481020 -0.24308565 -0.77520744 -1.43224143
 [43]  0.80102653 -2.36866397  0.84543541  0.45411315 -0.07932439  2.36224126
 [49] -0.40158559 -1.36306163 -0.27677657 -0.70674165 -0.19731109 -0.81209808
 [55] -1.63543075 -1.00448987  0.83868949  0.75412133 -0.20177665  1.56955844
 [61] -0.57407434 -0.10984080 -0.76113791 -0.27730466 -0.45123341  1.35140408
 [67] -0.94727522 -1.04842564 -0.04667484 -0.58697406  1.67058724  0.53346829
 [73]  1.05186984 -0.17284198  0.16921809  1.96468522  0.79190828  2.77446439
 [79]  0.29014559 -1.05490386 -0.36000601 -0.96210669 -1.13428470 -0.65418107
 [85] -0.67867813 -0.11978114  0.45013335 -0.74546522 -0.24453473  1.38701248
 [91]  1.37188095  0.14306615 -0.36195099 -0.33487674 -0.16928265 -0.81456880
 [97] -0.57803467  1.58964356  1.10111349  1.83964432
> rowSums(tmp2)
  [1]  1.01080236 -0.41032605  0.24565920 -2.11588882  0.85357512  0.29789425
  [7]  0.50997005 -0.66365136  1.59572591 -1.40009079 -0.40930127 -1.13418159
 [13]  1.19479561 -1.00208312  1.23205724  0.48796975 -0.15228989 -0.38220023
 [19]  0.31859675 -0.11070990 -0.07959859  1.02722366  1.95109787  1.80014628
 [25] -0.05305813 -0.19373430 -1.55263356 -2.19076308  0.93848398 -0.53545146
 [31]  0.23632791  0.95952083  0.20580549 -0.31648008 -0.91197612  1.70245954
 [37]  0.64723568  0.96181639  0.41481020 -0.24308565 -0.77520744 -1.43224143
 [43]  0.80102653 -2.36866397  0.84543541  0.45411315 -0.07932439  2.36224126
 [49] -0.40158559 -1.36306163 -0.27677657 -0.70674165 -0.19731109 -0.81209808
 [55] -1.63543075 -1.00448987  0.83868949  0.75412133 -0.20177665  1.56955844
 [61] -0.57407434 -0.10984080 -0.76113791 -0.27730466 -0.45123341  1.35140408
 [67] -0.94727522 -1.04842564 -0.04667484 -0.58697406  1.67058724  0.53346829
 [73]  1.05186984 -0.17284198  0.16921809  1.96468522  0.79190828  2.77446439
 [79]  0.29014559 -1.05490386 -0.36000601 -0.96210669 -1.13428470 -0.65418107
 [85] -0.67867813 -0.11978114  0.45013335 -0.74546522 -0.24453473  1.38701248
 [91]  1.37188095  0.14306615 -0.36195099 -0.33487674 -0.16928265 -0.81456880
 [97] -0.57803467  1.58964356  1.10111349  1.83964432
> rowVars(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowSd(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowMax(tmp2)
  [1]  1.01080236 -0.41032605  0.24565920 -2.11588882  0.85357512  0.29789425
  [7]  0.50997005 -0.66365136  1.59572591 -1.40009079 -0.40930127 -1.13418159
 [13]  1.19479561 -1.00208312  1.23205724  0.48796975 -0.15228989 -0.38220023
 [19]  0.31859675 -0.11070990 -0.07959859  1.02722366  1.95109787  1.80014628
 [25] -0.05305813 -0.19373430 -1.55263356 -2.19076308  0.93848398 -0.53545146
 [31]  0.23632791  0.95952083  0.20580549 -0.31648008 -0.91197612  1.70245954
 [37]  0.64723568  0.96181639  0.41481020 -0.24308565 -0.77520744 -1.43224143
 [43]  0.80102653 -2.36866397  0.84543541  0.45411315 -0.07932439  2.36224126
 [49] -0.40158559 -1.36306163 -0.27677657 -0.70674165 -0.19731109 -0.81209808
 [55] -1.63543075 -1.00448987  0.83868949  0.75412133 -0.20177665  1.56955844
 [61] -0.57407434 -0.10984080 -0.76113791 -0.27730466 -0.45123341  1.35140408
 [67] -0.94727522 -1.04842564 -0.04667484 -0.58697406  1.67058724  0.53346829
 [73]  1.05186984 -0.17284198  0.16921809  1.96468522  0.79190828  2.77446439
 [79]  0.29014559 -1.05490386 -0.36000601 -0.96210669 -1.13428470 -0.65418107
 [85] -0.67867813 -0.11978114  0.45013335 -0.74546522 -0.24453473  1.38701248
 [91]  1.37188095  0.14306615 -0.36195099 -0.33487674 -0.16928265 -0.81456880
 [97] -0.57803467  1.58964356  1.10111349  1.83964432
> rowMin(tmp2)
  [1]  1.01080236 -0.41032605  0.24565920 -2.11588882  0.85357512  0.29789425
  [7]  0.50997005 -0.66365136  1.59572591 -1.40009079 -0.40930127 -1.13418159
 [13]  1.19479561 -1.00208312  1.23205724  0.48796975 -0.15228989 -0.38220023
 [19]  0.31859675 -0.11070990 -0.07959859  1.02722366  1.95109787  1.80014628
 [25] -0.05305813 -0.19373430 -1.55263356 -2.19076308  0.93848398 -0.53545146
 [31]  0.23632791  0.95952083  0.20580549 -0.31648008 -0.91197612  1.70245954
 [37]  0.64723568  0.96181639  0.41481020 -0.24308565 -0.77520744 -1.43224143
 [43]  0.80102653 -2.36866397  0.84543541  0.45411315 -0.07932439  2.36224126
 [49] -0.40158559 -1.36306163 -0.27677657 -0.70674165 -0.19731109 -0.81209808
 [55] -1.63543075 -1.00448987  0.83868949  0.75412133 -0.20177665  1.56955844
 [61] -0.57407434 -0.10984080 -0.76113791 -0.27730466 -0.45123341  1.35140408
 [67] -0.94727522 -1.04842564 -0.04667484 -0.58697406  1.67058724  0.53346829
 [73]  1.05186984 -0.17284198  0.16921809  1.96468522  0.79190828  2.77446439
 [79]  0.29014559 -1.05490386 -0.36000601 -0.96210669 -1.13428470 -0.65418107
 [85] -0.67867813 -0.11978114  0.45013335 -0.74546522 -0.24453473  1.38701248
 [91]  1.37188095  0.14306615 -0.36195099 -0.33487674 -0.16928265 -0.81456880
 [97] -0.57803467  1.58964356  1.10111349  1.83964432
> 
> colMeans(tmp2)
[1] 0.06396754
> colSums(tmp2)
[1] 6.396754
> colVars(tmp2)
[1] 1.067269
> colSd(tmp2)
[1] 1.033087
> colMax(tmp2)
[1] 2.774464
> colMin(tmp2)
[1] -2.368664
> colMedians(tmp2)
[1] -0.1152455
> colRanges(tmp2)
          [,1]
[1,] -2.368664
[2,]  2.774464
> 
> 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]  2.63901767 -0.47903819 -0.05179399 -0.59687441 -2.15878261 -0.69744227
 [7]  3.75750267  4.32989858 -1.66658931  2.37453771
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -0.7627420
[2,]  0.1539340
[3,]  0.2689862
[4,]  0.3323716
[5,]  1.3560173
> 
> rowApply(tmp,sum)
 [1] -3.59901027 -3.86225154 -2.82043679  5.41524753  0.53403521  2.57590033
 [7]  7.57120228  1.67936643  0.07109602 -0.11471333
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]   10    7    9    6    7    6    4    1    6     6
 [2,]    3    9   10    8    3    3    8    5    1     3
 [3,]    9    4    8    9    2    5    1    7    4     2
 [4,]    1    1    7    4    6    9    7   10   10     1
 [5,]    2    2    5    2    4    4    6    4    9     7
 [6,]    5    6    1    3    8    2    2    8    7     5
 [7,]    8    8    3    7    9    8    9    2    2     9
 [8,]    7    5    6   10    5    7    5    6    5     8
 [9,]    4    3    4    1    1   10    3    9    3    10
[10,]    6   10    2    5   10    1   10    3    8     4
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1]  3.5209550  3.8498985 -0.7550638 -3.1427547 -2.2639518  1.9241446
 [7] -1.3733170 -1.6892375 -1.1618627 -0.5770062  1.6225897 -0.2837028
[13]  0.8471928 -1.8134807 -1.6314199  2.0239630 -0.4004178  0.1878120
[19] -2.1382860  0.8391243
> colApply(tmp,quantile)[,1]
           [,1]
[1,] 0.08666931
[2,] 0.16703029
[3,] 0.24225912
[4,] 0.85700962
[5,] 2.16798666
> 
> rowApply(tmp,sum)
[1] -1.6700108 -0.2525999  3.7950635 -8.5893693  4.3020956
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   14   20    9   18   10
[2,]   19   14   19   13   14
[3,]   16    9    2   11    5
[4,]   15    3    8    1   13
[5,]    4    7    3    2   20
> 
> 
> as.matrix(tmp)
           [,1]       [,2]        [,3]       [,4]       [,5]       [,6]
[1,] 0.16703029 1.87502618  0.46922036  0.2667653 -0.6912800 -0.5588938
[2,] 2.16798666 0.42764445 -0.14136323 -1.1137015 -0.4342562  0.4163073
[3,] 0.24225912 1.06714345 -0.87505605 -0.1127005 -0.6668887  0.2985166
[4,] 0.85700962 0.08560314 -0.07746965 -2.5064728 -1.9165038  0.9459103
[5,] 0.08666931 0.39448131 -0.13039527  0.3233549  1.4449769  0.8223042
            [,7]       [,8]       [,9]       [,10]      [,11]      [,12]
[1,]  0.10437035 -2.1117930 -0.5673266 -0.42753891  1.9762362  0.5375732
[2,] -0.58098796 -0.2483289 -0.1082101 -0.83988374  0.6051361  1.1132254
[3,]  0.55341416 -0.1638298  1.7014349  0.30684298 -0.1455597 -1.9817257
[4,] -1.36854345 -0.3120472 -1.4913993  0.32220300 -1.7081427  1.0232390
[5,] -0.08157006  1.1467615 -0.6963616  0.06137042  0.8949198 -0.9760147
          [,13]       [,14]      [,15]      [,16]         [,17]       [,18]
[1,] -1.1414629 -0.02988716 -0.5686160  0.7004085 -1.2956190573 -0.10709401
[2,]  0.6227040 -2.43582799 -0.9939034  1.6735394  0.3207306756 -0.06028104
[3,]  0.3647550  0.96199205 -0.2766400  0.7815801  0.6711721101  0.67961760
[4,]  0.7244372 -1.63686817 -0.3446613 -1.4205922 -0.0003924669  0.47971660
[5,]  0.2767596  1.32711053  0.5524008  0.2890272 -0.0963090280 -0.80414712
          [,19]      [,20]
[1,] -0.0119922 -0.2551374
[2,] -1.4110864  0.7679566
[3,] -0.4449405  0.8336763
[4,]  0.1343510 -0.3787461
[5,] -0.4046179 -0.1286251
> 
> 
> is.BufferedMatrix(tmp)
[1] TRUE
> 
> as.BufferedMatrix(as.matrix(tmp))
BufferedMatrix object
Matrix size:  5 20 
Buffer size:  1 1 
Directory:    F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.8  Kilobytes.
Disk usage :  800  bytes.
> 
> 
> 
> subBufferedMatrix(tmp,1:5,1:5)
BufferedMatrix object
Matrix size:  5 5 
Buffer size:  1 1 
Directory:    F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  624  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  543  bytes.
Disk usage :  160  bytes.
> subBufferedMatrix(tmp,1:3,)
BufferedMatrix object
Matrix size:  3 20 
Buffer size:  1 1 
Directory:    F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.8  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.253024 1.418194 -0.4075236 -0.6282293 0.2892247 -0.4198881 -0.3488831
           col8      col9      col10     col11    col12     col13     col14
row1 -0.5464649 0.5375226 -0.6466035 0.6188515 -1.53032 0.5058242 0.9118756
          col15     col16      col17     col18     col19      col20
row1 -0.2218198 -1.168553 -0.4332726 -0.305744 0.4277713 -0.8882289
> tmp[,"col10"]
          col10
row1 -0.6466035
row2 -1.2212874
row3  0.8645748
row4  1.0918351
row5 -0.9356186
> tmp[c("row1","row5"),]
           col1      col2       col3       col4       col5       col6
row1 -1.2530242 1.4181939 -0.4075236 -0.6282293  0.2892247 -0.4198881
row5  0.4046264 0.5053739 -1.5165073  1.1763525 -1.3276048 -2.3089886
           col7       col8       col9      col10      col11      col12
row1 -0.3488831 -0.5464649  0.5375226 -0.6466035  0.6188515 -1.5303197
row5  0.3775228 -0.9683924 -1.6878396 -0.9356186 -1.4309899 -0.8482916
         col13     col14      col15     col16      col17     col18     col19
row1 0.5058242 0.9118756 -0.2218198 -1.168553 -0.4332726 -0.305744 0.4277713
row5 0.2462284 0.9298600  0.6399488 -0.133876 -1.7701452 -1.476197 2.0483454
          col20
row1 -0.8882289
row5  0.7854573
> tmp[,c("col6","col20")]
           col6      col20
row1 -0.4198881 -0.8882289
row2  0.4782907  1.6527106
row3 -0.2443908  0.5556142
row4 -1.0172939 -0.6658775
row5 -2.3089886  0.7854573
> tmp[c("row1","row5"),c("col6","col20")]
           col6      col20
row1 -0.4198881 -0.8882289
row5 -2.3089886  0.7854573
> 
> 
> 
> 
> 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.00301 48.98618 50.50871 50.59653 50.47164 104.9253 51.71781 51.08052
         col9    col10    col11    col12    col13    col14    col15    col16
row1 49.36587 50.21084 49.44021 50.56989 49.45936 50.03278 50.25743 52.61406
        col17    col18    col19    col20
row1 49.47824 49.32134 49.88519 104.0836
> tmp[,"col10"]
        col10
row1 50.21084
row2 28.77418
row3 29.93920
row4 30.26424
row5 48.10562
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 50.00301 48.98618 50.50871 50.59653 50.47164 104.9253 51.71781 51.08052
row5 49.38224 50.23645 48.54386 49.76814 48.73125 104.9813 50.79596 47.29089
         col9    col10    col11    col12    col13    col14    col15    col16
row1 49.36587 50.21084 49.44021 50.56989 49.45936 50.03278 50.25743 52.61406
row5 51.26457 48.10562 51.18646 51.20876 48.28473 49.71434 48.23801 49.47723
        col17    col18    col19    col20
row1 49.47824 49.32134 49.88519 104.0836
row5 50.34969 50.00195 51.08385 104.4704
> tmp[,c("col6","col20")]
          col6     col20
row1 104.92535 104.08359
row2  74.83612  75.09525
row3  75.05781  73.11380
row4  74.36490  75.35956
row5 104.98132 104.47039
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 104.9253 104.0836
row5 104.9813 104.4704
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 104.9253 104.0836
row5 104.9813 104.4704
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,] -0.1883847
[2,] -0.1263336
[3,] -0.7706378
[4,] -1.2336005
[5,]  0.6507129
> tmp[,c("col17","col7")]
          col17        col7
[1,] -0.9010845  1.03701845
[2,] -0.4610593  0.08240138
[3,] -1.4742090 -0.45118875
[4,] -1.0979475 -0.55129222
[5,]  0.3618676 -1.08562934
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
            col6      col20
[1,]  0.07895303  0.6691777
[2,] -0.68340631 -0.2027773
[3,] -0.17715014  1.1193665
[4,]  0.70087300  0.6846733
[5,]  1.37582295 -1.0370321
> subBufferedMatrix(tmp,1,c("col6"))[,1]
           col1
[1,] 0.07895303
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
            col6
[1,]  0.07895303
[2,] -0.68340631
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> 
> 
> 
> subBufferedMatrix(tmp,c("row3","row1"),)[,1:20]
          [,1]        [,2]       [,3]      [,4]       [,5]      [,6]      [,7]
row3 0.1359133  0.04635998  0.1475972 0.2316958 -0.4659225 0.7285582 0.1046148
row1 1.1059872 -1.69887884 -1.0172404 0.2458775  0.4833946 0.3914286 0.2154607
           [,8]      [,9]      [,10]      [,11]      [,12]      [,13]
row3 -0.2327733 0.5488523 -0.3373787  1.0026079 -0.3460430  0.7297278
row1  2.0090320 0.6551231  1.9071822 -0.6850707  0.1107456 -1.4901299
          [,14]       [,15]      [,16]      [,17]      [,18]     [,19]
row3 -0.4410264  0.07715707  1.9458505  0.5709489  1.0211712 0.2183191
row1  0.2852247 -1.51553458 -0.7088304 -0.7945699 -0.3851788 0.8884050
          [,20]
row3 -0.8768032
row1 -0.4735271
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
           [,1]       [,2]      [,3]       [,4]      [,5]       [,6]       [,7]
row2 -0.5797738 -0.6241154 -2.187322 -0.6012924 0.3424588 -0.5504791 -0.7911927
            [,8]     [,9]      [,10]
row2 0.001342987 1.301145 -0.4080702
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
           [,1]      [,2]    [,3]      [,4]       [,5]       [,6]      [,7]
row5 -0.1576833 -0.116376 0.88605 0.3342184 0.05318161 -0.9178579 -0.862117
           [,8]        [,9]     [,10]     [,11]     [,12]    [,13]      [,14]
row5 -0.6116162 -0.03466132 0.8577471 -1.396121 0.6654242 0.321244 -0.9949921
           [,15]      [,16]      [,17]      [,18]     [,19]       [,20]
row5 -0.02146095 0.00598205 0.09228725 -0.2746237 -1.060093 -0.02940521
> 
> 
> 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: 0x0000022b4ecff0b0>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af013f94cab"
 [2] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af06867a51" 
 [3] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af0134c21f2"
 [4] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af052c1a27" 
 [5] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af01ab0285e"
 [6] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af02868683a"
 [7] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af0776172c5"
 [8] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af08016c43" 
 [9] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af0650c15b2"
[10] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af04fa9273b"
[11] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af014922316"
[12] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af01bdfcb6" 
[13] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af0100ae3a" 
[14] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af01e142672"
[15] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM6af02005bf8" 
> 
> 
> ### 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: 0x0000022b526dd7d0>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x0000022b526dd7d0>
Warning message:
In dir.create(new.directory) :
  'F:\biocbuild\bbs-3.20-bioc\meat\BufferedMatrix.Rcheck\tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x0000022b526dd7d0>
> rowMedians(tmp)
  [1]  0.049834633  0.361496502 -0.155219380 -0.177383691 -0.680067764
  [6]  0.054182193  0.167288513  0.371299198  0.155293072 -0.336603502
 [11] -0.275292470 -0.065189360  0.172167961 -0.165738691  0.148750044
 [16] -0.133656974  0.422109318 -0.442106205  0.908959721  0.213275857
 [21]  0.297353571 -0.076731962  0.018581675 -0.112382580  0.102846540
 [26]  0.372706663 -0.009299296  0.180213014  0.173524935 -0.342549638
 [31]  0.168765063 -0.474022937  0.199862327 -0.212249266 -0.034226573
 [36] -0.141511035 -0.339581451  0.138614554  0.229571358 -0.078476072
 [41] -0.107864155 -0.099769837 -0.029417679 -0.224480908  0.099198537
 [46]  0.381091559 -0.216750625  0.040519656 -0.146407680  0.070715638
 [51]  0.258723072 -0.012599431  0.521527577 -0.050343877  0.115065405
 [56] -0.247056850 -0.094396889  0.392634925  0.011658952 -0.380343440
 [61]  0.135373458 -0.028177816  0.070537978 -0.005645459 -0.133148245
 [66]  0.005643708 -0.208318222  0.230427299 -0.383430874  0.191586019
 [71] -0.655077812  0.132212203  0.467262279  0.400669903  0.068740028
 [76]  0.169657895  0.187367802 -0.098632346  0.312180178 -0.194643577
 [81]  0.607765876 -0.259144576  0.201502573 -0.018409216  0.428785001
 [86]  0.228561174  0.054746337  0.030928374 -0.415615925 -0.175326719
 [91]  0.192449399 -0.128085121 -0.256204788 -0.008107396  0.018628593
 [96]  0.235959349 -0.301284978 -0.538569965 -0.160663248 -0.253320282
[101]  0.064131040 -0.334188817 -0.219447105  0.088729119  0.325432971
[106]  0.128198809  0.282784633  0.099873116  0.426858091  0.092876781
[111]  0.264091809 -0.446658568  0.041105849 -0.105217763 -0.151158796
[116]  0.454235078 -0.098951143  0.135748940  0.190090566  0.192676607
[121] -0.068509445 -0.107782811 -0.281324631  0.341065391  0.037413233
[126] -1.099993505  0.645362925  0.266693507  0.248223683 -0.601547267
[131] -0.149477174  0.257444354 -0.372497596 -0.104331215 -0.358912039
[136] -0.006859167  0.180565033 -0.288432338  0.058702685 -0.234109687
[141] -0.360531795  0.073401056 -0.127130800  0.570748938 -0.418927808
[146] -0.150209644 -0.174673321 -0.091592220  0.060522554  0.151422926
[151] -0.287994760  0.140591833 -0.329587783  0.905295186  0.296141240
[156]  0.034087079  0.019027919  0.529843113 -0.123343856  0.746779779
[161] -0.413820271 -0.307222162 -0.279434933 -0.180023226 -0.351673031
[166] -0.693137880  0.156669602 -0.043774883 -0.098103174  0.401832615
[171] -0.124642039  0.485749455  0.371298300 -0.130445585  0.192231328
[176]  0.098405341  0.061298073 -0.286152055 -0.145519839  0.164320006
[181]  0.074189558  0.022683980 -0.292769522  0.070492729  0.155696515
[186] -0.259479263  0.144271959 -0.058568317 -0.039818451  0.622418316
[191]  0.667557781  0.146099048 -0.255138255 -0.336879921 -0.489098237
[196]  0.250801531 -0.175438048 -0.768975870  0.142110857 -0.021737583
[201]  0.283006279 -0.071017721  0.410362658  0.106291310 -0.468855914
[206]  0.353076916 -0.143829794  0.008150682 -0.236680955  0.027555427
[211]  0.310562208 -0.267330901  0.379091542 -0.286244108  0.301320518
[216]  0.037691702 -0.258123690  0.298836662  0.496633237  0.067775504
[221] -0.302834396  0.178931204 -0.568239099  0.178238326  0.169783502
[226] -1.039551290 -0.007181211 -0.479005875 -0.117506325 -0.218819467
> 
> proc.time()
   user  system elapsed 
   4.00   14.92  120.84 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R version 4.4.3 (2025-02-28 ucrt) -- "Trophy Case"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64

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: 0x0000017d74eff4d0>
> .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: 0x0000017d74eff4d0>
> .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: 0x0000017d74eff4d0>
> .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: 0x0000017d74eff4d0>
> 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: 0x0000017d74effb30>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000017d74effb30>
> .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: 0x0000017d74effb30>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000017d74effb30>
> .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: 0x0000017d74effb30>
> 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: 0x0000017d74eff770>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000017d74eff770>
> .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: 0x0000017d74eff770>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x0000017d74eff770>
> .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: 0x0000017d74eff770>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x0000017d74eff770>
> .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: 0x0000017d74eff770>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x0000017d74eff770>
> .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: 0x0000017d74eff770>
> 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: 0x0000017d74effcb0>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x0000017d74effcb0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000017d74effcb0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000017d74effcb0>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile1f5e423b07e28" "BufferedMatrixFile1f5e440b74e18"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile1f5e423b07e28" "BufferedMatrixFile1f5e440b74e18"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000017d76cff350>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000017d76cff350>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x0000017d76cff350>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x0000017d76cff350>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x0000017d76cff350>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x0000017d76cff350>
> .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: 0x0000017d76cff1d0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000017d76cff1d0>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x0000017d76cff1d0>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x0000017d76cff1d0>
> 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: 0x0000017d76cffb90>
> .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: 0x0000017d76cffb90>
> rm(P)
> 
> proc.time()
   user  system elapsed 
   0.35    0.10    0.71 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R version 4.4.3 (2025-02-28 ucrt) -- "Trophy Case"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64

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.28    0.14    0.59 

Example timings