Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-07-29 12:05 -0400 (Tue, 29 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-28 20:40:35 -0400 (Mon, 28 Jul 2025) |
EndedAt: 2025-07-28 20:41:00 -0400 (Mon, 28 Jul 2025) |
EllapsedTime: 25.0 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.241 0.050 0.280
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] "Mon Jul 28 20:40:51 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] "Mon Jul 28 20:40:51 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: 0x58d93394f9d0> > > > > 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] "Mon Jul 28 20:40:51 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] "Mon Jul 28 20:40:51 2025" > > ColMode(tmp2) <pointer: 0x58d93394f9d0> > > > > ### 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,] 101.4742659 -0.6918349 0.7037391 0.02083284 [2,] 1.3367064 0.5359382 0.9171488 1.64522268 [3,] -0.1863631 1.2919788 -1.1437120 1.12988151 [4,] 0.7567290 1.0310831 -0.3323077 0.41969758 > 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,] 101.4742659 0.6918349 0.7037391 0.02083284 [2,] 1.3367064 0.5359382 0.9171488 1.64522268 [3,] 0.1863631 1.2919788 1.1437120 1.12988151 [4,] 0.7567290 1.0310831 0.3323077 0.41969758 > 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,] 10.0734436 0.8317661 0.8388916 0.1443359 [2,] 1.1561602 0.7320780 0.9576789 1.2826623 [3,] 0.4316979 1.1366525 1.0694447 1.0629588 [4,] 0.8699017 1.0154226 0.5764613 0.6478407 > > 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,] 227.20870 34.00950 34.09266 26.46419 [2,] 37.89831 32.85672 35.49394 39.47185 [3,] 29.50334 37.65850 36.83816 36.75947 [4,] 34.45575 36.18531 31.09692 31.89810 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x58d935711d10> > exp(tmp5) <pointer: 0x58d935711d10> > log(tmp5,2) <pointer: 0x58d935711d10> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 472.9051 > Min(tmp5) [1] 53.45931 > mean(tmp5) [1] 72.56969 > Sum(tmp5) [1] 14513.94 > Var(tmp5) [1] 886.1212 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 89.77708 70.63318 70.13247 69.07326 70.54120 71.42926 71.00950 71.34777 [9] 68.89135 72.86180 > rowSums(tmp5) [1] 1795.542 1412.664 1402.649 1381.465 1410.824 1428.585 1420.190 1426.955 [9] 1377.827 1457.236 > rowVars(tmp5) [1] 8237.44369 44.24235 58.55703 68.14468 91.24650 80.98395 [7] 97.49104 67.11998 71.06936 105.74161 > rowSd(tmp5) [1] 90.760364 6.651493 7.652257 8.254979 9.552303 8.999108 9.873755 [8] 8.192678 8.430265 10.283074 > rowMax(tmp5) [1] 472.90514 82.95848 88.58704 86.88109 89.87776 91.03184 90.13380 [8] 85.09215 81.68955 87.59369 > rowMin(tmp5) [1] 55.08175 58.10820 59.30212 55.77593 53.90065 55.02000 55.29011 58.11924 [9] 54.59990 53.45931 > > colMeans(tmp5) [1] 109.89359 70.24273 69.97644 68.08840 69.97902 67.79372 68.41562 [8] 69.72486 69.26973 69.79108 71.58850 72.15481 71.60089 73.77241 [15] 71.36958 70.88456 75.03246 68.81742 72.90631 70.09164 > colSums(tmp5) [1] 1098.9359 702.4273 699.7644 680.8840 699.7902 677.9372 684.1562 [8] 697.2486 692.6973 697.9108 715.8850 721.5481 716.0089 737.7241 [15] 713.6958 708.8456 750.3246 688.1742 729.0631 700.9164 > colVars(tmp5) [1] 16356.21663 81.45499 45.54122 102.16046 67.23125 82.24703 [7] 76.48189 102.31721 60.55383 31.44876 39.02145 113.63985 [13] 79.14354 52.73816 84.92776 117.32305 112.74543 102.48971 [19] 74.15368 107.98224 > colSd(tmp5) [1] 127.891425 9.025242 6.748424 10.107446 8.199467 9.069015 [7] 8.745393 10.115197 7.781634 5.607920 6.246715 10.660199 [13] 8.896266 7.262104 9.215626 10.831576 10.618165 10.123720 [19] 8.611253 10.391451 > colMax(tmp5) [1] 472.90514 81.68955 77.86166 82.15548 84.29100 82.33512 84.40317 [8] 82.95848 78.75554 81.45385 81.55559 87.59369 87.30775 86.33889 [15] 86.88109 89.87776 88.58704 90.13380 85.09215 89.95090 > colMin(tmp5) [1] 61.13386 54.42753 58.27744 55.08175 57.12855 55.70580 55.98160 53.90065 [9] 59.30212 61.42636 62.11688 57.50775 55.68028 62.78159 53.45931 57.16332 [17] 56.54542 55.02000 59.60677 55.77593 > > > ### 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.77708 70.63318 70.13247 69.07326 NA 71.42926 71.00950 71.34777 [9] 68.89135 72.86180 > rowSums(tmp5) [1] 1795.542 1412.664 1402.649 1381.465 NA 1428.585 1420.190 1426.955 [9] 1377.827 1457.236 > rowVars(tmp5) [1] 8237.44369 44.24235 58.55703 68.14468 74.45011 80.98395 [7] 97.49104 67.11998 71.06936 105.74161 > rowSd(tmp5) [1] 90.760364 6.651493 7.652257 8.254979 8.628448 8.999108 9.873755 [8] 8.192678 8.430265 10.283074 > rowMax(tmp5) [1] 472.90514 82.95848 88.58704 86.88109 NA 91.03184 90.13380 [8] 85.09215 81.68955 87.59369 > rowMin(tmp5) [1] 55.08175 58.10820 59.30212 55.77593 NA 55.02000 55.29011 58.11924 [9] 54.59990 53.45931 > > colMeans(tmp5) [1] 109.89359 70.24273 69.97644 68.08840 69.97902 67.79372 68.41562 [8] 69.72486 69.26973 69.79108 71.58850 72.15481 71.60089 73.77241 [15] 71.36958 NA 75.03246 68.81742 72.90631 70.09164 > colSums(tmp5) [1] 1098.9359 702.4273 699.7644 680.8840 699.7902 677.9372 684.1562 [8] 697.2486 692.6973 697.9108 715.8850 721.5481 716.0089 737.7241 [15] 713.6958 NA 750.3246 688.1742 729.0631 700.9164 > colVars(tmp5) [1] 16356.21663 81.45499 45.54122 102.16046 67.23125 82.24703 [7] 76.48189 102.31721 60.55383 31.44876 39.02145 113.63985 [13] 79.14354 52.73816 84.92776 NA 112.74543 102.48971 [19] 74.15368 107.98224 > colSd(tmp5) [1] 127.891425 9.025242 6.748424 10.107446 8.199467 9.069015 [7] 8.745393 10.115197 7.781634 5.607920 6.246715 10.660199 [13] 8.896266 7.262104 9.215626 NA 10.618165 10.123720 [19] 8.611253 10.391451 > colMax(tmp5) [1] 472.90514 81.68955 77.86166 82.15548 84.29100 82.33512 84.40317 [8] 82.95848 78.75554 81.45385 81.55559 87.59369 87.30775 86.33889 [15] 86.88109 NA 88.58704 90.13380 85.09215 89.95090 > colMin(tmp5) [1] 61.13386 54.42753 58.27744 55.08175 57.12855 55.70580 55.98160 53.90065 [9] 59.30212 61.42636 62.11688 57.50775 55.68028 62.78159 53.45931 NA [17] 56.54542 55.02000 59.60677 55.77593 > > Max(tmp5,na.rm=TRUE) [1] 472.9051 > Min(tmp5,na.rm=TRUE) [1] 53.45931 > mean(tmp5,na.rm=TRUE) [1] 72.48271 > Sum(tmp5,na.rm=TRUE) [1] 14424.06 > Var(tmp5,na.rm=TRUE) [1] 889.0759 > > rowMeans(tmp5,na.rm=TRUE) [1] 89.77708 70.63318 70.13247 69.07326 69.52349 71.42926 71.00950 71.34777 [9] 68.89135 72.86180 > rowSums(tmp5,na.rm=TRUE) [1] 1795.542 1412.664 1402.649 1381.465 1320.946 1428.585 1420.190 1426.955 [9] 1377.827 1457.236 > rowVars(tmp5,na.rm=TRUE) [1] 8237.44369 44.24235 58.55703 68.14468 74.45011 80.98395 [7] 97.49104 67.11998 71.06936 105.74161 > rowSd(tmp5,na.rm=TRUE) [1] 90.760364 6.651493 7.652257 8.254979 8.628448 8.999108 9.873755 [8] 8.192678 8.430265 10.283074 > rowMax(tmp5,na.rm=TRUE) [1] 472.90514 82.95848 88.58704 86.88109 86.58209 91.03184 90.13380 [8] 85.09215 81.68955 87.59369 > rowMin(tmp5,na.rm=TRUE) [1] 55.08175 58.10820 59.30212 55.77593 53.90065 55.02000 55.29011 58.11924 [9] 54.59990 53.45931 > > colMeans(tmp5,na.rm=TRUE) [1] 109.89359 70.24273 69.97644 68.08840 69.97902 67.79372 68.41562 [8] 69.72486 69.26973 69.79108 71.58850 72.15481 71.60089 73.77241 [15] 71.36958 68.77421 75.03246 68.81742 72.90631 70.09164 > colSums(tmp5,na.rm=TRUE) [1] 1098.9359 702.4273 699.7644 680.8840 699.7902 677.9372 684.1562 [8] 697.2486 692.6973 697.9108 715.8850 721.5481 716.0089 737.7241 [15] 713.6958 618.9679 750.3246 688.1742 729.0631 700.9164 > colVars(tmp5,na.rm=TRUE) [1] 16356.21663 81.45499 45.54122 102.16046 67.23125 82.24703 [7] 76.48189 102.31721 60.55383 31.44876 39.02145 113.63985 [13] 79.14354 52.73816 84.92776 81.88546 112.74543 102.48971 [19] 74.15368 107.98224 > colSd(tmp5,na.rm=TRUE) [1] 127.891425 9.025242 6.748424 10.107446 8.199467 9.069015 [7] 8.745393 10.115197 7.781634 5.607920 6.246715 10.660199 [13] 8.896266 7.262104 9.215626 9.049059 10.618165 10.123720 [19] 8.611253 10.391451 > colMax(tmp5,na.rm=TRUE) [1] 472.90514 81.68955 77.86166 82.15548 84.29100 82.33512 84.40317 [8] 82.95848 78.75554 81.45385 81.55559 87.59369 87.30775 86.33889 [15] 86.88109 79.80985 88.58704 90.13380 85.09215 89.95090 > colMin(tmp5,na.rm=TRUE) [1] 61.13386 54.42753 58.27744 55.08175 57.12855 55.70580 55.98160 53.90065 [9] 59.30212 61.42636 62.11688 57.50775 55.68028 62.78159 53.45931 57.16332 [17] 56.54542 55.02000 59.60677 55.77593 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 89.77708 70.63318 70.13247 69.07326 NaN 71.42926 71.00950 71.34777 [9] 68.89135 72.86180 > rowSums(tmp5,na.rm=TRUE) [1] 1795.542 1412.664 1402.649 1381.465 0.000 1428.585 1420.190 1426.955 [9] 1377.827 1457.236 > rowVars(tmp5,na.rm=TRUE) [1] 8237.44369 44.24235 58.55703 68.14468 NA 80.98395 [7] 97.49104 67.11998 71.06936 105.74161 > rowSd(tmp5,na.rm=TRUE) [1] 90.760364 6.651493 7.652257 8.254979 NA 8.999108 9.873755 [8] 8.192678 8.430265 10.283074 > rowMax(tmp5,na.rm=TRUE) [1] 472.90514 82.95848 88.58704 86.88109 NA 91.03184 90.13380 [8] 85.09215 81.68955 87.59369 > rowMin(tmp5,na.rm=TRUE) [1] 55.08175 58.10820 59.30212 55.77593 NA 55.02000 55.29011 58.11924 [9] 54.59990 53.45931 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 114.42681 71.08682 69.44128 67.81710 71.40685 67.60714 69.60298 [8] 71.48310 70.26406 70.08386 71.33448 72.97613 71.01520 73.77754 [15] 70.83235 NaN 73.74917 68.25345 71.83908 70.12990 > colSums(tmp5,na.rm=TRUE) [1] 1029.8413 639.7814 624.9715 610.3539 642.6617 608.4643 626.4269 [8] 643.3479 632.3766 630.7547 642.0103 656.7852 639.1368 663.9979 [15] 637.4912 0.0000 663.7425 614.2811 646.5517 631.1691 > colVars(tmp5,na.rm=TRUE) [1] 18169.55531 83.62123 48.01186 114.10245 52.69979 92.13631 [7] 70.18148 80.32831 57.00015 34.41550 43.17319 120.25585 [13] 85.17728 59.33014 92.29677 NA 108.31166 111.72277 [19] 70.60919 121.46356 > colSd(tmp5,na.rm=TRUE) [1] 134.794493 9.144465 6.929059 10.681875 7.259462 9.598766 [7] 8.377439 8.962606 7.549845 5.866472 6.570631 10.966123 [13] 9.229154 7.702606 9.607121 NA 10.407289 10.569899 [19] 8.402927 11.021051 > colMax(tmp5,na.rm=TRUE) [1] 472.90514 81.68955 77.86166 82.15548 84.29100 82.33512 84.40317 [8] 82.95848 78.75554 81.45385 81.55559 87.59369 87.30775 86.33889 [15] 86.88109 -Inf 88.58704 90.13380 85.09215 89.95090 > colMin(tmp5,na.rm=TRUE) [1] 61.13386 54.42753 58.27744 55.08175 61.31098 55.70580 55.98160 54.59990 [9] 59.30212 61.42636 62.11688 57.50775 55.68028 62.78159 53.45931 Inf [17] 56.54542 55.02000 59.60677 55.77593 > > > > > 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] 225.26805 176.93745 259.77515 133.70379 147.89949 263.86185 86.55139 [8] 177.03737 208.55078 189.79877 > apply(copymatrix,1,var,na.rm=TRUE) [1] 225.26805 176.93745 259.77515 133.70379 147.89949 263.86185 86.55139 [8] 177.03737 208.55078 189.79877 > > > > 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.421085e-14 -2.273737e-13 -2.842171e-14 -8.526513e-14 -2.842171e-14 [6] 2.842171e-14 2.842171e-14 1.705303e-13 -1.421085e-13 -5.684342e-14 [11] 3.410605e-13 -1.136868e-13 -9.947598e-14 -2.273737e-13 -2.842171e-14 [16] 0.000000e+00 -1.421085e-14 5.684342e-14 -5.684342e-14 7.105427e-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) + } 4 2 5 19 10 17 9 6 1 11 3 11 8 1 10 20 2 4 3 13 2 2 9 6 6 4 8 5 10 11 2 7 6 20 8 17 8 20 6 15 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.218746 > Min(tmp) [1] -3.000831 > mean(tmp) [1] 0.054474 > Sum(tmp) [1] 5.4474 > Var(tmp) [1] 1.118379 > > rowMeans(tmp) [1] 0.054474 > rowSums(tmp) [1] 5.4474 > rowVars(tmp) [1] 1.118379 > rowSd(tmp) [1] 1.057534 > rowMax(tmp) [1] 2.218746 > rowMin(tmp) [1] -3.000831 > > colMeans(tmp) [1] 0.762239178 0.532691864 0.365125606 -0.084824872 0.218768539 [6] 0.046041865 -0.118477859 -1.295227235 -0.667995742 -0.350099708 [11] 2.038395680 -2.579403336 -0.049794366 1.526293950 0.266659297 [16] 1.200411840 -0.241846072 0.107174067 0.574070994 1.364072168 [21] 0.565057240 -1.303162972 1.220149659 -1.696131616 -0.624410197 [26] 1.632410804 0.467296140 0.496483665 -1.166497653 0.048648250 [31] -0.364310514 -1.020929944 0.361895778 -0.002223945 1.082069501 [36] 0.242526468 0.813573433 -0.859088015 2.218745713 0.898058143 [41] -0.338556145 0.138815791 -0.545667767 -0.364287597 0.715186191 [46] 0.536384492 -1.584380091 -1.229061590 -1.399154547 1.540427460 [51] 1.336964735 0.254296422 -0.978656641 -2.767013855 -1.419697431 [56] 0.285732182 0.458224216 1.094862427 0.352236577 0.422379439 [61] -0.734840758 0.730413976 1.229366659 1.873798732 0.310598777 [66] 0.205380107 -0.033461541 0.338804521 1.237806904 -0.786872961 [71] -1.309838591 0.997956453 0.944528354 -0.361031170 0.663982918 [76] 0.623507704 1.377533301 -0.071607999 1.167680514 0.920733501 [81] -3.000831296 -0.984587438 0.359886157 1.798386062 -0.581345000 [86] -0.557015678 -1.137358311 -0.854880371 -0.249017755 0.572792358 [91] 1.004403426 -2.213604151 -0.257070516 -0.395500185 0.358739601 [96] 1.497344368 -0.234745120 0.348756743 -1.752829961 -0.732032494 > colSums(tmp) [1] 0.762239178 0.532691864 0.365125606 -0.084824872 0.218768539 [6] 0.046041865 -0.118477859 -1.295227235 -0.667995742 -0.350099708 [11] 2.038395680 -2.579403336 -0.049794366 1.526293950 0.266659297 [16] 1.200411840 -0.241846072 0.107174067 0.574070994 1.364072168 [21] 0.565057240 -1.303162972 1.220149659 -1.696131616 -0.624410197 [26] 1.632410804 0.467296140 0.496483665 -1.166497653 0.048648250 [31] -0.364310514 -1.020929944 0.361895778 -0.002223945 1.082069501 [36] 0.242526468 0.813573433 -0.859088015 2.218745713 0.898058143 [41] -0.338556145 0.138815791 -0.545667767 -0.364287597 0.715186191 [46] 0.536384492 -1.584380091 -1.229061590 -1.399154547 1.540427460 [51] 1.336964735 0.254296422 -0.978656641 -2.767013855 -1.419697431 [56] 0.285732182 0.458224216 1.094862427 0.352236577 0.422379439 [61] -0.734840758 0.730413976 1.229366659 1.873798732 0.310598777 [66] 0.205380107 -0.033461541 0.338804521 1.237806904 -0.786872961 [71] -1.309838591 0.997956453 0.944528354 -0.361031170 0.663982918 [76] 0.623507704 1.377533301 -0.071607999 1.167680514 0.920733501 [81] -3.000831296 -0.984587438 0.359886157 1.798386062 -0.581345000 [86] -0.557015678 -1.137358311 -0.854880371 -0.249017755 0.572792358 [91] 1.004403426 -2.213604151 -0.257070516 -0.395500185 0.358739601 [96] 1.497344368 -0.234745120 0.348756743 -1.752829961 -0.732032494 > 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.762239178 0.532691864 0.365125606 -0.084824872 0.218768539 [6] 0.046041865 -0.118477859 -1.295227235 -0.667995742 -0.350099708 [11] 2.038395680 -2.579403336 -0.049794366 1.526293950 0.266659297 [16] 1.200411840 -0.241846072 0.107174067 0.574070994 1.364072168 [21] 0.565057240 -1.303162972 1.220149659 -1.696131616 -0.624410197 [26] 1.632410804 0.467296140 0.496483665 -1.166497653 0.048648250 [31] -0.364310514 -1.020929944 0.361895778 -0.002223945 1.082069501 [36] 0.242526468 0.813573433 -0.859088015 2.218745713 0.898058143 [41] -0.338556145 0.138815791 -0.545667767 -0.364287597 0.715186191 [46] 0.536384492 -1.584380091 -1.229061590 -1.399154547 1.540427460 [51] 1.336964735 0.254296422 -0.978656641 -2.767013855 -1.419697431 [56] 0.285732182 0.458224216 1.094862427 0.352236577 0.422379439 [61] -0.734840758 0.730413976 1.229366659 1.873798732 0.310598777 [66] 0.205380107 -0.033461541 0.338804521 1.237806904 -0.786872961 [71] -1.309838591 0.997956453 0.944528354 -0.361031170 0.663982918 [76] 0.623507704 1.377533301 -0.071607999 1.167680514 0.920733501 [81] -3.000831296 -0.984587438 0.359886157 1.798386062 -0.581345000 [86] -0.557015678 -1.137358311 -0.854880371 -0.249017755 0.572792358 [91] 1.004403426 -2.213604151 -0.257070516 -0.395500185 0.358739601 [96] 1.497344368 -0.234745120 0.348756743 -1.752829961 -0.732032494 > colMin(tmp) [1] 0.762239178 0.532691864 0.365125606 -0.084824872 0.218768539 [6] 0.046041865 -0.118477859 -1.295227235 -0.667995742 -0.350099708 [11] 2.038395680 -2.579403336 -0.049794366 1.526293950 0.266659297 [16] 1.200411840 -0.241846072 0.107174067 0.574070994 1.364072168 [21] 0.565057240 -1.303162972 1.220149659 -1.696131616 -0.624410197 [26] 1.632410804 0.467296140 0.496483665 -1.166497653 0.048648250 [31] -0.364310514 -1.020929944 0.361895778 -0.002223945 1.082069501 [36] 0.242526468 0.813573433 -0.859088015 2.218745713 0.898058143 [41] -0.338556145 0.138815791 -0.545667767 -0.364287597 0.715186191 [46] 0.536384492 -1.584380091 -1.229061590 -1.399154547 1.540427460 [51] 1.336964735 0.254296422 -0.978656641 -2.767013855 -1.419697431 [56] 0.285732182 0.458224216 1.094862427 0.352236577 0.422379439 [61] -0.734840758 0.730413976 1.229366659 1.873798732 0.310598777 [66] 0.205380107 -0.033461541 0.338804521 1.237806904 -0.786872961 [71] -1.309838591 0.997956453 0.944528354 -0.361031170 0.663982918 [76] 0.623507704 1.377533301 -0.071607999 1.167680514 0.920733501 [81] -3.000831296 -0.984587438 0.359886157 1.798386062 -0.581345000 [86] -0.557015678 -1.137358311 -0.854880371 -0.249017755 0.572792358 [91] 1.004403426 -2.213604151 -0.257070516 -0.395500185 0.358739601 [96] 1.497344368 -0.234745120 0.348756743 -1.752829961 -0.732032494 > colMedians(tmp) [1] 0.762239178 0.532691864 0.365125606 -0.084824872 0.218768539 [6] 0.046041865 -0.118477859 -1.295227235 -0.667995742 -0.350099708 [11] 2.038395680 -2.579403336 -0.049794366 1.526293950 0.266659297 [16] 1.200411840 -0.241846072 0.107174067 0.574070994 1.364072168 [21] 0.565057240 -1.303162972 1.220149659 -1.696131616 -0.624410197 [26] 1.632410804 0.467296140 0.496483665 -1.166497653 0.048648250 [31] -0.364310514 -1.020929944 0.361895778 -0.002223945 1.082069501 [36] 0.242526468 0.813573433 -0.859088015 2.218745713 0.898058143 [41] -0.338556145 0.138815791 -0.545667767 -0.364287597 0.715186191 [46] 0.536384492 -1.584380091 -1.229061590 -1.399154547 1.540427460 [51] 1.336964735 0.254296422 -0.978656641 -2.767013855 -1.419697431 [56] 0.285732182 0.458224216 1.094862427 0.352236577 0.422379439 [61] -0.734840758 0.730413976 1.229366659 1.873798732 0.310598777 [66] 0.205380107 -0.033461541 0.338804521 1.237806904 -0.786872961 [71] -1.309838591 0.997956453 0.944528354 -0.361031170 0.663982918 [76] 0.623507704 1.377533301 -0.071607999 1.167680514 0.920733501 [81] -3.000831296 -0.984587438 0.359886157 1.798386062 -0.581345000 [86] -0.557015678 -1.137358311 -0.854880371 -0.249017755 0.572792358 [91] 1.004403426 -2.213604151 -0.257070516 -0.395500185 0.358739601 [96] 1.497344368 -0.234745120 0.348756743 -1.752829961 -0.732032494 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.7622392 0.5326919 0.3651256 -0.08482487 0.2187685 0.04604187 -0.1184779 [2,] 0.7622392 0.5326919 0.3651256 -0.08482487 0.2187685 0.04604187 -0.1184779 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.295227 -0.6679957 -0.3500997 2.038396 -2.579403 -0.04979437 1.526294 [2,] -1.295227 -0.6679957 -0.3500997 2.038396 -2.579403 -0.04979437 1.526294 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.2666593 1.200412 -0.2418461 0.1071741 0.574071 1.364072 0.5650572 [2,] 0.2666593 1.200412 -0.2418461 0.1071741 0.574071 1.364072 0.5650572 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1.303163 1.22015 -1.696132 -0.6244102 1.632411 0.4672961 0.4964837 [2,] -1.303163 1.22015 -1.696132 -0.6244102 1.632411 0.4672961 0.4964837 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -1.166498 0.04864825 -0.3643105 -1.02093 0.3618958 -0.002223945 1.08207 [2,] -1.166498 0.04864825 -0.3643105 -1.02093 0.3618958 -0.002223945 1.08207 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.2425265 0.8135734 -0.859088 2.218746 0.8980581 -0.3385561 0.1388158 [2,] 0.2425265 0.8135734 -0.859088 2.218746 0.8980581 -0.3385561 0.1388158 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.5456678 -0.3642876 0.7151862 0.5363845 -1.58438 -1.229062 -1.399155 [2,] -0.5456678 -0.3642876 0.7151862 0.5363845 -1.58438 -1.229062 -1.399155 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.540427 1.336965 0.2542964 -0.9786566 -2.767014 -1.419697 0.2857322 [2,] 1.540427 1.336965 0.2542964 -0.9786566 -2.767014 -1.419697 0.2857322 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.4582242 1.094862 0.3522366 0.4223794 -0.7348408 0.730414 1.229367 [2,] 0.4582242 1.094862 0.3522366 0.4223794 -0.7348408 0.730414 1.229367 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 1.873799 0.3105988 0.2053801 -0.03346154 0.3388045 1.237807 -0.786873 [2,] 1.873799 0.3105988 0.2053801 -0.03346154 0.3388045 1.237807 -0.786873 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -1.309839 0.9979565 0.9445284 -0.3610312 0.6639829 0.6235077 1.377533 [2,] -1.309839 0.9979565 0.9445284 -0.3610312 0.6639829 0.6235077 1.377533 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.071608 1.167681 0.9207335 -3.000831 -0.9845874 0.3598862 1.798386 [2,] -0.071608 1.167681 0.9207335 -3.000831 -0.9845874 0.3598862 1.798386 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.581345 -0.5570157 -1.137358 -0.8548804 -0.2490178 0.5727924 1.004403 [2,] -0.581345 -0.5570157 -1.137358 -0.8548804 -0.2490178 0.5727924 1.004403 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -2.213604 -0.2570705 -0.3955002 0.3587396 1.497344 -0.2347451 0.3487567 [2,] -2.213604 -0.2570705 -0.3955002 0.3587396 1.497344 -0.2347451 0.3487567 [,99] [,100] [1,] -1.75283 -0.7320325 [2,] -1.75283 -0.7320325 > > > Max(tmp2) [1] 2.843611 > Min(tmp2) [1] -2.701481 > mean(tmp2) [1] -0.1548545 > Sum(tmp2) [1] -15.48545 > Var(tmp2) [1] 0.9045576 > > rowMeans(tmp2) [1] 1.41670415 0.02184429 0.23430048 1.52957732 1.57755651 0.64832860 [7] 0.01008240 -0.29356287 0.09823731 -1.60768240 -0.02017688 -0.65934493 [13] -0.48194177 -1.12750312 0.73081056 0.67747284 -0.44218663 0.42846067 [19] -1.56117668 0.27639348 -1.07691924 -0.81189472 -2.70148098 0.27409213 [25] -0.50274056 -0.67191692 -0.33800426 0.66184922 0.09983124 -0.02393586 [31] -1.54721973 -0.01583801 0.69990220 -1.05052281 0.31230391 -0.17108712 [37] -0.07129792 0.34725191 -2.21815364 -0.06327769 -1.86817852 1.91584534 [43] -0.47196371 0.25758629 -1.91341731 1.52237351 0.25081245 0.40198043 [49] 0.30334239 1.17835633 -0.55161179 0.45535130 0.08378235 1.14452712 [55] -1.62787872 2.84361116 -0.15279617 -2.24241524 -1.72194931 0.49306673 [61] -0.18129623 -0.30466208 -0.76382743 -0.92610024 -0.09016330 -0.58773604 [67] -0.96702152 -0.27406618 0.12870526 0.64875856 0.42989609 -0.97611421 [73] 0.37257943 0.55324362 -1.79140821 0.62756032 -0.90225263 -0.66542220 [79] -1.02934355 0.40000877 0.34185447 -1.09466038 -0.60043726 -0.46023379 [85] -0.88993264 0.41489006 -0.25223296 0.25460528 -1.05405406 -0.07123114 [91] 1.07106235 0.16205745 0.08547172 0.58172345 -1.36368077 0.09921619 [97] 1.34769038 -0.41400555 -0.22145394 -0.01099811 > rowSums(tmp2) [1] 1.41670415 0.02184429 0.23430048 1.52957732 1.57755651 0.64832860 [7] 0.01008240 -0.29356287 0.09823731 -1.60768240 -0.02017688 -0.65934493 [13] -0.48194177 -1.12750312 0.73081056 0.67747284 -0.44218663 0.42846067 [19] -1.56117668 0.27639348 -1.07691924 -0.81189472 -2.70148098 0.27409213 [25] -0.50274056 -0.67191692 -0.33800426 0.66184922 0.09983124 -0.02393586 [31] -1.54721973 -0.01583801 0.69990220 -1.05052281 0.31230391 -0.17108712 [37] -0.07129792 0.34725191 -2.21815364 -0.06327769 -1.86817852 1.91584534 [43] -0.47196371 0.25758629 -1.91341731 1.52237351 0.25081245 0.40198043 [49] 0.30334239 1.17835633 -0.55161179 0.45535130 0.08378235 1.14452712 [55] -1.62787872 2.84361116 -0.15279617 -2.24241524 -1.72194931 0.49306673 [61] -0.18129623 -0.30466208 -0.76382743 -0.92610024 -0.09016330 -0.58773604 [67] -0.96702152 -0.27406618 0.12870526 0.64875856 0.42989609 -0.97611421 [73] 0.37257943 0.55324362 -1.79140821 0.62756032 -0.90225263 -0.66542220 [79] -1.02934355 0.40000877 0.34185447 -1.09466038 -0.60043726 -0.46023379 [85] -0.88993264 0.41489006 -0.25223296 0.25460528 -1.05405406 -0.07123114 [91] 1.07106235 0.16205745 0.08547172 0.58172345 -1.36368077 0.09921619 [97] 1.34769038 -0.41400555 -0.22145394 -0.01099811 > 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] 1.41670415 0.02184429 0.23430048 1.52957732 1.57755651 0.64832860 [7] 0.01008240 -0.29356287 0.09823731 -1.60768240 -0.02017688 -0.65934493 [13] -0.48194177 -1.12750312 0.73081056 0.67747284 -0.44218663 0.42846067 [19] -1.56117668 0.27639348 -1.07691924 -0.81189472 -2.70148098 0.27409213 [25] -0.50274056 -0.67191692 -0.33800426 0.66184922 0.09983124 -0.02393586 [31] -1.54721973 -0.01583801 0.69990220 -1.05052281 0.31230391 -0.17108712 [37] -0.07129792 0.34725191 -2.21815364 -0.06327769 -1.86817852 1.91584534 [43] -0.47196371 0.25758629 -1.91341731 1.52237351 0.25081245 0.40198043 [49] 0.30334239 1.17835633 -0.55161179 0.45535130 0.08378235 1.14452712 [55] -1.62787872 2.84361116 -0.15279617 -2.24241524 -1.72194931 0.49306673 [61] -0.18129623 -0.30466208 -0.76382743 -0.92610024 -0.09016330 -0.58773604 [67] -0.96702152 -0.27406618 0.12870526 0.64875856 0.42989609 -0.97611421 [73] 0.37257943 0.55324362 -1.79140821 0.62756032 -0.90225263 -0.66542220 [79] -1.02934355 0.40000877 0.34185447 -1.09466038 -0.60043726 -0.46023379 [85] -0.88993264 0.41489006 -0.25223296 0.25460528 -1.05405406 -0.07123114 [91] 1.07106235 0.16205745 0.08547172 0.58172345 -1.36368077 0.09921619 [97] 1.34769038 -0.41400555 -0.22145394 -0.01099811 > rowMin(tmp2) [1] 1.41670415 0.02184429 0.23430048 1.52957732 1.57755651 0.64832860 [7] 0.01008240 -0.29356287 0.09823731 -1.60768240 -0.02017688 -0.65934493 [13] -0.48194177 -1.12750312 0.73081056 0.67747284 -0.44218663 0.42846067 [19] -1.56117668 0.27639348 -1.07691924 -0.81189472 -2.70148098 0.27409213 [25] -0.50274056 -0.67191692 -0.33800426 0.66184922 0.09983124 -0.02393586 [31] -1.54721973 -0.01583801 0.69990220 -1.05052281 0.31230391 -0.17108712 [37] -0.07129792 0.34725191 -2.21815364 -0.06327769 -1.86817852 1.91584534 [43] -0.47196371 0.25758629 -1.91341731 1.52237351 0.25081245 0.40198043 [49] 0.30334239 1.17835633 -0.55161179 0.45535130 0.08378235 1.14452712 [55] -1.62787872 2.84361116 -0.15279617 -2.24241524 -1.72194931 0.49306673 [61] -0.18129623 -0.30466208 -0.76382743 -0.92610024 -0.09016330 -0.58773604 [67] -0.96702152 -0.27406618 0.12870526 0.64875856 0.42989609 -0.97611421 [73] 0.37257943 0.55324362 -1.79140821 0.62756032 -0.90225263 -0.66542220 [79] -1.02934355 0.40000877 0.34185447 -1.09466038 -0.60043726 -0.46023379 [85] -0.88993264 0.41489006 -0.25223296 0.25460528 -1.05405406 -0.07123114 [91] 1.07106235 0.16205745 0.08547172 0.58172345 -1.36368077 0.09921619 [97] 1.34769038 -0.41400555 -0.22145394 -0.01099811 > > colMeans(tmp2) [1] -0.1548545 > colSums(tmp2) [1] -15.48545 > colVars(tmp2) [1] 0.9045576 > colSd(tmp2) [1] 0.9510823 > colMax(tmp2) [1] 2.843611 > colMin(tmp2) [1] -2.701481 > colMedians(tmp2) [1] -0.04360677 > colRanges(tmp2) [,1] [1,] -2.701481 [2,] 2.843611 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 2.3790411 -3.1413421 4.6846257 0.4682731 -1.3233744 6.1673251 [7] 1.0331364 1.2520739 -4.0149620 -1.5148906 > colApply(tmp,quantile)[,1] [,1] [1,] -0.66582053 [2,] -0.29560875 [3,] 0.06359935 [4,] 0.78256875 [5,] 1.56242734 > > rowApply(tmp,sum) [1] 5.583066 -4.909387 3.450872 -3.487422 1.423977 2.041865 -2.733429 [8] 2.590570 3.586211 -1.556418 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 6 10 8 9 5 5 6 2 5 7 [2,] 3 8 9 1 3 3 2 5 2 1 [3,] 8 3 7 8 8 4 4 9 9 6 [4,] 10 4 5 3 6 6 9 7 3 3 [5,] 1 1 10 4 2 1 10 6 8 2 [6,] 4 6 4 6 10 8 8 10 10 8 [7,] 9 7 6 10 9 2 3 1 4 10 [8,] 7 2 2 5 7 10 5 4 6 9 [9,] 5 9 1 7 4 7 7 3 1 4 [10,] 2 5 3 2 1 9 1 8 7 5 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -5.39724847 -2.06539587 1.03512406 -0.59058239 -3.42386362 1.43095466 [7] -1.69458801 -3.42622521 -4.00518325 0.76084159 0.43225018 4.34965962 [13] 0.30699403 0.14574308 2.62505320 1.51580431 4.19459064 -0.20397648 [19] -4.02697712 -0.06398125 > colApply(tmp,quantile)[,1] [,1] [1,] -2.5150254 [2,] -1.4856078 [3,] -0.5406023 [4,] -0.4565654 [5,] -0.3994476 > > rowApply(tmp,sum) [1] -4.055925 -1.119055 -3.701699 -3.277470 4.053143 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 2 8 1 12 3 [2,] 17 5 5 8 8 [3,] 6 19 11 9 18 [4,] 16 3 15 19 1 [5,] 14 1 12 5 2 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.4856078 0.41061708 -0.4368065 0.2481624 0.08852296 0.06785013 [2,] -0.4565654 -1.10128526 1.3740275 -1.1429047 -1.47256920 1.02081780 [3,] -2.5150254 -0.75473234 -0.2230511 0.4707833 -0.06315746 -0.77626126 [4,] -0.3994476 -0.57831060 -0.5289995 1.2882337 -0.86150527 0.90054295 [5,] -0.5406023 -0.04168475 0.8499536 -1.4548570 -1.11515466 0.21800505 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.9879665 0.1030130 -1.8545289 -0.8741682 -0.3916430 0.8826147 [2,] 0.8494100 -1.1044968 -1.0665824 1.7771186 0.3431177 1.2158347 [3,] -0.7050006 -0.3879194 -0.4173642 -0.5472793 1.2850203 0.6018059 [4,] -1.1406940 -1.5370484 -0.3015545 -0.4312428 -0.9613566 1.0970297 [5,] 0.2896631 -0.4997736 -0.3651532 0.8364132 0.1571118 0.5523746 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.06956483 -0.03052144 -0.2052919 -0.4292022 -0.10586247 -0.40180109 [2,] -1.36236826 0.10196056 0.6608546 0.6165636 0.01290801 -0.01673425 [3,] 0.05982616 0.98654904 0.4758462 -0.8044293 1.18924975 0.26002553 [4,] 0.59721992 -1.49136308 0.6601042 1.5463256 0.65660465 -0.67914563 [5,] -0.05724862 0.57911799 1.0335401 0.5865466 2.44169070 0.63367896 [,19] [,20] [1,] -0.9506169 1.2277467 [2,] -0.9957039 -0.3724583 [3,] -1.4553041 -0.3812804 [4,] -0.4737184 -0.6391440 [5,] -0.1516338 0.1011548 > > > 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 : 654 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 565 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.1554563 -2.329423 -1.125384 1.000545 0.04947643 -1.28513 -1.024241 col8 col9 col10 col11 col12 col13 col14 row1 -0.6283055 -0.7091501 0.3712096 0.000480144 -0.7536105 1.371863 0.05060361 col15 col16 col17 col18 col19 col20 row1 -0.3178902 -1.998318 0.1147453 -1.49138 -0.3842738 0.9526124 > tmp[,"col10"] col10 row1 0.3712096 row2 1.2915751 row3 0.1667705 row4 0.4096069 row5 -0.9388916 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.1554563 -2.329423 -1.125384 1.000545 0.04947643 -1.285130 -1.0242411 row5 0.4361166 1.218309 1.021453 -1.623941 -1.89237663 0.701118 0.0689793 col8 col9 col10 col11 col12 col13 row1 -0.6283055 -0.7091501 0.3712096 0.000480144 -0.7536105 1.3718629 row5 1.0334746 -0.8100692 -0.9388916 0.587338709 2.4886230 0.4003541 col14 col15 col16 col17 col18 col19 row1 0.05060361 -0.3178902 -1.99831756 0.1147453 -1.4913799 -0.3842738 row5 -0.28890371 0.4526875 -0.02981824 1.9021782 0.1488764 -0.6907564 col20 row1 0.9526124 row5 -0.4841986 > tmp[,c("col6","col20")] col6 col20 row1 -1.2851298 0.9526124 row2 -0.6865981 0.1267111 row3 0.3980143 0.7958130 row4 -1.2438275 -1.4931939 row5 0.7011180 -0.4841986 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.285130 0.9526124 row5 0.701118 -0.4841986 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.61496 48.7726 49.3388 50.36894 49.70113 105.4095 51.90809 50.8989 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.74046 50.11637 48.79206 49.5707 50.40784 49.68137 51.06063 49.00955 col17 col18 col19 col20 row1 49.40141 51.50308 51.00444 104.6869 > tmp[,"col10"] col10 row1 50.11637 row2 30.07437 row3 31.10137 row4 29.32491 row5 49.36961 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.61496 48.77260 49.33880 50.36894 49.70113 105.4095 51.90809 50.89890 row5 50.49142 47.99577 49.40363 48.23806 49.88407 104.4150 50.47845 50.09372 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.74046 50.11637 48.79206 49.5707 50.40784 49.68137 51.06063 49.00955 row5 51.04154 49.36961 49.70357 51.3890 51.96007 48.77220 50.77319 49.61440 col17 col18 col19 col20 row1 49.40141 51.50308 51.00444 104.6869 row5 50.48455 50.18358 48.52379 105.0342 > tmp[,c("col6","col20")] col6 col20 row1 105.40953 104.68695 row2 72.16503 74.11840 row3 74.45450 76.03704 row4 74.82895 73.80556 row5 104.41500 105.03416 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.4095 104.6869 row5 104.4150 105.0342 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.4095 104.6869 row5 104.4150 105.0342 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.7178722 [2,] -0.5787142 [3,] -1.1320302 [4,] -0.7239568 [5,] -0.4182159 > tmp[,c("col17","col7")] col17 col7 [1,] -0.01484423 -0.1678647 [2,] 1.49683835 -0.6425616 [3,] -0.42406653 -0.5048302 [4,] -1.06935564 2.5566443 [5,] -0.41667387 -0.8306823 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.80394898 0.4669091 [2,] 0.59741317 -1.9241040 [3,] 0.32416601 1.1589452 [4,] 0.35349733 -0.5563124 [5,] 0.08513614 1.6914189 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.803949 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.8039490 [2,] 0.5974132 > > > > 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.6892493 0.9602430 1.994792 -0.3187848 0.4279909 0.1500745 1.8298706 row1 0.2810342 0.6408329 -1.096512 -3.1461979 1.2909361 0.9036755 0.2971079 [,8] [,9] [,10] [,11] [,12] [,13] row3 -1.612364 0.05617531 1.0247449 -0.2262311 2.0491565 -1.5214183 row1 -1.131495 0.03116369 -0.5282352 0.5825877 0.5427182 0.2281444 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 -0.08463901 -1.9249015 0.3762274 -0.269833 -0.8234883 -1.455112 -1.084112 row1 0.37295251 0.7309364 -0.2855102 1.470797 -0.5607766 -1.072024 0.716904 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.6712886 0.1592568 -0.1024292 -0.6050353 0.7513302 -0.01627611 1.932971 [,8] [,9] [,10] row2 1.28899 -0.9526372 1.500702 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -1.433515 1.603364 -0.3825589 0.8371041 0.7857657 0.3852347 -0.7989235 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.6919329 -0.8265425 0.9800993 1.46149 0.3095017 0.6513957 -0.09195071 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.4995616 0.6998655 0.4646818 1.161295 -0.04086981 0.6653662 > > > 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: 0x58d935a65670> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c3625f6efc8" [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c362dccc35a" [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c366b26f0c9" [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c36d352481" [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c366bfef081" [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c364ed1a348" [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c36f665322" [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c36143265d1" [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c3658913885" [10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c362d7f59b6" [11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c362dc34833" [12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c366720b2d5" [13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c367d5d0394" [14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c3673a37999" [15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM328c366eedc33a" > > > ### 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: 0x58d935a17470> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x58d935a17470> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x58d935a17470> > rowMedians(tmp) [1] 0.048339909 -0.238675511 0.143993855 -0.145473606 0.461744866 [6] 0.066592451 0.175265343 0.235916558 -0.393874038 -0.117148255 [11] 0.287916606 -0.245163916 0.043796758 0.021087820 0.253220753 [16] 0.236113704 -0.583535599 0.367397403 -0.134799651 0.228526213 [21] -0.741989260 0.124223501 -0.394474100 0.047335385 0.259030151 [26] 0.155900227 -0.105873583 0.411417107 -0.490860538 0.375944694 [31] 0.229377030 -0.283358354 -0.424460863 -0.226192389 -0.125276254 [36] 0.296756469 0.026633766 0.321625746 -0.658035890 -0.058920916 [41] 0.031934559 0.098710576 0.008475294 0.053935330 -0.240198749 [46] -0.287044347 0.184485835 -0.087148721 0.502807262 0.133690906 [51] 0.353731479 0.203596412 -0.294701988 0.157908075 0.826320476 [56] -0.386446945 0.640846866 0.126855240 0.428886747 -0.361682060 [61] 0.225437686 0.220654119 -0.127082444 0.152069817 0.265912040 [66] -0.084990645 0.204365849 0.366642335 0.373415436 0.054566726 [71] 0.449457142 0.068147445 0.437835229 -0.096513062 -0.176536131 [76] 0.430810349 -0.054729661 -0.147351475 0.296907309 0.198462511 [81] -0.231553696 0.469008869 -0.053595054 -0.116130118 -0.208915988 [86] -0.065009603 -0.429657435 0.126474294 0.470420915 0.265992417 [91] 0.192078669 0.464327955 0.027790843 -0.540696322 0.479724859 [96] -0.184814331 0.214567754 -0.227699096 -0.190596091 -0.289454823 [101] -0.189679146 -0.410117051 -0.064507292 0.222842047 0.531611587 [106] -0.102099033 -0.097020026 -0.101413027 -0.536569856 -0.240812744 [111] -0.423737802 0.160235944 0.444858511 0.044227296 -0.419924001 [116] -0.079682714 0.216313486 0.531567399 -0.195062232 -0.186365350 [121] -0.232251632 0.055562930 -0.468992072 -0.205523657 -0.245835622 [126] 0.582232951 -0.534037199 0.189710930 0.365942333 0.650010158 [131] -0.277766271 -0.202608626 0.137424587 0.356464646 0.032317705 [136] 0.213810736 -0.120449763 -0.012877011 0.445726800 -0.270528304 [141] -0.319161343 0.315105639 0.018484888 -0.219294992 0.189634710 [146] -0.437904786 0.158773476 -0.361503533 0.299602676 -0.124680459 [151] 0.461278203 0.324438566 -0.058828600 0.596561142 -0.532116340 [156] 0.537009007 -0.672947842 0.056400543 0.161330762 0.030575755 [161] 0.215563827 0.293482782 -0.185895922 -0.560519063 0.210345568 [166] -0.238401064 0.142469554 0.065757442 -0.098226540 0.126764422 [171] 0.034338743 0.148481284 -0.347903342 0.179419760 -0.179518133 [176] -0.141767937 -0.261894775 0.037457791 -0.048025067 0.519423115 [181] -0.280401297 -0.076795572 -0.047433114 -0.002187944 -0.283740076 [186] 0.107190647 0.058060895 -0.710069460 -0.679614502 -0.034699096 [191] -0.415147174 -0.299774969 0.040042269 0.063110024 -0.273104471 [196] -0.593436158 -0.780961177 0.013278819 -0.330155176 0.212311385 [201] 0.076878038 0.247512151 -0.653782131 -0.048649113 0.225983996 [206] 0.075050906 -0.069160016 -0.262345852 0.529553572 0.076134469 [211] -0.445395640 -0.080918686 -0.251685262 0.564404696 0.209572135 [216] 0.203508738 0.322780106 0.128053989 -0.507744889 -0.134285085 [221] -0.048373755 -0.326728582 0.166669763 -0.030187023 -0.120669532 [226] 0.075757478 -0.100639326 0.035579314 0.211835308 -0.618561270 > > proc.time() user system elapsed 1.246 0.671 1.908
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: 0x5f4497a219d0> > .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: 0x5f4497a219d0> > .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: 0x5f4497a219d0> > .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: 0x5f4497a219d0> > 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: 0x5f44978fa460> > .Call("R_bm_AddColumn",P) <pointer: 0x5f44978fa460> > .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: 0x5f44978fa460> > .Call("R_bm_AddColumn",P) <pointer: 0x5f44978fa460> > .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: 0x5f44978fa460> > 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: 0x5f449a084ab0> > .Call("R_bm_AddColumn",P) <pointer: 0x5f449a084ab0> > .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: 0x5f449a084ab0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5f449a084ab0> > .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: 0x5f449a084ab0> > > .Call("R_bm_RowMode",P) <pointer: 0x5f449a084ab0> > .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: 0x5f449a084ab0> > > .Call("R_bm_ColMode",P) <pointer: 0x5f449a084ab0> > .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: 0x5f449a084ab0> > 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: 0x5f4499e0f070> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x5f4499e0f070> > .Call("R_bm_AddColumn",P) <pointer: 0x5f4499e0f070> > .Call("R_bm_AddColumn",P) <pointer: 0x5f4499e0f070> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile328dee38db2500" "BufferedMatrixFile328dee3ddced10" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile328dee38db2500" "BufferedMatrixFile328dee3ddced10" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x5f4498dc2670> > .Call("R_bm_AddColumn",P) <pointer: 0x5f4498dc2670> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5f4498dc2670> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5f4498dc2670> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x5f4498dc2670> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x5f4498dc2670> > .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: 0x5f4498a3be30> > .Call("R_bm_AddColumn",P) <pointer: 0x5f4498a3be30> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5f4498a3be30> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x5f4498a3be30> > 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: 0x5f4498d66080> > .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: 0x5f4498d66080> > rm(P) > > proc.time() user system elapsed 0.237 0.052 0.277
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.242 0.044 0.274