Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-08-14 11:40 -0400 (Thu, 14 Aug 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4824 |
palomino7 | Windows Server 2022 Datacenter | x64 | 4.5.1 (2025-06-13 ucrt) -- "Great Square Root" | 4566 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" | 4604 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4545 |
kunpeng2 | Linux (openEuler 24.03 LTS) | aarch64 | R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" | 4579 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 252/2341 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.72.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 24.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino7 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | ![]() | ||||||||
merida1 | macOS 12.7.5 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson1 | macOS 13.6.6 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kunpeng2 | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.72.0 |
Command: /home/biocbuild/bbs-3.21-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.21-bioc/R/site-library --timings BufferedMatrix_1.72.0.tar.gz |
StartedAt: 2025-08-13 20:35:26 -0400 (Wed, 13 Aug 2025) |
EndedAt: 2025-08-13 20:35:51 -0400 (Wed, 13 Aug 2025) |
EllapsedTime: 25.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.21-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.21-bioc/R/site-library --timings BufferedMatrix_1.72.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.5.1 (2025-06-13) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 * running under: Ubuntu 24.04.3 LTS * using session charset: UTF-8 * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.72.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... OK * used C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * DONE Status: 2 NOTEs See ‘/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.21-bioc/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/bbs-3.21-bioc/R/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.72.0’ ** using staged installation ** libs using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’ gcc -std=gnu2x -I"/home/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -std=gnu2x -I"/home/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function ‘dbm_ReadOnlyMode’: doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ doubleBufferedMatrix.c: At top level: doubleBufferedMatrix.c:3327:12: warning: ‘sort_double’ defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ gcc -std=gnu2x -I"/home/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -std=gnu2x -I"/home/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c init_package.c -o init_package.o gcc -std=gnu2x -shared -L/home/biocbuild/bbs-3.21-bioc/R/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/bbs-3.21-bioc/R/lib -lR installing to /home/biocbuild/bbs-3.21-bioc/R/site-library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.5.1 (2025-06-13) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.251 0.041 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.21-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 478417 25.6 1047105 56 639600 34.2 Vcells 885231 6.8 8388608 64 2081598 15.9 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Wed Aug 13 20:35:41 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] "Wed Aug 13 20:35:41 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: 0x589266d0fad0> > > > > 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] "Wed Aug 13 20:35:42 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] "Wed Aug 13 20:35:42 2025" > > ColMode(tmp2) <pointer: 0x589266d0fad0> > > > > ### 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.9692086 0.3684730 0.002915933 -0.7549035 [2,] -0.9485263 -0.2100452 -0.974626763 -1.5666991 [3,] 1.3444258 1.3417350 0.342882250 0.3534481 [4,] -0.9019543 2.2301272 0.118717149 0.8349507 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.9692086 0.3684730 0.002915933 0.7549035 [2,] 0.9485263 0.2100452 0.974626763 1.5666991 [3,] 1.3444258 1.3417350 0.342882250 0.3534481 [4,] 0.9019543 2.2301272 0.118717149 0.8349507 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9984603 0.6070197 0.05399938 0.8688518 [2,] 0.9739231 0.4583069 0.98723187 1.2516785 [3,] 1.1594938 1.1583329 0.58556148 0.5945150 [4,] 0.9497128 1.4933610 0.34455355 0.9137564 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.95381 31.43867 25.54291 34.44342 [2,] 35.68776 29.79311 35.84695 39.08348 [3,] 37.93936 37.92506 31.19850 31.29860 [4,] 35.39908 42.16374 28.56425 34.97251 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x58926794b960> > exp(tmp5) <pointer: 0x58926794b960> > log(tmp5,2) <pointer: 0x58926794b960> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 468.2119 > Min(tmp5) [1] 53.16422 > mean(tmp5) [1] 72.84788 > Sum(tmp5) [1] 14569.58 > Var(tmp5) [1] 860.4075 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 89.71587 72.60064 71.95732 72.59503 70.40972 72.26513 70.38508 69.51885 [9] 69.53452 69.49661 > rowSums(tmp5) [1] 1794.317 1452.013 1439.146 1451.901 1408.194 1445.303 1407.702 1390.377 [9] 1390.690 1389.932 > rowVars(tmp5) [1] 7998.16545 57.56858 75.09288 83.54120 88.61711 82.00751 [7] 81.21847 45.36735 107.19361 44.34960 > rowSd(tmp5) [1] 89.432463 7.587396 8.665615 9.140087 9.413666 9.055800 9.012129 [8] 6.735529 10.353435 6.659549 > rowMax(tmp5) [1] 468.21189 83.33546 84.14047 87.75830 91.39144 87.84349 86.01158 [8] 82.84227 88.16363 82.44172 > rowMin(tmp5) [1] 53.16422 60.41345 57.53284 57.14465 53.91133 58.62503 54.47689 54.22936 [9] 57.38173 59.15564 > > colMeans(tmp5) [1] 112.88562 71.71000 66.88984 70.15046 73.14936 71.11343 73.95578 [8] 71.51734 70.47041 72.01130 69.78325 72.63284 71.39767 68.36739 [15] 68.67326 74.24579 65.43712 68.53392 72.47557 71.55722 > colSums(tmp5) [1] 1128.8562 717.1000 668.8984 701.5046 731.4936 711.1343 739.5578 [8] 715.1734 704.7041 720.1130 697.8325 726.3284 713.9767 683.6739 [15] 686.7326 742.4579 654.3712 685.3392 724.7557 715.5722 > colVars(tmp5) [1] 15634.79822 87.69656 71.86925 58.58377 58.95927 75.09157 [7] 53.64122 74.09408 49.78377 91.71837 51.41022 49.40376 [13] 56.18736 103.60678 113.25235 102.61013 48.81059 83.81619 [19] 104.11327 70.81815 > colSd(tmp5) [1] 125.039187 9.364644 8.477574 7.654003 7.678494 8.665539 [7] 7.324017 8.607792 7.055761 9.576971 7.170092 7.028781 [13] 7.495823 10.178741 10.642009 10.129666 6.986458 9.155118 [19] 10.203591 8.415352 > colMax(tmp5) [1] 468.21189 87.75830 78.67364 81.34715 82.83575 91.39144 86.01158 [8] 86.92430 82.29062 88.16363 78.21468 82.85899 83.22564 82.99411 [15] 85.65971 87.84349 75.38133 82.92439 87.59690 85.60843 > colMin(tmp5) [1] 61.25899 61.41018 53.16422 57.38173 57.75560 62.12973 64.84148 61.21152 [9] 60.86109 60.08549 57.11048 61.54413 59.15564 57.39513 54.22936 53.91133 [17] 54.47689 56.83901 59.73391 58.62503 > > > ### 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] NA 72.60064 71.95732 72.59503 70.40972 72.26513 70.38508 69.51885 [9] 69.53452 69.49661 > rowSums(tmp5) [1] NA 1452.013 1439.146 1451.901 1408.194 1445.303 1407.702 1390.377 [9] 1390.690 1389.932 > rowVars(tmp5) [1] 8440.04463 57.56858 75.09288 83.54120 88.61711 82.00751 [7] 81.21847 45.36735 107.19361 44.34960 > rowSd(tmp5) [1] 91.869716 7.587396 8.665615 9.140087 9.413666 9.055800 9.012129 [8] 6.735529 10.353435 6.659549 > rowMax(tmp5) [1] NA 83.33546 84.14047 87.75830 91.39144 87.84349 86.01158 82.84227 [9] 88.16363 82.44172 > rowMin(tmp5) [1] NA 60.41345 57.53284 57.14465 53.91133 58.62503 54.47689 54.22936 [9] 57.38173 59.15564 > > colMeans(tmp5) [1] 112.88562 71.71000 66.88984 70.15046 73.14936 71.11343 73.95578 [8] 71.51734 70.47041 72.01130 69.78325 72.63284 NA 68.36739 [15] 68.67326 74.24579 65.43712 68.53392 72.47557 71.55722 > colSums(tmp5) [1] 1128.8562 717.1000 668.8984 701.5046 731.4936 711.1343 739.5578 [8] 715.1734 704.7041 720.1130 697.8325 726.3284 NA 683.6739 [15] 686.7326 742.4579 654.3712 685.3392 724.7557 715.5722 > colVars(tmp5) [1] 15634.79822 87.69656 71.86925 58.58377 58.95927 75.09157 [7] 53.64122 74.09408 49.78377 91.71837 51.41022 49.40376 [13] NA 103.60678 113.25235 102.61013 48.81059 83.81619 [19] 104.11327 70.81815 > colSd(tmp5) [1] 125.039187 9.364644 8.477574 7.654003 7.678494 8.665539 [7] 7.324017 8.607792 7.055761 9.576971 7.170092 7.028781 [13] NA 10.178741 10.642009 10.129666 6.986458 9.155118 [19] 10.203591 8.415352 > colMax(tmp5) [1] 468.21189 87.75830 78.67364 81.34715 82.83575 91.39144 86.01158 [8] 86.92430 82.29062 88.16363 78.21468 82.85899 NA 82.99411 [15] 85.65971 87.84349 75.38133 82.92439 87.59690 85.60843 > colMin(tmp5) [1] 61.25899 61.41018 53.16422 57.38173 57.75560 62.12973 64.84148 61.21152 [9] 60.86109 60.08549 57.11048 61.54413 NA 57.39513 54.22936 53.91133 [17] 54.47689 56.83901 59.73391 58.62503 > > Max(tmp5,na.rm=TRUE) [1] 468.2119 > Min(tmp5,na.rm=TRUE) [1] 53.16422 > mean(tmp5,na.rm=TRUE) [1] 72.79573 > Sum(tmp5,na.rm=TRUE) [1] 14486.35 > Var(tmp5,na.rm=TRUE) [1] 864.2063 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.05746 72.60064 71.95732 72.59503 70.40972 72.26513 70.38508 69.51885 [9] 69.53452 69.49661 > rowSums(tmp5,na.rm=TRUE) [1] 1711.092 1452.013 1439.146 1451.901 1408.194 1445.303 1407.702 1390.377 [9] 1390.690 1389.932 > rowVars(tmp5,na.rm=TRUE) [1] 8440.04463 57.56858 75.09288 83.54120 88.61711 82.00751 [7] 81.21847 45.36735 107.19361 44.34960 > rowSd(tmp5,na.rm=TRUE) [1] 91.869716 7.587396 8.665615 9.140087 9.413666 9.055800 9.012129 [8] 6.735529 10.353435 6.659549 > rowMax(tmp5,na.rm=TRUE) [1] 468.21189 83.33546 84.14047 87.75830 91.39144 87.84349 86.01158 [8] 82.84227 88.16363 82.44172 > rowMin(tmp5,na.rm=TRUE) [1] 53.16422 60.41345 57.53284 57.14465 53.91133 58.62503 54.47689 54.22936 [9] 57.38173 59.15564 > > colMeans(tmp5,na.rm=TRUE) [1] 112.88562 71.71000 66.88984 70.15046 73.14936 71.11343 73.95578 [8] 71.51734 70.47041 72.01130 69.78325 72.63284 70.08345 68.36739 [15] 68.67326 74.24579 65.43712 68.53392 72.47557 71.55722 > colSums(tmp5,na.rm=TRUE) [1] 1128.8562 717.1000 668.8984 701.5046 731.4936 711.1343 739.5578 [8] 715.1734 704.7041 720.1130 697.8325 726.3284 630.7511 683.6739 [15] 686.7326 742.4579 654.3712 685.3392 724.7557 715.5722 > colVars(tmp5,na.rm=TRUE) [1] 15634.79822 87.69656 71.86925 58.58377 58.95927 75.09157 [7] 53.64122 74.09408 49.78377 91.71837 51.41022 49.40376 [13] 43.78012 103.60678 113.25235 102.61013 48.81059 83.81619 [19] 104.11327 70.81815 > colSd(tmp5,na.rm=TRUE) [1] 125.039187 9.364644 8.477574 7.654003 7.678494 8.665539 [7] 7.324017 8.607792 7.055761 9.576971 7.170092 7.028781 [13] 6.616655 10.178741 10.642009 10.129666 6.986458 9.155118 [19] 10.203591 8.415352 > colMax(tmp5,na.rm=TRUE) [1] 468.21189 87.75830 78.67364 81.34715 82.83575 91.39144 86.01158 [8] 86.92430 82.29062 88.16363 78.21468 82.85899 80.62127 82.99411 [15] 85.65971 87.84349 75.38133 82.92439 87.59690 85.60843 > colMin(tmp5,na.rm=TRUE) [1] 61.25899 61.41018 53.16422 57.38173 57.75560 62.12973 64.84148 61.21152 [9] 60.86109 60.08549 57.11048 61.54413 59.15564 57.39513 54.22936 53.91133 [17] 54.47689 56.83901 59.73391 58.62503 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] NaN 72.60064 71.95732 72.59503 70.40972 72.26513 70.38508 69.51885 [9] 69.53452 69.49661 > rowSums(tmp5,na.rm=TRUE) [1] 0.000 1452.013 1439.146 1451.901 1408.194 1445.303 1407.702 1390.377 [9] 1390.690 1389.932 > rowVars(tmp5,na.rm=TRUE) [1] NA 57.56858 75.09288 83.54120 88.61711 82.00751 81.21847 [8] 45.36735 107.19361 44.34960 > rowSd(tmp5,na.rm=TRUE) [1] NA 7.587396 8.665615 9.140087 9.413666 9.055800 9.012129 [8] 6.735529 10.353435 6.659549 > rowMax(tmp5,na.rm=TRUE) [1] NA 83.33546 84.14047 87.75830 91.39144 87.84349 86.01158 82.84227 [9] 88.16363 82.44172 > rowMin(tmp5,na.rm=TRUE) [1] NA 60.41345 57.53284 57.14465 53.91133 58.62503 54.47689 54.22936 [9] 57.38173 59.15564 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 73.40492 72.40717 68.41491 69.97946 73.49829 70.49711 73.77468 71.44477 [9] 71.04226 73.33639 69.86765 72.32976 NaN 68.82992 67.90241 74.32430 [17] 65.27055 69.83336 71.22617 72.00559 > colSums(tmp5,na.rm=TRUE) [1] 660.6443 651.6646 615.7342 629.8152 661.4846 634.4740 663.9722 643.0029 [9] 639.3803 660.0275 628.8089 650.9678 0.0000 619.4693 611.1217 668.9187 [17] 587.4349 628.5002 641.0356 648.0503 > colVars(tmp5,na.rm=TRUE) [1] 53.48725 93.19062 54.68726 65.57778 64.95942 80.20468 59.97744 [8] 83.29660 52.32781 83.42969 57.75636 54.54583 NA 114.15089 [15] 120.72406 115.36704 54.59977 75.29724 99.56613 77.40874 > colSd(tmp5,na.rm=TRUE) [1] 7.313498 9.653529 7.395084 8.098011 8.059740 8.955707 7.744510 [8] 9.126697 7.233796 9.133985 7.599760 7.385515 NA 10.684142 [15] 10.987450 10.740905 7.389166 8.677398 9.978283 8.798224 > colMax(tmp5,na.rm=TRUE) [1] 83.29099 87.75830 78.67364 81.34715 82.83575 91.39144 86.01158 86.92430 [9] 82.29062 88.16363 78.21468 82.85899 -Inf 82.99411 85.65971 87.84349 [17] 75.38133 82.92439 87.59690 85.60843 > colMin(tmp5,na.rm=TRUE) [1] 61.25899 61.41018 59.24863 57.38173 57.75560 62.12973 64.84148 61.21152 [9] 60.86109 60.75620 57.11048 61.54413 Inf 57.39513 54.22936 53.91133 [17] 54.47689 57.14465 59.73391 58.62503 > > > > > 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] 235.9779 213.6254 325.9559 253.8223 232.3358 215.3097 189.2443 245.2031 [9] 307.7701 128.8029 > apply(copymatrix,1,var,na.rm=TRUE) [1] 235.9779 213.6254 325.9559 253.8223 232.3358 215.3097 189.2443 245.2031 [9] 307.7701 128.8029 > > > > 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] -4.263256e-14 -2.842171e-14 1.136868e-13 0.000000e+00 -4.263256e-14 [6] 5.684342e-14 2.842171e-14 2.842171e-14 -1.421085e-14 -5.684342e-14 [11] -5.684342e-14 -1.421085e-13 1.421085e-13 -1.136868e-13 -2.842171e-13 [16] -1.989520e-13 -7.105427e-14 -2.842171e-14 1.136868e-13 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) + } 7 5 4 7 7 2 5 8 2 15 6 4 1 12 8 20 5 16 2 17 10 11 6 20 3 14 8 15 8 10 6 4 9 11 8 5 9 15 4 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.2904 > Min(tmp) [1] -2.252836 > mean(tmp) [1] -0.009685585 > Sum(tmp) [1] -0.9685585 > Var(tmp) [1] 1.239468 > > rowMeans(tmp) [1] -0.009685585 > rowSums(tmp) [1] -0.9685585 > rowVars(tmp) [1] 1.239468 > rowSd(tmp) [1] 1.113314 > rowMax(tmp) [1] 2.2904 > rowMin(tmp) [1] -2.252836 > > colMeans(tmp) [1] -0.932890700 -1.424520794 0.986484160 1.227161972 -2.227612638 [6] 0.771461306 0.181190304 -0.541223098 -0.877264008 0.972358796 [11] 0.089318657 -0.841835423 -2.047504080 1.066570359 -0.913453149 [16] -0.346030710 -0.722683390 -1.089577144 -0.233516215 -0.471470145 [21] -1.044209638 0.275736213 1.873724823 0.311785220 -0.327808053 [26] 1.424213779 -0.896950060 -1.023499421 -0.005082096 0.415303877 [31] -1.349671183 -0.033120824 -0.016513158 1.383433415 1.344738561 [36] -0.101071015 -0.790728046 0.765264430 0.033461179 1.524690999 [41] 0.355830754 -0.422702877 -2.022852621 -0.900791488 0.760478355 [46] -0.113171307 -1.584547574 -1.385474980 0.893274960 -0.136723641 [51] -0.774988214 0.167517430 -1.991166402 1.057562862 -1.169292270 [56] -0.332983582 2.007670561 0.581558493 2.290399873 -1.798815511 [61] 1.897823217 0.309155739 -1.089943861 -2.252836365 1.828546189 [66] -1.116882665 1.742926705 -0.219931717 2.093904476 1.875024139 [71] 1.037560972 -1.450959853 0.076449679 -1.022636348 -0.253010403 [76] 1.674211979 -1.106355540 1.357995241 0.527565867 -0.612061542 [81] 1.335147600 1.256206945 1.321434195 0.161822794 0.245740804 [86] -0.635145700 1.392181870 -0.431998772 0.735814323 0.099614513 [91] -0.064455392 -0.651315133 -1.171362813 0.592096999 -0.014460074 [96] -1.912337529 0.443691582 -0.827095901 0.393013757 -0.403144322 > colSums(tmp) [1] -0.932890700 -1.424520794 0.986484160 1.227161972 -2.227612638 [6] 0.771461306 0.181190304 -0.541223098 -0.877264008 0.972358796 [11] 0.089318657 -0.841835423 -2.047504080 1.066570359 -0.913453149 [16] -0.346030710 -0.722683390 -1.089577144 -0.233516215 -0.471470145 [21] -1.044209638 0.275736213 1.873724823 0.311785220 -0.327808053 [26] 1.424213779 -0.896950060 -1.023499421 -0.005082096 0.415303877 [31] -1.349671183 -0.033120824 -0.016513158 1.383433415 1.344738561 [36] -0.101071015 -0.790728046 0.765264430 0.033461179 1.524690999 [41] 0.355830754 -0.422702877 -2.022852621 -0.900791488 0.760478355 [46] -0.113171307 -1.584547574 -1.385474980 0.893274960 -0.136723641 [51] -0.774988214 0.167517430 -1.991166402 1.057562862 -1.169292270 [56] -0.332983582 2.007670561 0.581558493 2.290399873 -1.798815511 [61] 1.897823217 0.309155739 -1.089943861 -2.252836365 1.828546189 [66] -1.116882665 1.742926705 -0.219931717 2.093904476 1.875024139 [71] 1.037560972 -1.450959853 0.076449679 -1.022636348 -0.253010403 [76] 1.674211979 -1.106355540 1.357995241 0.527565867 -0.612061542 [81] 1.335147600 1.256206945 1.321434195 0.161822794 0.245740804 [86] -0.635145700 1.392181870 -0.431998772 0.735814323 0.099614513 [91] -0.064455392 -0.651315133 -1.171362813 0.592096999 -0.014460074 [96] -1.912337529 0.443691582 -0.827095901 0.393013757 -0.403144322 > 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.932890700 -1.424520794 0.986484160 1.227161972 -2.227612638 [6] 0.771461306 0.181190304 -0.541223098 -0.877264008 0.972358796 [11] 0.089318657 -0.841835423 -2.047504080 1.066570359 -0.913453149 [16] -0.346030710 -0.722683390 -1.089577144 -0.233516215 -0.471470145 [21] -1.044209638 0.275736213 1.873724823 0.311785220 -0.327808053 [26] 1.424213779 -0.896950060 -1.023499421 -0.005082096 0.415303877 [31] -1.349671183 -0.033120824 -0.016513158 1.383433415 1.344738561 [36] -0.101071015 -0.790728046 0.765264430 0.033461179 1.524690999 [41] 0.355830754 -0.422702877 -2.022852621 -0.900791488 0.760478355 [46] -0.113171307 -1.584547574 -1.385474980 0.893274960 -0.136723641 [51] -0.774988214 0.167517430 -1.991166402 1.057562862 -1.169292270 [56] -0.332983582 2.007670561 0.581558493 2.290399873 -1.798815511 [61] 1.897823217 0.309155739 -1.089943861 -2.252836365 1.828546189 [66] -1.116882665 1.742926705 -0.219931717 2.093904476 1.875024139 [71] 1.037560972 -1.450959853 0.076449679 -1.022636348 -0.253010403 [76] 1.674211979 -1.106355540 1.357995241 0.527565867 -0.612061542 [81] 1.335147600 1.256206945 1.321434195 0.161822794 0.245740804 [86] -0.635145700 1.392181870 -0.431998772 0.735814323 0.099614513 [91] -0.064455392 -0.651315133 -1.171362813 0.592096999 -0.014460074 [96] -1.912337529 0.443691582 -0.827095901 0.393013757 -0.403144322 > colMin(tmp) [1] -0.932890700 -1.424520794 0.986484160 1.227161972 -2.227612638 [6] 0.771461306 0.181190304 -0.541223098 -0.877264008 0.972358796 [11] 0.089318657 -0.841835423 -2.047504080 1.066570359 -0.913453149 [16] -0.346030710 -0.722683390 -1.089577144 -0.233516215 -0.471470145 [21] -1.044209638 0.275736213 1.873724823 0.311785220 -0.327808053 [26] 1.424213779 -0.896950060 -1.023499421 -0.005082096 0.415303877 [31] -1.349671183 -0.033120824 -0.016513158 1.383433415 1.344738561 [36] -0.101071015 -0.790728046 0.765264430 0.033461179 1.524690999 [41] 0.355830754 -0.422702877 -2.022852621 -0.900791488 0.760478355 [46] -0.113171307 -1.584547574 -1.385474980 0.893274960 -0.136723641 [51] -0.774988214 0.167517430 -1.991166402 1.057562862 -1.169292270 [56] -0.332983582 2.007670561 0.581558493 2.290399873 -1.798815511 [61] 1.897823217 0.309155739 -1.089943861 -2.252836365 1.828546189 [66] -1.116882665 1.742926705 -0.219931717 2.093904476 1.875024139 [71] 1.037560972 -1.450959853 0.076449679 -1.022636348 -0.253010403 [76] 1.674211979 -1.106355540 1.357995241 0.527565867 -0.612061542 [81] 1.335147600 1.256206945 1.321434195 0.161822794 0.245740804 [86] -0.635145700 1.392181870 -0.431998772 0.735814323 0.099614513 [91] -0.064455392 -0.651315133 -1.171362813 0.592096999 -0.014460074 [96] -1.912337529 0.443691582 -0.827095901 0.393013757 -0.403144322 > colMedians(tmp) [1] -0.932890700 -1.424520794 0.986484160 1.227161972 -2.227612638 [6] 0.771461306 0.181190304 -0.541223098 -0.877264008 0.972358796 [11] 0.089318657 -0.841835423 -2.047504080 1.066570359 -0.913453149 [16] -0.346030710 -0.722683390 -1.089577144 -0.233516215 -0.471470145 [21] -1.044209638 0.275736213 1.873724823 0.311785220 -0.327808053 [26] 1.424213779 -0.896950060 -1.023499421 -0.005082096 0.415303877 [31] -1.349671183 -0.033120824 -0.016513158 1.383433415 1.344738561 [36] -0.101071015 -0.790728046 0.765264430 0.033461179 1.524690999 [41] 0.355830754 -0.422702877 -2.022852621 -0.900791488 0.760478355 [46] -0.113171307 -1.584547574 -1.385474980 0.893274960 -0.136723641 [51] -0.774988214 0.167517430 -1.991166402 1.057562862 -1.169292270 [56] -0.332983582 2.007670561 0.581558493 2.290399873 -1.798815511 [61] 1.897823217 0.309155739 -1.089943861 -2.252836365 1.828546189 [66] -1.116882665 1.742926705 -0.219931717 2.093904476 1.875024139 [71] 1.037560972 -1.450959853 0.076449679 -1.022636348 -0.253010403 [76] 1.674211979 -1.106355540 1.357995241 0.527565867 -0.612061542 [81] 1.335147600 1.256206945 1.321434195 0.161822794 0.245740804 [86] -0.635145700 1.392181870 -0.431998772 0.735814323 0.099614513 [91] -0.064455392 -0.651315133 -1.171362813 0.592096999 -0.014460074 [96] -1.912337529 0.443691582 -0.827095901 0.393013757 -0.403144322 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.9328907 -1.424521 0.9864842 1.227162 -2.227613 0.7714613 0.1811903 [2,] -0.9328907 -1.424521 0.9864842 1.227162 -2.227613 0.7714613 0.1811903 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.5412231 -0.877264 0.9723588 0.08931866 -0.8418354 -2.047504 1.06657 [2,] -0.5412231 -0.877264 0.9723588 0.08931866 -0.8418354 -2.047504 1.06657 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.9134531 -0.3460307 -0.7226834 -1.089577 -0.2335162 -0.4714701 -1.04421 [2,] -0.9134531 -0.3460307 -0.7226834 -1.089577 -0.2335162 -0.4714701 -1.04421 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.2757362 1.873725 0.3117852 -0.3278081 1.424214 -0.8969501 -1.023499 [2,] 0.2757362 1.873725 0.3117852 -0.3278081 1.424214 -0.8969501 -1.023499 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.005082096 0.4153039 -1.349671 -0.03312082 -0.01651316 1.383433 1.344739 [2,] -0.005082096 0.4153039 -1.349671 -0.03312082 -0.01651316 1.383433 1.344739 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.101071 -0.790728 0.7652644 0.03346118 1.524691 0.3558308 -0.4227029 [2,] -0.101071 -0.790728 0.7652644 0.03346118 1.524691 0.3558308 -0.4227029 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -2.022853 -0.9007915 0.7604784 -0.1131713 -1.584548 -1.385475 0.893275 [2,] -2.022853 -0.9007915 0.7604784 -0.1131713 -1.584548 -1.385475 0.893275 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -0.1367236 -0.7749882 0.1675174 -1.991166 1.057563 -1.169292 -0.3329836 [2,] -0.1367236 -0.7749882 0.1675174 -1.991166 1.057563 -1.169292 -0.3329836 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [,64] [1,] 2.007671 0.5815585 2.2904 -1.798816 1.897823 0.3091557 -1.089944 -2.252836 [2,] 2.007671 0.5815585 2.2904 -1.798816 1.897823 0.3091557 -1.089944 -2.252836 [,65] [,66] [,67] [,68] [,69] [,70] [,71] [,72] [1,] 1.828546 -1.116883 1.742927 -0.2199317 2.093904 1.875024 1.037561 -1.45096 [2,] 1.828546 -1.116883 1.742927 -0.2199317 2.093904 1.875024 1.037561 -1.45096 [,73] [,74] [,75] [,76] [,77] [,78] [,79] [1,] 0.07644968 -1.022636 -0.2530104 1.674212 -1.106356 1.357995 0.5275659 [2,] 0.07644968 -1.022636 -0.2530104 1.674212 -1.106356 1.357995 0.5275659 [,80] [,81] [,82] [,83] [,84] [,85] [,86] [1,] -0.6120615 1.335148 1.256207 1.321434 0.1618228 0.2457408 -0.6351457 [2,] -0.6120615 1.335148 1.256207 1.321434 0.1618228 0.2457408 -0.6351457 [,87] [,88] [,89] [,90] [,91] [,92] [,93] [1,] 1.392182 -0.4319988 0.7358143 0.09961451 -0.06445539 -0.6513151 -1.171363 [2,] 1.392182 -0.4319988 0.7358143 0.09961451 -0.06445539 -0.6513151 -1.171363 [,94] [,95] [,96] [,97] [,98] [,99] [,100] [1,] 0.592097 -0.01446007 -1.912338 0.4436916 -0.8270959 0.3930138 -0.4031443 [2,] 0.592097 -0.01446007 -1.912338 0.4436916 -0.8270959 0.3930138 -0.4031443 > > > Max(tmp2) [1] 2.380572 > Min(tmp2) [1] -2.41149 > mean(tmp2) [1] 0.1072231 > Sum(tmp2) [1] 10.72231 > Var(tmp2) [1] 0.9474531 > > rowMeans(tmp2) [1] -0.125746896 -0.246185912 -1.141792470 -2.264268663 -1.224545997 [6] 1.660457219 -0.378481326 -0.464899413 -0.621952823 -1.204924199 [11] -0.739550404 1.013091253 0.476315245 0.317206976 0.727907992 [16] -0.004046148 1.241208315 1.195122034 -0.057603012 -0.253013938 [21] 0.441599776 1.050385382 0.028723368 -0.082213670 -2.411490057 [26] 0.453985314 0.320537982 -0.023976443 -1.588399410 0.187206964 [31] 0.071030536 -0.502910433 1.372713473 0.130266793 0.971312698 [36] 0.978706250 -1.118726417 0.503623731 0.688493787 -0.209077168 [41] 0.178925848 1.781202359 -0.559797991 0.000784325 -0.325181513 [46] -1.267020904 1.743413952 0.125980655 0.017773708 0.455635609 [51] 0.156699919 -0.603606496 -1.155543218 2.153653076 0.952223254 [56] -0.520343808 1.164152500 -0.354038289 -0.641463997 -1.667561809 [61] -0.218904273 -0.091361430 0.040432451 1.003247452 0.248043516 [66] -0.113843933 0.684813227 2.075522422 -1.320142855 -1.032437359 [71] 1.364663437 -1.091679803 0.766395538 1.299253801 -0.763098577 [76] 1.440231746 0.396341499 -0.727136336 1.026518708 -0.491046170 [81] 0.038951028 0.158164805 0.144987976 0.613317569 -0.740579414 [86] 0.238138691 2.380572192 -0.059964281 -0.743668150 2.320117577 [91] -0.097504044 -0.683905790 -1.152071064 0.217682306 -0.179337295 [96] 1.287102757 0.594865332 1.223322160 -1.295560412 1.159888821 > rowSums(tmp2) [1] -0.125746896 -0.246185912 -1.141792470 -2.264268663 -1.224545997 [6] 1.660457219 -0.378481326 -0.464899413 -0.621952823 -1.204924199 [11] -0.739550404 1.013091253 0.476315245 0.317206976 0.727907992 [16] -0.004046148 1.241208315 1.195122034 -0.057603012 -0.253013938 [21] 0.441599776 1.050385382 0.028723368 -0.082213670 -2.411490057 [26] 0.453985314 0.320537982 -0.023976443 -1.588399410 0.187206964 [31] 0.071030536 -0.502910433 1.372713473 0.130266793 0.971312698 [36] 0.978706250 -1.118726417 0.503623731 0.688493787 -0.209077168 [41] 0.178925848 1.781202359 -0.559797991 0.000784325 -0.325181513 [46] -1.267020904 1.743413952 0.125980655 0.017773708 0.455635609 [51] 0.156699919 -0.603606496 -1.155543218 2.153653076 0.952223254 [56] -0.520343808 1.164152500 -0.354038289 -0.641463997 -1.667561809 [61] -0.218904273 -0.091361430 0.040432451 1.003247452 0.248043516 [66] -0.113843933 0.684813227 2.075522422 -1.320142855 -1.032437359 [71] 1.364663437 -1.091679803 0.766395538 1.299253801 -0.763098577 [76] 1.440231746 0.396341499 -0.727136336 1.026518708 -0.491046170 [81] 0.038951028 0.158164805 0.144987976 0.613317569 -0.740579414 [86] 0.238138691 2.380572192 -0.059964281 -0.743668150 2.320117577 [91] -0.097504044 -0.683905790 -1.152071064 0.217682306 -0.179337295 [96] 1.287102757 0.594865332 1.223322160 -1.295560412 1.159888821 > 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.125746896 -0.246185912 -1.141792470 -2.264268663 -1.224545997 [6] 1.660457219 -0.378481326 -0.464899413 -0.621952823 -1.204924199 [11] -0.739550404 1.013091253 0.476315245 0.317206976 0.727907992 [16] -0.004046148 1.241208315 1.195122034 -0.057603012 -0.253013938 [21] 0.441599776 1.050385382 0.028723368 -0.082213670 -2.411490057 [26] 0.453985314 0.320537982 -0.023976443 -1.588399410 0.187206964 [31] 0.071030536 -0.502910433 1.372713473 0.130266793 0.971312698 [36] 0.978706250 -1.118726417 0.503623731 0.688493787 -0.209077168 [41] 0.178925848 1.781202359 -0.559797991 0.000784325 -0.325181513 [46] -1.267020904 1.743413952 0.125980655 0.017773708 0.455635609 [51] 0.156699919 -0.603606496 -1.155543218 2.153653076 0.952223254 [56] -0.520343808 1.164152500 -0.354038289 -0.641463997 -1.667561809 [61] -0.218904273 -0.091361430 0.040432451 1.003247452 0.248043516 [66] -0.113843933 0.684813227 2.075522422 -1.320142855 -1.032437359 [71] 1.364663437 -1.091679803 0.766395538 1.299253801 -0.763098577 [76] 1.440231746 0.396341499 -0.727136336 1.026518708 -0.491046170 [81] 0.038951028 0.158164805 0.144987976 0.613317569 -0.740579414 [86] 0.238138691 2.380572192 -0.059964281 -0.743668150 2.320117577 [91] -0.097504044 -0.683905790 -1.152071064 0.217682306 -0.179337295 [96] 1.287102757 0.594865332 1.223322160 -1.295560412 1.159888821 > rowMin(tmp2) [1] -0.125746896 -0.246185912 -1.141792470 -2.264268663 -1.224545997 [6] 1.660457219 -0.378481326 -0.464899413 -0.621952823 -1.204924199 [11] -0.739550404 1.013091253 0.476315245 0.317206976 0.727907992 [16] -0.004046148 1.241208315 1.195122034 -0.057603012 -0.253013938 [21] 0.441599776 1.050385382 0.028723368 -0.082213670 -2.411490057 [26] 0.453985314 0.320537982 -0.023976443 -1.588399410 0.187206964 [31] 0.071030536 -0.502910433 1.372713473 0.130266793 0.971312698 [36] 0.978706250 -1.118726417 0.503623731 0.688493787 -0.209077168 [41] 0.178925848 1.781202359 -0.559797991 0.000784325 -0.325181513 [46] -1.267020904 1.743413952 0.125980655 0.017773708 0.455635609 [51] 0.156699919 -0.603606496 -1.155543218 2.153653076 0.952223254 [56] -0.520343808 1.164152500 -0.354038289 -0.641463997 -1.667561809 [61] -0.218904273 -0.091361430 0.040432451 1.003247452 0.248043516 [66] -0.113843933 0.684813227 2.075522422 -1.320142855 -1.032437359 [71] 1.364663437 -1.091679803 0.766395538 1.299253801 -0.763098577 [76] 1.440231746 0.396341499 -0.727136336 1.026518708 -0.491046170 [81] 0.038951028 0.158164805 0.144987976 0.613317569 -0.740579414 [86] 0.238138691 2.380572192 -0.059964281 -0.743668150 2.320117577 [91] -0.097504044 -0.683905790 -1.152071064 0.217682306 -0.179337295 [96] 1.287102757 0.594865332 1.223322160 -1.295560412 1.159888821 > > colMeans(tmp2) [1] 0.1072231 > colSums(tmp2) [1] 10.72231 > colVars(tmp2) [1] 0.9474531 > colSd(tmp2) [1] 0.973372 > colMax(tmp2) [1] 2.380572 > colMin(tmp2) [1] -2.41149 > colMedians(tmp2) [1] 0.03969174 > colRanges(tmp2) [,1] [1,] -2.411490 [2,] 2.380572 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 0.40809328 -2.10646291 -0.84267821 -3.17124318 -0.42883546 2.38022283 [7] -0.33549840 -2.76597272 -0.03313334 3.79072611 > colApply(tmp,quantile)[,1] [,1] [1,] -1.8181993 [2,] -0.8904425 [3,] 0.1693863 [4,] 1.1404908 [5,] 1.7346804 > > rowApply(tmp,sum) [1] 4.2313178 -0.2760208 -3.5363130 0.7494300 3.0641685 -0.9386463 [7] 1.3636766 -4.2932202 -2.4180897 -1.0510848 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 10 10 1 1 7 9 8 5 5 3 [2,] 6 4 7 3 9 2 6 9 1 5 [3,] 4 2 4 8 3 4 10 1 4 9 [4,] 8 9 6 2 2 7 1 7 3 1 [5,] 9 1 10 9 6 1 3 6 7 7 [6,] 2 5 9 6 8 8 4 10 2 4 [7,] 7 3 5 7 10 3 5 2 8 2 [8,] 1 7 2 4 5 5 7 3 9 8 [9,] 3 8 3 10 4 6 2 4 10 6 [10,] 5 6 8 5 1 10 9 8 6 10 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.6107767 -0.5045434 -1.7334257 3.8153527 -0.7795874 0.7222193 [7] 2.1510306 1.4042781 -1.4440982 1.8288715 2.4406609 1.1517638 [13] -1.5986278 0.5525145 0.9339503 -0.1326875 -0.4960688 -3.8844614 [19] -2.7581799 2.4412555 > colApply(tmp,quantile)[,1] [,1] [1,] -1.0800451 [2,] -0.9155678 [3,] -0.3216064 [4,] 0.8489437 [5,] 3.0790524 > > rowApply(tmp,sum) [1] 2.6441390 -5.4695221 4.3455670 3.9147364 0.2860737 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 20 6 13 5 4 [2,] 5 11 10 20 6 [3,] 12 1 5 18 9 [4,] 19 4 4 19 19 [5,] 15 8 3 4 13 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 3.0790524 -1.06223166 -0.02360903 2.9029484 0.7324861 -0.8279412 [2,] -0.9155678 -0.15963703 -1.73732410 -1.2270424 -0.5222194 -1.3652064 [3,] 0.8489437 0.05765667 -0.65407265 -0.8012403 -1.1445305 1.4595455 [4,] -0.3216064 1.24966948 1.14406161 1.1747776 -0.3603120 0.7355074 [5,] -1.0800451 -0.59000083 -0.46248149 1.7659094 0.5149884 0.7203140 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.2290328 -1.8301726 -1.248515727 1.19393207 1.9995035 -0.6095085 [2,] 0.8747394 0.5246457 0.529882091 0.19098822 -0.1612941 -1.4381533 [3,] 0.5063703 1.0989985 -0.001583817 -0.43379658 1.7355249 2.3806770 [4,] -0.5957083 -0.2002418 0.275392962 0.08748345 0.5910226 0.3821148 [5,] 1.5946621 1.8110484 -0.999273683 0.79026436 -1.7240960 0.4366339 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.4483792 -0.05051903 -1.40578371 -0.6564459 -1.4433041 1.6568985 [2,] -0.1129260 -0.00432642 -0.09973214 -0.6929889 0.8058619 -0.9184526 [3,] 1.2599676 -1.14740930 0.85777467 1.2326929 -0.5942215 -2.1443016 [4,] -2.7145360 0.97842999 0.27049820 0.4520109 1.1214837 -1.2593436 [5,] -0.4795126 0.77633925 1.31119328 -0.4679565 -0.3858888 -1.2192621 [,19] [,20] [1,] -0.6339030 0.6519061 [2,] -0.4832609 1.4424920 [3,] -0.4284488 0.2570204 [4,] 0.4297760 0.4742559 [5,] -1.6423432 -0.3844188 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 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.21-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.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -2.364527 0.778412 0.2391404 0.2332343 0.5352599 -0.8170998 0.5516349 col8 col9 col10 col11 col12 col13 col14 row1 -1.49035 0.6924898 0.3786656 -0.4895262 1.605236 0.3552704 0.4879174 col15 col16 col17 col18 col19 col20 row1 1.250434 2.19257 -1.011877 -0.08641141 1.295958 0.6993516 > tmp[,"col10"] col10 row1 0.3786656 row2 0.4597676 row3 0.4871001 row4 -0.5014644 row5 -0.6611857 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -2.3645269 0.778412 0.2391404 0.2332343 0.5352599 -0.8170998 0.5516349 row5 0.9195632 -1.500705 -0.2916061 -0.2855189 -0.2069536 -0.2610830 0.5220580 col8 col9 col10 col11 col12 col13 col14 row1 -1.490350 0.6924898 0.3786656 -0.4895262 1.6052361 0.3552704 0.4879174 row5 -1.042397 1.8062713 -0.6611857 2.1329860 -0.8139811 -0.3433878 -1.2695045 col15 col16 col17 col18 col19 col20 row1 1.250434 2.1925704 -1.0118770 -0.08641141 1.2959585 0.6993516 row5 -1.037062 -0.2970891 -0.8527455 0.70908024 0.9553228 0.9060239 > tmp[,c("col6","col20")] col6 col20 row1 -0.8170998 0.6993516 row2 0.3361525 1.9247494 row3 -2.0703259 0.9874407 row4 1.5010322 0.4364351 row5 -0.2610830 0.9060239 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.8170998 0.6993516 row5 -0.2610830 0.9060239 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.83519 48.2675 50.9754 50.15523 50.40935 104.6493 52.06245 50.09163 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.14192 50.88948 50.17677 49.7341 49.91432 49.27492 50.20491 49.41323 col17 col18 col19 col20 row1 49.93716 50.40899 48.25763 103.4339 > tmp[,"col10"] col10 row1 50.88948 row2 29.76454 row3 29.10366 row4 30.78712 row5 47.63224 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.83519 48.2675 50.97540 50.15523 50.40935 104.6493 52.06245 50.09163 row5 48.89090 51.6477 49.32175 49.57959 49.66406 105.2038 51.17430 50.59826 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.14192 50.88948 50.17677 49.73410 49.91432 49.27492 50.20491 49.41323 row5 50.70668 47.63224 51.38907 47.43839 49.55354 50.97989 50.57901 48.62640 col17 col18 col19 col20 row1 49.93716 50.40899 48.25763 103.4339 row5 49.51321 49.63789 50.26374 104.9484 > tmp[,c("col6","col20")] col6 col20 row1 104.64929 103.43388 row2 74.91437 74.92730 row3 75.72908 73.58376 row4 74.83880 74.23855 row5 105.20384 104.94845 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.6493 103.4339 row5 105.2038 104.9484 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.6493 103.4339 row5 105.2038 104.9484 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 1.7255193 [2,] -0.4694046 [3,] 0.3520960 [4,] 1.3990887 [5,] -0.8738598 > tmp[,c("col17","col7")] col17 col7 [1,] 0.6141980 0.1347744 [2,] -0.7820025 -0.1729442 [3,] 0.1634100 0.4171432 [4,] -1.6214183 1.5361776 [5,] 0.5604923 -0.3952626 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -1.4528927 1.46819881 [2,] 2.5795663 -0.57818967 [3,] -0.1154568 -0.54582312 [4,] 0.1802801 0.05378329 [5,] 1.1863722 -0.24552215 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -1.452893 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -1.452893 [2,] 2.579566 > > > > 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.8048254 -1.38214382 1.3571830 -1.661429 1.7993064 -0.4508771 0.4301405 row1 0.1335623 -0.09371123 0.7923764 -1.039153 0.8085902 -1.5357737 -1.0018985 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 -0.1679109 -1.998197 -1.9288648 -0.9649101 -0.5581941 1.4953959 1.595552 row1 1.6310848 1.121789 0.4720354 1.6630544 1.5691744 -0.7106697 1.155109 [,15] [,16] [,17] [,18] [,19] [,20] row3 -1.5376378 -0.2079671 -0.0003622226 0.2535305 -0.213935 -0.3248400 row1 0.7880838 0.4506142 -0.6101627089 -0.4170029 0.111168 -0.5916486 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.7726821 1.069027 -0.8435114 -0.1876013 -2.069253 -0.0268644 -0.4895439 [,8] [,9] [,10] row2 -1.869728 0.8080458 -1.782691 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.5805147 1.037564 -0.6500481 0.6299913 -0.4232557 -1.952331 1.35902 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -2.031554 1.491267 0.5882239 -1.777625 0.2153719 0.291719 0.4503244 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.1475651 0.3503762 0.9347832 -0.369386 0.5048066 -0.007451776 > > > 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: 0x589267523030> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f160d312c" [2] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f3243387a" [3] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f630fb587" [4] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f64dea001" [5] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f4e4dbfef" [6] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f4a3ff156" [7] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f4dff49cf" [8] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f12f9fdf3" [9] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f139dc141" [10] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8fe74028e" [11] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f722e1333" [12] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f69f42dbf" [13] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f20b1d4c" [14] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f2f196fad" [15] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM32ba8f1f17f05" > > > ### 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: 0x58926823d360> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x58926823d360> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x58926823d360> > rowMedians(tmp) [1] -3.994873e-01 3.316896e-02 3.182740e-01 1.018797e-02 1.865763e-02 [6] 3.369172e-01 2.575015e-02 8.496026e-02 1.341224e-02 -1.502792e-01 [11] -1.152249e-01 -4.275043e-01 1.704766e-01 -2.474852e-01 -1.548513e-01 [16] -1.793298e-01 -2.331028e-01 1.243490e-01 -1.545379e-01 -7.381012e-02 [21] 1.904624e-01 -4.217081e-02 -4.470701e-02 -1.643551e-01 3.321418e-01 [26] 2.885932e-01 4.176632e-01 -4.062645e-01 4.849769e-01 -9.640796e-03 [31] 6.453603e-01 -4.747041e-01 6.018638e-02 -9.089018e-02 -1.168405e-01 [36] 8.531919e-01 2.960054e-01 6.020162e-02 1.433549e-01 1.749074e-01 [41] 5.262484e-01 -2.566669e-01 -1.269917e-01 -3.993719e-01 2.197047e-01 [46] -5.298781e-01 2.855536e-01 3.699322e-01 -1.176849e-01 -5.028959e-01 [51] -1.356404e-01 -2.597528e-01 -3.478578e-01 1.425896e-01 -3.341449e-01 [56] 4.699580e-01 -2.676080e-01 -3.612616e-03 3.403700e-01 -4.542577e-01 [61] 1.286967e-01 -3.347547e-01 4.581927e-01 -1.269933e-01 -3.787655e-01 [66] -8.493312e-02 -3.251652e-01 1.585681e-01 -4.141943e-02 3.233561e-01 [71] 1.594664e-01 5.560664e-03 2.740218e-01 2.292689e-01 -1.396799e-01 [76] -2.006042e-01 1.715451e-01 -2.209055e-01 3.301943e-01 1.654286e-01 [81] -7.825698e-02 7.369208e-02 -2.583221e-02 1.100120e-01 -3.413989e-01 [86] -1.291450e-01 -3.760162e-01 4.346766e-01 3.957253e-01 2.521624e-01 [91] -2.980607e-01 1.495709e-01 -1.895198e-01 6.652847e-02 3.062740e-01 [96] 8.636351e-02 2.900661e-01 1.140558e-01 4.074061e-02 3.190673e-02 [101] 7.043453e-02 1.898281e-01 -5.092803e-01 1.216012e-01 4.769960e-01 [106] -2.079069e-01 -1.609237e-01 3.091339e-02 -1.998002e-01 7.058868e-01 [111] -5.729287e-01 -1.984277e-01 1.289974e-02 2.101039e-01 -9.945830e-02 [116] 2.117795e-01 2.622778e-01 -3.246318e-01 9.435487e-02 5.483341e-01 [121] -1.905465e-02 4.608992e-01 -3.399154e-01 -5.303136e-02 1.270255e-01 [126] 6.028755e-01 9.214092e-02 -6.811363e-03 -1.050644e-01 -1.586570e-01 [131] 1.785614e-01 9.025879e-02 -4.526660e-01 1.265760e-01 1.270020e-01 [136] 3.998768e-01 -2.397599e-01 4.506795e-01 2.565632e-01 -2.244825e-01 [141] 1.682360e-01 -2.314750e-01 -1.712370e-01 1.914943e-01 1.990700e-01 [146] -1.882603e-03 2.290490e-01 -1.566636e-01 -3.961365e-01 4.321702e-01 [151] -4.677261e-01 -4.730446e-01 3.626580e-01 -9.767975e-02 1.728350e-01 [156] 4.410843e-01 -2.396884e-01 -2.098791e-01 2.601105e-01 1.636141e-01 [161] -3.567124e-01 3.229937e-01 -1.057717e-01 2.808091e-01 1.202459e-01 [166] 3.739686e-01 5.791024e-01 -5.500352e-01 2.721478e-01 1.011738e-01 [171] 1.465900e-01 -1.142458e-02 2.494364e-01 2.809855e-02 1.351046e-01 [176] -2.395545e-01 1.823785e-03 -5.964241e-02 8.872832e-02 7.328962e-02 [181] 7.669669e-05 1.005914e-02 -3.728924e-01 2.622129e-01 1.263069e-01 [186] -9.751612e-02 1.653129e-01 1.184133e-01 1.334346e-01 1.830406e-01 [191] 2.423734e-01 -3.855599e-01 5.945305e-01 -4.117978e-01 1.170741e-01 [196] -1.070733e-01 1.952313e-01 -5.013083e-01 1.676824e-01 1.796828e-01 [201] -2.926604e-01 -1.608757e-01 1.900173e-01 1.207827e-01 -3.065847e-01 [206] 1.068680e-01 3.245055e-01 8.245016e-01 3.542767e-01 5.439709e-02 [211] 7.136162e-02 -1.509236e-02 -5.692070e-02 4.344072e-01 1.386081e-01 [216] -5.605231e-01 -1.460530e-02 -2.591442e-01 3.400779e-01 2.343686e-01 [221] -3.462549e-02 3.134914e-01 -1.149090e-01 3.494541e-01 1.269340e-01 [226] -5.035891e-01 5.989662e-02 4.116150e-01 9.815403e-02 -1.126953e-01 > > proc.time() user system elapsed 1.349 1.494 2.835
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: 0x645a2ef50ad0> > .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: 0x645a2ef50ad0> > .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: 0x645a2ef50ad0> > .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: 0x645a2ef50ad0> > 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: 0x645a2ef42a30> > .Call("R_bm_AddColumn",P) <pointer: 0x645a2ef42a30> > .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: 0x645a2ef42a30> > .Call("R_bm_AddColumn",P) <pointer: 0x645a2ef42a30> > .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: 0x645a2ef42a30> > 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: 0x645a2dd0e870> > .Call("R_bm_AddColumn",P) <pointer: 0x645a2dd0e870> > .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: 0x645a2dd0e870> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x645a2dd0e870> > .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: 0x645a2dd0e870> > > .Call("R_bm_RowMode",P) <pointer: 0x645a2dd0e870> > .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: 0x645a2dd0e870> > > .Call("R_bm_ColMode",P) <pointer: 0x645a2dd0e870> > .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: 0x645a2dd0e870> > 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: 0x645a2e11f1a0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x645a2e11f1a0> > .Call("R_bm_AddColumn",P) <pointer: 0x645a2e11f1a0> > .Call("R_bm_AddColumn",P) <pointer: 0x645a2e11f1a0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile32bc8a105384eb" "BufferedMatrixFile32bc8a63893231" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile32bc8a105384eb" "BufferedMatrixFile32bc8a63893231" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x645a302c9870> > .Call("R_bm_AddColumn",P) <pointer: 0x645a302c9870> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x645a302c9870> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x645a302c9870> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x645a302c9870> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x645a302c9870> > .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: 0x645a2e71dca0> > .Call("R_bm_AddColumn",P) <pointer: 0x645a2e71dca0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x645a2e71dca0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x645a2e71dca0> > 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: 0x645a2eed0a20> > .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: 0x645a2eed0a20> > rm(P) > > proc.time() user system elapsed 0.239 0.056 0.283
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.1 (2025-06-13) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.231 0.052 0.272