Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-09-12 12:02 -0400 (Fri, 12 Sep 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 Patched (2025-08-23 r88802) -- "Great Square Root" | 4715 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4535 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4519 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4543 |
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 252/2322 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.73.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.7 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
taishan | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
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. |
Package: BufferedMatrix |
Version: 1.73.0 |
Command: /home/biocbuild/bbs-3.22-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.22-bioc/R/site-library --timings BufferedMatrix_1.73.0.tar.gz |
StartedAt: 2025-09-11 21:32:48 -0400 (Thu, 11 Sep 2025) |
EndedAt: 2025-09-11 21:33:21 -0400 (Thu, 11 Sep 2025) |
EllapsedTime: 33.1 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.22-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.22-bioc/R/site-library --timings BufferedMatrix_1.73.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.5.1 Patched (2025-08-23 r88802) * 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.73.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... OK * used C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * DONE Status: 2 NOTEs See ‘/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.22-bioc/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/bbs-3.22-bioc/R/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.73.0’ ** using staged installation ** libs using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’ gcc -std=gnu2x -I"/home/biocbuild/bbs-3.22-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -std=gnu2x -I"/home/biocbuild/bbs-3.22-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function ‘dbm_ReadOnlyMode’: doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ doubleBufferedMatrix.c: At top level: doubleBufferedMatrix.c:3327:12: warning: ‘sort_double’ defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ gcc -std=gnu2x -I"/home/biocbuild/bbs-3.22-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -std=gnu2x -I"/home/biocbuild/bbs-3.22-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c init_package.c -o init_package.o gcc -std=gnu2x -shared -L/home/biocbuild/bbs-3.22-bioc/R/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/bbs-3.22-bioc/R/lib -lR installing to /home/biocbuild/bbs-3.22-bioc/R/site-library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.5.1 Patched (2025-08-23 r88802) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.291 0.056 0.381
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.1 Patched (2025-08-23 r88802) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 478419 25.6 1047111 56 639600 34.2 Vcells 885237 6.8 8388608 64 2081604 15.9 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Thu Sep 11 21:33:08 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Thu Sep 11 21:33:08 2025" > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > > > RowMode(tmp2) <pointer: 0x5c3a42b36c80> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Thu Sep 11 21:33:09 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Thu Sep 11 21:33:09 2025" > > ColMode(tmp2) <pointer: 0x5c3a42b36c80> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.3853294 2.0063817 -1.2785517 -0.3285324 [2,] 0.2731118 -1.4783057 1.1252973 -1.2693548 [3,] 1.0150892 0.2633765 -0.5302628 -0.2070237 [4,] -2.5250839 0.8896854 1.3224248 1.6301032 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.3853294 2.0063817 1.2785517 0.3285324 [2,] 0.2731118 1.4783057 1.1252973 1.2693548 [3,] 1.0150892 0.2633765 0.5302628 0.2070237 [4,] 2.5250839 0.8896854 1.3224248 1.6301032 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.969219 1.4164680 1.1307306 0.5731775 [2,] 0.522601 1.2158560 1.0608003 1.1266565 [3,] 1.007516 0.5132022 0.7281914 0.4549985 [4,] 1.589051 0.9432314 1.1499673 1.2767549 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.07752 41.17106 37.58586 31.06031 [2,] 30.49912 38.63687 36.73330 37.53592 [3,] 36.09025 30.39540 32.81218 29.75701 [4,] 43.41560 35.32200 37.82210 39.39765 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x5c3a44d0f3a0> > exp(tmp5) <pointer: 0x5c3a44d0f3a0> > log(tmp5,2) <pointer: 0x5c3a44d0f3a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.388 > Min(tmp5) [1] 55.00556 > mean(tmp5) [1] 72.83498 > Sum(tmp5) [1] 14567 > Var(tmp5) [1] 850.9 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 92.18888 72.41788 70.03424 70.73675 72.70807 71.64663 69.69933 69.77953 [9] 68.35965 70.77887 > rowSums(tmp5) [1] 1843.778 1448.358 1400.685 1414.735 1454.161 1432.933 1393.987 1395.591 [9] 1367.193 1415.577 > rowVars(tmp5) [1] 7833.80945 57.94609 70.33740 60.14723 76.58209 44.24438 [7] 68.53178 83.95971 110.46128 51.46278 > rowSd(tmp5) [1] 88.508810 7.612233 8.386740 7.755465 8.751119 6.651645 8.278392 [8] 9.162953 10.510056 7.173756 > rowMax(tmp5) [1] 466.38800 84.86995 91.28839 90.36388 85.43869 83.28103 85.69060 [8] 88.34894 88.41146 88.68808 > rowMin(tmp5) [1] 59.19957 56.74204 59.73133 59.72819 55.20151 60.55002 56.62186 57.36589 [9] 55.00556 57.84904 > > colMeans(tmp5) [1] 110.66593 71.11155 72.20714 68.43076 70.29106 71.24332 71.01976 [8] 72.80232 69.75994 70.07007 70.27160 75.01652 68.08197 67.21718 [15] 71.05922 70.13532 74.38947 72.07255 69.18799 71.66598 > colSums(tmp5) [1] 1106.6593 711.1155 722.0714 684.3076 702.9106 712.4332 710.1976 [8] 728.0232 697.5994 700.7007 702.7160 750.1652 680.8197 672.1718 [15] 710.5922 701.3532 743.8947 720.7255 691.8799 716.6598 > colVars(tmp5) [1] 15683.69896 109.68069 37.31613 63.37754 53.79172 95.84037 [7] 65.02957 65.30123 46.85157 100.97542 72.77446 79.07704 [13] 98.05243 100.19107 45.94753 68.76226 74.63176 81.87308 [19] 36.77105 82.25396 > colSd(tmp5) [1] 125.234576 10.472855 6.108693 7.961001 7.334284 9.789809 [7] 8.064092 8.080918 6.844821 10.048652 8.530795 8.892527 [13] 9.902143 10.009549 6.778461 8.292301 8.638967 9.048374 [19] 6.063913 9.069397 > colMax(tmp5) [1] 466.38800 85.69217 81.99887 82.00105 85.43869 91.28839 86.13737 [8] 88.41146 83.34228 86.66484 85.69060 88.34894 84.86995 85.98454 [15] 79.69690 83.28103 88.68808 85.64531 75.65549 85.23941 > colMin(tmp5) [1] 63.47993 55.20151 64.56793 58.16198 60.55002 57.53497 60.19681 62.18380 [9] 60.62123 56.11844 58.91719 63.93643 55.00556 56.74204 62.39546 57.84904 [17] 59.13379 59.32919 58.03331 57.36589 > > > ### 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] 92.18888 72.41788 70.03424 70.73675 72.70807 71.64663 69.69933 69.77953 [9] 68.35965 NA > rowSums(tmp5) [1] 1843.778 1448.358 1400.685 1414.735 1454.161 1432.933 1393.987 1395.591 [9] 1367.193 NA > rowVars(tmp5) [1] 7833.80945 57.94609 70.33740 60.14723 76.58209 44.24438 [7] 68.53178 83.95971 110.46128 44.54520 > rowSd(tmp5) [1] 88.508810 7.612233 8.386740 7.755465 8.751119 6.651645 8.278392 [8] 9.162953 10.510056 6.674219 > rowMax(tmp5) [1] 466.38800 84.86995 91.28839 90.36388 85.43869 83.28103 85.69060 [8] 88.34894 88.41146 NA > rowMin(tmp5) [1] 59.19957 56.74204 59.73133 59.72819 55.20151 60.55002 56.62186 57.36589 [9] 55.00556 NA > > colMeans(tmp5) [1] 110.66593 71.11155 72.20714 68.43076 70.29106 71.24332 71.01976 [8] 72.80232 69.75994 70.07007 70.27160 75.01652 68.08197 67.21718 [15] 71.05922 NA 74.38947 72.07255 69.18799 71.66598 > colSums(tmp5) [1] 1106.6593 711.1155 722.0714 684.3076 702.9106 712.4332 710.1976 [8] 728.0232 697.5994 700.7007 702.7160 750.1652 680.8197 672.1718 [15] 710.5922 NA 743.8947 720.7255 691.8799 716.6598 > colVars(tmp5) [1] 15683.69896 109.68069 37.31613 63.37754 53.79172 95.84037 [7] 65.02957 65.30123 46.85157 100.97542 72.77446 79.07704 [13] 98.05243 100.19107 45.94753 NA 74.63176 81.87308 [19] 36.77105 82.25396 > colSd(tmp5) [1] 125.234576 10.472855 6.108693 7.961001 7.334284 9.789809 [7] 8.064092 8.080918 6.844821 10.048652 8.530795 8.892527 [13] 9.902143 10.009549 6.778461 NA 8.638967 9.048374 [19] 6.063913 9.069397 > colMax(tmp5) [1] 466.38800 85.69217 81.99887 82.00105 85.43869 91.28839 86.13737 [8] 88.41146 83.34228 86.66484 85.69060 88.34894 84.86995 85.98454 [15] 79.69690 NA 88.68808 85.64531 75.65549 85.23941 > colMin(tmp5) [1] 63.47993 55.20151 64.56793 58.16198 60.55002 57.53497 60.19681 62.18380 [9] 60.62123 56.11844 58.91719 63.93643 55.00556 56.74204 62.39546 NA [17] 59.13379 59.32919 58.03331 57.36589 > > Max(tmp5,na.rm=TRUE) [1] 466.388 > Min(tmp5,na.rm=TRUE) [1] 55.00556 > mean(tmp5,na.rm=TRUE) [1] 72.91029 > Sum(tmp5,na.rm=TRUE) [1] 14509.15 > Var(tmp5,na.rm=TRUE) [1] 854.0575 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.18888 72.41788 70.03424 70.73675 72.70807 71.64663 69.69933 69.77953 [9] 68.35965 71.45938 > rowSums(tmp5,na.rm=TRUE) [1] 1843.778 1448.358 1400.685 1414.735 1454.161 1432.933 1393.987 1395.591 [9] 1367.193 1357.728 > rowVars(tmp5,na.rm=TRUE) [1] 7833.80945 57.94609 70.33740 60.14723 76.58209 44.24438 [7] 68.53178 83.95971 110.46128 44.54520 > rowSd(tmp5,na.rm=TRUE) [1] 88.508810 7.612233 8.386740 7.755465 8.751119 6.651645 8.278392 [8] 9.162953 10.510056 6.674219 > rowMax(tmp5,na.rm=TRUE) [1] 466.38800 84.86995 91.28839 90.36388 85.43869 83.28103 85.69060 [8] 88.34894 88.41146 88.68808 > rowMin(tmp5,na.rm=TRUE) [1] 59.19957 56.74204 59.73133 59.72819 55.20151 60.55002 56.62186 57.36589 [9] 55.00556 60.19681 > > colMeans(tmp5,na.rm=TRUE) [1] 110.66593 71.11155 72.20714 68.43076 70.29106 71.24332 71.01976 [8] 72.80232 69.75994 70.07007 70.27160 75.01652 68.08197 67.21718 [15] 71.05922 71.50046 74.38947 72.07255 69.18799 71.66598 > colSums(tmp5,na.rm=TRUE) [1] 1106.6593 711.1155 722.0714 684.3076 702.9106 712.4332 710.1976 [8] 728.0232 697.5994 700.7007 702.7160 750.1652 680.8197 672.1718 [15] 710.5922 643.5042 743.8947 720.7255 691.8799 716.6598 > colVars(tmp5,na.rm=TRUE) [1] 15683.69896 109.68069 37.31613 63.37754 53.79172 95.84037 [7] 65.02957 65.30123 46.85157 100.97542 72.77446 79.07704 [13] 98.05243 100.19107 45.94753 56.39190 74.63176 81.87308 [19] 36.77105 82.25396 > colSd(tmp5,na.rm=TRUE) [1] 125.234576 10.472855 6.108693 7.961001 7.334284 9.789809 [7] 8.064092 8.080918 6.844821 10.048652 8.530795 8.892527 [13] 9.902143 10.009549 6.778461 7.509454 8.638967 9.048374 [19] 6.063913 9.069397 > colMax(tmp5,na.rm=TRUE) [1] 466.38800 85.69217 81.99887 82.00105 85.43869 91.28839 86.13737 [8] 88.41146 83.34228 86.66484 85.69060 88.34894 84.86995 85.98454 [15] 79.69690 83.28103 88.68808 85.64531 75.65549 85.23941 > colMin(tmp5,na.rm=TRUE) [1] 63.47993 55.20151 64.56793 58.16198 60.55002 57.53497 60.19681 62.18380 [9] 60.62123 56.11844 58.91719 63.93643 55.00556 56.74204 62.39546 61.61191 [17] 59.13379 59.32919 58.03331 57.36589 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 92.18888 72.41788 70.03424 70.73675 72.70807 71.64663 69.69933 69.77953 [9] 68.35965 NaN > rowSums(tmp5,na.rm=TRUE) [1] 1843.778 1448.358 1400.685 1414.735 1454.161 1432.933 1393.987 1395.591 [9] 1367.193 0.000 > rowVars(tmp5,na.rm=TRUE) [1] 7833.80945 57.94609 70.33740 60.14723 76.58209 44.24438 [7] 68.53178 83.95971 110.46128 NA > rowSd(tmp5,na.rm=TRUE) [1] 88.508810 7.612233 8.386740 7.755465 8.751119 6.651645 8.278392 [8] 9.162953 10.510056 NA > rowMax(tmp5,na.rm=TRUE) [1] 466.38800 84.86995 91.28839 90.36388 85.43869 83.28103 85.69060 [8] 88.34894 88.41146 NA > rowMin(tmp5,na.rm=TRUE) [1] 59.19957 56.74204 59.73133 59.72819 55.20151 60.55002 56.62186 57.36589 [9] 55.00556 NA > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 114.98079 71.74197 72.44801 68.93934 70.40132 70.95123 72.22231 [8] 72.71047 69.67414 69.82756 70.15321 73.98809 67.05732 66.67486 [15] 71.13161 NaN 72.80073 72.95841 69.07310 72.03381 > colSums(tmp5,na.rm=TRUE) [1] 1034.8271 645.6778 652.0321 620.4541 633.6119 638.5611 650.0007 [8] 654.3943 627.0673 628.4480 631.3789 665.8928 603.5159 600.0738 [15] 640.1845 0.0000 655.2066 656.6257 621.6579 648.3043 > colVars(tmp5,na.rm=TRUE) [1] 17434.70911 118.91959 41.32794 68.38982 60.37891 106.86062 [7] 56.88935 73.36899 52.62521 112.93571 81.71359 77.06294 [13] 98.49756 109.40627 51.63201 NA 55.56486 83.27870 [19] 41.21894 91.01360 > colSd(tmp5,na.rm=TRUE) [1] 132.040559 10.905026 6.428681 8.269814 7.770386 10.337341 [7] 7.542503 8.565570 7.254324 10.627121 9.039557 8.778550 [13] 9.924594 10.459745 7.185542 NA 7.454184 9.125716 [19] 6.420198 9.540105 > colMax(tmp5,na.rm=TRUE) [1] 466.38800 85.69217 81.99887 82.00105 85.43869 91.28839 86.13737 [8] 88.41146 83.34228 86.66484 85.69060 88.34894 84.86995 85.98454 [15] 79.69690 -Inf 84.61875 85.64531 75.65549 85.23941 > colMin(tmp5,na.rm=TRUE) [1] 63.47993 55.20151 64.56793 58.16198 60.55002 57.53497 61.57094 62.18380 [9] 60.62123 56.11844 58.91719 63.93643 55.00556 56.74204 62.39546 Inf [17] 59.13379 59.32919 58.03331 57.36589 > > > > > 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] 209.6439 217.8540 308.6283 169.8479 204.2188 173.5316 214.8722 262.1217 [9] 327.4268 324.7652 > apply(copymatrix,1,var,na.rm=TRUE) [1] 209.6439 217.8540 308.6283 169.8479 204.2188 173.5316 214.8722 262.1217 [9] 327.4268 324.7652 > > > > 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] -8.526513e-14 0.000000e+00 -1.705303e-13 4.263256e-14 -1.136868e-13 [6] -8.526513e-14 -1.136868e-13 -1.705303e-13 0.000000e+00 5.684342e-14 [11] 8.526513e-14 0.000000e+00 1.705303e-13 -5.684342e-14 2.842171e-13 [16] 2.842171e-14 -1.421085e-13 -1.136868e-13 8.526513e-14 -1.705303e-13 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 2 11 3 10 10 11 1 20 7 17 6 14 3 5 8 9 4 6 6 14 8 20 2 8 7 8 1 8 6 10 2 20 9 6 2 11 4 18 4 16 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.48983 > Min(tmp) [1] -2.631003 > mean(tmp) [1] -0.0999567 > Sum(tmp) [1] -9.99567 > Var(tmp) [1] 1.026765 > > rowMeans(tmp) [1] -0.0999567 > rowSums(tmp) [1] -9.99567 > rowVars(tmp) [1] 1.026765 > rowSd(tmp) [1] 1.013294 > rowMax(tmp) [1] 2.48983 > rowMin(tmp) [1] -2.631003 > > colMeans(tmp) [1] 0.08349181 0.66131435 0.12286197 -0.79309294 -0.77818967 -0.94187259 [7] -0.16329676 0.96310478 0.06528991 -0.45112337 0.31147401 -0.10675120 [13] 0.39859376 1.81868307 -1.47721034 -0.08158485 0.23961541 -0.95198190 [19] -1.93722362 0.27780367 -0.09322979 1.18492797 1.33916411 1.61984546 [25] -0.88589976 0.77208273 -0.17620932 -0.68403638 -1.53189190 -1.07509931 [31] 0.45249572 0.82553152 -0.70349303 0.99546247 1.97665469 -1.35878548 [37] 0.70312544 -1.07928156 0.21038717 -1.57904617 0.18313847 0.41000682 [43] 1.13086768 1.04163828 -1.50202068 0.22480681 -0.19336280 1.67112836 [49] -0.71443976 -1.12518238 -0.80025552 0.16920676 -0.11613539 -1.03514100 [55] -1.43211867 -0.64080187 0.78226873 -0.14162619 -0.29339820 -1.09960057 [61] 0.41428431 2.48983020 0.95583626 -1.86459549 -2.63100307 -0.67022206 [67] 0.47475764 0.91247724 -0.38809517 1.51776284 1.09112062 0.46801969 [73] 0.67743411 -2.15420162 -0.20917683 1.61829420 0.31368481 -0.83000351 [79] 0.27365820 -0.92921285 0.02823556 0.20394886 0.62378135 -1.15800393 [85] -0.78640236 -0.69193515 -0.47937901 0.44691053 0.40083616 -1.69601444 [91] -2.39320740 -1.17962743 -0.86960432 -0.26174955 -0.51686369 -0.03600270 [97] -0.13150674 1.17948809 0.33890798 0.76027958 > colSums(tmp) [1] 0.08349181 0.66131435 0.12286197 -0.79309294 -0.77818967 -0.94187259 [7] -0.16329676 0.96310478 0.06528991 -0.45112337 0.31147401 -0.10675120 [13] 0.39859376 1.81868307 -1.47721034 -0.08158485 0.23961541 -0.95198190 [19] -1.93722362 0.27780367 -0.09322979 1.18492797 1.33916411 1.61984546 [25] -0.88589976 0.77208273 -0.17620932 -0.68403638 -1.53189190 -1.07509931 [31] 0.45249572 0.82553152 -0.70349303 0.99546247 1.97665469 -1.35878548 [37] 0.70312544 -1.07928156 0.21038717 -1.57904617 0.18313847 0.41000682 [43] 1.13086768 1.04163828 -1.50202068 0.22480681 -0.19336280 1.67112836 [49] -0.71443976 -1.12518238 -0.80025552 0.16920676 -0.11613539 -1.03514100 [55] -1.43211867 -0.64080187 0.78226873 -0.14162619 -0.29339820 -1.09960057 [61] 0.41428431 2.48983020 0.95583626 -1.86459549 -2.63100307 -0.67022206 [67] 0.47475764 0.91247724 -0.38809517 1.51776284 1.09112062 0.46801969 [73] 0.67743411 -2.15420162 -0.20917683 1.61829420 0.31368481 -0.83000351 [79] 0.27365820 -0.92921285 0.02823556 0.20394886 0.62378135 -1.15800393 [85] -0.78640236 -0.69193515 -0.47937901 0.44691053 0.40083616 -1.69601444 [91] -2.39320740 -1.17962743 -0.86960432 -0.26174955 -0.51686369 -0.03600270 [97] -0.13150674 1.17948809 0.33890798 0.76027958 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] 0.08349181 0.66131435 0.12286197 -0.79309294 -0.77818967 -0.94187259 [7] -0.16329676 0.96310478 0.06528991 -0.45112337 0.31147401 -0.10675120 [13] 0.39859376 1.81868307 -1.47721034 -0.08158485 0.23961541 -0.95198190 [19] -1.93722362 0.27780367 -0.09322979 1.18492797 1.33916411 1.61984546 [25] -0.88589976 0.77208273 -0.17620932 -0.68403638 -1.53189190 -1.07509931 [31] 0.45249572 0.82553152 -0.70349303 0.99546247 1.97665469 -1.35878548 [37] 0.70312544 -1.07928156 0.21038717 -1.57904617 0.18313847 0.41000682 [43] 1.13086768 1.04163828 -1.50202068 0.22480681 -0.19336280 1.67112836 [49] -0.71443976 -1.12518238 -0.80025552 0.16920676 -0.11613539 -1.03514100 [55] -1.43211867 -0.64080187 0.78226873 -0.14162619 -0.29339820 -1.09960057 [61] 0.41428431 2.48983020 0.95583626 -1.86459549 -2.63100307 -0.67022206 [67] 0.47475764 0.91247724 -0.38809517 1.51776284 1.09112062 0.46801969 [73] 0.67743411 -2.15420162 -0.20917683 1.61829420 0.31368481 -0.83000351 [79] 0.27365820 -0.92921285 0.02823556 0.20394886 0.62378135 -1.15800393 [85] -0.78640236 -0.69193515 -0.47937901 0.44691053 0.40083616 -1.69601444 [91] -2.39320740 -1.17962743 -0.86960432 -0.26174955 -0.51686369 -0.03600270 [97] -0.13150674 1.17948809 0.33890798 0.76027958 > colMin(tmp) [1] 0.08349181 0.66131435 0.12286197 -0.79309294 -0.77818967 -0.94187259 [7] -0.16329676 0.96310478 0.06528991 -0.45112337 0.31147401 -0.10675120 [13] 0.39859376 1.81868307 -1.47721034 -0.08158485 0.23961541 -0.95198190 [19] -1.93722362 0.27780367 -0.09322979 1.18492797 1.33916411 1.61984546 [25] -0.88589976 0.77208273 -0.17620932 -0.68403638 -1.53189190 -1.07509931 [31] 0.45249572 0.82553152 -0.70349303 0.99546247 1.97665469 -1.35878548 [37] 0.70312544 -1.07928156 0.21038717 -1.57904617 0.18313847 0.41000682 [43] 1.13086768 1.04163828 -1.50202068 0.22480681 -0.19336280 1.67112836 [49] -0.71443976 -1.12518238 -0.80025552 0.16920676 -0.11613539 -1.03514100 [55] -1.43211867 -0.64080187 0.78226873 -0.14162619 -0.29339820 -1.09960057 [61] 0.41428431 2.48983020 0.95583626 -1.86459549 -2.63100307 -0.67022206 [67] 0.47475764 0.91247724 -0.38809517 1.51776284 1.09112062 0.46801969 [73] 0.67743411 -2.15420162 -0.20917683 1.61829420 0.31368481 -0.83000351 [79] 0.27365820 -0.92921285 0.02823556 0.20394886 0.62378135 -1.15800393 [85] -0.78640236 -0.69193515 -0.47937901 0.44691053 0.40083616 -1.69601444 [91] -2.39320740 -1.17962743 -0.86960432 -0.26174955 -0.51686369 -0.03600270 [97] -0.13150674 1.17948809 0.33890798 0.76027958 > colMedians(tmp) [1] 0.08349181 0.66131435 0.12286197 -0.79309294 -0.77818967 -0.94187259 [7] -0.16329676 0.96310478 0.06528991 -0.45112337 0.31147401 -0.10675120 [13] 0.39859376 1.81868307 -1.47721034 -0.08158485 0.23961541 -0.95198190 [19] -1.93722362 0.27780367 -0.09322979 1.18492797 1.33916411 1.61984546 [25] -0.88589976 0.77208273 -0.17620932 -0.68403638 -1.53189190 -1.07509931 [31] 0.45249572 0.82553152 -0.70349303 0.99546247 1.97665469 -1.35878548 [37] 0.70312544 -1.07928156 0.21038717 -1.57904617 0.18313847 0.41000682 [43] 1.13086768 1.04163828 -1.50202068 0.22480681 -0.19336280 1.67112836 [49] -0.71443976 -1.12518238 -0.80025552 0.16920676 -0.11613539 -1.03514100 [55] -1.43211867 -0.64080187 0.78226873 -0.14162619 -0.29339820 -1.09960057 [61] 0.41428431 2.48983020 0.95583626 -1.86459549 -2.63100307 -0.67022206 [67] 0.47475764 0.91247724 -0.38809517 1.51776284 1.09112062 0.46801969 [73] 0.67743411 -2.15420162 -0.20917683 1.61829420 0.31368481 -0.83000351 [79] 0.27365820 -0.92921285 0.02823556 0.20394886 0.62378135 -1.15800393 [85] -0.78640236 -0.69193515 -0.47937901 0.44691053 0.40083616 -1.69601444 [91] -2.39320740 -1.17962743 -0.86960432 -0.26174955 -0.51686369 -0.03600270 [97] -0.13150674 1.17948809 0.33890798 0.76027958 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.08349181 0.6613143 0.122862 -0.7930929 -0.7781897 -0.9418726 -0.1632968 [2,] 0.08349181 0.6613143 0.122862 -0.7930929 -0.7781897 -0.9418726 -0.1632968 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.9631048 0.06528991 -0.4511234 0.311474 -0.1067512 0.3985938 1.818683 [2,] 0.9631048 0.06528991 -0.4511234 0.311474 -0.1067512 0.3985938 1.818683 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -1.47721 -0.08158485 0.2396154 -0.9519819 -1.937224 0.2778037 -0.09322979 [2,] -1.47721 -0.08158485 0.2396154 -0.9519819 -1.937224 0.2778037 -0.09322979 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.184928 1.339164 1.619845 -0.8858998 0.7720827 -0.1762093 -0.6840364 [2,] 1.184928 1.339164 1.619845 -0.8858998 0.7720827 -0.1762093 -0.6840364 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -1.531892 -1.075099 0.4524957 0.8255315 -0.703493 0.9954625 1.976655 [2,] -1.531892 -1.075099 0.4524957 0.8255315 -0.703493 0.9954625 1.976655 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.358785 0.7031254 -1.079282 0.2103872 -1.579046 0.1831385 0.4100068 [2,] -1.358785 0.7031254 -1.079282 0.2103872 -1.579046 0.1831385 0.4100068 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 1.130868 1.041638 -1.502021 0.2248068 -0.1933628 1.671128 -0.7144398 [2,] 1.130868 1.041638 -1.502021 0.2248068 -0.1933628 1.671128 -0.7144398 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -1.125182 -0.8002555 0.1692068 -0.1161354 -1.035141 -1.432119 -0.6408019 [2,] -1.125182 -0.8002555 0.1692068 -0.1161354 -1.035141 -1.432119 -0.6408019 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.7822687 -0.1416262 -0.2933982 -1.099601 0.4142843 2.48983 0.9558363 [2,] 0.7822687 -0.1416262 -0.2933982 -1.099601 0.4142843 2.48983 0.9558363 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -1.864595 -2.631003 -0.6702221 0.4747576 0.9124772 -0.3880952 1.517763 [2,] -1.864595 -2.631003 -0.6702221 0.4747576 0.9124772 -0.3880952 1.517763 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 1.091121 0.4680197 0.6774341 -2.154202 -0.2091768 1.618294 0.3136848 [2,] 1.091121 0.4680197 0.6774341 -2.154202 -0.2091768 1.618294 0.3136848 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.8300035 0.2736582 -0.9292129 0.02823556 0.2039489 0.6237814 -1.158004 [2,] -0.8300035 0.2736582 -0.9292129 0.02823556 0.2039489 0.6237814 -1.158004 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.7864024 -0.6919351 -0.479379 0.4469105 0.4008362 -1.696014 -2.393207 [2,] -0.7864024 -0.6919351 -0.479379 0.4469105 0.4008362 -1.696014 -2.393207 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.179627 -0.8696043 -0.2617496 -0.5168637 -0.0360027 -0.1315067 1.179488 [2,] -1.179627 -0.8696043 -0.2617496 -0.5168637 -0.0360027 -0.1315067 1.179488 [,99] [,100] [1,] 0.338908 0.7602796 [2,] 0.338908 0.7602796 > > > Max(tmp2) [1] 2.567815 > Min(tmp2) [1] -2.669983 > mean(tmp2) [1] -0.1223424 > Sum(tmp2) [1] -12.23424 > Var(tmp2) [1] 1.284041 > > rowMeans(tmp2) [1] -0.39842219 1.44308671 -2.66998323 -2.10162557 -1.27899437 0.28160105 [7] 0.35177361 0.35625475 -0.59586816 0.69645651 -0.21904756 -0.04399607 [13] -1.39149994 0.19064957 -0.80112617 -0.24345932 0.80608478 -0.83664321 [19] -1.96809745 -0.26733196 0.13360992 -0.23757627 0.96575176 -1.85240354 [25] 0.26344718 1.13326071 -0.66668265 2.00663718 1.82096195 -1.64109103 [31] -0.17352881 -0.33920540 -0.32243317 -2.09240678 1.08836956 0.62962263 [37] 1.81272830 -0.57054676 -0.13146089 -0.33188930 0.22296521 -0.17159556 [43] 1.85958353 0.79612272 1.66625598 -0.59022792 0.80936669 1.61115821 [49] -0.94179457 0.59037634 1.61159045 0.28650219 -1.09744529 1.23048215 [55] -2.45403253 0.50562321 0.87121171 -1.09334371 2.04531405 0.08572927 [61] -0.66886821 -1.64716957 0.39405566 -0.76089087 0.71495543 -1.74092827 [67] -1.39855310 -1.05321647 -0.86911598 -0.83515984 -0.28073579 0.05872497 [73] 0.06227767 -0.50751289 0.87689399 -1.30518443 1.35117396 -1.13402581 [79] 1.44899113 -0.23128006 -0.90053399 0.79940264 -0.93248974 2.56781485 [85] -0.42402362 0.28131269 -0.16331388 1.64045186 -1.28254847 -0.69035334 [91] -1.42659605 -1.04641575 -0.98165849 -2.00107028 0.77834281 -0.92994467 [97] -1.73435220 1.07605888 -0.44187020 0.45429296 > rowSums(tmp2) [1] -0.39842219 1.44308671 -2.66998323 -2.10162557 -1.27899437 0.28160105 [7] 0.35177361 0.35625475 -0.59586816 0.69645651 -0.21904756 -0.04399607 [13] -1.39149994 0.19064957 -0.80112617 -0.24345932 0.80608478 -0.83664321 [19] -1.96809745 -0.26733196 0.13360992 -0.23757627 0.96575176 -1.85240354 [25] 0.26344718 1.13326071 -0.66668265 2.00663718 1.82096195 -1.64109103 [31] -0.17352881 -0.33920540 -0.32243317 -2.09240678 1.08836956 0.62962263 [37] 1.81272830 -0.57054676 -0.13146089 -0.33188930 0.22296521 -0.17159556 [43] 1.85958353 0.79612272 1.66625598 -0.59022792 0.80936669 1.61115821 [49] -0.94179457 0.59037634 1.61159045 0.28650219 -1.09744529 1.23048215 [55] -2.45403253 0.50562321 0.87121171 -1.09334371 2.04531405 0.08572927 [61] -0.66886821 -1.64716957 0.39405566 -0.76089087 0.71495543 -1.74092827 [67] -1.39855310 -1.05321647 -0.86911598 -0.83515984 -0.28073579 0.05872497 [73] 0.06227767 -0.50751289 0.87689399 -1.30518443 1.35117396 -1.13402581 [79] 1.44899113 -0.23128006 -0.90053399 0.79940264 -0.93248974 2.56781485 [85] -0.42402362 0.28131269 -0.16331388 1.64045186 -1.28254847 -0.69035334 [91] -1.42659605 -1.04641575 -0.98165849 -2.00107028 0.77834281 -0.92994467 [97] -1.73435220 1.07605888 -0.44187020 0.45429296 > 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.39842219 1.44308671 -2.66998323 -2.10162557 -1.27899437 0.28160105 [7] 0.35177361 0.35625475 -0.59586816 0.69645651 -0.21904756 -0.04399607 [13] -1.39149994 0.19064957 -0.80112617 -0.24345932 0.80608478 -0.83664321 [19] -1.96809745 -0.26733196 0.13360992 -0.23757627 0.96575176 -1.85240354 [25] 0.26344718 1.13326071 -0.66668265 2.00663718 1.82096195 -1.64109103 [31] -0.17352881 -0.33920540 -0.32243317 -2.09240678 1.08836956 0.62962263 [37] 1.81272830 -0.57054676 -0.13146089 -0.33188930 0.22296521 -0.17159556 [43] 1.85958353 0.79612272 1.66625598 -0.59022792 0.80936669 1.61115821 [49] -0.94179457 0.59037634 1.61159045 0.28650219 -1.09744529 1.23048215 [55] -2.45403253 0.50562321 0.87121171 -1.09334371 2.04531405 0.08572927 [61] -0.66886821 -1.64716957 0.39405566 -0.76089087 0.71495543 -1.74092827 [67] -1.39855310 -1.05321647 -0.86911598 -0.83515984 -0.28073579 0.05872497 [73] 0.06227767 -0.50751289 0.87689399 -1.30518443 1.35117396 -1.13402581 [79] 1.44899113 -0.23128006 -0.90053399 0.79940264 -0.93248974 2.56781485 [85] -0.42402362 0.28131269 -0.16331388 1.64045186 -1.28254847 -0.69035334 [91] -1.42659605 -1.04641575 -0.98165849 -2.00107028 0.77834281 -0.92994467 [97] -1.73435220 1.07605888 -0.44187020 0.45429296 > rowMin(tmp2) [1] -0.39842219 1.44308671 -2.66998323 -2.10162557 -1.27899437 0.28160105 [7] 0.35177361 0.35625475 -0.59586816 0.69645651 -0.21904756 -0.04399607 [13] -1.39149994 0.19064957 -0.80112617 -0.24345932 0.80608478 -0.83664321 [19] -1.96809745 -0.26733196 0.13360992 -0.23757627 0.96575176 -1.85240354 [25] 0.26344718 1.13326071 -0.66668265 2.00663718 1.82096195 -1.64109103 [31] -0.17352881 -0.33920540 -0.32243317 -2.09240678 1.08836956 0.62962263 [37] 1.81272830 -0.57054676 -0.13146089 -0.33188930 0.22296521 -0.17159556 [43] 1.85958353 0.79612272 1.66625598 -0.59022792 0.80936669 1.61115821 [49] -0.94179457 0.59037634 1.61159045 0.28650219 -1.09744529 1.23048215 [55] -2.45403253 0.50562321 0.87121171 -1.09334371 2.04531405 0.08572927 [61] -0.66886821 -1.64716957 0.39405566 -0.76089087 0.71495543 -1.74092827 [67] -1.39855310 -1.05321647 -0.86911598 -0.83515984 -0.28073579 0.05872497 [73] 0.06227767 -0.50751289 0.87689399 -1.30518443 1.35117396 -1.13402581 [79] 1.44899113 -0.23128006 -0.90053399 0.79940264 -0.93248974 2.56781485 [85] -0.42402362 0.28131269 -0.16331388 1.64045186 -1.28254847 -0.69035334 [91] -1.42659605 -1.04641575 -0.98165849 -2.00107028 0.77834281 -0.92994467 [97] -1.73435220 1.07605888 -0.44187020 0.45429296 > > colMeans(tmp2) [1] -0.1223424 > colSums(tmp2) [1] -12.23424 > colVars(tmp2) [1] 1.284041 > colSd(tmp2) [1] 1.133155 > colMax(tmp2) [1] 2.567815 > colMin(tmp2) [1] -2.669983 > colMedians(tmp2) [1] -0.2251638 > colRanges(tmp2) [,1] [1,] -2.669983 [2,] 2.567815 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 1.8158730 2.7419922 1.5524214 -3.8668337 -4.7775229 1.8920532 [7] 1.5953054 -4.1664408 -3.4564761 0.6648133 > colApply(tmp,quantile)[,1] [,1] [1,] -0.7419526 [2,] -0.4786664 [3,] 0.1112070 [4,] 0.7188855 [5,] 1.6824859 > > rowApply(tmp,sum) [1] -2.2885492 1.2371885 -2.3643075 -5.9689892 -3.5890871 5.3512794 [7] 6.4495871 -0.1996096 -6.5420601 1.9097328 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 4 7 5 10 4 9 6 4 10 8 [2,] 2 9 9 4 7 6 4 10 7 9 [3,] 8 10 4 8 5 5 2 3 4 10 [4,] 7 6 1 6 3 2 9 5 5 2 [5,] 3 2 8 2 2 3 8 1 2 5 [6,] 5 3 7 5 8 10 3 8 8 7 [7,] 10 4 6 3 10 7 10 2 9 4 [8,] 9 1 2 9 1 1 5 7 1 3 [9,] 6 8 3 1 6 4 7 6 3 1 [10,] 1 5 10 7 9 8 1 9 6 6 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.6788128 2.9185257 -4.7992213 -1.1961474 -1.9899140 1.0892889 [7] 0.2076836 5.2955748 1.4454283 0.5164286 -0.4715985 -0.9220077 [13] 0.4724257 1.8144715 1.6600603 0.7149185 -5.0761858 -0.4664524 [19] 1.2304243 5.5371682 > colApply(tmp,quantile)[,1] [,1] [1,] -0.2899925 [2,] -0.1679384 [3,] 0.5699118 [4,] 0.7553801 [5,] 0.8114518 > > rowApply(tmp,sum) [1] 5.3215218 -2.3938916 -1.4521827 0.5964409 7.5877957 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 8 8 18 17 12 [2,] 20 12 11 6 9 [3,] 4 1 7 8 3 [4,] 7 14 1 16 8 [5,] 12 10 6 3 5 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.2899925 2.60130532 -0.9627931 -0.37675749 0.41644697 0.81237017 [2,] -0.1679384 0.16015052 -1.8601966 0.30002704 0.03583804 0.09484788 [3,] 0.7553801 0.07491018 -0.5488665 -1.37451487 -0.72940918 -0.83114016 [4,] 0.5699118 -0.50278347 -0.3037838 0.34271207 -0.84437852 0.20152903 [5,] 0.8114518 0.58494317 -1.1235813 -0.08761418 -0.86841134 0.81168199 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.7302840 1.9453633 -0.9899673 -0.4542081 0.2641599 1.6598015 [2,] 0.5065092 -0.3067937 0.7278929 -1.0004521 -0.6852953 -1.4973280 [3,] 0.7209183 0.3741333 0.4897910 0.3253611 0.2980971 0.5974438 [4,] -0.8122640 1.3653364 -0.8779825 0.1040143 0.1416556 -0.1643232 [5,] -0.9377640 1.9175354 2.0956942 1.5417135 -0.4902158 -1.5176018 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -1.2822922 -0.1463311 0.94951781 0.1144042 -1.4750489 0.9574907 [2,] 1.2392371 -0.4135676 0.29849109 0.4975226 -1.6983743 0.7837675 [3,] -1.1127292 1.2999273 -0.35090095 -0.2057750 -0.8712593 -0.9238176 [4,] 0.1294739 -0.4673270 0.09170923 -1.1085399 -0.7381164 0.1890104 [5,] 1.4987361 1.5417699 0.67124315 1.4173065 -0.2933869 -1.4729035 [,19] [,20] [1,] -0.89663337 1.7444018 [2,] 0.01267789 0.5790927 [3,] -0.27969747 0.8399652 [4,] 1.78517020 1.4954168 [5,] 0.60890707 0.8782916 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 648 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 562 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -0.4966553 -0.6445326 -0.09548601 0.3020167 0.7315967 -1.663407 -1.389796 col8 col9 col10 col11 col12 col13 col14 row1 -0.4519395 1.812755 0.8421936 1.271327 -0.3391066 1.55416 -2.554508 col15 col16 col17 col18 col19 col20 row1 1.219478 1.274115 -0.8952192 -0.5624194 1.118618 -0.1623155 > tmp[,"col10"] col10 row1 0.84219355 row2 -0.21163156 row3 -0.05235694 row4 -0.74862447 row5 1.23489140 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -0.4966553 -0.6445326 -0.09548601 0.3020167 0.7315967 -1.6634075 row5 -0.5816583 -0.0626789 0.34511122 1.4837769 -0.3288981 -0.1080029 col7 col8 col9 col10 col11 col12 col13 row1 -1.389796 -0.4519395 1.8127553 0.8421936 1.271327 -0.3391066 1.554160 row5 -1.239167 0.9189653 -0.6860295 1.2348914 -1.394413 1.7720411 1.291002 col14 col15 col16 col17 col18 col19 col20 row1 -2.554508 1.2194781 1.2741154 -0.8952192 -0.5624194 1.118618 -0.1623155 row5 -1.304167 -0.2231469 -0.2737343 -1.5335691 0.1109472 -0.279102 0.6998162 > tmp[,c("col6","col20")] col6 col20 row1 -1.66340749 -0.1623155 row2 0.04104185 1.1371448 row3 0.73921454 0.8854254 row4 1.09267765 1.2885610 row5 -0.10800290 0.6998162 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.6634075 -0.1623155 row5 -0.1080029 0.6998162 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.98693 48.13325 51.41788 50.77548 50.15318 105.3712 49.89959 48.96278 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.10141 50.12562 50.36441 49.28615 49.67396 48.74442 48.53864 49.75988 col17 col18 col19 col20 row1 49.44328 49.41167 49.321 104.0341 > tmp[,"col10"] col10 row1 50.12562 row2 29.34350 row3 29.70485 row4 31.34687 row5 50.41938 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.98693 48.13325 51.41788 50.77548 50.15318 105.3712 49.89959 48.96278 row5 49.34489 49.99450 50.36888 50.72468 49.45673 105.5288 51.77939 49.03793 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.10141 50.12562 50.36441 49.28615 49.67396 48.74442 48.53864 49.75988 row5 51.24934 50.41938 50.46324 49.34234 51.62001 50.26185 52.36608 50.64999 col17 col18 col19 col20 row1 49.44328 49.41167 49.32100 104.0341 row5 52.11048 48.22274 51.26861 103.4910 > tmp[,c("col6","col20")] col6 col20 row1 105.37120 104.03413 row2 75.35574 73.73538 row3 74.62206 74.69886 row4 76.86333 73.56039 row5 105.52882 103.49104 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.3712 104.0341 row5 105.5288 103.4910 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.3712 104.0341 row5 105.5288 103.4910 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 1.31757525 [2,] -0.19278635 [3,] -0.04810002 [4,] 0.51891224 [5,] 0.62803683 > tmp[,c("col17","col7")] col17 col7 [1,] -0.24039335 1.0610334 [2,] -0.05934842 -0.3223124 [3,] 0.17573525 1.6898220 [4,] -0.62073449 0.4645138 [5,] 0.54775321 0.4393705 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.18013874 1.6960538 [2,] -0.08805444 1.9091614 [3,] -1.25804860 0.5085924 [4,] 0.50674638 -0.3953899 [5,] 0.61705843 -0.1923113 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.1801387 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.18013874 [2,] -0.08805444 > > > > 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.1790593 0.04892586 2.120194 0.6485359 0.02813546 -1.4415978 -0.3259282 row1 -0.7873420 0.02719068 1.117043 0.3968590 0.71611053 -0.5119372 1.4727437 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 1.147292 -0.3041584 -0.2595771 0.2673461 0.3720443 -0.3240708 0.3132865 row1 1.153406 -0.5246035 -0.6981682 -0.1573326 1.1422796 2.6648601 0.9063209 [,15] [,16] [,17] [,18] [,19] [,20] row3 -0.07533429 0.2315692 0.6728923 1.7669569 0.8640659 0.7406626 row1 2.16241997 -0.9959674 -0.5328560 0.1293411 0.7958679 0.8355598 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.6283811 1.559143 -0.06046234 -1.085817 -1.504275 1.031493 1.412903 [,8] [,9] [,10] row2 0.2870592 0.5614883 -1.715477 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.2416451 0.730337 0.3604192 1.90354 -0.05652059 0.2294636 1.063647 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.423616 -1.060215 -0.7995713 1.171406 0.004377038 0.210339 0.3060232 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.2761388 -1.453532 0.59785 -0.4891519 0.5549799 0.8110363 > > > 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: 0x5c3a44b7af40> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e17a188823" [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e12e366357" [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e17de2fdf6" [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e1708be615" [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e149569625" [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e1ea2da12" [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e13676a770" [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e17ebc5475" [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e12c0ad456" [10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e1a2fab0e" [11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e127e55e2" [12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e1417c356e" [13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e117bdbc09" [14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e14ae12c68" [15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMe86e143cb68a3" > > > ### 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: 0x5c3a4509d5e0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x5c3a4509d5e0> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x5c3a4509d5e0> > rowMedians(tmp) [1] -0.4220938435 0.1867219930 -0.1815998263 0.5447588735 -0.4289376143 [6] -0.0228857206 0.0878368479 0.0358165271 -0.3421853160 -0.2660432999 [11] -0.2232612659 -0.4367972110 0.1320410028 0.3808627307 0.1008512644 [16] 0.1055527263 -0.1101168536 0.0325281937 -0.0080339546 0.3445124723 [21] 0.2293032468 0.9255950554 -0.4235289851 0.1653435356 -0.2771703099 [26] 0.2101141272 0.6663504376 0.2603034007 -0.0222730530 0.3511506044 [31] 0.0145064289 0.1185845458 0.3054880676 0.4167562124 -0.5623175435 [36] 0.1944265392 0.0033414768 -0.2620471503 -0.1495498751 0.0687957154 [41] 0.1493021402 -0.1989493357 0.0275442907 -0.4362474283 -0.3376534270 [46] 0.2311721086 0.0279192233 -0.7573618251 -0.1331417551 0.3534846412 [51] 0.0319204534 0.2287122406 0.5243643543 -0.1282179722 0.5077549356 [56] -0.0336027417 -0.4230196195 0.2390295560 -0.1306460318 0.0489509740 [61] -0.3195528247 -0.2523441574 0.4851368707 -0.2137640174 -0.1876130256 [66] 0.0517574324 -0.2948513339 0.1338287093 0.2854301812 -0.0097840889 [71] 0.0812160806 -0.5070151412 0.1724286131 0.2087642602 0.0618048447 [76] -0.6892896025 -0.5009675823 -0.5268718185 -0.3976362406 0.1292946142 [81] -0.0482831526 0.4817126939 -0.0384972823 0.4157400674 0.0967877216 [86] 0.0255779693 -0.1567992887 0.0751268753 0.0081494520 -0.1332408991 [91] -0.4424459761 -0.2488458379 -0.2570838575 -0.5029158602 0.2093977422 [96] -0.3832617542 0.0592731609 0.0080792378 -0.2748917908 -0.0510537083 [101] -0.4494143523 -0.1070157461 0.1387088959 0.3308979727 -0.0428416447 [106] -0.6660430019 0.3036069493 -0.0816314717 -0.7290109878 0.1668572630 [111] 0.0594117588 -0.2460506476 0.0291900759 0.4156672865 -0.1774835378 [116] -0.3919296745 0.2367456609 -0.0174360772 -0.2250231069 0.7278580836 [121] 0.3253370508 0.3679946664 -0.4611494947 0.1525457083 -0.0205665071 [126] -0.1440703209 0.4026740229 0.8326433874 -0.0198679565 -0.3326043611 [131] -0.4834289262 0.1914700701 0.3233154518 0.4584600216 0.3350209065 [136] 0.0446886005 -0.3155036935 -0.4918620375 0.2047261972 0.0310643620 [141] 0.0301877162 0.5957882313 0.2822583526 -0.5569239745 0.4674724690 [146] 0.2066356083 -0.0050545060 -0.2441272194 -0.6464700282 -0.1492685959 [151] -0.0283408498 0.3294945020 0.0809828510 0.2358536133 0.5072278692 [156] -0.1625023423 -0.1587127545 -0.1786053573 -0.0379014723 -0.4913194284 [161] 0.3180922621 -0.0238278310 -0.2105404918 -0.4202629684 0.0186802492 [166] 0.1396233597 0.3219325747 -0.2068816671 -0.5125066420 -0.2977023412 [171] 0.0806326249 -0.3579165254 -0.2700017704 -0.0105598683 -0.0547516480 [176] 0.1677661327 -0.1133534311 0.5684745518 -0.5620032242 -0.0303722087 [181] 0.0431597372 0.3029624596 -0.0743963702 -0.0617217307 0.5868886917 [186] 0.2019596031 0.7327805412 -0.0407976695 0.0410392032 0.4262006446 [191] 0.2234541145 -0.1052206761 -0.4261047225 -0.1003034659 0.2818383231 [196] 0.0390645348 0.5196119872 -0.1175658301 0.0004517748 -0.2424121188 [201] 0.4642747734 0.1671026786 0.3539938505 0.2875509494 0.1284652256 [206] -0.1701114840 -0.1951609441 -0.1384763261 -0.5175008753 0.2877362496 [211] 0.0063152200 -0.4629121411 0.1094144362 -0.3060451809 -0.0238321446 [216] 0.4716421438 -0.0376513558 0.3073326573 -0.1822228515 0.0287675563 [221] 0.0456251874 0.0768919087 -0.4066351732 -0.2462117383 -0.0568486428 [226] -0.4848761446 0.1433721715 0.3340389324 -0.3022067732 0.0087681562 > > proc.time() user system elapsed 1.521 0.765 2.308
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.5.1 Patched (2025-08-23 r88802) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x61b2800fac80> > .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: 0x61b2800fac80> > .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: 0x61b2800fac80> > .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: 0x61b2800fac80> > 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: 0x61b27fd91a00> > .Call("R_bm_AddColumn",P) <pointer: 0x61b27fd91a00> > .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: 0x61b27fd91a00> > .Call("R_bm_AddColumn",P) <pointer: 0x61b27fd91a00> > .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: 0x61b27fd91a00> > 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: 0x61b27fe5c660> > .Call("R_bm_AddColumn",P) <pointer: 0x61b27fe5c660> > .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: 0x61b27fe5c660> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x61b27fe5c660> > .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: 0x61b27fe5c660> > > .Call("R_bm_RowMode",P) <pointer: 0x61b27fe5c660> > .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: 0x61b27fe5c660> > > .Call("R_bm_ColMode",P) <pointer: 0x61b27fe5c660> > .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: 0x61b27fe5c660> > 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: 0x61b28037e3d0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x61b28037e3d0> > .Call("R_bm_AddColumn",P) <pointer: 0x61b28037e3d0> > .Call("R_bm_AddColumn",P) <pointer: 0x61b28037e3d0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilee87ee468621b4" "BufferedMatrixFilee87ee7efc8ef5" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilee87ee468621b4" "BufferedMatrixFilee87ee7efc8ef5" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x61b2824db460> > .Call("R_bm_AddColumn",P) <pointer: 0x61b2824db460> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x61b2824db460> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x61b2824db460> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x61b2824db460> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x61b2824db460> > .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: 0x61b281b12e60> > .Call("R_bm_AddColumn",P) <pointer: 0x61b281b12e60> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x61b281b12e60> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x61b281b12e60> > 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: 0x61b280985710> > .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: 0x61b280985710> > rm(P) > > proc.time() user system elapsed 0.315 0.038 0.342
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.1 Patched (2025-08-23 r88802) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.309 0.054 0.361