Back to Build/check report for BioC 3.23:   simplified   long
A[B]CDEFGHIJKLMNOPQRSTUVWXYZ

This page was generated on 2026-02-21 11:32 -0500 (Sat, 21 Feb 2026).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo1Linux (Ubuntu 24.04.3 LTS)x86_64R Under development (unstable) (2026-01-15 r89304) -- "Unsuffered Consequences" 4871
Click on any hostname to see more info about the system (e.g. compilers)      (*) as reported by 'uname -p', except on Windows and Mac OS X

Package 255/2354HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
BufferedMatrix 1.75.0  (landing page)
Ben Bolstad
Snapshot Date: 2026-02-20 13:40 -0500 (Fri, 20 Feb 2026)
git_url: https://git.bioconductor.org/packages/BufferedMatrix
git_branch: devel
git_last_commit: ecdbf23
git_last_commit_date: 2025-10-29 09:58:55 -0500 (Wed, 29 Oct 2025)
nebbiolo1Linux (Ubuntu 24.04.3 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
See other builds for BufferedMatrix in R Universe.


CHECK results for BufferedMatrix on nebbiolo1

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

raw results


Summary

Package: BufferedMatrix
Version: 1.75.0
Command: /home/biocbuild/bbs-3.23-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.23-bioc/R/site-library --timings BufferedMatrix_1.75.0.tar.gz
StartedAt: 2026-02-20 21:46:22 -0500 (Fri, 20 Feb 2026)
EndedAt: 2026-02-20 21:46:47 -0500 (Fri, 20 Feb 2026)
EllapsedTime: 25.1 seconds
RetCode: 0
Status:   OK  
CheckDir: BufferedMatrix.Rcheck
Warnings: 0

Command output

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


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

Status: 1 NOTE
See
  ‘/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/00check.log’
for details.


Installation output

BufferedMatrix.Rcheck/00install.out

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


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

Tests output

BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout


R Under development (unstable) (2026-01-15 r89304) -- "Unsuffered Consequences"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

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

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

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

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

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

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

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

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

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

[[1]]
[1] 0

> 
> proc.time()
   user  system elapsed 
  0.242   0.047   0.279 

BufferedMatrix.Rcheck/tests/objectTesting.Rout


R Under development (unstable) (2026-01-15 r89304) -- "Unsuffered Consequences"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> 
> ### this is used to control how many repetitions in something below
> ### higher values result in more checks.
> nreps <-100 ##20000
> 
> 
> ## test creation and some simple assignments and subsetting operations
> 
> ## first on single elements
> tmp <- createBufferedMatrix(1000,10)
> 
> tmp[10,5]
[1] 0
> tmp[10,5] <- 10
> tmp[10,5]
[1] 10
> tmp[10,5] <- 12.445
> tmp[10,5]
[1] 12.445
> 
> 
> 
> ## now testing accessing multiple elements
> tmp2 <- createBufferedMatrix(10,20)
> 
> 
> tmp2[3,1] <- 51.34
> tmp2[9,2] <- 9.87654
> tmp2[,1:2]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[,-(3:20)]
       [,1]    [,2]
 [1,]  0.00 0.00000
 [2,]  0.00 0.00000
 [3,] 51.34 0.00000
 [4,]  0.00 0.00000
 [5,]  0.00 0.00000
 [6,]  0.00 0.00000
 [7,]  0.00 0.00000
 [8,]  0.00 0.00000
 [9,]  0.00 9.87654
[10,]  0.00 0.00000
> tmp2[3,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,] 51.34    0    0    0    0    0    0    0    0     0     0     0     0
     [,14] [,15] [,16] [,17] [,18] [,19] [,20]
[1,]     0     0     0     0     0     0     0
> tmp2[-3,]
      [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]    0 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]    0 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19] [,20]
 [1,]     0     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0     0
> tmp2[2,1:3]
     [,1] [,2] [,3]
[1,]    0    0    0
> tmp2[3:9,1:3]
      [,1]    [,2] [,3]
[1,] 51.34 0.00000    0
[2,]  0.00 0.00000    0
[3,]  0.00 0.00000    0
[4,]  0.00 0.00000    0
[5,]  0.00 0.00000    0
[6,]  0.00 0.00000    0
[7,]  0.00 9.87654    0
> tmp2[-4,-4]
       [,1]    [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [2,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [3,] 51.34 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [4,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [5,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [6,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [7,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
 [8,]  0.00 9.87654    0    0    0    0    0    0    0     0     0     0     0
 [9,]  0.00 0.00000    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19]
 [1,]     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0
 [4,]     0     0     0     0     0     0
 [5,]     0     0     0     0     0     0
 [6,]     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0
 [9,]     0     0     0     0     0     0
> 
> ## now testing accessing/assigning multiple elements
> tmp3 <- createBufferedMatrix(10,10)
> 
> for (i in 1:10){
+   for (j in 1:10){
+     tmp3[i,j] <- (j-1)*10 + i
+   }
+ }
> 
> tmp3[2:4,2:4]
     [,1] [,2] [,3]
[1,]   12   22   32
[2,]   13   23   33
[3,]   14   24   34
> tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]   11   21   31   11   21   31   91    1   11     1    11    21    31
 [2,]   12   22   32   12   22   32   92    2   12     2    12    22    32
 [3,]   13   23   33   13   23   33   93    3   13     3    13    23    33
 [4,]   14   24   34   14   24   34   94    4   14     4    14    24    34
 [5,]   15   25   35   15   25   35   95    5   15     5    15    25    35
 [6,]   16   26   36   16   26   36   96    6   16     6    16    26    36
 [7,]   17   27   37   17   27   37   97    7   17     7    17    27    37
 [8,]   18   28   38   18   28   38   98    8   18     8    18    28    38
 [9,]   19   29   39   19   29   39   99    9   19     9    19    29    39
      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
 [1,]    41    51    61    71    81    91    91    81    71    61    51    41
 [2,]    42    52    62    72    82    92    92    82    72    62    52    42
 [3,]    43    53    63    73    83    93    93    83    73    63    53    43
 [4,]    44    54    64    74    84    94    94    84    74    64    54    44
 [5,]    45    55    65    75    85    95    95    85    75    65    55    45
 [6,]    46    56    66    76    86    96    96    86    76    66    56    46
 [7,]    47    57    67    77    87    97    97    87    77    67    57    47
 [8,]    48    58    68    78    88    98    98    88    78    68    58    48
 [9,]    49    59    69    79    89    99    99    89    79    69    59    49
      [,26] [,27] [,28] [,29]
 [1,]    31    21    11     1
 [2,]    32    22    12     2
 [3,]    33    23    13     3
 [4,]    34    24    14     4
 [5,]    35    25    15     5
 [6,]    36    26    16     6
 [7,]    37    27    17     7
 [8,]    38    28    18     8
 [9,]    39    29    19     9
> tmp3[-c(1:5),-c(6:10)]
     [,1] [,2] [,3] [,4] [,5]
[1,]    6   16   26   36   46
[2,]    7   17   27   37   47
[3,]    8   18   28   38   48
[4,]    9   19   29   39   49
[5,]   10   20   30   40   50
> 
> ## assignment of whole columns
> tmp3[,1] <- c(1:10*100.0)
> tmp3[,1:2] <- tmp3[,1:2]*100
> tmp3[,1:2] <- tmp3[,2:1]
> tmp3[,1:2]
      [,1]  [,2]
 [1,] 1100 1e+04
 [2,] 1200 2e+04
 [3,] 1300 3e+04
 [4,] 1400 4e+04
 [5,] 1500 5e+04
 [6,] 1600 6e+04
 [7,] 1700 7e+04
 [8,] 1800 8e+04
 [9,] 1900 9e+04
[10,] 2000 1e+05
> 
> 
> tmp3[,-1] <- tmp3[,1:9]
> tmp3[,1:10]
      [,1] [,2]  [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,] 1100 1100 1e+04   21   31   41   51   61   71    81
 [2,] 1200 1200 2e+04   22   32   42   52   62   72    82
 [3,] 1300 1300 3e+04   23   33   43   53   63   73    83
 [4,] 1400 1400 4e+04   24   34   44   54   64   74    84
 [5,] 1500 1500 5e+04   25   35   45   55   65   75    85
 [6,] 1600 1600 6e+04   26   36   46   56   66   76    86
 [7,] 1700 1700 7e+04   27   37   47   57   67   77    87
 [8,] 1800 1800 8e+04   28   38   48   58   68   78    88
 [9,] 1900 1900 9e+04   29   39   49   59   69   79    89
[10,] 2000 2000 1e+05   30   40   50   60   70   80    90
> 
> tmp3[,1:2] <- rep(1,10)
> tmp3[,1:2] <- rep(1,20)
> tmp3[,1:2] <- matrix(c(1:5),1,5)
> 
> tmp3[,-c(1:8)] <- matrix(c(1:5),1,5)
> 
> tmp3[1,] <- 1:10
> tmp3[1,]
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    1    2    3    4    5    6    7    8    9    10
> tmp3[-1,] <- c(1,2)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    2    1    2    1    2    1    2    1    2     1
[10,]    1    2    1    2    1    2    1    2    1     2
> tmp3[-c(1:8),] <- matrix(c(1:5),1,5)
> tmp3[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    1    2    3    4    5    6    7    8    9    10
 [2,]    1    2    1    2    1    2    1    2    1     2
 [3,]    2    1    2    1    2    1    2    1    2     1
 [4,]    1    2    1    2    1    2    1    2    1     2
 [5,]    2    1    2    1    2    1    2    1    2     1
 [6,]    1    2    1    2    1    2    1    2    1     2
 [7,]    2    1    2    1    2    1    2    1    2     1
 [8,]    1    2    1    2    1    2    1    2    1     2
 [9,]    1    3    5    2    4    1    3    5    2     4
[10,]    2    4    1    3    5    2    4    1    3     5
> 
> 
> tmp3[1:2,1:2] <- 5555.04
> tmp3[-(1:2),1:2] <- 1234.56789
> 
> 
> 
> ## testing accessors for the directory and prefix
> directory(tmp3)
[1] "/home/biocbuild/bbs-3.23-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 478920 25.6    1048721 56.1   639242 34.2
Vcells 885815  6.8    8388608 64.0  2083259 15.9
> 
> 
> 
> 
> ##
> ## checking reads
> ##
> 
> tmp2 <- createBufferedMatrix(10,20)
> 
> test.sample <- rnorm(10*20)
> 
> tmp2[1:10,1:20] <- test.sample
> 
> test.matrix <- matrix(test.sample,10,20)
> 
> ## testing reads
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Fri Feb 20 21:46:37 2026"
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> date()
[1] "Fri Feb 20 21:46:37 2026"
> 
> 
> 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: 0x62c20c5b9c10>
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   which.col <- sample(1:20,1)
+   if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,1)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,1)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[,which.col] == test.matrix[,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> 
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   if (!all(tmp2[which.row,] == test.matrix[which.row,])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> 
> 
> date()
[1] "Fri Feb 20 21:46:37 2026"
> for (rep in 1:nreps){
+   which.row <- sample(1:10,5,replace=TRUE)
+   which.col <- sample(1:20,5,replace=TRUE)
+   if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){
+     cat("incorrect agreement")
+     break;
+   }
+ }
> date()
[1] "Fri Feb 20 21:46:38 2026"
> 
> ColMode(tmp2)
<pointer: 0x62c20c5b9c10>
> 
> 
> 
> ### 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,] 101.2912943  0.8172907 -2.2525284 -0.8946943
[2,]  -1.1195739 -0.8965155  1.1208748 -0.2611970
[3,]   0.3915493 -1.5382065 -0.8864368  0.7788925
[4,]   0.1211340 -0.1521028  0.4889909  1.3887567
> ewApply(tmp5,abs)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
            [,1]      [,2]      [,3]      [,4]
[1,] 101.2912943 0.8172907 2.2525284 0.8946943
[2,]   1.1195739 0.8965155 1.1208748 0.2611970
[3,]   0.3915493 1.5382065 0.8864368 0.7788925
[4,]   0.1211340 0.1521028 0.4889909 1.3887567
> ewApply(tmp5,sqrt)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]      [,2]      [,3]      [,4]
[1,] 10.064358 0.9040413 1.5008426 0.9458828
[2,]  1.058099 0.9468450 1.0587138 0.5110743
[3,]  0.625739 1.2402445 0.9415077 0.8825489
[4,]  0.348043 0.3900036 0.6992788 1.1784552
> 
> my.function <- function(x,power){
+   (x+5)^power
+ }
> 
> ewApply(tmp5,my.function,power=2)
BufferedMatrix object
Matrix size:  10 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  2  Kilobytes.
Disk usage :  1.6  Kilobytes.
> tmp5[1:4,1:4]
          [,1]     [,2]     [,3]     [,4]
[1,] 226.93487 34.85770 42.26095 35.35352
[2,]  36.70057 35.36497 36.70801 30.37194
[3,]  31.64894 38.94065 35.30151 34.60438
[4,]  28.60156 29.05214 32.48178 38.17331
> 
> 
> 
> ## testing functions that elementwise transform the matrix
> sqrt(tmp5)
<pointer: 0x62c20d0a4820>
> exp(tmp5)
<pointer: 0x62c20d0a4820>
> log(tmp5,2)
<pointer: 0x62c20d0a4820>
> pow(tmp5,2)
> 
> 
> 
> 
> 
> ## testing functions that apply to entire matrix
> Max(tmp5)
[1] 472.3352
> Min(tmp5)
[1] 53.37656
> mean(tmp5)
[1] 72.10558
> Sum(tmp5)
[1] 14421.12
> Var(tmp5)
[1] 878.7599
> 
> 
> ## testing functions applied to rows or columns
> 
> rowMeans(tmp5)
 [1] 90.01082 70.16462 71.38558 69.49321 67.16601 74.27930 68.31527 69.33122
 [9] 69.85662 71.05318
> rowSums(tmp5)
 [1] 1800.216 1403.292 1427.712 1389.864 1343.320 1485.586 1366.305 1386.624
 [9] 1397.132 1421.064
> rowVars(tmp5)
 [1] 8153.81309   52.58068   62.19987   87.84649   41.75433   92.06149
 [7]   86.62507   80.37261   31.87205  105.18943
> rowSd(tmp5)
 [1] 90.298467  7.251253  7.886689  9.372646  6.461759  9.594868  9.307259
 [8]  8.965077  5.645534 10.256190
> rowMax(tmp5)
 [1] 472.33520  80.16707  85.60661  84.17648  81.59565  90.33347  85.12766
 [8]  85.52273  78.17520  88.25703
> rowMin(tmp5)
 [1] 58.54860 56.96598 56.45025 55.70874 58.25840 62.27197 54.94860 53.37656
 [9] 62.06999 54.96602
> 
> colMeans(tmp5)
 [1] 108.53431  70.89765  70.35522  69.72687  65.72513  72.14357  72.33990
 [8]  67.27420  69.11321  67.50052  72.58019  70.96326  72.53302  69.77898
[15]  72.35466  75.43436  68.07572  70.90248  66.78001  69.09843
> colSums(tmp5)
 [1] 1085.3431  708.9765  703.5522  697.2687  657.2513  721.4357  723.3990
 [8]  672.7420  691.1321  675.0052  725.8019  709.6326  725.3302  697.7898
[15]  723.5466  754.3436  680.7572  709.0248  667.8001  690.9843
> colVars(tmp5)
 [1] 16426.12643    63.77959    73.09417    52.88808    60.11686    49.39908
 [7]    72.50046    65.02792    77.15656    33.71007   104.84730    93.51408
[13]    69.51652    41.55126    56.77500    92.63065    81.06283    73.85336
[19]    61.01613   109.72001
> colSd(tmp5)
 [1] 128.164451   7.986213   8.549513   7.272419   7.753506   7.028448
 [7]   8.514720   8.063989   8.783881   5.806037  10.239497   9.670268
[13]   8.337657   6.446027   7.534919   9.624482   9.003490   8.593798
[19]   7.811282  10.474732
> colMax(tmp5)
 [1] 472.33520  81.04987  87.96064  79.45274  80.78816  85.12766  82.41139
 [8]  78.17520  88.27609  75.65409  85.52273  83.02239  82.15389  82.11343
[15]  80.91631  90.33347  85.60661  83.72226  85.43168  85.90904
> colMin(tmp5)
 [1] 56.18580 60.46822 57.17331 55.13307 55.70874 61.43151 58.20148 54.94860
 [9] 59.23048 58.72535 55.40210 53.37656 57.49313 61.66821 58.54860 60.76739
[17] 58.85947 56.45025 56.96598 54.96602
> 
> 
> ### 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] 90.01082 70.16462 71.38558 69.49321 67.16601 74.27930 68.31527 69.33122
 [9] 69.85662       NA
> rowSums(tmp5)
 [1] 1800.216 1403.292 1427.712 1389.864 1343.320 1485.586 1366.305 1386.624
 [9] 1397.132       NA
> rowVars(tmp5)
 [1] 8153.81309   52.58068   62.19987   87.84649   41.75433   92.06149
 [7]   86.62507   80.37261   31.87205   95.89899
> rowSd(tmp5)
 [1] 90.298467  7.251253  7.886689  9.372646  6.461759  9.594868  9.307259
 [8]  8.965077  5.645534  9.792803
> rowMax(tmp5)
 [1] 472.33520  80.16707  85.60661  84.17648  81.59565  90.33347  85.12766
 [8]  85.52273  78.17520        NA
> rowMin(tmp5)
 [1] 58.54860 56.96598 56.45025 55.70874 58.25840 62.27197 54.94860 53.37656
 [9] 62.06999       NA
> 
> colMeans(tmp5)
 [1] 108.53431  70.89765  70.35522  69.72687  65.72513  72.14357  72.33990
 [8]  67.27420  69.11321  67.50052  72.58019  70.96326  72.53302  69.77898
[15]  72.35466  75.43436  68.07572  70.90248  66.78001        NA
> colSums(tmp5)
 [1] 1085.3431  708.9765  703.5522  697.2687  657.2513  721.4357  723.3990
 [8]  672.7420  691.1321  675.0052  725.8019  709.6326  725.3302  697.7898
[15]  723.5466  754.3436  680.7572  709.0248  667.8001        NA
> colVars(tmp5)
 [1] 16426.12643    63.77959    73.09417    52.88808    60.11686    49.39908
 [7]    72.50046    65.02792    77.15656    33.71007   104.84730    93.51408
[13]    69.51652    41.55126    56.77500    92.63065    81.06283    73.85336
[19]    61.01613          NA
> colSd(tmp5)
 [1] 128.164451   7.986213   8.549513   7.272419   7.753506   7.028448
 [7]   8.514720   8.063989   8.783881   5.806037  10.239497   9.670268
[13]   8.337657   6.446027   7.534919   9.624482   9.003490   8.593798
[19]   7.811282         NA
> colMax(tmp5)
 [1] 472.33520  81.04987  87.96064  79.45274  80.78816  85.12766  82.41139
 [8]  78.17520  88.27609  75.65409  85.52273  83.02239  82.15389  82.11343
[15]  80.91631  90.33347  85.60661  83.72226  85.43168        NA
> colMin(tmp5)
 [1] 56.18580 60.46822 57.17331 55.13307 55.70874 61.43151 58.20148 54.94860
 [9] 59.23048 58.72535 55.40210 53.37656 57.49313 61.66821 58.54860 60.76739
[17] 58.85947 56.45025 56.96598       NA
> 
> Max(tmp5,na.rm=TRUE)
[1] 472.3352
> Min(tmp5,na.rm=TRUE)
[1] 53.37656
> mean(tmp5,na.rm=TRUE)
[1] 72.19171
> Sum(tmp5,na.rm=TRUE)
[1] 14366.15
> Var(tmp5,na.rm=TRUE)
[1] 881.7069
> 
> rowMeans(tmp5,na.rm=TRUE)
 [1] 90.01082 70.16462 71.38558 69.49321 67.16601 74.27930 68.31527 69.33122
 [9] 69.85662 71.89987
> rowSums(tmp5,na.rm=TRUE)
 [1] 1800.216 1403.292 1427.712 1389.864 1343.320 1485.586 1366.305 1386.624
 [9] 1397.132 1366.098
> rowVars(tmp5,na.rm=TRUE)
 [1] 8153.81309   52.58068   62.19987   87.84649   41.75433   92.06149
 [7]   86.62507   80.37261   31.87205   95.89899
> rowSd(tmp5,na.rm=TRUE)
 [1] 90.298467  7.251253  7.886689  9.372646  6.461759  9.594868  9.307259
 [8]  8.965077  5.645534  9.792803
> rowMax(tmp5,na.rm=TRUE)
 [1] 472.33520  80.16707  85.60661  84.17648  81.59565  90.33347  85.12766
 [8]  85.52273  78.17520  88.25703
> rowMin(tmp5,na.rm=TRUE)
 [1] 58.54860 56.96598 56.45025 55.70874 58.25840 62.27197 54.94860 53.37656
 [9] 62.06999 55.13307
> 
> colMeans(tmp5,na.rm=TRUE)
 [1] 108.53431  70.89765  70.35522  69.72687  65.72513  72.14357  72.33990
 [8]  67.27420  69.11321  67.50052  72.58019  70.96326  72.53302  69.77898
[15]  72.35466  75.43436  68.07572  70.90248  66.78001  70.66870
> colSums(tmp5,na.rm=TRUE)
 [1] 1085.3431  708.9765  703.5522  697.2687  657.2513  721.4357  723.3990
 [8]  672.7420  691.1321  675.0052  725.8019  709.6326  725.3302  697.7898
[15]  723.5466  754.3436  680.7572  709.0248  667.8001  636.0183
> colVars(tmp5,na.rm=TRUE)
 [1] 16426.12643    63.77959    73.09417    52.88808    60.11686    49.39908
 [7]    72.50046    65.02792    77.15656    33.71007   104.84730    93.51408
[13]    69.51652    41.55126    56.77500    92.63065    81.06283    73.85336
[19]    61.01613    95.69543
> colSd(tmp5,na.rm=TRUE)
 [1] 128.164451   7.986213   8.549513   7.272419   7.753506   7.028448
 [7]   8.514720   8.063989   8.783881   5.806037  10.239497   9.670268
[13]   8.337657   6.446027   7.534919   9.624482   9.003490   8.593798
[19]   7.811282   9.782404
> colMax(tmp5,na.rm=TRUE)
 [1] 472.33520  81.04987  87.96064  79.45274  80.78816  85.12766  82.41139
 [8]  78.17520  88.27609  75.65409  85.52273  83.02239  82.15389  82.11343
[15]  80.91631  90.33347  85.60661  83.72226  85.43168  85.90904
> colMin(tmp5,na.rm=TRUE)
 [1] 56.18580 60.46822 57.17331 55.13307 55.70874 61.43151 58.20148 54.94860
 [9] 59.23048 58.72535 55.40210 53.37656 57.49313 61.66821 58.54860 60.76739
[17] 58.85947 56.45025 56.96598 58.25840
> 
> # now set an entire row to NA
> 
> tmp5[which.row,] <- NA
> rowMeans(tmp5,na.rm=TRUE)
 [1] 90.01082 70.16462 71.38558 69.49321 67.16601 74.27930 68.31527 69.33122
 [9] 69.85662      NaN
> rowSums(tmp5,na.rm=TRUE)
 [1] 1800.216 1403.292 1427.712 1389.864 1343.320 1485.586 1366.305 1386.624
 [9] 1397.132    0.000
> rowVars(tmp5,na.rm=TRUE)
 [1] 8153.81309   52.58068   62.19987   87.84649   41.75433   92.06149
 [7]   86.62507   80.37261   31.87205         NA
> rowSd(tmp5,na.rm=TRUE)
 [1] 90.298467  7.251253  7.886689  9.372646  6.461759  9.594868  9.307259
 [8]  8.965077  5.645534        NA
> rowMax(tmp5,na.rm=TRUE)
 [1] 472.33520  80.16707  85.60661  84.17648  81.59565  90.33347  85.12766
 [8]  85.52273  78.17520        NA
> rowMin(tmp5,na.rm=TRUE)
 [1] 58.54860 56.96598 56.45025 55.70874 58.25840 62.27197 54.94860 53.37656
 [9] 62.06999       NA
> 
> 
> # now set an entire col to NA
> 
> 
> tmp5[,which.col] <- NA
> colMeans(tmp5,na.rm=TRUE)
 [1] 111.40023  71.92196  70.34110  71.34841  66.36780  72.15621  73.61466
 [8]  66.11377  69.75188  67.97728  72.87651  69.83121  71.52042  68.40848
[15]  72.50984  74.00961  67.50492  71.41973  64.70760       NaN
> colSums(tmp5,na.rm=TRUE)
 [1] 1002.6021  647.2976  633.0699  642.1357  597.3102  649.4059  662.5319
 [8]  595.0240  627.7669  611.7955  655.8886  628.4809  643.6838  615.6763
[15]  652.5886  666.0865  607.5443  642.7776  582.3684    0.0000
> colVars(tmp5,na.rm=TRUE)
 [1] 18386.98992    59.94843    82.22870    29.91867    62.98494    55.57217
 [7]    63.28147    58.00719    82.21216    35.36676   116.96541    90.78616
[13]    66.67097    25.61479    63.60097    81.37323    87.53035    80.07509
[19]    20.32581          NA
> colSd(tmp5,na.rm=TRUE)
 [1] 135.598635   7.742637   9.068004   5.469796   7.936305   7.454674
 [7]   7.954965   7.616245   9.067092   5.946996  10.815055   9.528177
[13]   8.165229   5.061106   7.975021   9.020711   9.355766   8.948468
[19]   4.508415         NA
> colMax(tmp5,na.rm=TRUE)
 [1] 472.33520  81.04987  87.96064  79.45274  80.78816  85.12766  82.41139
 [8]  78.17520  88.27609  75.65409  85.52273  83.02239  82.15389  77.40282
[15]  80.91631  90.33347  85.60661  83.72226  73.35240      -Inf
> colMin(tmp5,na.rm=TRUE)
 [1] 56.18580 60.46822 57.17331 62.62884 55.70874 61.43151 58.20148 54.94860
 [9] 59.23048 58.72535 55.40210 53.37656 57.49313 61.66821 58.54860 60.76739
[17] 58.85947 56.45025 56.96598      Inf
> 
> 
> 
> 
> copymatrix <- matrix(rnorm(200,150,15),10,20)
> 
> tmp5[1:10,1:20] <- copymatrix
> which.row <- 3
> which.col  <- 1
> cat(which.row," ",which.col,"\n")
3   1 
> tmp5[which.row,which.col] <- NA
> copymatrix[which.row,which.col] <- NA
> 
> rowVars(tmp5,na.rm=TRUE)
 [1] 131.7087 230.5205 197.5363 131.7429 271.1533 250.3245 161.6458 232.7157
 [9] 208.5598 147.4148
> apply(copymatrix,1,var,na.rm=TRUE)
 [1] 131.7087 230.5205 197.5363 131.7429 271.1533 250.3245 161.6458 232.7157
 [9] 208.5598 147.4148
> 
> 
> 
> 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 -5.684342e-14  5.684342e-14 -5.684342e-14  5.684342e-14
 [6]  5.684342e-14 -2.273737e-13 -8.526513e-14 -8.526513e-14  1.421085e-14
[11]  2.842171e-14  1.136868e-13 -5.684342e-14  0.000000e+00 -8.526513e-14
[16]  0.000000e+00  5.684342e-14  8.526513e-14  2.842171e-14  5.684342e-14
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ## making sure these things agree
> ##
> ## first when there is no NA
> 
> 
> 
> agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){
+ 
+   if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Max")
+   }
+   
+ 
+   if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){
+     stop("No agreement in Min")
+   }
+ 
+ 
+   if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){
+ 
+     cat(Sum(buff.matrix,na.rm=TRUE),"\n")
+     cat(sum(r.matrix,na.rm=TRUE),"\n")
+     cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n")
+     
+     stop("No agreement in Sum")
+   }
+   
+   if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){
+     stop("No agreement in mean")
+   }
+   
+   
+   if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){
+     stop("No agreement in Var")
+   }
+   
+   
+ 
+   if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowMeans")
+   }
+   
+   
+   if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colMeans")
+   }
+   
+   
+   if(any(abs(rowSums(buff.matrix,na.rm=TRUE)  -  apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in rowSums")
+   }
+   
+   
+   if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){
+     stop("No agreement in colSums")
+   }
+   
+   ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when 
+   ### computing variance
+   my.Var <- function(x,na.rm=FALSE){
+    if (all(is.na(x))){
+      return(NA)
+    } else {
+      var(x,na.rm=na.rm)
+    }
+ 
+   }
+   
+   if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+   
+   
+   if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in rowVars")
+   }
+ 
+ 
+   if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+ 
+   if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMax")
+   }
+   
+   
+   
+   if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+   
+ 
+   if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE))  > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMin")
+   }
+ 
+   if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colMedian")
+   }
+ 
+   if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){
+     stop("No agreement in colRanges")
+   }
+ 
+ 
+   
+ }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> for (rep in 1:20){
+   copymatrix <- matrix(rnorm(200,150,15),10,20)
+   
+   tmp5[1:10,1:20] <- copymatrix
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ## now lets assign some NA values and check agreement
+ 
+   which.row <- sample(1:10,1,replace=TRUE)
+   which.col  <- sample(1:20,1,replace=TRUE)
+   
+   cat(which.row," ",which.col,"\n")
+   
+   tmp5[which.row,which.col] <- NA
+   copymatrix[which.row,which.col] <- NA
+   
+   agree.checks(tmp5,copymatrix)
+ 
+   ## make an entire row NA
+   tmp5[which.row,] <- NA
+   copymatrix[which.row,] <- NA
+ 
+ 
+   agree.checks(tmp5,copymatrix)
+   
+   ### also make an entire col NA
+   tmp5[,which.col] <- NA
+   copymatrix[,which.col] <- NA
+ 
+   agree.checks(tmp5,copymatrix)
+ 
+   ### now make 1 element non NA with NA in the rest of row and column
+ 
+   tmp5[which.row,which.col] <- rnorm(1,150,15)
+   copymatrix[which.row,which.col] <- tmp5[which.row,which.col]
+ 
+   agree.checks(tmp5,copymatrix)
+ }
8   5 
4   3 
6   11 
2   18 
10   20 
9   12 
9   16 
10   7 
4   19 
2   12 
10   7 
1   14 
7   20 
3   17 
4   5 
9   11 
5   7 
5   11 
6   19 
10   1 
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.482067
> Min(tmp)
[1] -2.008854
> mean(tmp)
[1] -0.04154184
> Sum(tmp)
[1] -4.154184
> Var(tmp)
[1] 0.8627189
> 
> rowMeans(tmp)
[1] -0.04154184
> rowSums(tmp)
[1] -4.154184
> rowVars(tmp)
[1] 0.8627189
> rowSd(tmp)
[1] 0.9288266
> rowMax(tmp)
[1] 2.482067
> rowMin(tmp)
[1] -2.008854
> 
> colMeans(tmp)
  [1] -1.36180070  0.09514735 -1.36118057 -1.27275037  2.48206705  0.62091670
  [7]  0.36400486  0.77364690  0.72314748  0.51335073 -0.59646698 -0.17141448
 [13]  0.57621196  0.39892313  0.66113181  2.17228098 -1.02744840 -0.82883306
 [19]  2.07794981 -0.09560953  1.41111114  0.90945776  0.11008120 -0.99802380
 [25]  0.41077178 -1.05917905  0.80248782  0.69544828 -1.26029601 -0.26228078
 [31]  0.05620947  1.01553326 -1.00870675  0.54159798 -2.00260186  0.44897935
 [37] -0.72546105 -0.45585745  0.86638050  0.02356577 -0.14726881  0.79168718
 [43] -0.29178456  0.51183330  0.28660440 -0.23304339 -1.38955371  1.40551146
 [49] -0.72196813  0.16762698 -0.11230204 -0.06127855  0.76501932 -0.79265612
 [55]  0.30623061 -0.88480764 -1.62842162  0.45575359  0.26248061  1.29270551
 [61] -1.42024549  0.22387912  0.17519206 -0.58318134  0.76292315  0.06421571
 [67] -0.58081299 -0.46228605  0.38679445  1.31259883 -1.34916250  1.26127973
 [73] -1.56152702 -0.02741234 -0.56419271  0.63731861  0.35928611 -0.45494347
 [79] -1.36730545 -0.56074809 -0.16809086 -0.33146622  0.47425909 -0.96734510
 [85]  0.50844004 -1.15111150 -0.90226105 -2.00885368  0.55560542  0.60322607
 [91]  0.01018771 -1.38786587 -1.32919295  0.45887807  0.47614619  1.41287075
 [97] -0.64250073  0.32206904  0.72829221 -1.31200200
> colSums(tmp)
  [1] -1.36180070  0.09514735 -1.36118057 -1.27275037  2.48206705  0.62091670
  [7]  0.36400486  0.77364690  0.72314748  0.51335073 -0.59646698 -0.17141448
 [13]  0.57621196  0.39892313  0.66113181  2.17228098 -1.02744840 -0.82883306
 [19]  2.07794981 -0.09560953  1.41111114  0.90945776  0.11008120 -0.99802380
 [25]  0.41077178 -1.05917905  0.80248782  0.69544828 -1.26029601 -0.26228078
 [31]  0.05620947  1.01553326 -1.00870675  0.54159798 -2.00260186  0.44897935
 [37] -0.72546105 -0.45585745  0.86638050  0.02356577 -0.14726881  0.79168718
 [43] -0.29178456  0.51183330  0.28660440 -0.23304339 -1.38955371  1.40551146
 [49] -0.72196813  0.16762698 -0.11230204 -0.06127855  0.76501932 -0.79265612
 [55]  0.30623061 -0.88480764 -1.62842162  0.45575359  0.26248061  1.29270551
 [61] -1.42024549  0.22387912  0.17519206 -0.58318134  0.76292315  0.06421571
 [67] -0.58081299 -0.46228605  0.38679445  1.31259883 -1.34916250  1.26127973
 [73] -1.56152702 -0.02741234 -0.56419271  0.63731861  0.35928611 -0.45494347
 [79] -1.36730545 -0.56074809 -0.16809086 -0.33146622  0.47425909 -0.96734510
 [85]  0.50844004 -1.15111150 -0.90226105 -2.00885368  0.55560542  0.60322607
 [91]  0.01018771 -1.38786587 -1.32919295  0.45887807  0.47614619  1.41287075
 [97] -0.64250073  0.32206904  0.72829221 -1.31200200
> 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.36180070  0.09514735 -1.36118057 -1.27275037  2.48206705  0.62091670
  [7]  0.36400486  0.77364690  0.72314748  0.51335073 -0.59646698 -0.17141448
 [13]  0.57621196  0.39892313  0.66113181  2.17228098 -1.02744840 -0.82883306
 [19]  2.07794981 -0.09560953  1.41111114  0.90945776  0.11008120 -0.99802380
 [25]  0.41077178 -1.05917905  0.80248782  0.69544828 -1.26029601 -0.26228078
 [31]  0.05620947  1.01553326 -1.00870675  0.54159798 -2.00260186  0.44897935
 [37] -0.72546105 -0.45585745  0.86638050  0.02356577 -0.14726881  0.79168718
 [43] -0.29178456  0.51183330  0.28660440 -0.23304339 -1.38955371  1.40551146
 [49] -0.72196813  0.16762698 -0.11230204 -0.06127855  0.76501932 -0.79265612
 [55]  0.30623061 -0.88480764 -1.62842162  0.45575359  0.26248061  1.29270551
 [61] -1.42024549  0.22387912  0.17519206 -0.58318134  0.76292315  0.06421571
 [67] -0.58081299 -0.46228605  0.38679445  1.31259883 -1.34916250  1.26127973
 [73] -1.56152702 -0.02741234 -0.56419271  0.63731861  0.35928611 -0.45494347
 [79] -1.36730545 -0.56074809 -0.16809086 -0.33146622  0.47425909 -0.96734510
 [85]  0.50844004 -1.15111150 -0.90226105 -2.00885368  0.55560542  0.60322607
 [91]  0.01018771 -1.38786587 -1.32919295  0.45887807  0.47614619  1.41287075
 [97] -0.64250073  0.32206904  0.72829221 -1.31200200
> colMin(tmp)
  [1] -1.36180070  0.09514735 -1.36118057 -1.27275037  2.48206705  0.62091670
  [7]  0.36400486  0.77364690  0.72314748  0.51335073 -0.59646698 -0.17141448
 [13]  0.57621196  0.39892313  0.66113181  2.17228098 -1.02744840 -0.82883306
 [19]  2.07794981 -0.09560953  1.41111114  0.90945776  0.11008120 -0.99802380
 [25]  0.41077178 -1.05917905  0.80248782  0.69544828 -1.26029601 -0.26228078
 [31]  0.05620947  1.01553326 -1.00870675  0.54159798 -2.00260186  0.44897935
 [37] -0.72546105 -0.45585745  0.86638050  0.02356577 -0.14726881  0.79168718
 [43] -0.29178456  0.51183330  0.28660440 -0.23304339 -1.38955371  1.40551146
 [49] -0.72196813  0.16762698 -0.11230204 -0.06127855  0.76501932 -0.79265612
 [55]  0.30623061 -0.88480764 -1.62842162  0.45575359  0.26248061  1.29270551
 [61] -1.42024549  0.22387912  0.17519206 -0.58318134  0.76292315  0.06421571
 [67] -0.58081299 -0.46228605  0.38679445  1.31259883 -1.34916250  1.26127973
 [73] -1.56152702 -0.02741234 -0.56419271  0.63731861  0.35928611 -0.45494347
 [79] -1.36730545 -0.56074809 -0.16809086 -0.33146622  0.47425909 -0.96734510
 [85]  0.50844004 -1.15111150 -0.90226105 -2.00885368  0.55560542  0.60322607
 [91]  0.01018771 -1.38786587 -1.32919295  0.45887807  0.47614619  1.41287075
 [97] -0.64250073  0.32206904  0.72829221 -1.31200200
> colMedians(tmp)
  [1] -1.36180070  0.09514735 -1.36118057 -1.27275037  2.48206705  0.62091670
  [7]  0.36400486  0.77364690  0.72314748  0.51335073 -0.59646698 -0.17141448
 [13]  0.57621196  0.39892313  0.66113181  2.17228098 -1.02744840 -0.82883306
 [19]  2.07794981 -0.09560953  1.41111114  0.90945776  0.11008120 -0.99802380
 [25]  0.41077178 -1.05917905  0.80248782  0.69544828 -1.26029601 -0.26228078
 [31]  0.05620947  1.01553326 -1.00870675  0.54159798 -2.00260186  0.44897935
 [37] -0.72546105 -0.45585745  0.86638050  0.02356577 -0.14726881  0.79168718
 [43] -0.29178456  0.51183330  0.28660440 -0.23304339 -1.38955371  1.40551146
 [49] -0.72196813  0.16762698 -0.11230204 -0.06127855  0.76501932 -0.79265612
 [55]  0.30623061 -0.88480764 -1.62842162  0.45575359  0.26248061  1.29270551
 [61] -1.42024549  0.22387912  0.17519206 -0.58318134  0.76292315  0.06421571
 [67] -0.58081299 -0.46228605  0.38679445  1.31259883 -1.34916250  1.26127973
 [73] -1.56152702 -0.02741234 -0.56419271  0.63731861  0.35928611 -0.45494347
 [79] -1.36730545 -0.56074809 -0.16809086 -0.33146622  0.47425909 -0.96734510
 [85]  0.50844004 -1.15111150 -0.90226105 -2.00885368  0.55560542  0.60322607
 [91]  0.01018771 -1.38786587 -1.32919295  0.45887807  0.47614619  1.41287075
 [97] -0.64250073  0.32206904  0.72829221 -1.31200200
> colRanges(tmp)
          [,1]       [,2]      [,3]     [,4]     [,5]      [,6]      [,7]
[1,] -1.361801 0.09514735 -1.361181 -1.27275 2.482067 0.6209167 0.3640049
[2,] -1.361801 0.09514735 -1.361181 -1.27275 2.482067 0.6209167 0.3640049
          [,8]      [,9]     [,10]     [,11]      [,12]    [,13]     [,14]
[1,] 0.7736469 0.7231475 0.5133507 -0.596467 -0.1714145 0.576212 0.3989231
[2,] 0.7736469 0.7231475 0.5133507 -0.596467 -0.1714145 0.576212 0.3989231
         [,15]    [,16]     [,17]      [,18]   [,19]       [,20]    [,21]
[1,] 0.6611318 2.172281 -1.027448 -0.8288331 2.07795 -0.09560953 1.411111
[2,] 0.6611318 2.172281 -1.027448 -0.8288331 2.07795 -0.09560953 1.411111
         [,22]     [,23]      [,24]     [,25]     [,26]     [,27]     [,28]
[1,] 0.9094578 0.1100812 -0.9980238 0.4107718 -1.059179 0.8024878 0.6954483
[2,] 0.9094578 0.1100812 -0.9980238 0.4107718 -1.059179 0.8024878 0.6954483
         [,29]      [,30]      [,31]    [,32]     [,33]    [,34]     [,35]
[1,] -1.260296 -0.2622808 0.05620947 1.015533 -1.008707 0.541598 -2.002602
[2,] -1.260296 -0.2622808 0.05620947 1.015533 -1.008707 0.541598 -2.002602
         [,36]      [,37]      [,38]     [,39]      [,40]      [,41]     [,42]
[1,] 0.4489794 -0.7254611 -0.4558574 0.8663805 0.02356577 -0.1472688 0.7916872
[2,] 0.4489794 -0.7254611 -0.4558574 0.8663805 0.02356577 -0.1472688 0.7916872
          [,43]     [,44]     [,45]      [,46]     [,47]    [,48]      [,49]
[1,] -0.2917846 0.5118333 0.2866044 -0.2330434 -1.389554 1.405511 -0.7219681
[2,] -0.2917846 0.5118333 0.2866044 -0.2330434 -1.389554 1.405511 -0.7219681
        [,50]     [,51]       [,52]     [,53]      [,54]     [,55]      [,56]
[1,] 0.167627 -0.112302 -0.06127855 0.7650193 -0.7926561 0.3062306 -0.8848076
[2,] 0.167627 -0.112302 -0.06127855 0.7650193 -0.7926561 0.3062306 -0.8848076
         [,57]     [,58]     [,59]    [,60]     [,61]     [,62]     [,63]
[1,] -1.628422 0.4557536 0.2624806 1.292706 -1.420245 0.2238791 0.1751921
[2,] -1.628422 0.4557536 0.2624806 1.292706 -1.420245 0.2238791 0.1751921
          [,64]     [,65]      [,66]     [,67]      [,68]     [,69]    [,70]
[1,] -0.5831813 0.7629231 0.06421571 -0.580813 -0.4622861 0.3867945 1.312599
[2,] -0.5831813 0.7629231 0.06421571 -0.580813 -0.4622861 0.3867945 1.312599
         [,71]   [,72]     [,73]       [,74]      [,75]     [,76]     [,77]
[1,] -1.349162 1.26128 -1.561527 -0.02741234 -0.5641927 0.6373186 0.3592861
[2,] -1.349162 1.26128 -1.561527 -0.02741234 -0.5641927 0.6373186 0.3592861
          [,78]     [,79]      [,80]      [,81]      [,82]     [,83]      [,84]
[1,] -0.4549435 -1.367305 -0.5607481 -0.1680909 -0.3314662 0.4742591 -0.9673451
[2,] -0.4549435 -1.367305 -0.5607481 -0.1680909 -0.3314662 0.4742591 -0.9673451
       [,85]     [,86]      [,87]     [,88]     [,89]     [,90]      [,91]
[1,] 0.50844 -1.151111 -0.9022611 -2.008854 0.5556054 0.6032261 0.01018771
[2,] 0.50844 -1.151111 -0.9022611 -2.008854 0.5556054 0.6032261 0.01018771
         [,92]     [,93]     [,94]     [,95]    [,96]      [,97]    [,98]
[1,] -1.387866 -1.329193 0.4588781 0.4761462 1.412871 -0.6425007 0.322069
[2,] -1.387866 -1.329193 0.4588781 0.4761462 1.412871 -0.6425007 0.322069
         [,99]    [,100]
[1,] 0.7282922 -1.312002
[2,] 0.7282922 -1.312002
> 
> 
> Max(tmp2)
[1] 1.878539
> Min(tmp2)
[1] -1.772814
> mean(tmp2)
[1] 0.0004180027
> Sum(tmp2)
[1] 0.04180027
> Var(tmp2)
[1] 0.7185687
> 
> rowMeans(tmp2)
  [1]  0.312477909  0.678077063 -0.419183813 -0.691079633 -1.699013299
  [6] -0.454719542 -0.272628096  0.468700277  0.908150902  0.022573760
 [11] -0.008489850 -1.099853948 -0.259889889 -1.260317653 -1.227777345
 [16] -0.449628721  0.917545212 -1.045073291 -0.521030760 -0.620586381
 [21]  0.480323670  0.114300641 -0.880705877 -0.727642836  1.878538598
 [26]  0.263359256  0.005720574 -0.356816078  1.033660483  0.337459295
 [31]  0.311497661  1.351266174  1.250233105 -1.027248640 -0.352506996
 [36]  0.765855299  1.300560756 -0.526223661 -0.313658373  0.362459952
 [41] -0.223053892  0.384746172 -1.103476512  0.681037861  1.529024869
 [46] -0.800282859 -0.035137300 -0.393095034  0.020062587  0.827832371
 [51]  0.238222258  0.477644068  0.077294178 -0.112623610 -0.698779244
 [56] -0.514201921 -0.358467276  1.606302862 -0.193850276 -1.576928204
 [61] -0.263504130 -0.954528751 -1.661254026  0.050683186  0.176914974
 [66]  0.786638876  0.334989205 -1.068225712  1.498916383  0.035646766
 [71] -0.259728194  0.882241515 -0.146113469 -1.772813973  1.144546284
 [76] -0.818201957  0.076383801 -0.528559517 -0.796632013 -1.644600816
 [81]  0.931361541  0.365923613  1.817472959  0.643009975  0.999523330
 [86]  0.432691947  0.717235269 -0.713734825 -0.077942606  1.854477775
 [91]  0.721619003 -1.741712582  0.946480276  0.128057276 -0.390326790
 [96]  0.008749312  0.053018471  0.193881713  0.032276502 -0.334017318
> rowSums(tmp2)
  [1]  0.312477909  0.678077063 -0.419183813 -0.691079633 -1.699013299
  [6] -0.454719542 -0.272628096  0.468700277  0.908150902  0.022573760
 [11] -0.008489850 -1.099853948 -0.259889889 -1.260317653 -1.227777345
 [16] -0.449628721  0.917545212 -1.045073291 -0.521030760 -0.620586381
 [21]  0.480323670  0.114300641 -0.880705877 -0.727642836  1.878538598
 [26]  0.263359256  0.005720574 -0.356816078  1.033660483  0.337459295
 [31]  0.311497661  1.351266174  1.250233105 -1.027248640 -0.352506996
 [36]  0.765855299  1.300560756 -0.526223661 -0.313658373  0.362459952
 [41] -0.223053892  0.384746172 -1.103476512  0.681037861  1.529024869
 [46] -0.800282859 -0.035137300 -0.393095034  0.020062587  0.827832371
 [51]  0.238222258  0.477644068  0.077294178 -0.112623610 -0.698779244
 [56] -0.514201921 -0.358467276  1.606302862 -0.193850276 -1.576928204
 [61] -0.263504130 -0.954528751 -1.661254026  0.050683186  0.176914974
 [66]  0.786638876  0.334989205 -1.068225712  1.498916383  0.035646766
 [71] -0.259728194  0.882241515 -0.146113469 -1.772813973  1.144546284
 [76] -0.818201957  0.076383801 -0.528559517 -0.796632013 -1.644600816
 [81]  0.931361541  0.365923613  1.817472959  0.643009975  0.999523330
 [86]  0.432691947  0.717235269 -0.713734825 -0.077942606  1.854477775
 [91]  0.721619003 -1.741712582  0.946480276  0.128057276 -0.390326790
 [96]  0.008749312  0.053018471  0.193881713  0.032276502 -0.334017318
> 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.312477909  0.678077063 -0.419183813 -0.691079633 -1.699013299
  [6] -0.454719542 -0.272628096  0.468700277  0.908150902  0.022573760
 [11] -0.008489850 -1.099853948 -0.259889889 -1.260317653 -1.227777345
 [16] -0.449628721  0.917545212 -1.045073291 -0.521030760 -0.620586381
 [21]  0.480323670  0.114300641 -0.880705877 -0.727642836  1.878538598
 [26]  0.263359256  0.005720574 -0.356816078  1.033660483  0.337459295
 [31]  0.311497661  1.351266174  1.250233105 -1.027248640 -0.352506996
 [36]  0.765855299  1.300560756 -0.526223661 -0.313658373  0.362459952
 [41] -0.223053892  0.384746172 -1.103476512  0.681037861  1.529024869
 [46] -0.800282859 -0.035137300 -0.393095034  0.020062587  0.827832371
 [51]  0.238222258  0.477644068  0.077294178 -0.112623610 -0.698779244
 [56] -0.514201921 -0.358467276  1.606302862 -0.193850276 -1.576928204
 [61] -0.263504130 -0.954528751 -1.661254026  0.050683186  0.176914974
 [66]  0.786638876  0.334989205 -1.068225712  1.498916383  0.035646766
 [71] -0.259728194  0.882241515 -0.146113469 -1.772813973  1.144546284
 [76] -0.818201957  0.076383801 -0.528559517 -0.796632013 -1.644600816
 [81]  0.931361541  0.365923613  1.817472959  0.643009975  0.999523330
 [86]  0.432691947  0.717235269 -0.713734825 -0.077942606  1.854477775
 [91]  0.721619003 -1.741712582  0.946480276  0.128057276 -0.390326790
 [96]  0.008749312  0.053018471  0.193881713  0.032276502 -0.334017318
> rowMin(tmp2)
  [1]  0.312477909  0.678077063 -0.419183813 -0.691079633 -1.699013299
  [6] -0.454719542 -0.272628096  0.468700277  0.908150902  0.022573760
 [11] -0.008489850 -1.099853948 -0.259889889 -1.260317653 -1.227777345
 [16] -0.449628721  0.917545212 -1.045073291 -0.521030760 -0.620586381
 [21]  0.480323670  0.114300641 -0.880705877 -0.727642836  1.878538598
 [26]  0.263359256  0.005720574 -0.356816078  1.033660483  0.337459295
 [31]  0.311497661  1.351266174  1.250233105 -1.027248640 -0.352506996
 [36]  0.765855299  1.300560756 -0.526223661 -0.313658373  0.362459952
 [41] -0.223053892  0.384746172 -1.103476512  0.681037861  1.529024869
 [46] -0.800282859 -0.035137300 -0.393095034  0.020062587  0.827832371
 [51]  0.238222258  0.477644068  0.077294178 -0.112623610 -0.698779244
 [56] -0.514201921 -0.358467276  1.606302862 -0.193850276 -1.576928204
 [61] -0.263504130 -0.954528751 -1.661254026  0.050683186  0.176914974
 [66]  0.786638876  0.334989205 -1.068225712  1.498916383  0.035646766
 [71] -0.259728194  0.882241515 -0.146113469 -1.772813973  1.144546284
 [76] -0.818201957  0.076383801 -0.528559517 -0.796632013 -1.644600816
 [81]  0.931361541  0.365923613  1.817472959  0.643009975  0.999523330
 [86]  0.432691947  0.717235269 -0.713734825 -0.077942606  1.854477775
 [91]  0.721619003 -1.741712582  0.946480276  0.128057276 -0.390326790
 [96]  0.008749312  0.053018471  0.193881713  0.032276502 -0.334017318
> 
> colMeans(tmp2)
[1] 0.0004180027
> colSums(tmp2)
[1] 0.04180027
> colVars(tmp2)
[1] 0.7185687
> colSd(tmp2)
[1] 0.8476843
> colMax(tmp2)
[1] 1.878539
> colMin(tmp2)
[1] -1.772814
> colMedians(tmp2)
[1] 0.01440595
> colRanges(tmp2)
          [,1]
[1,] -1.772814
[2,]  1.878539
> 
> 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] -3.1165897  3.0792696 -1.3270506  1.3057154 -1.5299123  1.8043811
 [7] -2.5495316 -6.7752980  0.5631645  5.3209709
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -1.3573891
[2,] -0.9788420
[3,] -0.1405355
[4,]  0.3419901
[5,]  0.6195439
> 
> rowApply(tmp,sum)
 [1]  4.164309  1.593533 -1.225327 -7.084628  4.094687  3.841492 -6.132309
 [8] -2.553800  3.989449 -3.912287
> rowApply(tmp,rank)[1:10,]
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    6    5    3    5    3    5    3    8    7     2
 [2,]    9    6   10    4    1    1   10    9    2    10
 [3,]   10   10    1    1    4    6    4    2    4     8
 [4,]    7    8    7   10    5    2    8    3    5     4
 [5,]    3    7    8    3    2    9    6    6    1     7
 [6,]    4    3    4    8    9   10    5    1    8     3
 [7,]    5    1    6    6   10    7    7    7    9     1
 [8,]    1    2    2    2    8    3    1    5    3     9
 [9,]    8    9    9    9    6    4    2    4    6     5
[10,]    2    4    5    7    7    8    9   10   10     6
> 
> tmp <- createBufferedMatrix(5,20)
> 
> tmp[1:5,1:20] <- rnorm(100)
> colApply(tmp,sum)
 [1]  0.91242147  2.44777575  1.82018969 -1.89576972 -5.65272808  1.51169656
 [7] -0.44549991  2.85677347  3.07093261  2.71989911  0.72777807 -0.73056218
[13] -3.93751141  2.51486368  2.34766852  0.61608268 -0.34017852 -1.16213249
[19]  0.09384072 -5.12702520
> colApply(tmp,quantile)[,1]
           [,1]
[1,] -2.1169818
[2,] -0.2577573
[3,]  0.6146764
[4,]  1.0240245
[5,]  1.6484597
> 
> rowApply(tmp,sum)
[1]  0.7605382 -2.2460859  7.8565471 -7.6522128  3.6297282
> rowApply(tmp,rank)[1:5,]
     [,1] [,2] [,3] [,4] [,5]
[1,]   16    8   17    2   18
[2,]   13    7   14   15   19
[3,]   17   20    7   11    9
[4,]    4    6    4   13   11
[5,]    6    2    8    3    1
> 
> 
> as.matrix(tmp)
           [,1]       [,2]       [,3]        [,4]       [,5]       [,6]
[1,]  0.6146764  0.1335678  0.8120163 -0.95183495 -0.3590615  2.2007371
[2,] -0.2577573 -0.3584916  1.6141191 -0.46086524 -1.8062872 -0.5601421
[3,]  1.6484597  0.9899599 -0.3725190 -0.84849101 -0.3086674  1.4855211
[4,] -2.1169818  0.4463994 -0.1085777  0.00414522 -1.8844038 -1.4374437
[5,]  1.0240245  1.2363403 -0.1248490  0.36127625 -1.2943081 -0.1769759
            [,7]       [,8]       [,9]       [,10]      [,11]      [,12]
[1,] -0.13686439 -0.2755699 -1.3458124 -0.19718973  0.2645985 -1.1431766
[2,]  0.04109649  0.5213693  0.6896324 -0.09332220  0.6131709 -0.9073898
[3,] -0.39250069  2.0600111  3.7412973  2.22943803 -0.3968893  1.0335635
[4,] -0.96570636  0.7761297  0.4813004  0.83414217 -0.6067642  1.0538921
[5,]  1.00847504 -0.2251666 -0.4954851 -0.05316916  0.8536622 -0.7674515
           [,13]       [,14]      [,15]       [,16]       [,17]      [,18]
[1,] -0.09455108 -0.06371712  1.6839385 -1.05011645  0.03967794  0.8720139
[2,]  0.16529726  0.90609421  0.6107609 -0.06777887 -1.10126205 -2.0264219
[3,] -1.91903330  0.54267161  0.4022497  0.36349880  0.02474778  0.4784909
[4,] -1.12410019 -0.11146232  0.4250335  1.53794199 -0.10110019 -1.0346088
[5,] -0.96512411  1.24127730 -0.7743141 -0.16746279  0.79775800  0.5483934
          [,19]      [,20]
[1,]  0.6021271 -0.8449213
[2,]  0.3901457 -0.1580539
[3,] -1.0236459 -1.8816156
[4,] -0.4742701 -3.2457780
[5,]  0.5994839  1.0033436
> 
> 
> is.BufferedMatrix(tmp)
[1] TRUE
> 
> as.BufferedMatrix(as.matrix(tmp))
BufferedMatrix object
Matrix size:  5 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  800  bytes.
> 
> 
> 
> subBufferedMatrix(tmp,1:5,1:5)
BufferedMatrix object
Matrix size:  5 5 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  653  bytes.
Disk usage :  200  bytes.
> subBufferedMatrix(tmp,,5:8)
BufferedMatrix object
Matrix size:  5 4 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  566  bytes.
Disk usage :  160  bytes.
> subBufferedMatrix(tmp,1:3,)
BufferedMatrix object
Matrix size:  3 20 
Buffer size:  1 1 
Directory:    /home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests 
Prefix:       BM 
Mode: Col mode
Read Only: FALSE
Memory usage :  1.9  Kilobytes.
Disk usage :  480  bytes.
> 
> 
> rm(tmp)
> 
> 
> ###
> ### Testing colnames and rownames
> ###
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> 
> 
> colnames(tmp)
NULL
> rownames(tmp)
NULL
> 
> 
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> colnames(tmp)
 [1] "col1"  "col2"  "col3"  "col4"  "col5"  "col6"  "col7"  "col8"  "col9" 
[10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18"
[19] "col19" "col20"
> rownames(tmp)
[1] "row1" "row2" "row3" "row4" "row5"
> 
> 
> tmp["row1",]
           col1     col2      col3      col4     col5        col6      col7
row1 -0.7359815 2.231589 -0.371051 0.1457049 1.044323 -0.08507539 -1.319739
          col8       col9     col10    col11    col12    col13      col14
row1 -1.062844 -0.2651069 0.9475659 0.958864 1.337945 1.176805 -0.9627458
          col15      col16     col17      col18     col19      col20
row1 -0.4534147 -0.7854596 0.3173063 -0.7982663 -1.636199 -0.6570418
> tmp[,"col10"]
          col10
row1  0.9475659
row2  0.6270214
row3  1.3660481
row4  0.4696531
row5 -0.5321008
> tmp[c("row1","row5"),]
           col1      col2      col3      col4      col5        col6      col7
row1 -0.7359815  2.231589 -0.371051 0.1457049  1.044323 -0.08507539 -1.319739
row5  1.0412233 -1.000908  1.921045 1.2484624 -1.052515 -0.51787933  1.194816
          col8       col9      col10    col11     col12      col13      col14
row1 -1.062844 -0.2651069  0.9475659 0.958864 1.3379448 1.17680531 -0.9627458
row5 -0.879919  0.5294170 -0.5321008 1.661109 0.0360449 0.01707204  1.2251730
          col15      col16     col17      col18      col19      col20
row1 -0.4534147 -0.7854596 0.3173063 -0.7982663 -1.6361989 -0.6570418
row5 -1.7989258  2.1099130 1.1392635 -1.1407877 -0.4250433 -0.3743346
> tmp[,c("col6","col20")]
            col6      col20
row1 -0.08507539 -0.6570418
row2 -0.88806153 -0.3306463
row3  0.72976579 -0.8906417
row4  0.46576450 -0.9259899
row5 -0.51787933 -0.3743346
> tmp[c("row1","row5"),c("col6","col20")]
            col6      col20
row1 -0.08507539 -0.6570418
row5 -0.51787933 -0.3743346
> 
> 
> 
> 
> 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.14692 50.94484 51.76616 48.43646 50.27795 105.986 50.36201 50.73786
         col9    col10    col11    col12    col13    col14    col15    col16
row1 49.72029 49.03659 46.37596 50.99115 50.11421 48.23543 49.31342 50.51623
        col17    col18    col19    col20
row1 49.29057 49.06695 50.80317 105.6769
> tmp[,"col10"]
        col10
row1 49.03659
row2 29.16207
row3 29.95428
row4 29.48120
row5 50.37987
> tmp[c("row1","row5"),]
         col1     col2     col3     col4     col5     col6     col7     col8
row1 51.14692 50.94484 51.76616 48.43646 50.27795 105.9860 50.36201 50.73786
row5 48.70571 48.58098 49.61431 51.44448 50.68982 104.8554 49.13331 48.47248
         col9    col10    col11    col12    col13    col14    col15    col16
row1 49.72029 49.03659 46.37596 50.99115 50.11421 48.23543 49.31342 50.51623
row5 49.48537 50.37987 50.15097 51.03303 46.78149 49.22041 51.30513 49.54059
        col17    col18    col19    col20
row1 49.29057 49.06695 50.80317 105.6769
row5 50.17741 49.51484 49.92213 105.8078
> tmp[,c("col6","col20")]
          col6     col20
row1 105.98595 105.67687
row2  75.65316  73.49527
row3  74.21151  74.21244
row4  74.86235  74.98624
row5 104.85545 105.80778
> tmp[c("row1","row5"),c("col6","col20")]
         col6    col20
row1 105.9860 105.6769
row5 104.8554 105.8078
> 
> 
> subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2]
         col6    col20
row1 105.9860 105.6769
row5 104.8554 105.8078
> 
> 
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> colnames(tmp) <- colnames(tmp,do.NULL=FALSE)
> 
> tmp[,"col13"]
          col13
[1,] -0.8805358
[2,]  0.1024771
[3,] -0.4982455
[4,]  0.3378072
[5,]  0.2052541
> tmp[,c("col17","col7")]
          col17       col7
[1,]  1.2004497  2.5115522
[2,]  0.3728304 -0.7122783
[3,] -0.3358940  0.1975197
[4,] -0.3125386 -0.5064677
[5,] -0.6962462  0.5543422
> 
> subBufferedMatrix(tmp,,c("col6","col20"))[,1:2]
           col6      col20
[1,] -0.3766048  1.0975711
[2,]  0.4555540 -0.1146734
[3,] -1.7824779  1.2350895
[4,]  0.1675255  0.2421701
[5,]  0.8288168 -0.5775974
> subBufferedMatrix(tmp,1,c("col6"))[,1]
           col1
[1,] -0.3766048
> subBufferedMatrix(tmp,1:2,c("col6"))[,1]
           col6
[1,] -0.3766048
[2,]  0.4555540
> 
> 
> 
> tmp <- createBufferedMatrix(5,20)
> tmp[1:5,1:20] <- rnorm(100)
> rownames(tmp) <- rownames(tmp,do.NULL=FALSE)
> 
> 
> 
> 
> subBufferedMatrix(tmp,c("row3","row1"),)[,1:20]
          [,1]       [,2]        [,3]     [,4]       [,5]      [,6]      [,7]
row3 -0.852004  1.1199916 -0.03710114 0.883737  0.9926314 0.8403083 0.5477020
row1 -1.176594 -0.2060382 -1.36063877 1.785207 -0.8310527 1.1548930 0.2180298
          [,8]       [,9]      [,10]      [,11]     [,12]     [,13]      [,14]
row3 0.4022758 -0.1669008 -2.0238322 -1.1633544 -1.619820 1.4998613 -0.2408823
row1 1.3178152 -0.9971308  0.2553238  0.4240245 -1.600111 0.1663673 -0.6866473
         [,15]      [,16]     [,17]      [,18]      [,19]      [,20]
row3 0.7297460  1.1400040 0.5607072 -0.1554735 -0.8688880  0.5535749
row1 0.5889962 -0.8133136 0.7225785  0.5093655 -0.5480827 -0.6240817
> subBufferedMatrix(tmp,c("row2"),1:10)[,1:10]
          [,1]       [,2]     [,3]      [,4]      [,5]      [,6]     [,7]
row2 0.5009077 -0.4393268 -1.03463 0.2287907 0.2907669 0.1598307 1.337679
         [,8]      [,9]     [,10]
row2 1.374543 0.1559891 0.2710608
> subBufferedMatrix(tmp,c("row5"),1:20)[,1:20]
           [,1]      [,2]     [,3]     [,4]      [,5]      [,6]      [,7]
row5 -0.9826015 -1.141679 1.227584 1.791763 0.3522671 0.1879598 -1.205738
           [,8]      [,9]     [,10]     [,11]      [,12]     [,13]     [,14]
row5 -0.4740662 -1.252244 0.8092781 0.8348699 -0.4221279 0.9943824 -1.419032
        [,15]    [,16]     [,17]       [,18]    [,19]      [,20]
row5 1.396247 1.070515 0.4885272 -0.09986944 1.220364 -0.3037834
> 
> 
> 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: 0x62c20d6d9810>
> is.ReadOnlyMode(tmp)
[1] TRUE
> 
> filenames(tmp)
 [1] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e65412bb2"
 [2] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e31d7548d"
 [3] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e77ffdbf1"
 [4] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e606cc645"
 [5] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e1b022f2c"
 [6] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e888760c" 
 [7] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e8ea831"  
 [8] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e6c33338f"
 [9] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e2c79c43c"
[10] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e67884571"
[11] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e2df84da3"
[12] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e280db485"
[13] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e55ec8900"
[14] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e30bdf0e8"
[15] "/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests/BM39083e5bbb50a" 
> 
> 
> ### 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: 0x62c20d4488f0>
> MoveStorageDirectory(tmp,getwd(),full.path=TRUE)
<pointer: 0x62c20d4488f0>
Warning message:
In dir.create(new.directory) :
  '/home/biocbuild/bbs-3.23-bioc/meat/BufferedMatrix.Rcheck/tests' already exists
> 
> 
> RowMode(tmp)
<pointer: 0x62c20d4488f0>
> rowMedians(tmp)
  [1] -0.3989775439  0.1170841623  0.0585374293 -0.2752885468 -0.1872481708
  [6] -0.1548239864 -0.0153285656  0.3188172723 -0.2578300009 -0.0332923171
 [11] -0.6737185817 -0.0316666224  0.0294289744 -0.2713870184  0.3297357944
 [16] -0.5500776860  0.5154080457 -0.2399845278  0.0297304972  0.1972476648
 [21] -0.0211247556  0.3837999675  0.1441428552 -0.0516604281  0.2029974247
 [26] -0.1110390816  0.7913090391  0.0813929685  0.0006801251  0.0668816471
 [31] -0.2354270795  0.2832129783 -0.8101674509  0.0757827437  0.6422990635
 [36] -0.0009679877  0.3118154446  0.8661464165  0.1212010841  0.0474062742
 [41] -0.0132525254 -0.2566345058  0.3392856843  0.2375159249  0.2876628306
 [46]  0.3450965720  0.4056782632 -0.3538715800  0.0559977287  0.2964345511
 [51] -0.2301235123 -0.0929227905  0.2296110645  0.1031727628 -0.0296109905
 [56] -0.0869794837  0.4762533559  0.3415446099 -0.6359056861 -0.0961000241
 [61]  0.0406774732 -0.0045575704  0.1659361752  0.0516632148 -0.0286410476
 [66] -0.1015167158  0.1667481851 -0.3995820294 -0.1776510485 -0.0770303600
 [71] -0.0700009846  0.0781493024 -0.3221173533  0.0087995441  0.5043572852
 [76]  0.2653142702 -0.5421258243 -0.2628340867 -0.1407255292 -0.4236356691
 [81] -0.0171211787  0.1418290839  0.0099003650  0.1035054184  0.6520842994
 [86] -0.2264414327 -0.2813633277 -0.3120891894  0.3046380731 -0.0269178723
 [91] -0.0360062621  0.2685645539 -0.0374556112 -0.3432890434  0.2483092706
 [96] -0.3221453585  0.1208860449  0.3589372785  0.0886035434  0.0254783466
[101] -0.2611851166 -0.0010461161  0.0761568656 -0.2349793568  0.6292797496
[106]  0.2765708377  0.1079381332 -0.0662514309 -0.2036286686 -0.1948713464
[111]  0.1533381755  0.2123995293 -0.1679793324  0.2486895880  0.4460815286
[116] -0.2052135192  0.2046923895 -0.0843451083 -0.4221119180 -0.1268901874
[121] -0.1588299599  0.1504949845  0.1629271880  0.4522049996 -0.2712663242
[126]  0.0689221445  0.7837405323  0.0572403555  0.5500273905 -0.2059837677
[131]  0.0697466006  0.3525361959 -0.0421157140 -0.1289633301  0.3729757669
[136]  0.0914067977  0.1798468592 -0.3421594759 -0.5807739260  0.0485329863
[141] -0.1275706459 -0.2621958400 -0.3565629168  0.5739622809  0.4073639782
[146] -0.4300400435  0.1497966430 -0.3840981805  0.2145364340 -0.1465829670
[151] -0.0168336776 -0.2367704989  0.8087540305  0.1916504107 -0.6167269452
[156]  0.0818548558 -0.0678408236  0.1697923296 -0.4043764189  0.0287710702
[161] -0.1825003163 -0.2475247197  0.2366195499  0.0076522677 -0.3316532815
[166]  0.4330463005 -0.5513917927  0.3266380817  0.4146084796 -0.2578382880
[171]  0.5764687413  0.0963583519  0.1481157512  0.6540471393 -0.0475411979
[176]  0.1920312641  0.2046027205  0.3190574633 -0.0538967123 -0.4578419094
[181]  0.0401535438  0.0159866120 -0.2678542420 -0.2748311751  0.0046592525
[186] -0.0798403891 -0.0993999460  0.3219406493  0.0704317961 -0.0090497343
[191] -0.0859179711 -0.1507145366  0.7000989351  0.0583088600 -0.0597025504
[196] -0.1469128851  0.0560245961 -0.0430360203 -0.0396597500  0.0153421867
[201]  0.0921772675 -0.1314338090 -0.2418382064  0.0858081441  0.4503363949
[206] -0.1636136040 -0.0295332522 -0.0470909516 -0.0767193446 -0.2739509160
[211]  0.6079717987 -0.2324708371 -0.1204445764 -0.1511190898  0.2032490278
[216]  0.3652489205  0.0622111800 -0.0155958780  0.3547240673 -0.6754449952
[221] -0.4754898630  0.2160110806 -0.8005735152 -0.2850949838 -0.1500405039
[226] -0.3327685635  0.4074235999 -0.3941168215  0.6442323879  0.3234605725
> 
> proc.time()
   user  system elapsed 
  1.313   1.471   2.773 

BufferedMatrix.Rcheck/tests/rawCalltesting.Rout


R Under development (unstable) (2026-01-15 r89304) -- "Unsuffered Consequences"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

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

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

<pointer: 0x626df4dcac10>
> .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: 0x626df4dcac10>
> .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: 0x626df4dcac10>
> .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: 0x626df4dcac10>
> 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: 0x626df5a8d2d0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x626df5a8d2d0>
> .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: 0x626df5a8d2d0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x626df5a8d2d0>
> .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: 0x626df5a8d2d0>
> 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: 0x626df6162d70>
> .Call("R_bm_AddColumn",P)
<pointer: 0x626df6162d70>
> .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: 0x626df6162d70>
> 
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x626df6162d70>
> .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: 0x626df6162d70>
> 
> .Call("R_bm_RowMode",P)
<pointer: 0x626df6162d70>
> .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: 0x626df6162d70>
> 
> .Call("R_bm_ColMode",P)
<pointer: 0x626df6162d70>
> .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: 0x626df6162d70>
> 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: 0x626df5cd6370>
> .Call("R_bm_SetPrefix",P,"BufferedMatrixFile")
<pointer: 0x626df5cd6370>
> .Call("R_bm_AddColumn",P)
<pointer: 0x626df5cd6370>
> .Call("R_bm_AddColumn",P)
<pointer: 0x626df5cd6370>
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile390a3f1a221"    "BufferedMatrixFile390a3f535d8fe7"
> rm(P)
> dir(pattern="BufferedMatrixFile")
[1] "BufferedMatrixFile390a3f1a221"    "BufferedMatrixFile390a3f535d8fe7"
> 
> 
> P <- .Call("R_bm_Create",prefix,directory,1,1)
> .Call("R_bm_setRows",P,10)
[1] TRUE
> .Call("R_bm_AddColumn",P)
<pointer: 0x626df5c21ff0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x626df5c21ff0>
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x626df5c21ff0>
> .Call("R_bm_isReadOnlyMode",P)
[1] TRUE
> .Call("R_bm_ReadOnlyModeToggle",P)
<pointer: 0x626df5c21ff0>
> .Call("R_bm_isReadOnlyMode",P)
[1] FALSE
> .Call("R_bm_isRowMode",P)
[1] FALSE
> .Call("R_bm_RowMode",P)
<pointer: 0x626df5c21ff0>
> .Call("R_bm_isRowMode",P)
[1] TRUE
> .Call("R_bm_ColMode",P)
<pointer: 0x626df5c21ff0>
> .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: 0x626df5e043d0>
> .Call("R_bm_AddColumn",P)
<pointer: 0x626df5e043d0>
> 
> .Call("R_bm_getSize",P)
[1] 10  2
> .Call("R_bm_getBufferSize",P)
[1] 1 1
> .Call("R_bm_ResizeBuffer",P,5,5)
<pointer: 0x626df5e043d0>
> 
> .Call("R_bm_getBufferSize",P)
[1] 5 5
> .Call("R_bm_ResizeBuffer",P,-1,5)
<pointer: 0x626df5e043d0>
> 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: 0x626df75b5fb0>
> .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: 0x626df75b5fb0>
> rm(P)
> 
> proc.time()
   user  system elapsed 
  0.265   0.045   0.298 

BufferedMatrix.Rcheck/tests/Rcodetesting.Rout


R Under development (unstable) (2026-01-15 r89304) -- "Unsuffered Consequences"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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

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

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

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

Attaching package: 'BufferedMatrix'

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

    colMeans, colSums, rowMeans, rowSums

> 
> Temp <- createBufferedMatrix(100)
> dim(Temp)
[1] 100   0
> buffer.dim(Temp)
[1] 1 1
> 
> 
> proc.time()
   user  system elapsed 
  0.232   0.053   0.272 

Example timings