Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-10-16 11:37 -0400 (Thu, 16 Oct 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" | 4833 |
merida1 | macOS 12.7.6 Monterey | x86_64 | 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" | 4614 |
kjohnson1 | macOS 13.7.5 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4555 |
kunpeng2 | Linux (openEuler 24.03 LTS) | aarch64 | R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" | 4586 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 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 | ![]() | ||||||||
merida1 | macOS 12.7.6 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson1 | macOS 13.7.5 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-10-15 21:22:25 -0400 (Wed, 15 Oct 2025) |
EndedAt: 2025-10-15 21:22:50 -0400 (Wed, 15 Oct 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.254 0.044 0.288
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 Oct 15 21:22: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 Oct 15 21:22: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: 0x634502cabad0> > > > > 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 Oct 15 21:22:41 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 Oct 15 21:22:41 2025" > > ColMode(tmp2) <pointer: 0x634502cabad0> > > > > ### 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.3316731 0.29340074 -0.98528976 1.31195272 [2,] 0.6042174 -0.03549957 -0.98609145 0.40520908 [3,] -1.0320698 -0.66606159 -0.05320907 -0.08555469 [4,] 0.2413118 -0.53755230 1.72626500 1.08975944 > 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.3316731 0.29340074 0.98528976 1.31195272 [2,] 0.6042174 0.03549957 0.98609145 0.40520908 [3,] 1.0320698 0.66606159 0.05320907 0.08555469 [4,] 0.2413118 0.53755230 1.72626500 1.08975944 > 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.9665276 0.5416648 0.9926176 1.1454050 [2,] 0.7773142 0.1884133 0.9930214 0.6365604 [3,] 1.0159084 0.8161260 0.2306709 0.2924973 [4,] 0.4912350 0.7331796 1.3138740 1.0439154 > > 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,] 223.99695 30.71005 35.91147 37.76600 [2,] 33.37736 26.91963 35.91631 31.77081 [3,] 36.19115 33.82732 27.35992 28.01053 [4,] 30.15366 32.86935 39.86501 36.52891 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x6345038e7960> > exp(tmp5) <pointer: 0x6345038e7960> > log(tmp5,2) <pointer: 0x6345038e7960> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.2203 > Min(tmp5) [1] 53.49453 > mean(tmp5) [1] 72.93237 > Sum(tmp5) [1] 14586.47 > Var(tmp5) [1] 852.9833 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 89.99193 73.07874 69.37934 72.46770 69.05173 70.45982 71.05119 72.00516 [9] 71.09568 70.74238 > rowSums(tmp5) [1] 1799.839 1461.575 1387.587 1449.354 1381.035 1409.196 1421.024 1440.103 [9] 1421.914 1414.848 > rowVars(tmp5) [1] 7912.40100 89.96396 85.98302 66.31831 72.05948 87.68439 [7] 56.48049 42.22472 99.43969 65.92230 > rowSd(tmp5) [1] 88.951678 9.484933 9.272703 8.143606 8.488786 9.363994 7.515350 [8] 6.498055 9.971945 8.119255 > rowMax(tmp5) [1] 466.22030 97.24203 93.57818 86.02626 84.35151 87.57312 85.34278 [8] 85.67826 91.32235 83.19891 > rowMin(tmp5) [1] 58.34266 56.02969 55.14773 57.96932 58.72306 53.49453 55.47553 59.92822 [9] 55.34373 55.45543 > > colMeans(tmp5) [1] 110.52500 68.63788 71.53570 72.57614 68.03700 73.88419 66.67970 [8] 71.51680 67.52857 71.41198 72.52137 72.28078 72.89737 70.32015 [15] 69.09934 70.61303 70.09202 74.68070 72.34090 71.46869 > colSums(tmp5) [1] 1105.2500 686.3788 715.3570 725.7614 680.3700 738.8419 666.7970 [8] 715.1680 675.2857 714.1198 725.2137 722.8078 728.9737 703.2015 [15] 690.9934 706.1303 700.9202 746.8070 723.4090 714.6869 > colVars(tmp5) [1] 15653.03622 67.05228 54.98656 58.86877 117.86674 107.91303 [7] 84.75607 61.65282 71.44052 105.78918 84.45475 88.20534 [13] 136.69649 62.49931 61.94624 54.27538 72.24297 115.15810 [19] 28.85985 25.69233 > colSd(tmp5) [1] 125.112095 8.188545 7.415292 7.672598 10.856645 10.388120 [7] 9.206306 7.851931 8.452250 10.285387 9.189926 9.391770 [13] 11.691727 7.905651 7.870594 7.367183 8.499587 10.731174 [19] 5.372136 5.068760 > colMax(tmp5) [1] 466.22030 85.34278 82.97379 85.67826 87.57312 91.32235 82.17445 [8] 84.62178 82.93129 86.02626 85.19347 89.44691 93.57818 84.05979 [15] 81.92017 82.49190 80.40225 97.24203 80.25651 76.32731 > colMin(tmp5) [1] 62.76090 56.02969 56.94608 58.30024 55.14773 57.96932 53.49453 59.29993 [9] 55.47553 59.27225 54.28021 60.46831 58.21728 59.28555 58.72306 57.93680 [17] 55.34373 57.89458 64.90979 62.65720 > > > ### 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 73.07874 69.37934 72.46770 69.05173 70.45982 71.05119 72.00516 [9] 71.09568 70.74238 > rowSums(tmp5) [1] NA 1461.575 1387.587 1449.354 1381.035 1409.196 1421.024 1440.103 [9] 1421.914 1414.848 > rowVars(tmp5) [1] 8317.65511 89.96396 85.98302 66.31831 72.05948 87.68439 [7] 56.48049 42.22472 99.43969 65.92230 > rowSd(tmp5) [1] 91.201179 9.484933 9.272703 8.143606 8.488786 9.363994 7.515350 [8] 6.498055 9.971945 8.119255 > rowMax(tmp5) [1] NA 97.24203 93.57818 86.02626 84.35151 87.57312 85.34278 85.67826 [9] 91.32235 83.19891 > rowMin(tmp5) [1] NA 56.02969 55.14773 57.96932 58.72306 53.49453 55.47553 59.92822 [9] 55.34373 55.45543 > > colMeans(tmp5) [1] 110.52500 68.63788 71.53570 72.57614 68.03700 73.88419 66.67970 [8] 71.51680 NA 71.41198 72.52137 72.28078 72.89737 70.32015 [15] 69.09934 70.61303 70.09202 74.68070 72.34090 71.46869 > colSums(tmp5) [1] 1105.2500 686.3788 715.3570 725.7614 680.3700 738.8419 666.7970 [8] 715.1680 NA 714.1198 725.2137 722.8078 728.9737 703.2015 [15] 690.9934 706.1303 700.9202 746.8070 723.4090 714.6869 > colVars(tmp5) [1] 15653.03622 67.05228 54.98656 58.86877 117.86674 107.91303 [7] 84.75607 61.65282 NA 105.78918 84.45475 88.20534 [13] 136.69649 62.49931 61.94624 54.27538 72.24297 115.15810 [19] 28.85985 25.69233 > colSd(tmp5) [1] 125.112095 8.188545 7.415292 7.672598 10.856645 10.388120 [7] 9.206306 7.851931 NA 10.285387 9.189926 9.391770 [13] 11.691727 7.905651 7.870594 7.367183 8.499587 10.731174 [19] 5.372136 5.068760 > colMax(tmp5) [1] 466.22030 85.34278 82.97379 85.67826 87.57312 91.32235 82.17445 [8] 84.62178 NA 86.02626 85.19347 89.44691 93.57818 84.05979 [15] 81.92017 82.49190 80.40225 97.24203 80.25651 76.32731 > colMin(tmp5) [1] 62.76090 56.02969 56.94608 58.30024 55.14773 57.96932 53.49453 59.29993 [9] NA 59.27225 54.28021 60.46831 58.21728 59.28555 58.72306 57.93680 [17] 55.34373 57.89458 64.90979 62.65720 > > Max(tmp5,na.rm=TRUE) [1] 466.2203 > Min(tmp5,na.rm=TRUE) [1] 53.49453 > mean(tmp5,na.rm=TRUE) [1] 72.96838 > Sum(tmp5,na.rm=TRUE) [1] 14520.71 > Var(tmp5,na.rm=TRUE) [1] 857.0306 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.26702 73.07874 69.37934 72.46770 69.05173 70.45982 71.05119 72.00516 [9] 71.09568 70.74238 > rowSums(tmp5,na.rm=TRUE) [1] 1734.073 1461.575 1387.587 1449.354 1381.035 1409.196 1421.024 1440.103 [9] 1421.914 1414.848 > rowVars(tmp5,na.rm=TRUE) [1] 8317.65511 89.96396 85.98302 66.31831 72.05948 87.68439 [7] 56.48049 42.22472 99.43969 65.92230 > rowSd(tmp5,na.rm=TRUE) [1] 91.201179 9.484933 9.272703 8.143606 8.488786 9.363994 7.515350 [8] 6.498055 9.971945 8.119255 > rowMax(tmp5,na.rm=TRUE) [1] 466.22030 97.24203 93.57818 86.02626 84.35151 87.57312 85.34278 [8] 85.67826 91.32235 83.19891 > rowMin(tmp5,na.rm=TRUE) [1] 58.34266 56.02969 55.14773 57.96932 58.72306 53.49453 55.47553 59.92822 [9] 55.34373 55.45543 > > colMeans(tmp5,na.rm=TRUE) [1] 110.52500 68.63788 71.53570 72.57614 68.03700 73.88419 66.67970 [8] 71.51680 67.72451 71.41198 72.52137 72.28078 72.89737 70.32015 [15] 69.09934 70.61303 70.09202 74.68070 72.34090 71.46869 > colSums(tmp5,na.rm=TRUE) [1] 1105.2500 686.3788 715.3570 725.7614 680.3700 738.8419 666.7970 [8] 715.1680 609.5206 714.1198 725.2137 722.8078 728.9737 703.2015 [15] 690.9934 706.1303 700.9202 746.8070 723.4090 714.6869 > colVars(tmp5,na.rm=TRUE) [1] 15653.03622 67.05228 54.98656 58.86877 117.86674 107.91303 [7] 84.75607 61.65282 79.93870 105.78918 84.45475 88.20534 [13] 136.69649 62.49931 61.94624 54.27538 72.24297 115.15810 [19] 28.85985 25.69233 > colSd(tmp5,na.rm=TRUE) [1] 125.112095 8.188545 7.415292 7.672598 10.856645 10.388120 [7] 9.206306 7.851931 8.940845 10.285387 9.189926 9.391770 [13] 11.691727 7.905651 7.870594 7.367183 8.499587 10.731174 [19] 5.372136 5.068760 > colMax(tmp5,na.rm=TRUE) [1] 466.22030 85.34278 82.97379 85.67826 87.57312 91.32235 82.17445 [8] 84.62178 82.93129 86.02626 85.19347 89.44691 93.57818 84.05979 [15] 81.92017 82.49190 80.40225 97.24203 80.25651 76.32731 > colMin(tmp5,na.rm=TRUE) [1] 62.76090 56.02969 56.94608 58.30024 55.14773 57.96932 53.49453 59.29993 [9] 55.47553 59.27225 54.28021 60.46831 58.21728 59.28555 58.72306 57.93680 [17] 55.34373 57.89458 64.90979 62.65720 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] NaN 73.07874 69.37934 72.46770 69.05173 70.45982 71.05119 72.00516 [9] 71.09568 70.74238 > rowSums(tmp5,na.rm=TRUE) [1] 0.000 1461.575 1387.587 1449.354 1381.035 1409.196 1421.024 1440.103 [9] 1421.914 1414.848 > rowVars(tmp5,na.rm=TRUE) [1] NA 89.96396 85.98302 66.31831 72.05948 87.68439 56.48049 42.22472 [9] 99.43969 65.92230 > rowSd(tmp5,na.rm=TRUE) [1] NA 9.484933 9.272703 8.143606 8.488786 9.363994 7.515350 6.498055 [9] 9.971945 8.119255 > rowMax(tmp5,na.rm=TRUE) [1] NA 97.24203 93.57818 86.02626 84.35151 87.57312 85.34278 85.67826 [9] 91.32235 83.19891 > rowMin(tmp5,na.rm=TRUE) [1] NA 56.02969 55.14773 57.96932 58.72306 53.49453 55.47553 59.92822 [9] 55.34373 55.45543 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 71.00330 69.16221 71.17911 71.90627 69.11415 73.00488 67.32625 71.21653 [9] NaN 70.42866 71.11336 73.30702 72.90919 71.27049 69.89829 69.59375 [17] 71.37715 74.99630 73.16658 71.03920 > colSums(tmp5,na.rm=TRUE) [1] 639.0297 622.4599 640.6120 647.1564 622.0273 657.0439 605.9362 640.9487 [9] 0.0000 633.8579 640.0203 659.7632 656.1827 641.4344 629.0846 626.3437 [17] 642.3944 674.9667 658.4992 639.3528 > colVars(tmp5,na.rm=TRUE) [1] 37.56146 72.34098 60.42937 61.17917 119.54727 112.70376 90.64774 [8] 68.34507 NA 108.13491 72.70852 87.38279 153.78198 60.15141 [15] 62.50839 49.37171 62.69343 128.43228 24.79768 26.82868 > colSd(tmp5,na.rm=TRUE) [1] 6.128740 8.505350 7.773633 7.821711 10.933767 10.616203 9.520911 [8] 8.267108 NA 10.398794 8.526929 9.347876 12.400886 7.755734 [15] 7.906225 7.026500 7.917919 11.332797 4.979727 5.179641 > colMax(tmp5,na.rm=TRUE) [1] 81.06988 85.34278 82.97379 85.67826 87.57312 91.32235 82.17445 84.62178 [9] -Inf 86.02626 81.93339 89.44691 93.57818 84.05979 81.92017 82.49190 [17] 80.40225 97.24203 80.25651 76.32731 > colMin(tmp5,na.rm=TRUE) [1] 62.76090 56.02969 56.94608 58.30024 55.14773 57.96932 53.49453 59.29993 [9] Inf 59.27225 54.28021 60.46831 58.21728 59.28555 58.72306 57.93680 [17] 55.34373 57.89458 66.08577 62.65720 > > > > > 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] 289.6885 261.9109 233.9420 384.0037 265.8039 262.0915 236.7545 255.6364 [9] 302.0684 211.7910 > apply(copymatrix,1,var,na.rm=TRUE) [1] 289.6885 261.9109 233.9420 384.0037 265.8039 262.0915 236.7545 255.6364 [9] 302.0684 211.7910 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] -1.705303e-13 -1.136868e-13 -1.705303e-13 -5.684342e-14 -1.136868e-13 [6] -5.684342e-14 0.000000e+00 -5.684342e-14 -8.526513e-14 8.526513e-14 [11] 0.000000e+00 -1.705303e-13 -5.684342e-14 8.526513e-14 -1.705303e-13 [16] 2.273737e-13 5.684342e-14 8.526513e-14 0.000000e+00 -8.526513e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 6 13 7 10 9 5 9 4 4 8 10 5 2 5 5 8 5 20 5 4 9 5 7 10 6 16 7 13 2 2 9 10 4 2 6 16 4 12 5 6 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.800704 > Min(tmp) [1] -2.897887 > mean(tmp) [1] 0.04914251 > Sum(tmp) [1] 4.914251 > Var(tmp) [1] 1.117407 > > rowMeans(tmp) [1] 0.04914251 > rowSums(tmp) [1] 4.914251 > rowVars(tmp) [1] 1.117407 > rowSd(tmp) [1] 1.057075 > rowMax(tmp) [1] 2.800704 > rowMin(tmp) [1] -2.897887 > > colMeans(tmp) [1] -0.31202168 0.48930139 -0.11527717 -0.44990241 0.55968114 -0.86947256 [7] -0.29320002 -1.06778048 0.70246725 1.22563805 -0.60815194 -0.32881714 [13] 1.68541071 0.51069531 0.10510506 -0.23937460 -0.77070807 -1.32323279 [19] 0.87546886 0.12983021 0.08724248 0.82412090 -0.48481451 0.35189345 [25] -0.34748515 0.69452812 -0.57854831 1.87732812 0.42715994 0.79194677 [31] -0.23963687 0.44553580 -0.47630810 0.71788171 2.80070422 -1.33460267 [37] -1.03241306 0.24319540 2.24299256 -0.42816186 -1.36232409 -0.56770554 [43] 0.81714905 -1.64318187 -0.65395162 1.37971751 0.10911607 -0.47800827 [49] 0.52162965 1.48699418 -0.61489794 -0.23297814 1.73647710 -0.03281008 [55] 0.59477927 -1.80132028 -0.22989953 0.38111896 -0.40989817 -0.02865671 [61] -0.75918022 1.37595945 1.44602391 0.33927499 1.70378358 -0.77986657 [67] -1.16654328 0.72269291 1.06706266 -0.22058702 -2.54639491 -0.40579388 [73] -0.30421723 1.64217116 -0.26914110 0.75326283 1.64241498 0.32345909 [79] -0.41030615 0.07827877 -2.43848057 0.51822945 0.38477633 0.35646089 [85] -2.08815176 0.25424547 -1.39634280 0.92831508 -0.83905323 1.35866474 [91] -0.66045868 -1.54458057 0.38183807 -2.89788652 0.04315720 -0.91578189 [97] 1.96326496 0.44684553 0.39452731 0.97274003 > colSums(tmp) [1] -0.31202168 0.48930139 -0.11527717 -0.44990241 0.55968114 -0.86947256 [7] -0.29320002 -1.06778048 0.70246725 1.22563805 -0.60815194 -0.32881714 [13] 1.68541071 0.51069531 0.10510506 -0.23937460 -0.77070807 -1.32323279 [19] 0.87546886 0.12983021 0.08724248 0.82412090 -0.48481451 0.35189345 [25] -0.34748515 0.69452812 -0.57854831 1.87732812 0.42715994 0.79194677 [31] -0.23963687 0.44553580 -0.47630810 0.71788171 2.80070422 -1.33460267 [37] -1.03241306 0.24319540 2.24299256 -0.42816186 -1.36232409 -0.56770554 [43] 0.81714905 -1.64318187 -0.65395162 1.37971751 0.10911607 -0.47800827 [49] 0.52162965 1.48699418 -0.61489794 -0.23297814 1.73647710 -0.03281008 [55] 0.59477927 -1.80132028 -0.22989953 0.38111896 -0.40989817 -0.02865671 [61] -0.75918022 1.37595945 1.44602391 0.33927499 1.70378358 -0.77986657 [67] -1.16654328 0.72269291 1.06706266 -0.22058702 -2.54639491 -0.40579388 [73] -0.30421723 1.64217116 -0.26914110 0.75326283 1.64241498 0.32345909 [79] -0.41030615 0.07827877 -2.43848057 0.51822945 0.38477633 0.35646089 [85] -2.08815176 0.25424547 -1.39634280 0.92831508 -0.83905323 1.35866474 [91] -0.66045868 -1.54458057 0.38183807 -2.89788652 0.04315720 -0.91578189 [97] 1.96326496 0.44684553 0.39452731 0.97274003 > 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.31202168 0.48930139 -0.11527717 -0.44990241 0.55968114 -0.86947256 [7] -0.29320002 -1.06778048 0.70246725 1.22563805 -0.60815194 -0.32881714 [13] 1.68541071 0.51069531 0.10510506 -0.23937460 -0.77070807 -1.32323279 [19] 0.87546886 0.12983021 0.08724248 0.82412090 -0.48481451 0.35189345 [25] -0.34748515 0.69452812 -0.57854831 1.87732812 0.42715994 0.79194677 [31] -0.23963687 0.44553580 -0.47630810 0.71788171 2.80070422 -1.33460267 [37] -1.03241306 0.24319540 2.24299256 -0.42816186 -1.36232409 -0.56770554 [43] 0.81714905 -1.64318187 -0.65395162 1.37971751 0.10911607 -0.47800827 [49] 0.52162965 1.48699418 -0.61489794 -0.23297814 1.73647710 -0.03281008 [55] 0.59477927 -1.80132028 -0.22989953 0.38111896 -0.40989817 -0.02865671 [61] -0.75918022 1.37595945 1.44602391 0.33927499 1.70378358 -0.77986657 [67] -1.16654328 0.72269291 1.06706266 -0.22058702 -2.54639491 -0.40579388 [73] -0.30421723 1.64217116 -0.26914110 0.75326283 1.64241498 0.32345909 [79] -0.41030615 0.07827877 -2.43848057 0.51822945 0.38477633 0.35646089 [85] -2.08815176 0.25424547 -1.39634280 0.92831508 -0.83905323 1.35866474 [91] -0.66045868 -1.54458057 0.38183807 -2.89788652 0.04315720 -0.91578189 [97] 1.96326496 0.44684553 0.39452731 0.97274003 > colMin(tmp) [1] -0.31202168 0.48930139 -0.11527717 -0.44990241 0.55968114 -0.86947256 [7] -0.29320002 -1.06778048 0.70246725 1.22563805 -0.60815194 -0.32881714 [13] 1.68541071 0.51069531 0.10510506 -0.23937460 -0.77070807 -1.32323279 [19] 0.87546886 0.12983021 0.08724248 0.82412090 -0.48481451 0.35189345 [25] -0.34748515 0.69452812 -0.57854831 1.87732812 0.42715994 0.79194677 [31] -0.23963687 0.44553580 -0.47630810 0.71788171 2.80070422 -1.33460267 [37] -1.03241306 0.24319540 2.24299256 -0.42816186 -1.36232409 -0.56770554 [43] 0.81714905 -1.64318187 -0.65395162 1.37971751 0.10911607 -0.47800827 [49] 0.52162965 1.48699418 -0.61489794 -0.23297814 1.73647710 -0.03281008 [55] 0.59477927 -1.80132028 -0.22989953 0.38111896 -0.40989817 -0.02865671 [61] -0.75918022 1.37595945 1.44602391 0.33927499 1.70378358 -0.77986657 [67] -1.16654328 0.72269291 1.06706266 -0.22058702 -2.54639491 -0.40579388 [73] -0.30421723 1.64217116 -0.26914110 0.75326283 1.64241498 0.32345909 [79] -0.41030615 0.07827877 -2.43848057 0.51822945 0.38477633 0.35646089 [85] -2.08815176 0.25424547 -1.39634280 0.92831508 -0.83905323 1.35866474 [91] -0.66045868 -1.54458057 0.38183807 -2.89788652 0.04315720 -0.91578189 [97] 1.96326496 0.44684553 0.39452731 0.97274003 > colMedians(tmp) [1] -0.31202168 0.48930139 -0.11527717 -0.44990241 0.55968114 -0.86947256 [7] -0.29320002 -1.06778048 0.70246725 1.22563805 -0.60815194 -0.32881714 [13] 1.68541071 0.51069531 0.10510506 -0.23937460 -0.77070807 -1.32323279 [19] 0.87546886 0.12983021 0.08724248 0.82412090 -0.48481451 0.35189345 [25] -0.34748515 0.69452812 -0.57854831 1.87732812 0.42715994 0.79194677 [31] -0.23963687 0.44553580 -0.47630810 0.71788171 2.80070422 -1.33460267 [37] -1.03241306 0.24319540 2.24299256 -0.42816186 -1.36232409 -0.56770554 [43] 0.81714905 -1.64318187 -0.65395162 1.37971751 0.10911607 -0.47800827 [49] 0.52162965 1.48699418 -0.61489794 -0.23297814 1.73647710 -0.03281008 [55] 0.59477927 -1.80132028 -0.22989953 0.38111896 -0.40989817 -0.02865671 [61] -0.75918022 1.37595945 1.44602391 0.33927499 1.70378358 -0.77986657 [67] -1.16654328 0.72269291 1.06706266 -0.22058702 -2.54639491 -0.40579388 [73] -0.30421723 1.64217116 -0.26914110 0.75326283 1.64241498 0.32345909 [79] -0.41030615 0.07827877 -2.43848057 0.51822945 0.38477633 0.35646089 [85] -2.08815176 0.25424547 -1.39634280 0.92831508 -0.83905323 1.35866474 [91] -0.66045868 -1.54458057 0.38183807 -2.89788652 0.04315720 -0.91578189 [97] 1.96326496 0.44684553 0.39452731 0.97274003 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.3120217 0.4893014 -0.1152772 -0.4499024 0.5596811 -0.8694726 -0.2932 [2,] -0.3120217 0.4893014 -0.1152772 -0.4499024 0.5596811 -0.8694726 -0.2932 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.06778 0.7024672 1.225638 -0.6081519 -0.3288171 1.685411 0.5106953 [2,] -1.06778 0.7024672 1.225638 -0.6081519 -0.3288171 1.685411 0.5106953 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.1051051 -0.2393746 -0.7707081 -1.323233 0.8754689 0.1298302 0.08724248 [2,] 0.1051051 -0.2393746 -0.7707081 -1.323233 0.8754689 0.1298302 0.08724248 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.8241209 -0.4848145 0.3518934 -0.3474852 0.6945281 -0.5785483 1.877328 [2,] 0.8241209 -0.4848145 0.3518934 -0.3474852 0.6945281 -0.5785483 1.877328 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.4271599 0.7919468 -0.2396369 0.4455358 -0.4763081 0.7178817 2.800704 [2,] 0.4271599 0.7919468 -0.2396369 0.4455358 -0.4763081 0.7178817 2.800704 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.334603 -1.032413 0.2431954 2.242993 -0.4281619 -1.362324 -0.5677055 [2,] -1.334603 -1.032413 0.2431954 2.242993 -0.4281619 -1.362324 -0.5677055 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.8171491 -1.643182 -0.6539516 1.379718 0.1091161 -0.4780083 0.5216296 [2,] 0.8171491 -1.643182 -0.6539516 1.379718 0.1091161 -0.4780083 0.5216296 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.486994 -0.6148979 -0.2329781 1.736477 -0.03281008 0.5947793 -1.80132 [2,] 1.486994 -0.6148979 -0.2329781 1.736477 -0.03281008 0.5947793 -1.80132 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.2298995 0.381119 -0.4098982 -0.02865671 -0.7591802 1.375959 1.446024 [2,] -0.2298995 0.381119 -0.4098982 -0.02865671 -0.7591802 1.375959 1.446024 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.339275 1.703784 -0.7798666 -1.166543 0.7226929 1.067063 -0.220587 [2,] 0.339275 1.703784 -0.7798666 -1.166543 0.7226929 1.067063 -0.220587 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -2.546395 -0.4057939 -0.3042172 1.642171 -0.2691411 0.7532628 1.642415 [2,] -2.546395 -0.4057939 -0.3042172 1.642171 -0.2691411 0.7532628 1.642415 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.3234591 -0.4103062 0.07827877 -2.438481 0.5182294 0.3847763 0.3564609 [2,] 0.3234591 -0.4103062 0.07827877 -2.438481 0.5182294 0.3847763 0.3564609 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -2.088152 0.2542455 -1.396343 0.9283151 -0.8390532 1.358665 -0.6604587 [2,] -2.088152 0.2542455 -1.396343 0.9283151 -0.8390532 1.358665 -0.6604587 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.544581 0.3818381 -2.897887 0.0431572 -0.9157819 1.963265 0.4468455 [2,] -1.544581 0.3818381 -2.897887 0.0431572 -0.9157819 1.963265 0.4468455 [,99] [,100] [1,] 0.3945273 0.97274 [2,] 0.3945273 0.97274 > > > Max(tmp2) [1] 1.96801 > Min(tmp2) [1] -2.602591 > mean(tmp2) [1] 0.07851323 > Sum(tmp2) [1] 7.851323 > Var(tmp2) [1] 0.9147787 > > rowMeans(tmp2) [1] -0.804840131 -0.404275890 -0.991920924 -0.419638272 0.961682932 [6] 1.841560812 -1.117911507 0.816106256 0.578073966 0.195383607 [11] 0.083320989 0.248670982 0.614118351 0.324902147 1.845250015 [16] -0.035497728 0.486154585 -0.319832920 -1.623087272 0.793060845 [21] 0.622425088 -0.939728573 0.694950432 0.964151085 1.769909880 [26] -1.798606772 1.549087518 0.466380467 1.712534016 1.076543132 [31] -0.322639212 -0.937304816 -0.192946600 1.070750014 0.663163277 [36] -0.619988575 0.493219276 -0.201271452 1.638108075 0.182984534 [41] -2.179688615 -1.140654125 -0.683402581 0.191468566 0.423923050 [46] -0.264109423 0.788338717 1.529907739 -1.722253730 0.005520456 [51] 0.424461545 0.789359152 1.637008177 1.105525439 -0.244836490 [56] -0.948329368 -2.602590602 1.820934645 -0.251950962 -1.469615952 [61] 0.021818566 -1.531732460 0.004482160 0.560796804 -0.149563626 [66] -0.334535459 -0.120109481 -0.245488784 0.371383064 0.752143075 [71] 0.570261609 -1.015686419 -0.456234860 0.295263494 -0.076529756 [76] -0.571152795 -0.124356555 -0.127305713 -1.128986470 0.635372088 [81] -1.177867597 -0.252172521 -0.060691171 1.124660236 -0.570249493 [86] 1.968009693 0.043246803 -0.246135503 -0.340294599 1.770319247 [91] 0.583093242 -0.617754391 -0.719660536 -0.914161322 0.155620014 [96] 0.535786625 -0.134578986 -0.576431611 1.508286488 0.270442921 > rowSums(tmp2) [1] -0.804840131 -0.404275890 -0.991920924 -0.419638272 0.961682932 [6] 1.841560812 -1.117911507 0.816106256 0.578073966 0.195383607 [11] 0.083320989 0.248670982 0.614118351 0.324902147 1.845250015 [16] -0.035497728 0.486154585 -0.319832920 -1.623087272 0.793060845 [21] 0.622425088 -0.939728573 0.694950432 0.964151085 1.769909880 [26] -1.798606772 1.549087518 0.466380467 1.712534016 1.076543132 [31] -0.322639212 -0.937304816 -0.192946600 1.070750014 0.663163277 [36] -0.619988575 0.493219276 -0.201271452 1.638108075 0.182984534 [41] -2.179688615 -1.140654125 -0.683402581 0.191468566 0.423923050 [46] -0.264109423 0.788338717 1.529907739 -1.722253730 0.005520456 [51] 0.424461545 0.789359152 1.637008177 1.105525439 -0.244836490 [56] -0.948329368 -2.602590602 1.820934645 -0.251950962 -1.469615952 [61] 0.021818566 -1.531732460 0.004482160 0.560796804 -0.149563626 [66] -0.334535459 -0.120109481 -0.245488784 0.371383064 0.752143075 [71] 0.570261609 -1.015686419 -0.456234860 0.295263494 -0.076529756 [76] -0.571152795 -0.124356555 -0.127305713 -1.128986470 0.635372088 [81] -1.177867597 -0.252172521 -0.060691171 1.124660236 -0.570249493 [86] 1.968009693 0.043246803 -0.246135503 -0.340294599 1.770319247 [91] 0.583093242 -0.617754391 -0.719660536 -0.914161322 0.155620014 [96] 0.535786625 -0.134578986 -0.576431611 1.508286488 0.270442921 > 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.804840131 -0.404275890 -0.991920924 -0.419638272 0.961682932 [6] 1.841560812 -1.117911507 0.816106256 0.578073966 0.195383607 [11] 0.083320989 0.248670982 0.614118351 0.324902147 1.845250015 [16] -0.035497728 0.486154585 -0.319832920 -1.623087272 0.793060845 [21] 0.622425088 -0.939728573 0.694950432 0.964151085 1.769909880 [26] -1.798606772 1.549087518 0.466380467 1.712534016 1.076543132 [31] -0.322639212 -0.937304816 -0.192946600 1.070750014 0.663163277 [36] -0.619988575 0.493219276 -0.201271452 1.638108075 0.182984534 [41] -2.179688615 -1.140654125 -0.683402581 0.191468566 0.423923050 [46] -0.264109423 0.788338717 1.529907739 -1.722253730 0.005520456 [51] 0.424461545 0.789359152 1.637008177 1.105525439 -0.244836490 [56] -0.948329368 -2.602590602 1.820934645 -0.251950962 -1.469615952 [61] 0.021818566 -1.531732460 0.004482160 0.560796804 -0.149563626 [66] -0.334535459 -0.120109481 -0.245488784 0.371383064 0.752143075 [71] 0.570261609 -1.015686419 -0.456234860 0.295263494 -0.076529756 [76] -0.571152795 -0.124356555 -0.127305713 -1.128986470 0.635372088 [81] -1.177867597 -0.252172521 -0.060691171 1.124660236 -0.570249493 [86] 1.968009693 0.043246803 -0.246135503 -0.340294599 1.770319247 [91] 0.583093242 -0.617754391 -0.719660536 -0.914161322 0.155620014 [96] 0.535786625 -0.134578986 -0.576431611 1.508286488 0.270442921 > rowMin(tmp2) [1] -0.804840131 -0.404275890 -0.991920924 -0.419638272 0.961682932 [6] 1.841560812 -1.117911507 0.816106256 0.578073966 0.195383607 [11] 0.083320989 0.248670982 0.614118351 0.324902147 1.845250015 [16] -0.035497728 0.486154585 -0.319832920 -1.623087272 0.793060845 [21] 0.622425088 -0.939728573 0.694950432 0.964151085 1.769909880 [26] -1.798606772 1.549087518 0.466380467 1.712534016 1.076543132 [31] -0.322639212 -0.937304816 -0.192946600 1.070750014 0.663163277 [36] -0.619988575 0.493219276 -0.201271452 1.638108075 0.182984534 [41] -2.179688615 -1.140654125 -0.683402581 0.191468566 0.423923050 [46] -0.264109423 0.788338717 1.529907739 -1.722253730 0.005520456 [51] 0.424461545 0.789359152 1.637008177 1.105525439 -0.244836490 [56] -0.948329368 -2.602590602 1.820934645 -0.251950962 -1.469615952 [61] 0.021818566 -1.531732460 0.004482160 0.560796804 -0.149563626 [66] -0.334535459 -0.120109481 -0.245488784 0.371383064 0.752143075 [71] 0.570261609 -1.015686419 -0.456234860 0.295263494 -0.076529756 [76] -0.571152795 -0.124356555 -0.127305713 -1.128986470 0.635372088 [81] -1.177867597 -0.252172521 -0.060691171 1.124660236 -0.570249493 [86] 1.968009693 0.043246803 -0.246135503 -0.340294599 1.770319247 [91] 0.583093242 -0.617754391 -0.719660536 -0.914161322 0.155620014 [96] 0.535786625 -0.134578986 -0.576431611 1.508286488 0.270442921 > > colMeans(tmp2) [1] 0.07851323 > colSums(tmp2) [1] 7.851323 > colVars(tmp2) [1] 0.9147787 > colSd(tmp2) [1] 0.9564406 > colMax(tmp2) [1] 1.96801 > colMin(tmp2) [1] -2.602591 > colMedians(tmp2) [1] 0.01366951 > colRanges(tmp2) [,1] [1,] -2.602591 [2,] 1.968010 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] -1.6149226 -0.5271328 -0.4610911 -0.4040108 5.5904245 3.0374083 [7] 7.0576020 -1.9490252 0.3071758 -2.1804512 > colApply(tmp,quantile)[,1] [,1] [1,] -2.390838741 [2,] -0.644223616 [3,] -0.004434909 [4,] 0.485849996 [5,] 1.119293812 > > rowApply(tmp,sum) [1] 0.7180293 4.8281032 -1.7448265 4.6748340 -2.5129919 -0.3081284 [7] -3.0540239 0.1385793 0.9968531 5.1195489 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 3 6 3 5 8 3 6 1 7 7 [2,] 5 9 5 3 2 10 4 9 6 1 [3,] 6 2 4 6 7 2 7 8 2 4 [4,] 2 5 8 1 9 6 9 2 3 8 [5,] 4 7 2 8 5 9 3 10 4 10 [6,] 10 3 9 2 6 8 5 5 9 2 [7,] 7 10 7 10 10 1 10 7 5 3 [8,] 8 1 10 7 1 7 2 6 1 9 [9,] 1 8 6 9 3 4 8 4 8 5 [10,] 9 4 1 4 4 5 1 3 10 6 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.9356276 -1.1482594 -1.8392957 1.8827199 4.9042392 3.2710178 [7] 3.9425570 -1.9068824 -0.1578362 -4.3684772 1.0944308 0.7346476 [13] -1.1868183 -1.4596662 -2.7111644 1.7861979 1.4286752 -1.5315622 [19] 0.5631964 1.4993295 > colApply(tmp,quantile)[,1] [,1] [1,] -1.0477454 [2,] -0.8474282 [3,] 0.1314848 [4,] 0.3176738 [5,] 0.5103874 > > rowApply(tmp,sum) [1] 0.2052934 0.7497931 5.8293770 1.2714597 -4.1945015 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 13 16 8 2 4 [2,] 8 19 1 8 11 [3,] 1 17 16 1 9 [4,] 11 1 15 20 15 [5,] 18 13 13 18 19 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.3176738 -0.20699470 -2.0257535 0.1175934 1.1665181 0.2045725 [2,] 0.5103874 1.20147866 0.7173320 -1.7443068 0.2983599 0.0796102 [3,] 0.1314848 -1.84582493 1.2605518 1.1880968 0.8676526 2.0927364 [4,] -1.0477454 -0.21093756 -1.5139500 1.9586637 1.6428005 -0.6255242 [5,] -0.8474282 -0.08598091 -0.2774761 0.3626728 0.9289082 1.5196229 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 2.09221074 -0.08176963 -1.87489583 0.007886648 0.4706027 0.84879870 [2,] -0.10339558 0.28319666 0.50453433 -1.182586799 -0.4355918 -1.20010230 [3,] 1.36636161 -1.15198163 1.06568102 -1.608325215 0.3828424 0.54647994 [4,] -0.04166257 0.46324109 0.09229765 -1.016711714 0.1405002 0.58128514 [5,] 0.62904275 -1.41956889 0.05454666 -0.568740140 0.5360774 -0.04181385 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.8164067 0.79448018 -1.02690570 1.2915608 0.7126770 -0.8188624 [2,] 1.1640824 -0.45821293 0.04450802 -0.1162266 -0.5095955 0.4046519 [3,] -0.9230901 -1.47422030 0.46845651 0.6067402 2.7051964 -1.0771215 [4,] 0.1607479 -0.41808807 -0.18627057 1.6836568 -0.8881953 -0.6529480 [5,] -0.7721518 0.09637489 -2.01095263 -1.6795333 -0.5914074 0.6127178 [,19] [,20] [1,] -0.3741440 -0.59354881 [2,] 1.3706870 -0.07901702 [3,] -0.7312070 1.95886720 [4,] 0.5121908 0.63810926 [5,] -0.2143303 -0.42508118 > > > 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 : 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.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 566 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.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 0.6863474 0.1578557 0.3259891 -0.8059703 1.499012 -1.645342 -0.1184541 col8 col9 col10 col11 col12 col13 col14 row1 0.2603059 -0.958658 0.05814426 -1.572836 -0.4584473 -0.3489564 1.898877 col15 col16 col17 col18 col19 col20 row1 0.1925176 1.735049 -0.0290146 0.8960574 -0.9322378 0.1617154 > tmp[,"col10"] col10 row1 0.05814426 row2 -0.48374175 row3 -0.80041409 row4 -0.36232268 row5 1.62165896 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 0.6863474 0.1578557 0.3259891 -0.8059703 1.499012 -1.645342 -0.1184541 row5 0.7222014 1.0627972 -0.1698965 -0.2342971 1.191823 1.174136 0.1661864 col8 col9 col10 col11 col12 col13 col14 row1 0.2603059 -0.958658 0.05814426 -1.572836 -0.4584473 -0.3489564 1.898877 row5 0.3497525 -0.244012 1.62165896 1.006195 -0.3360050 -0.1637737 0.216780 col15 col16 col17 col18 col19 col20 row1 0.1925176 1.7350495 -0.02901460 0.8960574 -0.9322378 0.1617154 row5 1.0517683 -0.7867025 -0.03626901 0.1503446 0.4191342 0.3194512 > tmp[,c("col6","col20")] col6 col20 row1 -1.6453424 0.1617154 row2 -0.3958990 0.5310651 row3 2.5519780 0.6960188 row4 0.7068378 0.7504782 row5 1.1741363 0.3194512 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.645342 0.1617154 row5 1.174136 0.3194512 > > > > > 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.07055 50.12409 49.72451 50.3544 49.69037 105.2145 51.52272 49.73744 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.41546 48.75107 51.04224 50.32771 49.8723 51.67933 51.93217 50.31225 col17 col18 col19 col20 row1 50.0762 48.74698 50.05884 105.1009 > tmp[,"col10"] col10 row1 48.75107 row2 29.86279 row3 29.75533 row4 29.83201 row5 51.16037 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.07055 50.12409 49.72451 50.35440 49.69037 105.2145 51.52272 49.73744 row5 50.49995 50.12810 50.68468 48.71185 51.62498 103.6376 51.54701 50.04024 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.41546 48.75107 51.04224 50.32771 49.87230 51.67933 51.93217 50.31225 row5 50.93904 51.16037 49.83353 49.88712 49.24429 49.16698 49.08597 50.15434 col17 col18 col19 col20 row1 50.0762 48.74698 50.05884 105.1009 row5 50.9991 49.63933 51.96670 104.5335 > tmp[,c("col6","col20")] col6 col20 row1 105.21454 105.10085 row2 75.64382 74.96975 row3 75.99532 74.27669 row4 75.07197 75.11519 row5 103.63765 104.53348 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.2145 105.1009 row5 103.6376 104.5335 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.2145 105.1009 row5 103.6376 104.5335 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.51768201 [2,] 0.64526334 [3,] -1.52553043 [4,] 0.03310443 [5,] -1.05233055 > tmp[,c("col17","col7")] col17 col7 [1,] 1.3928340 1.5697880 [2,] -0.8325443 -2.2305086 [3,] -1.1542399 0.8313349 [4,] 0.1129643 0.4174627 [5,] -1.6091336 -0.3144868 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.8129339 0.8143864 [2,] 0.7450466 2.6018826 [3,] 0.6858624 -0.3669836 [4,] -0.9294000 -0.4533853 [5,] 1.3020355 0.2776222 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.8129339 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.8129339 [2,] 0.7450466 > > > > 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.09789901 -0.3742393 -0.6783028 0.1383679 -0.3114952 1.0464104 0.1762094 row1 0.23719086 0.8564394 1.0385076 -0.6523994 1.6154330 0.9561463 1.0555819 [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.1821104 -0.1552197 0.8152708 0.6043638 -0.6616548 0.627247714 row1 0.9996954 -1.4866471 1.4217338 0.2092464 0.5705362 0.008183552 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.8342306 -0.5310558 -0.2282289 0.0680938 -0.3535541 1.03585383 row1 -1.2436011 0.3481559 -0.4514350 -0.9591789 -0.2021002 -0.03980014 [,20] row3 -0.7195862 row1 1.0529223 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.3482377 -1.090591 -0.509449 -0.9227114 0.1772082 -0.237729 -0.5406906 [,8] [,9] [,10] row2 -0.3197348 -0.3483739 -0.5284976 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.2929405 0.7487171 0.6115171 0.03901828 -1.28367 -1.029497 0.7451698 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.2408813 0.07197862 0.8127635 -1.59929 -1.747573 -1.552822 0.5834407 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.268305 0.4927385 1.594619 -1.169037 -2.302265 0.4368105 > > > 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: 0x63450389cd30> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a97509a01c" [2] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a9bf09ac5" [3] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a930e868c" [4] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a9958121a" [5] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a960cb233b" [6] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a9394af0ad" [7] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a95f96972c" [8] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a92e678852" [9] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a9243bad49" [10] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a91162a963" [11] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a938fe9623" [12] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a929199d63" [13] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a916262e38" [14] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a96eb0f749" [15] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2292a94ce3794" > > > ### 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: 0x6345017dce60> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6345017dce60> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6345017dce60> > rowMedians(tmp) [1] 0.147302281 -0.438030684 0.240025662 -0.140572776 -0.536560202 [6] -0.206217105 -0.158068054 -0.275166782 -0.058940244 0.202152708 [11] 0.018278332 -0.413893727 -0.332799936 0.034132180 0.227187101 [16] 0.314127102 -0.514426285 0.301049669 0.186956447 -0.072109120 [21] 0.236092152 0.033110338 0.215745798 0.857239448 0.216435850 [26] 0.338968926 -0.147738035 -0.133640521 0.036857014 -0.470523683 [31] 0.034906429 0.450903802 0.521551508 -0.091575885 -0.243299390 [36] 0.596632366 -0.234627901 -0.255033959 -0.492986914 -0.362923375 [41] 0.290832482 0.039084412 -0.203387845 -0.235417972 -0.249908382 [46] 0.130410180 0.429814041 -0.220620410 0.408614863 0.002766113 [51] -0.057245734 -0.026230239 -0.545385991 -0.004615822 -0.390854067 [56] 0.038972392 0.102964839 -0.018936816 0.281614273 0.338587593 [61] -0.471076160 0.341067204 0.163057340 -0.335216333 -0.003135211 [66] 0.060995690 0.461074073 0.426217008 0.218452654 -0.243163117 [71] 0.100230703 0.348896458 0.012720378 0.222153922 0.073617285 [76] 0.304449855 0.436328179 0.315423713 0.151670306 -0.206136187 [81] 0.036286811 0.299808310 0.007478135 0.440897721 0.173135894 [86] 0.571605767 0.490593627 -0.371539817 -0.468832831 -0.188827225 [91] -0.083775637 0.205261154 0.290734433 0.556800066 0.418116395 [96] -0.180948292 -0.084335304 0.178109414 -0.364582782 -0.098678435 [101] 0.058538265 -0.026301118 0.249930527 0.261538433 -0.305734361 [106] -0.548618832 -0.171992385 0.083678776 -0.095279444 -0.254875899 [111] 0.045607929 -0.039980081 0.097479013 0.018919152 0.273336527 [116] -0.328001837 -0.051198830 -0.031121424 -0.159439557 -0.179739309 [121] 0.204802395 0.414687495 0.120380813 0.120298838 -0.047844623 [126] -0.001631814 0.410339459 -0.165955201 -0.669771061 0.128497493 [131] -0.094363050 -0.180404902 0.082361323 0.530191387 0.016806046 [136] 0.351318603 -0.274910396 -0.685715020 -0.125607089 -0.873433714 [141] -0.370750308 -0.147108207 0.279497337 0.020114430 -0.133963773 [146] 0.603469633 -0.026799654 0.120246878 0.464300345 0.135815898 [151] -0.065648386 -0.375686954 -0.333056504 -0.533395659 -0.484978116 [156] 0.534457274 -0.330145281 -0.788020548 -0.132710905 -0.077836382 [161] -0.048919779 -0.036636386 -0.126047938 0.433599138 -0.123726840 [166] 0.034714734 0.084654358 -0.209296327 1.071368464 0.548783409 [171] -0.303153301 0.340027548 -0.127132694 -0.620417437 0.504074822 [176] -0.077394173 -0.018876511 0.187364466 -0.364678508 -0.225502696 [181] -0.105152958 -0.689329879 -0.394376495 0.066877760 -0.072208508 [186] -0.026031180 0.137489370 -0.159079758 -0.098494638 0.296229266 [191] -0.389947893 0.647894761 0.191281015 -0.310147115 -0.400393698 [196] 0.126729622 0.415244192 -0.073366144 -0.182468847 0.286169586 [201] -0.022978763 -0.310436971 0.008810148 -0.113351861 -0.004450892 [206] 0.063590094 0.011669981 -0.003209379 -0.554947041 0.005526457 [211] 0.103282611 -0.269035161 0.316648821 0.039818638 0.023659995 [216] -0.186026054 -0.383406941 0.210214719 0.142957730 -0.279625402 [221] 0.098107461 0.155789530 0.512719991 0.166290976 -0.053988132 [226] -0.225424298 0.360269105 -0.133981157 0.293853773 0.466462022 > > proc.time() user system elapsed 1.289 1.477 2.756
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: 0x5bc246999ad0> > .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: 0x5bc246999ad0> > .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: 0x5bc246999ad0> > .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: 0x5bc246999ad0> > 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: 0x5bc24698ba30> > .Call("R_bm_AddColumn",P) <pointer: 0x5bc24698ba30> > .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: 0x5bc24698ba30> > .Call("R_bm_AddColumn",P) <pointer: 0x5bc24698ba30> > .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: 0x5bc24698ba30> > 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: 0x5bc245757870> > .Call("R_bm_AddColumn",P) <pointer: 0x5bc245757870> > .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: 0x5bc245757870> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5bc245757870> > .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: 0x5bc245757870> > > .Call("R_bm_RowMode",P) <pointer: 0x5bc245757870> > .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: 0x5bc245757870> > > .Call("R_bm_ColMode",P) <pointer: 0x5bc245757870> > .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: 0x5bc245757870> > 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: 0x5bc245b681a0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x5bc245b681a0> > .Call("R_bm_AddColumn",P) <pointer: 0x5bc245b681a0> > .Call("R_bm_AddColumn",P) <pointer: 0x5bc245b681a0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile22948e23fd41da" "BufferedMatrixFile22948e7e30f2af" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile22948e23fd41da" "BufferedMatrixFile22948e7e30f2af" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x5bc247d12870> > .Call("R_bm_AddColumn",P) <pointer: 0x5bc247d12870> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5bc247d12870> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5bc247d12870> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x5bc247d12870> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x5bc247d12870> > .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: 0x5bc246166ca0> > .Call("R_bm_AddColumn",P) <pointer: 0x5bc246166ca0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5bc246166ca0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x5bc246166ca0> > 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: 0x5bc246919a20> > .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: 0x5bc246919a20> > rm(P) > > proc.time() user system elapsed 0.241 0.065 0.296
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.265 0.055 0.306