Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-10-11 12:03 -0400 (Sat, 11 Oct 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" | 4864 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4652 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4597 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4586 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 255/2346 | 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-10-10 21:57:50 -0400 (Fri, 10 Oct 2025) |
EndedAt: 2025-10-10 21:58:25 -0400 (Fri, 10 Oct 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.391 0.059 0.510
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 Oct 10 21:58:12 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 Oct 10 21:58:12 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: 0x60abdcae8c80> > > > > 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 Oct 10 21:58:12 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 Oct 10 21:58:12 2025" > > ColMode(tmp2) <pointer: 0x60abdcae8c80> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.1533751 -1.897916 0.03072353 -1.3218897 [2,] 0.4511299 -1.064508 -0.41046363 -0.4767221 [3,] -2.1462102 -1.323165 0.44531007 0.4647315 [4,] 0.2960649 -0.180051 -0.60474728 -1.6054375 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.1533751 1.897916 0.03072353 1.3218897 [2,] 0.4511299 1.064508 0.41046363 0.4767221 [3,] 2.1462102 1.323165 0.44531007 0.4647315 [4,] 0.2960649 0.180051 0.60474728 1.6054375 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 10.0076658 1.3776488 0.1752813 1.1497346 [2,] 0.6716621 1.0317499 0.6406744 0.6904506 [3,] 1.4649949 1.1502889 0.6673156 0.6817122 [4,] 0.5441184 0.4243242 0.7776550 1.2670586 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 225.23003 40.67440 26.78354 37.81924 [2,] 32.16775 36.38201 31.81721 32.38123 [3,] 41.79616 37.82605 32.11847 32.28185 [4,] 30.73725 29.42329 33.38130 39.27602 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x60abdecc13a0> > exp(tmp5) <pointer: 0x60abdecc13a0> > log(tmp5,2) <pointer: 0x60abdecc13a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 468.7868 > Min(tmp5) [1] 52.06893 > mean(tmp5) [1] 72.7458 > Sum(tmp5) [1] 14549.16 > Var(tmp5) [1] 865.2105 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.35233 72.13737 69.62078 69.83185 71.77914 70.41997 70.52808 70.54074 [9] 69.75685 71.49093 > rowSums(tmp5) [1] 1827.047 1442.747 1392.416 1396.637 1435.583 1408.399 1410.562 1410.815 [9] 1395.137 1429.819 > rowVars(tmp5) [1] 7963.13667 67.62267 46.69747 70.50705 86.28068 77.72580 [7] 84.42069 72.84852 62.65972 117.97606 > rowSd(tmp5) [1] 89.236409 8.223300 6.833555 8.396848 9.288740 8.816223 9.188073 [8] 8.535134 7.915789 10.861679 > rowMax(tmp5) [1] 468.78680 84.89515 86.99323 84.47617 87.68665 89.05494 87.52735 [8] 92.41678 85.82017 86.55009 > rowMin(tmp5) [1] 54.69316 58.04713 61.60692 52.06893 55.74548 58.21021 53.61639 54.70380 [9] 55.65062 55.77929 > > colMeans(tmp5) [1] 111.51629 72.16585 67.38666 67.74256 71.47663 73.23404 70.67796 [8] 68.77396 77.47747 68.39424 67.29926 74.65579 70.57674 68.19960 [15] 68.74626 71.35698 70.94879 71.47524 70.26635 72.54542 > colSums(tmp5) [1] 1115.1629 721.6585 673.8666 677.4256 714.7663 732.3404 706.7796 [8] 687.7396 774.7747 683.9424 672.9926 746.5579 705.7674 681.9960 [15] 687.4626 713.5698 709.4879 714.7524 702.6635 725.4542 > colVars(tmp5) [1] 15835.69296 97.28229 85.30162 53.85584 49.68522 93.61677 [7] 88.35670 44.50846 83.11888 46.38224 41.51771 63.74004 [13] 76.32438 62.97739 122.29481 78.59845 63.57639 41.96437 [19] 110.14604 93.92710 > colSd(tmp5) [1] 125.839950 9.863178 9.235888 7.338654 7.048774 9.675576 [7] 9.399825 6.671466 9.116956 6.810451 6.443424 7.983736 [13] 8.736382 7.935829 11.058699 8.865577 7.973480 6.477991 [19] 10.495049 9.691599 > colMax(tmp5) [1] 468.78680 89.05494 85.82017 81.74790 80.64807 87.68665 87.40201 [8] 80.68962 86.06424 78.29171 76.65896 87.52735 82.83179 80.37992 [15] 92.41678 86.55009 82.00957 81.69980 84.85726 84.89515 > colMin(tmp5) [1] 59.55506 61.22543 55.74642 58.15744 58.55874 53.61639 54.70380 58.00570 [9] 56.74721 60.68710 54.59494 58.46491 52.06893 58.92280 55.74548 55.65062 [17] 60.82368 61.60692 54.69316 58.11582 > > > ### 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] 91.35233 72.13737 69.62078 69.83185 71.77914 NA 70.52808 70.54074 [9] 69.75685 71.49093 > rowSums(tmp5) [1] 1827.047 1442.747 1392.416 1396.637 1435.583 NA 1410.562 1410.815 [9] 1395.137 1429.819 > rowVars(tmp5) [1] 7963.13667 67.62267 46.69747 70.50705 86.28068 82.03549 [7] 84.42069 72.84852 62.65972 117.97606 > rowSd(tmp5) [1] 89.236409 8.223300 6.833555 8.396848 9.288740 9.057345 9.188073 [8] 8.535134 7.915789 10.861679 > rowMax(tmp5) [1] 468.78680 84.89515 86.99323 84.47617 87.68665 NA 87.52735 [8] 92.41678 85.82017 86.55009 > rowMin(tmp5) [1] 54.69316 58.04713 61.60692 52.06893 55.74548 NA 53.61639 54.70380 [9] 55.65062 55.77929 > > colMeans(tmp5) [1] 111.51629 72.16585 NA 67.74256 71.47663 73.23404 70.67796 [8] 68.77396 77.47747 68.39424 67.29926 74.65579 70.57674 68.19960 [15] 68.74626 71.35698 70.94879 71.47524 70.26635 72.54542 > colSums(tmp5) [1] 1115.1629 721.6585 NA 677.4256 714.7663 732.3404 706.7796 [8] 687.7396 774.7747 683.9424 672.9926 746.5579 705.7674 681.9960 [15] 687.4626 713.5698 709.4879 714.7524 702.6635 725.4542 > colVars(tmp5) [1] 15835.69296 97.28229 NA 53.85584 49.68522 93.61677 [7] 88.35670 44.50846 83.11888 46.38224 41.51771 63.74004 [13] 76.32438 62.97739 122.29481 78.59845 63.57639 41.96437 [19] 110.14604 93.92710 > colSd(tmp5) [1] 125.839950 9.863178 NA 7.338654 7.048774 9.675576 [7] 9.399825 6.671466 9.116956 6.810451 6.443424 7.983736 [13] 8.736382 7.935829 11.058699 8.865577 7.973480 6.477991 [19] 10.495049 9.691599 > colMax(tmp5) [1] 468.78680 89.05494 NA 81.74790 80.64807 87.68665 87.40201 [8] 80.68962 86.06424 78.29171 76.65896 87.52735 82.83179 80.37992 [15] 92.41678 86.55009 82.00957 81.69980 84.85726 84.89515 > colMin(tmp5) [1] 59.55506 61.22543 NA 58.15744 58.55874 53.61639 54.70380 58.00570 [9] 56.74721 60.68710 54.59494 58.46491 52.06893 58.92280 55.74548 55.65062 [17] 60.82368 61.60692 54.69316 58.11582 > > Max(tmp5,na.rm=TRUE) [1] 468.7868 > Min(tmp5,na.rm=TRUE) [1] 52.06893 > mean(tmp5,na.rm=TRUE) [1] 72.75559 > Sum(tmp5,na.rm=TRUE) [1] 14478.36 > Var(tmp5,na.rm=TRUE) [1] 869.561 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.35233 72.13737 69.62078 69.83185 71.77914 70.40002 70.52808 70.54074 [9] 69.75685 71.49093 > rowSums(tmp5,na.rm=TRUE) [1] 1827.047 1442.747 1392.416 1396.637 1435.583 1337.600 1410.562 1410.815 [9] 1395.137 1429.819 > rowVars(tmp5,na.rm=TRUE) [1] 7963.13667 67.62267 46.69747 70.50705 86.28068 82.03549 [7] 84.42069 72.84852 62.65972 117.97606 > rowSd(tmp5,na.rm=TRUE) [1] 89.236409 8.223300 6.833555 8.396848 9.288740 9.057345 9.188073 [8] 8.535134 7.915789 10.861679 > rowMax(tmp5,na.rm=TRUE) [1] 468.78680 84.89515 86.99323 84.47617 87.68665 89.05494 87.52735 [8] 92.41678 85.82017 86.55009 > rowMin(tmp5,na.rm=TRUE) [1] 54.69316 58.04713 61.60692 52.06893 55.74548 58.21021 53.61639 54.70380 [9] 55.65062 55.77929 > > colMeans(tmp5,na.rm=TRUE) [1] 111.51629 72.16585 67.00751 67.74256 71.47663 73.23404 70.67796 [8] 68.77396 77.47747 68.39424 67.29926 74.65579 70.57674 68.19960 [15] 68.74626 71.35698 70.94879 71.47524 70.26635 72.54542 > colSums(tmp5,na.rm=TRUE) [1] 1115.1629 721.6585 603.0676 677.4256 714.7663 732.3404 706.7796 [8] 687.7396 774.7747 683.9424 672.9926 746.5579 705.7674 681.9960 [15] 687.4626 713.5698 709.4879 714.7524 702.6635 725.4542 > colVars(tmp5,na.rm=TRUE) [1] 15835.69296 97.28229 94.34709 53.85584 49.68522 93.61677 [7] 88.35670 44.50846 83.11888 46.38224 41.51771 63.74004 [13] 76.32438 62.97739 122.29481 78.59845 63.57639 41.96437 [19] 110.14604 93.92710 > colSd(tmp5,na.rm=TRUE) [1] 125.839950 9.863178 9.713243 7.338654 7.048774 9.675576 [7] 9.399825 6.671466 9.116956 6.810451 6.443424 7.983736 [13] 8.736382 7.935829 11.058699 8.865577 7.973480 6.477991 [19] 10.495049 9.691599 > colMax(tmp5,na.rm=TRUE) [1] 468.78680 89.05494 85.82017 81.74790 80.64807 87.68665 87.40201 [8] 80.68962 86.06424 78.29171 76.65896 87.52735 82.83179 80.37992 [15] 92.41678 86.55009 82.00957 81.69980 84.85726 84.89515 > colMin(tmp5,na.rm=TRUE) [1] 59.55506 61.22543 55.74642 58.15744 58.55874 53.61639 54.70380 58.00570 [9] 56.74721 60.68710 54.59494 58.46491 52.06893 58.92280 55.74548 55.65062 [17] 60.82368 61.60692 54.69316 58.11582 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.35233 72.13737 69.62078 69.83185 71.77914 NaN 70.52808 70.54074 [9] 69.75685 71.49093 > rowSums(tmp5,na.rm=TRUE) [1] 1827.047 1442.747 1392.416 1396.637 1435.583 0.000 1410.562 1410.815 [9] 1395.137 1429.819 > rowVars(tmp5,na.rm=TRUE) [1] 7963.13667 67.62267 46.69747 70.50705 86.28068 NA [7] 84.42069 72.84852 62.65972 117.97606 > rowSd(tmp5,na.rm=TRUE) [1] 89.236409 8.223300 6.833555 8.396848 9.288740 NA 9.188073 [8] 8.535134 7.915789 10.861679 > rowMax(tmp5,na.rm=TRUE) [1] 468.78680 84.89515 86.99323 84.47617 87.68665 NA 87.52735 [8] 92.41678 85.82017 86.55009 > rowMin(tmp5,na.rm=TRUE) [1] 54.69316 58.04713 61.60692 52.06893 55.74548 NA 53.61639 54.70380 [9] 55.65062 55.77929 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 116.09856 70.28928 NaN 68.33604 71.96546 72.16208 70.92060 [8] 69.84967 77.06401 69.10537 66.80440 74.61964 70.86251 68.25557 [15] 69.91693 70.97547 72.04793 71.03461 68.85213 73.91682 > colSums(tmp5,na.rm=TRUE) [1] 1044.8871 632.6036 0.0000 615.0244 647.6892 649.4587 638.2854 [8] 628.6471 693.5761 621.9483 601.2396 671.5767 637.7626 614.3001 [15] 629.2524 638.7793 648.4314 639.3115 619.6692 665.2514 > colVars(tmp5,na.rm=TRUE) [1] 17578.93628 69.82571 NA 56.62532 53.20759 92.39171 [7] 98.73896 37.05394 91.58555 46.49091 43.95249 71.69285 [13] 84.94617 70.81432 122.16383 86.78585 57.93229 45.02571 [19] 101.41414 84.50974 > colSd(tmp5,na.rm=TRUE) [1] 132.585581 8.356178 NA 7.524980 7.294353 9.612061 [7] 9.936748 6.087194 9.570034 6.818424 6.629668 8.467163 [13] 9.216625 8.415124 11.052775 9.315892 7.611326 6.710120 [19] 10.070459 9.192918 > colMax(tmp5,na.rm=TRUE) [1] 468.78680 84.65844 -Inf 81.74790 80.64807 87.68665 87.40201 [8] 80.68962 86.06424 78.29171 76.65896 87.52735 82.83179 80.37992 [15] 92.41678 86.55009 82.00957 81.69980 84.85726 84.89515 > colMin(tmp5,na.rm=TRUE) [1] 59.55506 61.22543 Inf 58.15744 58.55874 53.61639 54.70380 58.00570 [9] 56.74721 60.68710 54.59494 58.46491 52.06893 58.92280 55.74548 55.65062 [17] 60.82368 61.60692 54.69316 58.11582 > > > > > 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] 216.25338 458.58975 216.57862 247.10410 193.43905 185.59628 84.40916 [8] 288.29490 107.85073 168.65441 > apply(copymatrix,1,var,na.rm=TRUE) [1] 216.25338 458.58975 216.57862 247.10410 193.43905 185.59628 84.40916 [8] 288.29490 107.85073 168.65441 > > > > 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] -1.705303e-13 -5.684342e-14 5.684342e-14 -5.684342e-14 0.000000e+00 [6] 1.136868e-13 2.273737e-13 -6.394885e-14 8.526513e-14 8.526513e-14 [11] 1.705303e-13 5.684342e-14 0.000000e+00 4.263256e-14 0.000000e+00 [16] 5.684342e-14 2.842171e-14 -1.705303e-13 -5.684342e-14 -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) + } 5 3 10 19 5 8 3 3 3 17 7 9 2 14 1 16 1 1 9 19 8 18 1 6 6 8 6 8 9 8 8 8 3 8 5 2 1 11 4 12 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] 3.063967 > Min(tmp) [1] -2.609419 > mean(tmp) [1] -0.004216051 > Sum(tmp) [1] -0.4216051 > Var(tmp) [1] 1.235916 > > rowMeans(tmp) [1] -0.004216051 > rowSums(tmp) [1] -0.4216051 > rowVars(tmp) [1] 1.235916 > rowSd(tmp) [1] 1.111718 > rowMax(tmp) [1] 3.063967 > rowMin(tmp) [1] -2.609419 > > colMeans(tmp) [1] -0.869377407 -0.458932147 0.269546651 0.178032288 0.061611570 [6] -0.085799124 0.450458171 1.816574079 -1.117698586 0.161917035 [11] 0.861249912 0.671248596 0.442536520 0.052502697 -0.730566046 [16] 1.262118347 0.822985184 -1.473733204 0.293060255 1.204193563 [21] 0.260398220 2.837118881 0.671412819 -1.189844372 -0.995469821 [26] -0.592350388 0.517502635 -0.009274962 -0.690591134 0.343730851 [31] -0.625830825 0.232778927 3.063967068 -0.171274069 -2.609418844 [36] -1.385546061 0.440249166 -0.826576725 -0.486784949 -0.939376500 [41] -1.142034489 0.711807585 -0.808985835 -0.626433564 -0.448297665 [46] -0.977123423 0.693550885 -1.317541224 -1.304375976 -1.707510393 [51] -1.069369176 1.239668800 -0.260830288 0.197418495 -1.110778969 [56] 1.380994542 0.228341809 -1.052992887 -1.012339345 -0.278472514 [61] -0.872624716 -1.061353944 -1.064938087 1.101380705 -0.516928473 [66] -1.272762223 1.325832214 -0.210071244 1.688532457 0.411438896 [71] -0.449326691 0.604913551 1.387587037 1.174625034 0.972743788 [76] 2.180295472 2.572935799 -0.453829422 0.058594469 0.785721374 [81] -1.834760140 1.675083015 -0.157025198 -0.750815260 -1.740887065 [86] 0.353896172 0.405894230 1.808007063 -1.000752882 -2.385439996 [91] -0.649428395 -0.601358666 -1.364089032 -0.045966202 0.941416322 [96] 1.594588013 1.192005019 0.728653896 -0.582292073 0.637455423 > colSums(tmp) [1] -0.869377407 -0.458932147 0.269546651 0.178032288 0.061611570 [6] -0.085799124 0.450458171 1.816574079 -1.117698586 0.161917035 [11] 0.861249912 0.671248596 0.442536520 0.052502697 -0.730566046 [16] 1.262118347 0.822985184 -1.473733204 0.293060255 1.204193563 [21] 0.260398220 2.837118881 0.671412819 -1.189844372 -0.995469821 [26] -0.592350388 0.517502635 -0.009274962 -0.690591134 0.343730851 [31] -0.625830825 0.232778927 3.063967068 -0.171274069 -2.609418844 [36] -1.385546061 0.440249166 -0.826576725 -0.486784949 -0.939376500 [41] -1.142034489 0.711807585 -0.808985835 -0.626433564 -0.448297665 [46] -0.977123423 0.693550885 -1.317541224 -1.304375976 -1.707510393 [51] -1.069369176 1.239668800 -0.260830288 0.197418495 -1.110778969 [56] 1.380994542 0.228341809 -1.052992887 -1.012339345 -0.278472514 [61] -0.872624716 -1.061353944 -1.064938087 1.101380705 -0.516928473 [66] -1.272762223 1.325832214 -0.210071244 1.688532457 0.411438896 [71] -0.449326691 0.604913551 1.387587037 1.174625034 0.972743788 [76] 2.180295472 2.572935799 -0.453829422 0.058594469 0.785721374 [81] -1.834760140 1.675083015 -0.157025198 -0.750815260 -1.740887065 [86] 0.353896172 0.405894230 1.808007063 -1.000752882 -2.385439996 [91] -0.649428395 -0.601358666 -1.364089032 -0.045966202 0.941416322 [96] 1.594588013 1.192005019 0.728653896 -0.582292073 0.637455423 > 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.869377407 -0.458932147 0.269546651 0.178032288 0.061611570 [6] -0.085799124 0.450458171 1.816574079 -1.117698586 0.161917035 [11] 0.861249912 0.671248596 0.442536520 0.052502697 -0.730566046 [16] 1.262118347 0.822985184 -1.473733204 0.293060255 1.204193563 [21] 0.260398220 2.837118881 0.671412819 -1.189844372 -0.995469821 [26] -0.592350388 0.517502635 -0.009274962 -0.690591134 0.343730851 [31] -0.625830825 0.232778927 3.063967068 -0.171274069 -2.609418844 [36] -1.385546061 0.440249166 -0.826576725 -0.486784949 -0.939376500 [41] -1.142034489 0.711807585 -0.808985835 -0.626433564 -0.448297665 [46] -0.977123423 0.693550885 -1.317541224 -1.304375976 -1.707510393 [51] -1.069369176 1.239668800 -0.260830288 0.197418495 -1.110778969 [56] 1.380994542 0.228341809 -1.052992887 -1.012339345 -0.278472514 [61] -0.872624716 -1.061353944 -1.064938087 1.101380705 -0.516928473 [66] -1.272762223 1.325832214 -0.210071244 1.688532457 0.411438896 [71] -0.449326691 0.604913551 1.387587037 1.174625034 0.972743788 [76] 2.180295472 2.572935799 -0.453829422 0.058594469 0.785721374 [81] -1.834760140 1.675083015 -0.157025198 -0.750815260 -1.740887065 [86] 0.353896172 0.405894230 1.808007063 -1.000752882 -2.385439996 [91] -0.649428395 -0.601358666 -1.364089032 -0.045966202 0.941416322 [96] 1.594588013 1.192005019 0.728653896 -0.582292073 0.637455423 > colMin(tmp) [1] -0.869377407 -0.458932147 0.269546651 0.178032288 0.061611570 [6] -0.085799124 0.450458171 1.816574079 -1.117698586 0.161917035 [11] 0.861249912 0.671248596 0.442536520 0.052502697 -0.730566046 [16] 1.262118347 0.822985184 -1.473733204 0.293060255 1.204193563 [21] 0.260398220 2.837118881 0.671412819 -1.189844372 -0.995469821 [26] -0.592350388 0.517502635 -0.009274962 -0.690591134 0.343730851 [31] -0.625830825 0.232778927 3.063967068 -0.171274069 -2.609418844 [36] -1.385546061 0.440249166 -0.826576725 -0.486784949 -0.939376500 [41] -1.142034489 0.711807585 -0.808985835 -0.626433564 -0.448297665 [46] -0.977123423 0.693550885 -1.317541224 -1.304375976 -1.707510393 [51] -1.069369176 1.239668800 -0.260830288 0.197418495 -1.110778969 [56] 1.380994542 0.228341809 -1.052992887 -1.012339345 -0.278472514 [61] -0.872624716 -1.061353944 -1.064938087 1.101380705 -0.516928473 [66] -1.272762223 1.325832214 -0.210071244 1.688532457 0.411438896 [71] -0.449326691 0.604913551 1.387587037 1.174625034 0.972743788 [76] 2.180295472 2.572935799 -0.453829422 0.058594469 0.785721374 [81] -1.834760140 1.675083015 -0.157025198 -0.750815260 -1.740887065 [86] 0.353896172 0.405894230 1.808007063 -1.000752882 -2.385439996 [91] -0.649428395 -0.601358666 -1.364089032 -0.045966202 0.941416322 [96] 1.594588013 1.192005019 0.728653896 -0.582292073 0.637455423 > colMedians(tmp) [1] -0.869377407 -0.458932147 0.269546651 0.178032288 0.061611570 [6] -0.085799124 0.450458171 1.816574079 -1.117698586 0.161917035 [11] 0.861249912 0.671248596 0.442536520 0.052502697 -0.730566046 [16] 1.262118347 0.822985184 -1.473733204 0.293060255 1.204193563 [21] 0.260398220 2.837118881 0.671412819 -1.189844372 -0.995469821 [26] -0.592350388 0.517502635 -0.009274962 -0.690591134 0.343730851 [31] -0.625830825 0.232778927 3.063967068 -0.171274069 -2.609418844 [36] -1.385546061 0.440249166 -0.826576725 -0.486784949 -0.939376500 [41] -1.142034489 0.711807585 -0.808985835 -0.626433564 -0.448297665 [46] -0.977123423 0.693550885 -1.317541224 -1.304375976 -1.707510393 [51] -1.069369176 1.239668800 -0.260830288 0.197418495 -1.110778969 [56] 1.380994542 0.228341809 -1.052992887 -1.012339345 -0.278472514 [61] -0.872624716 -1.061353944 -1.064938087 1.101380705 -0.516928473 [66] -1.272762223 1.325832214 -0.210071244 1.688532457 0.411438896 [71] -0.449326691 0.604913551 1.387587037 1.174625034 0.972743788 [76] 2.180295472 2.572935799 -0.453829422 0.058594469 0.785721374 [81] -1.834760140 1.675083015 -0.157025198 -0.750815260 -1.740887065 [86] 0.353896172 0.405894230 1.808007063 -1.000752882 -2.385439996 [91] -0.649428395 -0.601358666 -1.364089032 -0.045966202 0.941416322 [96] 1.594588013 1.192005019 0.728653896 -0.582292073 0.637455423 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.8693774 -0.4589321 0.2695467 0.1780323 0.06161157 -0.08579912 0.4504582 [2,] -0.8693774 -0.4589321 0.2695467 0.1780323 0.06161157 -0.08579912 0.4504582 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.816574 -1.117699 0.161917 0.8612499 0.6712486 0.4425365 0.0525027 [2,] 1.816574 -1.117699 0.161917 0.8612499 0.6712486 0.4425365 0.0525027 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.730566 1.262118 0.8229852 -1.473733 0.2930603 1.204194 0.2603982 [2,] -0.730566 1.262118 0.8229852 -1.473733 0.2930603 1.204194 0.2603982 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 2.837119 0.6714128 -1.189844 -0.9954698 -0.5923504 0.5175026 -0.009274962 [2,] 2.837119 0.6714128 -1.189844 -0.9954698 -0.5923504 0.5175026 -0.009274962 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.6905911 0.3437309 -0.6258308 0.2327789 3.063967 -0.1712741 -2.609419 [2,] -0.6905911 0.3437309 -0.6258308 0.2327789 3.063967 -0.1712741 -2.609419 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.385546 0.4402492 -0.8265767 -0.4867849 -0.9393765 -1.142034 0.7118076 [2,] -1.385546 0.4402492 -0.8265767 -0.4867849 -0.9393765 -1.142034 0.7118076 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.8089858 -0.6264336 -0.4482977 -0.9771234 0.6935509 -1.317541 -1.304376 [2,] -0.8089858 -0.6264336 -0.4482977 -0.9771234 0.6935509 -1.317541 -1.304376 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -1.70751 -1.069369 1.239669 -0.2608303 0.1974185 -1.110779 1.380995 [2,] -1.70751 -1.069369 1.239669 -0.2608303 0.1974185 -1.110779 1.380995 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.2283418 -1.052993 -1.012339 -0.2784725 -0.8726247 -1.061354 -1.064938 [2,] 0.2283418 -1.052993 -1.012339 -0.2784725 -0.8726247 -1.061354 -1.064938 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 1.101381 -0.5169285 -1.272762 1.325832 -0.2100712 1.688532 0.4114389 [2,] 1.101381 -0.5169285 -1.272762 1.325832 -0.2100712 1.688532 0.4114389 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.4493267 0.6049136 1.387587 1.174625 0.9727438 2.180295 2.572936 [2,] -0.4493267 0.6049136 1.387587 1.174625 0.9727438 2.180295 2.572936 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.4538294 0.05859447 0.7857214 -1.83476 1.675083 -0.1570252 -0.7508153 [2,] -0.4538294 0.05859447 0.7857214 -1.83476 1.675083 -0.1570252 -0.7508153 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -1.740887 0.3538962 0.4058942 1.808007 -1.000753 -2.38544 -0.6494284 [2,] -1.740887 0.3538962 0.4058942 1.808007 -1.000753 -2.38544 -0.6494284 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.6013587 -1.364089 -0.0459662 0.9414163 1.594588 1.192005 0.7286539 [2,] -0.6013587 -1.364089 -0.0459662 0.9414163 1.594588 1.192005 0.7286539 [,99] [,100] [1,] -0.5822921 0.6374554 [2,] -0.5822921 0.6374554 > > > Max(tmp2) [1] 2.450347 > Min(tmp2) [1] -1.866768 > mean(tmp2) [1] 0.1382984 > Sum(tmp2) [1] 13.82984 > Var(tmp2) [1] 0.7580415 > > rowMeans(tmp2) [1] -0.420958529 0.544945441 0.497283068 0.058911351 1.469133857 [6] 0.807722033 1.544138838 -0.509261591 -0.792204042 1.522961419 [11] 0.845584084 0.356302779 -0.477776286 0.280321245 -1.414175424 [16] -0.348735110 0.005860872 0.398689099 -0.504040360 0.216345712 [21] 0.457105541 2.450347306 0.238645093 -0.228543757 0.742945862 [26] 1.928925293 1.424493084 -1.754452462 0.172715946 -0.391318687 [31] -0.174065778 0.105736509 -0.484867090 1.910558824 0.233842848 [36] -0.999629319 0.886284959 0.979219754 -0.162556210 -0.100305321 [41] -0.475782533 -1.525586156 0.399729777 -0.871072859 1.112372364 [46] -0.944872069 0.940440615 0.230013617 0.622698841 0.737373711 [51] 0.028113467 0.498338905 -0.381935578 -0.007956552 -0.822870006 [56] 0.107030892 0.023591575 0.531238319 -1.622448390 0.388779785 [61] 0.978759352 1.116807307 -1.036796251 0.470635211 -1.098314679 [66] 1.441189126 1.666260892 -0.109460297 0.331476517 -0.134723272 [71] -1.766840343 0.681844840 0.650790594 0.692090257 -0.183790060 [76] -0.697186292 -0.921424725 0.306599508 -0.485549494 -0.083839296 [81] -0.115004517 -1.866768108 0.052222935 0.807458120 0.307108249 [86] 0.470275200 -0.695685815 -0.591708949 -0.522913530 1.033853100 [91] -0.205376963 -0.809565357 1.188784352 0.724745220 0.938609288 [96] 0.597766983 -1.250844628 1.147841883 -0.190264096 0.707451666 > rowSums(tmp2) [1] -0.420958529 0.544945441 0.497283068 0.058911351 1.469133857 [6] 0.807722033 1.544138838 -0.509261591 -0.792204042 1.522961419 [11] 0.845584084 0.356302779 -0.477776286 0.280321245 -1.414175424 [16] -0.348735110 0.005860872 0.398689099 -0.504040360 0.216345712 [21] 0.457105541 2.450347306 0.238645093 -0.228543757 0.742945862 [26] 1.928925293 1.424493084 -1.754452462 0.172715946 -0.391318687 [31] -0.174065778 0.105736509 -0.484867090 1.910558824 0.233842848 [36] -0.999629319 0.886284959 0.979219754 -0.162556210 -0.100305321 [41] -0.475782533 -1.525586156 0.399729777 -0.871072859 1.112372364 [46] -0.944872069 0.940440615 0.230013617 0.622698841 0.737373711 [51] 0.028113467 0.498338905 -0.381935578 -0.007956552 -0.822870006 [56] 0.107030892 0.023591575 0.531238319 -1.622448390 0.388779785 [61] 0.978759352 1.116807307 -1.036796251 0.470635211 -1.098314679 [66] 1.441189126 1.666260892 -0.109460297 0.331476517 -0.134723272 [71] -1.766840343 0.681844840 0.650790594 0.692090257 -0.183790060 [76] -0.697186292 -0.921424725 0.306599508 -0.485549494 -0.083839296 [81] -0.115004517 -1.866768108 0.052222935 0.807458120 0.307108249 [86] 0.470275200 -0.695685815 -0.591708949 -0.522913530 1.033853100 [91] -0.205376963 -0.809565357 1.188784352 0.724745220 0.938609288 [96] 0.597766983 -1.250844628 1.147841883 -0.190264096 0.707451666 > 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.420958529 0.544945441 0.497283068 0.058911351 1.469133857 [6] 0.807722033 1.544138838 -0.509261591 -0.792204042 1.522961419 [11] 0.845584084 0.356302779 -0.477776286 0.280321245 -1.414175424 [16] -0.348735110 0.005860872 0.398689099 -0.504040360 0.216345712 [21] 0.457105541 2.450347306 0.238645093 -0.228543757 0.742945862 [26] 1.928925293 1.424493084 -1.754452462 0.172715946 -0.391318687 [31] -0.174065778 0.105736509 -0.484867090 1.910558824 0.233842848 [36] -0.999629319 0.886284959 0.979219754 -0.162556210 -0.100305321 [41] -0.475782533 -1.525586156 0.399729777 -0.871072859 1.112372364 [46] -0.944872069 0.940440615 0.230013617 0.622698841 0.737373711 [51] 0.028113467 0.498338905 -0.381935578 -0.007956552 -0.822870006 [56] 0.107030892 0.023591575 0.531238319 -1.622448390 0.388779785 [61] 0.978759352 1.116807307 -1.036796251 0.470635211 -1.098314679 [66] 1.441189126 1.666260892 -0.109460297 0.331476517 -0.134723272 [71] -1.766840343 0.681844840 0.650790594 0.692090257 -0.183790060 [76] -0.697186292 -0.921424725 0.306599508 -0.485549494 -0.083839296 [81] -0.115004517 -1.866768108 0.052222935 0.807458120 0.307108249 [86] 0.470275200 -0.695685815 -0.591708949 -0.522913530 1.033853100 [91] -0.205376963 -0.809565357 1.188784352 0.724745220 0.938609288 [96] 0.597766983 -1.250844628 1.147841883 -0.190264096 0.707451666 > rowMin(tmp2) [1] -0.420958529 0.544945441 0.497283068 0.058911351 1.469133857 [6] 0.807722033 1.544138838 -0.509261591 -0.792204042 1.522961419 [11] 0.845584084 0.356302779 -0.477776286 0.280321245 -1.414175424 [16] -0.348735110 0.005860872 0.398689099 -0.504040360 0.216345712 [21] 0.457105541 2.450347306 0.238645093 -0.228543757 0.742945862 [26] 1.928925293 1.424493084 -1.754452462 0.172715946 -0.391318687 [31] -0.174065778 0.105736509 -0.484867090 1.910558824 0.233842848 [36] -0.999629319 0.886284959 0.979219754 -0.162556210 -0.100305321 [41] -0.475782533 -1.525586156 0.399729777 -0.871072859 1.112372364 [46] -0.944872069 0.940440615 0.230013617 0.622698841 0.737373711 [51] 0.028113467 0.498338905 -0.381935578 -0.007956552 -0.822870006 [56] 0.107030892 0.023591575 0.531238319 -1.622448390 0.388779785 [61] 0.978759352 1.116807307 -1.036796251 0.470635211 -1.098314679 [66] 1.441189126 1.666260892 -0.109460297 0.331476517 -0.134723272 [71] -1.766840343 0.681844840 0.650790594 0.692090257 -0.183790060 [76] -0.697186292 -0.921424725 0.306599508 -0.485549494 -0.083839296 [81] -0.115004517 -1.866768108 0.052222935 0.807458120 0.307108249 [86] 0.470275200 -0.695685815 -0.591708949 -0.522913530 1.033853100 [91] -0.205376963 -0.809565357 1.188784352 0.724745220 0.938609288 [96] 0.597766983 -1.250844628 1.147841883 -0.190264096 0.707451666 > > colMeans(tmp2) [1] 0.1382984 > colSums(tmp2) [1] 13.82984 > colVars(tmp2) [1] 0.7580415 > colSd(tmp2) [1] 0.8706558 > colMax(tmp2) [1] 2.450347 > colMin(tmp2) [1] -1.866768 > colMedians(tmp2) [1] 0.1945308 > colRanges(tmp2) [,1] [1,] -1.866768 [2,] 2.450347 > > 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] 0.5969678 4.2679312 1.5415166 -1.4234355 -0.9823578 -1.6439577 [7] 0.6406648 3.5124228 -0.2970569 2.3726823 > colApply(tmp,quantile)[,1] [,1] [1,] -0.84581229 [2,] -0.25368536 [3,] -0.01383832 [4,] 0.50765470 [5,] 1.10318958 > > rowApply(tmp,sum) [1] 3.8035651 0.9759469 -0.2864726 1.2398446 -0.4945157 -0.9857433 [7] -2.2934343 5.6872934 1.5346570 -0.5957634 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 6 7 6 8 7 4 2 3 8 2 [2,] 2 6 10 3 9 2 3 10 9 7 [3,] 8 3 4 2 3 1 1 9 10 10 [4,] 10 9 3 1 1 7 9 1 6 1 [5,] 3 1 8 4 10 8 5 4 2 6 [6,] 9 2 1 7 2 5 4 7 4 8 [7,] 7 5 7 10 4 9 6 5 1 5 [8,] 4 10 9 5 6 6 7 6 3 9 [9,] 1 8 2 9 5 3 8 8 5 3 [10,] 5 4 5 6 8 10 10 2 7 4 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 4.6619128 -0.2512930 -0.8198142 2.3566960 0.7648318 0.6684592 [7] 3.1594696 1.7474972 -2.8918089 -3.0376690 1.8300424 0.6250142 [13] 3.5883570 3.0137645 0.1897458 -1.6675294 3.0227171 -5.3632118 [19] -2.5988254 -1.0856521 > colApply(tmp,quantile)[,1] [,1] [1,] -0.1768276 [2,] 0.3036572 [3,] 0.6935975 [4,] 1.5921644 [5,] 2.2493212 > > rowApply(tmp,sum) [1] -0.1281713 2.8347895 2.7513946 1.4292237 1.0254671 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 9 19 16 13 19 [2,] 11 13 14 9 2 [3,] 18 5 15 4 3 [4,] 20 2 20 8 17 [5,] 15 11 4 10 18 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.1768276 -0.04193265 0.8445954 1.3575839 0.29102692 0.21406968 [2,] 1.5921644 0.62625186 -0.5298090 -1.3906302 0.15850801 -0.12944314 [3,] 0.6935975 0.32243017 0.4543977 1.8158865 -0.64057878 -0.18133276 [4,] 0.3036572 -0.10864128 -0.6475840 -0.1900819 -0.08123671 0.85055160 [5,] 2.2493212 -1.04940114 -0.9414143 0.7639377 1.03711241 -0.08538621 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.1968345 -0.25134050 0.16488527 -0.47802285 -0.17455776 0.93752915 [2,] 0.6610162 1.28654578 -0.31330621 -0.95065977 0.63072482 -1.03065322 [3,] 1.5980657 -0.05137048 -2.04146819 -0.84915400 -0.05546349 -0.06381556 [4,] 1.2392307 1.66861429 -0.60233886 -0.02141258 1.03899614 0.64365241 [5,] -0.1420085 -0.90495193 -0.09958088 -0.73841981 0.39034274 0.13830140 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.8241125 0.10410014 -0.3524560 -0.9104319 0.7349482 -1.3346269 [2,] 2.5559657 0.84083524 0.4851836 0.1307413 -0.3432221 -2.2033292 [3,] 1.4664575 0.05539929 -0.7405736 0.9795138 0.1216425 -0.1490711 [4,] -1.0942544 -0.38713111 0.5750794 -0.1976440 1.7971391 -1.3869615 [5,] -0.1639244 2.40056093 0.2225124 -1.6697086 0.7122093 -0.2892231 [,19] [,20] [1,] -0.45449702 -1.22949491 [2,] 0.02297035 0.73493512 [3,] 0.30834620 -0.29151432 [4,] -1.90205418 -0.06835673 [5,] -0.57359076 -0.23122123 > > > 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 : 649 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 : 561 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.2438716 -0.2616727 -0.8618555 0.2435025 0.2157163 0.284979 -1.280003 col8 col9 col10 col11 col12 col13 col14 row1 1.942537 -1.359627 -0.7512242 0.6425073 0.003847278 0.24485 1.453654 col15 col16 col17 col18 col19 col20 row1 0.2035847 1.338182 -0.06543876 0.5582957 0.550951 0.1016754 > tmp[,"col10"] col10 row1 -0.7512242 row2 1.8001421 row3 1.0725771 row4 0.3201573 row5 0.5551383 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 0.2438716 -0.2616727 -0.8618555 0.2435025 0.2157163 0.2849790 -1.280003 row5 0.9416274 0.3312344 1.4167696 -0.9982411 -0.6323498 -0.1579132 -1.617169 col8 col9 col10 col11 col12 col13 col14 row1 1.9425365 -1.3596273 -0.7512242 0.6425073 0.003847278 0.24485 1.453654 row5 0.9034609 -0.9001107 0.5551383 0.7689281 0.281740798 1.43571 -1.254141 col15 col16 col17 col18 col19 col20 row1 0.2035847 1.3381818 -0.06543876 0.5582957 0.55095104 0.1016754 row5 -0.5753589 -0.4721207 -0.28351116 -0.2620022 0.01642504 -1.2403851 > tmp[,c("col6","col20")] col6 col20 row1 0.2849790 0.1016754 row2 1.1573949 -0.0736135 row3 1.0102531 1.2153548 row4 0.6394462 1.6638002 row5 -0.1579132 -1.2403851 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.2849790 0.1016754 row5 -0.1579132 -1.2403851 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.54091 48.36774 49.72129 49.77214 49.75781 105.0967 52.98141 48.63924 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.16118 49.05265 49.70137 48.85176 49.75269 50.63044 51.60819 49.08391 col17 col18 col19 col20 row1 49.22359 48.84419 49.85126 104.3182 > tmp[,"col10"] col10 row1 49.05265 row2 31.37946 row3 32.20147 row4 30.57632 row5 50.23562 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.54091 48.36774 49.72129 49.77214 49.75781 105.0967 52.98141 48.63924 row5 50.26481 49.90798 49.32827 49.80262 48.97388 105.5545 51.48320 50.13761 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.16118 49.05265 49.70137 48.85176 49.75269 50.63044 51.60819 49.08391 row5 49.88019 50.23562 49.50647 50.50549 51.61236 50.71053 49.46533 49.32042 col17 col18 col19 col20 row1 49.22359 48.84419 49.85126 104.3182 row5 51.03858 51.22077 50.63699 105.9373 > tmp[,c("col6","col20")] col6 col20 row1 105.09668 104.31821 row2 73.61313 74.32648 row3 75.13724 76.40153 row4 75.49413 73.92523 row5 105.55451 105.93726 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.0967 104.3182 row5 105.5545 105.9373 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.0967 104.3182 row5 105.5545 105.9373 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.4979770 [2,] 1.3073606 [3,] -0.8077622 [4,] 0.7358274 [5,] -0.7830635 > tmp[,c("col17","col7")] col17 col7 [1,] 0.5270296 -0.2468913 [2,] -1.0498989 0.6102564 [3,] 1.0374004 1.0126861 [4,] 1.5203266 0.7475946 [5,] 1.3880347 -0.3926125 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.2217470 0.4265853 [2,] 0.3127395 -0.5501151 [3,] -0.6897855 0.1848380 [4,] -0.5453115 0.3700171 [5,] -0.1827950 -2.1913566 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.221747 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.2217470 [2,] 0.3127395 > > > > 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.5038821 2.213476 0.7121362 -1.9324287 -0.1115199 1.1257018 0.8031954 row1 -0.3177650 -1.931373 0.5311856 -0.8749914 -1.5054876 -0.1656834 -0.8311495 [,8] [,9] [,10] [,11] [,12] [,13] row3 0.2090321 0.02018237 -0.29024482 -1.1674378 -1.0424023 0.2131182 row1 0.5665731 0.47492388 0.06948056 -0.3431352 -0.3688902 -2.6210067 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 0.3702002 -0.1631587 0.1389776 -1.5262401 0.7542753 1.9937081 -0.5510293 row1 -0.1737031 -0.7305202 0.8019446 0.4612729 2.0475432 -0.8216322 -0.7671867 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.589799 0.04755919 -0.93562 0.7622401 -1.460703 -0.5649831 -0.9494601 [,8] [,9] [,10] row2 0.5016744 -0.8648092 -0.9925274 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.7674938 -1.162862 1.184241 -0.4949204 0.4878665 1.60563 0.1796461 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.8368265 -1.366109 -0.1070639 1.580461 -0.2772147 -0.4182437 0.2811046 [,15] [,16] [,17] [,18] [,19] [,20] row5 -2.169249 0.5535522 -1.069624 -1.824212 -0.361977 -0.4734154 > > > 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: 0x60abdcd4e4a0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c2f3225a8" [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c518634dd" [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c86e2ec8" [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c281d5870" [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c370e8568" [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c2140702e" [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c61571507" [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c6d063196" [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c6e6269cd" [10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c2590abe8" [11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c1930ebb7" [12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c5afc2782" [13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c6275998a" [14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c690ee5a5" [15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3656c2c095c55" > > > ### 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: 0x60abdc830240> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x60abdc830240> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x60abdc830240> > rowMedians(tmp) [1] -0.392167470 0.355432227 -0.267743998 -0.597977296 0.076300930 [6] 0.177858289 0.265531354 -0.020097774 0.036840742 0.310141014 [11] 0.373543766 -0.063752900 0.021287339 -0.327157179 0.672259228 [16] 0.350868631 -0.555847544 0.232563649 -0.057176681 -0.122829798 [21] -0.533696301 0.342606882 0.079940883 0.090069572 0.543712889 [26] 0.672800441 0.291232595 -0.203712594 0.526764351 -0.043282342 [31] 0.303703393 -0.298131203 -0.203863499 0.225733371 0.120109595 [36] 0.155711684 -0.064952952 -0.231926189 0.135748887 -0.319146605 [41] -0.515871738 0.421551154 -0.855985316 -0.241169621 -0.011207880 [46] 0.064211382 0.321107600 0.149706533 0.430736325 -0.021083490 [51] -0.272012096 0.320306900 -0.568777914 0.456464127 0.322186147 [56] 0.332348862 -0.075561420 0.073431290 -0.139134995 0.338233045 [61] -0.441021245 0.102120575 0.381898178 -0.054772329 0.159427447 [66] 0.426702196 -0.442639084 0.375810354 -0.246784784 0.239549980 [71] -0.082049271 0.277141660 0.274825372 0.338356066 0.500411376 [76] -0.181951652 -0.464188425 -0.120567568 -0.435826194 0.016351556 [81] -0.105987855 0.153621446 -0.492213663 0.079382499 -0.393876833 [86] -0.189469005 -0.055459777 -0.823359279 -0.244645394 0.113913562 [91] -0.055302355 0.184432042 -0.393668229 -0.305339371 -0.127422110 [96] 0.009409671 0.228608914 0.567861577 0.119480671 -0.373968304 [101] -0.032452449 0.249317260 -0.140726249 -0.338915708 -0.272436606 [106] -0.080660219 0.111494426 0.409619685 -0.016259051 0.115503414 [111] 0.003037625 0.751901420 0.208151609 0.157318717 -0.468248793 [116] -0.004146023 0.251682755 0.288946074 -0.037388023 -0.425722943 [121] -0.137203781 0.290207189 0.181506411 0.270191821 0.058454830 [126] 0.119092434 -0.231261321 0.041183547 0.351890815 -0.154333253 [131] -0.254402524 -0.055099197 0.303197470 -0.437829989 0.144318828 [136] 0.153260381 0.294773737 -0.159730868 0.185369399 0.085927188 [141] -0.076206082 0.255593715 -0.419007740 0.293990230 -0.552109729 [146] 0.060677375 0.283166852 -0.535145402 0.258867045 -0.216104670 [151] -0.175308532 0.462331303 -0.251414502 0.265690666 0.253578472 [156] -0.025508767 0.231462266 -0.061918497 0.172271305 0.300381662 [161] 0.045892006 0.062950652 0.344291613 0.379542033 0.170879965 [166] 0.865903535 -0.141943480 -0.040282543 -0.032856864 -0.475398323 [171] -0.114698541 0.293970144 0.081757090 0.424160076 0.013072993 [176] -0.066270541 0.219183698 -0.504531915 0.052521677 -0.358910494 [181] 0.015309318 -0.368558920 -0.249367028 -0.254034013 0.329228978 [186] 0.026311389 -0.488105499 -0.270644352 -0.022340681 -0.326828184 [191] -0.228294908 0.056231275 -0.007067931 -0.244850863 -0.577414377 [196] -0.282336316 0.447014905 0.146130662 -0.417188326 -0.105520713 [201] 0.386285680 0.125414204 0.583640426 -0.088469461 0.044209832 [206] -0.537718097 0.016126866 0.116374782 -0.020661607 -0.087875054 [211] 0.101838479 0.423722198 -0.626514676 -0.021330896 0.282325900 [216] 0.048280886 -0.514910132 0.252203628 -0.001465599 -0.196319852 [221] 0.316732026 0.071719526 -0.058769237 -0.464607078 0.238224375 [226] -0.288420209 -0.103189788 0.640680395 0.063096504 0.363344355 > > proc.time() user system elapsed 1.565 0.836 2.425
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: 0x64b91933bc80> > .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: 0x64b91933bc80> > .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: 0x64b91933bc80> > .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: 0x64b91933bc80> > 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: 0x64b918fd2a00> > .Call("R_bm_AddColumn",P) <pointer: 0x64b918fd2a00> > .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: 0x64b918fd2a00> > .Call("R_bm_AddColumn",P) <pointer: 0x64b918fd2a00> > .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: 0x64b918fd2a00> > 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: 0x64b91909d660> > .Call("R_bm_AddColumn",P) <pointer: 0x64b91909d660> > .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: 0x64b91909d660> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x64b91909d660> > .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: 0x64b91909d660> > > .Call("R_bm_RowMode",P) <pointer: 0x64b91909d660> > .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: 0x64b91909d660> > > .Call("R_bm_ColMode",P) <pointer: 0x64b91909d660> > .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: 0x64b91909d660> > 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: 0x64b9195bf3d0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x64b9195bf3d0> > .Call("R_bm_AddColumn",P) <pointer: 0x64b9195bf3d0> > .Call("R_bm_AddColumn",P) <pointer: 0x64b9195bf3d0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile366e9399d2d31" "BufferedMatrixFile366e970da1d64" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile366e9399d2d31" "BufferedMatrixFile366e970da1d64" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x64b91b71c460> > .Call("R_bm_AddColumn",P) <pointer: 0x64b91b71c460> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x64b91b71c460> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x64b91b71c460> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x64b91b71c460> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x64b91b71c460> > .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: 0x64b91ad53e60> > .Call("R_bm_AddColumn",P) <pointer: 0x64b91ad53e60> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x64b91ad53e60> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x64b91ad53e60> > 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: 0x64b919bc6710> > .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: 0x64b919bc6710> > rm(P) > > proc.time() user system elapsed 0.380 0.054 0.486
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.326 0.054 0.416