Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-10-18 12:04 -0400 (Sat, 18 Oct 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 Patched (2025-08-23 r88802) -- "Great Square Root" | 4887 |
lconway | macOS 12.7.6 Monterey | x86_64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4677 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4622 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4632 |
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 256/2353 | 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.6 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-10-17 20:42:02 -0400 (Fri, 17 Oct 2025) |
EndedAt: 2025-10-17 20:43:15 -0400 (Fri, 17 Oct 2025) |
EllapsedTime: 73.0 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 Patched (2025-09-10 r88807) * 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.1.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.1.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 Patched (2025-09-10 r88807) -- "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.357 0.164 0.513
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.1 Patched (2025-09-10 r88807) -- "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 480848 25.7 1056620 56.5 NA 634462 33.9 Vcells 891079 6.8 8388608 64.0 98304 2108714 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] "Fri Oct 17 20:42:28 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] "Fri Oct 17 20:42:29 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: 0x600000a880c0> > > > > 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] "Fri Oct 17 20:42:34 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] "Fri Oct 17 20:42:37 2025" > > ColMode(tmp2) <pointer: 0x600000a880c0> > > > > ### 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.5381700 -0.9507048 -0.2323922 -0.6000422 [2,] -1.4527306 1.5913016 -0.3440142 -0.8820534 [3,] 0.2044241 0.5341052 -0.3994639 1.9587741 [4,] -0.3865978 -0.1650762 -0.2456617 0.6396328 > 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.5381700 0.9507048 0.2323922 0.6000422 [2,] 1.4527306 1.5913016 0.3440142 0.8820534 [3,] 0.2044241 0.5341052 0.3994639 1.9587741 [4,] 0.3865978 0.1650762 0.2456617 0.6396328 > 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.9768818 0.9750409 0.4820708 0.7746239 [2,] 1.2052928 1.2614680 0.5865272 0.9391770 [3,] 0.4521328 0.7308250 0.6320316 1.3995621 [4,] 0.6217699 0.4062957 0.4956427 0.7997705 > > 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.30699 35.70111 30.05310 33.34628 [2,] 38.50566 39.20598 31.20929 35.27382 [3,] 29.72575 32.84236 31.71978 40.95440 [4,] 31.60430 29.22803 30.20209 33.63734 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600000a94000> > exp(tmp5) <pointer: 0x600000a94000> > log(tmp5,2) <pointer: 0x600000a94000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.8656 > Min(tmp5) [1] 53.63495 > mean(tmp5) [1] 72.99881 > Sum(tmp5) [1] 14599.76 > Var(tmp5) [1] 858.9286 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.71937 71.33217 67.79334 68.63687 71.39814 73.87632 68.87072 72.96973 [9] 70.68973 72.70173 > rowSums(tmp5) [1] 1834.387 1426.643 1355.867 1372.737 1427.963 1477.526 1377.414 1459.395 [9] 1413.795 1454.035 > rowVars(tmp5) [1] 7853.58503 98.10672 91.58841 51.07439 82.10875 67.39373 [7] 92.64250 74.33372 45.32455 92.45775 > rowSd(tmp5) [1] 88.620455 9.904883 9.570183 7.146635 9.061388 8.209368 9.625097 [8] 8.621701 6.732351 9.615495 > rowMax(tmp5) [1] 466.86561 91.29578 85.82699 82.42419 89.92097 90.52077 84.59118 [8] 92.28979 81.82230 93.01259 > rowMin(tmp5) [1] 56.33617 56.97525 53.80605 56.12881 57.24512 62.53844 53.74250 56.30984 [9] 58.01050 53.63495 > > colMeans(tmp5) [1] 111.98298 69.20567 70.48140 77.54761 69.63202 75.97644 69.35865 [8] 71.73165 72.60325 71.17663 70.43190 71.67585 67.52454 65.60265 [15] 70.77787 70.03943 70.67744 67.80948 74.09131 71.64947 > colSums(tmp5) [1] 1119.8298 692.0567 704.8140 775.4761 696.3202 759.7644 693.5865 [8] 717.3165 726.0325 711.7663 704.3190 716.7585 675.2454 656.0265 [15] 707.7787 700.3943 706.7744 678.0948 740.9131 716.4947 > colVars(tmp5) [1] 15604.68817 65.16360 64.04069 51.27683 102.56053 100.13814 [7] 92.06839 72.58785 95.02241 118.55195 60.13247 49.64655 [13] 77.38137 121.41487 64.44422 57.42801 45.26431 88.38596 [19] 45.40140 80.98933 > colSd(tmp5) [1] 124.918726 8.072397 8.002543 7.160784 10.127217 10.006904 [7] 9.595227 8.519850 9.747944 10.888157 7.754513 7.046031 [13] 8.796668 11.018841 8.027716 7.578127 6.727876 9.401381 [19] 6.738056 8.999407 > colMax(tmp5) [1] 466.86561 81.60211 84.88008 93.01259 89.92097 90.00506 80.68028 [8] 86.72278 91.29578 88.42545 85.82699 80.27697 81.82230 90.52077 [15] 81.02524 81.21745 87.54397 78.98626 83.93678 92.28979 > colMin(tmp5) [1] 61.87026 59.02324 62.55159 69.40591 53.91807 61.93588 56.12881 62.53844 [9] 56.33617 53.63495 60.98585 58.03816 56.39710 56.30984 57.63095 59.87138 [17] 63.25584 53.74250 60.79962 59.18185 > > > ### 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] 91.71937 71.33217 67.79334 NA 71.39814 73.87632 68.87072 72.96973 [9] 70.68973 72.70173 > rowSums(tmp5) [1] 1834.387 1426.643 1355.867 NA 1427.963 1477.526 1377.414 1459.395 [9] 1413.795 1454.035 > rowVars(tmp5) [1] 7853.58503 98.10672 91.58841 48.68393 82.10875 67.39373 [7] 92.64250 74.33372 45.32455 92.45775 > rowSd(tmp5) [1] 88.620455 9.904883 9.570183 6.977387 9.061388 8.209368 9.625097 [8] 8.621701 6.732351 9.615495 > rowMax(tmp5) [1] 466.86561 91.29578 85.82699 NA 89.92097 90.52077 84.59118 [8] 92.28979 81.82230 93.01259 > rowMin(tmp5) [1] 56.33617 56.97525 53.80605 NA 57.24512 62.53844 53.74250 56.30984 [9] 58.01050 53.63495 > > colMeans(tmp5) [1] 111.98298 69.20567 70.48140 77.54761 69.63202 75.97644 69.35865 [8] 71.73165 72.60325 71.17663 70.43190 71.67585 67.52454 65.60265 [15] 70.77787 70.03943 70.67744 67.80948 74.09131 NA > colSums(tmp5) [1] 1119.8298 692.0567 704.8140 775.4761 696.3202 759.7644 693.5865 [8] 717.3165 726.0325 711.7663 704.3190 716.7585 675.2454 656.0265 [15] 707.7787 700.3943 706.7744 678.0948 740.9131 NA > colVars(tmp5) [1] 15604.68817 65.16360 64.04069 51.27683 102.56053 100.13814 [7] 92.06839 72.58785 95.02241 118.55195 60.13247 49.64655 [13] 77.38137 121.41487 64.44422 57.42801 45.26431 88.38596 [19] 45.40140 NA > colSd(tmp5) [1] 124.918726 8.072397 8.002543 7.160784 10.127217 10.006904 [7] 9.595227 8.519850 9.747944 10.888157 7.754513 7.046031 [13] 8.796668 11.018841 8.027716 7.578127 6.727876 9.401381 [19] 6.738056 NA > colMax(tmp5) [1] 466.86561 81.60211 84.88008 93.01259 89.92097 90.00506 80.68028 [8] 86.72278 91.29578 88.42545 85.82699 80.27697 81.82230 90.52077 [15] 81.02524 81.21745 87.54397 78.98626 83.93678 NA > colMin(tmp5) [1] 61.87026 59.02324 62.55159 69.40591 53.91807 61.93588 56.12881 62.53844 [9] 56.33617 53.63495 60.98585 58.03816 56.39710 56.30984 57.63095 59.87138 [17] 63.25584 53.74250 60.79962 NA > > Max(tmp5,na.rm=TRUE) [1] 466.8656 > Min(tmp5,na.rm=TRUE) [1] 53.63495 > mean(tmp5,na.rm=TRUE) [1] 73.06824 > Sum(tmp5,na.rm=TRUE) [1] 14540.58 > Var(tmp5,na.rm=TRUE) [1] 862.2976 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.71937 71.33217 67.79334 69.13451 71.39814 73.87632 68.87072 72.96973 [9] 70.68973 72.70173 > rowSums(tmp5,na.rm=TRUE) [1] 1834.387 1426.643 1355.867 1313.556 1427.963 1477.526 1377.414 1459.395 [9] 1413.795 1454.035 > rowVars(tmp5,na.rm=TRUE) [1] 7853.58503 98.10672 91.58841 48.68393 82.10875 67.39373 [7] 92.64250 74.33372 45.32455 92.45775 > rowSd(tmp5,na.rm=TRUE) [1] 88.620455 9.904883 9.570183 6.977387 9.061388 8.209368 9.625097 [8] 8.621701 6.732351 9.615495 > rowMax(tmp5,na.rm=TRUE) [1] 466.86561 91.29578 85.82699 82.42419 89.92097 90.52077 84.59118 [8] 92.28979 81.82230 93.01259 > rowMin(tmp5,na.rm=TRUE) [1] 56.33617 56.97525 53.80605 56.12881 57.24512 62.53844 53.74250 56.30984 [9] 58.01050 53.63495 > > colMeans(tmp5,na.rm=TRUE) [1] 111.98298 69.20567 70.48140 77.54761 69.63202 75.97644 69.35865 [8] 71.73165 72.60325 71.17663 70.43190 71.67585 67.52454 65.60265 [15] 70.77787 70.03943 70.67744 67.80948 74.09131 73.03476 > colSums(tmp5,na.rm=TRUE) [1] 1119.8298 692.0567 704.8140 775.4761 696.3202 759.7644 693.5865 [8] 717.3165 726.0325 711.7663 704.3190 716.7585 675.2454 656.0265 [15] 707.7787 700.3943 706.7744 678.0948 740.9131 657.3128 > colVars(tmp5,na.rm=TRUE) [1] 15604.68817 65.16360 64.04069 51.27683 102.56053 100.13814 [7] 92.06839 72.58785 95.02241 118.55195 60.13247 49.64655 [13] 77.38137 121.41487 64.44422 57.42801 45.26431 88.38596 [19] 45.40140 69.52391 > colSd(tmp5,na.rm=TRUE) [1] 124.918726 8.072397 8.002543 7.160784 10.127217 10.006904 [7] 9.595227 8.519850 9.747944 10.888157 7.754513 7.046031 [13] 8.796668 11.018841 8.027716 7.578127 6.727876 9.401381 [19] 6.738056 8.338100 > colMax(tmp5,na.rm=TRUE) [1] 466.86561 81.60211 84.88008 93.01259 89.92097 90.00506 80.68028 [8] 86.72278 91.29578 88.42545 85.82699 80.27697 81.82230 90.52077 [15] 81.02524 81.21745 87.54397 78.98626 83.93678 92.28979 > colMin(tmp5,na.rm=TRUE) [1] 61.87026 59.02324 62.55159 69.40591 53.91807 61.93588 56.12881 62.53844 [9] 56.33617 53.63495 60.98585 58.03816 56.39710 56.30984 57.63095 59.87138 [17] 63.25584 53.74250 60.79962 65.85113 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.71937 71.33217 67.79334 NaN 71.39814 73.87632 68.87072 72.96973 [9] 70.68973 72.70173 > rowSums(tmp5,na.rm=TRUE) [1] 1834.387 1426.643 1355.867 0.000 1427.963 1477.526 1377.414 1459.395 [9] 1413.795 1454.035 > rowVars(tmp5,na.rm=TRUE) [1] 7853.58503 98.10672 91.58841 NA 82.10875 67.39373 [7] 92.64250 74.33372 45.32455 92.45775 > rowSd(tmp5,na.rm=TRUE) [1] 88.620455 9.904883 9.570183 NA 9.061388 8.209368 9.625097 [8] 8.621701 6.732351 9.615495 > rowMax(tmp5,na.rm=TRUE) [1] 466.86561 91.29578 85.82699 NA 89.92097 90.52077 84.59118 [8] 92.28979 81.82230 93.01259 > rowMin(tmp5,na.rm=TRUE) [1] 56.33617 56.97525 53.80605 NA 57.24512 62.53844 53.74250 56.30984 [9] 58.01050 53.63495 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 117.11663 70.13582 71.32804 78.38493 69.53165 76.93612 70.82863 [8] 72.54207 73.10644 69.92690 70.75604 70.72017 67.86754 65.67626 [15] 69.84332 69.01036 70.70244 67.38478 74.83656 NaN > colSums(tmp5,na.rm=TRUE) [1] 1054.0496 631.2224 641.9523 705.4644 625.7848 692.4251 637.4577 [8] 652.8787 657.9580 629.3421 636.8043 636.4815 610.8078 591.0864 [15] 628.5899 621.0932 636.3219 606.4630 673.5291 0.0000 > colVars(tmp5,na.rm=TRUE) [1] 17258.78848 63.57579 63.98189 49.79896 115.26726 102.29426 [7] 79.26740 74.27246 104.05171 115.80045 66.46707 45.57748 [13] 85.73053 136.53077 62.67413 52.69297 50.91532 97.40498 [19] 44.82836 NA > colSd(tmp5,na.rm=TRUE) [1] 131.372708 7.973443 7.998868 7.056838 10.736259 10.114063 [7] 8.903224 8.618147 10.200574 10.761062 8.152734 6.751110 [13] 9.259078 11.684638 7.916699 7.258992 7.135497 9.869396 [19] 6.695399 NA > colMax(tmp5,na.rm=TRUE) [1] 466.86561 81.60211 84.88008 93.01259 89.92097 90.00506 80.68028 [8] 86.72278 91.29578 88.42545 85.82699 77.03679 81.82230 90.52077 [15] 81.02524 81.21745 87.54397 78.98626 83.93678 -Inf > colMin(tmp5,na.rm=TRUE) [1] 61.87026 59.02324 62.55159 69.40591 53.91807 61.93588 56.97525 62.53844 [9] 56.33617 53.63495 60.98585 58.03816 56.39710 56.30984 57.63095 59.87138 [17] 63.25584 53.74250 60.79962 Inf > > > > > 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] 366.0464 205.0505 236.1161 145.2982 229.2272 209.6012 283.2792 135.2621 [9] 269.1541 215.6350 > apply(copymatrix,1,var,na.rm=TRUE) [1] 366.0464 205.0505 236.1161 145.2982 229.2272 209.6012 283.2792 135.2621 [9] 269.1541 215.6350 > > > > 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] 0.000000e+00 1.705303e-13 8.526513e-14 7.105427e-14 -1.136868e-13 [6] 5.684342e-14 -8.526513e-14 0.000000e+00 1.705303e-13 0.000000e+00 [11] 2.842171e-14 -1.136868e-13 -3.410605e-13 5.684342e-14 2.842171e-14 [16] 1.705303e-13 5.684342e-14 -2.842171e-14 1.136868e-13 5.684342e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 3 7 4 1 9 1 8 12 6 17 3 2 9 19 6 11 8 16 9 12 4 14 2 18 5 1 3 1 1 10 2 20 2 14 2 14 4 16 6 16 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.017961 > Min(tmp) [1] -2.474488 > mean(tmp) [1] 0.004864573 > Sum(tmp) [1] 0.4864573 > Var(tmp) [1] 0.8432637 > > rowMeans(tmp) [1] 0.004864573 > rowSums(tmp) [1] 0.4864573 > rowVars(tmp) [1] 0.8432637 > rowSd(tmp) [1] 0.9182939 > rowMax(tmp) [1] 2.017961 > rowMin(tmp) [1] -2.474488 > > colMeans(tmp) [1] 0.388298131 -0.829118903 -0.722350413 0.730371690 0.275962186 [6] -0.207321618 0.002604093 -1.018983243 0.529474690 1.003035619 [11] 0.989312549 -1.755287322 -0.049128144 -0.138525136 0.176382439 [16] -0.337241279 -1.924364702 -0.253297232 -0.020249173 0.310184470 [21] 1.369130702 0.311327800 0.139810364 1.848236831 -0.166978536 [26] 1.339765861 -0.152063264 0.759845867 1.295334224 1.597372862 [31] -0.229508798 1.158464406 -0.372645669 0.559392100 0.425616942 [36] 1.620586944 0.529574337 0.853859268 0.526883888 -1.731924382 [41] 0.456138279 -0.322552495 0.158458391 -0.247548069 -0.465287252 [46] -0.178068604 0.359052682 0.836241189 0.365320087 1.704594915 [51] 0.205280396 -0.285824132 0.094906305 -0.799560372 0.894557104 [56] 0.327603907 0.562726259 1.375300020 -0.601405051 -0.750348059 [61] 0.102445385 -0.423581900 -1.458303644 -0.434878963 0.843263615 [66] 0.314664336 -0.730052835 -0.489773884 0.294508946 -1.545477207 [71] -0.819769217 1.718275503 -1.413191079 0.070862290 -0.399412587 [76] 2.017960706 0.155826006 -0.141438359 -0.494643644 -0.414121175 [81] -1.004134709 0.211019671 0.617642918 -2.043800809 -0.109026996 [86] 0.013108128 0.718363423 -1.926593506 0.939762020 -0.745712127 [91] -0.912665186 0.650109440 0.088486346 -0.169247637 0.834670764 [96] -2.474487611 -1.705794122 -1.126548366 -0.495124773 -0.148157776 > colSums(tmp) [1] 0.388298131 -0.829118903 -0.722350413 0.730371690 0.275962186 [6] -0.207321618 0.002604093 -1.018983243 0.529474690 1.003035619 [11] 0.989312549 -1.755287322 -0.049128144 -0.138525136 0.176382439 [16] -0.337241279 -1.924364702 -0.253297232 -0.020249173 0.310184470 [21] 1.369130702 0.311327800 0.139810364 1.848236831 -0.166978536 [26] 1.339765861 -0.152063264 0.759845867 1.295334224 1.597372862 [31] -0.229508798 1.158464406 -0.372645669 0.559392100 0.425616942 [36] 1.620586944 0.529574337 0.853859268 0.526883888 -1.731924382 [41] 0.456138279 -0.322552495 0.158458391 -0.247548069 -0.465287252 [46] -0.178068604 0.359052682 0.836241189 0.365320087 1.704594915 [51] 0.205280396 -0.285824132 0.094906305 -0.799560372 0.894557104 [56] 0.327603907 0.562726259 1.375300020 -0.601405051 -0.750348059 [61] 0.102445385 -0.423581900 -1.458303644 -0.434878963 0.843263615 [66] 0.314664336 -0.730052835 -0.489773884 0.294508946 -1.545477207 [71] -0.819769217 1.718275503 -1.413191079 0.070862290 -0.399412587 [76] 2.017960706 0.155826006 -0.141438359 -0.494643644 -0.414121175 [81] -1.004134709 0.211019671 0.617642918 -2.043800809 -0.109026996 [86] 0.013108128 0.718363423 -1.926593506 0.939762020 -0.745712127 [91] -0.912665186 0.650109440 0.088486346 -0.169247637 0.834670764 [96] -2.474487611 -1.705794122 -1.126548366 -0.495124773 -0.148157776 > 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.388298131 -0.829118903 -0.722350413 0.730371690 0.275962186 [6] -0.207321618 0.002604093 -1.018983243 0.529474690 1.003035619 [11] 0.989312549 -1.755287322 -0.049128144 -0.138525136 0.176382439 [16] -0.337241279 -1.924364702 -0.253297232 -0.020249173 0.310184470 [21] 1.369130702 0.311327800 0.139810364 1.848236831 -0.166978536 [26] 1.339765861 -0.152063264 0.759845867 1.295334224 1.597372862 [31] -0.229508798 1.158464406 -0.372645669 0.559392100 0.425616942 [36] 1.620586944 0.529574337 0.853859268 0.526883888 -1.731924382 [41] 0.456138279 -0.322552495 0.158458391 -0.247548069 -0.465287252 [46] -0.178068604 0.359052682 0.836241189 0.365320087 1.704594915 [51] 0.205280396 -0.285824132 0.094906305 -0.799560372 0.894557104 [56] 0.327603907 0.562726259 1.375300020 -0.601405051 -0.750348059 [61] 0.102445385 -0.423581900 -1.458303644 -0.434878963 0.843263615 [66] 0.314664336 -0.730052835 -0.489773884 0.294508946 -1.545477207 [71] -0.819769217 1.718275503 -1.413191079 0.070862290 -0.399412587 [76] 2.017960706 0.155826006 -0.141438359 -0.494643644 -0.414121175 [81] -1.004134709 0.211019671 0.617642918 -2.043800809 -0.109026996 [86] 0.013108128 0.718363423 -1.926593506 0.939762020 -0.745712127 [91] -0.912665186 0.650109440 0.088486346 -0.169247637 0.834670764 [96] -2.474487611 -1.705794122 -1.126548366 -0.495124773 -0.148157776 > colMin(tmp) [1] 0.388298131 -0.829118903 -0.722350413 0.730371690 0.275962186 [6] -0.207321618 0.002604093 -1.018983243 0.529474690 1.003035619 [11] 0.989312549 -1.755287322 -0.049128144 -0.138525136 0.176382439 [16] -0.337241279 -1.924364702 -0.253297232 -0.020249173 0.310184470 [21] 1.369130702 0.311327800 0.139810364 1.848236831 -0.166978536 [26] 1.339765861 -0.152063264 0.759845867 1.295334224 1.597372862 [31] -0.229508798 1.158464406 -0.372645669 0.559392100 0.425616942 [36] 1.620586944 0.529574337 0.853859268 0.526883888 -1.731924382 [41] 0.456138279 -0.322552495 0.158458391 -0.247548069 -0.465287252 [46] -0.178068604 0.359052682 0.836241189 0.365320087 1.704594915 [51] 0.205280396 -0.285824132 0.094906305 -0.799560372 0.894557104 [56] 0.327603907 0.562726259 1.375300020 -0.601405051 -0.750348059 [61] 0.102445385 -0.423581900 -1.458303644 -0.434878963 0.843263615 [66] 0.314664336 -0.730052835 -0.489773884 0.294508946 -1.545477207 [71] -0.819769217 1.718275503 -1.413191079 0.070862290 -0.399412587 [76] 2.017960706 0.155826006 -0.141438359 -0.494643644 -0.414121175 [81] -1.004134709 0.211019671 0.617642918 -2.043800809 -0.109026996 [86] 0.013108128 0.718363423 -1.926593506 0.939762020 -0.745712127 [91] -0.912665186 0.650109440 0.088486346 -0.169247637 0.834670764 [96] -2.474487611 -1.705794122 -1.126548366 -0.495124773 -0.148157776 > colMedians(tmp) [1] 0.388298131 -0.829118903 -0.722350413 0.730371690 0.275962186 [6] -0.207321618 0.002604093 -1.018983243 0.529474690 1.003035619 [11] 0.989312549 -1.755287322 -0.049128144 -0.138525136 0.176382439 [16] -0.337241279 -1.924364702 -0.253297232 -0.020249173 0.310184470 [21] 1.369130702 0.311327800 0.139810364 1.848236831 -0.166978536 [26] 1.339765861 -0.152063264 0.759845867 1.295334224 1.597372862 [31] -0.229508798 1.158464406 -0.372645669 0.559392100 0.425616942 [36] 1.620586944 0.529574337 0.853859268 0.526883888 -1.731924382 [41] 0.456138279 -0.322552495 0.158458391 -0.247548069 -0.465287252 [46] -0.178068604 0.359052682 0.836241189 0.365320087 1.704594915 [51] 0.205280396 -0.285824132 0.094906305 -0.799560372 0.894557104 [56] 0.327603907 0.562726259 1.375300020 -0.601405051 -0.750348059 [61] 0.102445385 -0.423581900 -1.458303644 -0.434878963 0.843263615 [66] 0.314664336 -0.730052835 -0.489773884 0.294508946 -1.545477207 [71] -0.819769217 1.718275503 -1.413191079 0.070862290 -0.399412587 [76] 2.017960706 0.155826006 -0.141438359 -0.494643644 -0.414121175 [81] -1.004134709 0.211019671 0.617642918 -2.043800809 -0.109026996 [86] 0.013108128 0.718363423 -1.926593506 0.939762020 -0.745712127 [91] -0.912665186 0.650109440 0.088486346 -0.169247637 0.834670764 [96] -2.474487611 -1.705794122 -1.126548366 -0.495124773 -0.148157776 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.3882981 -0.8291189 -0.7223504 0.7303717 0.2759622 -0.2073216 0.002604093 [2,] 0.3882981 -0.8291189 -0.7223504 0.7303717 0.2759622 -0.2073216 0.002604093 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.018983 0.5294747 1.003036 0.9893125 -1.755287 -0.04912814 -0.1385251 [2,] -1.018983 0.5294747 1.003036 0.9893125 -1.755287 -0.04912814 -0.1385251 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.1763824 -0.3372413 -1.924365 -0.2532972 -0.02024917 0.3101845 1.369131 [2,] 0.1763824 -0.3372413 -1.924365 -0.2532972 -0.02024917 0.3101845 1.369131 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.3113278 0.1398104 1.848237 -0.1669785 1.339766 -0.1520633 0.7598459 [2,] 0.3113278 0.1398104 1.848237 -0.1669785 1.339766 -0.1520633 0.7598459 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 1.295334 1.597373 -0.2295088 1.158464 -0.3726457 0.5593921 0.4256169 [2,] 1.295334 1.597373 -0.2295088 1.158464 -0.3726457 0.5593921 0.4256169 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 1.620587 0.5295743 0.8538593 0.5268839 -1.731924 0.4561383 -0.3225525 [2,] 1.620587 0.5295743 0.8538593 0.5268839 -1.731924 0.4561383 -0.3225525 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.1584584 -0.2475481 -0.4652873 -0.1780686 0.3590527 0.8362412 0.3653201 [2,] 0.1584584 -0.2475481 -0.4652873 -0.1780686 0.3590527 0.8362412 0.3653201 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.704595 0.2052804 -0.2858241 0.09490631 -0.7995604 0.8945571 0.3276039 [2,] 1.704595 0.2052804 -0.2858241 0.09490631 -0.7995604 0.8945571 0.3276039 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.5627263 1.3753 -0.6014051 -0.7503481 0.1024454 -0.4235819 -1.458304 [2,] 0.5627263 1.3753 -0.6014051 -0.7503481 0.1024454 -0.4235819 -1.458304 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.434879 0.8432636 0.3146643 -0.7300528 -0.4897739 0.2945089 -1.545477 [2,] -0.434879 0.8432636 0.3146643 -0.7300528 -0.4897739 0.2945089 -1.545477 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.8197692 1.718276 -1.413191 0.07086229 -0.3994126 2.017961 0.155826 [2,] -0.8197692 1.718276 -1.413191 0.07086229 -0.3994126 2.017961 0.155826 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.1414384 -0.4946436 -0.4141212 -1.004135 0.2110197 0.6176429 -2.043801 [2,] -0.1414384 -0.4946436 -0.4141212 -1.004135 0.2110197 0.6176429 -2.043801 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.109027 0.01310813 0.7183634 -1.926594 0.939762 -0.7457121 -0.9126652 [2,] -0.109027 0.01310813 0.7183634 -1.926594 0.939762 -0.7457121 -0.9126652 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.6501094 0.08848635 -0.1692476 0.8346708 -2.474488 -1.705794 -1.126548 [2,] 0.6501094 0.08848635 -0.1692476 0.8346708 -2.474488 -1.705794 -1.126548 [,99] [,100] [1,] -0.4951248 -0.1481578 [2,] -0.4951248 -0.1481578 > > > Max(tmp2) [1] 2.162894 > Min(tmp2) [1] -2.501066 > mean(tmp2) [1] -0.07926129 > Sum(tmp2) [1] -7.926129 > Var(tmp2) [1] 1.093321 > > rowMeans(tmp2) [1] 0.243180494 -0.598707884 -0.523509397 -0.344683994 1.258691985 [6] 0.034464642 -0.246497982 1.594628915 -0.968010880 -0.306443361 [11] 0.668240237 -0.418741373 -0.888095536 -0.192606267 0.633915450 [16] -1.313338436 0.872978282 -0.720814390 -0.449594972 -1.173218852 [21] -0.001219281 -1.562668566 -0.423280298 1.106383157 1.065212016 [26] 0.040910296 -0.348782451 0.483000802 1.682365074 -0.781233859 [31] -2.501065940 -0.132006161 1.423902631 -0.172396818 1.893714739 [36] -0.992984076 0.016055169 2.136162778 -0.395876557 -0.668453727 [41] 1.183567510 -0.875640699 -1.687396208 -1.356436152 -0.954440280 [46] -1.968921137 -0.594293106 1.169696004 1.605314385 0.005120101 [51] 1.014785282 0.466361030 1.597575096 -0.525677740 0.700451862 [56] 0.505115125 0.875738124 -1.893429829 -0.515817349 -1.528631409 [61] -0.129773626 -1.545539514 0.143295874 -1.460524080 0.405120408 [66] 2.162893813 0.019842560 -1.533953035 1.132682340 -0.878942138 [71] 0.086730368 -1.815008367 -0.049956208 -0.679955121 1.726704752 [76] 0.723802695 1.607878695 0.337718880 -0.024121557 -0.518042773 [81] -0.006450828 1.897407012 -0.669741834 -0.506640204 0.267245459 [86] 0.501737428 -1.186867132 -0.862923176 -1.172870542 -1.259195275 [91] 0.390154451 2.035429694 -1.350602247 -0.819260036 -0.354356388 [96] 0.077521697 0.555989275 -0.757930257 -0.422522538 -0.245723713 > rowSums(tmp2) [1] 0.243180494 -0.598707884 -0.523509397 -0.344683994 1.258691985 [6] 0.034464642 -0.246497982 1.594628915 -0.968010880 -0.306443361 [11] 0.668240237 -0.418741373 -0.888095536 -0.192606267 0.633915450 [16] -1.313338436 0.872978282 -0.720814390 -0.449594972 -1.173218852 [21] -0.001219281 -1.562668566 -0.423280298 1.106383157 1.065212016 [26] 0.040910296 -0.348782451 0.483000802 1.682365074 -0.781233859 [31] -2.501065940 -0.132006161 1.423902631 -0.172396818 1.893714739 [36] -0.992984076 0.016055169 2.136162778 -0.395876557 -0.668453727 [41] 1.183567510 -0.875640699 -1.687396208 -1.356436152 -0.954440280 [46] -1.968921137 -0.594293106 1.169696004 1.605314385 0.005120101 [51] 1.014785282 0.466361030 1.597575096 -0.525677740 0.700451862 [56] 0.505115125 0.875738124 -1.893429829 -0.515817349 -1.528631409 [61] -0.129773626 -1.545539514 0.143295874 -1.460524080 0.405120408 [66] 2.162893813 0.019842560 -1.533953035 1.132682340 -0.878942138 [71] 0.086730368 -1.815008367 -0.049956208 -0.679955121 1.726704752 [76] 0.723802695 1.607878695 0.337718880 -0.024121557 -0.518042773 [81] -0.006450828 1.897407012 -0.669741834 -0.506640204 0.267245459 [86] 0.501737428 -1.186867132 -0.862923176 -1.172870542 -1.259195275 [91] 0.390154451 2.035429694 -1.350602247 -0.819260036 -0.354356388 [96] 0.077521697 0.555989275 -0.757930257 -0.422522538 -0.245723713 > 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.243180494 -0.598707884 -0.523509397 -0.344683994 1.258691985 [6] 0.034464642 -0.246497982 1.594628915 -0.968010880 -0.306443361 [11] 0.668240237 -0.418741373 -0.888095536 -0.192606267 0.633915450 [16] -1.313338436 0.872978282 -0.720814390 -0.449594972 -1.173218852 [21] -0.001219281 -1.562668566 -0.423280298 1.106383157 1.065212016 [26] 0.040910296 -0.348782451 0.483000802 1.682365074 -0.781233859 [31] -2.501065940 -0.132006161 1.423902631 -0.172396818 1.893714739 [36] -0.992984076 0.016055169 2.136162778 -0.395876557 -0.668453727 [41] 1.183567510 -0.875640699 -1.687396208 -1.356436152 -0.954440280 [46] -1.968921137 -0.594293106 1.169696004 1.605314385 0.005120101 [51] 1.014785282 0.466361030 1.597575096 -0.525677740 0.700451862 [56] 0.505115125 0.875738124 -1.893429829 -0.515817349 -1.528631409 [61] -0.129773626 -1.545539514 0.143295874 -1.460524080 0.405120408 [66] 2.162893813 0.019842560 -1.533953035 1.132682340 -0.878942138 [71] 0.086730368 -1.815008367 -0.049956208 -0.679955121 1.726704752 [76] 0.723802695 1.607878695 0.337718880 -0.024121557 -0.518042773 [81] -0.006450828 1.897407012 -0.669741834 -0.506640204 0.267245459 [86] 0.501737428 -1.186867132 -0.862923176 -1.172870542 -1.259195275 [91] 0.390154451 2.035429694 -1.350602247 -0.819260036 -0.354356388 [96] 0.077521697 0.555989275 -0.757930257 -0.422522538 -0.245723713 > rowMin(tmp2) [1] 0.243180494 -0.598707884 -0.523509397 -0.344683994 1.258691985 [6] 0.034464642 -0.246497982 1.594628915 -0.968010880 -0.306443361 [11] 0.668240237 -0.418741373 -0.888095536 -0.192606267 0.633915450 [16] -1.313338436 0.872978282 -0.720814390 -0.449594972 -1.173218852 [21] -0.001219281 -1.562668566 -0.423280298 1.106383157 1.065212016 [26] 0.040910296 -0.348782451 0.483000802 1.682365074 -0.781233859 [31] -2.501065940 -0.132006161 1.423902631 -0.172396818 1.893714739 [36] -0.992984076 0.016055169 2.136162778 -0.395876557 -0.668453727 [41] 1.183567510 -0.875640699 -1.687396208 -1.356436152 -0.954440280 [46] -1.968921137 -0.594293106 1.169696004 1.605314385 0.005120101 [51] 1.014785282 0.466361030 1.597575096 -0.525677740 0.700451862 [56] 0.505115125 0.875738124 -1.893429829 -0.515817349 -1.528631409 [61] -0.129773626 -1.545539514 0.143295874 -1.460524080 0.405120408 [66] 2.162893813 0.019842560 -1.533953035 1.132682340 -0.878942138 [71] 0.086730368 -1.815008367 -0.049956208 -0.679955121 1.726704752 [76] 0.723802695 1.607878695 0.337718880 -0.024121557 -0.518042773 [81] -0.006450828 1.897407012 -0.669741834 -0.506640204 0.267245459 [86] 0.501737428 -1.186867132 -0.862923176 -1.172870542 -1.259195275 [91] 0.390154451 2.035429694 -1.350602247 -0.819260036 -0.354356388 [96] 0.077521697 0.555989275 -0.757930257 -0.422522538 -0.245723713 > > colMeans(tmp2) [1] -0.07926129 > colSums(tmp2) [1] -7.926129 > colVars(tmp2) [1] 1.093321 > colSd(tmp2) [1] 1.04562 > colMax(tmp2) [1] 2.162894 > colMin(tmp2) [1] -2.501066 > colMedians(tmp2) [1] -0.1825015 > colRanges(tmp2) [,1] [1,] -2.501066 [2,] 2.162894 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 0.8101832 -7.3238786 -2.5343781 6.0882263 0.5489007 2.0925742 [7] 0.2584282 2.8763343 0.9396649 -1.1490886 > colApply(tmp,quantile)[,1] [,1] [1,] -1.00861861 [2,] -0.70852544 [3,] -0.02369848 [4,] 0.41196401 [5,] 1.81841508 > > rowApply(tmp,sum) [1] 0.4785746 -0.4634977 2.6272203 0.7435411 -0.5439789 -1.3255446 [7] 5.1587405 -1.6297346 -1.8415706 -0.5967837 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 9 4 9 2 3 3 7 7 2 8 [2,] 1 5 1 3 5 2 8 1 1 2 [3,] 6 1 10 5 1 8 4 2 5 7 [4,] 10 6 7 9 6 9 5 5 10 1 [5,] 5 9 4 7 9 1 2 10 7 9 [6,] 8 2 2 4 8 4 10 6 9 3 [7,] 7 7 6 6 7 7 6 3 6 4 [8,] 4 3 8 10 4 5 9 8 4 6 [9,] 2 8 5 8 10 10 1 4 3 5 [10,] 3 10 3 1 2 6 3 9 8 10 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -2.9500215 1.7916467 -2.4065231 -1.5725152 0.7736759 1.3175729 [7] 0.1411892 2.8904583 0.1405575 2.3910914 -2.2531530 1.2685228 [13] -3.9943692 1.7901563 -1.3431002 -0.4732238 2.9167760 3.3902206 [19] 0.8159190 -0.6362984 > colApply(tmp,quantile)[,1] [,1] [1,] -1.2262160 [2,] -1.1684351 [3,] -1.0545242 [4,] -0.3409403 [5,] 0.8400939 > > rowApply(tmp,sum) [1] -1.4328673 -1.6763222 9.5534998 0.1909124 -2.6366406 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 4 8 15 2 5 [2,] 18 7 8 13 16 [3,] 16 16 5 3 1 [4,] 15 11 2 12 2 [5,] 7 1 19 8 19 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.0545242 0.846118485 0.7281777 0.59510953 -0.7152826 0.8005353 [2,] -0.3409403 -0.377669411 0.3213578 -0.06099323 -1.4878407 -0.6215555 [3,] 0.8400939 -0.001689981 -0.3897796 -0.94481993 1.9923647 1.7312138 [4,] -1.2262160 0.410810459 -0.9808167 0.37464337 -0.3695683 -0.3675498 [5,] -1.1684351 0.914077169 -2.0854623 -1.53645494 1.3540027 -0.2250710 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.4369682 1.4706556 -0.3655434 -0.83633476 0.2416408 -0.3966737 [2,] 0.1402269 -0.7811499 -0.6336099 1.17242868 -1.0049603 -0.1459915 [3,] 0.7630806 -0.2831088 0.3135136 0.77251046 -1.5181696 0.9899258 [4,] 0.5573992 1.4913785 0.4800141 1.22266921 0.5291327 -0.7686639 [5,] 0.1174508 0.9926829 0.3461831 0.05981779 -0.5007966 1.5899261 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -1.0939463 1.6860878 0.1887674 0.4169545 -1.56367056 -1.0054907 [2,] -0.5491559 0.1151707 0.1364515 -0.2799037 0.77673981 1.3570536 [3,] 0.6456997 -0.8784107 -0.7506162 0.8098109 3.06046292 1.7841750 [4,] -1.5437966 0.9833537 -0.6935214 -0.5701037 -0.06806139 0.2855525 [5,] -1.4531699 -0.1160453 -0.2241816 -0.8499818 0.71130521 0.9689303 [,19] [,20] [1,] -0.38371491 0.4452349 [2,] 0.32938980 0.2586293 [3,] -0.03855277 0.6557959 [4,] 1.10417838 -0.6599220 [5,] -0.19538155 -1.3360365 > > > 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 : 643 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 : 558 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.2658358 1.518363 -1.801001 0.0742698 -1.024368 1.889207 0.1523091 col8 col9 col10 col11 col12 col13 col14 row1 -0.6989447 -0.1531445 0.6819267 -2.029068 2.310776 -1.266825 -1.701845 col15 col16 col17 col18 col19 col20 row1 0.2676376 -0.2457559 -1.603232 -1.483972 0.001335041 -0.3620179 > tmp[,"col10"] col10 row1 0.68192666 row2 -0.70130898 row3 0.84540172 row4 0.03763114 row5 -1.08361242 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.2658358 1.5183634 -1.801001 0.0742698 -1.0243683 1.8892067 row5 -1.4412237 -0.8196483 1.310672 -0.9435499 -0.9961925 -0.1669772 col7 col8 col9 col10 col11 col12 col13 row1 0.1523091 -0.6989447 -0.1531445 0.6819267 -2.029068 2.310776 -1.266825 row5 -0.5289285 0.6637350 -1.8679281 -1.0836124 -1.491911 1.082868 1.716880 col14 col15 col16 col17 col18 col19 row1 -1.7018446 0.2676376 -0.2457559 -1.6032321 -1.483972 0.001335041 row5 0.0951304 -0.5657630 0.6364319 -0.3508701 1.840926 1.936989654 col20 row1 -0.3620179 row5 0.8695541 > tmp[,c("col6","col20")] col6 col20 row1 1.88920666 -0.3620179 row2 0.61834648 -0.8006323 row3 -0.15453148 -1.6656892 row4 0.07547116 -1.4789879 row5 -0.16697722 0.8695541 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 1.8892067 -0.3620179 row5 -0.1669772 0.8695541 > > > > > 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.9119 48.87514 50.04415 49.82565 49.75082 104.9051 50.53967 49.29491 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.29463 50.34914 51.09758 51.19911 50.69688 49.17518 48.70036 51.34037 col17 col18 col19 col20 row1 51.26183 47.31379 50.06559 105.0696 > tmp[,"col10"] col10 row1 50.34914 row2 30.47597 row3 28.42333 row4 29.75476 row5 49.98163 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.91190 48.87514 50.04415 49.82565 49.75082 104.9051 50.53967 49.29491 row5 51.59985 50.38273 49.59499 50.41144 51.15931 104.3609 50.02766 49.48930 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.29463 50.34914 51.09758 51.19911 50.69688 49.17518 48.70036 51.34037 row5 48.88004 49.98163 50.99156 50.10501 48.82699 49.23385 49.97024 49.51814 col17 col18 col19 col20 row1 51.26183 47.31379 50.06559 105.0696 row5 52.45756 48.99519 49.75273 105.2841 > tmp[,c("col6","col20")] col6 col20 row1 104.90512 105.06960 row2 74.55601 74.63314 row3 74.30309 76.32959 row4 75.15875 75.45756 row5 104.36093 105.28410 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.9051 105.0696 row5 104.3609 105.2841 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.9051 105.0696 row5 104.3609 105.2841 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.1654240 [2,] 0.2572335 [3,] -0.1276917 [4,] 1.9068185 [5,] 1.6786602 > tmp[,c("col17","col7")] col17 col7 [1,] 0.20157605 -0.2710607 [2,] -0.20948619 -0.6460538 [3,] 0.17363178 0.9232795 [4,] 0.04730316 1.3499820 [5,] 0.09879285 0.6559636 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.09131267 1.021168303 [2,] -1.02413695 0.406405292 [3,] -1.92598169 -0.068289360 [4,] 0.48336006 0.683985951 [5,] 0.08618670 -0.002899625 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.09131267 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.09131267 [2,] -1.02413695 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 1.7547810 -0.3847942 -0.7695121 -0.05649153 0.5981458 -0.7328675 row1 0.3421688 0.5214421 0.3654008 1.30549489 -0.7376696 -0.1952980 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.7914498 -0.6512425 -0.9487691 0.785016 -0.5653958 1.254606 -0.8955213 row1 0.8854214 1.0347519 -1.1085328 -1.178397 0.1679616 1.226007 0.7696713 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 0.3848422 0.7488353 0.3465036 -0.4063492 -0.004792401 1.319181 0.4986733 row1 1.9922607 0.5350447 -0.9962097 -0.7295692 -1.699998488 -1.756247 2.3742080 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.8819376 1.036796 -0.1329206 -0.7815201 -0.9055115 0.02152087 -0.2647634 [,8] [,9] [,10] row2 -0.3103186 -0.2198884 0.1764901 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.4100117 0.9114131 0.9128061 0.7636108 -0.03699474 0.1800854 1.299676 [,8] [,9] [,10] [,11] [,12] [,13] row5 -0.4157428 -0.9953653 -0.3684934 -0.5284008 -0.2012807 -0.9253671 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.01018658 0.4821572 -0.1973441 2.223414 -0.2292721 0.3533396 -1.266423 > > > 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: 0x600000af4000> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8addaee74d" [2] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad55d3773f" [3] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad2e39f51e" [4] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad5f0b9c47" [5] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad73412a10" [6] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad3b30bb8d" [7] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad7c694456" [8] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad6305a9e9" [9] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad8d632c9" [10] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad26a02ea7" [11] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad5e56e9c0" [12] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad1c0c6ca3" [13] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad73b04fb7" [14] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad3c41b2b7" [15] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM8ad7d3c2b48" > > > ### 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: 0x600000a88120> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600000a88120> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600000a88120> > rowMedians(tmp) [1] 0.092744943 0.254166741 -0.020091654 -0.094561012 0.171572861 [6] -0.171902379 -0.109307292 0.088945189 0.059809788 0.195993307 [11] -0.149007331 -0.134619247 0.476212352 -0.240811862 -0.490638588 [16] -0.018586600 0.013706314 -0.084044371 -0.150494419 0.016603314 [21] -0.117862114 0.144670972 -0.006846260 -0.100088808 -0.107878493 [26] -0.390799301 0.046748896 -0.588052382 0.714183856 -0.416237520 [31] 0.239401037 0.007553035 0.607692812 -0.356067544 -0.197430821 [36] -0.240247082 -0.255394135 -0.383870030 -0.059415370 -0.318353277 [41] -0.510738405 0.186018061 0.126164086 0.492195703 0.034219315 [46] -0.207608296 0.295379819 -0.049483125 0.493800165 -0.329315744 [51] -0.051501978 -0.257602053 0.042123825 0.024661583 0.297270957 [56] -0.407790397 0.353865260 -0.173363808 -0.402979461 -0.048765607 [61] -0.263085527 -0.103306963 0.119000079 0.027802627 0.749380559 [66] -0.465917939 0.036870282 -0.120735842 0.854967363 -0.060677612 [71] -0.227426449 -0.260753888 -0.059682945 -0.000667919 -0.186292227 [76] -0.643839475 -0.104465331 0.559447952 -0.613989572 -0.212872206 [81] -0.310603926 -0.434612829 0.382544856 0.006369746 -0.142692848 [86] 0.254313944 0.273902905 -0.157900359 -0.130352020 -0.143965121 [91] -0.061798798 -0.354132501 0.302211445 0.098482281 0.386056233 [96] 0.173044258 -0.386741157 -0.668987778 -0.021537807 0.129429823 [101] 0.345149393 -0.676868526 -0.321027085 -0.527297367 0.152079114 [106] 0.195655410 0.604999048 -0.393120211 0.166762026 -0.465692436 [111] 0.143147420 0.491985934 -0.034667417 -0.072494612 -0.490235685 [116] -0.485433922 0.305360617 -0.034394047 -0.205180974 0.151113983 [121] 0.125568003 -0.647636831 0.457887108 -0.018220402 -0.360660530 [126] 0.023075470 -0.256465483 -0.019340558 0.424119029 -0.240763947 [131] -0.426155231 0.375695079 -0.076515992 -0.295461347 0.125885822 [136] -0.051413714 0.078028709 0.361372580 0.095681169 0.486157125 [141] -0.278811722 -0.105242116 -0.424630230 -0.183227398 0.259719296 [146] -0.047558012 -0.484121234 -0.323515359 0.231809374 -0.276717367 [151] -0.080919809 0.415748802 -0.307746146 0.402763666 -0.256057265 [156] -0.230183555 -0.437324222 -0.117721361 0.128038802 0.295486739 [161] 0.226240312 -0.238359599 0.317649573 0.459782088 0.604522054 [166] 0.111829604 0.010237409 0.031776242 0.092582218 0.057630549 [171] 0.474594428 0.204457745 -0.140530661 -0.111970336 -0.011514572 [176] 0.015753081 -0.521432685 -0.344774267 -0.163546108 -0.199758677 [181] -0.231875704 -0.330518365 0.003013235 0.258093428 -0.490861892 [186] 0.534964288 -0.013472972 0.204575985 0.012432586 0.136713530 [191] 0.153336467 -0.079955170 -0.031825962 -0.218151024 0.025508038 [196] 0.303698984 0.240430413 0.237754867 0.223555123 -0.456692000 [201] -0.366564186 0.068661974 0.408940825 0.461995268 0.104844302 [206] 0.013814772 0.034979898 -0.126414289 0.012241432 -0.360401653 [211] 0.226977201 -0.515432641 0.399650481 -0.195477912 0.117016098 [216] 1.009098688 0.028549781 -0.264713857 0.231541284 -0.041307190 [221] -0.034043540 0.138946931 -0.093653532 -0.131818875 0.814986526 [226] 0.091013267 -0.471175941 -0.039505835 0.189113394 -0.196495609 > > proc.time() user system elapsed 2.798 16.222 35.197
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.5.1 Patched (2025-09-10 r88807) -- "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: 0x600000e58480> > .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: 0x600000e58480> > .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: 0x600000e58480> > .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: 0x600000e58480> > 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: 0x600000e24000> > .Call("R_bm_AddColumn",P) <pointer: 0x600000e24000> > .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: 0x600000e24000> > .Call("R_bm_AddColumn",P) <pointer: 0x600000e24000> > .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: 0x600000e24000> > 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: 0x600000e6c0c0> > .Call("R_bm_AddColumn",P) <pointer: 0x600000e6c0c0> > .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: 0x600000e6c0c0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600000e6c0c0> > .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: 0x600000e6c0c0> > > .Call("R_bm_RowMode",P) <pointer: 0x600000e6c0c0> > .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: 0x600000e6c0c0> > > .Call("R_bm_ColMode",P) <pointer: 0x600000e6c0c0> > .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: 0x600000e6c0c0> > 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: 0x600000e04120> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600000e04120> > .Call("R_bm_AddColumn",P) <pointer: 0x600000e04120> > .Call("R_bm_AddColumn",P) <pointer: 0x600000e04120> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile13974af2cae0" "BufferedMatrixFile13979e55e91" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile13974af2cae0" "BufferedMatrixFile13979e55e91" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600000e54000> > .Call("R_bm_AddColumn",P) <pointer: 0x600000e54000> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600000e54000> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600000e54000> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600000e54000> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600000e54000> > .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: 0x600000e2c000> > .Call("R_bm_AddColumn",P) <pointer: 0x600000e2c000> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600000e2c000> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600000e2c000> > 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: 0x600000e44240> > .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: 0x600000e44240> > rm(P) > > proc.time() user system elapsed 0.369 0.207 1.190
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.1 Patched (2025-09-10 r88807) -- "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.355 0.104 0.462