Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-10-04 12:04 -0400 (Sat, 04 Oct 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 Patched (2025-08-23 r88802) -- "Great Square Root" | 4853 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4640 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4585 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4576 |
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 255/2341 | 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-10-03 20:14:06 -0400 (Fri, 03 Oct 2025) |
EndedAt: 2025-10-03 20:15:53 -0400 (Fri, 03 Oct 2025) |
EllapsedTime: 107.1 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.349 0.164 1.026
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells 480848 25.7 1056620 56.5 NA 634462 33.9 Vcells 891079 6.8 8388608 64.0 98304 2108714 16.1 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Oct 3 20:14:33 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Oct 3 20:14:35 2025" > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > > > RowMode(tmp2) <pointer: 0x6000014f0000> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Oct 3 20:14:57 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Oct 3 20:15:06 2025" > > ColMode(tmp2) <pointer: 0x6000014f0000> > > > > ### 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,] 100.1350371 0.8899675 1.3344697 -0.2978747 [2,] -0.7536186 0.3160780 -0.3901509 -1.3669053 [3,] -1.3211423 -0.5326859 0.3488565 -0.2710958 [4,] -2.0893570 -1.0574809 -0.9759696 -1.0960386 > 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,] 100.1350371 0.8899675 1.3344697 0.2978747 [2,] 0.7536186 0.3160780 0.3901509 1.3669053 [3,] 1.3211423 0.5326859 0.3488565 0.2710958 [4,] 2.0893570 1.0574809 0.9759696 1.0960386 > 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,] 10.0067496 0.9433809 1.1551925 0.5457790 [2,] 0.8681121 0.5622082 0.6246206 1.1691473 [3,] 1.1494095 0.7298533 0.5906408 0.5206686 [4,] 1.4454608 1.0283389 0.9879117 1.0469186 > > 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,] 225.20253 35.32378 37.88639 30.75566 [2,] 34.43474 30.93816 31.63636 38.05838 [3,] 37.81524 32.83122 31.25526 30.47778 [4,] 41.54397 36.34087 35.85509 36.56522 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x60000148c000> > exp(tmp5) <pointer: 0x60000148c000> > log(tmp5,2) <pointer: 0x60000148c000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 468.7296 > Min(tmp5) [1] 52.70643 > mean(tmp5) [1] 72.57445 > Sum(tmp5) [1] 14514.89 > Var(tmp5) [1] 858.924 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.12531 69.89441 68.88114 71.86156 72.23242 69.46276 71.19256 71.41417 [9] 69.90018 69.78001 > rowSums(tmp5) [1] 1822.506 1397.888 1377.623 1437.231 1444.648 1389.255 1423.851 1428.283 [9] 1398.004 1395.600 > rowVars(tmp5) [1] 7990.05335 32.06318 52.07127 81.37500 65.27253 81.90928 [7] 39.30670 81.22517 111.09577 47.53449 > rowSd(tmp5) [1] 89.387098 5.662436 7.216043 9.020809 8.079142 9.050374 6.269505 [8] 9.012501 10.540198 6.894526 > rowMax(tmp5) [1] 468.72957 79.21353 89.32686 92.46954 87.43026 87.40443 82.09539 [8] 93.23663 89.48723 80.32273 > rowMin(tmp5) [1] 55.17250 60.70070 59.58938 54.86675 59.85713 52.70643 58.23078 58.16003 [9] 56.04469 54.90356 > > colMeans(tmp5) [1] 114.12094 69.49870 73.10844 70.01738 68.26291 72.48166 68.69330 [8] 72.79237 70.31845 68.37975 70.68204 71.24801 69.93996 67.58666 [15] 68.96986 73.49264 65.79734 72.27483 73.59242 70.23139 > colSums(tmp5) [1] 1141.2094 694.9870 731.0844 700.1738 682.6291 724.8166 686.9330 [8] 727.9237 703.1845 683.7975 706.8204 712.4801 699.3996 675.8666 [15] 689.6986 734.9264 657.9734 722.7483 735.9242 702.3139 > colVars(tmp5) [1] 15621.59488 62.38136 38.84457 43.68457 31.14518 105.92563 [7] 53.76819 99.16162 63.28959 45.77778 70.54898 92.00909 [13] 27.68823 86.22705 61.29760 75.47886 86.74629 60.74801 [19] 13.80629 137.94036 > colSd(tmp5) [1] 124.986379 7.898187 6.232541 6.609430 5.580786 10.292018 [7] 7.332679 9.957993 7.955475 6.765928 8.399344 9.592137 [13] 5.261960 9.285852 7.829278 8.687857 9.313769 7.794101 [19] 3.715682 11.744801 > colMax(tmp5) [1] 468.72957 86.62760 83.93860 79.21353 77.30409 93.23663 81.29089 [8] 92.46954 82.09539 82.36802 82.03802 89.32686 77.90148 87.43026 [15] 78.08278 89.48723 90.61744 83.22688 78.38948 86.65859 > colMin(tmp5) [1] 56.37072 61.51214 65.05374 59.85713 60.57730 52.70643 58.80045 58.67892 [9] 57.13086 60.34153 56.04469 61.15827 59.13263 55.24168 55.17250 58.64707 [17] 58.23078 58.16003 67.47609 54.86675 > > > ### 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 69.89441 68.88114 71.86156 72.23242 69.46276 71.19256 71.41417 [9] 69.90018 69.78001 > rowSums(tmp5) [1] NA 1397.888 1377.623 1437.231 1444.648 1389.255 1423.851 1428.283 [9] 1398.004 1395.600 > rowVars(tmp5) [1] 8366.36493 32.06318 52.07127 81.37500 65.27253 81.90928 [7] 39.30670 81.22517 111.09577 47.53449 > rowSd(tmp5) [1] 91.467836 5.662436 7.216043 9.020809 8.079142 9.050374 6.269505 [8] 9.012501 10.540198 6.894526 > rowMax(tmp5) [1] NA 79.21353 89.32686 92.46954 87.43026 87.40443 82.09539 93.23663 [9] 89.48723 80.32273 > rowMin(tmp5) [1] NA 60.70070 59.58938 54.86675 59.85713 52.70643 58.23078 58.16003 [9] 56.04469 54.90356 > > colMeans(tmp5) [1] 114.12094 69.49870 73.10844 70.01738 68.26291 72.48166 68.69330 [8] 72.79237 NA 68.37975 70.68204 71.24801 69.93996 67.58666 [15] 68.96986 73.49264 65.79734 72.27483 73.59242 70.23139 > colSums(tmp5) [1] 1141.2094 694.9870 731.0844 700.1738 682.6291 724.8166 686.9330 [8] 727.9237 NA 683.7975 706.8204 712.4801 699.3996 675.8666 [15] 689.6986 734.9264 657.9734 722.7483 735.9242 702.3139 > colVars(tmp5) [1] 15621.59488 62.38136 38.84457 43.68457 31.14518 105.92563 [7] 53.76819 99.16162 NA 45.77778 70.54898 92.00909 [13] 27.68823 86.22705 61.29760 75.47886 86.74629 60.74801 [19] 13.80629 137.94036 > colSd(tmp5) [1] 124.986379 7.898187 6.232541 6.609430 5.580786 10.292018 [7] 7.332679 9.957993 NA 6.765928 8.399344 9.592137 [13] 5.261960 9.285852 7.829278 8.687857 9.313769 7.794101 [19] 3.715682 11.744801 > colMax(tmp5) [1] 468.72957 86.62760 83.93860 79.21353 77.30409 93.23663 81.29089 [8] 92.46954 NA 82.36802 82.03802 89.32686 77.90148 87.43026 [15] 78.08278 89.48723 90.61744 83.22688 78.38948 86.65859 > colMin(tmp5) [1] 56.37072 61.51214 65.05374 59.85713 60.57730 52.70643 58.80045 58.67892 [9] NA 60.34153 56.04469 61.15827 59.13263 55.24168 55.17250 58.64707 [17] 58.23078 58.16003 67.47609 54.86675 > > Max(tmp5,na.rm=TRUE) [1] 468.7296 > Min(tmp5,na.rm=TRUE) [1] 52.70643 > mean(tmp5,na.rm=TRUE) [1] 72.65206 > Sum(tmp5,na.rm=TRUE) [1] 14457.76 > Var(tmp5,na.rm=TRUE) [1] 862.0513 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.91449 69.89441 68.88114 71.86156 72.23242 69.46276 71.19256 71.41417 [9] 69.90018 69.78001 > rowSums(tmp5,na.rm=TRUE) [1] 1765.375 1397.888 1377.623 1437.231 1444.648 1389.255 1423.851 1428.283 [9] 1398.004 1395.600 > rowVars(tmp5,na.rm=TRUE) [1] 8366.36493 32.06318 52.07127 81.37500 65.27253 81.90928 [7] 39.30670 81.22517 111.09577 47.53449 > rowSd(tmp5,na.rm=TRUE) [1] 91.467836 5.662436 7.216043 9.020809 8.079142 9.050374 6.269505 [8] 9.012501 10.540198 6.894526 > rowMax(tmp5,na.rm=TRUE) [1] 468.72957 79.21353 89.32686 92.46954 87.43026 87.40443 82.09539 [8] 93.23663 89.48723 80.32273 > rowMin(tmp5,na.rm=TRUE) [1] 55.17250 60.70070 59.58938 54.86675 59.85713 52.70643 58.23078 58.16003 [9] 56.04469 54.90356 > > colMeans(tmp5,na.rm=TRUE) [1] 114.12094 69.49870 73.10844 70.01738 68.26291 72.48166 68.69330 [8] 72.79237 71.78374 68.37975 70.68204 71.24801 69.93996 67.58666 [15] 68.96986 73.49264 65.79734 72.27483 73.59242 70.23139 > colSums(tmp5,na.rm=TRUE) [1] 1141.2094 694.9870 731.0844 700.1738 682.6291 724.8166 686.9330 [8] 727.9237 646.0537 683.7975 706.8204 712.4801 699.3996 675.8666 [15] 689.6986 734.9264 657.9734 722.7483 735.9242 702.3139 > colVars(tmp5,na.rm=TRUE) [1] 15621.59488 62.38136 38.84457 43.68457 31.14518 105.92563 [7] 53.76819 99.16162 47.04627 45.77778 70.54898 92.00909 [13] 27.68823 86.22705 61.29760 75.47886 86.74629 60.74801 [19] 13.80629 137.94036 > colSd(tmp5,na.rm=TRUE) [1] 124.986379 7.898187 6.232541 6.609430 5.580786 10.292018 [7] 7.332679 9.957993 6.859028 6.765928 8.399344 9.592137 [13] 5.261960 9.285852 7.829278 8.687857 9.313769 7.794101 [19] 3.715682 11.744801 > colMax(tmp5,na.rm=TRUE) [1] 468.72957 86.62760 83.93860 79.21353 77.30409 93.23663 81.29089 [8] 92.46954 82.09539 82.36802 82.03802 89.32686 77.90148 87.43026 [15] 78.08278 89.48723 90.61744 83.22688 78.38948 86.65859 > colMin(tmp5,na.rm=TRUE) [1] 56.37072 61.51214 65.05374 59.85713 60.57730 52.70643 58.80045 58.67892 [9] 61.90216 60.34153 56.04469 61.15827 59.13263 55.24168 55.17250 58.64707 [17] 58.23078 58.16003 67.47609 54.86675 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] NaN 69.89441 68.88114 71.86156 72.23242 69.46276 71.19256 71.41417 [9] 69.90018 69.78001 > rowSums(tmp5,na.rm=TRUE) [1] 0.000 1397.888 1377.623 1437.231 1444.648 1389.255 1423.851 1428.283 [9] 1398.004 1395.600 > rowVars(tmp5,na.rm=TRUE) [1] NA 32.06318 52.07127 81.37500 65.27253 81.90928 39.30670 [8] 81.22517 111.09577 47.53449 > rowSd(tmp5,na.rm=TRUE) [1] NA 5.662436 7.216043 9.020809 8.079142 9.050374 6.269505 [8] 9.012501 10.540198 6.894526 > rowMax(tmp5,na.rm=TRUE) [1] NA 79.21353 89.32686 92.46954 87.43026 87.40443 82.09539 93.23663 [9] 89.48723 80.32273 > rowMin(tmp5,na.rm=TRUE) [1] NA 60.70070 59.58938 54.86675 59.85713 52.70643 58.23078 58.16003 [9] 56.04469 54.90356 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 74.71998 69.05169 72.46987 70.68443 68.26311 71.79504 68.01242 74.36053 [9] NaN 68.19625 70.56398 70.01873 69.51765 68.95832 70.50290 73.60028 [17] 63.03955 71.05793 73.55892 70.10958 > colSums(tmp5,na.rm=TRUE) [1] 672.4798 621.4652 652.2289 636.1599 614.3680 646.1554 612.1117 669.2447 [9] 0.0000 613.7662 635.0758 630.1686 625.6589 620.6249 634.5261 662.4026 [17] 567.3559 639.5214 662.0303 630.9862 > colVars(tmp5,na.rm=TRUE) [1] 109.39418 67.93105 39.11272 44.13931 35.03832 113.86254 55.27369 [8] 83.89164 NA 51.12118 79.21081 86.51011 29.14285 75.83898 [15] 42.51991 84.78336 12.02881 51.68216 15.51945 155.01599 > colSd(tmp5,na.rm=TRUE) [1] 10.459167 8.242030 6.254017 6.643743 5.919318 10.670639 7.434627 [8] 9.159238 NA 7.149908 8.900046 9.301081 5.398412 8.708558 [15] 6.520729 9.207788 3.468257 7.189030 3.939474 12.450542 > colMax(tmp5,na.rm=TRUE) [1] 87.40443 86.62760 83.93860 79.21353 77.30409 93.23663 81.29089 92.46954 [9] -Inf 82.36802 82.03802 89.32686 77.90148 87.43026 78.08278 89.48723 [17] 68.98824 82.03776 78.38948 86.65859 > colMin(tmp5,na.rm=TRUE) [1] 56.37072 61.51214 65.05374 59.85713 60.57730 52.70643 58.80045 65.43795 [9] Inf 60.34153 56.04469 61.15827 59.13263 57.31077 59.58938 58.64707 [17] 58.23078 58.16003 67.47609 54.86675 > > > > > 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] 115.5153 276.2037 264.6181 185.0226 301.8971 341.3106 334.5905 174.1891 [9] 213.9664 252.1835 > apply(copymatrix,1,var,na.rm=TRUE) [1] 115.5153 276.2037 264.6181 185.0226 301.8971 341.3106 334.5905 174.1891 [9] 213.9664 252.1835 > > > > 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] -8.526513e-14 0.000000e+00 -2.842171e-14 0.000000e+00 -2.273737e-13 [6] -1.989520e-13 0.000000e+00 -2.842171e-14 -2.842171e-13 1.989520e-13 [11] 5.684342e-14 -1.136868e-13 -4.263256e-14 2.557954e-13 1.136868e-13 [16] 0.000000e+00 1.705303e-13 1.136868e-13 -1.705303e-13 1.705303e-13 > > > > > > > > > > > ## 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 3 3 15 3 12 8 7 6 19 7 10 10 18 8 13 2 2 4 5 10 19 5 16 2 9 8 6 10 13 1 6 10 15 2 7 4 17 3 8 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.343709 > Min(tmp) [1] -2.541929 > mean(tmp) [1] 0.06856189 > Sum(tmp) [1] 6.856189 > Var(tmp) [1] 0.8936837 > > rowMeans(tmp) [1] 0.06856189 > rowSums(tmp) [1] 6.856189 > rowVars(tmp) [1] 0.8936837 > rowSd(tmp) [1] 0.9453484 > rowMax(tmp) [1] 2.343709 > rowMin(tmp) [1] -2.541929 > > colMeans(tmp) [1] 1.37424833 -1.22154926 0.47146717 -0.60922046 -0.08865752 -2.54192943 [7] 1.16010620 -1.40348184 0.72359506 -0.87480330 -0.30359068 0.87486147 [13] 0.53320255 0.02041864 0.06176743 0.81708522 0.39858377 0.16884615 [19] 0.03656321 1.18813694 0.24930566 -1.73397707 2.34370944 0.34179872 [25] -0.86425816 0.94471829 -0.44361456 -1.81846136 0.83473410 0.29331579 [31] -0.16482094 0.86767653 -1.17745311 -1.10455046 1.60579290 -0.39828295 [37] 1.11526211 0.53935092 -1.92814755 1.32162612 0.38436012 -0.00344075 [43] -0.80209697 -0.52971021 -0.06190106 0.06379537 0.58084694 0.36790561 [49] 0.43443622 -1.30677618 0.29725991 -0.67318042 -1.13427831 1.09042956 [55] -0.34838373 0.86262268 0.77354636 1.36436048 0.73312782 -0.44838105 [61] -0.92896743 0.23963646 0.40261149 -0.42079731 -0.20245398 0.49104694 [67] 0.09440153 -0.65693385 0.87727651 -0.11857076 2.14496660 0.96535381 [73] 1.15433090 0.86526477 -1.24782022 -0.84852428 -0.20079969 0.61786375 [79] 0.57956587 0.88229941 0.22798452 1.59719778 1.85868002 -0.76438481 [85] -0.74740415 1.02358478 0.58011304 -1.29767074 -0.73116051 -1.24348950 [91] 0.24238004 0.47933272 0.83884592 0.04036964 -1.19065982 0.38206588 [97] -1.23160212 -1.25778728 0.15506609 -0.04893999 > colSums(tmp) [1] 1.37424833 -1.22154926 0.47146717 -0.60922046 -0.08865752 -2.54192943 [7] 1.16010620 -1.40348184 0.72359506 -0.87480330 -0.30359068 0.87486147 [13] 0.53320255 0.02041864 0.06176743 0.81708522 0.39858377 0.16884615 [19] 0.03656321 1.18813694 0.24930566 -1.73397707 2.34370944 0.34179872 [25] -0.86425816 0.94471829 -0.44361456 -1.81846136 0.83473410 0.29331579 [31] -0.16482094 0.86767653 -1.17745311 -1.10455046 1.60579290 -0.39828295 [37] 1.11526211 0.53935092 -1.92814755 1.32162612 0.38436012 -0.00344075 [43] -0.80209697 -0.52971021 -0.06190106 0.06379537 0.58084694 0.36790561 [49] 0.43443622 -1.30677618 0.29725991 -0.67318042 -1.13427831 1.09042956 [55] -0.34838373 0.86262268 0.77354636 1.36436048 0.73312782 -0.44838105 [61] -0.92896743 0.23963646 0.40261149 -0.42079731 -0.20245398 0.49104694 [67] 0.09440153 -0.65693385 0.87727651 -0.11857076 2.14496660 0.96535381 [73] 1.15433090 0.86526477 -1.24782022 -0.84852428 -0.20079969 0.61786375 [79] 0.57956587 0.88229941 0.22798452 1.59719778 1.85868002 -0.76438481 [85] -0.74740415 1.02358478 0.58011304 -1.29767074 -0.73116051 -1.24348950 [91] 0.24238004 0.47933272 0.83884592 0.04036964 -1.19065982 0.38206588 [97] -1.23160212 -1.25778728 0.15506609 -0.04893999 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] 1.37424833 -1.22154926 0.47146717 -0.60922046 -0.08865752 -2.54192943 [7] 1.16010620 -1.40348184 0.72359506 -0.87480330 -0.30359068 0.87486147 [13] 0.53320255 0.02041864 0.06176743 0.81708522 0.39858377 0.16884615 [19] 0.03656321 1.18813694 0.24930566 -1.73397707 2.34370944 0.34179872 [25] -0.86425816 0.94471829 -0.44361456 -1.81846136 0.83473410 0.29331579 [31] -0.16482094 0.86767653 -1.17745311 -1.10455046 1.60579290 -0.39828295 [37] 1.11526211 0.53935092 -1.92814755 1.32162612 0.38436012 -0.00344075 [43] -0.80209697 -0.52971021 -0.06190106 0.06379537 0.58084694 0.36790561 [49] 0.43443622 -1.30677618 0.29725991 -0.67318042 -1.13427831 1.09042956 [55] -0.34838373 0.86262268 0.77354636 1.36436048 0.73312782 -0.44838105 [61] -0.92896743 0.23963646 0.40261149 -0.42079731 -0.20245398 0.49104694 [67] 0.09440153 -0.65693385 0.87727651 -0.11857076 2.14496660 0.96535381 [73] 1.15433090 0.86526477 -1.24782022 -0.84852428 -0.20079969 0.61786375 [79] 0.57956587 0.88229941 0.22798452 1.59719778 1.85868002 -0.76438481 [85] -0.74740415 1.02358478 0.58011304 -1.29767074 -0.73116051 -1.24348950 [91] 0.24238004 0.47933272 0.83884592 0.04036964 -1.19065982 0.38206588 [97] -1.23160212 -1.25778728 0.15506609 -0.04893999 > colMin(tmp) [1] 1.37424833 -1.22154926 0.47146717 -0.60922046 -0.08865752 -2.54192943 [7] 1.16010620 -1.40348184 0.72359506 -0.87480330 -0.30359068 0.87486147 [13] 0.53320255 0.02041864 0.06176743 0.81708522 0.39858377 0.16884615 [19] 0.03656321 1.18813694 0.24930566 -1.73397707 2.34370944 0.34179872 [25] -0.86425816 0.94471829 -0.44361456 -1.81846136 0.83473410 0.29331579 [31] -0.16482094 0.86767653 -1.17745311 -1.10455046 1.60579290 -0.39828295 [37] 1.11526211 0.53935092 -1.92814755 1.32162612 0.38436012 -0.00344075 [43] -0.80209697 -0.52971021 -0.06190106 0.06379537 0.58084694 0.36790561 [49] 0.43443622 -1.30677618 0.29725991 -0.67318042 -1.13427831 1.09042956 [55] -0.34838373 0.86262268 0.77354636 1.36436048 0.73312782 -0.44838105 [61] -0.92896743 0.23963646 0.40261149 -0.42079731 -0.20245398 0.49104694 [67] 0.09440153 -0.65693385 0.87727651 -0.11857076 2.14496660 0.96535381 [73] 1.15433090 0.86526477 -1.24782022 -0.84852428 -0.20079969 0.61786375 [79] 0.57956587 0.88229941 0.22798452 1.59719778 1.85868002 -0.76438481 [85] -0.74740415 1.02358478 0.58011304 -1.29767074 -0.73116051 -1.24348950 [91] 0.24238004 0.47933272 0.83884592 0.04036964 -1.19065982 0.38206588 [97] -1.23160212 -1.25778728 0.15506609 -0.04893999 > colMedians(tmp) [1] 1.37424833 -1.22154926 0.47146717 -0.60922046 -0.08865752 -2.54192943 [7] 1.16010620 -1.40348184 0.72359506 -0.87480330 -0.30359068 0.87486147 [13] 0.53320255 0.02041864 0.06176743 0.81708522 0.39858377 0.16884615 [19] 0.03656321 1.18813694 0.24930566 -1.73397707 2.34370944 0.34179872 [25] -0.86425816 0.94471829 -0.44361456 -1.81846136 0.83473410 0.29331579 [31] -0.16482094 0.86767653 -1.17745311 -1.10455046 1.60579290 -0.39828295 [37] 1.11526211 0.53935092 -1.92814755 1.32162612 0.38436012 -0.00344075 [43] -0.80209697 -0.52971021 -0.06190106 0.06379537 0.58084694 0.36790561 [49] 0.43443622 -1.30677618 0.29725991 -0.67318042 -1.13427831 1.09042956 [55] -0.34838373 0.86262268 0.77354636 1.36436048 0.73312782 -0.44838105 [61] -0.92896743 0.23963646 0.40261149 -0.42079731 -0.20245398 0.49104694 [67] 0.09440153 -0.65693385 0.87727651 -0.11857076 2.14496660 0.96535381 [73] 1.15433090 0.86526477 -1.24782022 -0.84852428 -0.20079969 0.61786375 [79] 0.57956587 0.88229941 0.22798452 1.59719778 1.85868002 -0.76438481 [85] -0.74740415 1.02358478 0.58011304 -1.29767074 -0.73116051 -1.24348950 [91] 0.24238004 0.47933272 0.83884592 0.04036964 -1.19065982 0.38206588 [97] -1.23160212 -1.25778728 0.15506609 -0.04893999 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.374248 -1.221549 0.4714672 -0.6092205 -0.08865752 -2.541929 1.160106 [2,] 1.374248 -1.221549 0.4714672 -0.6092205 -0.08865752 -2.541929 1.160106 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.403482 0.7235951 -0.8748033 -0.3035907 0.8748615 0.5332026 0.02041864 [2,] -1.403482 0.7235951 -0.8748033 -0.3035907 0.8748615 0.5332026 0.02041864 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.06176743 0.8170852 0.3985838 0.1688461 0.03656321 1.188137 0.2493057 [2,] 0.06176743 0.8170852 0.3985838 0.1688461 0.03656321 1.188137 0.2493057 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1.733977 2.343709 0.3417987 -0.8642582 0.9447183 -0.4436146 -1.818461 [2,] -1.733977 2.343709 0.3417987 -0.8642582 0.9447183 -0.4436146 -1.818461 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.8347341 0.2933158 -0.1648209 0.8676765 -1.177453 -1.10455 1.605793 [2,] 0.8347341 0.2933158 -0.1648209 0.8676765 -1.177453 -1.10455 1.605793 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.398283 1.115262 0.5393509 -1.928148 1.321626 0.3843601 -0.00344075 [2,] -0.398283 1.115262 0.5393509 -1.928148 1.321626 0.3843601 -0.00344075 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.802097 -0.5297102 -0.06190106 0.06379537 0.5808469 0.3679056 0.4344362 [2,] -0.802097 -0.5297102 -0.06190106 0.06379537 0.5808469 0.3679056 0.4344362 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -1.306776 0.2972599 -0.6731804 -1.134278 1.09043 -0.3483837 0.8626227 [2,] -1.306776 0.2972599 -0.6731804 -1.134278 1.09043 -0.3483837 0.8626227 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.7735464 1.36436 0.7331278 -0.448381 -0.9289674 0.2396365 0.4026115 [2,] 0.7735464 1.36436 0.7331278 -0.448381 -0.9289674 0.2396365 0.4026115 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.4207973 -0.202454 0.4910469 0.09440153 -0.6569339 0.8772765 -0.1185708 [2,] -0.4207973 -0.202454 0.4910469 0.09440153 -0.6569339 0.8772765 -0.1185708 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 2.144967 0.9653538 1.154331 0.8652648 -1.24782 -0.8485243 -0.2007997 [2,] 2.144967 0.9653538 1.154331 0.8652648 -1.24782 -0.8485243 -0.2007997 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.6178638 0.5795659 0.8822994 0.2279845 1.597198 1.85868 -0.7643848 [2,] 0.6178638 0.5795659 0.8822994 0.2279845 1.597198 1.85868 -0.7643848 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.7474041 1.023585 0.580113 -1.297671 -0.7311605 -1.243489 0.24238 [2,] -0.7474041 1.023585 0.580113 -1.297671 -0.7311605 -1.243489 0.24238 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.4793327 0.8388459 0.04036964 -1.19066 0.3820659 -1.231602 -1.257787 [2,] 0.4793327 0.8388459 0.04036964 -1.19066 0.3820659 -1.231602 -1.257787 [,99] [,100] [1,] 0.1550661 -0.04893999 [2,] 0.1550661 -0.04893999 > > > Max(tmp2) [1] 2.385248 > Min(tmp2) [1] -2.159963 > mean(tmp2) [1] -0.05339583 > Sum(tmp2) [1] -5.339583 > Var(tmp2) [1] 0.8868495 > > rowMeans(tmp2) [1] 0.5247988698 -1.2670554828 -0.0882511096 -0.5147057194 -0.2572635014 [6] -1.4385261186 -0.3985378663 -2.0316195008 -0.2583707590 0.6352600390 [11] -0.4833325069 0.6429629181 0.2608351652 1.3294791119 -0.2862908781 [16] 0.3048819450 0.3696229783 0.5386258216 -0.3169734376 -0.4764593494 [21] 0.7076097015 1.7234026833 1.3428408163 1.3910456121 -1.9936051667 [26] 0.7300789217 0.5687201638 0.0063981888 0.9590081564 0.1207004461 [31] -0.2475614751 1.2713268271 -0.4026824422 -0.8925303956 -0.1001761356 [36] 0.5726246361 -0.5583938731 0.7342358136 0.4858309133 0.2426668603 [41] -1.5330547939 0.2919730372 0.2466824628 -0.9080120214 -0.5234857403 [46] 0.2523069724 -1.1501511725 -0.3678154686 1.7403073201 1.5897378632 [51] -0.7618286116 -1.4962761979 -0.5351172534 0.2810369109 0.6710330711 [56] -0.0004623161 1.3406230774 0.6174916299 0.9290233446 -2.1599625810 [61] -0.6754000682 1.3373155025 2.3852478094 -1.8043124892 -0.9087370034 [66] -1.1207691309 -0.3576962690 0.6772611993 -0.2255161425 -1.5483694770 [71] -0.4297785632 1.2682249767 -0.7550354156 -1.3844607828 1.0542356841 [76] -0.7150077165 1.4831966282 -1.6916152689 0.0792549616 -0.0346406724 [81] -0.5229745312 -0.3922081979 -1.0179798553 0.3945916108 0.8123625746 [86] 0.1594514702 0.3485431591 -1.4428642153 -0.1148584306 -0.5479754694 [91] -0.9056043241 -0.3733445984 1.1401481115 -0.7760514592 0.3900424556 [96] 0.5450309059 -0.2212007523 -0.8251375756 0.0160570117 -0.6136793948 > rowSums(tmp2) [1] 0.5247988698 -1.2670554828 -0.0882511096 -0.5147057194 -0.2572635014 [6] -1.4385261186 -0.3985378663 -2.0316195008 -0.2583707590 0.6352600390 [11] -0.4833325069 0.6429629181 0.2608351652 1.3294791119 -0.2862908781 [16] 0.3048819450 0.3696229783 0.5386258216 -0.3169734376 -0.4764593494 [21] 0.7076097015 1.7234026833 1.3428408163 1.3910456121 -1.9936051667 [26] 0.7300789217 0.5687201638 0.0063981888 0.9590081564 0.1207004461 [31] -0.2475614751 1.2713268271 -0.4026824422 -0.8925303956 -0.1001761356 [36] 0.5726246361 -0.5583938731 0.7342358136 0.4858309133 0.2426668603 [41] -1.5330547939 0.2919730372 0.2466824628 -0.9080120214 -0.5234857403 [46] 0.2523069724 -1.1501511725 -0.3678154686 1.7403073201 1.5897378632 [51] -0.7618286116 -1.4962761979 -0.5351172534 0.2810369109 0.6710330711 [56] -0.0004623161 1.3406230774 0.6174916299 0.9290233446 -2.1599625810 [61] -0.6754000682 1.3373155025 2.3852478094 -1.8043124892 -0.9087370034 [66] -1.1207691309 -0.3576962690 0.6772611993 -0.2255161425 -1.5483694770 [71] -0.4297785632 1.2682249767 -0.7550354156 -1.3844607828 1.0542356841 [76] -0.7150077165 1.4831966282 -1.6916152689 0.0792549616 -0.0346406724 [81] -0.5229745312 -0.3922081979 -1.0179798553 0.3945916108 0.8123625746 [86] 0.1594514702 0.3485431591 -1.4428642153 -0.1148584306 -0.5479754694 [91] -0.9056043241 -0.3733445984 1.1401481115 -0.7760514592 0.3900424556 [96] 0.5450309059 -0.2212007523 -0.8251375756 0.0160570117 -0.6136793948 > 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.5247988698 -1.2670554828 -0.0882511096 -0.5147057194 -0.2572635014 [6] -1.4385261186 -0.3985378663 -2.0316195008 -0.2583707590 0.6352600390 [11] -0.4833325069 0.6429629181 0.2608351652 1.3294791119 -0.2862908781 [16] 0.3048819450 0.3696229783 0.5386258216 -0.3169734376 -0.4764593494 [21] 0.7076097015 1.7234026833 1.3428408163 1.3910456121 -1.9936051667 [26] 0.7300789217 0.5687201638 0.0063981888 0.9590081564 0.1207004461 [31] -0.2475614751 1.2713268271 -0.4026824422 -0.8925303956 -0.1001761356 [36] 0.5726246361 -0.5583938731 0.7342358136 0.4858309133 0.2426668603 [41] -1.5330547939 0.2919730372 0.2466824628 -0.9080120214 -0.5234857403 [46] 0.2523069724 -1.1501511725 -0.3678154686 1.7403073201 1.5897378632 [51] -0.7618286116 -1.4962761979 -0.5351172534 0.2810369109 0.6710330711 [56] -0.0004623161 1.3406230774 0.6174916299 0.9290233446 -2.1599625810 [61] -0.6754000682 1.3373155025 2.3852478094 -1.8043124892 -0.9087370034 [66] -1.1207691309 -0.3576962690 0.6772611993 -0.2255161425 -1.5483694770 [71] -0.4297785632 1.2682249767 -0.7550354156 -1.3844607828 1.0542356841 [76] -0.7150077165 1.4831966282 -1.6916152689 0.0792549616 -0.0346406724 [81] -0.5229745312 -0.3922081979 -1.0179798553 0.3945916108 0.8123625746 [86] 0.1594514702 0.3485431591 -1.4428642153 -0.1148584306 -0.5479754694 [91] -0.9056043241 -0.3733445984 1.1401481115 -0.7760514592 0.3900424556 [96] 0.5450309059 -0.2212007523 -0.8251375756 0.0160570117 -0.6136793948 > rowMin(tmp2) [1] 0.5247988698 -1.2670554828 -0.0882511096 -0.5147057194 -0.2572635014 [6] -1.4385261186 -0.3985378663 -2.0316195008 -0.2583707590 0.6352600390 [11] -0.4833325069 0.6429629181 0.2608351652 1.3294791119 -0.2862908781 [16] 0.3048819450 0.3696229783 0.5386258216 -0.3169734376 -0.4764593494 [21] 0.7076097015 1.7234026833 1.3428408163 1.3910456121 -1.9936051667 [26] 0.7300789217 0.5687201638 0.0063981888 0.9590081564 0.1207004461 [31] -0.2475614751 1.2713268271 -0.4026824422 -0.8925303956 -0.1001761356 [36] 0.5726246361 -0.5583938731 0.7342358136 0.4858309133 0.2426668603 [41] -1.5330547939 0.2919730372 0.2466824628 -0.9080120214 -0.5234857403 [46] 0.2523069724 -1.1501511725 -0.3678154686 1.7403073201 1.5897378632 [51] -0.7618286116 -1.4962761979 -0.5351172534 0.2810369109 0.6710330711 [56] -0.0004623161 1.3406230774 0.6174916299 0.9290233446 -2.1599625810 [61] -0.6754000682 1.3373155025 2.3852478094 -1.8043124892 -0.9087370034 [66] -1.1207691309 -0.3576962690 0.6772611993 -0.2255161425 -1.5483694770 [71] -0.4297785632 1.2682249767 -0.7550354156 -1.3844607828 1.0542356841 [76] -0.7150077165 1.4831966282 -1.6916152689 0.0792549616 -0.0346406724 [81] -0.5229745312 -0.3922081979 -1.0179798553 0.3945916108 0.8123625746 [86] 0.1594514702 0.3485431591 -1.4428642153 -0.1148584306 -0.5479754694 [91] -0.9056043241 -0.3733445984 1.1401481115 -0.7760514592 0.3900424556 [96] 0.5450309059 -0.2212007523 -0.8251375756 0.0160570117 -0.6136793948 > > colMeans(tmp2) [1] -0.05339583 > colSums(tmp2) [1] -5.339583 > colVars(tmp2) [1] 0.8868495 > colSd(tmp2) [1] 0.9417269 > colMax(tmp2) [1] 2.385248 > colMin(tmp2) [1] -2.159963 > colMedians(tmp2) [1] -0.09421362 > colRanges(tmp2) [,1] [1,] -2.159963 [2,] 2.385248 > > 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.5532897 1.2866853 3.6985147 -1.4002734 -0.1451046 -5.7328908 [7] -1.0335640 0.7043571 0.6798846 2.9701007 > colApply(tmp,quantile)[,1] [,1] [1,] -2.1425828 [2,] -0.9363101 [3,] -0.1374779 [4,] 0.1980758 [5,] 1.3218487 > > rowApply(tmp,sum) [1] -4.793066570 -1.583800864 2.576662298 0.936971418 1.245600209 [6] 1.905950366 -0.002146498 -4.453270033 4.199168269 -1.557648740 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 4 6 8 5 2 5 6 1 2 10 [2,] 10 2 4 9 1 7 10 4 8 1 [3,] 7 7 6 1 10 6 5 9 10 8 [4,] 6 8 7 2 7 1 9 2 7 3 [5,] 2 9 5 10 5 8 1 7 1 7 [6,] 1 3 3 3 3 3 3 5 6 9 [7,] 3 1 10 7 4 2 8 8 9 2 [8,] 8 5 2 4 8 10 2 6 5 6 [9,] 5 10 1 8 9 4 4 10 3 4 [10,] 9 4 9 6 6 9 7 3 4 5 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -3.23597511 1.14417843 -1.93172236 -3.74161294 -0.18153840 -0.70947813 [7] -0.08530823 -1.03360775 3.40481788 -1.10322215 1.59279157 3.01701415 [13] 1.61988217 1.48696612 0.40869568 1.53716905 -2.57831044 -0.20642231 [19] 1.94555093 1.04929501 > colApply(tmp,quantile)[,1] [,1] [1,] -1.40931729 [2,] -1.07273863 [3,] -1.06823382 [4,] 0.04292886 [5,] 0.27138577 > > rowApply(tmp,sum) [1] 0.9141387 -1.7051123 0.4910469 6.5881456 -3.8890558 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 2 12 2 12 3 [2,] 9 8 12 7 20 [3,] 6 17 3 6 11 [4,] 4 18 1 13 2 [5,] 15 3 8 14 10 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.06823382 -0.2489135 -0.6620995 -0.8907158 0.6645524 -0.3717638 [2,] 0.04292886 -0.1244079 0.3810188 0.5341061 -1.1634848 1.3625523 [3,] -1.07273863 0.2231606 -0.9791836 -2.3254609 -0.2440683 -0.4401199 [4,] 0.27138577 -0.2659103 -0.4439049 0.3587471 0.8690998 -0.1732840 [5,] -1.40931729 1.5602496 -0.2275532 -1.4182895 -0.3076376 -1.0868627 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.5663220 0.3013246 0.23408272 -0.9820135 -0.1870946 2.21343391 [2,] -0.1955366 -1.5084570 0.03606253 -0.5662933 -1.1353084 0.04231363 [3,] -0.5059887 0.3003233 -0.07979476 -0.2350476 1.9884002 0.73671110 [4,] 1.9036533 -0.9312823 1.90444170 1.2709887 1.9806120 -0.53133359 [5,] -0.7211143 0.8044837 1.31002568 -0.5908564 -1.0538176 0.55588910 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.03748413 0.9402574 -1.22190698 0.21768496 0.4955056 0.6652531 [2,] 0.09526681 -1.4140306 1.79983202 -0.04844939 -0.4790159 0.2011701 [3,] 0.60672518 0.4153697 -0.79216208 1.34848038 -0.3245332 0.8207481 [4,] -0.80364405 0.2711942 -0.06950908 0.10428102 -1.1859958 1.6464191 [5,] 0.68405010 1.2741754 0.69244181 -0.08482792 -1.0842712 -3.5400127 [,19] [,20] [1,] 1.19558159 -0.8519582 [2,] 0.25300513 0.1816153 [3,] -0.04737211 1.0975982 [4,] -0.60983585 1.0220228 [5,] 1.15417217 -0.3999831 > > > 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 : 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 -0.271999 1.83751 0.1871419 -0.07252006 -0.5761689 -1.915576 0.7034023 col8 col9 col10 col11 col12 col13 col14 row1 1.336635 -0.4784231 0.5661791 1.000245 -1.337266 0.100466 1.623654 col15 col16 col17 col18 col19 col20 row1 0.7222578 -1.597578 0.2481085 1.380764 -0.1543093 1.084624 > tmp[,"col10"] col10 row1 0.56617909 row2 0.03191982 row3 0.71759508 row4 1.68621103 row5 -1.58079689 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -0.2719990 1.8375097 0.1871419 -0.07252006 -0.5761689 -1.915576 row5 -0.6844711 0.9184235 -0.2716007 -0.30379036 -0.0983985 -1.186250 col7 col8 col9 col10 col11 col12 col13 row1 0.7034023 1.336635 -0.4784231 0.5661791 1.0002447 -1.337266 0.100466 row5 -0.9412547 1.080572 -1.0195631 -1.5807969 0.5229275 -2.320877 -1.365918 col14 col15 col16 col17 col18 col19 col20 row1 1.6236541 0.7222578 -1.597578 0.2481085 1.3807642 -0.1543093 1.084624 row5 0.2591514 0.4934986 0.424135 -0.9995451 0.1973945 -0.5447175 1.102980 > tmp[,c("col6","col20")] col6 col20 row1 -1.9155757 1.0846243 row2 -0.2595834 0.5726342 row3 -1.5093014 0.3671150 row4 0.8349610 -1.6101951 row5 -1.1862498 1.1029797 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.915576 1.084624 row5 -1.186250 1.102980 > > > > > 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 48.10068 50.94239 50.30777 50.49161 49.78562 104.5447 50.63794 50.06215 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.20981 51.21073 49.79486 49.26808 49.10775 50.74364 49.44501 49.57954 col17 col18 col19 col20 row1 51.12687 50.68646 51.20249 104.1737 > tmp[,"col10"] col10 row1 51.21073 row2 32.18101 row3 30.00238 row4 28.60047 row5 50.72133 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 48.10068 50.94239 50.30777 50.49161 49.78562 104.5447 50.63794 50.06215 row5 50.94032 50.82423 50.73919 51.32049 51.48745 104.1253 50.47871 51.15346 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.20981 51.21073 49.79486 49.26808 49.10775 50.74364 49.44501 49.57954 row5 48.93308 50.72133 50.74471 51.63396 51.79909 50.36088 50.28831 48.59502 col17 col18 col19 col20 row1 51.12687 50.68646 51.20249 104.1737 row5 49.94676 50.59349 48.96082 104.5118 > tmp[,c("col6","col20")] col6 col20 row1 104.54471 104.17366 row2 75.71247 74.19595 row3 75.38797 75.22600 row4 74.49164 74.61590 row5 104.12527 104.51184 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.5447 104.1737 row5 104.1253 104.5118 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.5447 104.1737 row5 104.1253 104.5118 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.4817247 [2,] -0.7169241 [3,] 0.1158945 [4,] 1.1786875 [5,] 0.8657594 > tmp[,c("col17","col7")] col17 col7 [1,] -0.04712513 0.22549778 [2,] -0.27076094 -0.71407169 [3,] -0.13840687 0.01207812 [4,] -2.46255158 -1.32279363 [5,] -0.09653401 1.48797753 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.6066193 -1.4389115 [2,] -1.7587332 -0.5383647 [3,] 0.8282928 1.1260147 [4,] 0.7423792 -0.6466440 [5,] -1.6854108 1.4780472 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.6066193 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.6066193 [2,] -1.7587332 > > > > 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.5390591 1.3892606 0.5298021 -0.05704755 -0.2103104 0.5368080 row1 -0.9850864 -0.2422609 -0.5223963 -0.29014184 0.4671415 -0.5450529 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 0.1196960 1.110557 0.04499211 0.2870999 -2.1463050 1.060978 0.7644989 row1 0.9723276 -1.083835 1.70107094 -1.1671984 -0.2996484 -1.064139 -0.4243573 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 1.5647473 0.7279107 -0.2376230 -0.8382043 -1.959844 0.4843118 1.3117731 row1 0.1369843 -0.2485320 0.8872633 1.4300202 -0.373529 -0.8183141 0.6356996 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.2968485 0.4589965 -0.02869562 0.5006295 0.5599 0.3393799 0.1281122 [,8] [,9] [,10] row2 -1.213469 -0.690289 0.1157335 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -1.364293 -0.06432233 -1.568778 0.5210967 0.3017092 -0.1148236 -1.089536 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.9463265 -0.3499173 -1.142863 0.9510244 0.2223914 -1.115326 0.2180306 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.5046038 -0.05503176 -0.2647715 -0.2217711 -0.966274 0.8834886 > > > 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: 0x6000014ac060> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a5346785dc" [2] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a578854964" [3] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a57695820c" [4] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a5518d1ea6" [5] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a57d74e1e" [6] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a548499797" [7] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a5577f5f94" [8] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a56b5c1a6c" [9] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a56bcadf84" [10] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a554188a65" [11] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a517261805" [12] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a545f2fc22" [13] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a55387400e" [14] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a5547e81f9" [15] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM92a53d872dc5" > > > ### 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: 0x600001440120> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600001440120> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600001440120> > rowMedians(tmp) [1] 0.395887835 0.087216643 -0.363134253 0.499431473 -0.264986156 [6] -0.332004898 0.247148651 0.192050624 -0.106957453 0.582363795 [11] -0.138101848 0.796370756 -0.007714322 0.001302642 0.170303253 [16] -0.028180430 0.181421742 -0.232853858 0.146041197 -0.072769271 [21] -0.274464327 0.076645848 0.107888766 -0.031694930 -0.155023760 [26] -0.045688517 -0.100126154 0.272991458 -0.046261609 -0.117126793 [31] -0.521701142 0.465987055 0.558089408 0.402224917 0.170236962 [36] 0.141928608 0.026781510 -0.140907724 0.099749060 -0.884848985 [41] -0.176955236 0.047507287 0.205412493 -0.366130592 0.156034094 [46] 0.350572758 -0.069681499 0.046504103 -0.232545268 -0.230844585 [51] 0.396083300 -0.439369267 -0.214314322 0.044664815 -0.036354574 [56] -0.410061265 -0.108630028 -1.106263114 -0.200476688 -0.171180594 [61] -0.286065812 0.130888322 -0.245179411 -0.049679783 0.539756956 [66] -0.609732589 -0.645852109 0.168481253 -0.319460581 0.225587055 [71] -0.252895047 0.097635954 0.310074111 -0.160273723 0.279391719 [76] 0.325045449 -0.661775361 -0.128760051 -0.203863756 -0.001605704 [81] -0.050948627 0.426000793 0.067984555 0.072222344 0.015778275 [86] 0.170920541 0.224743063 0.039064268 0.187071802 -0.227694488 [91] -0.240029446 0.164074932 0.071267131 -0.142390367 -0.102125471 [96] 0.116084674 -0.583154643 0.382243091 -0.012854710 0.212620738 [101] -0.104868594 -0.001334872 -0.051813024 0.093804080 0.190045844 [106] -0.430138202 -0.129473094 0.419012697 0.053821948 0.400394889 [111] -0.143528988 -0.115501840 0.014081497 -0.070354247 0.044057957 [116] -0.248396751 -0.179488266 -0.210258381 -0.136377347 -0.156923757 [121] 0.237653277 0.453570328 0.102038770 0.212997244 -0.094646659 [126] -0.501668252 0.675355370 0.382879343 -0.324216343 -0.511563163 [131] 0.432346290 -0.026144202 0.128515990 0.039940579 -0.289588824 [136] -0.244482805 -0.084889106 -0.015113343 0.493036932 -0.193558566 [141] -0.261948104 -0.422693040 -0.035072884 -0.263286238 -0.502540663 [146] -0.028232316 0.208760070 0.363903889 0.257784554 -0.055668050 [151] 0.453827527 0.073808732 0.130559699 0.326719622 -0.184594932 [156] -0.078767381 0.087594881 0.026651985 -0.598186711 0.079993554 [161] 0.180122831 0.495451457 0.363896559 0.024910412 0.019767186 [166] 0.072164161 0.661317318 -0.076918002 0.026253759 -0.443703128 [171] 0.179374866 -0.196487230 0.084765372 0.130075993 0.539305227 [176] -0.174253050 -0.164264930 -0.568689161 -0.043635520 -0.026751714 [181] 0.221585178 -0.401428940 0.368820958 -0.307610047 0.091104333 [186] -0.429606096 -0.378861634 0.185484105 -0.728844034 -0.055887448 [191] 0.048986974 0.362121025 0.361142791 -0.392179965 0.109784633 [196] -0.024759474 -0.131739036 0.388659552 -0.189416213 -0.217101310 [201] -0.365012617 -0.069553334 -0.391730902 0.607271984 0.738831190 [206] 0.583732531 -0.346875499 -0.025140631 0.020062891 0.231214350 [211] -0.435296994 -0.509922525 0.272810798 -0.101381926 -0.061411188 [216] 0.252270641 -0.480581980 0.193536465 0.402830469 -0.405642824 [221] -0.253458943 -0.339090804 0.280956135 -0.462893364 0.160464593 [226] -0.079636951 -0.406756248 0.114778814 0.146848331 -0.532783463 > > proc.time() user system elapsed 2.858 16.976 75.036
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: 0x600003dbc300> > .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: 0x600003dbc300> > .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: 0x600003dbc300> > .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: 0x600003dbc300> > 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: 0x600003de0000> > .Call("R_bm_AddColumn",P) <pointer: 0x600003de0000> > .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: 0x600003de0000> > .Call("R_bm_AddColumn",P) <pointer: 0x600003de0000> > .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: 0x600003de0000> > 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: 0x600003de0180> > .Call("R_bm_AddColumn",P) <pointer: 0x600003de0180> > .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: 0x600003de0180> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600003de0180> > .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: 0x600003de0180> > > .Call("R_bm_RowMode",P) <pointer: 0x600003de0180> > .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: 0x600003de0180> > > .Call("R_bm_ColMode",P) <pointer: 0x600003de0180> > .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: 0x600003de0180> > 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: 0x600003db8180> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600003db8180> > .Call("R_bm_AddColumn",P) <pointer: 0x600003db8180> > .Call("R_bm_AddColumn",P) <pointer: 0x600003db8180> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilea5dc43a4948c" "BufferedMatrixFilea5dc6b1b271b" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilea5dc43a4948c" "BufferedMatrixFilea5dc6b1b271b" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600003db83c0> > .Call("R_bm_AddColumn",P) <pointer: 0x600003db83c0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600003db83c0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600003db83c0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600003db83c0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600003db83c0> > .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: 0x600003de4000> > .Call("R_bm_AddColumn",P) <pointer: 0x600003de4000> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600003de4000> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600003de4000> > 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: 0x600003de4180> > .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: 0x600003de4180> > rm(P) > > proc.time() user system elapsed 0.304 0.146 0.436
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.360 0.104 0.472