Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-09-27 12:04 -0400 (Sat, 27 Sep 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" | 4832 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4620 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4565 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4563 |
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 253/2334 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.73.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.7 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
taishan | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.73.0 |
Command: /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz |
StartedAt: 2025-09-26 19:53:37 -0400 (Fri, 26 Sep 2025) |
EndedAt: 2025-09-26 19:54:33 -0400 (Fri, 26 Sep 2025) |
EllapsedTime: 55.5 seconds |
RetCode: 0 |
Status: WARNINGS |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 1 |
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.5.1 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.348 0.149 0.508
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 Sep 26 19:54:03 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 Sep 26 19:54:03 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: 0x600003e04000> > > > > 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 Sep 26 19:54:09 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 Sep 26 19:54:11 2025" > > ColMode(tmp2) <pointer: 0x600003e04000> > > > > ### 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,] 98.6612586 0.72452831 -0.2155888 -0.010182109 [2,] 1.6186509 -0.04388051 0.8425938 0.344230427 [3,] -0.3941643 0.50034250 1.1275356 0.072069234 [4,] -2.0519922 0.10197282 1.0264319 0.005424855 > 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,] 98.6612586 0.72452831 0.2155888 0.010182109 [2,] 1.6186509 0.04388051 0.8425938 0.344230427 [3,] 0.3941643 0.50034250 1.1275356 0.072069234 [4,] 2.0519922 0.10197282 1.0264319 0.005424855 > 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.9328374 0.8511923 0.4643154 0.10090644 [2,] 1.2722621 0.2094767 0.9179291 0.58671154 [3,] 0.6278251 0.7073489 1.0618548 0.26845714 [4,] 1.4324776 0.3193318 1.0131297 0.07365361 > > 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,] 222.98963 34.23645 29.85874 26.01925 [2,] 39.34127 27.13865 35.02188 31.21135 [3,] 31.67241 32.57383 36.74608 27.75664 [4,] 41.37677 28.29529 36.15773 25.74196 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600003e0c000> > exp(tmp5) <pointer: 0x600003e0c000> > log(tmp5,2) <pointer: 0x600003e0c000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 464.1237 > Min(tmp5) [1] 53.03557 > mean(tmp5) [1] 72.34485 > Sum(tmp5) [1] 14468.97 > Var(tmp5) [1] 853.2468 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 87.02011 69.35122 67.51964 69.60936 73.04294 70.14159 70.54255 71.77213 [9] 69.88279 74.56618 > rowSums(tmp5) [1] 1740.402 1387.024 1350.393 1392.187 1460.859 1402.832 1410.851 1435.443 [9] 1397.656 1491.324 > rowVars(tmp5) [1] 7938.39681 77.54905 54.61750 65.26426 66.26094 78.97372 [7] 101.58235 94.09013 70.44737 99.97723 > rowSd(tmp5) [1] 89.097681 8.806194 7.390366 8.078630 8.140082 8.886716 10.078807 [8] 9.700007 8.393293 9.998861 > rowMax(tmp5) [1] 464.12370 93.33025 79.09932 86.12032 88.40586 83.43209 93.79037 [8] 92.66305 82.93640 93.91095 > rowMin(tmp5) [1] 54.15565 55.64857 53.03557 53.57852 57.28081 55.78283 57.69508 56.02282 [9] 54.23220 57.22792 > > colMeans(tmp5) [1] 112.06057 68.16406 71.49770 66.08074 71.82399 69.28556 69.43798 [8] 76.57115 64.83420 69.57554 73.80248 69.36829 72.02344 65.57036 [15] 71.59495 69.84237 70.19309 72.69639 71.72222 70.75196 > colSums(tmp5) [1] 1120.6057 681.6406 714.9770 660.8074 718.2399 692.8556 694.3798 [8] 765.7115 648.3420 695.7554 738.0248 693.6829 720.2344 655.7036 [15] 715.9495 698.4237 701.9309 726.9639 717.2222 707.5196 > colVars(tmp5) [1] 15379.17687 82.27991 35.52140 88.93628 82.04406 53.15677 [7] 82.31174 55.11838 60.29101 67.24682 154.66865 45.83955 [13] 78.46499 92.47877 133.63176 109.30509 86.72041 77.50026 [19] 35.67347 58.89137 > colSd(tmp5) [1] 124.012809 9.070827 5.959983 9.430603 9.057818 7.290869 [7] 9.072582 7.424176 7.764728 8.200416 12.436585 6.770491 [13] 8.858046 9.616588 11.559920 10.454907 9.312380 8.803423 [19] 5.972727 7.674071 > colMax(tmp5) [1] 464.12370 80.56029 78.65374 78.03921 83.38343 82.93640 83.16618 [8] 93.33025 83.15474 81.27995 93.91095 79.86352 83.91482 85.78991 [15] 92.66305 86.12092 88.84358 88.40586 81.93699 82.55805 > colMin(tmp5) [1] 56.77548 56.48554 62.14706 53.57852 57.51811 61.14124 58.39960 69.72136 [9] 55.64857 56.02282 61.22857 60.28786 57.28081 55.78283 54.23220 57.50357 [17] 53.03557 63.44257 62.44978 59.45534 > > > ### 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] 87.02011 NA 67.51964 69.60936 73.04294 70.14159 70.54255 71.77213 [9] 69.88279 74.56618 > rowSums(tmp5) [1] 1740.402 NA 1350.393 1392.187 1460.859 1402.832 1410.851 1435.443 [9] 1397.656 1491.324 > rowVars(tmp5) [1] 7938.39681 80.67568 54.61750 65.26426 66.26094 78.97372 [7] 101.58235 94.09013 70.44737 99.97723 > rowSd(tmp5) [1] 89.097681 8.981964 7.390366 8.078630 8.140082 8.886716 10.078807 [8] 9.700007 8.393293 9.998861 > rowMax(tmp5) [1] 464.12370 NA 79.09932 86.12032 88.40586 83.43209 93.79037 [8] 92.66305 82.93640 93.91095 > rowMin(tmp5) [1] 54.15565 NA 53.03557 53.57852 57.28081 55.78283 57.69508 56.02282 [9] 54.23220 57.22792 > > colMeans(tmp5) [1] 112.06057 68.16406 71.49770 66.08074 71.82399 69.28556 69.43798 [8] 76.57115 64.83420 69.57554 NA 69.36829 72.02344 65.57036 [15] 71.59495 69.84237 70.19309 72.69639 71.72222 70.75196 > colSums(tmp5) [1] 1120.6057 681.6406 714.9770 660.8074 718.2399 692.8556 694.3798 [8] 765.7115 648.3420 695.7554 NA 693.6829 720.2344 655.7036 [15] 715.9495 698.4237 701.9309 726.9639 717.2222 707.5196 > colVars(tmp5) [1] 15379.17687 82.27991 35.52140 88.93628 82.04406 53.15677 [7] 82.31174 55.11838 60.29101 67.24682 NA 45.83955 [13] 78.46499 92.47877 133.63176 109.30509 86.72041 77.50026 [19] 35.67347 58.89137 > colSd(tmp5) [1] 124.012809 9.070827 5.959983 9.430603 9.057818 7.290869 [7] 9.072582 7.424176 7.764728 8.200416 NA 6.770491 [13] 8.858046 9.616588 11.559920 10.454907 9.312380 8.803423 [19] 5.972727 7.674071 > colMax(tmp5) [1] 464.12370 80.56029 78.65374 78.03921 83.38343 82.93640 83.16618 [8] 93.33025 83.15474 81.27995 NA 79.86352 83.91482 85.78991 [15] 92.66305 86.12092 88.84358 88.40586 81.93699 82.55805 > colMin(tmp5) [1] 56.77548 56.48554 62.14706 53.57852 57.51811 61.14124 58.39960 69.72136 [9] 55.64857 56.02282 NA 60.28786 57.28081 55.78283 54.23220 57.50357 [17] 53.03557 63.44257 62.44978 59.45534 > > Max(tmp5,na.rm=TRUE) [1] 464.1237 > Min(tmp5,na.rm=TRUE) [1] 53.03557 > mean(tmp5,na.rm=TRUE) [1] 72.33731 > Sum(tmp5,na.rm=TRUE) [1] 14395.12 > Var(tmp5,na.rm=TRUE) [1] 857.5447 > > rowMeans(tmp5,na.rm=TRUE) [1] 87.02011 69.11463 67.51964 69.60936 73.04294 70.14159 70.54255 71.77213 [9] 69.88279 74.56618 > rowSums(tmp5,na.rm=TRUE) [1] 1740.402 1313.178 1350.393 1392.187 1460.859 1402.832 1410.851 1435.443 [9] 1397.656 1491.324 > rowVars(tmp5,na.rm=TRUE) [1] 7938.39681 80.67568 54.61750 65.26426 66.26094 78.97372 [7] 101.58235 94.09013 70.44737 99.97723 > rowSd(tmp5,na.rm=TRUE) [1] 89.097681 8.981964 7.390366 8.078630 8.140082 8.886716 10.078807 [8] 9.700007 8.393293 9.998861 > rowMax(tmp5,na.rm=TRUE) [1] 464.12370 93.33025 79.09932 86.12032 88.40586 83.43209 93.79037 [8] 92.66305 82.93640 93.91095 > rowMin(tmp5,na.rm=TRUE) [1] 54.15565 55.64857 53.03557 53.57852 57.28081 55.78283 57.69508 56.02282 [9] 54.23220 57.22792 > > colMeans(tmp5,na.rm=TRUE) [1] 112.06057 68.16406 71.49770 66.08074 71.82399 69.28556 69.43798 [8] 76.57115 64.83420 69.57554 73.79761 69.36829 72.02344 65.57036 [15] 71.59495 69.84237 70.19309 72.69639 71.72222 70.75196 > colSums(tmp5,na.rm=TRUE) [1] 1120.6057 681.6406 714.9770 660.8074 718.2399 692.8556 694.3798 [8] 765.7115 648.3420 695.7554 664.1785 693.6829 720.2344 655.7036 [15] 715.9495 698.4237 701.9309 726.9639 717.2222 707.5196 > colVars(tmp5,na.rm=TRUE) [1] 15379.17687 82.27991 35.52140 88.93628 82.04406 53.15677 [7] 82.31174 55.11838 60.29101 67.24682 174.00196 45.83955 [13] 78.46499 92.47877 133.63176 109.30509 86.72041 77.50026 [19] 35.67347 58.89137 > colSd(tmp5,na.rm=TRUE) [1] 124.012809 9.070827 5.959983 9.430603 9.057818 7.290869 [7] 9.072582 7.424176 7.764728 8.200416 13.190980 6.770491 [13] 8.858046 9.616588 11.559920 10.454907 9.312380 8.803423 [19] 5.972727 7.674071 > colMax(tmp5,na.rm=TRUE) [1] 464.12370 80.56029 78.65374 78.03921 83.38343 82.93640 83.16618 [8] 93.33025 83.15474 81.27995 93.91095 79.86352 83.91482 85.78991 [15] 92.66305 86.12092 88.84358 88.40586 81.93699 82.55805 > colMin(tmp5,na.rm=TRUE) [1] 56.77548 56.48554 62.14706 53.57852 57.51811 61.14124 58.39960 69.72136 [9] 55.64857 56.02282 61.22857 60.28786 57.28081 55.78283 54.23220 57.50357 [17] 53.03557 63.44257 62.44978 59.45534 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 87.02011 NaN 67.51964 69.60936 73.04294 70.14159 70.54255 71.77213 [9] 69.88279 74.56618 > rowSums(tmp5,na.rm=TRUE) [1] 1740.402 0.000 1350.393 1392.187 1460.859 1402.832 1410.851 1435.443 [9] 1397.656 1491.324 > rowVars(tmp5,na.rm=TRUE) [1] 7938.39681 NA 54.61750 65.26426 66.26094 78.97372 [7] 101.58235 94.09013 70.44737 99.97723 > rowSd(tmp5,na.rm=TRUE) [1] 89.097681 NA 7.390366 8.078630 8.140082 8.886716 10.078807 [8] 9.700007 8.393293 9.998861 > rowMax(tmp5,na.rm=TRUE) [1] 464.12370 NA 79.09932 86.12032 88.40586 83.43209 93.79037 [8] 92.66305 82.93640 93.91095 > rowMin(tmp5,na.rm=TRUE) [1] 54.15565 NA 53.03557 53.57852 57.28081 55.78283 57.69508 56.02282 [9] 54.23220 57.22792 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.41356 69.46167 71.34262 66.20501 72.09864 69.25935 70.57397 [8] 74.70903 65.85483 70.53450 NaN 68.69365 72.75268 65.56445 [15] 72.06484 69.00282 70.51635 73.40478 71.70761 70.59162 > colSums(tmp5,na.rm=TRUE) [1] 1038.7220 625.1550 642.0836 595.8451 648.8878 623.3341 635.1658 [8] 672.3813 592.6935 634.8105 0.0000 618.2428 654.7741 590.0800 [15] 648.5836 621.0254 634.6471 660.6430 645.3685 635.3246 > colVars(tmp5,na.rm=TRUE) [1] 17175.09573 73.62215 39.69100 99.87959 91.45093 59.79364 [7] 78.08275 22.99884 56.10852 65.30720 NA 46.44908 [13] 82.29049 104.03823 147.85178 115.03874 96.38486 81.54233 [19] 40.13025 65.96357 > colSd(tmp5,na.rm=TRUE) [1] 131.053789 8.580335 6.300079 9.993978 9.562998 7.732634 [7] 8.836445 4.795710 7.490562 8.081287 NA 6.815356 [13] 9.071410 10.199913 12.159432 10.725611 9.817579 9.030079 [19] 6.334844 8.121796 > colMax(tmp5,na.rm=TRUE) [1] 464.12370 80.56029 78.65374 78.03921 83.38343 82.93640 83.16618 [8] 82.91131 83.15474 81.27995 -Inf 79.86352 83.91482 85.78991 [15] 92.66305 86.12092 88.84358 88.40586 81.93699 82.55805 > colMin(tmp5,na.rm=TRUE) [1] 56.77548 57.69508 62.14706 53.57852 57.51811 61.14124 58.39960 69.72136 [9] 57.22792 56.02282 Inf 60.28786 57.28081 55.78283 54.23220 57.50357 [17] 53.03557 63.44257 62.44978 59.45534 > > > > > 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] 226.4276 210.8209 212.1187 222.4442 233.9505 203.8541 220.3314 163.2937 [9] 371.0520 201.5867 > apply(copymatrix,1,var,na.rm=TRUE) [1] 226.4276 210.8209 212.1187 222.4442 233.9505 203.8541 220.3314 163.2937 [9] 371.0520 201.5867 > > > > 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 0.000000e+00 -2.842171e-14 -2.842171e-14 2.842171e-14 [6] -1.136868e-13 0.000000e+00 -1.989520e-13 6.394885e-14 1.705303e-13 [11] -1.136868e-13 8.526513e-14 0.000000e+00 -7.105427e-14 5.684342e-14 [16] -2.842171e-14 0.000000e+00 0.000000e+00 1.421085e-14 8.526513e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 7 15 7 6 9 17 5 5 1 10 4 3 1 1 8 7 1 18 3 5 6 14 8 19 10 5 5 1 4 20 10 19 8 4 2 13 3 19 3 11 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.085132 > Min(tmp) [1] -1.887027 > mean(tmp) [1] -0.1441706 > Sum(tmp) [1] -14.41706 > Var(tmp) [1] 0.8630019 > > rowMeans(tmp) [1] -0.1441706 > rowSums(tmp) [1] -14.41706 > rowVars(tmp) [1] 0.8630019 > rowSd(tmp) [1] 0.9289789 > rowMax(tmp) [1] 2.085132 > rowMin(tmp) [1] -1.887027 > > colMeans(tmp) [1] -0.810772707 -1.659092599 -1.168402391 1.328422101 0.242161573 [6] 0.307079334 -1.462974340 -1.291833453 1.362630537 0.471677217 [11] -1.840931447 0.496138504 0.041641161 -0.015207261 0.355979912 [16] -0.238136493 -1.016859701 -1.019801577 -0.512480739 -1.887027067 [21] -0.968778284 -1.846716705 -1.007907945 -0.125875490 1.291469868 [26] -1.155570573 -0.174704000 -0.802847032 -0.374467574 -0.038835667 [31] -0.522697433 0.167407682 1.916282341 1.586875606 -0.432589742 [36] 0.875852775 -0.231284351 -0.495215178 1.955764080 -1.454267569 [41] 0.108396440 -0.974535209 0.136515031 -0.103772206 1.053107181 [46] 0.961143802 -1.222398906 0.293620896 0.934717297 1.279491138 [51] 0.988130654 0.244491782 0.394198520 -0.238434297 -1.011617426 [56] 0.378727795 -1.397854367 0.106917102 2.085131716 -1.282149307 [61] -0.866825127 -1.761870326 0.338742036 -0.451871790 -0.197907716 [66] -1.048361548 0.949595447 0.431971431 -0.704433232 -0.269797119 [71] -0.022071503 -0.421938791 0.246902556 0.419966764 -0.232786946 [76] -0.662915651 -1.670225963 1.023630075 0.014353053 1.181528659 [81] -0.678464938 -1.274272704 0.432950962 0.554615773 0.644670785 [86] -0.454874911 -0.104305866 -0.008463068 -1.244500721 -0.086509934 [91] 1.263685318 -1.229959609 0.094286358 0.293749318 -0.230988175 [96] 0.758894761 -0.888013133 -0.515490020 -1.279083236 0.661391411 > colSums(tmp) [1] -0.810772707 -1.659092599 -1.168402391 1.328422101 0.242161573 [6] 0.307079334 -1.462974340 -1.291833453 1.362630537 0.471677217 [11] -1.840931447 0.496138504 0.041641161 -0.015207261 0.355979912 [16] -0.238136493 -1.016859701 -1.019801577 -0.512480739 -1.887027067 [21] -0.968778284 -1.846716705 -1.007907945 -0.125875490 1.291469868 [26] -1.155570573 -0.174704000 -0.802847032 -0.374467574 -0.038835667 [31] -0.522697433 0.167407682 1.916282341 1.586875606 -0.432589742 [36] 0.875852775 -0.231284351 -0.495215178 1.955764080 -1.454267569 [41] 0.108396440 -0.974535209 0.136515031 -0.103772206 1.053107181 [46] 0.961143802 -1.222398906 0.293620896 0.934717297 1.279491138 [51] 0.988130654 0.244491782 0.394198520 -0.238434297 -1.011617426 [56] 0.378727795 -1.397854367 0.106917102 2.085131716 -1.282149307 [61] -0.866825127 -1.761870326 0.338742036 -0.451871790 -0.197907716 [66] -1.048361548 0.949595447 0.431971431 -0.704433232 -0.269797119 [71] -0.022071503 -0.421938791 0.246902556 0.419966764 -0.232786946 [76] -0.662915651 -1.670225963 1.023630075 0.014353053 1.181528659 [81] -0.678464938 -1.274272704 0.432950962 0.554615773 0.644670785 [86] -0.454874911 -0.104305866 -0.008463068 -1.244500721 -0.086509934 [91] 1.263685318 -1.229959609 0.094286358 0.293749318 -0.230988175 [96] 0.758894761 -0.888013133 -0.515490020 -1.279083236 0.661391411 > 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.810772707 -1.659092599 -1.168402391 1.328422101 0.242161573 [6] 0.307079334 -1.462974340 -1.291833453 1.362630537 0.471677217 [11] -1.840931447 0.496138504 0.041641161 -0.015207261 0.355979912 [16] -0.238136493 -1.016859701 -1.019801577 -0.512480739 -1.887027067 [21] -0.968778284 -1.846716705 -1.007907945 -0.125875490 1.291469868 [26] -1.155570573 -0.174704000 -0.802847032 -0.374467574 -0.038835667 [31] -0.522697433 0.167407682 1.916282341 1.586875606 -0.432589742 [36] 0.875852775 -0.231284351 -0.495215178 1.955764080 -1.454267569 [41] 0.108396440 -0.974535209 0.136515031 -0.103772206 1.053107181 [46] 0.961143802 -1.222398906 0.293620896 0.934717297 1.279491138 [51] 0.988130654 0.244491782 0.394198520 -0.238434297 -1.011617426 [56] 0.378727795 -1.397854367 0.106917102 2.085131716 -1.282149307 [61] -0.866825127 -1.761870326 0.338742036 -0.451871790 -0.197907716 [66] -1.048361548 0.949595447 0.431971431 -0.704433232 -0.269797119 [71] -0.022071503 -0.421938791 0.246902556 0.419966764 -0.232786946 [76] -0.662915651 -1.670225963 1.023630075 0.014353053 1.181528659 [81] -0.678464938 -1.274272704 0.432950962 0.554615773 0.644670785 [86] -0.454874911 -0.104305866 -0.008463068 -1.244500721 -0.086509934 [91] 1.263685318 -1.229959609 0.094286358 0.293749318 -0.230988175 [96] 0.758894761 -0.888013133 -0.515490020 -1.279083236 0.661391411 > colMin(tmp) [1] -0.810772707 -1.659092599 -1.168402391 1.328422101 0.242161573 [6] 0.307079334 -1.462974340 -1.291833453 1.362630537 0.471677217 [11] -1.840931447 0.496138504 0.041641161 -0.015207261 0.355979912 [16] -0.238136493 -1.016859701 -1.019801577 -0.512480739 -1.887027067 [21] -0.968778284 -1.846716705 -1.007907945 -0.125875490 1.291469868 [26] -1.155570573 -0.174704000 -0.802847032 -0.374467574 -0.038835667 [31] -0.522697433 0.167407682 1.916282341 1.586875606 -0.432589742 [36] 0.875852775 -0.231284351 -0.495215178 1.955764080 -1.454267569 [41] 0.108396440 -0.974535209 0.136515031 -0.103772206 1.053107181 [46] 0.961143802 -1.222398906 0.293620896 0.934717297 1.279491138 [51] 0.988130654 0.244491782 0.394198520 -0.238434297 -1.011617426 [56] 0.378727795 -1.397854367 0.106917102 2.085131716 -1.282149307 [61] -0.866825127 -1.761870326 0.338742036 -0.451871790 -0.197907716 [66] -1.048361548 0.949595447 0.431971431 -0.704433232 -0.269797119 [71] -0.022071503 -0.421938791 0.246902556 0.419966764 -0.232786946 [76] -0.662915651 -1.670225963 1.023630075 0.014353053 1.181528659 [81] -0.678464938 -1.274272704 0.432950962 0.554615773 0.644670785 [86] -0.454874911 -0.104305866 -0.008463068 -1.244500721 -0.086509934 [91] 1.263685318 -1.229959609 0.094286358 0.293749318 -0.230988175 [96] 0.758894761 -0.888013133 -0.515490020 -1.279083236 0.661391411 > colMedians(tmp) [1] -0.810772707 -1.659092599 -1.168402391 1.328422101 0.242161573 [6] 0.307079334 -1.462974340 -1.291833453 1.362630537 0.471677217 [11] -1.840931447 0.496138504 0.041641161 -0.015207261 0.355979912 [16] -0.238136493 -1.016859701 -1.019801577 -0.512480739 -1.887027067 [21] -0.968778284 -1.846716705 -1.007907945 -0.125875490 1.291469868 [26] -1.155570573 -0.174704000 -0.802847032 -0.374467574 -0.038835667 [31] -0.522697433 0.167407682 1.916282341 1.586875606 -0.432589742 [36] 0.875852775 -0.231284351 -0.495215178 1.955764080 -1.454267569 [41] 0.108396440 -0.974535209 0.136515031 -0.103772206 1.053107181 [46] 0.961143802 -1.222398906 0.293620896 0.934717297 1.279491138 [51] 0.988130654 0.244491782 0.394198520 -0.238434297 -1.011617426 [56] 0.378727795 -1.397854367 0.106917102 2.085131716 -1.282149307 [61] -0.866825127 -1.761870326 0.338742036 -0.451871790 -0.197907716 [66] -1.048361548 0.949595447 0.431971431 -0.704433232 -0.269797119 [71] -0.022071503 -0.421938791 0.246902556 0.419966764 -0.232786946 [76] -0.662915651 -1.670225963 1.023630075 0.014353053 1.181528659 [81] -0.678464938 -1.274272704 0.432950962 0.554615773 0.644670785 [86] -0.454874911 -0.104305866 -0.008463068 -1.244500721 -0.086509934 [91] 1.263685318 -1.229959609 0.094286358 0.293749318 -0.230988175 [96] 0.758894761 -0.888013133 -0.515490020 -1.279083236 0.661391411 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.8107727 -1.659093 -1.168402 1.328422 0.2421616 0.3070793 -1.462974 [2,] -0.8107727 -1.659093 -1.168402 1.328422 0.2421616 0.3070793 -1.462974 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.291833 1.362631 0.4716772 -1.840931 0.4961385 0.04164116 -0.01520726 [2,] -1.291833 1.362631 0.4716772 -1.840931 0.4961385 0.04164116 -0.01520726 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.3559799 -0.2381365 -1.01686 -1.019802 -0.5124807 -1.887027 -0.9687783 [2,] 0.3559799 -0.2381365 -1.01686 -1.019802 -0.5124807 -1.887027 -0.9687783 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1.846717 -1.007908 -0.1258755 1.29147 -1.155571 -0.174704 -0.802847 [2,] -1.846717 -1.007908 -0.1258755 1.29147 -1.155571 -0.174704 -0.802847 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.3744676 -0.03883567 -0.5226974 0.1674077 1.916282 1.586876 -0.4325897 [2,] -0.3744676 -0.03883567 -0.5226974 0.1674077 1.916282 1.586876 -0.4325897 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.8758528 -0.2312844 -0.4952152 1.955764 -1.454268 0.1083964 -0.9745352 [2,] 0.8758528 -0.2312844 -0.4952152 1.955764 -1.454268 0.1083964 -0.9745352 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.136515 -0.1037722 1.053107 0.9611438 -1.222399 0.2936209 0.9347173 [2,] 0.136515 -0.1037722 1.053107 0.9611438 -1.222399 0.2936209 0.9347173 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.279491 0.9881307 0.2444918 0.3941985 -0.2384343 -1.011617 0.3787278 [2,] 1.279491 0.9881307 0.2444918 0.3941985 -0.2384343 -1.011617 0.3787278 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.397854 0.1069171 2.085132 -1.282149 -0.8668251 -1.76187 0.338742 [2,] -1.397854 0.1069171 2.085132 -1.282149 -0.8668251 -1.76187 0.338742 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.4518718 -0.1979077 -1.048362 0.9495954 0.4319714 -0.7044332 -0.2697971 [2,] -0.4518718 -0.1979077 -1.048362 0.9495954 0.4319714 -0.7044332 -0.2697971 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.0220715 -0.4219388 0.2469026 0.4199668 -0.2327869 -0.6629157 -1.670226 [2,] -0.0220715 -0.4219388 0.2469026 0.4199668 -0.2327869 -0.6629157 -1.670226 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 1.02363 0.01435305 1.181529 -0.6784649 -1.274273 0.432951 0.5546158 [2,] 1.02363 0.01435305 1.181529 -0.6784649 -1.274273 0.432951 0.5546158 [,85] [,86] [,87] [,88] [,89] [,90] [1,] 0.6446708 -0.4548749 -0.1043059 -0.008463068 -1.244501 -0.08650993 [2,] 0.6446708 -0.4548749 -0.1043059 -0.008463068 -1.244501 -0.08650993 [,91] [,92] [,93] [,94] [,95] [,96] [,97] [1,] 1.263685 -1.22996 0.09428636 0.2937493 -0.2309882 0.7588948 -0.8880131 [2,] 1.263685 -1.22996 0.09428636 0.2937493 -0.2309882 0.7588948 -0.8880131 [,98] [,99] [,100] [1,] -0.51549 -1.279083 0.6613914 [2,] -0.51549 -1.279083 0.6613914 > > > Max(tmp2) [1] 2.197331 > Min(tmp2) [1] -2.563855 > mean(tmp2) [1] -0.1829726 > Sum(tmp2) [1] -18.29726 > Var(tmp2) [1] 0.9849666 > > rowMeans(tmp2) [1] -1.50073555 -0.75024647 -0.96407867 -1.13180526 -0.18961174 -0.98491001 [7] 0.09097498 -0.74446726 -0.14641384 0.76026464 -0.63558439 -0.11989931 [13] -0.74404392 -0.44715962 0.34572140 -1.41345871 -0.99453727 0.66528502 [19] -1.81791292 0.36377045 -0.95487237 -0.94334217 0.31541278 -0.48513743 [25] -0.14305862 -0.54582211 1.29508461 0.31616953 -1.02975488 0.25491270 [31] -0.76179824 -2.56385544 0.55496538 -0.20941187 0.72805827 0.06785496 [37] -0.17417349 0.13313894 1.01734330 0.78421503 -1.61792213 0.23264199 [43] -1.44880103 -1.13056717 2.19733142 -0.10420106 1.08698210 -2.23915998 [49] -0.16944706 -1.39870199 0.59484900 -1.97624534 -0.08928817 1.73165282 [55] 1.02959669 -0.74899652 0.69330085 -0.60699981 -0.04390492 0.33304560 [61] -0.93983430 -1.88776042 2.11371935 -0.28507915 -1.00155022 -0.43900915 [67] 2.11449677 -0.50175874 -0.35632703 0.50633665 -2.10729377 0.96911909 [73] 1.25473393 -0.24088130 0.93964992 0.38753290 -0.76940387 -1.29053833 [79] -0.20417289 0.79077606 -0.60228343 -1.17043905 1.34211598 0.43189344 [85] 0.06402687 -0.43721370 -0.60293784 -0.12661636 -1.23886562 2.03605797 [91] 0.46501516 -0.14192201 -1.35567834 -0.06159583 0.73429994 0.53050901 [97] -1.13371261 -0.41592990 0.92181327 -0.21080287 > rowSums(tmp2) [1] -1.50073555 -0.75024647 -0.96407867 -1.13180526 -0.18961174 -0.98491001 [7] 0.09097498 -0.74446726 -0.14641384 0.76026464 -0.63558439 -0.11989931 [13] -0.74404392 -0.44715962 0.34572140 -1.41345871 -0.99453727 0.66528502 [19] -1.81791292 0.36377045 -0.95487237 -0.94334217 0.31541278 -0.48513743 [25] -0.14305862 -0.54582211 1.29508461 0.31616953 -1.02975488 0.25491270 [31] -0.76179824 -2.56385544 0.55496538 -0.20941187 0.72805827 0.06785496 [37] -0.17417349 0.13313894 1.01734330 0.78421503 -1.61792213 0.23264199 [43] -1.44880103 -1.13056717 2.19733142 -0.10420106 1.08698210 -2.23915998 [49] -0.16944706 -1.39870199 0.59484900 -1.97624534 -0.08928817 1.73165282 [55] 1.02959669 -0.74899652 0.69330085 -0.60699981 -0.04390492 0.33304560 [61] -0.93983430 -1.88776042 2.11371935 -0.28507915 -1.00155022 -0.43900915 [67] 2.11449677 -0.50175874 -0.35632703 0.50633665 -2.10729377 0.96911909 [73] 1.25473393 -0.24088130 0.93964992 0.38753290 -0.76940387 -1.29053833 [79] -0.20417289 0.79077606 -0.60228343 -1.17043905 1.34211598 0.43189344 [85] 0.06402687 -0.43721370 -0.60293784 -0.12661636 -1.23886562 2.03605797 [91] 0.46501516 -0.14192201 -1.35567834 -0.06159583 0.73429994 0.53050901 [97] -1.13371261 -0.41592990 0.92181327 -0.21080287 > 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] -1.50073555 -0.75024647 -0.96407867 -1.13180526 -0.18961174 -0.98491001 [7] 0.09097498 -0.74446726 -0.14641384 0.76026464 -0.63558439 -0.11989931 [13] -0.74404392 -0.44715962 0.34572140 -1.41345871 -0.99453727 0.66528502 [19] -1.81791292 0.36377045 -0.95487237 -0.94334217 0.31541278 -0.48513743 [25] -0.14305862 -0.54582211 1.29508461 0.31616953 -1.02975488 0.25491270 [31] -0.76179824 -2.56385544 0.55496538 -0.20941187 0.72805827 0.06785496 [37] -0.17417349 0.13313894 1.01734330 0.78421503 -1.61792213 0.23264199 [43] -1.44880103 -1.13056717 2.19733142 -0.10420106 1.08698210 -2.23915998 [49] -0.16944706 -1.39870199 0.59484900 -1.97624534 -0.08928817 1.73165282 [55] 1.02959669 -0.74899652 0.69330085 -0.60699981 -0.04390492 0.33304560 [61] -0.93983430 -1.88776042 2.11371935 -0.28507915 -1.00155022 -0.43900915 [67] 2.11449677 -0.50175874 -0.35632703 0.50633665 -2.10729377 0.96911909 [73] 1.25473393 -0.24088130 0.93964992 0.38753290 -0.76940387 -1.29053833 [79] -0.20417289 0.79077606 -0.60228343 -1.17043905 1.34211598 0.43189344 [85] 0.06402687 -0.43721370 -0.60293784 -0.12661636 -1.23886562 2.03605797 [91] 0.46501516 -0.14192201 -1.35567834 -0.06159583 0.73429994 0.53050901 [97] -1.13371261 -0.41592990 0.92181327 -0.21080287 > rowMin(tmp2) [1] -1.50073555 -0.75024647 -0.96407867 -1.13180526 -0.18961174 -0.98491001 [7] 0.09097498 -0.74446726 -0.14641384 0.76026464 -0.63558439 -0.11989931 [13] -0.74404392 -0.44715962 0.34572140 -1.41345871 -0.99453727 0.66528502 [19] -1.81791292 0.36377045 -0.95487237 -0.94334217 0.31541278 -0.48513743 [25] -0.14305862 -0.54582211 1.29508461 0.31616953 -1.02975488 0.25491270 [31] -0.76179824 -2.56385544 0.55496538 -0.20941187 0.72805827 0.06785496 [37] -0.17417349 0.13313894 1.01734330 0.78421503 -1.61792213 0.23264199 [43] -1.44880103 -1.13056717 2.19733142 -0.10420106 1.08698210 -2.23915998 [49] -0.16944706 -1.39870199 0.59484900 -1.97624534 -0.08928817 1.73165282 [55] 1.02959669 -0.74899652 0.69330085 -0.60699981 -0.04390492 0.33304560 [61] -0.93983430 -1.88776042 2.11371935 -0.28507915 -1.00155022 -0.43900915 [67] 2.11449677 -0.50175874 -0.35632703 0.50633665 -2.10729377 0.96911909 [73] 1.25473393 -0.24088130 0.93964992 0.38753290 -0.76940387 -1.29053833 [79] -0.20417289 0.79077606 -0.60228343 -1.17043905 1.34211598 0.43189344 [85] 0.06402687 -0.43721370 -0.60293784 -0.12661636 -1.23886562 2.03605797 [91] 0.46501516 -0.14192201 -1.35567834 -0.06159583 0.73429994 0.53050901 [97] -1.13371261 -0.41592990 0.92181327 -0.21080287 > > colMeans(tmp2) [1] -0.1829726 > colSums(tmp2) [1] -18.29726 > colVars(tmp2) [1] 0.9849666 > colSd(tmp2) [1] 0.9924548 > colMax(tmp2) [1] 2.197331 > colMin(tmp2) [1] -2.563855 > colMedians(tmp2) [1] -0.1818926 > colRanges(tmp2) [,1] [1,] -2.563855 [2,] 2.197331 > > 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.53199839 -1.61897861 6.18349349 1.94709799 0.03387125 4.54265340 [7] 1.66880403 -0.36502629 0.34047982 -3.93469461 > colApply(tmp,quantile)[,1] [,1] [1,] -0.8987626 [2,] -0.5233872 [3,] 0.3242882 [4,] 0.5404374 [5,] 0.6487456 > > rowApply(tmp,sum) [1] 3.3664367 -1.0766656 0.0934966 3.6908209 3.6018503 -1.0360016 [7] -1.5807277 1.9113693 0.1976205 0.1614996 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 2 6 8 4 5 8 2 3 7 6 [2,] 1 7 3 8 3 10 5 2 4 4 [3,] 3 10 2 9 10 4 10 8 1 7 [4,] 5 3 10 7 7 9 8 4 8 3 [5,] 6 1 5 6 2 7 4 5 6 10 [6,] 8 9 1 10 9 5 6 9 3 8 [7,] 7 4 7 1 4 3 3 10 10 5 [8,] 9 8 6 5 6 1 7 7 5 1 [9,] 10 2 4 2 8 6 9 1 9 2 [10,] 4 5 9 3 1 2 1 6 2 9 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.68800832 -1.35173175 -2.22853836 0.76888548 -0.52921091 2.73699530 [7] 1.67197555 -2.17828748 0.59220966 0.48856386 1.95221545 2.58987087 [13] 0.01598081 1.48192628 -2.27055095 -1.31958633 3.62799107 -0.64372801 [19] -4.60632176 1.11655055 > colApply(tmp,quantile)[,1] [,1] [1,] -0.8192060 [2,] -0.6404717 [3,] 0.1689413 [4,] 0.6341227 [5,] 2.3446220 > > rowApply(tmp,sum) [1] -0.3759122 4.8022158 3.5214735 -4.6568709 0.3123115 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 14 3 20 15 4 [2,] 11 19 2 7 3 [3,] 2 16 14 4 2 [4,] 18 4 13 9 12 [5,] 13 11 3 16 6 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.1689413 -0.1361460 -1.0680333 1.0855542 0.02695172 0.6471327 [2,] -0.6404717 1.5585732 0.9197798 -0.4194967 0.17096208 1.3081059 [3,] 2.3446220 -1.1467452 0.4258646 0.4079214 -0.83887865 1.2602475 [4,] 0.6341227 -0.5877165 -1.0550044 -0.5564641 0.64462455 -1.0152043 [5,] -0.8192060 -1.0396972 -1.4511450 0.2513707 -0.53287061 0.5367136 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.5792465 -0.118331539 0.5839269 -0.9179192 1.60234031 -0.2828568 [2,] 0.2043035 -0.045492438 -0.1781060 0.7694127 0.68280293 -0.2302904 [3,] 0.3256558 0.004320357 -0.5612086 0.5285898 -1.83272801 0.6371986 [4,] 0.7730871 -1.252119251 0.9362665 -0.3612100 1.43794373 -0.2365902 [5,] 0.9481756 -0.766664609 -0.1886692 0.4696905 0.06185648 2.7024096 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.59402824 -1.12084901 -0.7509110619 -0.493192054 -0.3714144 -0.16627528 [2,] -0.15269493 0.06636345 -1.8623901901 1.003805796 2.4103637 0.02471336 [3,] -0.47601986 1.99418460 -0.4033278218 -0.007464406 1.2343349 0.30884794 [4,] 0.06277933 0.11905301 0.7463567575 -2.015505671 -0.5820836 -1.19021884 [5,] -0.01211197 0.42317423 -0.0002786333 0.192770001 0.9367904 0.37920481 [,19] [,20] [1,] 1.2105237 -0.2901359 [2,] -1.0482971 0.2602687 [3,] -0.8126659 0.1287244 [4,] -0.4953388 -0.6636492 [5,] -3.4605437 1.6813425 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 650 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 561 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.679937 -0.3924391 -1.495053 -1.875874 2.785698 0.2755891 -1.728422 col8 col9 col10 col11 col12 col13 col14 row1 0.9532954 -0.2027182 -1.472569 0.3863205 -0.08943985 0.8700259 -2.09003 col15 col16 col17 col18 col19 col20 row1 -0.9694772 0.8631989 -0.6972942 -0.3450097 -0.02847436 -0.4085375 > tmp[,"col10"] col10 row1 -1.4725691 row2 -1.1032303 row3 -1.0001647 row4 -0.7862599 row5 0.5663490 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 1.6799372 -0.3924391 -1.495053 -1.8758739 2.785698 0.2755891 -1.728422 row5 0.5164276 -0.1907379 2.441635 -0.2269072 -1.029797 1.5756126 1.020307 col8 col9 col10 col11 col12 col13 col14 row1 0.9532954 -0.2027182 -1.472569 0.3863205 -0.08943985 0.8700259 -2.090030 row5 0.5388343 -0.2868837 0.566349 -1.0867392 0.71722329 1.2387994 -2.488544 col15 col16 col17 col18 col19 col20 row1 -0.9694772 0.8631989 -0.6972942 -0.3450097 -0.02847436 -0.4085375 row5 2.3052214 -0.8371678 0.5923838 -2.0272510 -0.77776327 -1.5893174 > tmp[,c("col6","col20")] col6 col20 row1 0.27558910 -0.40853750 row2 0.01529201 0.72081781 row3 -0.31671568 0.54920461 row4 -1.42803303 -0.06616157 row5 1.57561261 -1.58931739 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.2755891 -0.4085375 row5 1.5756126 -1.5893174 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.64766 52.11435 50.65151 49.66549 49.48825 102.9577 49.27223 49.73916 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.07293 49.93304 48.7494 50.12281 52.14208 50.00082 49.8368 50.49995 col17 col18 col19 col20 row1 50.94652 50.15836 49.07083 101.6424 > tmp[,"col10"] col10 row1 49.93304 row2 31.05743 row3 29.67431 row4 30.60924 row5 49.25322 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.64766 52.11435 50.65151 49.66549 49.48825 102.9577 49.27223 49.73916 row5 50.22495 51.17661 50.97549 50.23070 50.73862 104.0613 49.91619 51.79564 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.07293 49.93304 48.7494 50.12281 52.14208 50.00082 49.83680 50.49995 row5 48.50482 49.25322 48.8758 49.87007 51.16988 50.74177 50.13977 50.74841 col17 col18 col19 col20 row1 50.94652 50.15836 49.07083 101.6424 row5 50.02318 50.17195 50.36815 106.0636 > tmp[,c("col6","col20")] col6 col20 row1 102.95767 101.64244 row2 75.37995 74.50829 row3 74.83981 75.30072 row4 74.85045 74.82755 row5 104.06126 106.06356 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 102.9577 101.6424 row5 104.0613 106.0636 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 102.9577 101.6424 row5 104.0613 106.0636 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.3571970 [2,] -0.6506666 [3,] 0.1023662 [4,] 0.8009540 [5,] 0.1560263 > tmp[,c("col17","col7")] col17 col7 [1,] -0.372178193 1.186979417 [2,] -1.044523355 -0.004441262 [3,] -0.177219759 -0.182961998 [4,] 0.388118294 0.222145490 [5,] -0.006285899 -0.431076431 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.38007564 1.270270125 [2,] -0.40197240 0.179070013 [3,] 1.36155691 -0.927184867 [4,] 0.13855659 0.005322517 [5,] -0.06975389 -0.881015022 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.3800756 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.3800756 [2,] -0.4019724 > > > > 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 -0.8540951 -0.11226453 1.264442 -0.16946530 1.492509 -0.03424799 row1 0.9765687 -0.06659749 -1.931915 -0.05152548 -1.788459 1.02207909 [,7] [,8] [,9] [,10] [,11] [,12] row3 0.03254106 0.6759014 -0.11234768 -0.2790675 -0.3943935 1.0449804 row1 -0.30022396 -0.8401806 0.04208667 -0.5616783 -1.4450258 -0.5031053 [,13] [,14] [,15] [,16] [,17] [,18] row3 -0.05632373 0.61595253 1.6626004 2.7250281 -1.5530007 -1.261125 row1 -0.88000378 0.03678452 -0.5158808 -0.4815005 0.7488364 2.190819 [,19] [,20] row3 -0.03847748 -1.216968 row1 0.08182161 -1.198384 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.2223831 -0.8082451 -1.546403 0.0358901 -0.751569 -0.0599086 2.069934 [,8] [,9] [,10] row2 -1.142377 0.2423386 1.885341 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.3065405 -0.04459719 0.2044894 0.6379516 -0.1115578 -0.2474139 1.542681 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.9929201 -0.9138297 -0.5230909 0.5141885 -0.1370625 -0.6868319 -0.4832639 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.1943902 1.960502 -1.092832 -0.2270363 0.2463745 -0.7632753 > > > 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: 0x600003e780c0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba1532f4e95f" [2] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba156d05761b" [3] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba1518d1e88" [4] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba1557cf7383" [5] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba1574a8ca7e" [6] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba1575865207" [7] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba15457385d8" [8] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba1523584b87" [9] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba1579c69e31" [10] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba155ebbe16c" [11] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba15ccaa0b" [12] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba157cafb895" [13] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba15747f7e26" [14] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba155e332c8a" [15] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMba1571b14856" > > > ### 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: 0x600003ee4000> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600003ee4000> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600003ee4000> > rowMedians(tmp) [1] -0.012902664 0.249676198 -0.348492107 -0.030337050 0.315867590 [6] -0.290676892 -0.313715614 -0.043151507 -0.429632905 -0.038893481 [11] -0.114531003 -0.002644223 -0.040099894 0.161257317 0.030135886 [16] 0.331509994 -0.313838903 0.193040775 -0.021584027 -0.293333691 [21] -0.358265388 0.125439434 0.101522993 -0.004651297 0.169164778 [26] -0.056346525 -0.386450678 -0.639203253 -0.073737427 -0.201873245 [31] -0.181028502 0.152110121 0.370421437 -0.388227683 0.059890956 [36] 0.293108551 0.061364597 0.008799202 0.216819945 -0.325733307 [41] -0.337756384 -0.533613944 -0.219448686 0.217508107 0.248583688 [46] -0.463289959 -0.136032756 -0.204487080 -0.075219430 0.197451562 [51] 0.176139269 0.317876999 0.412218002 -1.075657345 -0.175631415 [56] -0.293775558 -0.075966598 0.192918051 0.352403039 0.113339071 [61] 0.160956708 0.324970459 -0.353471228 0.020822282 -0.092776256 [66] -0.772851451 0.439072842 -0.472031489 -0.072681057 0.067641250 [71] -0.201649377 -0.283845035 -0.025766309 -0.160783041 0.097812777 [76] -0.081745861 0.200078463 0.341561342 -0.372496015 -0.437045953 [81] 0.524615725 0.193386301 -0.422642306 0.204337824 0.576440808 [86] 0.753862499 0.402724516 -0.111577457 -0.187167113 0.048687914 [91] 0.158838531 -0.367603178 -0.074961298 -0.134257008 0.075478383 [96] 0.401829262 0.277927464 -0.122756397 0.135079728 -0.139792054 [101] -0.168831245 -0.054341722 0.157908650 -0.016091811 -0.008244820 [106] 0.651672643 -0.205081182 -0.113146478 -0.438023097 0.187578131 [111] -0.391043545 0.223419833 0.011588717 0.056501615 -0.295008911 [116] -0.047817509 -0.011426143 0.161818616 0.122111470 0.118865498 [121] -0.409706886 -0.228033308 0.435349903 0.342162145 0.033671961 [126] 0.159986481 -0.229857326 -0.353316352 0.815015521 -0.088921227 [131] 0.389512501 -0.299207207 -0.502011326 0.165345472 0.585488468 [136] 0.578269903 0.792295583 -0.077290476 0.164711620 -0.250716515 [141] 0.221134679 0.042107155 0.132601366 0.049625038 -0.033047007 [146] -0.569065074 -0.277440653 -0.335610722 0.228280993 0.125807648 [151] 0.849482623 0.196101199 0.252603126 0.131735016 0.331843967 [156] -0.379218123 0.039820854 0.081499125 0.224799335 0.205026212 [161] -0.069566975 -0.306117211 -0.670310690 -0.610489299 -0.248763495 [166] 0.433018027 -0.744048053 0.056263729 -0.573978083 0.349248530 [171] -0.484398038 -0.288277701 0.425310902 0.172887625 -0.026502298 [176] -0.013960239 -0.617286664 0.153646769 -0.141952304 0.411108686 [181] 0.192666349 0.072915912 -0.129421285 0.100839299 0.547732316 [186] 0.110415277 -0.064329055 -0.565921143 0.094152289 0.247794936 [191] 0.405634912 -0.077362964 0.380252328 -0.029867749 -0.223850379 [196] 0.209731891 -0.091889290 -0.333397649 -0.148080646 -0.059407416 [201] 0.093884859 -0.385194514 0.105779260 -0.435840186 -0.303096263 [206] 0.327642071 -0.462415327 0.252060116 -0.104896774 0.291114981 [211] 0.002468273 -0.379426957 -0.190228625 0.217141022 -0.630926216 [216] -0.226164789 -0.014733755 0.091220017 0.113964768 0.208163358 [221] 0.091981489 0.440473167 -0.491188993 0.010830110 0.459461855 [226] -0.253180610 0.216340164 0.473008712 0.105954603 0.056014234 > > proc.time() user system elapsed 2.807 17.094 20.846
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: 0x6000012180c0> > .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: 0x6000012180c0> > .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: 0x6000012180c0> > .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: 0x6000012180c0> > 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: 0x600001230120> > .Call("R_bm_AddColumn",P) <pointer: 0x600001230120> > .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: 0x600001230120> > .Call("R_bm_AddColumn",P) <pointer: 0x600001230120> > .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: 0x600001230120> > 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: 0x600001260120> > .Call("R_bm_AddColumn",P) <pointer: 0x600001260120> > .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: 0x600001260120> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600001260120> > .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: 0x600001260120> > > .Call("R_bm_RowMode",P) <pointer: 0x600001260120> > .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: 0x600001260120> > > .Call("R_bm_ColMode",P) <pointer: 0x600001260120> > .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: 0x600001260120> > 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: 0x600001214000> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600001214000> > .Call("R_bm_AddColumn",P) <pointer: 0x600001214000> > .Call("R_bm_AddColumn",P) <pointer: 0x600001214000> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilec20365de8263" "BufferedMatrixFilec203734265d4" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilec20365de8263" "BufferedMatrixFilec203734265d4" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x60000123c120> > .Call("R_bm_AddColumn",P) <pointer: 0x60000123c120> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x60000123c120> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x60000123c120> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x60000123c120> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x60000123c120> > .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: 0x60000123c2a0> > .Call("R_bm_AddColumn",P) <pointer: 0x60000123c2a0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x60000123c2a0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x60000123c2a0> > 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: 0x600001220000> > .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: 0x600001220000> > rm(P) > > proc.time() user system elapsed 0.364 0.165 0.517
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.323 0.089 0.399