Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-07-30 12:05 -0400 (Wed, 30 Jul 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.2 LTS) | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4796 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.5.1 (2025-06-13 ucrt) -- "Great Square Root" | 4535 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4578 |
kjohnson3 | macOS 13.7.1 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4519 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4516 |
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 251/2313 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.73.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.2 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino8 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.1 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-07-29 20:38:23 -0400 (Tue, 29 Jul 2025) |
EndedAt: 2025-07-29 20:38:47 -0400 (Tue, 29 Jul 2025) |
EllapsedTime: 24.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 (2025-06-13) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 * running under: Ubuntu 24.04.2 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 (2025-06-13) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.229 0.054 0.272
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.1 (2025-06-13) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/home/biocbuild/bbs-3.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 478417 25.6 1047105 56 639600 34.2 Vcells 885231 6.8 8388608 64 2081598 15.9 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Tue Jul 29 20:38:38 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] "Tue Jul 29 20:38:38 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: 0x5ab6925bc9d0> > > > > 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] "Tue Jul 29 20:38:39 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] "Tue Jul 29 20:38:39 2025" > > ColMode(tmp2) <pointer: 0x5ab6925bc9d0> > > > > ### 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.78571835 0.08448274 1.7897933 0.3351186 [2,] 0.06273263 1.01832741 -0.6581815 1.3831411 [3,] -0.07954624 0.03431799 1.4954843 -0.9209374 [4,] 0.25905978 -1.66546647 1.2192075 0.4405318 > 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.78571835 0.08448274 1.7897933 0.3351186 [2,] 0.06273263 1.01832741 0.6581815 1.3831411 [3,] 0.07954624 0.03431799 1.4954843 0.9209374 [4,] 0.25905978 1.66546647 1.2192075 0.4405318 > 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.9892802 0.2906591 1.3378316 0.5788943 [2,] 0.2504648 1.0091221 0.8112839 1.1760702 [3,] 0.2820394 0.1852511 1.2229000 0.9596549 [4,] 0.5089792 1.2905295 1.1041773 0.6637257 > > 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.67852 27.99107 40.16811 31.12406 [2,] 27.56738 36.10955 33.77102 38.14384 [3,] 27.89994 26.88683 38.72448 35.51749 [4,] 30.34885 39.57076 37.26098 32.07779 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x5ab69437ed10> > exp(tmp5) <pointer: 0x5ab69437ed10> > log(tmp5,2) <pointer: 0x5ab69437ed10> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 467.6389 > Min(tmp5) [1] 52.88714 > mean(tmp5) [1] 72.63779 > Sum(tmp5) [1] 14527.56 > Var(tmp5) [1] 865.8441 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 89.51789 70.97789 72.70916 70.59327 70.24987 69.31736 71.72693 68.88886 [9] 70.54544 71.85122 > rowSums(tmp5) [1] 1790.358 1419.558 1454.183 1411.865 1404.997 1386.347 1434.539 1377.777 [9] 1410.909 1437.024 > rowVars(tmp5) [1] 7999.67215 81.30861 139.00893 80.15605 78.62662 45.28476 [7] 89.73452 67.11875 68.67987 73.21212 > rowSd(tmp5) [1] 89.440886 9.017129 11.790205 8.952991 8.867165 6.729395 9.472831 [8] 8.192603 8.287332 8.556408 > rowMax(tmp5) [1] 467.63890 88.37737 91.17309 89.47244 87.60067 77.62284 89.97039 [8] 87.28320 89.26472 86.57927 > rowMin(tmp5) [1] 58.25975 57.37789 54.68527 55.81340 53.39465 56.79065 59.03931 55.73030 [9] 57.88353 52.88714 > > colMeans(tmp5) [1] 107.44740 65.61947 73.96045 73.03435 67.59878 69.18305 77.82843 [8] 68.84116 70.00498 72.06216 70.03702 67.26520 70.05961 68.44333 [15] 73.32887 71.21138 66.45865 71.26308 73.41321 75.69518 > colSums(tmp5) [1] 1074.4740 656.1947 739.6045 730.3435 675.9878 691.8305 778.2843 [8] 688.4116 700.0498 720.6216 700.3702 672.6520 700.5961 684.4333 [15] 733.2887 712.1138 664.5865 712.6308 734.1321 756.9518 > colVars(tmp5) [1] 16080.44306 109.48882 63.56525 40.12440 31.93968 159.42516 [7] 75.71191 38.44420 84.09776 90.31142 105.65512 55.01298 [13] 78.69760 93.78409 42.63687 103.27424 74.88021 63.69918 [19] 49.05324 80.95060 > colSd(tmp5) [1] 126.808687 10.463691 7.972782 6.334382 5.651520 12.626368 [7] 8.701259 6.200338 9.170483 9.503232 10.278868 7.417073 [13] 8.871167 9.684219 6.529691 10.162393 8.653335 7.981177 [19] 7.003801 8.997255 > colMax(tmp5) [1] 467.63890 82.36136 83.60466 83.47137 74.97141 89.97039 91.14190 [8] 78.78749 83.52565 87.59154 91.17309 83.42610 82.52462 89.26472 [15] 82.16700 88.37737 81.41215 82.69705 89.47244 86.57927 > colMin(tmp5) [1] 57.37789 55.73030 57.88353 64.78066 58.23446 54.68527 61.98153 59.48241 [9] 56.60711 59.69021 55.81340 60.10536 53.39465 58.29159 61.65259 58.99368 [17] 52.88714 60.50793 63.19276 56.79065 > > > ### 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] 89.51789 70.97789 72.70916 70.59327 70.24987 69.31736 71.72693 68.88886 [9] NA 71.85122 > rowSums(tmp5) [1] 1790.358 1419.558 1454.183 1411.865 1404.997 1386.347 1434.539 1377.777 [9] NA 1437.024 > rowVars(tmp5) [1] 7999.67215 81.30861 139.00893 80.15605 78.62662 45.28476 [7] 89.73452 67.11875 65.59701 73.21212 > rowSd(tmp5) [1] 89.440886 9.017129 11.790205 8.952991 8.867165 6.729395 9.472831 [8] 8.192603 8.099198 8.556408 > rowMax(tmp5) [1] 467.63890 88.37737 91.17309 89.47244 87.60067 77.62284 89.97039 [8] 87.28320 NA 86.57927 > rowMin(tmp5) [1] 58.25975 57.37789 54.68527 55.81340 53.39465 56.79065 59.03931 55.73030 [9] NA 52.88714 > > colMeans(tmp5) [1] 107.44740 65.61947 73.96045 73.03435 67.59878 69.18305 77.82843 [8] 68.84116 70.00498 72.06216 70.03702 67.26520 70.05961 68.44333 [15] 73.32887 71.21138 NA 71.26308 73.41321 75.69518 > colSums(tmp5) [1] 1074.4740 656.1947 739.6045 730.3435 675.9878 691.8305 778.2843 [8] 688.4116 700.0498 720.6216 700.3702 672.6520 700.5961 684.4333 [15] 733.2887 712.1138 NA 712.6308 734.1321 756.9518 > colVars(tmp5) [1] 16080.44306 109.48882 63.56525 40.12440 31.93968 159.42516 [7] 75.71191 38.44420 84.09776 90.31142 105.65512 55.01298 [13] 78.69760 93.78409 42.63687 103.27424 NA 63.69918 [19] 49.05324 80.95060 > colSd(tmp5) [1] 126.808687 10.463691 7.972782 6.334382 5.651520 12.626368 [7] 8.701259 6.200338 9.170483 9.503232 10.278868 7.417073 [13] 8.871167 9.684219 6.529691 10.162393 NA 7.981177 [19] 7.003801 8.997255 > colMax(tmp5) [1] 467.63890 82.36136 83.60466 83.47137 74.97141 89.97039 91.14190 [8] 78.78749 83.52565 87.59154 91.17309 83.42610 82.52462 89.26472 [15] 82.16700 88.37737 NA 82.69705 89.47244 86.57927 > colMin(tmp5) [1] 57.37789 55.73030 57.88353 64.78066 58.23446 54.68527 61.98153 59.48241 [9] 56.60711 59.69021 55.81340 60.10536 53.39465 58.29159 61.65259 58.99368 [17] NA 60.50793 63.19276 56.79065 > > Max(tmp5,na.rm=TRUE) [1] 467.6389 > Min(tmp5,na.rm=TRUE) [1] 52.88714 > mean(tmp5,na.rm=TRUE) [1] 72.70288 > Sum(tmp5,na.rm=TRUE) [1] 14467.87 > Var(tmp5,na.rm=TRUE) [1] 869.3654 > > rowMeans(tmp5,na.rm=TRUE) [1] 89.51789 70.97789 72.70916 70.59327 70.24987 69.31736 71.72693 68.88886 [9] 71.11707 71.85122 > rowSums(tmp5,na.rm=TRUE) [1] 1790.358 1419.558 1454.183 1411.865 1404.997 1386.347 1434.539 1377.777 [9] 1351.224 1437.024 > rowVars(tmp5,na.rm=TRUE) [1] 7999.67215 81.30861 139.00893 80.15605 78.62662 45.28476 [7] 89.73452 67.11875 65.59701 73.21212 > rowSd(tmp5,na.rm=TRUE) [1] 89.440886 9.017129 11.790205 8.952991 8.867165 6.729395 9.472831 [8] 8.192603 8.099198 8.556408 > rowMax(tmp5,na.rm=TRUE) [1] 467.63890 88.37737 91.17309 89.47244 87.60067 77.62284 89.97039 [8] 87.28320 89.26472 86.57927 > rowMin(tmp5,na.rm=TRUE) [1] 58.25975 57.37789 54.68527 55.81340 53.39465 56.79065 59.03931 55.73030 [9] 57.88353 52.88714 > > colMeans(tmp5,na.rm=TRUE) [1] 107.44740 65.61947 73.96045 73.03435 67.59878 69.18305 77.82843 [8] 68.84116 70.00498 72.06216 70.03702 67.26520 70.05961 68.44333 [15] 73.32887 71.21138 67.21135 71.26308 73.41321 75.69518 > colSums(tmp5,na.rm=TRUE) [1] 1074.4740 656.1947 739.6045 730.3435 675.9878 691.8305 778.2843 [8] 688.4116 700.0498 720.6216 700.3702 672.6520 700.5961 684.4333 [15] 733.2887 712.1138 604.9022 712.6308 734.1321 756.9518 > colVars(tmp5,na.rm=TRUE) [1] 16080.44306 109.48882 63.56525 40.12440 31.93968 159.42516 [7] 75.71191 38.44420 84.09776 90.31142 105.65512 55.01298 [13] 78.69760 93.78409 42.63687 103.27424 77.86649 63.69918 [19] 49.05324 80.95060 > colSd(tmp5,na.rm=TRUE) [1] 126.808687 10.463691 7.972782 6.334382 5.651520 12.626368 [7] 8.701259 6.200338 9.170483 9.503232 10.278868 7.417073 [13] 8.871167 9.684219 6.529691 10.162393 8.824199 7.981177 [19] 7.003801 8.997255 > colMax(tmp5,na.rm=TRUE) [1] 467.63890 82.36136 83.60466 83.47137 74.97141 89.97039 91.14190 [8] 78.78749 83.52565 87.59154 91.17309 83.42610 82.52462 89.26472 [15] 82.16700 88.37737 81.41215 82.69705 89.47244 86.57927 > colMin(tmp5,na.rm=TRUE) [1] 57.37789 55.73030 57.88353 64.78066 58.23446 54.68527 61.98153 59.48241 [9] 56.60711 59.69021 55.81340 60.10536 53.39465 58.29159 61.65259 58.99368 [17] 52.88714 60.50793 63.19276 56.79065 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 89.51789 70.97789 72.70916 70.59327 70.24987 69.31736 71.72693 68.88886 [9] NaN 71.85122 > rowSums(tmp5,na.rm=TRUE) [1] 1790.358 1419.558 1454.183 1411.865 1404.997 1386.347 1434.539 1377.777 [9] 0.000 1437.024 > rowVars(tmp5,na.rm=TRUE) [1] 7999.67215 81.30861 139.00893 80.15605 78.62662 45.28476 [7] 89.73452 67.11875 NA 73.21212 > rowSd(tmp5,na.rm=TRUE) [1] 89.440886 9.017129 11.790205 8.952991 8.867165 6.729395 9.472831 [8] 8.192603 NA 8.556408 > rowMax(tmp5,na.rm=TRUE) [1] 467.63890 88.37737 91.17309 89.47244 87.60067 77.62284 89.97039 [8] 87.28320 NA 86.57927 > rowMin(tmp5,na.rm=TRUE) [1] 58.25975 57.37789 54.68527 55.81340 53.39465 56.79065 59.03931 55.73030 [9] NA 52.88714 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 111.37127 66.15933 75.74677 73.73331 67.16882 69.94032 77.73784 [8] 69.02503 70.69179 71.38681 70.72148 66.66192 69.60180 66.12985 [15] 72.63998 71.18274 NaN 71.97372 73.29294 75.02834 > colSums(tmp5,na.rm=TRUE) [1] 1002.3414 595.4340 681.7209 663.5998 604.5194 629.4628 699.6405 [8] 621.2252 636.2261 642.4813 636.4933 599.9573 626.4162 595.1686 [15] 653.7598 640.6447 0.0000 647.7635 659.6365 675.2551 > colVars(tmp5,na.rm=TRUE) [1] 17917.28470 119.89616 35.61267 39.64377 33.85244 172.90200 [7] 85.08356 42.86938 89.30318 96.46931 113.59159 57.79519 [13] 86.17694 45.29458 42.62761 116.17429 NA 65.98013 [19] 55.02216 86.06693 > colSd(tmp5,na.rm=TRUE) [1] 133.855462 10.949711 5.967635 6.296330 5.818285 13.149221 [7] 9.224075 6.547471 9.450036 9.821879 10.657935 7.602315 [13] 9.283154 6.730125 6.528983 10.778418 NA 8.122815 [19] 7.417692 9.277226 > colMax(tmp5,na.rm=TRUE) [1] 467.63890 82.36136 83.60466 83.47137 74.97141 89.97039 91.14190 [8] 78.78749 83.52565 87.59154 91.17309 83.42610 82.52462 76.44741 [15] 82.16700 88.37737 -Inf 82.69705 89.47244 86.57927 > colMin(tmp5,na.rm=TRUE) [1] 57.37789 55.73030 67.33749 64.78066 58.23446 54.68527 61.98153 59.48241 [9] 56.60711 59.69021 55.81340 60.10536 53.39465 58.29159 61.65259 58.99368 [17] Inf 60.50793 63.19276 56.79065 > > > > > 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] 260.1287 113.7743 249.4391 264.6744 183.8425 308.7765 192.3158 255.0773 [9] 203.9672 211.4827 > apply(copymatrix,1,var,na.rm=TRUE) [1] 260.1287 113.7743 249.4391 264.6744 183.8425 308.7765 192.3158 255.0773 [9] 203.9672 211.4827 > > > > 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.273737e-13 -5.684342e-14 -1.136868e-13 1.989520e-13 1.421085e-13 [6] 0.000000e+00 -1.136868e-13 -2.842171e-14 -1.421085e-14 2.842171e-14 [11] -5.684342e-14 0.000000e+00 1.136868e-13 2.842171e-14 -1.136868e-13 [16] 0.000000e+00 -5.684342e-14 -2.842171e-14 -8.526513e-14 5.684342e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 8 15 7 2 6 17 3 14 7 16 10 11 6 16 8 3 8 2 1 19 9 10 8 15 6 1 5 15 1 15 9 3 9 9 10 4 10 4 9 1 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 2.934473 > Min(tmp) [1] -2.037013 > mean(tmp) [1] 0.04132305 > Sum(tmp) [1] 4.132305 > Var(tmp) [1] 1.083465 > > rowMeans(tmp) [1] 0.04132305 > rowSums(tmp) [1] 4.132305 > rowVars(tmp) [1] 1.083465 > rowSd(tmp) [1] 1.040896 > rowMax(tmp) [1] 2.934473 > rowMin(tmp) [1] -2.037013 > > colMeans(tmp) [1] 0.224458197 -1.523058118 -0.240333112 0.044909482 0.145240582 [6] -1.341229267 -0.933592673 0.971884534 -0.006165626 1.219110777 [11] 0.716175396 -0.547242117 0.331256705 -1.521105623 0.988283107 [16] 1.313051527 0.344178507 -1.979081504 0.347897141 -0.365185348 [21] -0.612521799 0.281370464 -0.039601209 0.312256027 -0.534210503 [26] 0.268144455 -1.022385815 -0.915784112 1.404078232 1.379271505 [31] -0.626243747 0.199336139 2.934472578 -0.503238654 0.246273610 [36] -1.504627080 -1.367062620 0.420501029 0.310730946 0.933001096 [41] 0.347068926 -0.330216773 -0.804516070 1.243605449 -0.931234185 [46] -0.217140723 -0.940110094 -0.405422620 -0.310292951 -0.969768409 [51] 0.570147960 0.982383638 -1.367015545 1.218014354 -1.157711165 [56] 1.651363767 0.760902735 -1.126940638 -0.600228294 1.900922473 [61] -0.358532922 0.763375507 1.407767255 -1.192784517 -1.016656940 [66] 0.229693511 1.818245102 0.293727348 -1.153017254 -0.780823685 [71] 0.199887702 2.600842675 0.905332531 -0.330396651 0.838114555 [76] 0.742845983 1.440722722 0.245469867 -2.037012526 -0.036808630 [81] -1.185987776 -1.214881861 1.710926930 0.804289787 1.589006295 [86] 0.724172605 -1.234777514 1.503781108 0.244843387 0.329198847 [91] 0.011705486 0.461822671 -1.406331511 -0.553267171 0.624109309 [96] 0.096452485 1.249229294 -0.915260933 -0.740757278 -1.812985535 > colSums(tmp) [1] 0.224458197 -1.523058118 -0.240333112 0.044909482 0.145240582 [6] -1.341229267 -0.933592673 0.971884534 -0.006165626 1.219110777 [11] 0.716175396 -0.547242117 0.331256705 -1.521105623 0.988283107 [16] 1.313051527 0.344178507 -1.979081504 0.347897141 -0.365185348 [21] -0.612521799 0.281370464 -0.039601209 0.312256027 -0.534210503 [26] 0.268144455 -1.022385815 -0.915784112 1.404078232 1.379271505 [31] -0.626243747 0.199336139 2.934472578 -0.503238654 0.246273610 [36] -1.504627080 -1.367062620 0.420501029 0.310730946 0.933001096 [41] 0.347068926 -0.330216773 -0.804516070 1.243605449 -0.931234185 [46] -0.217140723 -0.940110094 -0.405422620 -0.310292951 -0.969768409 [51] 0.570147960 0.982383638 -1.367015545 1.218014354 -1.157711165 [56] 1.651363767 0.760902735 -1.126940638 -0.600228294 1.900922473 [61] -0.358532922 0.763375507 1.407767255 -1.192784517 -1.016656940 [66] 0.229693511 1.818245102 0.293727348 -1.153017254 -0.780823685 [71] 0.199887702 2.600842675 0.905332531 -0.330396651 0.838114555 [76] 0.742845983 1.440722722 0.245469867 -2.037012526 -0.036808630 [81] -1.185987776 -1.214881861 1.710926930 0.804289787 1.589006295 [86] 0.724172605 -1.234777514 1.503781108 0.244843387 0.329198847 [91] 0.011705486 0.461822671 -1.406331511 -0.553267171 0.624109309 [96] 0.096452485 1.249229294 -0.915260933 -0.740757278 -1.812985535 > 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.224458197 -1.523058118 -0.240333112 0.044909482 0.145240582 [6] -1.341229267 -0.933592673 0.971884534 -0.006165626 1.219110777 [11] 0.716175396 -0.547242117 0.331256705 -1.521105623 0.988283107 [16] 1.313051527 0.344178507 -1.979081504 0.347897141 -0.365185348 [21] -0.612521799 0.281370464 -0.039601209 0.312256027 -0.534210503 [26] 0.268144455 -1.022385815 -0.915784112 1.404078232 1.379271505 [31] -0.626243747 0.199336139 2.934472578 -0.503238654 0.246273610 [36] -1.504627080 -1.367062620 0.420501029 0.310730946 0.933001096 [41] 0.347068926 -0.330216773 -0.804516070 1.243605449 -0.931234185 [46] -0.217140723 -0.940110094 -0.405422620 -0.310292951 -0.969768409 [51] 0.570147960 0.982383638 -1.367015545 1.218014354 -1.157711165 [56] 1.651363767 0.760902735 -1.126940638 -0.600228294 1.900922473 [61] -0.358532922 0.763375507 1.407767255 -1.192784517 -1.016656940 [66] 0.229693511 1.818245102 0.293727348 -1.153017254 -0.780823685 [71] 0.199887702 2.600842675 0.905332531 -0.330396651 0.838114555 [76] 0.742845983 1.440722722 0.245469867 -2.037012526 -0.036808630 [81] -1.185987776 -1.214881861 1.710926930 0.804289787 1.589006295 [86] 0.724172605 -1.234777514 1.503781108 0.244843387 0.329198847 [91] 0.011705486 0.461822671 -1.406331511 -0.553267171 0.624109309 [96] 0.096452485 1.249229294 -0.915260933 -0.740757278 -1.812985535 > colMin(tmp) [1] 0.224458197 -1.523058118 -0.240333112 0.044909482 0.145240582 [6] -1.341229267 -0.933592673 0.971884534 -0.006165626 1.219110777 [11] 0.716175396 -0.547242117 0.331256705 -1.521105623 0.988283107 [16] 1.313051527 0.344178507 -1.979081504 0.347897141 -0.365185348 [21] -0.612521799 0.281370464 -0.039601209 0.312256027 -0.534210503 [26] 0.268144455 -1.022385815 -0.915784112 1.404078232 1.379271505 [31] -0.626243747 0.199336139 2.934472578 -0.503238654 0.246273610 [36] -1.504627080 -1.367062620 0.420501029 0.310730946 0.933001096 [41] 0.347068926 -0.330216773 -0.804516070 1.243605449 -0.931234185 [46] -0.217140723 -0.940110094 -0.405422620 -0.310292951 -0.969768409 [51] 0.570147960 0.982383638 -1.367015545 1.218014354 -1.157711165 [56] 1.651363767 0.760902735 -1.126940638 -0.600228294 1.900922473 [61] -0.358532922 0.763375507 1.407767255 -1.192784517 -1.016656940 [66] 0.229693511 1.818245102 0.293727348 -1.153017254 -0.780823685 [71] 0.199887702 2.600842675 0.905332531 -0.330396651 0.838114555 [76] 0.742845983 1.440722722 0.245469867 -2.037012526 -0.036808630 [81] -1.185987776 -1.214881861 1.710926930 0.804289787 1.589006295 [86] 0.724172605 -1.234777514 1.503781108 0.244843387 0.329198847 [91] 0.011705486 0.461822671 -1.406331511 -0.553267171 0.624109309 [96] 0.096452485 1.249229294 -0.915260933 -0.740757278 -1.812985535 > colMedians(tmp) [1] 0.224458197 -1.523058118 -0.240333112 0.044909482 0.145240582 [6] -1.341229267 -0.933592673 0.971884534 -0.006165626 1.219110777 [11] 0.716175396 -0.547242117 0.331256705 -1.521105623 0.988283107 [16] 1.313051527 0.344178507 -1.979081504 0.347897141 -0.365185348 [21] -0.612521799 0.281370464 -0.039601209 0.312256027 -0.534210503 [26] 0.268144455 -1.022385815 -0.915784112 1.404078232 1.379271505 [31] -0.626243747 0.199336139 2.934472578 -0.503238654 0.246273610 [36] -1.504627080 -1.367062620 0.420501029 0.310730946 0.933001096 [41] 0.347068926 -0.330216773 -0.804516070 1.243605449 -0.931234185 [46] -0.217140723 -0.940110094 -0.405422620 -0.310292951 -0.969768409 [51] 0.570147960 0.982383638 -1.367015545 1.218014354 -1.157711165 [56] 1.651363767 0.760902735 -1.126940638 -0.600228294 1.900922473 [61] -0.358532922 0.763375507 1.407767255 -1.192784517 -1.016656940 [66] 0.229693511 1.818245102 0.293727348 -1.153017254 -0.780823685 [71] 0.199887702 2.600842675 0.905332531 -0.330396651 0.838114555 [76] 0.742845983 1.440722722 0.245469867 -2.037012526 -0.036808630 [81] -1.185987776 -1.214881861 1.710926930 0.804289787 1.589006295 [86] 0.724172605 -1.234777514 1.503781108 0.244843387 0.329198847 [91] 0.011705486 0.461822671 -1.406331511 -0.553267171 0.624109309 [96] 0.096452485 1.249229294 -0.915260933 -0.740757278 -1.812985535 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.2244582 -1.523058 -0.2403331 0.04490948 0.1452406 -1.341229 -0.9335927 [2,] 0.2244582 -1.523058 -0.2403331 0.04490948 0.1452406 -1.341229 -0.9335927 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.9718845 -0.006165626 1.219111 0.7161754 -0.5472421 0.3312567 -1.521106 [2,] 0.9718845 -0.006165626 1.219111 0.7161754 -0.5472421 0.3312567 -1.521106 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.9882831 1.313052 0.3441785 -1.979082 0.3478971 -0.3651853 -0.6125218 [2,] 0.9882831 1.313052 0.3441785 -1.979082 0.3478971 -0.3651853 -0.6125218 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.2813705 -0.03960121 0.312256 -0.5342105 0.2681445 -1.022386 -0.9157841 [2,] 0.2813705 -0.03960121 0.312256 -0.5342105 0.2681445 -1.022386 -0.9157841 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 1.404078 1.379272 -0.6262437 0.1993361 2.934473 -0.5032387 0.2462736 [2,] 1.404078 1.379272 -0.6262437 0.1993361 2.934473 -0.5032387 0.2462736 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.504627 -1.367063 0.420501 0.3107309 0.9330011 0.3470689 -0.3302168 [2,] -1.504627 -1.367063 0.420501 0.3107309 0.9330011 0.3470689 -0.3302168 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.8045161 1.243605 -0.9312342 -0.2171407 -0.9401101 -0.4054226 -0.310293 [2,] -0.8045161 1.243605 -0.9312342 -0.2171407 -0.9401101 -0.4054226 -0.310293 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -0.9697684 0.570148 0.9823836 -1.367016 1.218014 -1.157711 1.651364 [2,] -0.9697684 0.570148 0.9823836 -1.367016 1.218014 -1.157711 1.651364 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.7609027 -1.126941 -0.6002283 1.900922 -0.3585329 0.7633755 1.407767 [2,] 0.7609027 -1.126941 -0.6002283 1.900922 -0.3585329 0.7633755 1.407767 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -1.192785 -1.016657 0.2296935 1.818245 0.2937273 -1.153017 -0.7808237 [2,] -1.192785 -1.016657 0.2296935 1.818245 0.2937273 -1.153017 -0.7808237 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.1998877 2.600843 0.9053325 -0.3303967 0.8381146 0.742846 1.440723 [2,] 0.1998877 2.600843 0.9053325 -0.3303967 0.8381146 0.742846 1.440723 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.2454699 -2.037013 -0.03680863 -1.185988 -1.214882 1.710927 0.8042898 [2,] 0.2454699 -2.037013 -0.03680863 -1.185988 -1.214882 1.710927 0.8042898 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 1.589006 0.7241726 -1.234778 1.503781 0.2448434 0.3291988 0.01170549 [2,] 1.589006 0.7241726 -1.234778 1.503781 0.2448434 0.3291988 0.01170549 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.4618227 -1.406332 -0.5532672 0.6241093 0.09645248 1.249229 -0.9152609 [2,] 0.4618227 -1.406332 -0.5532672 0.6241093 0.09645248 1.249229 -0.9152609 [,99] [,100] [1,] -0.7407573 -1.812986 [2,] -0.7407573 -1.812986 > > > Max(tmp2) [1] 3.049003 > Min(tmp2) [1] -2.169115 > mean(tmp2) [1] 0.0189824 > Sum(tmp2) [1] 1.89824 > Var(tmp2) [1] 0.8496517 > > rowMeans(tmp2) [1] 0.268980799 -0.738389410 -0.192519149 0.745387625 0.887615546 [6] -1.964711848 0.581437778 0.227034449 -0.527691575 0.586709923 [11] 0.338050884 -0.673385398 0.853298209 -0.492331475 -0.008167635 [16] 1.022193121 -0.204202436 0.215171581 1.024131225 0.712823784 [21] -1.138286290 1.003109629 -0.421201113 0.232716302 0.029427308 [26] -2.169114741 -0.729256888 0.495514233 0.291013073 1.232589080 [31] 1.055054179 -1.437097961 1.552581621 -0.833749157 -0.597911670 [36] -0.479178416 0.687910593 -0.010592273 1.100055419 0.445512021 [41] -1.049957296 -0.735282671 0.317582572 -0.427608083 -0.215098581 [46] 0.130828973 0.039099772 -0.576555758 3.049003086 0.787259676 [51] 0.524783431 -0.364408308 0.694283811 -0.876273418 -0.665631217 [56] 0.889967465 0.893765553 0.859599519 -0.424711601 1.812650690 [61] -1.646953255 -0.806077349 -0.700740289 -0.039242998 -0.030158990 [66] 0.011796921 1.120123459 -1.274871830 -0.104281605 0.854922122 [71] 0.094170538 -0.279970660 0.032500442 -2.084969306 -0.953556110 [76] 1.002619829 1.525181682 -0.896421187 -0.217647472 1.102282963 [81] -1.183162080 0.808205471 1.092435001 0.250796934 -0.718971381 [86] 0.574757533 -0.579448184 -0.240276801 1.102741491 -0.722537678 [91] -0.072211769 -1.304066132 -0.619282329 1.498772494 -0.225235147 [96] -0.126731240 -1.248641328 1.224249526 -0.402844172 -1.552845825 > rowSums(tmp2) [1] 0.268980799 -0.738389410 -0.192519149 0.745387625 0.887615546 [6] -1.964711848 0.581437778 0.227034449 -0.527691575 0.586709923 [11] 0.338050884 -0.673385398 0.853298209 -0.492331475 -0.008167635 [16] 1.022193121 -0.204202436 0.215171581 1.024131225 0.712823784 [21] -1.138286290 1.003109629 -0.421201113 0.232716302 0.029427308 [26] -2.169114741 -0.729256888 0.495514233 0.291013073 1.232589080 [31] 1.055054179 -1.437097961 1.552581621 -0.833749157 -0.597911670 [36] -0.479178416 0.687910593 -0.010592273 1.100055419 0.445512021 [41] -1.049957296 -0.735282671 0.317582572 -0.427608083 -0.215098581 [46] 0.130828973 0.039099772 -0.576555758 3.049003086 0.787259676 [51] 0.524783431 -0.364408308 0.694283811 -0.876273418 -0.665631217 [56] 0.889967465 0.893765553 0.859599519 -0.424711601 1.812650690 [61] -1.646953255 -0.806077349 -0.700740289 -0.039242998 -0.030158990 [66] 0.011796921 1.120123459 -1.274871830 -0.104281605 0.854922122 [71] 0.094170538 -0.279970660 0.032500442 -2.084969306 -0.953556110 [76] 1.002619829 1.525181682 -0.896421187 -0.217647472 1.102282963 [81] -1.183162080 0.808205471 1.092435001 0.250796934 -0.718971381 [86] 0.574757533 -0.579448184 -0.240276801 1.102741491 -0.722537678 [91] -0.072211769 -1.304066132 -0.619282329 1.498772494 -0.225235147 [96] -0.126731240 -1.248641328 1.224249526 -0.402844172 -1.552845825 > 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.268980799 -0.738389410 -0.192519149 0.745387625 0.887615546 [6] -1.964711848 0.581437778 0.227034449 -0.527691575 0.586709923 [11] 0.338050884 -0.673385398 0.853298209 -0.492331475 -0.008167635 [16] 1.022193121 -0.204202436 0.215171581 1.024131225 0.712823784 [21] -1.138286290 1.003109629 -0.421201113 0.232716302 0.029427308 [26] -2.169114741 -0.729256888 0.495514233 0.291013073 1.232589080 [31] 1.055054179 -1.437097961 1.552581621 -0.833749157 -0.597911670 [36] -0.479178416 0.687910593 -0.010592273 1.100055419 0.445512021 [41] -1.049957296 -0.735282671 0.317582572 -0.427608083 -0.215098581 [46] 0.130828973 0.039099772 -0.576555758 3.049003086 0.787259676 [51] 0.524783431 -0.364408308 0.694283811 -0.876273418 -0.665631217 [56] 0.889967465 0.893765553 0.859599519 -0.424711601 1.812650690 [61] -1.646953255 -0.806077349 -0.700740289 -0.039242998 -0.030158990 [66] 0.011796921 1.120123459 -1.274871830 -0.104281605 0.854922122 [71] 0.094170538 -0.279970660 0.032500442 -2.084969306 -0.953556110 [76] 1.002619829 1.525181682 -0.896421187 -0.217647472 1.102282963 [81] -1.183162080 0.808205471 1.092435001 0.250796934 -0.718971381 [86] 0.574757533 -0.579448184 -0.240276801 1.102741491 -0.722537678 [91] -0.072211769 -1.304066132 -0.619282329 1.498772494 -0.225235147 [96] -0.126731240 -1.248641328 1.224249526 -0.402844172 -1.552845825 > rowMin(tmp2) [1] 0.268980799 -0.738389410 -0.192519149 0.745387625 0.887615546 [6] -1.964711848 0.581437778 0.227034449 -0.527691575 0.586709923 [11] 0.338050884 -0.673385398 0.853298209 -0.492331475 -0.008167635 [16] 1.022193121 -0.204202436 0.215171581 1.024131225 0.712823784 [21] -1.138286290 1.003109629 -0.421201113 0.232716302 0.029427308 [26] -2.169114741 -0.729256888 0.495514233 0.291013073 1.232589080 [31] 1.055054179 -1.437097961 1.552581621 -0.833749157 -0.597911670 [36] -0.479178416 0.687910593 -0.010592273 1.100055419 0.445512021 [41] -1.049957296 -0.735282671 0.317582572 -0.427608083 -0.215098581 [46] 0.130828973 0.039099772 -0.576555758 3.049003086 0.787259676 [51] 0.524783431 -0.364408308 0.694283811 -0.876273418 -0.665631217 [56] 0.889967465 0.893765553 0.859599519 -0.424711601 1.812650690 [61] -1.646953255 -0.806077349 -0.700740289 -0.039242998 -0.030158990 [66] 0.011796921 1.120123459 -1.274871830 -0.104281605 0.854922122 [71] 0.094170538 -0.279970660 0.032500442 -2.084969306 -0.953556110 [76] 1.002619829 1.525181682 -0.896421187 -0.217647472 1.102282963 [81] -1.183162080 0.808205471 1.092435001 0.250796934 -0.718971381 [86] 0.574757533 -0.579448184 -0.240276801 1.102741491 -0.722537678 [91] -0.072211769 -1.304066132 -0.619282329 1.498772494 -0.225235147 [96] -0.126731240 -1.248641328 1.224249526 -0.402844172 -1.552845825 > > colMeans(tmp2) [1] 0.0189824 > colSums(tmp2) [1] 1.89824 > colVars(tmp2) [1] 0.8496517 > colSd(tmp2) [1] 0.9217655 > colMax(tmp2) [1] 3.049003 > colMin(tmp2) [1] -2.169115 > colMedians(tmp2) [1] -0.009379954 > colRanges(tmp2) [,1] [1,] -2.169115 [2,] 3.049003 > > 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] 6.6998052 3.8934094 5.8294905 0.2103883 2.9431833 1.6994512 [7] -3.4329803 -1.2315862 2.3944158 0.4047959 > colApply(tmp,quantile)[,1] [,1] [1,] -0.73525145 [2,] -0.01108984 [3,] 0.57741845 [4,] 1.11823313 [5,] 2.31447126 > > rowApply(tmp,sum) [1] 4.4279759 6.1756262 7.4831436 6.3927290 3.6200199 -0.3328905 [7] -1.8741696 -3.5867585 -0.5031469 -2.3921559 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 3 2 7 10 9 8 4 9 10 8 [2,] 1 5 9 4 8 4 7 10 8 4 [3,] 9 7 6 2 10 9 5 4 6 9 [4,] 10 6 8 9 6 2 8 3 4 1 [5,] 6 10 3 7 2 6 9 5 2 2 [6,] 5 3 5 5 1 3 10 2 9 10 [7,] 8 4 1 1 3 5 3 7 1 3 [8,] 7 9 2 8 7 1 2 1 5 7 [9,] 4 1 10 6 5 10 1 6 7 6 [10,] 2 8 4 3 4 7 6 8 3 5 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -2.6476275 0.7231554 -2.6034533 -0.9626121 -1.7242115 -2.2026005 [7] 4.6228136 -0.4483690 -2.2930186 -4.5743996 0.4951771 -2.7703073 [13] -0.4404087 -0.9941553 -1.6619766 3.2999485 0.7922127 -1.6728397 [19] -1.7689604 1.6341954 > colApply(tmp,quantile)[,1] [,1] [1,] -1.5724393 [2,] -1.5184170 [3,] -0.2154999 [4,] 0.1097259 [5,] 0.5490028 > > rowApply(tmp,sum) [1] -0.9259435 -5.7495390 1.3983395 -2.9942100 -6.9260844 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 11 3 11 1 17 [2,] 14 10 16 14 9 [3,] 3 7 10 2 12 [4,] 18 11 4 13 2 [5,] 9 2 15 6 18 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.2154999 0.234353010 -0.76844497 1.2925260 -0.3512168 -0.03024876 [2,] -1.5724393 0.008761639 -0.59199726 0.0120692 -1.8819801 0.30480289 [3,] 0.1097259 0.557375895 0.02557628 -0.5560992 0.5308855 -0.32369267 [4,] -1.5184170 0.210917135 -1.11440606 0.1887167 -0.6702953 -1.04857647 [5,] 0.5490028 -0.288252325 -0.15418131 -1.8998248 0.6483952 -1.10488551 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.3307324 -0.6354573 -0.7578074 -0.5193069 0.6595765 -1.556416528 [2,] 0.5460435 0.4698624 -2.1539268 -0.6878480 -0.9964630 -0.533890691 [3,] 2.2492244 -0.2217904 0.8003127 -1.0095170 -0.4588108 -0.966182782 [4,] 1.1518170 0.3655211 -0.3444603 -0.8265010 0.1155820 0.281835459 [5,] 0.3449963 -0.4265046 0.1628632 -1.5312267 1.1752924 0.004347226 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.29045731 1.6373104 -0.35290581 0.92728822 0.1335272 -2.21302699 [2,] 0.01449324 0.0777675 0.62851269 1.42084199 0.2902565 0.04270647 [3,] 1.10491441 0.1164115 -0.55454116 0.93933796 -1.3446705 0.40871754 [4,] -0.29029458 -0.9071491 0.09198984 -0.02622960 0.2416808 0.24545909 [5,] -0.97906446 -1.9184956 -1.47503212 0.03870992 1.4714187 -0.15669584 [,19] [,20] [1,] -0.4942741 2.04380549 [2,] -0.3753994 -0.77171236 [3,] -0.5203628 0.51152470 [4,] 0.8136680 0.04493241 [5,] -1.1925920 -0.19435486 > > > 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 : 566 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.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.3436392 -2.250712 -0.2441936 -0.2483293 -0.6836177 -0.2224888 -0.8786473 col8 col9 col10 col11 col12 col13 col14 row1 -0.7145345 1.395042 0.987319 -1.28033 0.5867143 -0.2803904 0.578556 col15 col16 col17 col18 col19 col20 row1 0.9395888 -0.4986411 0.2566841 0.7962227 -2.006577 -0.2887897 > tmp[,"col10"] col10 row1 0.98731900 row2 -0.70058351 row3 -0.14924915 row4 0.08914643 row5 0.21735087 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.3436392 -2.250712 -0.2441936 -0.2483293 -0.6836177 -0.2224888 row5 -2.1841541 -1.261408 -1.7571481 -0.7471422 -1.4390883 -0.3983203 col7 col8 col9 col10 col11 col12 col13 row1 -0.8786473 -0.7145345 1.395042 0.9873190 -1.2803299 0.5867143 -0.2803904 row5 -1.5762216 0.6026354 1.293116 0.2173509 0.6359807 0.3440771 0.4936533 col14 col15 col16 col17 col18 col19 col20 row1 0.5785560 0.9395888 -0.4986411 0.2566841 0.7962227 -2.006577 -0.2887897 row5 0.3935097 -0.4711139 1.0245530 0.1488269 1.7111436 -1.612934 0.6945613 > tmp[,c("col6","col20")] col6 col20 row1 -0.2224888 -0.2887897 row2 -0.5354533 -0.6743779 row3 -2.1582859 1.5704424 row4 -1.0375978 1.2642557 row5 -0.3983203 0.6945613 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.2224888 -0.2887897 row5 -0.3983203 0.6945613 > > > > > 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 52.43139 47.31661 48.21528 49.13687 48.79546 104.7802 50.13019 50.80954 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.30643 50.86586 49.16625 50.50973 50.91857 49.6139 50.51317 48.5371 col17 col18 col19 col20 row1 49.37416 50.04264 48.96561 105.6023 > tmp[,"col10"] col10 row1 50.86586 row2 30.53525 row3 30.65792 row4 31.48717 row5 50.40918 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 52.43139 47.31661 48.21528 49.13687 48.79546 104.7802 50.13019 50.80954 row5 47.89800 49.92180 50.29106 50.27317 50.90514 106.3621 48.85801 46.88451 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.30643 50.86586 49.16625 50.50973 50.91857 49.61390 50.51317 48.53710 row5 50.95989 50.40918 51.20107 50.13392 50.27254 50.40308 49.83742 50.40408 col17 col18 col19 col20 row1 49.37416 50.04264 48.96561 105.6023 row5 49.52782 49.97040 51.43892 104.8682 > tmp[,c("col6","col20")] col6 col20 row1 104.78018 105.60228 row2 73.73772 74.72738 row3 74.87073 75.91932 row4 76.09825 75.69906 row5 106.36208 104.86816 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.7802 105.6023 row5 106.3621 104.8682 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.7802 105.6023 row5 106.3621 104.8682 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 1.0511362 [2,] 0.5504533 [3,] 0.2617504 [4,] -0.2609300 [5,] 1.9010120 > tmp[,c("col17","col7")] col17 col7 [1,] 0.6908142 -1.53756137 [2,] 0.6859602 0.60106784 [3,] -1.0592088 0.98175492 [4,] -0.6909342 0.03671241 [5,] 1.2607632 -0.23438440 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.21999209 0.4710025 [2,] -2.10268110 -0.6226019 [3,] 0.64758468 -0.4756537 [4,] -0.35406031 1.2781863 [5,] -0.04893409 1.4240717 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.2199921 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.2199921 [2,] -2.1026811 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 1.38116110 1.790524 -0.9581495 -0.9529718 -1.3894358 -1.20058465 row1 -0.09281272 -1.125803 0.7947237 0.6671180 0.1498639 -0.06695836 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 0.4226670 1.2717289 -0.5905328 1.6262115 0.3860262 1.593028 0.1059973 row1 -0.4716063 -0.6368686 -0.7750626 0.1397112 1.7193574 -1.383993 0.2133544 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.1982074 -0.2051489 -0.2517613 -1.4527164 1.3810394 -0.435422638 row1 0.1206929 -0.1214676 0.7140172 0.6115029 -0.7673107 -0.006807605 [,20] row3 -1.1567551 row1 -0.9116785 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 1.658668 -1.076378 0.593647 1.291594 -0.2292345 -2.007912 1.278524 [,8] [,9] [,10] row2 0.004385409 -0.5374612 -1.29585 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 1.82515 0.5068676 -0.2395257 -1.409551 -1.88942 0.9857673 1.019796 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.33185 0.1946531 1.036652 0.120079 -0.4073912 0.8069915 -0.8600731 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.207533 0.08903463 -0.5501622 -0.9165705 0.02214551 0.4600834 > > > 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: 0x5ab692c080f0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a87323fae720" [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a8732664dbbbb" [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a8732693318d3" [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a8732473292b6" [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a87323e9140d5" [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a873277270e08" [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a87326777a928" [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a87323dd77978" [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a873257e6e87b" [10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a873226325c11" [11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a8732125fdc22" [12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a8732489fc513" [13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a8732114d4f76" [14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a8732cf4ba06" [15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM3a87326caaf1e1" > > > ### 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: 0x5ab692b966f0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x5ab692b966f0> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x5ab692b966f0> > rowMedians(tmp) [1] 0.727015043 -0.037214255 -0.010665483 -0.282071201 -0.399961409 [6] 0.203860164 0.400041579 0.024160105 -0.054504736 0.352584316 [11] -0.170462905 0.039970510 -0.376510630 0.167062286 0.098050052 [16] -0.037678609 -0.232527937 -0.140461146 -0.305691133 0.311872872 [21] 0.134905588 -0.115075094 0.024829488 -0.414665463 0.076946477 [26] -0.190638371 -0.518689198 0.286872594 0.472615032 0.193606253 [31] 0.294496175 0.015752307 -0.074940234 -0.283851590 -0.088331083 [36] 0.520595500 -0.346289320 0.126214890 -0.039926381 0.080641498 [41] 0.218659956 -0.285650641 0.204951811 -0.958254928 0.476164408 [46] -0.135073070 0.050394362 0.023682273 -0.506051972 0.510772566 [51] 0.153915359 0.144741466 0.018941731 0.112409541 0.447299636 [56] 0.198215216 -0.024960698 0.266099886 -0.633035058 0.036044094 [61] 0.300808529 0.401567278 0.444424535 0.071500065 0.203617480 [66] -0.610930289 -0.074981558 -0.185481971 0.245897524 -0.260521746 [71] 0.123147393 0.030444183 -0.550512223 0.582506596 -0.128335644 [76] 0.417703928 -0.162902505 -0.095160884 0.054291939 -0.068581319 [81] -0.096095743 -0.148319843 -0.376476990 -0.394458780 0.337918430 [86] 0.183083206 0.034188453 0.361633764 0.067605098 -0.218932552 [91] -0.484413858 -0.077446767 -0.176572553 -0.121991387 -0.148647754 [96] 0.059919089 0.247082741 0.061108713 0.341042695 -0.130097665 [101] 0.076419768 -0.580714912 0.268911426 0.166121724 -0.161804490 [106] -0.157435729 0.317217043 0.128631572 0.614594567 -0.272478155 [111] 0.104081011 0.042117633 -0.320520838 -0.101251628 0.287079754 [116] -0.026817460 0.297770368 -0.024750827 -0.091937107 -0.067472137 [121] 0.701434056 0.121130419 -0.421894767 0.078206261 0.144686613 [126] 0.260005448 -0.016588995 -0.149782226 0.149479462 -0.108437608 [131] -0.235496336 0.482680930 0.250675197 0.575389195 0.455370465 [136] 0.749284978 -0.014119111 -0.465120123 0.419630138 -0.070164808 [141] 0.439702776 -0.118332915 -0.289007895 0.312257535 -0.003473214 [146] -0.115825614 0.231330651 0.014512541 0.253594679 -0.269262210 [151] -0.307878835 -0.118489619 -0.167211819 0.326596823 0.179946129 [156] -0.212838917 -0.342696436 0.039296042 0.036150949 0.336858529 [161] -0.221952119 -0.043715292 0.540951852 0.206440192 -0.121472263 [166] -0.114937509 0.001285029 -0.125728196 0.121921866 -0.084651256 [171] -0.377922854 -0.009933631 -0.322772835 0.019525450 0.069985511 [176] 0.244113714 -0.307342549 -0.138308103 -0.215025723 0.309508735 [181] 0.358168353 -0.094142227 0.041681536 -0.504865274 0.091640373 [186] -0.015718207 0.036280955 -0.058815287 -0.002817484 -0.089313988 [191] -1.003848154 -0.287083986 0.213371976 -0.359584002 0.190962793 [196] 0.080654165 -0.428283757 -0.032265752 0.272432138 0.462423506 [201] 0.095513444 0.398825451 -0.033542693 0.191525375 -0.131538700 [206] -0.320911320 0.431909271 -0.025895060 -0.044904179 -0.492424787 [211] 0.336617046 -0.062447705 0.058705747 0.014444669 -0.314361012 [216] -0.054159682 -0.597657479 -0.124305454 0.221724631 0.633282608 [221] -0.523581113 0.275751941 0.281280854 -0.389354132 0.173664485 [226] 0.523584261 -0.026106290 -0.052654728 -0.595189355 -0.131277102 > > proc.time() user system elapsed 1.259 0.654 1.905
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.5.1 (2025-06-13) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x62f7dad259d0> > .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: 0x62f7dad259d0> > .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: 0x62f7dad259d0> > .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: 0x62f7dad259d0> > 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: 0x62f7dabfe460> > .Call("R_bm_AddColumn",P) <pointer: 0x62f7dabfe460> > .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: 0x62f7dabfe460> > .Call("R_bm_AddColumn",P) <pointer: 0x62f7dabfe460> > .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: 0x62f7dabfe460> > 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: 0x62f7dd388ab0> > .Call("R_bm_AddColumn",P) <pointer: 0x62f7dd388ab0> > .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: 0x62f7dd388ab0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x62f7dd388ab0> > .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: 0x62f7dd388ab0> > > .Call("R_bm_RowMode",P) <pointer: 0x62f7dd388ab0> > .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: 0x62f7dd388ab0> > > .Call("R_bm_ColMode",P) <pointer: 0x62f7dd388ab0> > .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: 0x62f7dd388ab0> > 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: 0x62f7dd113070> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x62f7dd113070> > .Call("R_bm_AddColumn",P) <pointer: 0x62f7dd113070> > .Call("R_bm_AddColumn",P) <pointer: 0x62f7dd113070> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3a87ef100e59f2" "BufferedMatrixFile3a87ef33c7609a" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3a87ef100e59f2" "BufferedMatrixFile3a87ef33c7609a" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x62f7dc0c6670> > .Call("R_bm_AddColumn",P) <pointer: 0x62f7dc0c6670> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x62f7dc0c6670> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x62f7dc0c6670> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x62f7dc0c6670> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x62f7dc0c6670> > .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: 0x62f7dbd3fe30> > .Call("R_bm_AddColumn",P) <pointer: 0x62f7dbd3fe30> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x62f7dbd3fe30> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x62f7dbd3fe30> > 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: 0x62f7dc06a080> > .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: 0x62f7dc06a080> > rm(P) > > proc.time() user system elapsed 0.257 0.046 0.290
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.1 (2025-06-13) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.256 0.038 0.283