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

This page was generated on 2025-04-02 19:29 -0400 (Wed, 02 Apr 2025).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 24.04.1 LTS)x86_644.4.3 (2025-02-28) -- "Trophy Case" 4764
palomino8Windows Server 2022 Datacenterx644.4.3 (2025-02-28 ucrt) -- "Trophy Case" 4495
merida1macOS 12.7.5 Montereyx86_644.4.3 (2025-02-28) -- "Trophy Case" 4522
kjohnson1macOS 13.6.6 Venturaarm644.4.3 (2025-02-28) -- "Trophy Case" 4449
taishanLinux (openEuler 24.03 LTS)aarch644.4.3 (2025-02-28) -- "Trophy Case" 4426
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-31 13:00 -0400 (Mon, 31 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-31 23:37:49 -0400 (Mon, 31 Mar 2025)
EndedAt: 2025-03-31 23:40:12 -0400 (Mon, 31 Mar 2025)
EllapsedTime: 142.4 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.29    0.12    0.90 

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 31 23:38: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 31 23:38: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: 0x00000165cdeff530>
> 
> 
> 
> 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 31 23:38:39 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 31 23:38:46 2025"
> 
> ColMode(tmp2)
<pointer: 0x00000165cdeff530>
> 
> 
> 
> ### 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,] 100.2753444  1.057698 -0.54338440  0.1033197
[2,]  -2.2164523 -1.194199 -0.52895206 -0.8488219
[3,]   0.7428227 -1.036740 -0.08428367  0.4850529
[4,]  -0.5901742 -1.678442 -1.37244245 -0.2871698
> 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,] 100.2753444 1.057698 0.54338440 0.1033197
[2,]   2.2164523 1.194199 0.52895206 0.8488219
[3,]   0.7428227 1.036740 0.08428367 0.4850529
[4,]   0.5901742 1.678442 1.37244245 0.2871698
> 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,] 10.0137578 1.028444 0.7371461 0.3214339
[2,]  1.4887754 1.092794 0.7272909 0.9213153
[3,]  0.8618716 1.018204 0.2903165 0.6964574
[4,]  0.7682280 1.295547 1.1715129 0.5358823
> 
> 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,] 225.41292 36.34214 32.91485 28.31766
[2,]  42.10421 37.12214 32.80186 35.06197
[3,]  34.36154 36.21878 27.98745 32.44963
[4,]  33.27245 39.63391 38.08757 30.64599
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x00000165cdeff6b0>
> exp(tmp5)
<pointer: 0x00000165cdeff6b0>
> log(tmp5,2)
<pointer: 0x00000165cdeff6b0>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 469.1675
> Min(tmp5)
[1] 53.34385
> mean(tmp5)
[1] 72.23904
> Sum(tmp5)
[1] 14447.81
> Var(tmp5)
[1] 863.0983
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 89.75939 71.12481 70.70918 70.16214 69.48207 69.89686 68.06184 71.02270
 [9] 71.01533 71.15613
> rowSums(tmp5)
 [1] 1795.188 1422.496 1414.184 1403.243 1389.641 1397.937 1361.237 1420.454
 [9] 1420.307 1423.123
> rowVars(tmp5)
 [1] 8020.48079  105.16234   78.36661   48.36296   97.42841   74.79306
 [7]   62.95735   77.10367   45.42836   61.79455
> rowSd(tmp5)
 [1] 89.557137 10.254869  8.852492  6.954348  9.870583  8.648298  7.934567
 [8]  8.780869  6.740057  7.860951
> rowMax(tmp5)
 [1] 469.16746  98.71658  90.28108  82.49280  91.19596  85.43600  80.00769
 [8]  85.84728  83.17764  80.58235
> rowMin(tmp5)
 [1] 58.93950 58.77205 56.60121 58.36031 56.88120 56.45965 54.88822 56.37786
 [9] 60.37048 53.34385
> 
> colMeans(tmp5)
 [1] 113.84169  73.07137  69.06141  69.16649  66.46471  71.81117  70.14584
 [8]  68.70929  68.09351  73.28286  69.56936  70.00057  70.89891  70.96945
[15]  70.71168  68.99829  66.72904  68.96966  71.40037  72.88522
> colSums(tmp5)
 [1] 1138.4169  730.7137  690.6141  691.6649  664.6471  718.1117  701.4584
 [8]  687.0929  680.9351  732.8286  695.6936  700.0057  708.9891  709.6945
[15]  707.1168  689.9829  667.2904  689.6966  714.0037  728.8522
> colVars(tmp5)
 [1] 15656.88947    55.73052    48.49523    70.33306    24.31953    99.48365
 [7]    43.82410    56.82279    34.79956    48.21128    29.02500   130.71975
[13]    97.97423    49.24264    61.43557    66.65586    62.12393    69.61040
[19]   111.47199   166.66711
> colSd(tmp5)
 [1] 125.127493   7.465288   6.963852   8.386481   4.931484   9.974149
 [7]   6.619978   7.538089   5.899115   6.943434   5.387485  11.433274
[13]   9.898193   7.017310   7.838084   8.164304   7.881873   8.343285
[19]  10.558029  12.909962
> colMax(tmp5)
 [1] 469.16746  82.49280  79.27429  80.03860  74.34421  85.84728  81.28269
 [8]  82.63340  74.06327  83.17764  77.54154  90.28108  82.80506  80.58235
[15]  85.61968  80.17824  79.04901  78.37876  91.19596  98.71658
> colMin(tmp5)
 [1] 56.88120 62.78425 57.03858 54.88822 59.12243 56.45965 60.63268 60.14733
 [9] 55.04302 62.08762 60.66063 53.34385 58.77205 60.55640 59.85238 59.33976
[17] 56.37786 54.04626 56.60121 59.04552
> 
> 
> ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default)
> 
> 
> which.row <- sample(1:10,1,replace=TRUE)
> which.col  <- sample(1:20,1,replace=TRUE)
> 
> tmp5[which.row,which.col] <- NA
> 
> Max(tmp5)
[1] NA
> Min(tmp5)
[1] NA
> mean(tmp5)
[1] NA
> Sum(tmp5)
[1] NA
> Var(tmp5)
[1] NA
> 
> rowMeans(tmp5)
 [1] 89.75939 71.12481 70.70918       NA 69.48207 69.89686 68.06184 71.02270
 [9] 71.01533 71.15613
> rowSums(tmp5)
 [1] 1795.188 1422.496 1414.184       NA 1389.641 1397.937 1361.237 1420.454
 [9] 1420.307 1423.123
> rowVars(tmp5)
 [1] 8020.48079  105.16234   78.36661   46.19415   97.42841   74.79306
 [7]   62.95735   77.10367   45.42836   61.79455
> rowSd(tmp5)
 [1] 89.557137 10.254869  8.852492  6.796628  9.870583  8.648298  7.934567
 [8]  8.780869  6.740057  7.860951
> rowMax(tmp5)
 [1] 469.16746  98.71658  90.28108        NA  91.19596  85.43600  80.00769
 [8]  85.84728  83.17764  80.58235
> rowMin(tmp5)
 [1] 58.93950 58.77205 56.60121       NA 56.88120 56.45965 54.88822 56.37786
 [9] 60.37048 53.34385
> 
> colMeans(tmp5)
 [1] 113.84169  73.07137        NA  69.16649  66.46471  71.81117  70.14584
 [8]  68.70929  68.09351  73.28286  69.56936  70.00057  70.89891  70.96945
[15]  70.71168  68.99829  66.72904  68.96966  71.40037  72.88522
> colSums(tmp5)
 [1] 1138.4169  730.7137        NA  691.6649  664.6471  718.1117  701.4584
 [8]  687.0929  680.9351  732.8286  695.6936  700.0057  708.9891  709.6945
[15]  707.1168  689.9829  667.2904  689.6966  714.0037  728.8522
> colVars(tmp5)
 [1] 15656.88947    55.73052          NA    70.33306    24.31953    99.48365
 [7]    43.82410    56.82279    34.79956    48.21128    29.02500   130.71975
[13]    97.97423    49.24264    61.43557    66.65586    62.12393    69.61040
[19]   111.47199   166.66711
> colSd(tmp5)
 [1] 125.127493   7.465288         NA   8.386481   4.931484   9.974149
 [7]   6.619978   7.538089   5.899115   6.943434   5.387485  11.433274
[13]   9.898193   7.017310   7.838084   8.164304   7.881873   8.343285
[19]  10.558029  12.909962
> colMax(tmp5)
 [1] 469.16746  82.49280        NA  80.03860  74.34421  85.84728  81.28269
 [8]  82.63340  74.06327  83.17764  77.54154  90.28108  82.80506  80.58235
[15]  85.61968  80.17824  79.04901  78.37876  91.19596  98.71658
> colMin(tmp5)
 [1] 56.88120 62.78425       NA 54.88822 59.12243 56.45965 60.63268 60.14733
 [9] 55.04302 62.08762 60.66063 53.34385 58.77205 60.55640 59.85238 59.33976
[17] 56.37786 54.04626 56.60121 59.04552
> 
> Max(tmp5,na.rm=TRUE)
[1] 469.1675
> Min(tmp5,na.rm=TRUE)
[1] 53.34385
> mean(tmp5,na.rm=TRUE)
[1] 72.20369
> Sum(tmp5,na.rm=TRUE)
[1] 14368.53
> Var(tmp5,na.rm=TRUE)
[1] 867.2061
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 89.75939 71.12481 70.70918 69.68255 69.48207 69.89686 68.06184 71.02270
 [9] 71.01533 71.15613
> rowSums(tmp5,na.rm=TRUE)
 [1] 1795.188 1422.496 1414.184 1323.968 1389.641 1397.937 1361.237 1420.454
 [9] 1420.307 1423.123
> rowVars(tmp5,na.rm=TRUE)
 [1] 8020.48079  105.16234   78.36661   46.19415   97.42841   74.79306
 [7]   62.95735   77.10367   45.42836   61.79455
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.557137 10.254869  8.852492  6.796628  9.870583  8.648298  7.934567
 [8]  8.780869  6.740057  7.860951
> rowMax(tmp5,na.rm=TRUE)
 [1] 469.16746  98.71658  90.28108  82.49280  91.19596  85.43600  80.00769
 [8]  85.84728  83.17764  80.58235
> rowMin(tmp5,na.rm=TRUE)
 [1] 58.93950 58.77205 56.60121 58.36031 56.88120 56.45965 54.88822 56.37786
 [9] 60.37048 53.34385
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 113.84169  73.07137  67.92665  69.16649  66.46471  71.81117  70.14584
 [8]  68.70929  68.09351  73.28286  69.56936  70.00057  70.89891  70.96945
[15]  70.71168  68.99829  66.72904  68.96966  71.40037  72.88522
> colSums(tmp5,na.rm=TRUE)
 [1] 1138.4169  730.7137  611.3398  691.6649  664.6471  718.1117  701.4584
 [8]  687.0929  680.9351  732.8286  695.6936  700.0057  708.9891  709.6945
[15]  707.1168  689.9829  667.2904  689.6966  714.0037  728.8522
> colVars(tmp5,na.rm=TRUE)
 [1] 15656.88947    55.73052    40.07063    70.33306    24.31953    99.48365
 [7]    43.82410    56.82279    34.79956    48.21128    29.02500   130.71975
[13]    97.97423    49.24264    61.43557    66.65586    62.12393    69.61040
[19]   111.47199   166.66711
> colSd(tmp5,na.rm=TRUE)
 [1] 125.127493   7.465288   6.330136   8.386481   4.931484   9.974149
 [7]   6.619978   7.538089   5.899115   6.943434   5.387485  11.433274
[13]   9.898193   7.017310   7.838084   8.164304   7.881873   8.343285
[19]  10.558029  12.909962
> colMax(tmp5,na.rm=TRUE)
 [1] 469.16746  82.49280  75.52707  80.03860  74.34421  85.84728  81.28269
 [8]  82.63340  74.06327  83.17764  77.54154  90.28108  82.80506  80.58235
[15]  85.61968  80.17824  79.04901  78.37876  91.19596  98.71658
> colMin(tmp5,na.rm=TRUE)
 [1] 56.88120 62.78425 57.03858 54.88822 59.12243 56.45965 60.63268 60.14733
 [9] 55.04302 62.08762 60.66063 53.34385 58.77205 60.55640 59.85238 59.33976
[17] 56.37786 54.04626 56.60121 59.04552
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 89.75939 71.12481 70.70918      NaN 69.48207 69.89686 68.06184 71.02270
 [9] 71.01533 71.15613
> rowSums(tmp5,na.rm=TRUE)
 [1] 1795.188 1422.496 1414.184    0.000 1389.641 1397.937 1361.237 1420.454
 [9] 1420.307 1423.123
> rowVars(tmp5,na.rm=TRUE)
 [1] 8020.48079  105.16234   78.36661         NA   97.42841   74.79306
 [7]   62.95735   77.10367   45.42836   61.79455
> rowSd(tmp5,na.rm=TRUE)
 [1] 89.557137 10.254869  8.852492        NA  9.870583  8.648298  7.934567
 [8]  8.780869  6.740057  7.860951
> rowMax(tmp5,na.rm=TRUE)
 [1] 469.16746  98.71658  90.28108        NA  91.19596  85.43600  80.00769
 [8]  85.84728  83.17764  80.58235
> rowMin(tmp5,na.rm=TRUE)
 [1] 58.93950 58.77205 56.60121       NA 56.88120 56.45965 54.88822 56.37786
 [9] 60.37048 53.34385
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 118.79607  72.02455       NaN  69.76436  66.94348  72.67481  70.51966
 [8]  68.88769  68.21823  73.82713  69.14221  71.29393  70.44410  70.47769
[15]  70.87021  67.85678  67.22350  67.92421  70.71294  73.86806
> colSums(tmp5,na.rm=TRUE)
 [1] 1069.1646  648.2209    0.0000  627.8793  602.4913  654.0733  634.6769
 [8]  619.9892  613.9641  664.4441  622.2799  641.6453  633.9969  634.2992
[15]  637.8319  610.7110  605.0115  611.3178  636.4164  664.8126
> colVars(tmp5,na.rm=TRUE)
 [1] 17337.85929    50.36861          NA    75.10334    24.78073   103.52807
 [7]    47.73004    63.56758    38.97452    50.90508    30.60041   128.24091
[13]   107.89393    52.67747    68.83225    60.32853    67.13898    66.01570
[19]   120.08955   176.63328
> colSd(tmp5,na.rm=TRUE)
 [1] 131.673305   7.097085         NA   8.666219   4.978025  10.174875
 [7]   6.908693   7.972928   6.242957   7.134780   5.531764  11.324350
[13]  10.387200   7.257924   8.296520   7.767144   8.193838   8.125005
[19]  10.958538  13.290345
> colMax(tmp5,na.rm=TRUE)
 [1] 469.16746  80.57345      -Inf  80.03860  74.34421  85.84728  81.28269
 [8]  82.63340  74.06327  83.17764  77.54154  90.28108  82.80506  80.58235
[15]  85.61968  80.17824  79.04901  77.04484  91.19596  98.71658
> colMin(tmp5,na.rm=TRUE)
 [1] 56.88120 62.78425      Inf 54.88822 59.12243 56.45965 60.63268 60.14733
 [9] 55.04302 62.08762 60.66063 53.34385 58.77205 60.55640 59.85238 59.33976
[17] 56.37786 54.04626 56.60121 59.04552
> 
> 
> 
> 
> 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] 142.7962 279.0861 172.2666 119.9430 356.8508 185.5924 229.4717 283.3680
 [9] 272.9185 246.5640
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 142.7962 279.0861 172.2666 119.9430 356.8508 185.5924 229.4717 283.3680
 [9] 272.9185 246.5640
> 
> 
> 
> 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] -5.684342e-14 -1.421085e-14  8.526513e-14 -1.421085e-13  0.000000e+00
 [6]  1.705303e-13 -4.263256e-14 -7.105427e-14  1.136868e-13  8.526513e-14
[11] -1.421085e-14 -1.136868e-13  1.278977e-13 -4.263256e-14  1.705303e-13
[16]  2.842171e-14  1.136868e-13  0.000000e+00  0.000000e+00 -2.842171e-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   5 
1   5 
4   9 
3   19 
7   15 
9   14 
9   16 
4   12 
10   11 
5   11 
5   8 
7   18 
10   20 
6   8 
4   6 
7   20 
2   18 
10   12 
6   20 
1   14 
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.415477
> Min(tmp)
[1] -2.611223
> mean(tmp)
[1] -0.1301286
> Sum(tmp)
[1] -13.01286
> Var(tmp)
[1] 1.051415
> 
> rowMeans(tmp)
[1] -0.1301286
> rowSums(tmp)
[1] -13.01286
> rowVars(tmp)
[1] 1.051415
> rowSd(tmp)
[1] 1.025385
> rowMax(tmp)
[1] 2.415477
> rowMin(tmp)
[1] -2.611223
> 
> colMeans(tmp)
  [1] -1.37942498 -0.04996978  1.06639312  0.12039988 -0.15513551  0.75605789
  [7]  0.50226488  0.05717247  0.67854872  0.43824272 -0.63685737 -0.88024391
 [13] -1.53527165 -0.67633496 -0.56011646  1.89777169  1.00322620 -0.71224557
 [19] -1.58781933 -1.65316625  0.38277667  2.29274571 -0.30772730 -0.18845251
 [25]  0.85036323  0.43841088  0.62428878 -0.63340830  1.64565738 -1.04982114
 [31] -1.37292869 -0.78427636 -0.03226466 -0.95863765  0.60664233 -1.39022887
 [37] -0.36601588 -0.07655406  0.79493200 -0.69217262 -0.05422838 -0.62973239
 [43] -0.17945679 -1.27935166 -0.58030291 -1.00772141  2.16567442 -0.68293421
 [49]  2.41547746 -0.96657894  0.06642373 -0.66981502 -2.61122293 -1.73225260
 [55] -0.81685690  0.13638246 -0.42081764  1.16344494 -1.45445335 -0.05006732
 [61]  1.18246300  0.12970040  0.55368918 -0.96866173  1.23803436 -0.14674758
 [67]  0.12696785 -0.22865714  0.33046524 -1.49206813 -0.16611764  0.31780719
 [73] -0.99778407  1.67845891 -1.43599562 -0.15983477 -0.14346266 -1.15964421
 [79]  0.24567698 -1.86978467 -0.60375634 -0.44163918  2.20843358 -1.07072923
 [85]  0.29138137  0.85100102 -0.27037331  0.13730496 -0.15953719  0.74282969
 [91]  1.23146058  0.02763634 -0.99792064 -0.48982877 -0.01113749  1.16778673
 [97] -0.77309586 -1.23205460  1.85929998 -1.80285317
> colSums(tmp)
  [1] -1.37942498 -0.04996978  1.06639312  0.12039988 -0.15513551  0.75605789
  [7]  0.50226488  0.05717247  0.67854872  0.43824272 -0.63685737 -0.88024391
 [13] -1.53527165 -0.67633496 -0.56011646  1.89777169  1.00322620 -0.71224557
 [19] -1.58781933 -1.65316625  0.38277667  2.29274571 -0.30772730 -0.18845251
 [25]  0.85036323  0.43841088  0.62428878 -0.63340830  1.64565738 -1.04982114
 [31] -1.37292869 -0.78427636 -0.03226466 -0.95863765  0.60664233 -1.39022887
 [37] -0.36601588 -0.07655406  0.79493200 -0.69217262 -0.05422838 -0.62973239
 [43] -0.17945679 -1.27935166 -0.58030291 -1.00772141  2.16567442 -0.68293421
 [49]  2.41547746 -0.96657894  0.06642373 -0.66981502 -2.61122293 -1.73225260
 [55] -0.81685690  0.13638246 -0.42081764  1.16344494 -1.45445335 -0.05006732
 [61]  1.18246300  0.12970040  0.55368918 -0.96866173  1.23803436 -0.14674758
 [67]  0.12696785 -0.22865714  0.33046524 -1.49206813 -0.16611764  0.31780719
 [73] -0.99778407  1.67845891 -1.43599562 -0.15983477 -0.14346266 -1.15964421
 [79]  0.24567698 -1.86978467 -0.60375634 -0.44163918  2.20843358 -1.07072923
 [85]  0.29138137  0.85100102 -0.27037331  0.13730496 -0.15953719  0.74282969
 [91]  1.23146058  0.02763634 -0.99792064 -0.48982877 -0.01113749  1.16778673
 [97] -0.77309586 -1.23205460  1.85929998 -1.80285317
> 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.37942498 -0.04996978  1.06639312  0.12039988 -0.15513551  0.75605789
  [7]  0.50226488  0.05717247  0.67854872  0.43824272 -0.63685737 -0.88024391
 [13] -1.53527165 -0.67633496 -0.56011646  1.89777169  1.00322620 -0.71224557
 [19] -1.58781933 -1.65316625  0.38277667  2.29274571 -0.30772730 -0.18845251
 [25]  0.85036323  0.43841088  0.62428878 -0.63340830  1.64565738 -1.04982114
 [31] -1.37292869 -0.78427636 -0.03226466 -0.95863765  0.60664233 -1.39022887
 [37] -0.36601588 -0.07655406  0.79493200 -0.69217262 -0.05422838 -0.62973239
 [43] -0.17945679 -1.27935166 -0.58030291 -1.00772141  2.16567442 -0.68293421
 [49]  2.41547746 -0.96657894  0.06642373 -0.66981502 -2.61122293 -1.73225260
 [55] -0.81685690  0.13638246 -0.42081764  1.16344494 -1.45445335 -0.05006732
 [61]  1.18246300  0.12970040  0.55368918 -0.96866173  1.23803436 -0.14674758
 [67]  0.12696785 -0.22865714  0.33046524 -1.49206813 -0.16611764  0.31780719
 [73] -0.99778407  1.67845891 -1.43599562 -0.15983477 -0.14346266 -1.15964421
 [79]  0.24567698 -1.86978467 -0.60375634 -0.44163918  2.20843358 -1.07072923
 [85]  0.29138137  0.85100102 -0.27037331  0.13730496 -0.15953719  0.74282969
 [91]  1.23146058  0.02763634 -0.99792064 -0.48982877 -0.01113749  1.16778673
 [97] -0.77309586 -1.23205460  1.85929998 -1.80285317
> colMin(tmp)
  [1] -1.37942498 -0.04996978  1.06639312  0.12039988 -0.15513551  0.75605789
  [7]  0.50226488  0.05717247  0.67854872  0.43824272 -0.63685737 -0.88024391
 [13] -1.53527165 -0.67633496 -0.56011646  1.89777169  1.00322620 -0.71224557
 [19] -1.58781933 -1.65316625  0.38277667  2.29274571 -0.30772730 -0.18845251
 [25]  0.85036323  0.43841088  0.62428878 -0.63340830  1.64565738 -1.04982114
 [31] -1.37292869 -0.78427636 -0.03226466 -0.95863765  0.60664233 -1.39022887
 [37] -0.36601588 -0.07655406  0.79493200 -0.69217262 -0.05422838 -0.62973239
 [43] -0.17945679 -1.27935166 -0.58030291 -1.00772141  2.16567442 -0.68293421
 [49]  2.41547746 -0.96657894  0.06642373 -0.66981502 -2.61122293 -1.73225260
 [55] -0.81685690  0.13638246 -0.42081764  1.16344494 -1.45445335 -0.05006732
 [61]  1.18246300  0.12970040  0.55368918 -0.96866173  1.23803436 -0.14674758
 [67]  0.12696785 -0.22865714  0.33046524 -1.49206813 -0.16611764  0.31780719
 [73] -0.99778407  1.67845891 -1.43599562 -0.15983477 -0.14346266 -1.15964421
 [79]  0.24567698 -1.86978467 -0.60375634 -0.44163918  2.20843358 -1.07072923
 [85]  0.29138137  0.85100102 -0.27037331  0.13730496 -0.15953719  0.74282969
 [91]  1.23146058  0.02763634 -0.99792064 -0.48982877 -0.01113749  1.16778673
 [97] -0.77309586 -1.23205460  1.85929998 -1.80285317
> colMedians(tmp)
  [1] -1.37942498 -0.04996978  1.06639312  0.12039988 -0.15513551  0.75605789
  [7]  0.50226488  0.05717247  0.67854872  0.43824272 -0.63685737 -0.88024391
 [13] -1.53527165 -0.67633496 -0.56011646  1.89777169  1.00322620 -0.71224557
 [19] -1.58781933 -1.65316625  0.38277667  2.29274571 -0.30772730 -0.18845251
 [25]  0.85036323  0.43841088  0.62428878 -0.63340830  1.64565738 -1.04982114
 [31] -1.37292869 -0.78427636 -0.03226466 -0.95863765  0.60664233 -1.39022887
 [37] -0.36601588 -0.07655406  0.79493200 -0.69217262 -0.05422838 -0.62973239
 [43] -0.17945679 -1.27935166 -0.58030291 -1.00772141  2.16567442 -0.68293421
 [49]  2.41547746 -0.96657894  0.06642373 -0.66981502 -2.61122293 -1.73225260
 [55] -0.81685690  0.13638246 -0.42081764  1.16344494 -1.45445335 -0.05006732
 [61]  1.18246300  0.12970040  0.55368918 -0.96866173  1.23803436 -0.14674758
 [67]  0.12696785 -0.22865714  0.33046524 -1.49206813 -0.16611764  0.31780719
 [73] -0.99778407  1.67845891 -1.43599562 -0.15983477 -0.14346266 -1.15964421
 [79]  0.24567698 -1.86978467 -0.60375634 -0.44163918  2.20843358 -1.07072923
 [85]  0.29138137  0.85100102 -0.27037331  0.13730496 -0.15953719  0.74282969
 [91]  1.23146058  0.02763634 -0.99792064 -0.48982877 -0.01113749  1.16778673
 [97] -0.77309586 -1.23205460  1.85929998 -1.80285317
> colRanges(tmp)
          [,1]        [,2]     [,3]      [,4]       [,5]      [,6]      [,7]
[1,] -1.379425 -0.04996978 1.066393 0.1203999 -0.1551355 0.7560579 0.5022649
[2,] -1.379425 -0.04996978 1.066393 0.1203999 -0.1551355 0.7560579 0.5022649
           [,8]      [,9]     [,10]      [,11]      [,12]     [,13]     [,14]
[1,] 0.05717247 0.6785487 0.4382427 -0.6368574 -0.8802439 -1.535272 -0.676335
[2,] 0.05717247 0.6785487 0.4382427 -0.6368574 -0.8802439 -1.535272 -0.676335
          [,15]    [,16]    [,17]      [,18]     [,19]     [,20]     [,21]
[1,] -0.5601165 1.897772 1.003226 -0.7122456 -1.587819 -1.653166 0.3827767
[2,] -0.5601165 1.897772 1.003226 -0.7122456 -1.587819 -1.653166 0.3827767
        [,22]      [,23]      [,24]     [,25]     [,26]     [,27]      [,28]
[1,] 2.292746 -0.3077273 -0.1884525 0.8503632 0.4384109 0.6242888 -0.6334083
[2,] 2.292746 -0.3077273 -0.1884525 0.8503632 0.4384109 0.6242888 -0.6334083
        [,29]     [,30]     [,31]      [,32]       [,33]      [,34]     [,35]
[1,] 1.645657 -1.049821 -1.372929 -0.7842764 -0.03226466 -0.9586376 0.6066423
[2,] 1.645657 -1.049821 -1.372929 -0.7842764 -0.03226466 -0.9586376 0.6066423
         [,36]      [,37]       [,38]    [,39]      [,40]       [,41]
[1,] -1.390229 -0.3660159 -0.07655406 0.794932 -0.6921726 -0.05422838
[2,] -1.390229 -0.3660159 -0.07655406 0.794932 -0.6921726 -0.05422838
          [,42]      [,43]     [,44]      [,45]     [,46]    [,47]      [,48]
[1,] -0.6297324 -0.1794568 -1.279352 -0.5803029 -1.007721 2.165674 -0.6829342
[2,] -0.6297324 -0.1794568 -1.279352 -0.5803029 -1.007721 2.165674 -0.6829342
        [,49]      [,50]      [,51]     [,52]     [,53]     [,54]      [,55]
[1,] 2.415477 -0.9665789 0.06642373 -0.669815 -2.611223 -1.732253 -0.8168569
[2,] 2.415477 -0.9665789 0.06642373 -0.669815 -2.611223 -1.732253 -0.8168569
         [,56]      [,57]    [,58]     [,59]       [,60]    [,61]     [,62]
[1,] 0.1363825 -0.4208176 1.163445 -1.454453 -0.05006732 1.182463 0.1297004
[2,] 0.1363825 -0.4208176 1.163445 -1.454453 -0.05006732 1.182463 0.1297004
         [,63]      [,64]    [,65]      [,66]     [,67]      [,68]     [,69]
[1,] 0.5536892 -0.9686617 1.238034 -0.1467476 0.1269679 -0.2286571 0.3304652
[2,] 0.5536892 -0.9686617 1.238034 -0.1467476 0.1269679 -0.2286571 0.3304652
         [,70]      [,71]     [,72]      [,73]    [,74]     [,75]      [,76]
[1,] -1.492068 -0.1661176 0.3178072 -0.9977841 1.678459 -1.435996 -0.1598348
[2,] -1.492068 -0.1661176 0.3178072 -0.9977841 1.678459 -1.435996 -0.1598348
          [,77]     [,78]    [,79]     [,80]      [,81]      [,82]    [,83]
[1,] -0.1434627 -1.159644 0.245677 -1.869785 -0.6037563 -0.4416392 2.208434
[2,] -0.1434627 -1.159644 0.245677 -1.869785 -0.6037563 -0.4416392 2.208434
         [,84]     [,85]    [,86]      [,87]    [,88]      [,89]     [,90]
[1,] -1.070729 0.2913814 0.851001 -0.2703733 0.137305 -0.1595372 0.7428297
[2,] -1.070729 0.2913814 0.851001 -0.2703733 0.137305 -0.1595372 0.7428297
        [,91]      [,92]      [,93]      [,94]       [,95]    [,96]      [,97]
[1,] 1.231461 0.02763634 -0.9979206 -0.4898288 -0.01113749 1.167787 -0.7730959
[2,] 1.231461 0.02763634 -0.9979206 -0.4898288 -0.01113749 1.167787 -0.7730959
         [,98]  [,99]    [,100]
[1,] -1.232055 1.8593 -1.802853
[2,] -1.232055 1.8593 -1.802853
> 
> 
> Max(tmp2)
[1] 1.980888
> Min(tmp2)
[1] -2.590191
> mean(tmp2)
[1] 0.05404
> Sum(tmp2)
[1] 5.404
> Var(tmp2)
[1] 0.8073663
> 
> rowMeans(tmp2)
  [1] -0.01605422 -0.90173308  0.48928099  0.25408435  0.41533833  0.69267493
  [7] -0.36964210  1.06544084  0.53080213 -1.33203523  0.61882401  0.51319089
 [13]  0.47551181 -1.31154250  1.30467576 -0.84640494 -0.92432580 -2.33840333
 [19]  0.38176178 -0.98902548 -1.13626069  1.22932397  0.48367163  0.32000190
 [25]  1.18847117 -0.04219295 -2.59019131 -1.09880394  0.50325223  0.19795878
 [31] -0.04687016  0.84469989  1.41165407  1.03439524 -0.83518718  0.17205862
 [37] -0.01344979 -0.96277722  0.93868628 -0.93903543  1.05703487 -0.29298907
 [43]  0.59095029  0.61971564 -0.37171112 -0.42425826  0.76674365 -0.01290810
 [49]  1.59298479  0.76408228 -0.88164879  0.08577449  0.44737774  0.72079633
 [55] -0.53685502 -0.31451319 -1.16052356  1.01053143 -0.36507351 -1.53038341
 [61] -0.03976565  0.42052678  0.73834249  0.74005867  0.83071962  0.11980125
 [67] -1.48404208  0.25639810 -0.06446679  1.26743488 -0.69878595 -0.29259665
 [73]  0.73504897  1.98088835 -0.44016152 -0.21021053  1.37050651 -1.06163690
 [79] -0.44227774  0.45924042 -0.31029334 -0.26674534  0.71684868 -0.15079972
 [85]  1.59201470 -0.40828158 -0.50538399 -0.89887601  1.13258125 -0.31356557
 [91] -0.55015892  1.77232052 -1.64640288  0.61233294 -1.07451360  0.66864157
 [97] -0.56317883  0.18116408  0.02849639  1.06582570
> rowSums(tmp2)
  [1] -0.01605422 -0.90173308  0.48928099  0.25408435  0.41533833  0.69267493
  [7] -0.36964210  1.06544084  0.53080213 -1.33203523  0.61882401  0.51319089
 [13]  0.47551181 -1.31154250  1.30467576 -0.84640494 -0.92432580 -2.33840333
 [19]  0.38176178 -0.98902548 -1.13626069  1.22932397  0.48367163  0.32000190
 [25]  1.18847117 -0.04219295 -2.59019131 -1.09880394  0.50325223  0.19795878
 [31] -0.04687016  0.84469989  1.41165407  1.03439524 -0.83518718  0.17205862
 [37] -0.01344979 -0.96277722  0.93868628 -0.93903543  1.05703487 -0.29298907
 [43]  0.59095029  0.61971564 -0.37171112 -0.42425826  0.76674365 -0.01290810
 [49]  1.59298479  0.76408228 -0.88164879  0.08577449  0.44737774  0.72079633
 [55] -0.53685502 -0.31451319 -1.16052356  1.01053143 -0.36507351 -1.53038341
 [61] -0.03976565  0.42052678  0.73834249  0.74005867  0.83071962  0.11980125
 [67] -1.48404208  0.25639810 -0.06446679  1.26743488 -0.69878595 -0.29259665
 [73]  0.73504897  1.98088835 -0.44016152 -0.21021053  1.37050651 -1.06163690
 [79] -0.44227774  0.45924042 -0.31029334 -0.26674534  0.71684868 -0.15079972
 [85]  1.59201470 -0.40828158 -0.50538399 -0.89887601  1.13258125 -0.31356557
 [91] -0.55015892  1.77232052 -1.64640288  0.61233294 -1.07451360  0.66864157
 [97] -0.56317883  0.18116408  0.02849639  1.06582570
> rowVars(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowSd(tmp2)
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> rowMax(tmp2)
  [1] -0.01605422 -0.90173308  0.48928099  0.25408435  0.41533833  0.69267493
  [7] -0.36964210  1.06544084  0.53080213 -1.33203523  0.61882401  0.51319089
 [13]  0.47551181 -1.31154250  1.30467576 -0.84640494 -0.92432580 -2.33840333
 [19]  0.38176178 -0.98902548 -1.13626069  1.22932397  0.48367163  0.32000190
 [25]  1.18847117 -0.04219295 -2.59019131 -1.09880394  0.50325223  0.19795878
 [31] -0.04687016  0.84469989  1.41165407  1.03439524 -0.83518718  0.17205862
 [37] -0.01344979 -0.96277722  0.93868628 -0.93903543  1.05703487 -0.29298907
 [43]  0.59095029  0.61971564 -0.37171112 -0.42425826  0.76674365 -0.01290810
 [49]  1.59298479  0.76408228 -0.88164879  0.08577449  0.44737774  0.72079633
 [55] -0.53685502 -0.31451319 -1.16052356  1.01053143 -0.36507351 -1.53038341
 [61] -0.03976565  0.42052678  0.73834249  0.74005867  0.83071962  0.11980125
 [67] -1.48404208  0.25639810 -0.06446679  1.26743488 -0.69878595 -0.29259665
 [73]  0.73504897  1.98088835 -0.44016152 -0.21021053  1.37050651 -1.06163690
 [79] -0.44227774  0.45924042 -0.31029334 -0.26674534  0.71684868 -0.15079972
 [85]  1.59201470 -0.40828158 -0.50538399 -0.89887601  1.13258125 -0.31356557
 [91] -0.55015892  1.77232052 -1.64640288  0.61233294 -1.07451360  0.66864157
 [97] -0.56317883  0.18116408  0.02849639  1.06582570
> rowMin(tmp2)
  [1] -0.01605422 -0.90173308  0.48928099  0.25408435  0.41533833  0.69267493
  [7] -0.36964210  1.06544084  0.53080213 -1.33203523  0.61882401  0.51319089
 [13]  0.47551181 -1.31154250  1.30467576 -0.84640494 -0.92432580 -2.33840333
 [19]  0.38176178 -0.98902548 -1.13626069  1.22932397  0.48367163  0.32000190
 [25]  1.18847117 -0.04219295 -2.59019131 -1.09880394  0.50325223  0.19795878
 [31] -0.04687016  0.84469989  1.41165407  1.03439524 -0.83518718  0.17205862
 [37] -0.01344979 -0.96277722  0.93868628 -0.93903543  1.05703487 -0.29298907
 [43]  0.59095029  0.61971564 -0.37171112 -0.42425826  0.76674365 -0.01290810
 [49]  1.59298479  0.76408228 -0.88164879  0.08577449  0.44737774  0.72079633
 [55] -0.53685502 -0.31451319 -1.16052356  1.01053143 -0.36507351 -1.53038341
 [61] -0.03976565  0.42052678  0.73834249  0.74005867  0.83071962  0.11980125
 [67] -1.48404208  0.25639810 -0.06446679  1.26743488 -0.69878595 -0.29259665
 [73]  0.73504897  1.98088835 -0.44016152 -0.21021053  1.37050651 -1.06163690
 [79] -0.44227774  0.45924042 -0.31029334 -0.26674534  0.71684868 -0.15079972
 [85]  1.59201470 -0.40828158 -0.50538399 -0.89887601  1.13258125 -0.31356557
 [91] -0.55015892  1.77232052 -1.64640288  0.61233294 -1.07451360  0.66864157
 [97] -0.56317883  0.18116408  0.02849639  1.06582570
> 
> colMeans(tmp2)
[1] 0.05404
> colSums(tmp2)
[1] 5.404
> colVars(tmp2)
[1] 0.8073663
> colSd(tmp2)
[1] 0.8985357
> colMax(tmp2)
[1] 1.980888
> colMin(tmp2)
[1] -2.590191
> colMedians(tmp2)
[1] 0.1027879
> colRanges(tmp2)
          [,1]
[1,] -2.590191
[2,]  1.980888
> 
> 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.636551 -1.594505  1.042234 -0.641748 -2.736314 -2.269830  2.294908
 [8] -5.019328 -0.262950  6.312247
> colApply(tmp,quantile)[,1]
            [,1]
[1,] -1.33852799
[2,] -0.49904522
[3,] -0.08616287
[4,]  0.07541835
[5,]  0.44989754
> 
> rowApply(tmp,sum)
 [1]  0.8647655  0.5317161  1.5810406 -3.6916320  1.9480802 -1.0147964
 [7]  0.4220028 -1.8625277 -1.2504680 -3.0400182
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    8    7    6    6    4    3    6    2    2     7
 [2,]    9    1   10    3    8    1    4    9    1     8
 [3,]    3    8    3    2   10    5   10    8    4     1
 [4,]    1   10    2    8    9    8    1    5    5     4
 [5,]    6    5    7    7    1    4    8    4    3     6
 [6,]    2    9    5    1    3    7    3    7   10     3
 [7,]    5    2    1    9    7    9    5   10    8    10
 [8,]    4    3    4    4    5    2    2    1    9     9
 [9,]    7    6    8    5    2    6    9    3    6     2
[10,]   10    4    9   10    6   10    7    6    7     5
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1]  7.45352060  1.79966651 -1.22816295 -3.56929649  1.73715434  1.60324300
 [7] -1.89172375 -2.93257663  2.81975846  3.11698955 -0.66373363  2.45622697
[13]  0.15257716  0.46160388 -0.57268553  2.22141144  0.04466835 -0.38012036
[19]  1.25239520  0.39899537
> colApply(tmp,quantile)[,1]
          [,1]
[1,] 0.7440107
[2,] 0.7447726
[3,] 1.4401054
[4,] 1.4510179
[5,] 3.0736140
> 
> rowApply(tmp,sum)
[1]  4.614225  0.745951  8.885568  1.663277 -1.629109
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   20   18   20   15   19
[2,]   14    2   15    3   20
[3,]    6   11    2    6   17
[4,]    3    7    4    1   16
[5,]   13   13   12   16    6
> 
> 
> as.matrix(tmp)
          [,1]       [,2]       [,3]       [,4]       [,5]       [,6]
[1,] 1.4401054  0.7627322 -0.3712505 -1.0321934  0.7391669  1.1016203
[2,] 0.7447726 -0.8521202  0.1105176 -0.2208850  0.2638170  0.5591680
[3,] 3.0736140  1.1797812 -0.9933538 -0.7529777  0.6573298  0.4487382
[4,] 0.7440107 -0.9653105 -0.7274765 -2.0000667  0.9263139  0.6207671
[5,] 1.4510179  1.6745837  0.7534002  0.4368264 -0.8494732 -1.1270506
           [,7]       [,8]       [,9]        [,10]       [,11]       [,12]
[1,] -0.4768720 -1.4209738 -0.6690931 -0.008718315  0.40001711  1.33920107
[2,] -0.2569122 -0.9767248  0.5805382  0.144140345 -0.65099360 -0.14699864
[3,]  0.5605671  0.4789785  0.1454575  1.380565163  0.84362766  0.97572995
[4,] -0.7504536 -0.6926489  1.5809976  1.484921547 -0.02071443  0.05054942
[5,] -0.9680530 -0.3212077  1.1818582  0.116080812 -1.23567036  0.23774518
           [,13]       [,14]      [,15]      [,16]      [,17]       [,18]
[1,] -1.17128895  0.79727675  0.2996038  0.4714391  1.0667759  0.20996983
[2,]  0.06133708  0.38151973 -0.8145094  0.4260469 -0.4827647  0.98995839
[3,] -0.51695629  0.27683509  1.4530111  1.2188736 -1.1771759 -0.73010205
[4,]  1.66023193 -0.02100243 -1.0353110  0.5528160  1.3247127  0.06438208
[5,]  0.11925340 -0.97302526 -0.4754801 -0.4477642 -0.6868797 -0.91432860
          [,19]      [,20]
[1,]  1.2617606 -0.1250543
[2,]  0.7838596  0.1021842
[3,] -0.9454101  1.3084345
[4,] -0.1978927 -0.9355493
[5,]  0.3500778  0.0489803
> 
> 
> 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 :  629  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 :  545  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.08914 0.8163575 0.424424 -1.410219 0.6841998 -1.806433 1.217479
          col8       col9    col10      col11     col12     col13      col14
row1 0.1556712 -0.6194718 0.898636 -0.3121604 0.1156885 0.1021986 -0.9099012
          col15      col16     col17      col18    col19    col20
row1 -0.9415544 -0.7020483 0.7114559 -0.7497748 1.475884 1.021674
> tmp[,"col10"]
          col10
row1  0.8986360
row2  2.3925094
row3 -0.9472241
row4 -0.6009762
row5 -0.2363932
> tmp[c("row1","row5"),]
          col1       col2      col3      col4        col5       col6      col7
row1  1.089140  0.8163575  0.424424 -1.410219  0.68419985 -1.8064327  1.217479
row5 -1.607931 -1.4378134 -1.501387  0.950917 -0.01306025  0.6056944 -0.707213
           col8       col9      col10       col11      col12      col13
row1  0.1556712 -0.6194718  0.8986360 -0.31216038  0.1156885  0.1021986
row5 -0.9312095  1.4904559 -0.2363932 -0.02731519 -0.2323611 -0.3557288
          col14      col15      col16     col17      col18      col19
row1 -0.9099012 -0.9415544 -0.7020483 0.7114559 -0.7497748  1.4758844
row5 -1.9054244 -1.1312127 -0.9186877 0.7871191  0.4312378 -0.8600665
           col20
row1  1.02167443
row5 -0.06560455
> tmp[,c("col6","col20")]
           col6       col20
row1 -1.8064327  1.02167443
row2  1.0701900  0.81490780
row3  0.4870237  1.91539015
row4  0.7368208 -0.91194992
row5  0.6056944 -0.06560455
> tmp[c("row1","row5"),c("col6","col20")]
           col6       col20
row1 -1.8064327  1.02167443
row5  0.6056944 -0.06560455
> 
> 
> 
> 
> 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 51.16737 50.96955 52.04141 49.47387 49.83146 105.9666 48.75871 51.36124
        col9   col10    col11    col12    col13    col14    col15    col16
row1 49.5713 49.2078 50.14719 50.62559 51.14958 48.80569 50.43984 49.51198
        col17    col18    col19    col20
row1 48.55478 50.34598 49.04943 104.4975
> tmp[,"col10"]
        col10
row1 49.20780
row2 30.76829
row3 31.56703
row4 28.92165
row5 49.82470
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 51.16737 50.96955 52.04141 49.47387 49.83146 105.9666 48.75871 51.36124
row5 51.26883 49.92264 49.33080 50.97475 48.95976 104.4751 50.91069 49.15852
         col9   col10    col11    col12    col13    col14    col15    col16
row1 49.57130 49.2078 50.14719 50.62559 51.14958 48.80569 50.43984 49.51198
row5 49.59144 49.8247 50.73446 50.57916 50.07280 51.03793 50.34135 49.29535
        col17    col18    col19    col20
row1 48.55478 50.34598 49.04943 104.4975
row5 50.20079 50.94039 49.05035 104.8642
> tmp[,c("col6","col20")]
          col6     col20
row1 105.96657 104.49751
row2  75.34104  75.26262
row3  76.90406  75.49323
row4  74.14481  75.73179
row5 104.47515 104.86417
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 105.9666 104.4975
row5 104.4751 104.8642
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 105.9666 104.4975
row5 104.4751 104.8642
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,]  0.8853468
[2,] -1.0198364
[3,]  0.0122590
[4,] -1.3911035
[5,] -0.4083190
> tmp[,c("col17","col7")]
          col17        col7
[1,] -0.9428814 -0.44801876
[2,]  0.2598380  0.24824635
[3,] -1.4954198 -0.24210243
[4,] -0.3288581 -0.09135052
[5,]  1.4883913 -0.50130108
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6      col20
[1,] -1.3871861 -1.0256896
[2,]  0.6821950  0.5872991
[3,]  0.7606886 -0.1852059
[4,] -0.3986684 -1.4261836
[5,] -1.3221924 -1.7239057
> subBufferedMatrix(tmp,1,c("col6"))[,1]
          col1
[1,] -1.387186
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
          col6
[1,] -1.387186
[2,]  0.682195
> 
> 
> 
> 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 1.0614067 0.40265916 -0.0565156 -2.209623 -0.3170172 0.06926083 1.118966
row1 0.2537382 0.07020148 -1.1226004  1.257691 -1.8295290 0.23739616 2.682400
           [,8]        [,9]      [,10]      [,11]      [,12]     [,13]
row3  0.7622414  1.21899967  0.4054358 -0.3152710  1.4796378 0.3895622
row1 -0.1805293 -0.05478815 -0.1936880  0.9312105 -0.1431108 1.0505348
         [,14]      [,15]    [,16]      [,17]     [,18]      [,19]      [,20]
row3 0.4091478 -0.5779791 1.212869  1.4333041 1.3469983 -0.5346701  2.0142506
row1 0.3635379 -0.5519007 1.003649 -0.7781854 0.2302923 -1.6332642 -0.2468273
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
           [,1]       [,2]      [,3]      [,4]       [,5]     [,6]      [,7]
row2 -0.3206689 -0.7418561 0.5735365 0.9986627 -0.3516869 1.809125 -0.668289
          [,8]      [,9]      [,10]
row2 0.7537436 -1.483081 0.04094977
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
          [,1]       [,2]      [,3]    [,4]       [,5]        [,6]      [,7]
row5 0.9539458 -0.2955144 -1.197465 1.04139 -0.9435775 -0.09617776 0.5041926
           [,8]      [,9]     [,10]    [,11]     [,12]      [,13]      [,14]
row5 -0.4084017 -0.465893 0.3101879 1.581278 0.2611458 -0.2831311 -0.3976889
          [,15]     [,16]     [,17]    [,18]     [,19]    [,20]
row5 -0.2064482 0.7386692 0.7547232 1.092594 -1.005721 1.452392
> 
> 
> 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: 0x00000165cdeff7d0>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a2069b07c03"
 [2] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a20476929c8"
 [3] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a2011e55514"
 [4] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a205d64418e"
 [5] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a205b36f87" 
 [6] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a2036b21cec"
 [7] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a2019fb2aca"
 [8] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a205ad873eb"
 [9] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a207af1454e"
[10] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a205566f95" 
[11] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a205ac66096"
[12] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a2069716ead"
[13] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a207384b8e" 
[14] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a20633529d" 
[15] "F:/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests\\BM20a206039471d"
> 
> 
> ### 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: 0x00000165d07ffad0>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x00000165d07ffad0>
Warning message:
In dir.create(new.directory) :
  'F:\biocbuild\bbs-3.20-bioc\meat\BufferedMatrix.Rcheck\tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x00000165d07ffad0>
> rowMedians(tmp)
  [1]  0.400119193  0.356945619 -0.098652227 -0.132811612 -0.195725841
  [6] -0.190817704 -0.462930191  0.130244141  0.118453763  0.334865540
 [11] -0.123804355  0.038602536  0.512109826  0.128340570  0.129848680
 [16] -0.154816484 -0.299061479  0.244186540 -0.143327460 -0.513979746
 [21] -0.281481816  0.269686536  0.112300856 -0.274224729 -0.003116759
 [26]  0.359627598  0.155825186 -0.210714319 -0.219818892  0.130588547
 [31]  0.063226282 -0.073238474 -0.342599776 -0.214631059 -0.199032701
 [36] -0.316586765  0.190454515  0.602537091  0.095032016  0.111658277
 [41]  0.189484037 -0.343624317  0.069097188  0.516434762 -0.096292274
 [46] -0.254949263 -0.092042412  0.151166793  0.514236309 -0.028000417
 [51] -0.424211453  0.002295820 -0.002208157 -0.125608834  0.352614149
 [56]  0.476758937 -0.040748949  0.569984049  0.041635058 -0.171393174
 [61] -0.471935115 -0.256494444 -0.500002329 -0.113362903  0.035346849
 [66]  0.311054477  0.179947691  0.534527401  0.034884973  0.225354931
 [71] -0.108433893  0.475432345  0.403009751  0.017810078 -0.053823862
 [76]  0.425662462  0.093437719 -0.127879440  0.387986595 -0.067343310
 [81]  0.314228658  0.079322226  0.433388962  1.002029366 -0.249369492
 [86] -0.304326242 -0.675894563  0.423175480 -0.297800119  0.906109502
 [91]  0.260022864  0.119692605 -0.624123098  0.424234148 -0.347811058
 [96]  0.014728484  0.013237418  0.110517489 -0.583398964  0.368940349
[101]  0.196575710  0.158503115  0.273817828  0.323176463  0.224800756
[106] -0.519452063  0.015015695  0.107334826  0.650965678 -0.224889820
[111] -0.127450122 -0.427700264 -0.286884260  0.224955265 -0.315980633
[116]  0.206338775 -0.213286537  0.560937902  0.035891363  0.033105608
[121] -0.199862717 -0.283172007 -0.050799608  0.369570909 -0.324598390
[126] -0.292151956  0.230115307  0.193026070 -0.274273928  0.146295226
[131]  0.464781761  0.180048629 -0.371271258 -0.019423640  0.021103963
[136] -0.123595561 -0.326356247 -0.483640193 -0.515969079  0.191822285
[141]  0.130852886  0.480994759  0.288695111  0.104026089 -0.467074023
[146] -0.044626109  0.288637367 -0.200235804  0.226640829  0.140145081
[151]  0.301738598 -0.492289512 -0.193939380  0.281207460  0.063924634
[156]  0.183627423 -0.701077693 -0.130645400  0.027573822 -0.011864571
[161]  0.022204260 -0.108626854 -0.183750592  0.078776537  0.281684912
[166] -0.312287448  0.382226964  0.285083963  0.107886832 -0.038353004
[171]  0.056537419 -0.012136676  0.463901550 -0.074162983  0.215233132
[176] -0.277874837  0.783845726  0.009541820  0.356768581 -0.207142837
[181]  0.894308928  0.013467348  0.174016077  0.069285898  0.617945132
[186] -0.365997766 -0.185335085  0.589683261  0.487365845 -0.349648399
[191]  0.318490440  0.325769628  0.361258276 -0.128331024 -0.395995077
[196] -0.075095450 -0.430662037  0.143581598 -0.213437266 -0.170308758
[201]  0.053429533  0.363593192  0.097214467  0.211557260 -0.131604096
[206] -0.059411570 -0.171823262 -0.389222087 -0.299703707 -0.125505509
[211]  0.060029772 -0.295381399  0.478713750 -0.079720450 -0.100653844
[216]  0.244653480 -0.299864239 -0.689288710 -0.006059408  0.002335893
[221]  0.114902294 -0.217226824  0.015277577 -0.075374611  0.109386921
[226]  0.165364856 -0.114352367  0.057511916 -0.030048808  0.236581647
> 
> proc.time()
   user  system elapsed 
   3.82   14.51  105.51 

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: 0x0000019a67aff110>
> .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: 0x0000019a67aff110>
> .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: 0x0000019a67aff110>
> .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: 0x0000019a67aff110>
> 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: 0x0000019a67aff710>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000019a67aff710>
> .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: 0x0000019a67aff710>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000019a67aff710>
> .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: 0x0000019a67aff710>
> 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: 0x0000019a67aff1d0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000019a67aff1d0>
> .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: 0x0000019a67aff1d0>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x0000019a67aff1d0>
> .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: 0x0000019a67aff1d0>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x0000019a67aff1d0>
> .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: 0x0000019a67aff1d0>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x0000019a67aff1d0>
> .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: 0x0000019a67aff1d0>
> 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: 0x0000019a67aff230>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x0000019a67aff230>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000019a67aff230>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000019a67aff230>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFilea2201a4b7a4f" "BufferedMatrixFilea2206f8c4e28"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFilea2201a4b7a4f" "BufferedMatrixFilea2206f8c4e28"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000019a67aff8f0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000019a67aff8f0>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x0000019a67aff8f0>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x0000019a67aff8f0>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x0000019a67aff8f0>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x0000019a67aff8f0>
> .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: 0x0000019a67affbf0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x0000019a67affbf0>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x0000019a67affbf0>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x0000019a67affbf0>
> 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: 0x0000019a67aff470>
> .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: 0x0000019a67aff470>
> rm(P)
> 
> proc.time()
   user  system elapsed 
   0.31    0.14    0.67 

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.34    0.03    0.35 

Example timings