Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-09-03 12:04 -0400 (Wed, 03 Sep 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4826 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4616 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4563 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4541 |
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/2321 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.73.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.7 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
taishan | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.73.0 |
Command: /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz |
StartedAt: 2025-09-02 19:34:12 -0400 (Tue, 02 Sep 2025) |
EndedAt: 2025-09-02 19:35:01 -0400 (Tue, 02 Sep 2025) |
EllapsedTime: 49.5 seconds |
RetCode: 0 |
Status: WARNINGS |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 1 |
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.5.1 (2025-06-13) * using platform: x86_64-apple-darwin20 * R was compiled by Apple clang version 14.0.0 (clang-1400.0.29.202) GNU Fortran (GCC) 14.2.0 * running under: macOS Monterey 12.7.6 * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.73.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... WARNING Found the following significant warnings: doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] See ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ * used SDK: ‘MacOSX11.3.sdk’ * 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 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 sizes of PDF files under ‘inst/doc’ ... OK * 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 running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.73.0’ ** using staged installation ** libs using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R installing to /Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/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-apple-darwin20 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.330 0.140 0.461
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-apple-darwin20 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] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells 480847 25.7 1056617 56.5 NA 634462 33.9 Vcells 891074 6.8 8388608 64.0 98304 2108713 16.1 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Tue Sep 2 19:34:35 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Tue Sep 2 19:34:35 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: 0x6000002ac000> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Tue Sep 2 19:34:40 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Tue Sep 2 19:34:41 2025" > > ColMode(tmp2) <pointer: 0x6000002ac000> > > > > ### 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.88339115 0.2979508 -0.5275401 1.3414522 [2,] -0.75855468 -0.5442864 1.0113511 0.4102808 [3,] 0.02683285 1.6527860 1.4785566 0.2556818 [4,] 0.12816091 1.4242333 0.8438792 -0.7012782 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.88339115 0.2979508 0.5275401 1.3414522 [2,] 0.75855468 0.5442864 1.0113511 0.4102808 [3,] 0.02683285 1.6527860 1.4785566 0.2556818 [4,] 0.12816091 1.4242333 0.8438792 0.7012782 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9941679 0.5458487 0.7263195 1.1582108 [2,] 0.8709504 0.7377577 1.0056595 0.6405316 [3,] 0.1638074 1.2856072 1.2159591 0.5056499 [4,] 0.3579957 1.1934125 0.9186290 0.8374236 > > 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: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.82507 30.75644 32.79074 37.92356 [2,] 34.46806 32.92186 36.06795 31.81560 [3,] 26.66491 39.50886 38.63815 30.31218 [4,] 28.70812 38.35836 35.03017 34.07551 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x6000002b4000> > exp(tmp5) <pointer: 0x6000002b4000> > log(tmp5,2) <pointer: 0x6000002b4000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 467.9439 > Min(tmp5) [1] 53.47481 > mean(tmp5) [1] 72.05958 > Sum(tmp5) [1] 14411.92 > Var(tmp5) [1] 866.0646 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 89.22423 69.43448 69.96824 68.48204 73.93387 69.43724 71.77492 70.78240 [9] 68.66214 68.89627 > rowSums(tmp5) [1] 1784.485 1388.690 1399.365 1369.641 1478.677 1388.745 1435.498 1415.648 [9] 1373.243 1377.925 > rowVars(tmp5) [1] 8001.43543 54.70639 79.63144 80.45830 82.90666 67.26397 [7] 65.63721 82.28966 93.34726 92.32703 > rowSd(tmp5) [1] 89.450743 7.396377 8.923645 8.969855 9.105309 8.201462 8.101680 [8] 9.071365 9.661639 9.608695 > rowMax(tmp5) [1] 467.94393 80.72706 87.00497 84.32400 88.70546 84.57800 82.86538 [8] 90.97855 89.65165 88.72721 > rowMin(tmp5) [1] 55.69821 56.16098 55.49951 54.05797 56.29338 55.67232 54.11052 57.80671 [9] 53.47481 56.38886 > > colMeans(tmp5) [1] 107.30188 73.09935 69.52383 71.76654 68.11948 68.67369 70.23993 [8] 68.94588 73.38998 70.03105 67.10965 68.87200 71.49141 72.59988 [15] 73.35614 66.93203 71.30746 64.97522 75.40776 68.04850 > colSums(tmp5) [1] 1073.0188 730.9935 695.2383 717.6654 681.1948 686.7369 702.3993 [8] 689.4588 733.8998 700.3105 671.0965 688.7200 714.9141 725.9988 [15] 733.5614 669.3203 713.0746 649.7522 754.0776 680.4850 > colVars(tmp5) [1] 16100.94725 67.97513 55.88431 92.78219 79.15725 63.11225 [7] 21.47586 47.02775 146.32058 126.46946 70.99437 56.55354 [13] 28.31614 99.30873 87.51743 105.24663 44.83758 46.03749 [19] 151.44391 61.79959 > colSd(tmp5) [1] 126.889508 8.244703 7.475581 9.632351 8.897036 7.944322 [7] 4.634205 6.857678 12.096305 11.245864 8.425816 7.520209 [13] 5.321291 9.965377 9.355075 10.258978 6.696087 6.785093 [19] 12.306255 7.861271 > colMax(tmp5) [1] 467.94393 84.02676 80.42024 86.92100 80.60518 82.59553 77.99659 [8] 78.31828 84.57800 88.03975 77.28536 81.51074 80.39045 84.26151 [15] 87.00497 89.65165 82.15924 79.70887 90.97855 78.06031 > colMin(tmp5) [1] 55.49951 58.67866 57.85244 54.38665 56.41460 54.11052 62.33923 58.60123 [9] 53.47481 56.29338 53.76508 57.79156 66.28337 56.38886 54.05797 55.52202 [17] 57.55896 56.16098 57.11626 55.67232 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] 89.22423 69.43448 69.96824 68.48204 73.93387 69.43724 NA 70.78240 [9] 68.66214 68.89627 > rowSums(tmp5) [1] 1784.485 1388.690 1399.365 1369.641 1478.677 1388.745 NA 1415.648 [9] 1373.243 1377.925 > rowVars(tmp5) [1] 8001.43543 54.70639 79.63144 80.45830 82.90666 67.26397 [7] 69.27858 82.28966 93.34726 92.32703 > rowSd(tmp5) [1] 89.450743 7.396377 8.923645 8.969855 9.105309 8.201462 8.323375 [8] 9.071365 9.661639 9.608695 > rowMax(tmp5) [1] 467.94393 80.72706 87.00497 84.32400 88.70546 84.57800 NA [8] 90.97855 89.65165 88.72721 > rowMin(tmp5) [1] 55.69821 56.16098 55.49951 54.05797 56.29338 55.67232 NA 57.80671 [9] 53.47481 56.38886 > > colMeans(tmp5) [1] 107.30188 73.09935 69.52383 71.76654 68.11948 68.67369 70.23993 [8] 68.94588 73.38998 70.03105 67.10965 68.87200 NA 72.59988 [15] 73.35614 66.93203 71.30746 64.97522 75.40776 68.04850 > colSums(tmp5) [1] 1073.0188 730.9935 695.2383 717.6654 681.1948 686.7369 702.3993 [8] 689.4588 733.8998 700.3105 671.0965 688.7200 NA 725.9988 [15] 733.5614 669.3203 713.0746 649.7522 754.0776 680.4850 > colVars(tmp5) [1] 16100.94725 67.97513 55.88431 92.78219 79.15725 63.11225 [7] 21.47586 47.02775 146.32058 126.46946 70.99437 56.55354 [13] NA 99.30873 87.51743 105.24663 44.83758 46.03749 [19] 151.44391 61.79959 > colSd(tmp5) [1] 126.889508 8.244703 7.475581 9.632351 8.897036 7.944322 [7] 4.634205 6.857678 12.096305 11.245864 8.425816 7.520209 [13] NA 9.965377 9.355075 10.258978 6.696087 6.785093 [19] 12.306255 7.861271 > colMax(tmp5) [1] 467.94393 84.02676 80.42024 86.92100 80.60518 82.59553 77.99659 [8] 78.31828 84.57800 88.03975 77.28536 81.51074 NA 84.26151 [15] 87.00497 89.65165 82.15924 79.70887 90.97855 78.06031 > colMin(tmp5) [1] 55.49951 58.67866 57.85244 54.38665 56.41460 54.11052 62.33923 58.60123 [9] 53.47481 56.29338 53.76508 57.79156 NA 56.38886 54.05797 55.52202 [17] 57.55896 56.16098 57.11626 55.67232 > > Max(tmp5,na.rm=TRUE) [1] 467.9439 > Min(tmp5,na.rm=TRUE) [1] 53.47481 > mean(tmp5,na.rm=TRUE) [1] 72.05952 > Sum(tmp5,na.rm=TRUE) [1] 14339.85 > Var(tmp5,na.rm=TRUE) [1] 870.4387 > > rowMeans(tmp5,na.rm=TRUE) [1] 89.22423 69.43448 69.96824 68.48204 73.93387 69.43724 71.75930 70.78240 [9] 68.66214 68.89627 > rowSums(tmp5,na.rm=TRUE) [1] 1784.485 1388.690 1399.365 1369.641 1478.677 1388.745 1363.427 1415.648 [9] 1373.243 1377.925 > rowVars(tmp5,na.rm=TRUE) [1] 8001.43543 54.70639 79.63144 80.45830 82.90666 67.26397 [7] 69.27858 82.28966 93.34726 92.32703 > rowSd(tmp5,na.rm=TRUE) [1] 89.450743 7.396377 8.923645 8.969855 9.105309 8.201462 8.323375 [8] 9.071365 9.661639 9.608695 > rowMax(tmp5,na.rm=TRUE) [1] 467.94393 80.72706 87.00497 84.32400 88.70546 84.57800 82.86538 [8] 90.97855 89.65165 88.72721 > rowMin(tmp5,na.rm=TRUE) [1] 55.69821 56.16098 55.49951 54.05797 56.29338 55.67232 54.11052 57.80671 [9] 53.47481 56.38886 > > colMeans(tmp5,na.rm=TRUE) [1] 107.30188 73.09935 69.52383 71.76654 68.11948 68.67369 70.23993 [8] 68.94588 73.38998 70.03105 67.10965 68.87200 71.42694 72.59988 [15] 73.35614 66.93203 71.30746 64.97522 75.40776 68.04850 > colSums(tmp5,na.rm=TRUE) [1] 1073.0188 730.9935 695.2383 717.6654 681.1948 686.7369 702.3993 [8] 689.4588 733.8998 700.3105 671.0965 688.7200 642.8425 725.9988 [15] 733.5614 669.3203 713.0746 649.7522 754.0776 680.4850 > colVars(tmp5,na.rm=TRUE) [1] 16100.94725 67.97513 55.88431 92.78219 79.15725 63.11225 [7] 21.47586 47.02775 146.32058 126.46946 70.99437 56.55354 [13] 31.80891 99.30873 87.51743 105.24663 44.83758 46.03749 [19] 151.44391 61.79959 > colSd(tmp5,na.rm=TRUE) [1] 126.889508 8.244703 7.475581 9.632351 8.897036 7.944322 [7] 4.634205 6.857678 12.096305 11.245864 8.425816 7.520209 [13] 5.639938 9.965377 9.355075 10.258978 6.696087 6.785093 [19] 12.306255 7.861271 > colMax(tmp5,na.rm=TRUE) [1] 467.94393 84.02676 80.42024 86.92100 80.60518 82.59553 77.99659 [8] 78.31828 84.57800 88.03975 77.28536 81.51074 80.39045 84.26151 [15] 87.00497 89.65165 82.15924 79.70887 90.97855 78.06031 > colMin(tmp5,na.rm=TRUE) [1] 55.49951 58.67866 57.85244 54.38665 56.41460 54.11052 62.33923 58.60123 [9] 53.47481 56.29338 53.76508 57.79156 66.28337 56.38886 54.05797 55.52202 [17] 57.55896 56.16098 57.11626 55.67232 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 89.22423 69.43448 69.96824 68.48204 73.93387 69.43724 NaN 70.78240 [9] 68.66214 68.89627 > rowSums(tmp5,na.rm=TRUE) [1] 1784.485 1388.690 1399.365 1369.641 1478.677 1388.745 0.000 1415.648 [9] 1373.243 1377.925 > rowVars(tmp5,na.rm=TRUE) [1] 8001.43543 54.70639 79.63144 80.45830 82.90666 67.26397 [7] NA 82.28966 93.34726 92.32703 > rowSd(tmp5,na.rm=TRUE) [1] 89.450743 7.396377 8.923645 8.969855 9.105309 8.201462 NA [8] 9.071365 9.661639 9.608695 > rowMax(tmp5,na.rm=TRUE) [1] 467.94393 80.72706 87.00497 84.32400 88.70546 84.57800 NA [8] 90.97855 89.65165 88.72721 > rowMin(tmp5,na.rm=TRUE) [1] 55.69821 56.16098 55.49951 54.05797 56.29338 55.67232 NA 57.80671 [9] 53.47481 56.38886 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 111.75999 72.57912 68.45331 70.83811 67.46105 70.29182 70.43753 [8] 68.86799 72.98116 68.60501 65.97902 68.87612 NaN 72.35170 [15] 73.31491 68.19981 70.10171 64.79994 77.06464 67.43439 > colSums(tmp5,na.rm=TRUE) [1] 1005.8399 653.2121 616.0798 637.5430 607.1494 632.6263 633.9378 [8] 619.8119 656.8304 617.4451 593.8112 619.8851 0.0000 651.1653 [15] 659.8342 613.7983 630.9154 583.1994 693.5818 606.9095 > colVars(tmp5,na.rm=TRUE) [1] 17889.97443 73.42737 49.97720 94.68254 84.17458 41.54492 [7] 23.72107 52.83796 162.73035 119.40034 65.48742 63.62254 [13] NA 111.02941 98.43798 100.32075 34.08658 51.44652 [19] 139.49043 65.28187 > colSd(tmp5,na.rm=TRUE) [1] 133.753409 8.568977 7.069455 9.730495 9.174670 6.445535 [7] 4.870428 7.268972 12.756581 10.927046 8.092430 7.976374 [13] NA 10.537049 9.921592 10.016025 5.838371 7.172623 [19] 11.810607 8.079719 > colMax(tmp5,na.rm=TRUE) [1] 467.94393 84.02676 80.42024 86.92100 80.60518 82.59553 77.99659 [8] 78.31828 84.57800 88.03975 76.86517 81.51074 -Inf 84.26151 [15] 87.00497 89.65165 77.11816 79.70887 90.97855 78.06031 > colMin(tmp5,na.rm=TRUE) [1] 55.49951 58.67866 57.85244 54.38665 56.41460 60.81412 62.33923 58.60123 [9] 53.47481 56.29338 53.76508 57.79156 Inf 56.38886 54.05797 57.03371 [17] 57.55896 56.16098 57.11626 55.67232 > > > > > 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] 202.6219 351.1204 178.7045 247.6029 122.1902 256.5813 179.8176 141.7750 [9] 175.5500 349.7771 > apply(copymatrix,1,var,na.rm=TRUE) [1] 202.6219 351.1204 178.7045 247.6029 122.1902 256.5813 179.8176 141.7750 [9] 175.5500 349.7771 > > > > 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.136868e-13 1.421085e-14 0.000000e+00 0.000000e+00 0.000000e+00 [6] 0.000000e+00 0.000000e+00 5.684342e-14 -1.136868e-13 -2.842171e-14 [11] -2.842171e-14 1.705303e-13 1.421085e-13 -2.273737e-13 1.136868e-13 [16] 1.136868e-13 5.684342e-14 8.526513e-14 -1.421085e-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) + } 3 20 4 2 6 13 3 14 7 5 10 20 1 6 8 12 9 17 7 18 2 7 4 17 6 5 2 8 1 8 9 18 5 2 4 7 9 7 1 17 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.564157 > Min(tmp) [1] -2.542668 > mean(tmp) [1] -0.04259226 > Sum(tmp) [1] -4.259226 > Var(tmp) [1] 1.039109 > > rowMeans(tmp) [1] -0.04259226 > rowSums(tmp) [1] -4.259226 > rowVars(tmp) [1] 1.039109 > rowSd(tmp) [1] 1.019367 > rowMax(tmp) [1] 2.564157 > rowMin(tmp) [1] -2.542668 > > colMeans(tmp) [1] -1.03434917 0.02336005 -1.17346762 -1.60354208 0.53930320 1.03866180 [7] -0.60901496 2.56415728 -1.90538950 -1.09480253 -2.54266769 1.92300145 [13] -1.00310600 0.73728531 -1.13412601 0.22015130 -1.40961759 -1.90374223 [19] 1.84208796 2.50876449 0.56594689 -0.29675554 0.53034144 1.05341516 [25] -0.14546173 -1.49977388 -0.77397580 -1.29067637 -0.16296944 1.67677909 [31] 0.35977609 0.50252492 0.36575288 -0.50370871 -0.73449363 -1.05459167 [37] -0.36621259 -0.83337425 0.74846123 0.38671210 -0.18079966 0.31701441 [43] 0.29540022 -0.96544998 -0.39573778 0.01176467 -0.50087137 0.13872300 [49] 0.62355681 1.25354168 0.44285675 0.75771795 1.05654514 -0.55138952 [55] -0.74893037 -1.07972844 0.17221985 1.23276779 -0.48108480 -0.71082144 [61] -0.69489793 -1.35337248 -2.39723952 0.66534789 0.90339078 0.56521428 [67] 0.30578627 0.72480364 0.29893365 1.29796361 -0.21694502 0.06162590 [73] 1.85376431 -0.27063590 -0.64610078 1.61912407 -0.89886322 -0.57083151 [79] -0.06968708 1.40506885 -0.35620882 -0.82599063 -0.17771215 0.43802588 [85] 0.34782483 -1.61708942 0.70746803 0.12311697 0.19311736 -0.56112505 [91] -1.38605368 -0.25908061 1.65069949 -0.34533486 -0.93655832 -0.70965229 [97] 0.55440144 -0.06192367 0.41242701 0.77001422 > colSums(tmp) [1] -1.03434917 0.02336005 -1.17346762 -1.60354208 0.53930320 1.03866180 [7] -0.60901496 2.56415728 -1.90538950 -1.09480253 -2.54266769 1.92300145 [13] -1.00310600 0.73728531 -1.13412601 0.22015130 -1.40961759 -1.90374223 [19] 1.84208796 2.50876449 0.56594689 -0.29675554 0.53034144 1.05341516 [25] -0.14546173 -1.49977388 -0.77397580 -1.29067637 -0.16296944 1.67677909 [31] 0.35977609 0.50252492 0.36575288 -0.50370871 -0.73449363 -1.05459167 [37] -0.36621259 -0.83337425 0.74846123 0.38671210 -0.18079966 0.31701441 [43] 0.29540022 -0.96544998 -0.39573778 0.01176467 -0.50087137 0.13872300 [49] 0.62355681 1.25354168 0.44285675 0.75771795 1.05654514 -0.55138952 [55] -0.74893037 -1.07972844 0.17221985 1.23276779 -0.48108480 -0.71082144 [61] -0.69489793 -1.35337248 -2.39723952 0.66534789 0.90339078 0.56521428 [67] 0.30578627 0.72480364 0.29893365 1.29796361 -0.21694502 0.06162590 [73] 1.85376431 -0.27063590 -0.64610078 1.61912407 -0.89886322 -0.57083151 [79] -0.06968708 1.40506885 -0.35620882 -0.82599063 -0.17771215 0.43802588 [85] 0.34782483 -1.61708942 0.70746803 0.12311697 0.19311736 -0.56112505 [91] -1.38605368 -0.25908061 1.65069949 -0.34533486 -0.93655832 -0.70965229 [97] 0.55440144 -0.06192367 0.41242701 0.77001422 > 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] -1.03434917 0.02336005 -1.17346762 -1.60354208 0.53930320 1.03866180 [7] -0.60901496 2.56415728 -1.90538950 -1.09480253 -2.54266769 1.92300145 [13] -1.00310600 0.73728531 -1.13412601 0.22015130 -1.40961759 -1.90374223 [19] 1.84208796 2.50876449 0.56594689 -0.29675554 0.53034144 1.05341516 [25] -0.14546173 -1.49977388 -0.77397580 -1.29067637 -0.16296944 1.67677909 [31] 0.35977609 0.50252492 0.36575288 -0.50370871 -0.73449363 -1.05459167 [37] -0.36621259 -0.83337425 0.74846123 0.38671210 -0.18079966 0.31701441 [43] 0.29540022 -0.96544998 -0.39573778 0.01176467 -0.50087137 0.13872300 [49] 0.62355681 1.25354168 0.44285675 0.75771795 1.05654514 -0.55138952 [55] -0.74893037 -1.07972844 0.17221985 1.23276779 -0.48108480 -0.71082144 [61] -0.69489793 -1.35337248 -2.39723952 0.66534789 0.90339078 0.56521428 [67] 0.30578627 0.72480364 0.29893365 1.29796361 -0.21694502 0.06162590 [73] 1.85376431 -0.27063590 -0.64610078 1.61912407 -0.89886322 -0.57083151 [79] -0.06968708 1.40506885 -0.35620882 -0.82599063 -0.17771215 0.43802588 [85] 0.34782483 -1.61708942 0.70746803 0.12311697 0.19311736 -0.56112505 [91] -1.38605368 -0.25908061 1.65069949 -0.34533486 -0.93655832 -0.70965229 [97] 0.55440144 -0.06192367 0.41242701 0.77001422 > colMin(tmp) [1] -1.03434917 0.02336005 -1.17346762 -1.60354208 0.53930320 1.03866180 [7] -0.60901496 2.56415728 -1.90538950 -1.09480253 -2.54266769 1.92300145 [13] -1.00310600 0.73728531 -1.13412601 0.22015130 -1.40961759 -1.90374223 [19] 1.84208796 2.50876449 0.56594689 -0.29675554 0.53034144 1.05341516 [25] -0.14546173 -1.49977388 -0.77397580 -1.29067637 -0.16296944 1.67677909 [31] 0.35977609 0.50252492 0.36575288 -0.50370871 -0.73449363 -1.05459167 [37] -0.36621259 -0.83337425 0.74846123 0.38671210 -0.18079966 0.31701441 [43] 0.29540022 -0.96544998 -0.39573778 0.01176467 -0.50087137 0.13872300 [49] 0.62355681 1.25354168 0.44285675 0.75771795 1.05654514 -0.55138952 [55] -0.74893037 -1.07972844 0.17221985 1.23276779 -0.48108480 -0.71082144 [61] -0.69489793 -1.35337248 -2.39723952 0.66534789 0.90339078 0.56521428 [67] 0.30578627 0.72480364 0.29893365 1.29796361 -0.21694502 0.06162590 [73] 1.85376431 -0.27063590 -0.64610078 1.61912407 -0.89886322 -0.57083151 [79] -0.06968708 1.40506885 -0.35620882 -0.82599063 -0.17771215 0.43802588 [85] 0.34782483 -1.61708942 0.70746803 0.12311697 0.19311736 -0.56112505 [91] -1.38605368 -0.25908061 1.65069949 -0.34533486 -0.93655832 -0.70965229 [97] 0.55440144 -0.06192367 0.41242701 0.77001422 > colMedians(tmp) [1] -1.03434917 0.02336005 -1.17346762 -1.60354208 0.53930320 1.03866180 [7] -0.60901496 2.56415728 -1.90538950 -1.09480253 -2.54266769 1.92300145 [13] -1.00310600 0.73728531 -1.13412601 0.22015130 -1.40961759 -1.90374223 [19] 1.84208796 2.50876449 0.56594689 -0.29675554 0.53034144 1.05341516 [25] -0.14546173 -1.49977388 -0.77397580 -1.29067637 -0.16296944 1.67677909 [31] 0.35977609 0.50252492 0.36575288 -0.50370871 -0.73449363 -1.05459167 [37] -0.36621259 -0.83337425 0.74846123 0.38671210 -0.18079966 0.31701441 [43] 0.29540022 -0.96544998 -0.39573778 0.01176467 -0.50087137 0.13872300 [49] 0.62355681 1.25354168 0.44285675 0.75771795 1.05654514 -0.55138952 [55] -0.74893037 -1.07972844 0.17221985 1.23276779 -0.48108480 -0.71082144 [61] -0.69489793 -1.35337248 -2.39723952 0.66534789 0.90339078 0.56521428 [67] 0.30578627 0.72480364 0.29893365 1.29796361 -0.21694502 0.06162590 [73] 1.85376431 -0.27063590 -0.64610078 1.61912407 -0.89886322 -0.57083151 [79] -0.06968708 1.40506885 -0.35620882 -0.82599063 -0.17771215 0.43802588 [85] 0.34782483 -1.61708942 0.70746803 0.12311697 0.19311736 -0.56112505 [91] -1.38605368 -0.25908061 1.65069949 -0.34533486 -0.93655832 -0.70965229 [97] 0.55440144 -0.06192367 0.41242701 0.77001422 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.034349 0.02336005 -1.173468 -1.603542 0.5393032 1.038662 -0.609015 [2,] -1.034349 0.02336005 -1.173468 -1.603542 0.5393032 1.038662 -0.609015 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 2.564157 -1.905389 -1.094803 -2.542668 1.923001 -1.003106 0.7372853 [2,] 2.564157 -1.905389 -1.094803 -2.542668 1.923001 -1.003106 0.7372853 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -1.134126 0.2201513 -1.409618 -1.903742 1.842088 2.508764 0.5659469 [2,] -1.134126 0.2201513 -1.409618 -1.903742 1.842088 2.508764 0.5659469 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.2967555 0.5303414 1.053415 -0.1454617 -1.499774 -0.7739758 -1.290676 [2,] -0.2967555 0.5303414 1.053415 -0.1454617 -1.499774 -0.7739758 -1.290676 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.1629694 1.676779 0.3597761 0.5025249 0.3657529 -0.5037087 -0.7344936 [2,] -0.1629694 1.676779 0.3597761 0.5025249 0.3657529 -0.5037087 -0.7344936 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.054592 -0.3662126 -0.8333743 0.7484612 0.3867121 -0.1807997 0.3170144 [2,] -1.054592 -0.3662126 -0.8333743 0.7484612 0.3867121 -0.1807997 0.3170144 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.2954002 -0.96545 -0.3957378 0.01176467 -0.5008714 0.138723 0.6235568 [2,] 0.2954002 -0.96545 -0.3957378 0.01176467 -0.5008714 0.138723 0.6235568 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.253542 0.4428568 0.757718 1.056545 -0.5513895 -0.7489304 -1.079728 [2,] 1.253542 0.4428568 0.757718 1.056545 -0.5513895 -0.7489304 -1.079728 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.1722198 1.232768 -0.4810848 -0.7108214 -0.6948979 -1.353372 -2.39724 [2,] 0.1722198 1.232768 -0.4810848 -0.7108214 -0.6948979 -1.353372 -2.39724 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.6653479 0.9033908 0.5652143 0.3057863 0.7248036 0.2989337 1.297964 [2,] 0.6653479 0.9033908 0.5652143 0.3057863 0.7248036 0.2989337 1.297964 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.216945 0.0616259 1.853764 -0.2706359 -0.6461008 1.619124 -0.8988632 [2,] -0.216945 0.0616259 1.853764 -0.2706359 -0.6461008 1.619124 -0.8988632 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.5708315 -0.06968708 1.405069 -0.3562088 -0.8259906 -0.1777122 0.4380259 [2,] -0.5708315 -0.06968708 1.405069 -0.3562088 -0.8259906 -0.1777122 0.4380259 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.3478248 -1.617089 0.707468 0.123117 0.1931174 -0.561125 -1.386054 [2,] 0.3478248 -1.617089 0.707468 0.123117 0.1931174 -0.561125 -1.386054 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.2590806 1.650699 -0.3453349 -0.9365583 -0.7096523 0.5544014 -0.06192367 [2,] -0.2590806 1.650699 -0.3453349 -0.9365583 -0.7096523 0.5544014 -0.06192367 [,99] [,100] [1,] 0.412427 0.7700142 [2,] 0.412427 0.7700142 > > > Max(tmp2) [1] 2.585631 > Min(tmp2) [1] -2.077722 > mean(tmp2) [1] -0.02081897 > Sum(tmp2) [1] -2.081897 > Var(tmp2) [1] 0.8450015 > > rowMeans(tmp2) [1] 2.088626588 0.517629503 1.765809501 0.035751897 0.359611177 [6] -0.865894153 -1.204768902 -0.080004335 -0.007573607 -0.571393986 [11] -0.051483612 0.316629549 -1.169956933 0.211059697 -1.689017381 [16] 0.692849317 -0.182889599 -1.692923021 0.934843844 -0.490965966 [21] 0.212349728 -0.128118719 -0.658214114 1.273781994 -0.061694539 [26] -0.072136919 -0.902317131 0.601564352 1.905108569 0.477246471 [31] -0.959369380 0.322922637 0.461912834 -0.279028379 -0.628023867 [36] -1.091743676 -1.291469349 0.492041167 -0.351336234 0.775279594 [41] 0.878515308 -0.787879645 -0.486733450 0.336840122 -1.233659772 [46] -0.441120795 -0.786816909 -1.156861264 -0.556286899 0.641667459 [51] 0.970177814 -0.081909217 0.630937017 -0.448702938 -0.205631327 [56] -0.231542849 1.171896210 0.202660495 -0.099491229 -1.390616994 [61] 0.190733043 -2.077721784 -0.392148992 -0.636169069 0.749953211 [66] -0.030593070 -0.559481659 0.843320111 0.652862080 -0.762348602 [71] 2.585630895 0.241707027 -0.741909057 1.338201617 1.090112900 [76] -1.671178176 -1.904034141 -1.779174466 -0.518501989 0.230493548 [81] -0.546624116 -0.118516469 0.691984453 0.593504395 0.176166426 [86] -0.339055025 -0.789682629 1.408033596 0.286634948 1.383169467 [91] -0.371621067 1.112894513 -0.401390265 0.183857130 0.749037838 [96] 0.467917783 0.762282430 0.005983758 1.363047406 -1.489411192 > rowSums(tmp2) [1] 2.088626588 0.517629503 1.765809501 0.035751897 0.359611177 [6] -0.865894153 -1.204768902 -0.080004335 -0.007573607 -0.571393986 [11] -0.051483612 0.316629549 -1.169956933 0.211059697 -1.689017381 [16] 0.692849317 -0.182889599 -1.692923021 0.934843844 -0.490965966 [21] 0.212349728 -0.128118719 -0.658214114 1.273781994 -0.061694539 [26] -0.072136919 -0.902317131 0.601564352 1.905108569 0.477246471 [31] -0.959369380 0.322922637 0.461912834 -0.279028379 -0.628023867 [36] -1.091743676 -1.291469349 0.492041167 -0.351336234 0.775279594 [41] 0.878515308 -0.787879645 -0.486733450 0.336840122 -1.233659772 [46] -0.441120795 -0.786816909 -1.156861264 -0.556286899 0.641667459 [51] 0.970177814 -0.081909217 0.630937017 -0.448702938 -0.205631327 [56] -0.231542849 1.171896210 0.202660495 -0.099491229 -1.390616994 [61] 0.190733043 -2.077721784 -0.392148992 -0.636169069 0.749953211 [66] -0.030593070 -0.559481659 0.843320111 0.652862080 -0.762348602 [71] 2.585630895 0.241707027 -0.741909057 1.338201617 1.090112900 [76] -1.671178176 -1.904034141 -1.779174466 -0.518501989 0.230493548 [81] -0.546624116 -0.118516469 0.691984453 0.593504395 0.176166426 [86] -0.339055025 -0.789682629 1.408033596 0.286634948 1.383169467 [91] -0.371621067 1.112894513 -0.401390265 0.183857130 0.749037838 [96] 0.467917783 0.762282430 0.005983758 1.363047406 -1.489411192 > 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] 2.088626588 0.517629503 1.765809501 0.035751897 0.359611177 [6] -0.865894153 -1.204768902 -0.080004335 -0.007573607 -0.571393986 [11] -0.051483612 0.316629549 -1.169956933 0.211059697 -1.689017381 [16] 0.692849317 -0.182889599 -1.692923021 0.934843844 -0.490965966 [21] 0.212349728 -0.128118719 -0.658214114 1.273781994 -0.061694539 [26] -0.072136919 -0.902317131 0.601564352 1.905108569 0.477246471 [31] -0.959369380 0.322922637 0.461912834 -0.279028379 -0.628023867 [36] -1.091743676 -1.291469349 0.492041167 -0.351336234 0.775279594 [41] 0.878515308 -0.787879645 -0.486733450 0.336840122 -1.233659772 [46] -0.441120795 -0.786816909 -1.156861264 -0.556286899 0.641667459 [51] 0.970177814 -0.081909217 0.630937017 -0.448702938 -0.205631327 [56] -0.231542849 1.171896210 0.202660495 -0.099491229 -1.390616994 [61] 0.190733043 -2.077721784 -0.392148992 -0.636169069 0.749953211 [66] -0.030593070 -0.559481659 0.843320111 0.652862080 -0.762348602 [71] 2.585630895 0.241707027 -0.741909057 1.338201617 1.090112900 [76] -1.671178176 -1.904034141 -1.779174466 -0.518501989 0.230493548 [81] -0.546624116 -0.118516469 0.691984453 0.593504395 0.176166426 [86] -0.339055025 -0.789682629 1.408033596 0.286634948 1.383169467 [91] -0.371621067 1.112894513 -0.401390265 0.183857130 0.749037838 [96] 0.467917783 0.762282430 0.005983758 1.363047406 -1.489411192 > rowMin(tmp2) [1] 2.088626588 0.517629503 1.765809501 0.035751897 0.359611177 [6] -0.865894153 -1.204768902 -0.080004335 -0.007573607 -0.571393986 [11] -0.051483612 0.316629549 -1.169956933 0.211059697 -1.689017381 [16] 0.692849317 -0.182889599 -1.692923021 0.934843844 -0.490965966 [21] 0.212349728 -0.128118719 -0.658214114 1.273781994 -0.061694539 [26] -0.072136919 -0.902317131 0.601564352 1.905108569 0.477246471 [31] -0.959369380 0.322922637 0.461912834 -0.279028379 -0.628023867 [36] -1.091743676 -1.291469349 0.492041167 -0.351336234 0.775279594 [41] 0.878515308 -0.787879645 -0.486733450 0.336840122 -1.233659772 [46] -0.441120795 -0.786816909 -1.156861264 -0.556286899 0.641667459 [51] 0.970177814 -0.081909217 0.630937017 -0.448702938 -0.205631327 [56] -0.231542849 1.171896210 0.202660495 -0.099491229 -1.390616994 [61] 0.190733043 -2.077721784 -0.392148992 -0.636169069 0.749953211 [66] -0.030593070 -0.559481659 0.843320111 0.652862080 -0.762348602 [71] 2.585630895 0.241707027 -0.741909057 1.338201617 1.090112900 [76] -1.671178176 -1.904034141 -1.779174466 -0.518501989 0.230493548 [81] -0.546624116 -0.118516469 0.691984453 0.593504395 0.176166426 [86] -0.339055025 -0.789682629 1.408033596 0.286634948 1.383169467 [91] -0.371621067 1.112894513 -0.401390265 0.183857130 0.749037838 [96] 0.467917783 0.762282430 0.005983758 1.363047406 -1.489411192 > > colMeans(tmp2) [1] -0.02081897 > colSums(tmp2) [1] -2.081897 > colVars(tmp2) [1] 0.8450015 > colSd(tmp2) [1] 0.9192396 > colMax(tmp2) [1] 2.585631 > colMin(tmp2) [1] -2.077722 > colMedians(tmp2) [1] -0.05658908 > colRanges(tmp2) [,1] [1,] -2.077722 [2,] 2.585631 > > 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] -4.7304238 -3.5766467 -1.0952036 2.3647371 1.2941128 0.5310096 [7] -1.5987761 -4.0681797 2.0112670 1.5288552 > colApply(tmp,quantile)[,1] [,1] [1,] -1.38461232 [2,] -0.66440064 [3,] -0.30391043 [4,] -0.17983354 [5,] 0.06049162 > > rowApply(tmp,sum) [1] -3.79728155 0.04921066 4.97371685 -3.35959207 -0.63056402 -2.92079841 [7] 1.99995861 -4.46166493 0.02337090 0.78439571 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 6 4 3 7 5 1 2 7 5 3 [2,] 8 3 6 5 4 2 4 6 6 2 [3,] 1 8 1 4 7 9 6 5 4 6 [4,] 2 6 7 9 9 10 10 1 7 4 [5,] 7 1 5 10 10 8 1 8 2 10 [6,] 4 9 2 3 6 3 8 4 10 5 [7,] 3 10 8 6 1 4 3 10 1 7 [8,] 9 2 4 2 2 7 9 3 9 1 [9,] 5 5 10 8 3 6 7 9 3 8 [10,] 10 7 9 1 8 5 5 2 8 9 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.3921454 -1.9220989 -0.3533479 -0.1576223 -2.3568826 1.5233837 [7] 5.2261252 -1.0492909 2.8999705 4.0142628 -1.1438236 2.6694701 [13] -3.6726452 -7.4515976 2.9398209 3.2055531 -2.2386164 1.0692042 [19] 2.4887384 1.6766066 > colApply(tmp,quantile)[,1] [,1] [1,] -1.2306950 [2,] 0.1833453 [3,] 0.5016328 [4,] 0.7829497 [5,] 1.1549125 > > rowApply(tmp,sum) [1] 1.859189 2.333336 -7.219584 8.591079 3.195336 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 15 10 19 13 4 [2,] 4 5 11 7 6 [3,] 12 8 9 2 19 [4,] 19 2 18 8 7 [5,] 13 3 13 15 1 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.5016328 -0.63551350 0.1663809 0.9111090 0.3109626 -0.7963058 [2,] 0.1833453 -0.58603250 -0.4195952 -1.6034189 -1.4930386 0.6956608 [3,] 1.1549125 -0.32601774 -0.4410008 0.6696553 -0.2250337 -0.4270981 [4,] 0.7829497 -0.05621056 -1.0713672 0.1038457 1.1262318 1.6495885 [5,] -1.2306950 -0.31832456 1.4122343 -0.2388135 -2.0760047 0.4015384 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.1619490 -0.6931259 0.8739076 1.7806793 -0.2604368 0.1162391 [2,] 2.2855380 0.4430709 -0.6111687 0.9876362 0.6852475 0.4760727 [3,] 1.3658877 -0.6195814 0.5889716 -1.7084155 0.4616738 0.2070638 [4,] 1.0146474 -0.6820221 1.7616856 2.1025028 -0.4112309 0.3583430 [5,] 0.7220012 0.5023676 0.2865744 0.8518600 -1.6190773 1.5117515 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.3354439 -1.1417438 -0.3184887 0.7654059 -0.2203140 0.63844881 [2,] -0.4693896 -2.1667303 1.3653722 0.8983941 -0.5719765 0.07566864 [3,] -1.0887000 -2.8935442 0.4602901 -1.2399244 -1.6254284 -0.65770474 [4,] -0.6677880 -2.1237458 0.4409576 1.5602714 -0.9477692 0.19374750 [5,] -1.7822115 0.8741664 0.9916897 1.2214061 1.1268717 0.81904400 [,19] [,20] [1,] -0.01207434 -0.3010695 [2,] 0.72275191 1.4359282 [3,] -0.28725510 -0.5883352 [4,] 2.87008980 0.5863517 [5,] -0.80477387 0.5437314 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 650 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 563 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -0.4730886 -0.02071233 1.571214 0.6176114 1.905682 -0.1279502 -2.173755 col8 col9 col10 col11 col12 col13 col14 row1 0.9278642 -0.5176197 -0.05030555 0.07556458 0.4047049 0.3065918 1.468303 col15 col16 col17 col18 col19 col20 row1 -1.402757 0.2871781 -1.43679 1.249404 -0.4081477 0.9751962 > tmp[,"col10"] col10 row1 -0.05030555 row2 -1.05583875 row3 -1.65218721 row4 0.61539225 row5 0.81210164 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -0.4730886 -0.02071233 1.5712142 0.6176114 1.905682 -0.1279502 row5 1.7880350 -0.56558397 0.4134077 -0.7120675 -1.721036 0.1094702 col7 col8 col9 col10 col11 col12 row1 -2.1737553 0.9278642 -0.51761968 -0.05030555 0.07556458 0.4047049 row5 0.5663496 0.5947190 0.06639936 0.81210164 1.64992192 0.2115201 col13 col14 col15 col16 col17 col18 col19 row1 0.3065918 1.468303 -1.402757 0.2871781 -1.4367899 1.2494038 -0.40814767 row5 2.4327798 -1.732599 2.804931 -0.3408513 0.9725975 -0.9648512 -0.04696766 col20 row1 0.9751962 row5 0.7677992 > tmp[,c("col6","col20")] col6 col20 row1 -0.1279502 0.9751962 row2 -0.5608086 -0.1632600 row3 0.2877997 -1.1534481 row4 -1.2194413 0.1057354 row5 0.1094702 0.7677992 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.1279502 0.9751962 row5 0.1094702 0.7677992 > > > > > 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 51.81655 50.92677 49.67274 48.33158 51.05686 104.9972 50.68949 50.42562 col9 col10 col11 col12 col13 col14 col15 col16 row1 52.03472 49.91743 48.80606 48.08424 50.65225 50.74005 52.01366 50.17284 col17 col18 col19 col20 row1 51.10197 51.84482 50.9107 104.0446 > tmp[,"col10"] col10 row1 49.91743 row2 28.86620 row3 29.59128 row4 29.49728 row5 49.51997 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.81655 50.92677 49.67274 48.33158 51.05686 104.9972 50.68949 50.42562 row5 49.92961 49.13624 49.76385 50.70497 51.31479 106.8395 49.40354 50.83244 col9 col10 col11 col12 col13 col14 col15 col16 row1 52.03472 49.91743 48.80606 48.08424 50.65225 50.74005 52.01366 50.17284 row5 48.80525 49.51997 46.79245 49.43739 50.82854 48.16599 49.31710 50.25417 col17 col18 col19 col20 row1 51.10197 51.84482 50.9107 104.0446 row5 50.71129 51.06782 49.3814 105.5337 > tmp[,c("col6","col20")] col6 col20 row1 104.99719 104.04465 row2 75.07841 76.20254 row3 74.52886 75.04405 row4 75.64219 76.25213 row5 106.83953 105.53368 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.9972 104.0446 row5 106.8395 105.5337 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.9972 104.0446 row5 106.8395 105.5337 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.2224863 [2,] -1.5443655 [3,] -1.0298459 [4,] -0.1874784 [5,] -0.5233400 > tmp[,c("col17","col7")] col17 col7 [1,] -0.2519679 -2.0294595 [2,] -1.8777200 -0.9565739 [3,] -0.5834384 -0.7481516 [4,] 1.6741377 0.9752441 [5,] -0.4937818 0.1890237 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.82644772 -1.2595766 [2,] 1.48194133 -0.9282483 [3,] 0.39059361 0.9235198 [4,] 0.02870028 0.2534526 [5,] -0.11363879 1.8557117 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.826448 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.826448 [2,] 1.481941 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 -2.5332067 0.3039642 0.06249885 -0.1638470 -0.04869433 -0.7257542 row1 0.6004229 0.1939870 -0.36984201 -0.1089237 0.64827586 -1.8132416 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 0.2619306 -0.3930883 1.470910 -0.5190906 0.3636881 -1.0951120 0.01551575 row1 -1.0553925 0.5627381 1.500589 -2.1439126 -0.4680642 -0.5361232 0.77174991 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 0.2098559 -1.039843 0.2761776 -0.4384534 -0.3403992 0.2312677 0.2578664 row1 0.2284086 -1.554126 -2.5978867 -0.9519570 -0.9113032 0.5958046 0.3932248 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.2945252 -0.08308923 -1.514748 1.162936 -1.111288 0.4876995 1.364422 [,8] [,9] [,10] row2 0.5919986 -1.047545 -1.20731 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.392765 1.12008 -0.1116833 -1.663046 0.357312 0.9462566 -0.8233646 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.033042 2.011221 -0.007064352 0.8124108 -0.8518013 -0.3132929 1.973188 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.9104561 -1.748142 1.384636 1.64179 0.7823101 -0.369836 > > > 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: 0x6000002e4300> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf5326f530074" [2] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf5323242f8c5" [3] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf5324ada674a" [4] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf53248b351aa" [5] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf53274b6952f" [6] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf5327efc7c85" [7] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf532725340e4" [8] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf53237c9735f" [9] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf532ab57e96" [10] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf5321189af58" [11] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf5326656c366" [12] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf5324a369207" [13] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf53244ad2fa1" [14] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf53246121640" [15] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMf5324d72e7b0" > > > ### 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: 0x6000002b40c0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6000002b40c0> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6000002b40c0> > rowMedians(tmp) [1] 0.177177473 0.268522381 -0.344760199 -0.148652026 0.647629339 [6] 0.074179293 0.045143195 0.052730308 -0.203928144 0.070594710 [11] 0.010044010 -0.300407398 -0.501240112 0.206458828 0.160418157 [16] -0.095139644 0.666114722 -0.443010328 0.059045058 0.352647589 [21] 0.227394899 0.546831506 -0.188933119 -0.433397691 0.141576502 [26] 0.137145059 -0.147950529 -0.238586718 0.086258673 0.758734504 [31] -0.167716466 -0.280748134 -0.207942621 0.616124165 0.510508811 [36] -0.032766630 -0.258781189 -0.072036675 -0.314365304 0.143162777 [41] -0.017946352 -0.210257477 0.324252431 0.321377760 0.027139919 [46] 0.345176546 0.068614928 0.021291439 -0.654173639 0.003914974 [51] -0.014809112 0.597102516 0.461513545 0.645435224 -0.494286607 [56] -0.605156038 0.029270347 -0.986914521 -0.036112399 -0.415396632 [61] 0.296745909 -0.014390928 -0.178714054 -0.092660121 -0.195159119 [66] -0.080406589 0.171772817 0.045463492 0.149696342 -0.403229680 [71] 0.093126601 -0.209734468 -0.117926293 0.045122223 0.109478313 [76] -0.108473152 0.129758911 0.107406261 0.715939738 -0.470334551 [81] 0.361667242 -0.094147119 -0.046726408 0.198793812 -0.143031684 [86] -0.599142628 -0.084151280 0.194688670 0.394548265 -0.099966366 [91] 0.167327013 0.415531849 0.043831462 0.162834123 -0.230875740 [96] -0.074600407 0.221460801 -0.199561084 -0.350864944 -0.189237690 [101] 0.138641486 0.394604565 0.356901146 -0.478848328 0.122860161 [106] 0.086002065 -0.338164694 -0.276713160 -0.186297089 -0.552592913 [111] -0.160383404 0.466747925 0.277456744 0.175963966 0.143911243 [116] 0.066540090 -0.271519212 0.165449312 0.036584032 -0.173483516 [121] 0.195733340 0.081777916 -0.135603076 -0.216180540 0.060885938 [126] 0.314006863 0.073397420 0.030584276 -0.101943979 0.026640670 [131] -0.165160153 0.155941130 0.107256192 -0.142647983 0.237545613 [136] -0.626193352 -0.041725277 -0.269304268 -0.405148922 0.717079402 [141] -0.082203053 -0.120277559 -0.054353131 -0.090684925 0.140315329 [146] 0.296142686 -0.091993098 -0.198707894 -0.109044296 -0.011190074 [151] 0.142051334 -0.092284758 0.263914322 -0.131958832 0.208475722 [156] -0.544886507 -0.329323295 0.312126426 -0.285414252 0.104248046 [161] 0.161770660 0.476181902 -0.351617475 -0.031258892 0.122002151 [166] -0.296962740 0.139342797 -0.164979713 0.235971700 -0.089428363 [171] -0.309828438 -0.423383425 0.051938191 -0.015864173 -0.123741254 [176] -0.441113769 -0.554111479 -0.111258491 0.018659198 0.011280353 [181] 0.550702326 0.009060270 0.548077375 0.211070829 -0.256318682 [186] -0.104530405 -0.211386903 0.255144652 0.101062689 0.454325933 [191] 0.721325194 0.076060269 -0.030343175 0.028964106 0.405062997 [196] 0.014163042 -0.225039530 -0.016186604 -0.030421883 0.090626514 [201] 0.093167588 0.498369166 -0.221108926 -0.191833330 -0.192448252 [206] -0.218453539 0.073105402 0.197253920 0.155135981 0.097463128 [211] -0.131997081 -0.218672153 0.180735287 -0.498056292 0.356079723 [216] 0.055493898 -0.781970501 -0.111141744 0.333797502 0.547753587 [221] 0.338297827 0.548319211 0.063657897 -0.063019512 0.164483415 [226] -0.114045598 -0.063117345 -0.058062803 0.151532773 -0.120507641 > > proc.time() user system elapsed 2.583 14.812 17.796
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-apple-darwin20 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: 0x6000029f0000> > .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: 0x6000029f0000> > .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: 0x6000029f0000> > .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: 0x6000029f0000> > 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: 0x6000029fc000> > .Call("R_bm_AddColumn",P) <pointer: 0x6000029fc000> > .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: 0x6000029fc000> > .Call("R_bm_AddColumn",P) <pointer: 0x6000029fc000> > .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: 0x6000029fc000> > 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: 0x60000298c0c0> > .Call("R_bm_AddColumn",P) <pointer: 0x60000298c0c0> > .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: 0x60000298c0c0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x60000298c0c0> > .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: 0x60000298c0c0> > > .Call("R_bm_RowMode",P) <pointer: 0x60000298c0c0> > .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: 0x60000298c0c0> > > .Call("R_bm_ColMode",P) <pointer: 0x60000298c0c0> > .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: 0x60000298c0c0> > 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: 0x60000298c240> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x60000298c240> > .Call("R_bm_AddColumn",P) <pointer: 0x60000298c240> > .Call("R_bm_AddColumn",P) <pointer: 0x60000298c240> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilefca211f60d5" "BufferedMatrixFilefca2330e4086" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilefca211f60d5" "BufferedMatrixFilefca2330e4086" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x60000298c4e0> > .Call("R_bm_AddColumn",P) <pointer: 0x60000298c4e0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x60000298c4e0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x60000298c4e0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x60000298c4e0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x60000298c4e0> > .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: 0x60000298c6c0> > .Call("R_bm_AddColumn",P) <pointer: 0x60000298c6c0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x60000298c6c0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x60000298c6c0> > 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: 0x600002988060> > .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: 0x600002988060> > rm(P) > > proc.time() user system elapsed 0.354 0.141 0.488
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-apple-darwin20 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.321 0.088 0.398