Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-08-30 12:07 -0400 (Sat, 30 Aug 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" | 4824 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4615 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4562 |
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/2320 | 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-08-29 18:27:01 -0400 (Fri, 29 Aug 2025) |
EndedAt: 2025-08-29 18:27:24 -0400 (Fri, 29 Aug 2025) |
EllapsedTime: 23.3 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-06-14 r88325) * using platform: aarch64-apple-darwin20 * R was compiled by Apple clang version 16.0.0 (clang-1600.0.26.6) GNU Fortran (GCC) 14.2.0 * running under: macOS Ventura 13.7.7 * 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 15.0.0 (clang-1500.1.0.2.5)’ * 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-arm64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.73.0’ ** using staged installation ** libs using C compiler: ‘Apple clang version 15.0.0 (clang-1500.1.0.2.5)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/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 arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch arm64 -std=gnu2x -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/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-arm64/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-06-14 r88325) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-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.107 0.034 0.138
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-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 480828 25.7 1056624 56.5 NA 634340 33.9 Vcells 891019 6.8 8388608 64.0 196608 2109889 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 Aug 29 18:27:17 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 Aug 29 18:27:17 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: 0x600002634000> > > > > 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 Aug 29 18:27:18 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 Aug 29 18:27:18 2025" > > ColMode(tmp2) <pointer: 0x600002634000> > > > > ### 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,] 97.1970482 -0.6889206 0.05120022 0.61799270 [2,] 0.7004841 -0.4679740 -1.12392464 -1.61714082 [3,] 0.6367035 0.5129376 -0.37441640 0.09041857 [4,] 1.7863212 -0.7584875 0.61643652 -0.29538146 > 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,] 97.1970482 0.6889206 0.05120022 0.61799270 [2,] 0.7004841 0.4679740 1.12392464 1.61714082 [3,] 0.6367035 0.5129376 0.37441640 0.09041857 [4,] 1.7863212 0.7584875 0.61643652 0.29538146 > 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.8588563 0.8300124 0.2262747 0.7861251 [2,] 0.8369493 0.6840862 1.0601531 1.2716685 [3,] 0.7979370 0.7161966 0.6118957 0.3006968 [4,] 1.3365333 0.8709119 0.7851347 0.5434901 > > 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,] 220.78561 33.98904 27.31395 33.47924 [2,] 34.06998 32.30884 36.72546 39.33383 [3,] 33.61607 32.67490 31.49337 28.09739 [4,] 40.15165 34.46761 33.46778 30.73028 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x60000262cd80> > exp(tmp5) <pointer: 0x60000262cd80> > log(tmp5,2) <pointer: 0x60000262cd80> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 459.5363 > Min(tmp5) [1] 53.46418 > mean(tmp5) [1] 72.29673 > Sum(tmp5) [1] 14459.35 > Var(tmp5) [1] 810.4424 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 87.34347 70.54401 66.08059 73.19539 70.29974 69.18878 71.37417 70.32919 [9] 73.18562 71.42637 > rowSums(tmp5) [1] 1746.869 1410.880 1321.612 1463.908 1405.995 1383.776 1427.483 1406.584 [9] 1463.712 1428.527 > rowVars(tmp5) [1] 7734.30063 40.21067 34.04826 33.49913 50.85374 96.97165 [7] 58.24762 27.66719 39.73207 68.74324 > rowSd(tmp5) [1] 87.944873 6.341189 5.835089 5.787843 7.131181 9.847419 7.632013 [8] 5.259961 6.303338 8.291154 > rowMax(tmp5) [1] 459.53632 85.75189 78.56602 83.57041 83.09339 87.82146 85.02122 [8] 82.15951 83.18580 92.22177 > rowMin(tmp5) [1] 53.46418 61.28541 55.97076 61.41669 58.89729 54.34362 62.71523 63.26598 [9] 62.92820 58.70441 > > colMeans(tmp5) [1] 111.56337 75.15734 70.97675 71.02994 71.73079 70.01039 70.49228 [8] 67.16475 68.41282 67.41409 67.98086 70.81949 69.85417 74.00186 [15] 67.01603 70.26920 74.08829 69.93080 67.00343 71.01804 > colSums(tmp5) [1] 1115.6337 751.5734 709.7675 710.2994 717.3079 700.1039 704.9228 [8] 671.6475 684.1282 674.1409 679.8086 708.1949 698.5417 740.0186 [15] 670.1603 702.6920 740.8829 699.3080 670.0343 710.1804 > colVars(tmp5) [1] 14993.942387 46.345973 64.032382 52.494437 24.371396 [6] 57.331446 56.410473 45.554976 103.920505 53.853815 [11] 92.755503 49.588034 45.153649 89.815690 22.934051 [16] 15.378989 50.933742 56.150748 5.314172 73.938388 > colSd(tmp5) [1] 122.449755 6.807788 8.002024 7.245304 4.936739 7.571753 [7] 7.510691 6.749443 10.194141 7.338516 9.630966 7.041877 [13] 6.719647 9.477114 4.788951 3.921605 7.136788 7.493380 [19] 2.305249 8.598743 > colMax(tmp5) [1] 459.53632 87.82146 79.56226 81.86821 78.48338 80.61533 80.42429 [8] 78.27937 85.75189 78.56602 82.15951 83.25829 81.07063 92.22177 [15] 76.51827 76.09601 83.09339 79.57860 69.34026 85.02122 > colMin(tmp5) [1] 66.34315 67.24661 56.85040 58.48103 63.22381 58.04427 58.89729 53.46418 [9] 55.21495 54.34362 55.97076 60.86881 60.30132 60.26131 59.41968 64.40758 [17] 61.99328 56.88236 62.09136 61.88198 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] NA 70.54401 66.08059 73.19539 70.29974 69.18878 71.37417 70.32919 [9] 73.18562 71.42637 > rowSums(tmp5) [1] NA 1410.880 1321.612 1463.908 1405.995 1383.776 1427.483 1406.584 [9] 1463.712 1428.527 > rowVars(tmp5) [1] 8130.43310 40.21067 34.04826 33.49913 50.85374 96.97165 [7] 58.24762 27.66719 39.73207 68.74324 > rowSd(tmp5) [1] 90.168914 6.341189 5.835089 5.787843 7.131181 9.847419 7.632013 [8] 5.259961 6.303338 8.291154 > rowMax(tmp5) [1] NA 85.75189 78.56602 83.57041 83.09339 87.82146 85.02122 82.15951 [9] 83.18580 92.22177 > rowMin(tmp5) [1] NA 61.28541 55.97076 61.41669 58.89729 54.34362 62.71523 63.26598 [9] 62.92820 58.70441 > > colMeans(tmp5) [1] 111.56337 75.15734 70.97675 71.02994 71.73079 70.01039 70.49228 [8] 67.16475 68.41282 NA 67.98086 70.81949 69.85417 74.00186 [15] 67.01603 70.26920 74.08829 69.93080 67.00343 71.01804 > colSums(tmp5) [1] 1115.6337 751.5734 709.7675 710.2994 717.3079 700.1039 704.9228 [8] 671.6475 684.1282 NA 679.8086 708.1949 698.5417 740.0186 [15] 670.1603 702.6920 740.8829 699.3080 670.0343 710.1804 > colVars(tmp5) [1] 14993.942387 46.345973 64.032382 52.494437 24.371396 [6] 57.331446 56.410473 45.554976 103.920505 NA [11] 92.755503 49.588034 45.153649 89.815690 22.934051 [16] 15.378989 50.933742 56.150748 5.314172 73.938388 > colSd(tmp5) [1] 122.449755 6.807788 8.002024 7.245304 4.936739 7.571753 [7] 7.510691 6.749443 10.194141 NA 9.630966 7.041877 [13] 6.719647 9.477114 4.788951 3.921605 7.136788 7.493380 [19] 2.305249 8.598743 > colMax(tmp5) [1] 459.53632 87.82146 79.56226 81.86821 78.48338 80.61533 80.42429 [8] 78.27937 85.75189 NA 82.15951 83.25829 81.07063 92.22177 [15] 76.51827 76.09601 83.09339 79.57860 69.34026 85.02122 > colMin(tmp5) [1] 66.34315 67.24661 56.85040 58.48103 63.22381 58.04427 58.89729 53.46418 [9] 55.21495 NA 55.97076 60.86881 60.30132 60.26131 59.41968 64.40758 [17] 61.99328 56.88236 62.09136 61.88198 > > Max(tmp5,na.rm=TRUE) [1] 459.5363 > Min(tmp5,na.rm=TRUE) [1] 53.46418 > mean(tmp5,na.rm=TRUE) [1] 72.34149 > Sum(tmp5,na.rm=TRUE) [1] 14395.96 > Var(tmp5,na.rm=TRUE) [1] 814.133 > > rowMeans(tmp5,na.rm=TRUE) [1] 88.60412 70.54401 66.08059 73.19539 70.29974 69.18878 71.37417 70.32919 [9] 73.18562 71.42637 > rowSums(tmp5,na.rm=TRUE) [1] 1683.478 1410.880 1321.612 1463.908 1405.995 1383.776 1427.483 1406.584 [9] 1463.712 1428.527 > rowVars(tmp5,na.rm=TRUE) [1] 8130.43310 40.21067 34.04826 33.49913 50.85374 96.97165 [7] 58.24762 27.66719 39.73207 68.74324 > rowSd(tmp5,na.rm=TRUE) [1] 90.168914 6.341189 5.835089 5.787843 7.131181 9.847419 7.632013 [8] 5.259961 6.303338 8.291154 > rowMax(tmp5,na.rm=TRUE) [1] 459.53632 85.75189 78.56602 83.57041 83.09339 87.82146 85.02122 [8] 82.15951 83.18580 92.22177 > rowMin(tmp5,na.rm=TRUE) [1] 53.46418 61.28541 55.97076 61.41669 58.89729 54.34362 62.71523 63.26598 [9] 62.92820 58.70441 > > colMeans(tmp5,na.rm=TRUE) [1] 111.56337 75.15734 70.97675 71.02994 71.73079 70.01039 70.49228 [8] 67.16475 68.41282 67.86110 67.98086 70.81949 69.85417 74.00186 [15] 67.01603 70.26920 74.08829 69.93080 67.00343 71.01804 > colSums(tmp5,na.rm=TRUE) [1] 1115.6337 751.5734 709.7675 710.2994 717.3079 700.1039 704.9228 [8] 671.6475 684.1282 610.7499 679.8086 708.1949 698.5417 740.0186 [15] 670.1603 702.6920 740.8829 699.3080 670.0343 710.1804 > colVars(tmp5,na.rm=TRUE) [1] 14993.942387 46.345973 64.032382 52.494437 24.371396 [6] 57.331446 56.410473 45.554976 103.920505 58.337600 [11] 92.755503 49.588034 45.153649 89.815690 22.934051 [16] 15.378989 50.933742 56.150748 5.314172 73.938388 > colSd(tmp5,na.rm=TRUE) [1] 122.449755 6.807788 8.002024 7.245304 4.936739 7.571753 [7] 7.510691 6.749443 10.194141 7.637905 9.630966 7.041877 [13] 6.719647 9.477114 4.788951 3.921605 7.136788 7.493380 [19] 2.305249 8.598743 > colMax(tmp5,na.rm=TRUE) [1] 459.53632 87.82146 79.56226 81.86821 78.48338 80.61533 80.42429 [8] 78.27937 85.75189 78.56602 82.15951 83.25829 81.07063 92.22177 [15] 76.51827 76.09601 83.09339 79.57860 69.34026 85.02122 > colMin(tmp5,na.rm=TRUE) [1] 66.34315 67.24661 56.85040 58.48103 63.22381 58.04427 58.89729 53.46418 [9] 55.21495 54.34362 55.97076 60.86881 60.30132 60.26131 59.41968 64.40758 [17] 61.99328 56.88236 62.09136 61.88198 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] NaN 70.54401 66.08059 73.19539 70.29974 69.18878 71.37417 70.32919 [9] 73.18562 71.42637 > rowSums(tmp5,na.rm=TRUE) [1] 0.000 1410.880 1321.612 1463.908 1405.995 1383.776 1427.483 1406.584 [9] 1463.712 1428.527 > rowVars(tmp5,na.rm=TRUE) [1] NA 40.21067 34.04826 33.49913 50.85374 96.97165 58.24762 27.66719 [9] 39.73207 68.74324 > rowSd(tmp5,na.rm=TRUE) [1] NA 6.341189 5.835089 5.787843 7.131181 9.847419 7.632013 5.259961 [9] 6.303338 8.291154 > rowMax(tmp5,na.rm=TRUE) [1] NA 85.75189 78.56602 83.57041 83.09339 87.82146 85.02122 82.15951 [9] 83.18580 92.22177 > rowMin(tmp5,na.rm=TRUE) [1] NA 61.28541 55.97076 61.41669 58.89729 54.34362 62.71523 63.26598 [9] 62.92820 58.70441 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 72.89971 75.64774 72.54634 71.17963 72.67601 70.31450 69.85216 68.68704 [9] 69.87925 NaN 68.89932 70.19919 69.17113 74.73260 67.33601 69.71368 [17] 73.62442 68.85882 67.02398 71.39488 > colSums(tmp5,na.rm=TRUE) [1] 656.0974 680.8297 652.9171 640.6167 654.0841 632.8305 628.6695 618.1834 [9] 628.9132 0.0000 620.0938 631.7927 622.5402 672.5934 606.0241 627.4231 [17] 662.6198 619.7294 603.2158 642.5539 > colVars(tmp5,na.rm=TRUE) [1] 50.799343 49.433684 44.320639 58.804137 17.366601 63.457449 58.852160 [8] 25.179093 92.718401 NA 94.859936 51.457866 45.549301 95.035407 [15] 24.648986 13.829569 54.879680 50.241785 5.973695 81.583052 > colSd(tmp5,na.rm=TRUE) [1] 7.127366 7.030909 6.657375 7.668386 4.167325 7.966018 7.671516 5.017877 [9] 9.629039 NA 9.739607 7.173414 6.749022 9.748611 4.964775 3.718813 [17] 7.408082 7.088144 2.444114 9.032334 > colMax(tmp5,na.rm=TRUE) [1] 86.17988 87.82146 79.56226 81.86821 78.48338 80.61533 80.42429 78.27937 [9] 85.75189 -Inf 82.15951 83.25829 81.07063 92.22177 76.51827 76.09601 [17] 83.09339 78.33570 69.34026 85.02122 > colMin(tmp5,na.rm=TRUE) [1] 66.34315 67.24661 60.17192 58.48103 66.91060 58.04427 58.89729 62.03559 [9] 57.57751 Inf 55.97076 60.86881 60.30132 60.26131 59.41968 64.40758 [17] 61.99328 56.88236 62.09136 61.88198 > > > > > 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] 218.0553 211.7405 191.1959 191.5644 111.8895 142.8816 299.9740 322.6397 [9] 252.8039 196.7826 > apply(copymatrix,1,var,na.rm=TRUE) [1] 218.0553 211.7405 191.1959 191.5644 111.8895 142.8816 299.9740 322.6397 [9] 252.8039 196.7826 > > > > 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 -2.842171e-14 5.684342e-14 -1.421085e-13 7.105427e-14 [6] 2.842171e-14 -1.136868e-13 -5.684342e-14 2.842171e-14 5.684342e-14 [11] -5.684342e-14 -1.421085e-14 5.684342e-14 5.684342e-14 -1.421085e-13 [16] 1.421085e-13 -7.105427e-14 -8.526513e-14 -1.136868e-13 1.421085e-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) + } 1 12 8 16 1 10 10 18 5 20 9 8 6 12 10 16 4 13 7 2 9 9 8 7 9 6 1 20 9 1 6 19 10 1 6 10 3 7 7 14 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.09134 > Min(tmp) [1] -2.595128 > mean(tmp) [1] -0.06890902 > Sum(tmp) [1] -6.890902 > Var(tmp) [1] 0.7788871 > > rowMeans(tmp) [1] -0.06890902 > rowSums(tmp) [1] -6.890902 > rowVars(tmp) [1] 0.7788871 > rowSd(tmp) [1] 0.8825458 > rowMax(tmp) [1] 2.09134 > rowMin(tmp) [1] -2.595128 > > colMeans(tmp) [1] -0.40592146 -0.71607026 -0.49069948 0.17884067 0.17528042 0.55149821 [7] 0.93442889 2.09134008 -0.38953108 -2.59512755 0.50054696 -0.37194623 [13] -0.89405608 -0.64377336 0.40718179 -0.33588380 -0.27590987 -0.41335464 [19] 0.05583948 -0.22311215 -0.28019470 0.05842637 -0.40068788 1.94693429 [25] 0.72403305 1.11870943 -0.12903992 1.52705555 -0.92050118 0.65474364 [31] 1.48650615 1.22273965 0.09510121 0.92582598 0.56525676 -0.43971354 [37] -0.66921552 -1.23181296 0.90730514 -0.06852155 0.59906409 -0.37868925 [43] 1.82372390 0.35676109 -0.55623898 -1.22024184 -0.57881861 0.33241741 [49] -2.11111044 0.15587656 -0.70228533 -0.83322970 -0.01743961 -0.50510924 [55] -2.25853154 0.84036555 0.71051302 0.34789534 -0.65062870 0.16012123 [61] -0.23321960 0.15394415 -1.13962576 0.57048199 0.79448939 -0.01054093 [67] 1.40744012 0.79602979 -1.65181056 0.35524779 1.29767068 -0.03138446 [73] -1.63641265 0.71387790 -1.01907189 -0.77838553 -0.32610016 -0.33493780 [79] -1.05833368 0.07895316 -0.64614526 -1.03668985 0.03851122 -0.47328689 [85] -0.31159027 -0.05356649 0.52016785 -0.66591311 -0.59097725 0.32164665 [91] -1.72661438 0.24853270 1.18591294 0.18655129 -0.35040878 0.38891399 [97] -0.14568494 0.22175996 -1.46161344 -0.23565578 > colSums(tmp) [1] -0.40592146 -0.71607026 -0.49069948 0.17884067 0.17528042 0.55149821 [7] 0.93442889 2.09134008 -0.38953108 -2.59512755 0.50054696 -0.37194623 [13] -0.89405608 -0.64377336 0.40718179 -0.33588380 -0.27590987 -0.41335464 [19] 0.05583948 -0.22311215 -0.28019470 0.05842637 -0.40068788 1.94693429 [25] 0.72403305 1.11870943 -0.12903992 1.52705555 -0.92050118 0.65474364 [31] 1.48650615 1.22273965 0.09510121 0.92582598 0.56525676 -0.43971354 [37] -0.66921552 -1.23181296 0.90730514 -0.06852155 0.59906409 -0.37868925 [43] 1.82372390 0.35676109 -0.55623898 -1.22024184 -0.57881861 0.33241741 [49] -2.11111044 0.15587656 -0.70228533 -0.83322970 -0.01743961 -0.50510924 [55] -2.25853154 0.84036555 0.71051302 0.34789534 -0.65062870 0.16012123 [61] -0.23321960 0.15394415 -1.13962576 0.57048199 0.79448939 -0.01054093 [67] 1.40744012 0.79602979 -1.65181056 0.35524779 1.29767068 -0.03138446 [73] -1.63641265 0.71387790 -1.01907189 -0.77838553 -0.32610016 -0.33493780 [79] -1.05833368 0.07895316 -0.64614526 -1.03668985 0.03851122 -0.47328689 [85] -0.31159027 -0.05356649 0.52016785 -0.66591311 -0.59097725 0.32164665 [91] -1.72661438 0.24853270 1.18591294 0.18655129 -0.35040878 0.38891399 [97] -0.14568494 0.22175996 -1.46161344 -0.23565578 > 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.40592146 -0.71607026 -0.49069948 0.17884067 0.17528042 0.55149821 [7] 0.93442889 2.09134008 -0.38953108 -2.59512755 0.50054696 -0.37194623 [13] -0.89405608 -0.64377336 0.40718179 -0.33588380 -0.27590987 -0.41335464 [19] 0.05583948 -0.22311215 -0.28019470 0.05842637 -0.40068788 1.94693429 [25] 0.72403305 1.11870943 -0.12903992 1.52705555 -0.92050118 0.65474364 [31] 1.48650615 1.22273965 0.09510121 0.92582598 0.56525676 -0.43971354 [37] -0.66921552 -1.23181296 0.90730514 -0.06852155 0.59906409 -0.37868925 [43] 1.82372390 0.35676109 -0.55623898 -1.22024184 -0.57881861 0.33241741 [49] -2.11111044 0.15587656 -0.70228533 -0.83322970 -0.01743961 -0.50510924 [55] -2.25853154 0.84036555 0.71051302 0.34789534 -0.65062870 0.16012123 [61] -0.23321960 0.15394415 -1.13962576 0.57048199 0.79448939 -0.01054093 [67] 1.40744012 0.79602979 -1.65181056 0.35524779 1.29767068 -0.03138446 [73] -1.63641265 0.71387790 -1.01907189 -0.77838553 -0.32610016 -0.33493780 [79] -1.05833368 0.07895316 -0.64614526 -1.03668985 0.03851122 -0.47328689 [85] -0.31159027 -0.05356649 0.52016785 -0.66591311 -0.59097725 0.32164665 [91] -1.72661438 0.24853270 1.18591294 0.18655129 -0.35040878 0.38891399 [97] -0.14568494 0.22175996 -1.46161344 -0.23565578 > colMin(tmp) [1] -0.40592146 -0.71607026 -0.49069948 0.17884067 0.17528042 0.55149821 [7] 0.93442889 2.09134008 -0.38953108 -2.59512755 0.50054696 -0.37194623 [13] -0.89405608 -0.64377336 0.40718179 -0.33588380 -0.27590987 -0.41335464 [19] 0.05583948 -0.22311215 -0.28019470 0.05842637 -0.40068788 1.94693429 [25] 0.72403305 1.11870943 -0.12903992 1.52705555 -0.92050118 0.65474364 [31] 1.48650615 1.22273965 0.09510121 0.92582598 0.56525676 -0.43971354 [37] -0.66921552 -1.23181296 0.90730514 -0.06852155 0.59906409 -0.37868925 [43] 1.82372390 0.35676109 -0.55623898 -1.22024184 -0.57881861 0.33241741 [49] -2.11111044 0.15587656 -0.70228533 -0.83322970 -0.01743961 -0.50510924 [55] -2.25853154 0.84036555 0.71051302 0.34789534 -0.65062870 0.16012123 [61] -0.23321960 0.15394415 -1.13962576 0.57048199 0.79448939 -0.01054093 [67] 1.40744012 0.79602979 -1.65181056 0.35524779 1.29767068 -0.03138446 [73] -1.63641265 0.71387790 -1.01907189 -0.77838553 -0.32610016 -0.33493780 [79] -1.05833368 0.07895316 -0.64614526 -1.03668985 0.03851122 -0.47328689 [85] -0.31159027 -0.05356649 0.52016785 -0.66591311 -0.59097725 0.32164665 [91] -1.72661438 0.24853270 1.18591294 0.18655129 -0.35040878 0.38891399 [97] -0.14568494 0.22175996 -1.46161344 -0.23565578 > colMedians(tmp) [1] -0.40592146 -0.71607026 -0.49069948 0.17884067 0.17528042 0.55149821 [7] 0.93442889 2.09134008 -0.38953108 -2.59512755 0.50054696 -0.37194623 [13] -0.89405608 -0.64377336 0.40718179 -0.33588380 -0.27590987 -0.41335464 [19] 0.05583948 -0.22311215 -0.28019470 0.05842637 -0.40068788 1.94693429 [25] 0.72403305 1.11870943 -0.12903992 1.52705555 -0.92050118 0.65474364 [31] 1.48650615 1.22273965 0.09510121 0.92582598 0.56525676 -0.43971354 [37] -0.66921552 -1.23181296 0.90730514 -0.06852155 0.59906409 -0.37868925 [43] 1.82372390 0.35676109 -0.55623898 -1.22024184 -0.57881861 0.33241741 [49] -2.11111044 0.15587656 -0.70228533 -0.83322970 -0.01743961 -0.50510924 [55] -2.25853154 0.84036555 0.71051302 0.34789534 -0.65062870 0.16012123 [61] -0.23321960 0.15394415 -1.13962576 0.57048199 0.79448939 -0.01054093 [67] 1.40744012 0.79602979 -1.65181056 0.35524779 1.29767068 -0.03138446 [73] -1.63641265 0.71387790 -1.01907189 -0.77838553 -0.32610016 -0.33493780 [79] -1.05833368 0.07895316 -0.64614526 -1.03668985 0.03851122 -0.47328689 [85] -0.31159027 -0.05356649 0.52016785 -0.66591311 -0.59097725 0.32164665 [91] -1.72661438 0.24853270 1.18591294 0.18655129 -0.35040878 0.38891399 [97] -0.14568494 0.22175996 -1.46161344 -0.23565578 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.4059215 -0.7160703 -0.4906995 0.1788407 0.1752804 0.5514982 0.9344289 [2,] -0.4059215 -0.7160703 -0.4906995 0.1788407 0.1752804 0.5514982 0.9344289 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 2.09134 -0.3895311 -2.595128 0.500547 -0.3719462 -0.8940561 -0.6437734 [2,] 2.09134 -0.3895311 -2.595128 0.500547 -0.3719462 -0.8940561 -0.6437734 [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.4071818 -0.3358838 -0.2759099 -0.4133546 0.05583948 -0.2231121 [2,] 0.4071818 -0.3358838 -0.2759099 -0.4133546 0.05583948 -0.2231121 [,21] [,22] [,23] [,24] [,25] [,26] [,27] [1,] -0.2801947 0.05842637 -0.4006879 1.946934 0.7240331 1.118709 -0.1290399 [2,] -0.2801947 0.05842637 -0.4006879 1.946934 0.7240331 1.118709 -0.1290399 [,28] [,29] [,30] [,31] [,32] [,33] [,34] [1,] 1.527056 -0.9205012 0.6547436 1.486506 1.22274 0.09510121 0.925826 [2,] 1.527056 -0.9205012 0.6547436 1.486506 1.22274 0.09510121 0.925826 [,35] [,36] [,37] [,38] [,39] [,40] [,41] [1,] 0.5652568 -0.4397135 -0.6692155 -1.231813 0.9073051 -0.06852155 0.5990641 [2,] 0.5652568 -0.4397135 -0.6692155 -1.231813 0.9073051 -0.06852155 0.5990641 [,42] [,43] [,44] [,45] [,46] [,47] [,48] [1,] -0.3786892 1.823724 0.3567611 -0.556239 -1.220242 -0.5788186 0.3324174 [2,] -0.3786892 1.823724 0.3567611 -0.556239 -1.220242 -0.5788186 0.3324174 [,49] [,50] [,51] [,52] [,53] [,54] [,55] [1,] -2.11111 0.1558766 -0.7022853 -0.8332297 -0.01743961 -0.5051092 -2.258532 [2,] -2.11111 0.1558766 -0.7022853 -0.8332297 -0.01743961 -0.5051092 -2.258532 [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] 0.8403656 0.710513 0.3478953 -0.6506287 0.1601212 -0.2332196 0.1539441 [2,] 0.8403656 0.710513 0.3478953 -0.6506287 0.1601212 -0.2332196 0.1539441 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [1,] -1.139626 0.570482 0.7944894 -0.01054093 1.40744 0.7960298 -1.651811 [2,] -1.139626 0.570482 0.7944894 -0.01054093 1.40744 0.7960298 -1.651811 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] 0.3552478 1.297671 -0.03138446 -1.636413 0.7138779 -1.019072 -0.7783855 [2,] 0.3552478 1.297671 -0.03138446 -1.636413 0.7138779 -1.019072 -0.7783855 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] -0.3261002 -0.3349378 -1.058334 0.07895316 -0.6461453 -1.03669 0.03851122 [2,] -0.3261002 -0.3349378 -1.058334 0.07895316 -0.6461453 -1.03669 0.03851122 [,84] [,85] [,86] [,87] [,88] [,89] [1,] -0.4732869 -0.3115903 -0.05356649 0.5201678 -0.6659131 -0.5909772 [2,] -0.4732869 -0.3115903 -0.05356649 0.5201678 -0.6659131 -0.5909772 [,90] [,91] [,92] [,93] [,94] [,95] [,96] [1,] 0.3216466 -1.726614 0.2485327 1.185913 0.1865513 -0.3504088 0.388914 [2,] 0.3216466 -1.726614 0.2485327 1.185913 0.1865513 -0.3504088 0.388914 [,97] [,98] [,99] [,100] [1,] -0.1456849 0.22176 -1.461613 -0.2356558 [2,] -0.1456849 0.22176 -1.461613 -0.2356558 > > > Max(tmp2) [1] 2.57762 > Min(tmp2) [1] -1.847148 > mean(tmp2) [1] 0.02715699 > Sum(tmp2) [1] 2.715699 > Var(tmp2) [1] 0.7655563 > > rowMeans(tmp2) [1] -0.97305059 0.06477818 0.66621622 1.87800838 0.36762746 -0.50600490 [7] 1.04889432 -0.63397813 0.06004758 -0.44187970 -0.19712262 -0.57179640 [13] 1.18535929 0.70177496 -0.31405045 0.54132076 0.97516820 0.12228641 [19] -0.11859157 -1.26762915 0.52067794 -0.27367866 0.26251924 0.22112418 [25] 0.95470557 -0.06183366 0.14786872 0.62924383 1.24441998 1.70258660 [31] 0.92386974 0.66058000 0.47732767 0.48271045 -0.67569479 -1.14478905 [37] -0.17167075 -0.33236798 1.13391368 0.24719243 -0.66568960 0.60626350 [43] 2.57761981 -0.27431264 1.75644429 0.50351226 0.11394332 -0.02624827 [49] 0.61750299 -0.28236462 0.11488876 -0.68631203 0.38139116 -0.70638753 [55] 0.77559251 -0.56162257 -0.16337971 1.02045920 -1.46967569 -1.48127282 [61] -1.84714837 -0.90761209 -0.38306914 -0.66615875 0.41133955 0.32339172 [67] 0.37729507 0.10391809 -0.07946488 -1.37362284 -0.50743055 -1.79374785 [73] -0.48199262 0.31815404 -0.54565819 -0.52893134 -1.01200118 -0.06485705 [79] 1.22364342 -0.68219199 0.86202419 -0.77609795 -1.40288797 -0.63964447 [85] -0.26493141 0.57340856 -1.71497246 0.55701997 0.75998756 1.26561947 [91] 1.20686113 -0.85177391 -0.26325090 -0.73354955 -0.42077951 -0.77124710 [97] 0.37888123 2.05823300 0.46789654 -1.14538819 > rowSums(tmp2) [1] -0.97305059 0.06477818 0.66621622 1.87800838 0.36762746 -0.50600490 [7] 1.04889432 -0.63397813 0.06004758 -0.44187970 -0.19712262 -0.57179640 [13] 1.18535929 0.70177496 -0.31405045 0.54132076 0.97516820 0.12228641 [19] -0.11859157 -1.26762915 0.52067794 -0.27367866 0.26251924 0.22112418 [25] 0.95470557 -0.06183366 0.14786872 0.62924383 1.24441998 1.70258660 [31] 0.92386974 0.66058000 0.47732767 0.48271045 -0.67569479 -1.14478905 [37] -0.17167075 -0.33236798 1.13391368 0.24719243 -0.66568960 0.60626350 [43] 2.57761981 -0.27431264 1.75644429 0.50351226 0.11394332 -0.02624827 [49] 0.61750299 -0.28236462 0.11488876 -0.68631203 0.38139116 -0.70638753 [55] 0.77559251 -0.56162257 -0.16337971 1.02045920 -1.46967569 -1.48127282 [61] -1.84714837 -0.90761209 -0.38306914 -0.66615875 0.41133955 0.32339172 [67] 0.37729507 0.10391809 -0.07946488 -1.37362284 -0.50743055 -1.79374785 [73] -0.48199262 0.31815404 -0.54565819 -0.52893134 -1.01200118 -0.06485705 [79] 1.22364342 -0.68219199 0.86202419 -0.77609795 -1.40288797 -0.63964447 [85] -0.26493141 0.57340856 -1.71497246 0.55701997 0.75998756 1.26561947 [91] 1.20686113 -0.85177391 -0.26325090 -0.73354955 -0.42077951 -0.77124710 [97] 0.37888123 2.05823300 0.46789654 -1.14538819 > 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.97305059 0.06477818 0.66621622 1.87800838 0.36762746 -0.50600490 [7] 1.04889432 -0.63397813 0.06004758 -0.44187970 -0.19712262 -0.57179640 [13] 1.18535929 0.70177496 -0.31405045 0.54132076 0.97516820 0.12228641 [19] -0.11859157 -1.26762915 0.52067794 -0.27367866 0.26251924 0.22112418 [25] 0.95470557 -0.06183366 0.14786872 0.62924383 1.24441998 1.70258660 [31] 0.92386974 0.66058000 0.47732767 0.48271045 -0.67569479 -1.14478905 [37] -0.17167075 -0.33236798 1.13391368 0.24719243 -0.66568960 0.60626350 [43] 2.57761981 -0.27431264 1.75644429 0.50351226 0.11394332 -0.02624827 [49] 0.61750299 -0.28236462 0.11488876 -0.68631203 0.38139116 -0.70638753 [55] 0.77559251 -0.56162257 -0.16337971 1.02045920 -1.46967569 -1.48127282 [61] -1.84714837 -0.90761209 -0.38306914 -0.66615875 0.41133955 0.32339172 [67] 0.37729507 0.10391809 -0.07946488 -1.37362284 -0.50743055 -1.79374785 [73] -0.48199262 0.31815404 -0.54565819 -0.52893134 -1.01200118 -0.06485705 [79] 1.22364342 -0.68219199 0.86202419 -0.77609795 -1.40288797 -0.63964447 [85] -0.26493141 0.57340856 -1.71497246 0.55701997 0.75998756 1.26561947 [91] 1.20686113 -0.85177391 -0.26325090 -0.73354955 -0.42077951 -0.77124710 [97] 0.37888123 2.05823300 0.46789654 -1.14538819 > rowMin(tmp2) [1] -0.97305059 0.06477818 0.66621622 1.87800838 0.36762746 -0.50600490 [7] 1.04889432 -0.63397813 0.06004758 -0.44187970 -0.19712262 -0.57179640 [13] 1.18535929 0.70177496 -0.31405045 0.54132076 0.97516820 0.12228641 [19] -0.11859157 -1.26762915 0.52067794 -0.27367866 0.26251924 0.22112418 [25] 0.95470557 -0.06183366 0.14786872 0.62924383 1.24441998 1.70258660 [31] 0.92386974 0.66058000 0.47732767 0.48271045 -0.67569479 -1.14478905 [37] -0.17167075 -0.33236798 1.13391368 0.24719243 -0.66568960 0.60626350 [43] 2.57761981 -0.27431264 1.75644429 0.50351226 0.11394332 -0.02624827 [49] 0.61750299 -0.28236462 0.11488876 -0.68631203 0.38139116 -0.70638753 [55] 0.77559251 -0.56162257 -0.16337971 1.02045920 -1.46967569 -1.48127282 [61] -1.84714837 -0.90761209 -0.38306914 -0.66615875 0.41133955 0.32339172 [67] 0.37729507 0.10391809 -0.07946488 -1.37362284 -0.50743055 -1.79374785 [73] -0.48199262 0.31815404 -0.54565819 -0.52893134 -1.01200118 -0.06485705 [79] 1.22364342 -0.68219199 0.86202419 -0.77609795 -1.40288797 -0.63964447 [85] -0.26493141 0.57340856 -1.71497246 0.55701997 0.75998756 1.26561947 [91] 1.20686113 -0.85177391 -0.26325090 -0.73354955 -0.42077951 -0.77124710 [97] 0.37888123 2.05823300 0.46789654 -1.14538819 > > colMeans(tmp2) [1] 0.02715699 > colSums(tmp2) [1] 2.715699 > colVars(tmp2) [1] 0.7655563 > colSd(tmp2) [1] 0.8749608 > colMax(tmp2) [1] 2.57762 > colMin(tmp2) [1] -1.847148 > colMedians(tmp2) [1] 0.01689965 > colRanges(tmp2) [,1] [1,] -1.847148 [2,] 2.577620 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] -2.4593753 -2.0669046 3.3402271 -2.0503131 6.9064448 0.1870727 [7] -2.6717885 -7.0724098 -7.4691262 1.5386298 > colApply(tmp,quantile)[,1] [,1] [1,] -0.9564149 [2,] -0.5701482 [3,] -0.3887413 [4,] 0.1234454 [5,] 0.9341725 > > rowApply(tmp,sum) [1] -3.77378545 0.50118057 -1.77869365 -0.01282293 1.93844273 -1.70169020 [7] -0.60088805 -1.37674710 -0.35812545 -4.65441354 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 8 4 8 7 4 2 6 5 3 7 [2,] 4 7 5 4 2 3 10 3 9 6 [3,] 2 10 4 9 7 6 7 9 5 9 [4,] 9 9 9 1 1 7 2 4 8 2 [5,] 6 8 10 8 5 8 9 10 7 8 [6,] 10 3 2 2 8 9 1 7 10 10 [7,] 5 5 7 5 9 5 5 2 1 4 [8,] 1 6 1 3 3 4 4 6 4 5 [9,] 7 2 3 6 6 1 3 1 2 1 [10,] 3 1 6 10 10 10 8 8 6 3 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -2.20394804 -0.88326557 0.78335860 3.17288663 -1.33770487 -0.13998242 [7] 4.10108607 1.42163472 1.47394479 3.44099829 -1.33489743 0.79597329 [13] -1.15251979 1.08739570 1.50171209 -1.35343902 -1.83805002 -0.03769817 [19] 1.17316095 -2.15190055 > colApply(tmp,quantile)[,1] [,1] [1,] -1.330111562 [2,] -0.599601733 [3,] -0.543630096 [4,] -0.009978314 [5,] 0.279373661 > > rowApply(tmp,sum) [1] 1.04052593 -0.01197874 -0.15594288 2.57936252 3.06677842 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 3 11 4 5 11 [2,] 2 1 8 7 20 [3,] 15 12 5 3 19 [4,] 8 19 7 18 18 [5,] 6 3 9 9 15 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.330111562 -1.6272998 0.74016190 -0.1592585 -0.528615 0.2700495 [2,] -0.009978314 -1.7657435 0.09501896 1.5293334 -1.354258 -1.5033072 [3,] -0.543630096 -0.2608640 -0.54250116 -0.3482750 -0.202357 0.2370722 [4,] -0.599601733 -0.3254389 -1.07277779 1.1110269 0.247782 0.5505380 [5,] 0.279373661 3.0960806 1.56345669 1.0400599 0.499743 0.3056651 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 2.3610961 -0.002297166 0.4241155 0.7712659 -2.3148632 -0.5782113 [2,] -0.3815335 -0.091488029 1.3347148 0.4856803 1.4715988 -0.9881144 [3,] 1.2305311 0.605834814 -0.7794426 1.0959772 0.1501042 -0.0445197 [4,] 0.6976384 0.766522847 -0.3904731 1.3967615 0.6857019 2.3043206 [5,] 0.1933540 0.143062258 0.8850302 -0.3086866 -1.3274390 0.1024980 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.6231406 0.1595327 0.03694994 1.2582879 0.3699132 -0.4659843 [2,] 0.2198147 -0.5318139 1.26214701 -0.4613979 -0.5724664 1.5850997 [3,] 0.1874265 0.5620704 0.91263885 -1.4579707 -0.9918845 -0.4618613 [4,] 0.7335298 0.2703666 0.40862384 -0.1858022 -1.0911125 -1.0482880 [5,] -1.6701501 0.6272398 -1.11864754 -0.5065561 0.4475002 0.3533357 [,19] [,20] [1,] 1.09545120 1.1834835 [2,] -0.82862725 0.4933419 [3,] 0.03668662 0.4590214 [4,] 1.03950280 -2.9194584 [5,] -0.16985242 -1.3682890 > > > 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 : 649 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 : 562 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 -1.230075 -0.4786502 -1.508229 0.9821168 0.4089223 -1.504921 1.82177 col8 col9 col10 col11 col12 col13 col14 row1 0.6275807 -1.319195 -0.1791126 0.8086997 -0.329114 -2.285942 -0.0260271 col15 col16 col17 col18 col19 col20 row1 -0.2471316 1.153691 -0.3722062 -0.6255808 0.5082411 0.7479405 > tmp[,"col10"] col10 row1 -0.1791126 row2 -0.3028830 row3 -0.7785825 row4 -0.1250885 row5 -0.1994162 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -1.230075 -0.4786502 -1.5082285 0.9821168 0.4089223 -1.5049207 1.821770 row5 -1.188159 0.2877863 0.2331058 1.2245225 -0.2902376 -0.1890209 1.701478 col8 col9 col10 col11 col12 col13 col14 row1 0.6275807 -1.319195 -0.1791126 0.8086997 -0.3291140 -2.2859422 -0.0260271 row5 1.6214304 0.474007 -0.1994162 0.1232122 -0.1734009 0.4089873 -0.1386551 col15 col16 col17 col18 col19 col20 row1 -0.2471316 1.1536912 -0.3722062 -0.62558080 0.5082411 0.7479405 row5 1.3460243 -0.1458952 1.4536838 0.03852942 0.9107034 1.4784128 > tmp[,c("col6","col20")] col6 col20 row1 -1.5049207 0.7479405 row2 -0.7659937 1.0911407 row3 -0.1692001 -0.1589381 row4 -0.6935660 0.8124972 row5 -0.1890209 1.4784128 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.5049207 0.7479405 row5 -0.1890209 1.4784128 > > > > > 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.01245 48.84055 49.25704 48.36493 51.17213 105.5243 49.23042 49.14317 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.82988 51.01405 49.93082 50.31507 49.12811 49.70961 51.37683 49.42492 col17 col18 col19 col20 row1 51.33451 50.69317 49.62477 105.0639 > tmp[,"col10"] col10 row1 51.01405 row2 29.97254 row3 29.83108 row4 31.27466 row5 49.76160 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.01245 48.84055 49.25704 48.36493 51.17213 105.5243 49.23042 49.14317 row5 48.90889 49.78179 50.87636 50.10836 50.71441 105.8591 49.77656 51.07202 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.82988 51.01405 49.93082 50.31507 49.12811 49.70961 51.37683 49.42492 row5 49.76018 49.76160 50.00616 51.91391 51.56046 48.68046 50.99211 49.57680 col17 col18 col19 col20 row1 51.33451 50.69317 49.62477 105.0639 row5 49.68988 51.66090 50.60153 104.5275 > tmp[,c("col6","col20")] col6 col20 row1 105.52428 105.06390 row2 74.55171 75.12363 row3 73.39281 75.82851 row4 75.02400 75.19755 row5 105.85906 104.52745 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.5243 105.0639 row5 105.8591 104.5275 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.5243 105.0639 row5 105.8591 104.5275 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.22591169 [2,] -1.13039095 [3,] 0.73370055 [4,] -0.81699696 [5,] 0.05232876 > tmp[,c("col17","col7")] col17 col7 [1,] -0.2965632 -0.12786549 [2,] -1.2457488 -1.53147753 [3,] -0.1431005 -0.08192925 [4,] -0.1920387 1.12090016 [5,] -0.3982096 -1.33215934 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.2298687 -0.1640960 [2,] -0.5536833 -0.5247952 [3,] 1.0474336 -1.4418536 [4,] 0.7819355 -0.6611649 [5,] -0.5457628 -0.1335432 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.2298687 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.2298687 [2,] -0.5536833 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 1.7153802 0.4368087 0.5487173 -0.4622466 -0.6650846 -1.190292 -1.1442025 row1 0.8996426 0.2118184 0.1149845 0.9838578 0.2768633 -1.471350 -0.1258096 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 -2.7548991 0.3968277 1.992792 -0.1491376 -0.6903956 1.575699 -0.4867217 row1 -0.3845269 -1.0473416 2.031071 -2.2795586 0.4540399 -1.513260 0.4859443 [,15] [,16] [,17] [,18] [,19] [,20] row3 1.128805 1.167433 0.7023104 -0.3658541 -0.5260764 0.3287996 row1 0.211066 -1.554393 -1.6443284 0.3552371 1.8140619 0.4328795 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.1659317 -0.9599349 -0.8020433 -1.854132 0.6561789 -0.8650588 0.308599 [,8] [,9] [,10] row2 0.9751576 0.6049536 -0.8666758 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.1786955 0.6424547 -0.7118586 0.1127554 0.5831845 -0.5005764 0.5620557 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.4442594 -0.1912552 0.5644004 -0.3628508 0.3288136 0.9652092 -0.9088892 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.09442937 -0.04163876 -2.625509 -0.6504399 -0.02002999 0.7666433 > > > 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: 0x6000026381e0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM991211dc83c6" [2] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM9912244f4553" [3] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM991250505ec4" [4] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM99124c7dbf0d" [5] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM9912538a15b6" [6] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM9912e978a93" [7] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM99127f0ac060" [8] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM99121adc1fc9" [9] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM991269aad2e5" [10] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM99124dfbee95" [11] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM991256eca032" [12] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM991249095f33" [13] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM991264932bb" [14] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM99122fa19636" [15] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM9912198ccba8" > > > ### 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: 0x600002610060> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600002610060> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600002610060> > rowMedians(tmp) [1] 0.250527034 -0.725845754 -0.693816546 -0.244560537 -0.019247449 [6] 0.115315784 -0.259717027 0.051794666 0.586953530 0.114930036 [11] -0.287146373 0.180656978 0.209998801 -0.004639041 -0.044816529 [16] 0.220385336 0.484345443 0.398255377 -0.097668768 -0.277440406 [21] 0.233007195 0.395659781 -0.197636028 0.142497755 -0.003037266 [26] -0.373189882 0.298382060 -0.488419647 0.323160353 -0.141960949 [31] 0.538021767 0.489394678 0.035310439 0.255841576 -0.336603148 [36] 0.408637120 -0.156846166 -0.132121163 0.310535984 0.101208896 [41] 0.192477354 -0.409705194 0.224190052 -0.415865321 -0.078985561 [46] -0.053812505 0.239195219 0.417992832 0.183949979 0.113744784 [51] -0.386587968 -0.552045268 -0.699353231 -0.174469827 -0.050780521 [56] -0.023625101 0.267977096 0.459580443 -0.009802183 0.206879188 [61] 0.085992027 0.233226676 -0.685762506 -0.370770364 0.285252383 [66] -0.240393834 0.203345039 -0.030288023 -0.059982923 0.027085910 [71] 0.329044484 0.035672145 0.069136752 -0.134015533 -0.580716839 [76] 0.077442881 0.159988495 0.025770808 -0.030013359 -0.692985336 [81] 0.258709715 -0.920945894 0.285855897 0.089260152 0.165215540 [86] 0.403987146 0.474164102 -0.178717485 -0.014317169 0.033264929 [91] 0.344319699 0.328264959 0.009908274 -0.198491026 0.006688817 [96] -0.354841097 0.556422097 -0.232986391 0.155900258 0.080557700 [101] -0.018766475 0.901633734 0.449752864 -0.064559292 0.491746401 [106] -0.119323714 -0.132605925 0.467923667 0.132330764 0.331529541 [111] 0.015797171 -0.708293885 -0.314127919 0.168679240 -0.541514024 [116] -0.376308523 -0.297443192 -0.128643325 0.235427900 -0.348148931 [121] 0.479029199 -0.103333933 -0.123701173 0.319323187 -0.121531440 [126] -0.334269135 -0.472026323 -0.202752758 0.016234238 0.447401298 [131] -0.156677144 0.188058125 -0.408816123 0.083775877 0.022814841 [136] -0.352481183 -0.378722840 0.069295301 0.051695315 -0.368294763 [141] 0.254336509 -0.111997249 -0.149696678 0.174317082 -0.015547424 [146] -0.386428257 -0.357742947 0.338675112 -0.419968364 -0.111770722 [151] -0.228230355 -0.249580971 -0.084662220 -0.056886229 0.025348393 [156] 0.133403504 -0.035564527 0.075046085 0.032332703 0.175913066 [161] 0.104942270 0.294711292 0.244322232 -0.332554001 -0.095062450 [166] -0.254564928 -0.107562030 0.067865556 0.522324911 -0.429173164 [171] -0.140995815 -0.343357751 -0.571567296 0.328326322 -0.226800758 [176] -0.140029658 0.019994939 -0.479104068 -0.010906468 -0.386023932 [181] 0.142983805 0.182503634 -0.034707261 0.047733559 0.337294750 [186] -0.142141673 0.334557523 -0.412837152 -0.392355964 0.551671817 [191] 0.127692434 0.195846344 -0.524007023 0.379405262 0.358458988 [196] -0.092766840 0.203700960 -0.405828705 0.295965378 0.469296591 [201] 0.650363693 -0.305692126 0.582266560 -0.188442973 -0.251710324 [206] -0.050507240 -0.344295576 -0.239180612 -0.129730623 0.358204177 [211] -0.284410691 0.202500393 0.034577401 -0.239380878 -0.133203099 [216] 0.639011497 0.438951242 -0.136225022 -0.413144594 -0.218515860 [221] 0.165002252 0.550810775 0.016867385 0.144267494 -0.118449940 [226] 0.225699398 -0.792703392 0.169096010 -0.298441240 -0.313084828 > > proc.time() user system elapsed 0.625 3.364 4.172
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-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: 0x600001dbc000> > .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: 0x600001dbc000> > .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: 0x600001dbc000> > .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: 0x600001dbc000> > 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: 0x600001da4300> > .Call("R_bm_AddColumn",P) <pointer: 0x600001da4300> > .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: 0x600001da4300> > .Call("R_bm_AddColumn",P) <pointer: 0x600001da4300> > .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: 0x600001da4300> > 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: 0x600001da44e0> > .Call("R_bm_AddColumn",P) <pointer: 0x600001da44e0> > .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: 0x600001da44e0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600001da44e0> > .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: 0x600001da44e0> > > .Call("R_bm_RowMode",P) <pointer: 0x600001da44e0> > .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: 0x600001da44e0> > > .Call("R_bm_ColMode",P) <pointer: 0x600001da44e0> > .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: 0x600001da44e0> > 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: 0x600001da46c0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600001da46c0> > .Call("R_bm_AddColumn",P) <pointer: 0x600001da46c0> > .Call("R_bm_AddColumn",P) <pointer: 0x600001da46c0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile9ceb710af954" "BufferedMatrixFile9ceb77733c7" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile9ceb710af954" "BufferedMatrixFile9ceb77733c7" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600001da4960> > .Call("R_bm_AddColumn",P) <pointer: 0x600001da4960> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600001da4960> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600001da4960> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600001da4960> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600001da4960> > .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: 0x600001da4b40> > .Call("R_bm_AddColumn",P) <pointer: 0x600001da4b40> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600001da4b40> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600001da4b40> > 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: 0x600001da4d20> > .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: 0x600001da4d20> > rm(P) > > proc.time() user system elapsed 0.113 0.039 0.148
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-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.104 0.022 0.123