Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-09-27 12:03 -0400 (Sat, 27 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" | 4832 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4620 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4565 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4563 |
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 253/2334 | 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-26 21:43:41 -0400 (Fri, 26 Sep 2025) |
EndedAt: 2025-09-26 21:44:16 -0400 (Fri, 26 Sep 2025) |
EllapsedTime: 35.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.409 0.060 0.488
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] "Fri Sep 26 21:44:03 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] "Fri Sep 26 21:44:03 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: 0x5a46dc2a2c80> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Sep 26 21:44:03 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] "Fri Sep 26 21:44:04 2025" > > ColMode(tmp2) <pointer: 0x5a46dc2a2c80> > > > > ### 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.43223318 0.1574211 1.4862080 0.07780880 [2,] -0.89436057 0.1182634 0.5198764 0.08876358 [3,] 0.06435881 -0.1545949 -1.7296370 0.97288760 [4,] -0.51378301 0.5642300 1.1557359 1.15034930 > 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 : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.43223318 0.1574211 1.4862080 0.07780880 [2,] 0.89436057 0.1182634 0.5198764 0.08876358 [3,] 0.06435881 0.1545949 1.7296370 0.97288760 [4,] 0.51378301 0.5642300 1.1557359 1.15034930 > 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 : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9715712 0.3967633 1.2191013 0.2789423 [2,] 0.9457064 0.3438945 0.7210246 0.2979322 [3,] 0.2536904 0.3931855 1.3151566 0.9863506 [4,] 0.7167866 0.7511524 1.0750516 1.0725434 > > 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 : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.14795 29.12505 38.67722 27.86723 [2,] 35.35142 28.55721 32.73012 28.06809 [3,] 27.60126 29.08645 39.88120 35.83639 [4,] 32.68165 33.07575 36.90625 36.87578 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x5a46de47b3a0> > exp(tmp5) <pointer: 0x5a46de47b3a0> > log(tmp5,2) <pointer: 0x5a46de47b3a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.5346 > Min(tmp5) [1] 55.169 > mean(tmp5) [1] 72.11171 > Sum(tmp5) [1] 14422.34 > Var(tmp5) [1] 857.3411 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 87.85839 69.99974 67.92499 70.67645 69.99307 70.23874 70.79534 69.69463 [9] 71.03578 72.89994 > rowSums(tmp5) [1] 1757.168 1399.995 1358.500 1413.529 1399.861 1404.775 1415.907 1393.893 [9] 1420.716 1457.999 > rowVars(tmp5) [1] 7989.70961 74.00099 87.15144 58.40382 46.97185 74.51178 [7] 71.47038 92.97127 99.07037 80.67164 > rowSd(tmp5) [1] 89.385176 8.602383 9.335494 7.642239 6.853601 8.632021 8.454016 [8] 9.642161 9.953410 8.981739 > rowMax(tmp5) [1] 466.53458 87.62184 90.37570 86.17776 83.32982 84.90947 85.31175 [8] 96.24664 91.19226 87.78457 > rowMin(tmp5) [1] 58.00199 58.42004 57.29598 55.29516 60.63765 56.90653 56.83107 55.16900 [9] 55.19143 56.98823 > > colMeans(tmp5) [1] 106.44405 67.57530 76.25957 69.67680 69.84197 68.30680 68.95760 [8] 74.13917 69.99633 64.90653 68.94535 72.51822 68.91900 71.74934 [15] 69.58217 71.97044 72.74744 71.32872 66.56692 71.80242 > colSums(tmp5) [1] 1064.4405 675.7530 762.5957 696.7680 698.4197 683.0680 689.5760 [8] 741.3917 699.9633 649.0653 689.4535 725.1822 689.1900 717.4934 [15] 695.8217 719.7044 727.4744 713.2872 665.6692 718.0242 > colVars(tmp5) [1] 16088.05129 55.67478 67.59142 64.15391 35.57093 46.80611 [7] 110.35614 124.71275 100.15642 55.73855 34.50784 91.18235 [13] 106.98242 82.35371 48.88057 48.90228 65.84997 53.57221 [19] 88.56746 63.49639 > colSd(tmp5) [1] 126.838682 7.461553 8.221400 8.009613 5.964137 6.841499 [7] 10.505053 11.167486 10.007818 7.465825 5.874337 9.548945 [13] 10.343231 9.074894 6.991464 6.993017 8.114800 7.319304 [19] 9.411028 7.968462 > colMax(tmp5) [1] 466.53458 80.71219 84.90947 78.58243 78.65333 81.17396 90.20946 [8] 91.19226 86.32601 75.63028 80.40596 90.37570 96.24664 85.31175 [15] 79.28974 83.32982 86.54159 87.62184 88.09357 81.94216 > colMin(tmp5) [1] 55.19143 59.43809 60.28206 58.00199 62.26496 61.74833 56.98823 57.28314 [9] 60.12233 55.29516 58.48590 59.98740 61.51530 55.16900 57.43274 63.71713 [17] 59.68952 60.56867 58.71292 59.70059 > > > ### 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.85839 69.99974 67.92499 NA 69.99307 70.23874 70.79534 69.69463 [9] 71.03578 72.89994 > rowSums(tmp5) [1] 1757.168 1399.995 1358.500 NA 1399.861 1404.775 1415.907 1393.893 [9] 1420.716 1457.999 > rowVars(tmp5) [1] 7989.70961 74.00099 87.15144 47.59639 46.97185 74.51178 [7] 71.47038 92.97127 99.07037 80.67164 > rowSd(tmp5) [1] 89.385176 8.602383 9.335494 6.899014 6.853601 8.632021 8.454016 [8] 9.642161 9.953410 8.981739 > rowMax(tmp5) [1] 466.53458 87.62184 90.37570 NA 83.32982 84.90947 85.31175 [8] 96.24664 91.19226 87.78457 > rowMin(tmp5) [1] 58.00199 58.42004 57.29598 NA 60.63765 56.90653 56.83107 55.16900 [9] 55.19143 56.98823 > > colMeans(tmp5) [1] 106.44405 67.57530 76.25957 69.67680 69.84197 68.30680 68.95760 [8] NA 69.99633 64.90653 68.94535 72.51822 68.91900 71.74934 [15] 69.58217 71.97044 72.74744 71.32872 66.56692 71.80242 > colSums(tmp5) [1] 1064.4405 675.7530 762.5957 696.7680 698.4197 683.0680 689.5760 [8] NA 699.9633 649.0653 689.4535 725.1822 689.1900 717.4934 [15] 695.8217 719.7044 727.4744 713.2872 665.6692 718.0242 > colVars(tmp5) [1] 16088.05129 55.67478 67.59142 64.15391 35.57093 46.80611 [7] 110.35614 NA 100.15642 55.73855 34.50784 91.18235 [13] 106.98242 82.35371 48.88057 48.90228 65.84997 53.57221 [19] 88.56746 63.49639 > colSd(tmp5) [1] 126.838682 7.461553 8.221400 8.009613 5.964137 6.841499 [7] 10.505053 NA 10.007818 7.465825 5.874337 9.548945 [13] 10.343231 9.074894 6.991464 6.993017 8.114800 7.319304 [19] 9.411028 7.968462 > colMax(tmp5) [1] 466.53458 80.71219 84.90947 78.58243 78.65333 81.17396 90.20946 [8] NA 86.32601 75.63028 80.40596 90.37570 96.24664 85.31175 [15] 79.28974 83.32982 86.54159 87.62184 88.09357 81.94216 > colMin(tmp5) [1] 55.19143 59.43809 60.28206 58.00199 62.26496 61.74833 56.98823 NA [9] 60.12233 55.29516 58.48590 59.98740 61.51530 55.16900 57.43274 63.71713 [17] 59.68952 60.56867 58.71292 59.70059 > > Max(tmp5,na.rm=TRUE) [1] 466.5346 > Min(tmp5,na.rm=TRUE) [1] 55.169 > mean(tmp5,na.rm=TRUE) [1] 72.04102 > Sum(tmp5,na.rm=TRUE) [1] 14336.16 > Var(tmp5,na.rm=TRUE) [1] 860.6668 > > rowMeans(tmp5,na.rm=TRUE) [1] 87.85839 69.99974 67.92499 69.86059 69.99307 70.23874 70.79534 69.69463 [9] 71.03578 72.89994 > rowSums(tmp5,na.rm=TRUE) [1] 1757.168 1399.995 1358.500 1327.351 1399.861 1404.775 1415.907 1393.893 [9] 1420.716 1457.999 > rowVars(tmp5,na.rm=TRUE) [1] 7989.70961 74.00099 87.15144 47.59639 46.97185 74.51178 [7] 71.47038 92.97127 99.07037 80.67164 > rowSd(tmp5,na.rm=TRUE) [1] 89.385176 8.602383 9.335494 6.899014 6.853601 8.632021 8.454016 [8] 9.642161 9.953410 8.981739 > rowMax(tmp5,na.rm=TRUE) [1] 466.53458 87.62184 90.37570 81.94216 83.32982 84.90947 85.31175 [8] 96.24664 91.19226 87.78457 > rowMin(tmp5,na.rm=TRUE) [1] 58.00199 58.42004 57.29598 55.29516 60.63765 56.90653 56.83107 55.16900 [9] 55.19143 56.98823 > > colMeans(tmp5,na.rm=TRUE) [1] 106.44405 67.57530 76.25957 69.67680 69.84197 68.30680 68.95760 [8] 72.80155 69.99633 64.90653 68.94535 72.51822 68.91900 71.74934 [15] 69.58217 71.97044 72.74744 71.32872 66.56692 71.80242 > colSums(tmp5,na.rm=TRUE) [1] 1064.4405 675.7530 762.5957 696.7680 698.4197 683.0680 689.5760 [8] 655.2139 699.9633 649.0653 689.4535 725.1822 689.1900 717.4934 [15] 695.8217 719.7044 727.4744 713.2872 665.6692 718.0242 > colVars(tmp5,na.rm=TRUE) [1] 16088.05129 55.67478 67.59142 64.15391 35.57093 46.80611 [7] 110.35614 120.17300 100.15642 55.73855 34.50784 91.18235 [13] 106.98242 82.35371 48.88057 48.90228 65.84997 53.57221 [19] 88.56746 63.49639 > colSd(tmp5,na.rm=TRUE) [1] 126.838682 7.461553 8.221400 8.009613 5.964137 6.841499 [7] 10.505053 10.962345 10.007818 7.465825 5.874337 9.548945 [13] 10.343231 9.074894 6.991464 6.993017 8.114800 7.319304 [19] 9.411028 7.968462 > colMax(tmp5,na.rm=TRUE) [1] 466.53458 80.71219 84.90947 78.58243 78.65333 81.17396 90.20946 [8] 91.19226 86.32601 75.63028 80.40596 90.37570 96.24664 85.31175 [15] 79.28974 83.32982 86.54159 87.62184 88.09357 81.94216 > colMin(tmp5,na.rm=TRUE) [1] 55.19143 59.43809 60.28206 58.00199 62.26496 61.74833 56.98823 57.28314 [9] 60.12233 55.29516 58.48590 59.98740 61.51530 55.16900 57.43274 63.71713 [17] 59.68952 60.56867 58.71292 59.70059 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 87.85839 69.99974 67.92499 NaN 69.99307 70.23874 70.79534 69.69463 [9] 71.03578 72.89994 > rowSums(tmp5,na.rm=TRUE) [1] 1757.168 1399.995 1358.500 0.000 1399.861 1404.775 1415.907 1393.893 [9] 1420.716 1457.999 > rowVars(tmp5,na.rm=TRUE) [1] 7989.70961 74.00099 87.15144 NA 46.97185 74.51178 [7] 71.47038 92.97127 99.07037 80.67164 > rowSd(tmp5,na.rm=TRUE) [1] 89.385176 8.602383 9.335494 NA 6.853601 8.632021 8.454016 [8] 9.642161 9.953410 8.981739 > rowMax(tmp5,na.rm=TRUE) [1] 466.53458 87.62184 90.37570 NA 83.32982 84.90947 85.31175 [8] 96.24664 91.19226 87.78457 > rowMin(tmp5,na.rm=TRUE) [1] 58.00199 58.42004 57.29598 NA 60.63765 56.90653 56.83107 55.16900 [9] 55.19143 56.98823 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 110.71310 67.43446 76.19780 68.89065 69.79478 68.56002 69.13309 [8] NaN 69.70211 65.97446 69.24201 72.45785 69.74163 71.95552 [15] 68.83603 71.71634 72.08024 72.52428 66.99186 70.67578 > colSums(tmp5,na.rm=TRUE) [1] 996.4179 606.9102 685.7802 620.0159 628.1530 617.0402 622.1978 0.0000 [9] 627.3190 593.7701 623.1781 652.1207 627.6747 647.5997 619.5243 645.4471 [17] 648.7222 652.7185 602.9267 636.0820 > colVars(tmp5,na.rm=TRUE) [1] 17894.02853 62.41098 75.99742 65.22036 39.99224 51.93550 [7] 123.80420 NA 111.70215 49.87553 37.83125 102.53915 [13] 112.74207 92.16964 48.72754 54.28872 69.07334 44.18835 [19] 97.60699 57.15368 > colSd(tmp5,na.rm=TRUE) [1] 133.768563 7.900062 8.717650 8.075912 6.323942 7.206629 [7] 11.126734 NA 10.568924 7.062261 6.150712 10.126162 [13] 10.618007 9.600502 6.980511 7.368088 8.311037 6.647432 [19] 9.879625 7.560005 > colMax(tmp5,na.rm=TRUE) [1] 466.53458 80.71219 84.90947 78.58243 78.65333 81.17396 90.20946 [8] -Inf 86.32601 75.63028 80.40596 90.37570 96.24664 85.31175 [15] 79.28974 83.32982 86.54159 87.62184 88.09357 81.91731 > colMin(tmp5,na.rm=TRUE) [1] 55.19143 59.43809 60.28206 58.00199 62.26496 61.74833 56.98823 Inf [9] 60.12233 56.90653 58.48590 59.98740 62.49664 55.16900 57.43274 63.71713 [17] 59.68952 65.06567 58.71292 59.70059 > > > > > 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] 199.3776 255.2055 296.4575 129.8004 173.7879 277.5414 280.5665 117.9549 [9] 164.1422 316.1128 > apply(copymatrix,1,var,na.rm=TRUE) [1] 199.3776 255.2055 296.4575 129.8004 173.7879 277.5414 280.5665 117.9549 [9] 164.1422 316.1128 > > > > 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 -5.684342e-14 -8.526513e-14 1.421085e-13 1.705303e-13 [6] 0.000000e+00 1.705303e-13 -5.684342e-14 -5.684342e-14 -1.705303e-13 [11] 0.000000e+00 0.000000e+00 -5.684342e-14 -8.526513e-14 -1.847411e-13 [16] 4.263256e-14 -5.684342e-14 5.684342e-14 1.989520e-13 -8.526513e-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) + } 6 1 1 12 5 19 2 19 10 14 3 4 6 7 3 19 10 20 10 20 10 12 4 14 5 2 7 9 6 20 7 3 9 1 3 2 9 20 9 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.38151 > Min(tmp) [1] -2.239756 > mean(tmp) [1] 0.01462326 > Sum(tmp) [1] 1.462326 > Var(tmp) [1] 1.012612 > > rowMeans(tmp) [1] 0.01462326 > rowSums(tmp) [1] 1.462326 > rowVars(tmp) [1] 1.012612 > rowSd(tmp) [1] 1.006286 > rowMax(tmp) [1] 2.38151 > rowMin(tmp) [1] -2.239756 > > colMeans(tmp) [1] 0.65672801 0.02595090 -0.08594878 0.28554666 0.41322026 0.57068018 [7] -1.03981585 -1.29434132 -1.39081739 0.79377578 -0.27992087 0.29811198 [13] -0.18167129 -0.88747721 -0.30892239 -0.51889286 -2.23975586 1.54489373 [19] -0.33381889 1.61503067 1.27653818 -0.24374882 0.11122267 -0.63751955 [25] -0.14618368 -0.01824757 -1.01142933 1.23425888 1.40284563 0.98869436 [31] 0.84357084 1.80601904 2.38150984 0.21781183 0.51325161 -1.13098390 [37] -0.33712227 0.53647186 1.99492089 -1.91672070 -0.39149524 0.15066811 [43] 1.33196924 -1.21343462 0.62407026 -0.26951957 0.56152488 -1.20604711 [49] -1.13328087 -1.18000993 -0.02163137 0.36921338 -1.80946466 -1.24430211 [55] 0.32692294 -1.30792216 1.77811506 1.52342201 -1.02769906 -0.84426021 [61] -1.70736560 -0.95844087 0.53323994 0.38939318 0.45334132 -0.58444900 [67] 0.31579482 -1.56632425 0.77409368 -0.20472446 0.62021504 0.07114204 [73] -1.15267928 0.30543145 1.40245871 -0.54998371 1.60268319 1.87748034 [79] 0.05437960 -0.16218853 -0.15763249 -0.47243949 0.11452080 -0.07053110 [85] -0.21866490 0.59438402 -0.98538771 1.18872548 -0.96564640 -1.40571109 [91] 0.11972491 0.21885260 0.35944951 -1.36679188 0.17232615 -0.25914982 [97] -0.19204307 1.13035109 2.26388520 -0.64394730 > colSums(tmp) [1] 0.65672801 0.02595090 -0.08594878 0.28554666 0.41322026 0.57068018 [7] -1.03981585 -1.29434132 -1.39081739 0.79377578 -0.27992087 0.29811198 [13] -0.18167129 -0.88747721 -0.30892239 -0.51889286 -2.23975586 1.54489373 [19] -0.33381889 1.61503067 1.27653818 -0.24374882 0.11122267 -0.63751955 [25] -0.14618368 -0.01824757 -1.01142933 1.23425888 1.40284563 0.98869436 [31] 0.84357084 1.80601904 2.38150984 0.21781183 0.51325161 -1.13098390 [37] -0.33712227 0.53647186 1.99492089 -1.91672070 -0.39149524 0.15066811 [43] 1.33196924 -1.21343462 0.62407026 -0.26951957 0.56152488 -1.20604711 [49] -1.13328087 -1.18000993 -0.02163137 0.36921338 -1.80946466 -1.24430211 [55] 0.32692294 -1.30792216 1.77811506 1.52342201 -1.02769906 -0.84426021 [61] -1.70736560 -0.95844087 0.53323994 0.38939318 0.45334132 -0.58444900 [67] 0.31579482 -1.56632425 0.77409368 -0.20472446 0.62021504 0.07114204 [73] -1.15267928 0.30543145 1.40245871 -0.54998371 1.60268319 1.87748034 [79] 0.05437960 -0.16218853 -0.15763249 -0.47243949 0.11452080 -0.07053110 [85] -0.21866490 0.59438402 -0.98538771 1.18872548 -0.96564640 -1.40571109 [91] 0.11972491 0.21885260 0.35944951 -1.36679188 0.17232615 -0.25914982 [97] -0.19204307 1.13035109 2.26388520 -0.64394730 > 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.65672801 0.02595090 -0.08594878 0.28554666 0.41322026 0.57068018 [7] -1.03981585 -1.29434132 -1.39081739 0.79377578 -0.27992087 0.29811198 [13] -0.18167129 -0.88747721 -0.30892239 -0.51889286 -2.23975586 1.54489373 [19] -0.33381889 1.61503067 1.27653818 -0.24374882 0.11122267 -0.63751955 [25] -0.14618368 -0.01824757 -1.01142933 1.23425888 1.40284563 0.98869436 [31] 0.84357084 1.80601904 2.38150984 0.21781183 0.51325161 -1.13098390 [37] -0.33712227 0.53647186 1.99492089 -1.91672070 -0.39149524 0.15066811 [43] 1.33196924 -1.21343462 0.62407026 -0.26951957 0.56152488 -1.20604711 [49] -1.13328087 -1.18000993 -0.02163137 0.36921338 -1.80946466 -1.24430211 [55] 0.32692294 -1.30792216 1.77811506 1.52342201 -1.02769906 -0.84426021 [61] -1.70736560 -0.95844087 0.53323994 0.38939318 0.45334132 -0.58444900 [67] 0.31579482 -1.56632425 0.77409368 -0.20472446 0.62021504 0.07114204 [73] -1.15267928 0.30543145 1.40245871 -0.54998371 1.60268319 1.87748034 [79] 0.05437960 -0.16218853 -0.15763249 -0.47243949 0.11452080 -0.07053110 [85] -0.21866490 0.59438402 -0.98538771 1.18872548 -0.96564640 -1.40571109 [91] 0.11972491 0.21885260 0.35944951 -1.36679188 0.17232615 -0.25914982 [97] -0.19204307 1.13035109 2.26388520 -0.64394730 > colMin(tmp) [1] 0.65672801 0.02595090 -0.08594878 0.28554666 0.41322026 0.57068018 [7] -1.03981585 -1.29434132 -1.39081739 0.79377578 -0.27992087 0.29811198 [13] -0.18167129 -0.88747721 -0.30892239 -0.51889286 -2.23975586 1.54489373 [19] -0.33381889 1.61503067 1.27653818 -0.24374882 0.11122267 -0.63751955 [25] -0.14618368 -0.01824757 -1.01142933 1.23425888 1.40284563 0.98869436 [31] 0.84357084 1.80601904 2.38150984 0.21781183 0.51325161 -1.13098390 [37] -0.33712227 0.53647186 1.99492089 -1.91672070 -0.39149524 0.15066811 [43] 1.33196924 -1.21343462 0.62407026 -0.26951957 0.56152488 -1.20604711 [49] -1.13328087 -1.18000993 -0.02163137 0.36921338 -1.80946466 -1.24430211 [55] 0.32692294 -1.30792216 1.77811506 1.52342201 -1.02769906 -0.84426021 [61] -1.70736560 -0.95844087 0.53323994 0.38939318 0.45334132 -0.58444900 [67] 0.31579482 -1.56632425 0.77409368 -0.20472446 0.62021504 0.07114204 [73] -1.15267928 0.30543145 1.40245871 -0.54998371 1.60268319 1.87748034 [79] 0.05437960 -0.16218853 -0.15763249 -0.47243949 0.11452080 -0.07053110 [85] -0.21866490 0.59438402 -0.98538771 1.18872548 -0.96564640 -1.40571109 [91] 0.11972491 0.21885260 0.35944951 -1.36679188 0.17232615 -0.25914982 [97] -0.19204307 1.13035109 2.26388520 -0.64394730 > colMedians(tmp) [1] 0.65672801 0.02595090 -0.08594878 0.28554666 0.41322026 0.57068018 [7] -1.03981585 -1.29434132 -1.39081739 0.79377578 -0.27992087 0.29811198 [13] -0.18167129 -0.88747721 -0.30892239 -0.51889286 -2.23975586 1.54489373 [19] -0.33381889 1.61503067 1.27653818 -0.24374882 0.11122267 -0.63751955 [25] -0.14618368 -0.01824757 -1.01142933 1.23425888 1.40284563 0.98869436 [31] 0.84357084 1.80601904 2.38150984 0.21781183 0.51325161 -1.13098390 [37] -0.33712227 0.53647186 1.99492089 -1.91672070 -0.39149524 0.15066811 [43] 1.33196924 -1.21343462 0.62407026 -0.26951957 0.56152488 -1.20604711 [49] -1.13328087 -1.18000993 -0.02163137 0.36921338 -1.80946466 -1.24430211 [55] 0.32692294 -1.30792216 1.77811506 1.52342201 -1.02769906 -0.84426021 [61] -1.70736560 -0.95844087 0.53323994 0.38939318 0.45334132 -0.58444900 [67] 0.31579482 -1.56632425 0.77409368 -0.20472446 0.62021504 0.07114204 [73] -1.15267928 0.30543145 1.40245871 -0.54998371 1.60268319 1.87748034 [79] 0.05437960 -0.16218853 -0.15763249 -0.47243949 0.11452080 -0.07053110 [85] -0.21866490 0.59438402 -0.98538771 1.18872548 -0.96564640 -1.40571109 [91] 0.11972491 0.21885260 0.35944951 -1.36679188 0.17232615 -0.25914982 [97] -0.19204307 1.13035109 2.26388520 -0.64394730 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.656728 0.0259509 -0.08594878 0.2855467 0.4132203 0.5706802 -1.039816 [2,] 0.656728 0.0259509 -0.08594878 0.2855467 0.4132203 0.5706802 -1.039816 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.294341 -1.390817 0.7937758 -0.2799209 0.298112 -0.1816713 -0.8874772 [2,] -1.294341 -1.390817 0.7937758 -0.2799209 0.298112 -0.1816713 -0.8874772 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.3089224 -0.5188929 -2.239756 1.544894 -0.3338189 1.615031 1.276538 [2,] -0.3089224 -0.5188929 -2.239756 1.544894 -0.3338189 1.615031 1.276538 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.2437488 0.1112227 -0.6375196 -0.1461837 -0.01824757 -1.011429 1.234259 [2,] -0.2437488 0.1112227 -0.6375196 -0.1461837 -0.01824757 -1.011429 1.234259 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 1.402846 0.9886944 0.8435708 1.806019 2.38151 0.2178118 0.5132516 [2,] 1.402846 0.9886944 0.8435708 1.806019 2.38151 0.2178118 0.5132516 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.130984 -0.3371223 0.5364719 1.994921 -1.916721 -0.3914952 0.1506681 [2,] -1.130984 -0.3371223 0.5364719 1.994921 -1.916721 -0.3914952 0.1506681 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 1.331969 -1.213435 0.6240703 -0.2695196 0.5615249 -1.206047 -1.133281 [2,] 1.331969 -1.213435 0.6240703 -0.2695196 0.5615249 -1.206047 -1.133281 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -1.18001 -0.02163137 0.3692134 -1.809465 -1.244302 0.3269229 -1.307922 [2,] -1.18001 -0.02163137 0.3692134 -1.809465 -1.244302 0.3269229 -1.307922 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 1.778115 1.523422 -1.027699 -0.8442602 -1.707366 -0.9584409 0.5332399 [2,] 1.778115 1.523422 -1.027699 -0.8442602 -1.707366 -0.9584409 0.5332399 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.3893932 0.4533413 -0.584449 0.3157948 -1.566324 0.7740937 -0.2047245 [2,] 0.3893932 0.4533413 -0.584449 0.3157948 -1.566324 0.7740937 -0.2047245 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.620215 0.07114204 -1.152679 0.3054314 1.402459 -0.5499837 1.602683 [2,] 0.620215 0.07114204 -1.152679 0.3054314 1.402459 -0.5499837 1.602683 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 1.87748 0.0543796 -0.1621885 -0.1576325 -0.4724395 0.1145208 -0.0705311 [2,] 1.87748 0.0543796 -0.1621885 -0.1576325 -0.4724395 0.1145208 -0.0705311 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.2186649 0.594384 -0.9853877 1.188725 -0.9656464 -1.405711 0.1197249 [2,] -0.2186649 0.594384 -0.9853877 1.188725 -0.9656464 -1.405711 0.1197249 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.2188526 0.3594495 -1.366792 0.1723262 -0.2591498 -0.1920431 1.130351 [2,] 0.2188526 0.3594495 -1.366792 0.1723262 -0.2591498 -0.1920431 1.130351 [,99] [,100] [1,] 2.263885 -0.6439473 [2,] 2.263885 -0.6439473 > > > Max(tmp2) [1] 2.444436 > Min(tmp2) [1] -2.921975 > mean(tmp2) [1] -0.02461392 > Sum(tmp2) [1] -2.461392 > Var(tmp2) [1] 1.038331 > > rowMeans(tmp2) [1] -0.72375616 -0.21639855 -0.45403352 1.00149018 0.48123445 2.36028357 [7] -0.16174544 0.94635376 -0.06234064 -0.84197049 1.85031696 2.35235488 [13] -0.56580959 0.28825029 -0.96143264 -2.92197527 0.84584050 -0.98359333 [19] 0.34206345 1.09308999 1.22801827 2.44443623 0.98530644 -0.89447534 [25] 0.63915681 -0.83158948 1.24789077 -0.85837587 2.01941668 -0.13327608 [31] 0.29051968 -0.59976248 0.98823368 -0.17083063 -2.70679678 -0.96300765 [37] 0.37865072 -0.62652183 -0.98891464 -1.93575196 0.46695220 -0.22402326 [43] -0.25694854 -0.34054942 0.35368326 0.39657704 0.41111588 -0.03644582 [49] -0.44193765 -0.84100275 -1.49355004 -1.57580396 -0.35915896 0.51020549 [55] 0.16268660 0.01741814 1.46285605 0.41012632 0.66900988 -1.61599277 [61] 0.27420783 -0.31460113 -0.18506552 0.82860968 -0.01088739 0.06777546 [67] -0.47857128 -0.35733128 -0.28184675 -0.44865441 1.08676381 0.79796433 [73] -0.94309696 -0.24518715 0.70208093 -1.67609238 0.51398726 0.41781092 [79] 0.25703210 -1.32544697 -1.45588262 -0.66472921 0.66216212 -0.36950937 [85] -0.56577568 0.34897291 -0.06815979 -0.77785983 -1.12925819 1.56551996 [91] 1.39933446 -0.05854619 1.56455807 -0.28642945 0.39736768 -1.11817545 [97] 0.44818241 -0.77576219 0.60674458 -1.71936384 > rowSums(tmp2) [1] -0.72375616 -0.21639855 -0.45403352 1.00149018 0.48123445 2.36028357 [7] -0.16174544 0.94635376 -0.06234064 -0.84197049 1.85031696 2.35235488 [13] -0.56580959 0.28825029 -0.96143264 -2.92197527 0.84584050 -0.98359333 [19] 0.34206345 1.09308999 1.22801827 2.44443623 0.98530644 -0.89447534 [25] 0.63915681 -0.83158948 1.24789077 -0.85837587 2.01941668 -0.13327608 [31] 0.29051968 -0.59976248 0.98823368 -0.17083063 -2.70679678 -0.96300765 [37] 0.37865072 -0.62652183 -0.98891464 -1.93575196 0.46695220 -0.22402326 [43] -0.25694854 -0.34054942 0.35368326 0.39657704 0.41111588 -0.03644582 [49] -0.44193765 -0.84100275 -1.49355004 -1.57580396 -0.35915896 0.51020549 [55] 0.16268660 0.01741814 1.46285605 0.41012632 0.66900988 -1.61599277 [61] 0.27420783 -0.31460113 -0.18506552 0.82860968 -0.01088739 0.06777546 [67] -0.47857128 -0.35733128 -0.28184675 -0.44865441 1.08676381 0.79796433 [73] -0.94309696 -0.24518715 0.70208093 -1.67609238 0.51398726 0.41781092 [79] 0.25703210 -1.32544697 -1.45588262 -0.66472921 0.66216212 -0.36950937 [85] -0.56577568 0.34897291 -0.06815979 -0.77785983 -1.12925819 1.56551996 [91] 1.39933446 -0.05854619 1.56455807 -0.28642945 0.39736768 -1.11817545 [97] 0.44818241 -0.77576219 0.60674458 -1.71936384 > 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.72375616 -0.21639855 -0.45403352 1.00149018 0.48123445 2.36028357 [7] -0.16174544 0.94635376 -0.06234064 -0.84197049 1.85031696 2.35235488 [13] -0.56580959 0.28825029 -0.96143264 -2.92197527 0.84584050 -0.98359333 [19] 0.34206345 1.09308999 1.22801827 2.44443623 0.98530644 -0.89447534 [25] 0.63915681 -0.83158948 1.24789077 -0.85837587 2.01941668 -0.13327608 [31] 0.29051968 -0.59976248 0.98823368 -0.17083063 -2.70679678 -0.96300765 [37] 0.37865072 -0.62652183 -0.98891464 -1.93575196 0.46695220 -0.22402326 [43] -0.25694854 -0.34054942 0.35368326 0.39657704 0.41111588 -0.03644582 [49] -0.44193765 -0.84100275 -1.49355004 -1.57580396 -0.35915896 0.51020549 [55] 0.16268660 0.01741814 1.46285605 0.41012632 0.66900988 -1.61599277 [61] 0.27420783 -0.31460113 -0.18506552 0.82860968 -0.01088739 0.06777546 [67] -0.47857128 -0.35733128 -0.28184675 -0.44865441 1.08676381 0.79796433 [73] -0.94309696 -0.24518715 0.70208093 -1.67609238 0.51398726 0.41781092 [79] 0.25703210 -1.32544697 -1.45588262 -0.66472921 0.66216212 -0.36950937 [85] -0.56577568 0.34897291 -0.06815979 -0.77785983 -1.12925819 1.56551996 [91] 1.39933446 -0.05854619 1.56455807 -0.28642945 0.39736768 -1.11817545 [97] 0.44818241 -0.77576219 0.60674458 -1.71936384 > rowMin(tmp2) [1] -0.72375616 -0.21639855 -0.45403352 1.00149018 0.48123445 2.36028357 [7] -0.16174544 0.94635376 -0.06234064 -0.84197049 1.85031696 2.35235488 [13] -0.56580959 0.28825029 -0.96143264 -2.92197527 0.84584050 -0.98359333 [19] 0.34206345 1.09308999 1.22801827 2.44443623 0.98530644 -0.89447534 [25] 0.63915681 -0.83158948 1.24789077 -0.85837587 2.01941668 -0.13327608 [31] 0.29051968 -0.59976248 0.98823368 -0.17083063 -2.70679678 -0.96300765 [37] 0.37865072 -0.62652183 -0.98891464 -1.93575196 0.46695220 -0.22402326 [43] -0.25694854 -0.34054942 0.35368326 0.39657704 0.41111588 -0.03644582 [49] -0.44193765 -0.84100275 -1.49355004 -1.57580396 -0.35915896 0.51020549 [55] 0.16268660 0.01741814 1.46285605 0.41012632 0.66900988 -1.61599277 [61] 0.27420783 -0.31460113 -0.18506552 0.82860968 -0.01088739 0.06777546 [67] -0.47857128 -0.35733128 -0.28184675 -0.44865441 1.08676381 0.79796433 [73] -0.94309696 -0.24518715 0.70208093 -1.67609238 0.51398726 0.41781092 [79] 0.25703210 -1.32544697 -1.45588262 -0.66472921 0.66216212 -0.36950937 [85] -0.56577568 0.34897291 -0.06815979 -0.77785983 -1.12925819 1.56551996 [91] 1.39933446 -0.05854619 1.56455807 -0.28642945 0.39736768 -1.11817545 [97] 0.44818241 -0.77576219 0.60674458 -1.71936384 > > colMeans(tmp2) [1] -0.02461392 > colSums(tmp2) [1] -2.461392 > colVars(tmp2) [1] 1.038331 > colSd(tmp2) [1] 1.018985 > colMax(tmp2) [1] 2.444436 > colMin(tmp2) [1] -2.921975 > colMedians(tmp2) [1] -0.06525022 > colRanges(tmp2) [,1] [1,] -2.921975 [2,] 2.444436 > > 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.1592397 -2.2413878 3.9369400 2.1458683 -2.3075420 -1.3852223 [7] -1.2988463 -0.1325874 1.3424596 0.4124911 > colApply(tmp,quantile)[,1] [,1] [1,] -1.1508291 [2,] -0.5544491 [3,] -0.2873016 [4,] 0.2220186 [5,] 1.7831827 > > rowApply(tmp,sum) [1] 1.0662189 -2.1051214 -0.5442247 0.2537154 -1.1114866 0.9731067 [7] -4.3211976 4.0057916 2.8130476 -1.7169166 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 6 4 7 3 7 3 7 9 2 2 [2,] 3 2 6 1 5 5 2 5 10 9 [3,] 8 8 2 9 8 1 8 10 4 8 [4,] 10 10 3 5 6 6 6 7 5 3 [5,] 4 5 1 2 9 4 4 4 6 4 [6,] 7 7 8 6 1 8 3 2 8 5 [7,] 2 3 5 7 2 7 1 6 9 10 [8,] 1 9 9 4 3 2 9 8 7 6 [9,] 5 6 10 8 10 10 10 1 1 1 [10,] 9 1 4 10 4 9 5 3 3 7 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 3.0853285 0.8587215 2.7284176 2.2269812 2.0264831 -2.3431978 [7] -3.6826973 1.1727541 1.2246978 4.7760022 -0.1199866 -1.1997606 [13] -0.2628153 -0.2937726 3.6883915 -0.8292391 0.9976916 -2.8532281 [19] -3.9043333 1.2614632 > colApply(tmp,quantile)[,1] [,1] [1,] -0.2059636 [2,] -0.1918904 [3,] 0.5375542 [4,] 1.2931215 [5,] 1.6525068 > > rowApply(tmp,sum) [1] -2.59665839 5.98379068 -0.04611152 3.05739115 2.15948964 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 20 18 10 8 14 [2,] 3 14 12 6 16 [3,] 13 12 14 17 11 [4,] 10 2 15 20 15 [5,] 18 15 8 12 12 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.2931215 -0.6640552 0.09812729 -0.1035305 0.7184848 -0.4985560 [2,] 1.6525068 0.7271760 0.20594568 -0.9681788 1.0252697 1.1766777 [3,] -0.1918904 0.6084950 0.70007616 0.7861874 -0.2356395 -1.5465631 [4,] -0.2059636 -0.6237187 1.56137425 1.9453098 0.1340786 -0.8494949 [5,] 0.5375542 0.8108244 0.16289424 0.5671933 0.3842895 -0.6252616 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.3951671 -0.31230551 -0.407710502 -0.06744338 -0.09503613 0.1439526 [2,] 0.4837760 1.51345781 2.214634592 3.05255037 -0.05540266 -0.6410962 [3,] -1.8754493 -0.69422029 1.016016323 0.92416645 0.69547488 0.8755037 [4,] -1.7837690 0.57907506 0.008320651 1.74155460 -0.39213897 -0.9372710 [5,] 0.8879121 0.08674702 -1.606563272 -0.87482586 -0.27288372 -0.6408498 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.4998922 -0.5148531 1.1417766 -0.56049221 0.2802150 -2.0542415 [2,] 0.1516420 -0.5733269 -0.4304167 -1.19445765 -0.9035119 -0.9151039 [3,] 1.3379681 -0.4632038 -0.7995692 1.43553496 -1.0143778 -0.2253836 [4,] -1.0514014 0.2531706 1.2731008 -0.09765196 1.6309023 0.6637818 [5,] -0.2011318 1.0044407 2.5035000 -0.41217228 1.0044640 -0.3222809 [,19] [,20] [1,] 0.1978496 0.70309755 [2,] -0.5251164 -0.01323497 [3,] -1.6523427 0.27310526 [4,] -0.6831216 -0.10874602 [5,] -1.2416021 0.40724137 > > > 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 : 653 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.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.3974612 1.346775 -0.953105 -0.6825562 0.0229699 0.9172779 -0.9743388 col8 col9 col10 col11 col12 col13 col14 row1 -0.6933916 -0.3537638 -1.016353 -1.581491 -0.2354865 -1.09006 -0.950556 col15 col16 col17 col18 col19 col20 row1 1.019829 0.1157143 -1.385032 0.4924558 1.395394 -1.125406 > tmp[,"col10"] col10 row1 -1.0163525 row2 -0.4416230 row3 0.9231766 row4 0.2735262 row5 -0.7067889 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.3974612 1.346775 -0.953105 -0.6825562 0.0229699 0.9172779 -0.9743388 row5 -0.9407037 -1.918756 -1.439296 0.1485587 -1.0262549 1.2371888 0.8216104 col8 col9 col10 col11 col12 col13 row1 -0.6933916 -0.3537638 -1.0163525 -1.58149080 -0.2354865 -1.0900605 row5 0.7805378 1.0598288 -0.7067889 0.02829377 -0.6812574 -0.5485674 col14 col15 col16 col17 col18 col19 row1 -0.9505560 1.0198292 0.115714325 -1.385032 0.4924558 1.3953936 row5 0.8436112 -0.1098522 0.001295352 1.009541 -0.2874213 -0.3842981 col20 row1 -1.1254064 row5 -0.5338079 > tmp[,c("col6","col20")] col6 col20 row1 0.9172779 -1.1254064 row2 -2.0977001 0.9700780 row3 0.1649011 0.1598387 row4 0.6879295 -0.9881472 row5 1.2371888 -0.5338079 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.9172779 -1.1254064 row5 1.2371888 -0.5338079 > > > > > 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.19404 49.0059 49.2352 50.29598 50.91673 103.5188 49.79838 49.49928 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.04882 51.45427 49.93616 50.48074 50.6488 50.85146 50.6033 49.99897 col17 col18 col19 col20 row1 50.29871 49.94646 50.37732 106.7114 > tmp[,"col10"] col10 row1 51.45427 row2 28.91751 row3 31.45855 row4 29.91916 row5 50.19878 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.19404 49.00590 49.23520 50.29598 50.91673 103.5188 49.79838 49.49928 row5 50.06704 51.35754 48.37686 48.52780 50.47629 105.2515 52.70603 50.94499 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.04882 51.45427 49.93616 50.48074 50.64880 50.85146 50.60330 49.99897 row5 49.53048 50.19878 50.96644 48.11005 50.65878 49.93158 49.11426 49.44456 col17 col18 col19 col20 row1 50.29871 49.94646 50.37732 106.7114 row5 47.96663 50.64926 50.72901 104.3783 > tmp[,c("col6","col20")] col6 col20 row1 103.51883 106.71141 row2 76.74711 74.29888 row3 75.07153 73.87572 row4 72.96113 73.45984 row5 105.25153 104.37829 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.5188 106.7114 row5 105.2515 104.3783 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.5188 106.7114 row5 105.2515 104.3783 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -1.0557540 [2,] 0.6930734 [3,] 0.9971858 [4,] 1.0542243 [5,] -0.7868718 > tmp[,c("col17","col7")] col17 col7 [1,] 0.63251836 0.8732129 [2,] -0.05531944 -1.6732636 [3,] -0.83788442 1.2855121 [4,] -0.96696466 -1.8527690 [5,] -0.68870856 -0.8094612 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -2.0476832 0.4653766 [2,] -0.5322004 -1.5510197 [3,] -0.1488003 -1.9976169 [4,] 1.7338745 -1.2017770 [5,] 0.9726934 -0.8917268 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -2.047683 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -2.0476832 [2,] -0.5322004 > > > > 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.1205118 2.1722353 -0.5163323 0.196234 -0.3751283 1.388835 0.6018009 row1 0.1825598 -0.0174407 -0.2834109 1.216846 1.1776577 -0.321555 1.3797987 [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.1613885 0.6627048 -0.6698244 -0.4078539 -0.2481883 0.1243984 row1 0.4418825 -0.7948700 0.8853778 0.4138059 -0.8866085 -1.0339262 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 -1.471197 -0.7697593 0.8402127 1.1321819 -1.5908023 -0.4474951 1.638878 row1 2.321727 -1.1622494 -0.1483881 0.1594797 0.3733485 -2.6002976 -1.208111 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -1.150166 -1.4407 0.3165323 -1.439007 -0.80853 0.07639089 -1.490548 [,8] [,9] [,10] row2 0.9244824 -0.1634364 -1.448039 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.08576345 1.981794 -1.129529 0.2716274 1.045022 0.05770107 2.808895 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.3320085 -0.9157615 0.2968891 -1.446072 0.3385609 -0.8994412 0.1771971 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.4965119 -1.160332 0.07488201 1.206097 1.26768 -1.50696 > > > 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: 0x5a46dce74b00> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d2e126368" [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d270d94596" [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d22c9ddc58" [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d2797540b0" [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d21b2f4b24" [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d2221acc32" [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d241b23703" [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d23f588674" [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d255cda893" [10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d24afb2a6c" [11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d2657be067" [12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d267bdd0ea" [13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d2fda1707" [14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d278356a26" [15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3fc1d24ea82c0d" > > > ### 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: 0x5a46de7bcd70> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x5a46de7bcd70> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x5a46de7bcd70> > rowMedians(tmp) [1] -0.535368876 0.243194498 -0.011028199 0.563191783 0.267553839 [6] 0.451191636 0.432421535 -0.039348145 -0.518993194 -0.178644392 [11] 0.008352902 -0.294844939 -0.249000013 0.132621966 0.196232504 [16] 0.292207498 -0.293019960 -0.508082546 -0.132062504 -0.220792354 [21] -1.004221014 0.129821517 0.315136930 -0.006243691 -0.114920911 [26] 0.398226497 0.134398822 0.149592209 0.731296736 -0.095769154 [31] 0.100438459 0.577692748 -0.089959901 0.138099840 0.297622784 [36] 0.402954322 -0.267293334 -0.116573502 0.101938674 0.222844130 [41] -0.043183284 0.122677382 0.330550520 0.474269693 -0.038591288 [46] 0.094853304 -0.291254394 -0.235943862 0.246205878 -0.008520212 [51] 0.836243337 0.270450529 -0.392724829 0.534148092 -0.487012102 [56] -0.614465755 0.502130001 -0.190627445 -0.609060358 -0.275134608 [61] -0.139235100 0.154495869 0.420160072 0.436523230 0.363045298 [66] 0.040714496 0.120199483 0.124183515 -0.122014141 -0.137601384 [71] -0.169520424 -0.068096090 0.302884887 -0.319182461 -0.626099225 [76] -0.113282010 -0.221309721 -0.208364743 0.296126321 0.223211835 [81] -0.287137688 -0.109834543 -0.262244148 0.516745783 0.009656359 [86] -0.445137363 -0.116848751 0.048501260 0.654283137 0.223027869 [91] 0.093180115 0.108393558 -0.373707353 0.458535301 -0.403985292 [96] 0.288284849 -0.302367202 -0.177947734 -0.268669287 0.212417356 [101] -0.558351036 0.023271772 -0.102854251 0.494505905 -0.190207254 [106] -0.236178499 0.591836893 -0.893401369 -0.368661633 0.602912556 [111] 0.461740528 0.296706814 -0.244687689 -0.015537552 0.713516142 [116] 0.136358207 0.542176274 -0.212190104 0.086479952 0.433140652 [121] 0.575022413 0.224904552 0.298641231 0.282164460 -0.456892423 [126] -0.252826591 -0.541595573 -0.440418564 -0.280501421 -0.169065430 [131] 0.633797799 -0.151334765 0.033256542 0.121095819 -0.550970238 [136] -0.051436178 0.042952369 -0.010252221 0.718262591 0.025469708 [141] -0.268477397 -0.142650815 0.593602820 0.279125462 0.127185116 [146] 0.066989193 -0.322625082 0.096345315 -0.012594243 -0.462974980 [151] -0.169048120 -0.036178000 0.145836641 -0.134388546 0.383027185 [156] -0.345823322 0.408340619 0.568344302 -0.186594502 -0.336616311 [161] 0.208239461 -0.278287438 0.058619074 -0.128575405 0.406986107 [166] 0.285776497 -0.247579959 -0.123993431 -0.262490096 0.128477075 [171] -0.041049847 -0.012404338 0.112446993 -0.397602405 0.008188418 [176] -0.589305391 -0.213320254 -0.666031864 -0.117340399 0.345773396 [181] -0.653212330 0.095398246 -0.149188569 0.300408018 -0.202623628 [186] 0.320072585 -0.138405679 0.007409804 0.275022415 0.218282363 [191] 0.654214285 -0.522755901 0.012133232 0.016903902 0.123695635 [196] -0.038515943 0.204417529 -0.090118041 -0.200892452 0.631149562 [201] -0.674421599 0.142900753 -0.130745385 0.008313109 -0.067201988 [206] 0.038920226 -0.531976426 0.340429536 0.004173015 0.140126622 [211] -0.170141874 0.030683386 -0.014878579 0.153388880 -0.560214549 [216] -0.465160479 0.027841028 0.301708821 0.379388134 -0.374725748 [221] -0.221092998 -0.259968236 0.430404625 0.001269455 -0.045785570 [226] -0.024041765 -0.625715933 -0.424245268 -0.145701905 0.056272545 > > proc.time() user system elapsed 2.042 1.086 3.300
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: 0x5fbee17b0c80> > .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: 0x5fbee17b0c80> > .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: 0x5fbee17b0c80> > .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: 0x5fbee17b0c80> > 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: 0x5fbee1447a00> > .Call("R_bm_AddColumn",P) <pointer: 0x5fbee1447a00> > .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: 0x5fbee1447a00> > .Call("R_bm_AddColumn",P) <pointer: 0x5fbee1447a00> > .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: 0x5fbee1447a00> > 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: 0x5fbee1512660> > .Call("R_bm_AddColumn",P) <pointer: 0x5fbee1512660> > .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: 0x5fbee1512660> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5fbee1512660> > .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: 0x5fbee1512660> > > .Call("R_bm_RowMode",P) <pointer: 0x5fbee1512660> > .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: 0x5fbee1512660> > > .Call("R_bm_ColMode",P) <pointer: 0x5fbee1512660> > .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: 0x5fbee1512660> > 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: 0x5fbee1a343d0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x5fbee1a343d0> > .Call("R_bm_AddColumn",P) <pointer: 0x5fbee1a343d0> > .Call("R_bm_AddColumn",P) <pointer: 0x5fbee1a343d0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3fc3cd19f8ee25" "BufferedMatrixFile3fc3cd3504f6d3" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3fc3cd19f8ee25" "BufferedMatrixFile3fc3cd3504f6d3" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x5fbee3b91460> > .Call("R_bm_AddColumn",P) <pointer: 0x5fbee3b91460> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5fbee3b91460> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5fbee3b91460> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x5fbee3b91460> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x5fbee3b91460> > .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: 0x5fbee31c8e60> > .Call("R_bm_AddColumn",P) <pointer: 0x5fbee31c8e60> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5fbee31c8e60> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x5fbee31c8e60> > 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: 0x5fbee203b710> > .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: 0x5fbee203b710> > rm(P) > > proc.time() user system elapsed 0.306 0.039 0.357
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.396 0.048 0.503