Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-10-06 11:37 -0400 (Mon, 06 Oct 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4832 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" | 4613 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4554 |
kunpeng2 | Linux (openEuler 24.03 LTS) | aarch64 | R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" | 4585 |
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/2341 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.72.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 24.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
merida1 | macOS 12.7.5 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson1 | macOS 13.6.6 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kunpeng2 | 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.72.0 |
Command: /home/biocbuild/bbs-3.21-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.21-bioc/R/site-library --timings BufferedMatrix_1.72.0.tar.gz |
StartedAt: 2025-10-05 21:23:31 -0400 (Sun, 05 Oct 2025) |
EndedAt: 2025-10-05 21:23:56 -0400 (Sun, 05 Oct 2025) |
EllapsedTime: 25.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.21-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.21-bioc/R/site-library --timings BufferedMatrix_1.72.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.5.1 (2025-06-13) * 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.72.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.21-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.21-bioc/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/bbs-3.21-bioc/R/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.72.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.21-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.21-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.21-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.21-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.21-bioc/R/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/bbs-3.21-bioc/R/lib -lR installing to /home/biocbuild/bbs-3.21-bioc/R/site-library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.5.1 (2025-06-13) -- "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.253 0.040 0.282
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.1 (2025-06-13) -- "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.21-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 478417 25.6 1047105 56 639600 34.2 Vcells 885231 6.8 8388608 64 2081598 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] "Sun Oct 5 21:23:45 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] "Sun Oct 5 21:23:46 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: 0x584567007ad0> > > > > 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] "Sun Oct 5 21:23:46 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] "Sun Oct 5 21:23:46 2025" > > ColMode(tmp2) <pointer: 0x584567007ad0> > > > > ### 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.9681562 0.2264250 0.008571403 -0.04267248 [2,] -1.2612585 1.1921447 1.273694738 -0.16282017 [3,] -1.2759259 0.1700730 -0.308580797 -0.18811174 [4,] 0.4240416 -0.9859667 0.304400601 -0.06180821 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.9681562 0.2264250 0.008571403 0.04267248 [2,] 1.2612585 1.1921447 1.273694738 0.16282017 [3,] 1.2759259 0.1700730 0.308580797 0.18811174 [4,] 0.4240416 0.9859667 0.304400601 0.06180821 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9984077 0.4758413 0.09258187 0.2065732 [2,] 1.1230576 1.0918538 1.12858085 0.4035098 [3,] 1.1295689 0.4123991 0.55550049 0.4337185 [4,] 0.6511848 0.9929586 0.55172511 0.2486126 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.95223 29.98484 25.93439 27.10840 [2,] 37.49183 37.11068 37.55950 29.19792 [3,] 37.57162 29.29406 30.86359 29.52530 [4,] 31.93589 35.91555 30.82165 27.54793 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x584567d9f190> > exp(tmp5) <pointer: 0x584567d9f190> > log(tmp5,2) <pointer: 0x584567d9f190> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 468.2086 > Min(tmp5) [1] 53.97904 > mean(tmp5) [1] 72.59165 > Sum(tmp5) [1] 14518.33 > Var(tmp5) [1] 857.2493 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 87.12328 68.90225 72.66419 70.47876 69.62663 70.61391 72.76547 70.51544 [9] 70.68221 72.54439 > rowSums(tmp5) [1] 1742.466 1378.045 1453.284 1409.575 1392.533 1412.278 1455.309 1410.309 [9] 1413.644 1450.888 > rowVars(tmp5) [1] 8110.05094 55.46494 56.38148 67.61944 62.71152 75.07849 [7] 53.63812 70.94717 84.64976 78.91996 > rowSd(tmp5) [1] 90.055821 7.447479 7.508760 8.223104 7.919060 8.664784 7.323805 [8] 8.423014 9.200530 8.883691 > rowMax(tmp5) [1] 468.20860 80.09204 82.94582 89.23012 87.14255 85.26552 84.35570 [8] 90.31144 86.28722 87.02299 > rowMin(tmp5) [1] 53.97904 56.32562 60.97176 57.33742 58.39341 59.93930 60.80324 56.22840 [9] 55.82969 57.78156 > > colMeans(tmp5) [1] 113.70653 71.15943 67.70849 62.49932 69.53588 70.15786 70.84602 [8] 75.13334 73.60066 71.71806 73.82115 75.23161 68.49483 72.51417 [15] 69.04574 69.34054 70.08764 72.61594 68.90023 65.71563 > colSums(tmp5) [1] 1137.0653 711.5943 677.0849 624.9932 695.3588 701.5786 708.4602 [8] 751.3334 736.0066 717.1806 738.2115 752.3161 684.9483 725.1417 [15] 690.4574 693.4054 700.8764 726.1594 689.0023 657.1563 > colVars(tmp5) [1] 15597.25061 78.83749 98.34762 48.01438 49.65387 47.13734 [7] 82.40151 70.03678 22.03808 47.28161 79.57532 41.90543 [13] 35.01790 36.15035 67.32042 50.15940 42.27838 62.56431 [19] 117.19532 103.42764 > colSd(tmp5) [1] 124.888953 8.879048 9.917037 6.929241 7.046550 6.865664 [7] 9.077528 8.368798 4.694473 6.876163 8.920500 6.473440 [13] 5.917593 6.012516 8.204902 7.082330 6.502182 7.909760 [19] 10.825679 10.169938 > colMax(tmp5) [1] 468.20860 87.14255 84.33643 80.35215 80.62294 80.09204 85.21096 [8] 87.02299 84.07015 81.85885 83.77122 84.50689 78.00590 83.88222 [15] 82.42855 82.48537 76.19776 81.94951 89.23012 84.35570 > colMin(tmp5) [1] 59.93930 60.97176 53.97904 56.22840 61.08205 61.87957 58.39341 66.23887 [9] 67.67244 65.39088 61.13027 63.13465 59.73187 63.28272 58.36057 60.34094 [17] 59.03036 62.79919 55.82969 56.32562 > > > ### 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] 87.12328 68.90225 72.66419 NA 69.62663 70.61391 72.76547 70.51544 [9] 70.68221 72.54439 > rowSums(tmp5) [1] 1742.466 1378.045 1453.284 NA 1392.533 1412.278 1455.309 1410.309 [9] 1413.644 1450.888 > rowVars(tmp5) [1] 8110.05094 55.46494 56.38148 70.32481 62.71152 75.07849 [7] 53.63812 70.94717 84.64976 78.91996 > rowSd(tmp5) [1] 90.055821 7.447479 7.508760 8.385989 7.919060 8.664784 7.323805 [8] 8.423014 9.200530 8.883691 > rowMax(tmp5) [1] 468.20860 80.09204 82.94582 NA 87.14255 85.26552 84.35570 [8] 90.31144 86.28722 87.02299 > rowMin(tmp5) [1] 53.97904 56.32562 60.97176 NA 58.39341 59.93930 60.80324 56.22840 [9] 55.82969 57.78156 > > colMeans(tmp5) [1] 113.70653 71.15943 67.70849 62.49932 69.53588 70.15786 70.84602 [8] NA 73.60066 71.71806 73.82115 75.23161 68.49483 72.51417 [15] 69.04574 69.34054 70.08764 72.61594 68.90023 65.71563 > colSums(tmp5) [1] 1137.0653 711.5943 677.0849 624.9932 695.3588 701.5786 708.4602 [8] NA 736.0066 717.1806 738.2115 752.3161 684.9483 725.1417 [15] 690.4574 693.4054 700.8764 726.1594 689.0023 657.1563 > colVars(tmp5) [1] 15597.25061 78.83749 98.34762 48.01438 49.65387 47.13734 [7] 82.40151 NA 22.03808 47.28161 79.57532 41.90543 [13] 35.01790 36.15035 67.32042 50.15940 42.27838 62.56431 [19] 117.19532 103.42764 > colSd(tmp5) [1] 124.888953 8.879048 9.917037 6.929241 7.046550 6.865664 [7] 9.077528 NA 4.694473 6.876163 8.920500 6.473440 [13] 5.917593 6.012516 8.204902 7.082330 6.502182 7.909760 [19] 10.825679 10.169938 > colMax(tmp5) [1] 468.20860 87.14255 84.33643 80.35215 80.62294 80.09204 85.21096 [8] NA 84.07015 81.85885 83.77122 84.50689 78.00590 83.88222 [15] 82.42855 82.48537 76.19776 81.94951 89.23012 84.35570 > colMin(tmp5) [1] 59.93930 60.97176 53.97904 56.22840 61.08205 61.87957 58.39341 NA [9] 67.67244 65.39088 61.13027 63.13465 59.73187 63.28272 58.36057 60.34094 [17] 59.03036 62.79919 55.82969 56.32562 > > Max(tmp5,na.rm=TRUE) [1] 468.2086 > Min(tmp5,na.rm=TRUE) [1] 53.97904 > mean(tmp5,na.rm=TRUE) [1] 72.62358 > Sum(tmp5,na.rm=TRUE) [1] 14452.09 > Var(tmp5,na.rm=TRUE) [1] 861.3739 > > rowMeans(tmp5,na.rm=TRUE) [1] 87.12328 68.90225 72.66419 70.70191 69.62663 70.61391 72.76547 70.51544 [9] 70.68221 72.54439 > rowSums(tmp5,na.rm=TRUE) [1] 1742.466 1378.045 1453.284 1343.336 1392.533 1412.278 1455.309 1410.309 [9] 1413.644 1450.888 > rowVars(tmp5,na.rm=TRUE) [1] 8110.05094 55.46494 56.38148 70.32481 62.71152 75.07849 [7] 53.63812 70.94717 84.64976 78.91996 > rowSd(tmp5,na.rm=TRUE) [1] 90.055821 7.447479 7.508760 8.385989 7.919060 8.664784 7.323805 [8] 8.423014 9.200530 8.883691 > rowMax(tmp5,na.rm=TRUE) [1] 468.20860 80.09204 82.94582 89.23012 87.14255 85.26552 84.35570 [8] 90.31144 86.28722 87.02299 > rowMin(tmp5,na.rm=TRUE) [1] 53.97904 56.32562 60.97176 57.33742 58.39341 59.93930 60.80324 56.22840 [9] 55.82969 57.78156 > > colMeans(tmp5,na.rm=TRUE) [1] 113.70653 71.15943 67.70849 62.49932 69.53588 70.15786 70.84602 [8] 76.12161 73.60066 71.71806 73.82115 75.23161 68.49483 72.51417 [15] 69.04574 69.34054 70.08764 72.61594 68.90023 65.71563 > colSums(tmp5,na.rm=TRUE) [1] 1137.0653 711.5943 677.0849 624.9932 695.3588 701.5786 708.4602 [8] 685.0945 736.0066 717.1806 738.2115 752.3161 684.9483 725.1417 [15] 690.4574 693.4054 700.8764 726.1594 689.0023 657.1563 > colVars(tmp5,na.rm=TRUE) [1] 15597.25061 78.83749 98.34762 48.01438 49.65387 47.13734 [7] 82.40151 67.80367 22.03808 47.28161 79.57532 41.90543 [13] 35.01790 36.15035 67.32042 50.15940 42.27838 62.56431 [19] 117.19532 103.42764 > colSd(tmp5,na.rm=TRUE) [1] 124.888953 8.879048 9.917037 6.929241 7.046550 6.865664 [7] 9.077528 8.234298 4.694473 6.876163 8.920500 6.473440 [13] 5.917593 6.012516 8.204902 7.082330 6.502182 7.909760 [19] 10.825679 10.169938 > colMax(tmp5,na.rm=TRUE) [1] 468.20860 87.14255 84.33643 80.35215 80.62294 80.09204 85.21096 [8] 87.02299 84.07015 81.85885 83.77122 84.50689 78.00590 83.88222 [15] 82.42855 82.48537 76.19776 81.94951 89.23012 84.35570 > colMin(tmp5,na.rm=TRUE) [1] 59.93930 60.97176 53.97904 56.22840 61.08205 61.87957 58.39341 66.57611 [9] 67.67244 65.39088 61.13027 63.13465 59.73187 63.28272 58.36057 60.34094 [17] 59.03036 62.79919 55.82969 56.32562 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 87.12328 68.90225 72.66419 NaN 69.62663 70.61391 72.76547 70.51544 [9] 70.68221 72.54439 > rowSums(tmp5,na.rm=TRUE) [1] 1742.466 1378.045 1453.284 0.000 1392.533 1412.278 1455.309 1410.309 [9] 1413.644 1450.888 > rowVars(tmp5,na.rm=TRUE) [1] 8110.05094 55.46494 56.38148 NA 62.71152 75.07849 [7] 53.63812 70.94717 84.64976 78.91996 > rowSd(tmp5,na.rm=TRUE) [1] 90.055821 7.447479 7.508760 NA 7.919060 8.664784 7.323805 [8] 8.423014 9.200530 8.883691 > rowMax(tmp5,na.rm=TRUE) [1] 468.20860 80.09204 82.94582 NA 87.14255 85.26552 84.35570 [8] 90.31144 86.28722 87.02299 > rowMin(tmp5,na.rm=TRUE) [1] 53.97904 56.32562 60.97176 NA 58.39341 59.93930 60.80324 56.22840 [9] 55.82969 57.78156 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 118.95499 70.76009 68.10375 63.07287 69.90541 71.07767 71.89012 [8] NaN 73.34097 72.35297 73.14381 74.27417 67.89779 72.58126 [15] 68.63968 68.73600 69.42220 73.41230 66.64135 66.19938 > colSums(tmp5,na.rm=TRUE) [1] 1070.5949 636.8408 612.9337 567.6558 629.1487 639.6990 647.0111 [8] 0.0000 660.0687 651.1767 658.2943 668.4676 611.0801 653.2314 [15] 617.7571 618.6240 624.7998 660.7107 599.7722 595.7944 > colVars(tmp5,na.rm=TRUE) [1] 17237.01043 86.89809 108.88355 50.31545 54.32433 43.51143 [7] 80.43755 NA 24.03414 48.65686 84.36088 36.83085 [13] 35.38502 40.61850 73.88049 52.31779 42.58161 63.25024 [19] 74.44132 113.72338 > colSd(tmp5,na.rm=TRUE) [1] 131.289796 9.321915 10.434728 7.093338 7.370504 6.596319 [7] 8.968698 NA 4.902462 6.975447 9.184818 6.068842 [13] 5.948531 6.373265 8.595376 7.233104 6.525459 7.953002 [19] 8.627938 10.664117 > colMax(tmp5,na.rm=TRUE) [1] 468.20860 87.14255 84.33643 80.35215 80.62294 80.09204 85.21096 [8] -Inf 84.07015 81.85885 83.77122 84.50689 78.00590 83.88222 [15] 82.42855 82.48537 76.19776 81.94951 79.55127 84.35570 > colMin(tmp5,na.rm=TRUE) [1] 59.93930 60.97176 53.97904 56.22840 61.08205 64.30897 58.39341 Inf [9] 67.67244 65.39088 61.13027 63.13465 59.73187 63.28272 58.36057 60.34094 [17] 59.03036 62.79919 55.82969 56.32562 > > > > > 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] 181.5510 209.5958 241.8098 221.4896 183.9274 253.6715 360.8175 269.3118 [9] 404.5644 279.1699 > apply(copymatrix,1,var,na.rm=TRUE) [1] 181.5510 209.5958 241.8098 221.4896 183.9274 253.6715 360.8175 269.3118 [9] 404.5644 279.1699 > > > > 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] 2.842171e-14 1.421085e-13 1.421085e-13 -2.273737e-13 1.136868e-13 [6] 5.684342e-14 -5.684342e-14 -1.705303e-13 5.684342e-14 5.684342e-14 [11] -1.705303e-13 1.705303e-13 2.842171e-14 -1.705303e-13 2.842171e-14 [16] 1.421085e-13 5.684342e-14 1.421085e-14 0.000000e+00 -5.684342e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 2 16 5 10 3 9 8 17 5 1 2 18 10 9 7 7 6 5 9 10 5 1 7 2 6 1 3 10 6 17 10 11 1 6 9 17 10 5 7 11 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.422543 > Min(tmp) [1] -2.168878 > mean(tmp) [1] -0.0847767 > Sum(tmp) [1] -8.47767 > Var(tmp) [1] 1.044383 > > rowMeans(tmp) [1] -0.0847767 > rowSums(tmp) [1] -8.47767 > rowVars(tmp) [1] 1.044383 > rowSd(tmp) [1] 1.021951 > rowMax(tmp) [1] 2.422543 > rowMin(tmp) [1] -2.168878 > > colMeans(tmp) [1] -1.307470228 -1.082109737 -1.496033884 -0.031345740 -1.736537670 [6] -2.123925360 -0.645760087 -0.483652398 -1.076195801 0.742872552 [11] -0.628829930 -0.528080308 -1.385167487 -0.898655989 1.363773726 [16] -0.551472382 -1.116919681 -2.168877799 -1.120935162 -0.008324039 [21] -0.121065194 1.339021957 -1.151926942 1.133385455 -0.080296317 [26] -0.846080134 -1.695445238 -0.674958648 -0.887118925 1.578708420 [31] -0.346774126 -2.154960905 0.132665680 0.071232926 -1.145805116 [36] 0.589735868 1.299743524 -0.354711106 1.238620199 0.708439406 [41] 0.962560513 -0.837563877 1.398361030 -0.291560323 0.669370705 [46] 0.909087747 1.303806380 0.549614543 1.706913913 1.691417986 [51] 0.768321183 -0.455063895 -0.692685718 0.975433033 -0.775304943 [56] 1.083495487 -0.756792839 -0.204915703 -1.875959007 -0.082901101 [61] 2.422543115 -0.142783943 0.733090422 -0.549927337 -1.986602899 [66] -0.601768851 0.691476017 0.540580438 -0.350668644 1.063105676 [71] -0.412653718 1.654835679 -0.524503861 0.358510801 -1.648284318 [76] -1.508570895 -0.524170442 -0.046089618 0.443854622 -1.080389898 [81] 0.817198464 0.167079355 -0.307965975 -1.307838643 -0.405746033 [86] 1.810406628 -0.293420946 0.802686267 -0.225610910 0.415136891 [91] -0.133992802 -0.342229617 0.294762874 0.662270598 0.090686615 [96] 1.420624240 0.748155038 0.437627449 0.167613288 -0.221093229 > colSums(tmp) [1] -1.307470228 -1.082109737 -1.496033884 -0.031345740 -1.736537670 [6] -2.123925360 -0.645760087 -0.483652398 -1.076195801 0.742872552 [11] -0.628829930 -0.528080308 -1.385167487 -0.898655989 1.363773726 [16] -0.551472382 -1.116919681 -2.168877799 -1.120935162 -0.008324039 [21] -0.121065194 1.339021957 -1.151926942 1.133385455 -0.080296317 [26] -0.846080134 -1.695445238 -0.674958648 -0.887118925 1.578708420 [31] -0.346774126 -2.154960905 0.132665680 0.071232926 -1.145805116 [36] 0.589735868 1.299743524 -0.354711106 1.238620199 0.708439406 [41] 0.962560513 -0.837563877 1.398361030 -0.291560323 0.669370705 [46] 0.909087747 1.303806380 0.549614543 1.706913913 1.691417986 [51] 0.768321183 -0.455063895 -0.692685718 0.975433033 -0.775304943 [56] 1.083495487 -0.756792839 -0.204915703 -1.875959007 -0.082901101 [61] 2.422543115 -0.142783943 0.733090422 -0.549927337 -1.986602899 [66] -0.601768851 0.691476017 0.540580438 -0.350668644 1.063105676 [71] -0.412653718 1.654835679 -0.524503861 0.358510801 -1.648284318 [76] -1.508570895 -0.524170442 -0.046089618 0.443854622 -1.080389898 [81] 0.817198464 0.167079355 -0.307965975 -1.307838643 -0.405746033 [86] 1.810406628 -0.293420946 0.802686267 -0.225610910 0.415136891 [91] -0.133992802 -0.342229617 0.294762874 0.662270598 0.090686615 [96] 1.420624240 0.748155038 0.437627449 0.167613288 -0.221093229 > 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.307470228 -1.082109737 -1.496033884 -0.031345740 -1.736537670 [6] -2.123925360 -0.645760087 -0.483652398 -1.076195801 0.742872552 [11] -0.628829930 -0.528080308 -1.385167487 -0.898655989 1.363773726 [16] -0.551472382 -1.116919681 -2.168877799 -1.120935162 -0.008324039 [21] -0.121065194 1.339021957 -1.151926942 1.133385455 -0.080296317 [26] -0.846080134 -1.695445238 -0.674958648 -0.887118925 1.578708420 [31] -0.346774126 -2.154960905 0.132665680 0.071232926 -1.145805116 [36] 0.589735868 1.299743524 -0.354711106 1.238620199 0.708439406 [41] 0.962560513 -0.837563877 1.398361030 -0.291560323 0.669370705 [46] 0.909087747 1.303806380 0.549614543 1.706913913 1.691417986 [51] 0.768321183 -0.455063895 -0.692685718 0.975433033 -0.775304943 [56] 1.083495487 -0.756792839 -0.204915703 -1.875959007 -0.082901101 [61] 2.422543115 -0.142783943 0.733090422 -0.549927337 -1.986602899 [66] -0.601768851 0.691476017 0.540580438 -0.350668644 1.063105676 [71] -0.412653718 1.654835679 -0.524503861 0.358510801 -1.648284318 [76] -1.508570895 -0.524170442 -0.046089618 0.443854622 -1.080389898 [81] 0.817198464 0.167079355 -0.307965975 -1.307838643 -0.405746033 [86] 1.810406628 -0.293420946 0.802686267 -0.225610910 0.415136891 [91] -0.133992802 -0.342229617 0.294762874 0.662270598 0.090686615 [96] 1.420624240 0.748155038 0.437627449 0.167613288 -0.221093229 > colMin(tmp) [1] -1.307470228 -1.082109737 -1.496033884 -0.031345740 -1.736537670 [6] -2.123925360 -0.645760087 -0.483652398 -1.076195801 0.742872552 [11] -0.628829930 -0.528080308 -1.385167487 -0.898655989 1.363773726 [16] -0.551472382 -1.116919681 -2.168877799 -1.120935162 -0.008324039 [21] -0.121065194 1.339021957 -1.151926942 1.133385455 -0.080296317 [26] -0.846080134 -1.695445238 -0.674958648 -0.887118925 1.578708420 [31] -0.346774126 -2.154960905 0.132665680 0.071232926 -1.145805116 [36] 0.589735868 1.299743524 -0.354711106 1.238620199 0.708439406 [41] 0.962560513 -0.837563877 1.398361030 -0.291560323 0.669370705 [46] 0.909087747 1.303806380 0.549614543 1.706913913 1.691417986 [51] 0.768321183 -0.455063895 -0.692685718 0.975433033 -0.775304943 [56] 1.083495487 -0.756792839 -0.204915703 -1.875959007 -0.082901101 [61] 2.422543115 -0.142783943 0.733090422 -0.549927337 -1.986602899 [66] -0.601768851 0.691476017 0.540580438 -0.350668644 1.063105676 [71] -0.412653718 1.654835679 -0.524503861 0.358510801 -1.648284318 [76] -1.508570895 -0.524170442 -0.046089618 0.443854622 -1.080389898 [81] 0.817198464 0.167079355 -0.307965975 -1.307838643 -0.405746033 [86] 1.810406628 -0.293420946 0.802686267 -0.225610910 0.415136891 [91] -0.133992802 -0.342229617 0.294762874 0.662270598 0.090686615 [96] 1.420624240 0.748155038 0.437627449 0.167613288 -0.221093229 > colMedians(tmp) [1] -1.307470228 -1.082109737 -1.496033884 -0.031345740 -1.736537670 [6] -2.123925360 -0.645760087 -0.483652398 -1.076195801 0.742872552 [11] -0.628829930 -0.528080308 -1.385167487 -0.898655989 1.363773726 [16] -0.551472382 -1.116919681 -2.168877799 -1.120935162 -0.008324039 [21] -0.121065194 1.339021957 -1.151926942 1.133385455 -0.080296317 [26] -0.846080134 -1.695445238 -0.674958648 -0.887118925 1.578708420 [31] -0.346774126 -2.154960905 0.132665680 0.071232926 -1.145805116 [36] 0.589735868 1.299743524 -0.354711106 1.238620199 0.708439406 [41] 0.962560513 -0.837563877 1.398361030 -0.291560323 0.669370705 [46] 0.909087747 1.303806380 0.549614543 1.706913913 1.691417986 [51] 0.768321183 -0.455063895 -0.692685718 0.975433033 -0.775304943 [56] 1.083495487 -0.756792839 -0.204915703 -1.875959007 -0.082901101 [61] 2.422543115 -0.142783943 0.733090422 -0.549927337 -1.986602899 [66] -0.601768851 0.691476017 0.540580438 -0.350668644 1.063105676 [71] -0.412653718 1.654835679 -0.524503861 0.358510801 -1.648284318 [76] -1.508570895 -0.524170442 -0.046089618 0.443854622 -1.080389898 [81] 0.817198464 0.167079355 -0.307965975 -1.307838643 -0.405746033 [86] 1.810406628 -0.293420946 0.802686267 -0.225610910 0.415136891 [91] -0.133992802 -0.342229617 0.294762874 0.662270598 0.090686615 [96] 1.420624240 0.748155038 0.437627449 0.167613288 -0.221093229 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.30747 -1.08211 -1.496034 -0.03134574 -1.736538 -2.123925 -0.6457601 [2,] -1.30747 -1.08211 -1.496034 -0.03134574 -1.736538 -2.123925 -0.6457601 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.4836524 -1.076196 0.7428726 -0.6288299 -0.5280803 -1.385167 -0.898656 [2,] -0.4836524 -1.076196 0.7428726 -0.6288299 -0.5280803 -1.385167 -0.898656 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 1.363774 -0.5514724 -1.11692 -2.168878 -1.120935 -0.008324039 -0.1210652 [2,] 1.363774 -0.5514724 -1.11692 -2.168878 -1.120935 -0.008324039 -0.1210652 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.339022 -1.151927 1.133385 -0.08029632 -0.8460801 -1.695445 -0.6749586 [2,] 1.339022 -1.151927 1.133385 -0.08029632 -0.8460801 -1.695445 -0.6749586 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.8871189 1.578708 -0.3467741 -2.154961 0.1326657 0.07123293 -1.145805 [2,] -0.8871189 1.578708 -0.3467741 -2.154961 0.1326657 0.07123293 -1.145805 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.5897359 1.299744 -0.3547111 1.23862 0.7084394 0.9625605 -0.8375639 [2,] 0.5897359 1.299744 -0.3547111 1.23862 0.7084394 0.9625605 -0.8375639 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 1.398361 -0.2915603 0.6693707 0.9090877 1.303806 0.5496145 1.706914 [2,] 1.398361 -0.2915603 0.6693707 0.9090877 1.303806 0.5496145 1.706914 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.691418 0.7683212 -0.4550639 -0.6926857 0.975433 -0.7753049 1.083495 [2,] 1.691418 0.7683212 -0.4550639 -0.6926857 0.975433 -0.7753049 1.083495 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.7567928 -0.2049157 -1.875959 -0.0829011 2.422543 -0.1427839 0.7330904 [2,] -0.7567928 -0.2049157 -1.875959 -0.0829011 2.422543 -0.1427839 0.7330904 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.5499273 -1.986603 -0.6017689 0.691476 0.5405804 -0.3506686 1.063106 [2,] -0.5499273 -1.986603 -0.6017689 0.691476 0.5405804 -0.3506686 1.063106 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.4126537 1.654836 -0.5245039 0.3585108 -1.648284 -1.508571 -0.5241704 [2,] -0.4126537 1.654836 -0.5245039 0.3585108 -1.648284 -1.508571 -0.5241704 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.04608962 0.4438546 -1.08039 0.8171985 0.1670794 -0.307966 -1.307839 [2,] -0.04608962 0.4438546 -1.08039 0.8171985 0.1670794 -0.307966 -1.307839 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.405746 1.810407 -0.2934209 0.8026863 -0.2256109 0.4151369 -0.1339928 [2,] -0.405746 1.810407 -0.2934209 0.8026863 -0.2256109 0.4151369 -0.1339928 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.3422296 0.2947629 0.6622706 0.09068662 1.420624 0.748155 0.4376274 [2,] -0.3422296 0.2947629 0.6622706 0.09068662 1.420624 0.748155 0.4376274 [,99] [,100] [1,] 0.1676133 -0.2210932 [2,] 0.1676133 -0.2210932 > > > Max(tmp2) [1] 3.181899 > Min(tmp2) [1] -2.660489 > mean(tmp2) [1] 0.04827373 > Sum(tmp2) [1] 4.827373 > Var(tmp2) [1] 1.052136 > > rowMeans(tmp2) [1] 0.38423754 -1.26892066 0.41963155 0.25193863 0.16990392 0.98272923 [7] -0.62924867 0.17225689 -0.44354678 0.27421479 3.18189911 1.86524745 [13] -0.63405758 0.32048912 0.92960878 -1.66817387 -0.37562935 1.38690065 [19] 0.51574302 -0.41798206 -0.09809560 -0.90640534 1.06647171 -0.35830219 [25] -1.17620498 0.98163716 0.99159440 -0.71389403 0.72791285 1.72724705 [31] 0.97816871 0.93647172 -1.48433234 1.07077033 1.27252156 -0.07362865 [37] -0.27747352 0.04320782 -1.03328361 -1.08060968 1.91553042 -0.23771209 [43] -0.44028680 0.67366004 0.65034317 0.20708743 0.67413982 0.75268684 [49] 0.46698475 0.39932755 0.27086473 -1.05833060 0.39505732 0.24389793 [55] -1.00975962 -2.22412108 -0.47255203 0.19592631 0.58146421 -0.77504771 [61] 0.58658576 -2.66048924 0.42750699 0.32639547 0.67369698 -0.59401162 [67] 1.06020503 -0.15106345 -2.19938760 1.97685915 -0.41892299 -0.16523492 [73] -1.77374857 0.25017198 0.87869364 -1.90027359 0.71606046 1.82347255 [79] 1.59913249 -0.16911071 -0.99033643 1.05900342 -0.93534111 -0.14830853 [85] 0.08025715 -0.50429630 -1.21638631 1.74061499 0.48050286 -0.19449591 [91] -0.15627722 -0.24533414 0.13052370 0.14522264 0.85606533 -1.51895339 [97] -0.25816703 -0.70525848 -1.04140164 -1.25697443 > rowSums(tmp2) [1] 0.38423754 -1.26892066 0.41963155 0.25193863 0.16990392 0.98272923 [7] -0.62924867 0.17225689 -0.44354678 0.27421479 3.18189911 1.86524745 [13] -0.63405758 0.32048912 0.92960878 -1.66817387 -0.37562935 1.38690065 [19] 0.51574302 -0.41798206 -0.09809560 -0.90640534 1.06647171 -0.35830219 [25] -1.17620498 0.98163716 0.99159440 -0.71389403 0.72791285 1.72724705 [31] 0.97816871 0.93647172 -1.48433234 1.07077033 1.27252156 -0.07362865 [37] -0.27747352 0.04320782 -1.03328361 -1.08060968 1.91553042 -0.23771209 [43] -0.44028680 0.67366004 0.65034317 0.20708743 0.67413982 0.75268684 [49] 0.46698475 0.39932755 0.27086473 -1.05833060 0.39505732 0.24389793 [55] -1.00975962 -2.22412108 -0.47255203 0.19592631 0.58146421 -0.77504771 [61] 0.58658576 -2.66048924 0.42750699 0.32639547 0.67369698 -0.59401162 [67] 1.06020503 -0.15106345 -2.19938760 1.97685915 -0.41892299 -0.16523492 [73] -1.77374857 0.25017198 0.87869364 -1.90027359 0.71606046 1.82347255 [79] 1.59913249 -0.16911071 -0.99033643 1.05900342 -0.93534111 -0.14830853 [85] 0.08025715 -0.50429630 -1.21638631 1.74061499 0.48050286 -0.19449591 [91] -0.15627722 -0.24533414 0.13052370 0.14522264 0.85606533 -1.51895339 [97] -0.25816703 -0.70525848 -1.04140164 -1.25697443 > 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.38423754 -1.26892066 0.41963155 0.25193863 0.16990392 0.98272923 [7] -0.62924867 0.17225689 -0.44354678 0.27421479 3.18189911 1.86524745 [13] -0.63405758 0.32048912 0.92960878 -1.66817387 -0.37562935 1.38690065 [19] 0.51574302 -0.41798206 -0.09809560 -0.90640534 1.06647171 -0.35830219 [25] -1.17620498 0.98163716 0.99159440 -0.71389403 0.72791285 1.72724705 [31] 0.97816871 0.93647172 -1.48433234 1.07077033 1.27252156 -0.07362865 [37] -0.27747352 0.04320782 -1.03328361 -1.08060968 1.91553042 -0.23771209 [43] -0.44028680 0.67366004 0.65034317 0.20708743 0.67413982 0.75268684 [49] 0.46698475 0.39932755 0.27086473 -1.05833060 0.39505732 0.24389793 [55] -1.00975962 -2.22412108 -0.47255203 0.19592631 0.58146421 -0.77504771 [61] 0.58658576 -2.66048924 0.42750699 0.32639547 0.67369698 -0.59401162 [67] 1.06020503 -0.15106345 -2.19938760 1.97685915 -0.41892299 -0.16523492 [73] -1.77374857 0.25017198 0.87869364 -1.90027359 0.71606046 1.82347255 [79] 1.59913249 -0.16911071 -0.99033643 1.05900342 -0.93534111 -0.14830853 [85] 0.08025715 -0.50429630 -1.21638631 1.74061499 0.48050286 -0.19449591 [91] -0.15627722 -0.24533414 0.13052370 0.14522264 0.85606533 -1.51895339 [97] -0.25816703 -0.70525848 -1.04140164 -1.25697443 > rowMin(tmp2) [1] 0.38423754 -1.26892066 0.41963155 0.25193863 0.16990392 0.98272923 [7] -0.62924867 0.17225689 -0.44354678 0.27421479 3.18189911 1.86524745 [13] -0.63405758 0.32048912 0.92960878 -1.66817387 -0.37562935 1.38690065 [19] 0.51574302 -0.41798206 -0.09809560 -0.90640534 1.06647171 -0.35830219 [25] -1.17620498 0.98163716 0.99159440 -0.71389403 0.72791285 1.72724705 [31] 0.97816871 0.93647172 -1.48433234 1.07077033 1.27252156 -0.07362865 [37] -0.27747352 0.04320782 -1.03328361 -1.08060968 1.91553042 -0.23771209 [43] -0.44028680 0.67366004 0.65034317 0.20708743 0.67413982 0.75268684 [49] 0.46698475 0.39932755 0.27086473 -1.05833060 0.39505732 0.24389793 [55] -1.00975962 -2.22412108 -0.47255203 0.19592631 0.58146421 -0.77504771 [61] 0.58658576 -2.66048924 0.42750699 0.32639547 0.67369698 -0.59401162 [67] 1.06020503 -0.15106345 -2.19938760 1.97685915 -0.41892299 -0.16523492 [73] -1.77374857 0.25017198 0.87869364 -1.90027359 0.71606046 1.82347255 [79] 1.59913249 -0.16911071 -0.99033643 1.05900342 -0.93534111 -0.14830853 [85] 0.08025715 -0.50429630 -1.21638631 1.74061499 0.48050286 -0.19449591 [91] -0.15627722 -0.24533414 0.13052370 0.14522264 0.85606533 -1.51895339 [97] -0.25816703 -0.70525848 -1.04140164 -1.25697443 > > colMeans(tmp2) [1] 0.04827373 > colSums(tmp2) [1] 4.827373 > colVars(tmp2) [1] 1.052136 > colSd(tmp2) [1] 1.025737 > colMax(tmp2) [1] 3.181899 > colMin(tmp2) [1] -2.660489 > colMedians(tmp2) [1] 0.1575633 > colRanges(tmp2) [,1] [1,] -2.660489 [2,] 3.181899 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] -2.59517494 2.78030817 -4.52449776 2.33404538 -1.15042342 5.35355558 [7] 0.09078511 2.87112724 -1.50025126 5.01461990 > colApply(tmp,quantile)[,1] [,1] [1,] -2.54320974 [2,] -0.22096878 [3,] -0.03968466 [4,] 0.26125444 [5,] 1.07305536 > > rowApply(tmp,sum) [1] -1.12593282 1.95905306 3.05635777 4.20142564 3.52638378 1.82656640 [7] 0.07210072 -5.19944566 -2.28740194 2.64498704 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 9 6 4 6 4 1 7 8 5 [2,] 2 8 9 10 10 6 7 2 4 1 [3,] 3 2 10 7 1 3 3 3 7 2 [4,] 6 6 2 5 8 7 4 6 10 7 [5,] 7 10 4 6 2 2 2 1 3 10 [6,] 8 7 1 8 3 5 10 10 1 9 [7,] 5 1 5 1 9 10 6 5 5 4 [8,] 9 4 8 9 5 1 9 8 9 6 [9,] 4 3 3 3 7 9 5 4 2 3 [10,] 10 5 7 2 4 8 8 9 6 8 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.195496806 0.629594723 -2.360766318 1.983547141 -1.558551833 [6] 2.338137623 1.368288697 -2.964941592 -0.413555835 -1.238306191 [11] 0.312146979 4.608193977 4.253802252 0.001328521 -0.110554221 [16] 4.199285195 -2.366954605 -0.685962265 -2.619233073 2.929045619 > colApply(tmp,quantile)[,1] [,1] [1,] -1.0778346 [2,] -0.7686389 [3,] -0.4080614 [4,] 0.9809020 [5,] 1.4691296 > > rowApply(tmp,sum) [1] 7.21464136 0.05826426 3.96746081 1.08740581 -3.82773062 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 16 5 4 17 4 [2,] 17 13 8 14 2 [3,] 4 2 14 7 5 [4,] 18 3 17 8 13 [5,] 10 1 13 11 3 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.4691296 1.57494873 -0.6018746 2.0628435 0.01276463 -0.4433392 [2,] -0.7686389 0.05068908 -1.0125666 -0.9271835 -1.29299039 1.4591780 [3,] -0.4080614 -0.32975303 0.5519913 0.9858399 0.39578012 0.9684767 [4,] 0.9809020 0.77910467 -0.5917691 0.0120689 0.53932837 1.0417026 [5,] -1.0778346 -1.44539473 -0.7065473 -0.1500217 -1.21343456 -0.6878805 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.3396431 -0.5456993 -1.2354041 -0.8958338 1.24006309 0.7235048 [2,] 0.3234332 1.0557780 -0.6669012 -0.7248502 -0.38015951 0.1497905 [3,] 1.2793167 -0.2693272 -0.6630149 0.1312533 -0.05145124 2.3691995 [4,] 0.4044963 -1.7250131 0.9166738 0.6997020 -1.24121496 0.7660963 [5,] -0.2993144 -1.4806799 1.2350907 -0.4485775 0.74490960 0.5996029 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.7886256 -0.3935770 2.0968501 2.2740220 -0.23666902 0.621366242 [2,] -0.2855365 1.0221327 -0.7774288 2.0720522 0.97697665 -0.000370139 [3,] 1.3803409 -0.7421455 -0.3650326 -0.3944134 0.04197162 -0.329821877 [4,] 1.4226594 0.3754852 -0.8220984 -0.7629488 -2.92725176 -0.703510773 [5,] 0.9477129 -0.2605668 -0.2428445 1.0105732 -0.22198210 -0.273625718 [,19] [,20] [1,] -2.36647388 1.40903696 [2,] -0.11641502 -0.09872529 [3,] -1.31476485 0.73107697 [4,] 1.14047146 0.78252171 [5,] 0.03794922 0.10513526 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 654 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 564 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -0.5080464 0.9525314 -0.5530995 0.4082523 0.08554229 -0.9424401 1.292059 col8 col9 col10 col11 col12 col13 col14 row1 1.029104 0.08557913 2.24583 0.6285065 -2.365844 0.1675789 -0.6436744 col15 col16 col17 col18 col19 col20 row1 0.4106054 0.6331064 -1.295686 -0.4984982 0.8149271 1.407513 > tmp[,"col10"] col10 row1 2.24582999 row2 -1.18758818 row3 -0.45468473 row4 0.67942423 row5 0.07836309 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -0.5080464 0.9525314 -0.5530995 0.4082523 0.08554229 -0.9424401 row5 -0.1677120 -0.3519379 -0.4653257 2.2211667 0.18307567 0.7891906 col7 col8 col9 col10 col11 col12 col13 row1 1.2920589 1.029104 0.08557913 2.24582999 0.6285065 -2.3658445 0.1675789 row5 -0.4287714 1.541428 0.70902346 0.07836309 1.6139539 -0.2924623 -1.1789625 col14 col15 col16 col17 col18 col19 row1 -0.643674368 0.4106054 0.6331064 -1.2956858 -0.4984982 0.8149271 row5 0.009863898 0.1343041 -1.4164318 0.9970028 0.7446019 -0.2309927 col20 row1 1.407513 row5 1.346744 > tmp[,c("col6","col20")] col6 col20 row1 -0.9424401 1.4075127 row2 -0.9412476 -0.3325906 row3 -1.7732155 -0.2346216 row4 -1.2929987 0.1417347 row5 0.7891906 1.3467436 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.9424401 1.407513 row5 0.7891906 1.346744 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.43352 49.71828 49.9617 50.75653 48.97176 105.2367 50.85712 50.73327 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.50789 49.72669 52.47524 49.43075 50.80902 49.86814 48.10663 50.33191 col17 col18 col19 col20 row1 49.46799 51.39256 50.66353 105.0375 > tmp[,"col10"] col10 row1 49.72669 row2 28.97771 row3 27.11223 row4 29.59342 row5 50.81636 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.43352 49.71828 49.96170 50.75653 48.97176 105.2367 50.85712 50.73327 row5 49.09085 50.13004 48.62452 49.58314 50.07796 106.5245 51.08941 51.40599 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.50789 49.72669 52.47524 49.43075 50.80902 49.86814 48.10663 50.33191 row5 51.09977 50.81636 49.32106 49.61115 49.71626 49.96604 51.15551 49.72549 col17 col18 col19 col20 row1 49.46799 51.39256 50.66353 105.0375 row5 49.20034 50.45727 50.99928 106.0728 > tmp[,c("col6","col20")] col6 col20 row1 105.23672 105.03752 row2 74.79412 74.82310 row3 74.11457 74.28066 row4 76.58149 74.81607 row5 106.52448 106.07283 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.2367 105.0375 row5 106.5245 106.0728 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.2367 105.0375 row5 106.5245 106.0728 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.07133004 [2,] 0.06294030 [3,] 0.61633418 [4,] 0.25267643 [5,] -1.49176872 > tmp[,c("col17","col7")] col17 col7 [1,] -0.4559401 -0.5482821 [2,] -0.7567217 0.9136837 [3,] -0.4453999 0.9097977 [4,] 0.4254623 -0.5070322 [5,] -0.6359208 -0.2160330 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -2.00482673 0.092208555 [2,] -2.13392679 1.097659291 [3,] 1.84278270 2.067224421 [4,] -0.04814943 0.007028164 [5,] 1.61695969 1.443361817 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -2.004827 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -2.004827 [2,] -2.133927 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 -0.8053047 1.1122551 0.6387315 0.4185078 0.3334500 -0.4285882 row1 0.1979511 0.9141997 0.3365417 -0.8967660 -0.9465084 1.1540913 [,7] [,8] [,9] [,10] [,11] [,12] row3 0.07491227 -1.1108017 0.6481162 1.112918 -0.74300915 0.5405527 row1 -1.16527442 -0.1334179 -1.7582119 1.321750 -0.02896523 1.8334894 [,13] [,14] [,15] [,16] [,17] [,18] row3 -1.3320648 0.4771534 -1.239252091 0.6438191 -0.222384 -0.1704771 row1 -0.5858553 0.3469194 -0.007293309 -1.7475045 1.574458 -0.1748744 [,19] [,20] row3 -0.5163868 0.7385583 row1 -0.3015074 -0.5659331 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.1645605 0.5543313 -0.4300871 -0.4951074 0.2457068 -0.05462882 -0.4656909 [,8] [,9] [,10] row2 1.50201 -1.013567 0.7199324 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.191396 0.8223189 -0.9409142 -0.7349836 0.1518824 1.50041 -0.4539271 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.327801 1.323651 -1.356566 -0.07578143 2.082158 -0.4448491 0.723711 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.9866134 -0.05644928 0.2961895 0.4493419 0.8861057 -0.1178767 > > > 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: 0x584567dd45b0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c59232ebf" [2] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c4d1ded74" [3] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c2de6fc5" [4] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c5194fab" [5] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c6398eb5b" [6] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c73560f72" [7] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c13a6d9b" [8] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c6e2aeb8" [9] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c3441cad7" [10] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c5cc69b4d" [11] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c70e272d6" [12] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c39853b0e" [13] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c5e2a68a4" [14] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c17f74ee1" [15] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3dd37c182c6f52" > > > ### 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: 0x584565a72930> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x584565a72930> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x584565a72930> > rowMedians(tmp) [1] 0.7343645161 -0.4246440649 -0.0209614767 0.0103119303 -0.3906070504 [6] -0.5809003330 0.3904962037 -0.3980097979 0.0023204361 -0.1597799899 [11] 0.0529460780 0.0802831626 -0.0233058206 0.2207832666 0.3937346574 [16] -0.3205715395 -0.0008672814 0.2558392198 0.1150353266 0.0503364849 [21] 0.2575681167 0.1863154072 0.6099751037 -0.2478745578 0.0338864776 [26] -0.2276740908 0.4492107869 -0.3675975735 0.4506460041 0.4059617158 [31] -0.4424552280 -0.2931164067 -0.1630168226 0.0054472672 0.2734150758 [36] 0.2518446591 0.6808512755 -0.1137680029 0.0078162552 0.7639338107 [41] -0.1784205841 0.0620813020 0.3048279231 -0.0707524630 0.1146247357 [46] 0.1457666331 0.1067487851 -0.2924178685 0.3283120307 -0.2552100240 [51] 0.0269507559 0.2926251651 0.0894722889 -0.4700873860 0.0754180719 [56] -0.2204601514 -0.0519407125 -0.0311317217 -0.1970181944 -0.5012238824 [61] 0.1420079589 -0.3024031221 0.1668572489 -0.3337659766 0.0992351553 [66] -0.4331790200 0.0756125654 -0.0875939324 0.2736350735 0.0702756492 [71] -0.4074215648 0.7165301527 -0.1654140419 -0.0750205815 0.1506375111 [76] -0.0280806655 -0.1475540109 0.4013197956 -0.4550014842 -0.1403856554 [81] 0.5332448690 -0.2577869613 -0.4171146652 -0.0869758181 0.3638951495 [86] 0.4396706964 0.2708247746 0.3161967862 -0.3873746255 0.2389005573 [91] -0.3230813561 -0.0748313867 0.6213500443 -0.3930721254 0.3620737231 [96] -0.6844598068 0.1508840002 0.0011017439 0.1527522412 0.6028124129 [101] -0.1175919677 -0.1351112627 0.3034178098 -0.1237129935 0.1626687698 [106] 0.1244125635 0.1154347358 -0.0368492324 0.2265547589 0.0692655544 [111] -0.5268469239 0.1766638528 -0.1252903339 0.4088656798 -0.3131902387 [116] 0.0921742654 0.0353815458 -0.1678876690 -0.2514810684 0.4421313134 [121] -0.1080176466 -0.5059229812 0.4746755570 0.3870145290 -0.3492123793 [126] -0.4664255377 -0.5390177210 0.0899528728 0.1547124807 -0.1819621239 [131] 0.0144550775 -0.4227746178 -0.1007731839 0.4327198617 -0.3539236548 [136] -0.3094952165 0.1798138155 0.1293503807 0.1281250817 0.0712845330 [141] -0.0678778345 -0.1020445987 0.3367186048 0.0417884303 0.1183873626 [146] -0.1807103598 -0.1295025413 -0.0190352343 0.3481315967 -0.3115345028 [151] -0.1427119898 0.0173848468 -0.3763612888 -0.1336392225 0.5027639986 [156] -0.4079869891 0.4140437435 0.5231760337 0.1199800173 -0.1381871847 [161] -0.4843086134 -0.0343075522 -0.0708711293 -0.1385711640 -0.0551223394 [166] -0.3739948838 0.1736292730 -0.0187455700 -0.2315639185 -0.4516995096 [171] -0.0942869868 0.2301766233 0.1086984350 -0.2653861623 -0.1429010068 [176] -0.3242793581 0.0380460797 -0.1542696483 0.0640439880 0.2428273929 [181] -0.4831532446 0.0870539004 -0.1243578691 -0.5176391538 -0.2047731359 [186] 0.0985648609 -0.1798025542 -0.3483394717 0.3092265891 0.1223218974 [191] -0.1187257263 -0.5048631164 -0.3516927143 0.1405302956 -0.1966700297 [196] -0.1502253986 0.1925519011 -0.1795364937 -0.5702146736 0.2035927019 [201] -0.3188145932 -0.2083499440 -0.3258496312 -0.4275560377 -0.0305417654 [206] 0.0547182481 -0.2237157065 -0.1075123051 0.0156991256 0.0086046185 [211] 0.0479094008 0.3743623968 -0.3738751341 -0.2085535651 -0.1310770137 [216] 0.0463223652 -0.0618454754 0.2575433783 0.3348529687 -0.1727689962 [221] -0.0326461395 0.9904113148 -0.0493192171 0.0131695661 0.0218993365 [226] 0.3991369801 -0.0908391230 0.0225551232 -0.0048406084 0.2406599405 > > proc.time() user system elapsed 1.384 1.537 2.909
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.5.1 (2025-06-13) -- "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: 0x56dac6c07af0> > .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: 0x56dac6c07af0> > .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: 0x56dac6c07af0> > .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: 0x56dac6c07af0> > 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: 0x56dac69d4ad0> > .Call("R_bm_AddColumn",P) <pointer: 0x56dac69d4ad0> > .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: 0x56dac69d4ad0> > .Call("R_bm_AddColumn",P) <pointer: 0x56dac69d4ad0> > .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: 0x56dac69d4ad0> > 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: 0x56dac69a6690> > .Call("R_bm_AddColumn",P) <pointer: 0x56dac69a6690> > .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: 0x56dac69a6690> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x56dac69a6690> > .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: 0x56dac69a6690> > > .Call("R_bm_RowMode",P) <pointer: 0x56dac69a6690> > .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: 0x56dac69a6690> > > .Call("R_bm_ColMode",P) <pointer: 0x56dac69a6690> > .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: 0x56dac69a6690> > 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: 0x56dac58e03f0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x56dac58e03f0> > .Call("R_bm_AddColumn",P) <pointer: 0x56dac58e03f0> > .Call("R_bm_AddColumn",P) <pointer: 0x56dac58e03f0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3dd6e85df10d5a" "BufferedMatrixFile3dd6e8685ca236" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3dd6e85df10d5a" "BufferedMatrixFile3dd6e8685ca236" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x56dac7cff730> > .Call("R_bm_AddColumn",P) <pointer: 0x56dac7cff730> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x56dac7cff730> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x56dac7cff730> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x56dac7cff730> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x56dac7cff730> > .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: 0x56dac61a1ca0> > .Call("R_bm_AddColumn",P) <pointer: 0x56dac61a1ca0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x56dac61a1ca0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x56dac61a1ca0> > 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: 0x56dac695e4e0> > .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: 0x56dac695e4e0> > rm(P) > > proc.time() user system elapsed 0.234 0.058 0.282
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.1 (2025-06-13) -- "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.231 0.051 0.270