Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-09-04 12:05 -0400 (Thu, 04 Sep 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4822 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4617 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4564 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4541 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 252/2321 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.73.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.7 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
taishan | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.73.0 |
Command: /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz |
StartedAt: 2025-09-03 19:34:12 -0400 (Wed, 03 Sep 2025) |
EndedAt: 2025-09-03 19:35:01 -0400 (Wed, 03 Sep 2025) |
EllapsedTime: 48.3 seconds |
RetCode: 0 |
Status: WARNINGS |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 1 |
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.5.1 (2025-06-13) * using platform: x86_64-apple-darwin20 * R was compiled by Apple clang version 14.0.0 (clang-1400.0.29.202) GNU Fortran (GCC) 14.2.0 * running under: macOS Monterey 12.7.6 * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.73.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... WARNING Found the following significant warnings: doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] See ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking sizes of PDF files under ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.73.0’ ** using staged installation ** libs using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R installing to /Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.5.1 (2025-06-13) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.323 0.142 0.478
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.1 (2025-06-13) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells 480847 25.7 1056617 56.5 NA 634462 33.9 Vcells 891074 6.8 8388608 64.0 98304 2108713 16.1 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Wed Sep 3 19:34:36 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] "Wed Sep 3 19:34:36 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: 0x600002404060> > > > > 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] "Wed Sep 3 19:34:40 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Wed Sep 3 19:34:42 2025" > > ColMode(tmp2) <pointer: 0x600002404060> > > > > ### 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,] 101.9526206 -0.2721567 -0.5457187 0.7310229 [2,] -0.7244721 0.8181250 0.5267739 0.5374444 [3,] -0.1389711 1.1042449 -1.5604938 -0.8382285 [4,] 0.9971459 1.0595777 0.6333137 1.0676647 > 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 : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 101.9526206 0.2721567 0.5457187 0.7310229 [2,] 0.7244721 0.8181250 0.5267739 0.5374444 [3,] 0.1389711 1.1042449 1.5604938 0.8382285 [4,] 0.9971459 1.0595777 0.6333137 1.0676647 > 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 : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 10.0971590 0.5216864 0.7387278 0.8549988 [2,] 0.8511593 0.9045026 0.7257919 0.7331060 [3,] 0.3727883 1.0508306 1.2491972 0.9155482 [4,] 0.9985720 1.0293579 0.7958101 1.0332786 > > 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 : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 227.92421 30.48902 32.93300 34.28101 [2,] 34.23606 34.86315 32.78469 32.86850 [3,] 28.86685 36.61255 39.05247 34.99371 [4,] 35.98287 36.35316 33.59141 36.40045 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600002460060> > exp(tmp5) <pointer: 0x600002460060> > log(tmp5,2) <pointer: 0x600002460060> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 474.3944 > Min(tmp5) [1] 53.05789 > mean(tmp5) [1] 72.6975 > Sum(tmp5) [1] 14539.5 > Var(tmp5) [1] 874.3923 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 92.66411 68.81324 71.09683 73.40600 71.53669 73.25510 70.05642 68.57714 [9] 69.05074 68.51876 > rowSums(tmp5) [1] 1853.282 1376.265 1421.937 1468.120 1430.734 1465.102 1401.128 1371.543 [9] 1381.015 1370.375 > rowVars(tmp5) [1] 8119.29921 31.84066 91.78199 66.05345 69.43910 55.35638 [7] 59.00268 61.41812 59.71384 46.10951 > rowSd(tmp5) [1] 90.107154 5.642753 9.580292 8.127328 8.333013 7.440187 7.681320 [8] 7.836972 7.727473 6.790399 > rowMax(tmp5) [1] 474.39438 77.04442 90.94590 87.34064 89.97230 85.78532 84.52878 [8] 91.08992 87.88715 84.42775 > rowMin(tmp5) [1] 63.45890 56.90022 54.57581 57.05013 62.52709 58.77448 56.89882 53.05789 [9] 54.71078 57.16290 > > colMeans(tmp5) [1] 109.80583 69.04462 71.00937 70.68061 71.68452 71.28098 71.64409 [8] 68.95641 67.58147 73.02318 73.58449 69.34757 73.00785 69.32133 [15] 72.30287 72.64308 67.96401 75.62863 66.74195 68.69722 > colSums(tmp5) [1] 1098.0583 690.4462 710.0937 706.8061 716.8452 712.8098 716.4409 [8] 689.5641 675.8147 730.2318 735.8449 693.4757 730.0785 693.2133 [15] 723.0287 726.4308 679.6401 756.2863 667.4195 686.9722 > colVars(tmp5) [1] 16432.08790 61.23745 31.23759 57.35465 28.57574 95.38283 [7] 38.54113 83.91198 74.33189 109.33443 55.65291 22.95746 [13] 68.22921 56.81846 61.52518 48.72497 67.26971 72.93698 [19] 27.35620 120.49822 > colSd(tmp5) [1] 128.187706 7.825436 5.589060 7.573285 5.345628 9.766413 [7] 6.208150 9.160348 8.621594 10.456310 7.460088 4.791395 [13] 8.260098 7.537802 7.843799 6.980328 8.201811 8.540315 [19] 5.230315 10.977168 > colMax(tmp5) [1] 474.39438 84.42775 81.28259 84.52878 82.31986 85.78532 83.29545 [8] 84.52362 79.60731 89.97230 88.45567 77.63346 82.58328 81.70814 [15] 80.68292 82.28633 86.11047 91.08992 75.66933 90.94590 > colMin(tmp5) [1] 60.08257 59.33948 63.73910 61.51724 65.22317 60.10129 64.25832 54.71078 [9] 54.57581 59.51368 64.65763 62.64697 57.05013 57.57490 56.90022 60.65295 [17] 60.75965 67.88358 57.16290 53.05789 > > > ### 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] 92.66411 68.81324 71.09683 NA 71.53669 73.25510 70.05642 68.57714 [9] 69.05074 68.51876 > rowSums(tmp5) [1] 1853.282 1376.265 1421.937 NA 1430.734 1465.102 1401.128 1371.543 [9] 1381.015 1370.375 > rowVars(tmp5) [1] 8119.29921 31.84066 91.78199 69.01086 69.43910 55.35638 [7] 59.00268 61.41812 59.71384 46.10951 > rowSd(tmp5) [1] 90.107154 5.642753 9.580292 8.307277 8.333013 7.440187 7.681320 [8] 7.836972 7.727473 6.790399 > rowMax(tmp5) [1] 474.39438 77.04442 90.94590 NA 89.97230 85.78532 84.52878 [8] 91.08992 87.88715 84.42775 > rowMin(tmp5) [1] 63.45890 56.90022 54.57581 NA 62.52709 58.77448 56.89882 53.05789 [9] 54.71078 57.16290 > > colMeans(tmp5) [1] 109.80583 69.04462 NA 70.68061 71.68452 71.28098 71.64409 [8] 68.95641 67.58147 73.02318 73.58449 69.34757 73.00785 69.32133 [15] 72.30287 72.64308 67.96401 75.62863 66.74195 68.69722 > colSums(tmp5) [1] 1098.0583 690.4462 NA 706.8061 716.8452 712.8098 716.4409 [8] 689.5641 675.8147 730.2318 735.8449 693.4757 730.0785 693.2133 [15] 723.0287 726.4308 679.6401 756.2863 667.4195 686.9722 > colVars(tmp5) [1] 16432.08790 61.23745 NA 57.35465 28.57574 95.38283 [7] 38.54113 83.91198 74.33189 109.33443 55.65291 22.95746 [13] 68.22921 56.81846 61.52518 48.72497 67.26971 72.93698 [19] 27.35620 120.49822 > colSd(tmp5) [1] 128.187706 7.825436 NA 7.573285 5.345628 9.766413 [7] 6.208150 9.160348 8.621594 10.456310 7.460088 4.791395 [13] 8.260098 7.537802 7.843799 6.980328 8.201811 8.540315 [19] 5.230315 10.977168 > colMax(tmp5) [1] 474.39438 84.42775 NA 84.52878 82.31986 85.78532 83.29545 [8] 84.52362 79.60731 89.97230 88.45567 77.63346 82.58328 81.70814 [15] 80.68292 82.28633 86.11047 91.08992 75.66933 90.94590 > colMin(tmp5) [1] 60.08257 59.33948 NA 61.51724 65.22317 60.10129 64.25832 54.71078 [9] 54.57581 59.51368 64.65763 62.64697 57.05013 57.57490 56.90022 60.65295 [17] 60.75965 67.88358 57.16290 53.05789 > > Max(tmp5,na.rm=TRUE) [1] 474.3944 > Min(tmp5,na.rm=TRUE) [1] 53.05789 > mean(tmp5,na.rm=TRUE) [1] 72.71148 > Sum(tmp5,na.rm=TRUE) [1] 14469.58 > Var(tmp5,na.rm=TRUE) [1] 878.7691 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.66411 68.81324 71.09683 73.58968 71.53669 73.25510 70.05642 68.57714 [9] 69.05074 68.51876 > rowSums(tmp5,na.rm=TRUE) [1] 1853.282 1376.265 1421.937 1398.204 1430.734 1465.102 1401.128 1371.543 [9] 1381.015 1370.375 > rowVars(tmp5,na.rm=TRUE) [1] 8119.29921 31.84066 91.78199 69.01086 69.43910 55.35638 [7] 59.00268 61.41812 59.71384 46.10951 > rowSd(tmp5,na.rm=TRUE) [1] 90.107154 5.642753 9.580292 8.307277 8.333013 7.440187 7.681320 [8] 7.836972 7.727473 6.790399 > rowMax(tmp5,na.rm=TRUE) [1] 474.39438 77.04442 90.94590 87.34064 89.97230 85.78532 84.52878 [8] 91.08992 87.88715 84.42775 > rowMin(tmp5,na.rm=TRUE) [1] 63.45890 56.90022 54.57581 57.05013 62.52709 58.77448 56.89882 53.05789 [9] 54.71078 57.16290 > > colMeans(tmp5,na.rm=TRUE) [1] 109.80583 69.04462 71.13084 70.68061 71.68452 71.28098 71.64409 [8] 68.95641 67.58147 73.02318 73.58449 69.34757 73.00785 69.32133 [15] 72.30287 72.64308 67.96401 75.62863 66.74195 68.69722 > colSums(tmp5,na.rm=TRUE) [1] 1098.0583 690.4462 640.1776 706.8061 716.8452 712.8098 716.4409 [8] 689.5641 675.8147 730.2318 735.8449 693.4757 730.0785 693.2133 [15] 723.0287 726.4308 679.6401 756.2863 667.4195 686.9722 > colVars(tmp5,na.rm=TRUE) [1] 16432.08790 61.23745 34.97629 57.35465 28.57574 95.38283 [7] 38.54113 83.91198 74.33189 109.33443 55.65291 22.95746 [13] 68.22921 56.81846 61.52518 48.72497 67.26971 72.93698 [19] 27.35620 120.49822 > colSd(tmp5,na.rm=TRUE) [1] 128.187706 7.825436 5.914076 7.573285 5.345628 9.766413 [7] 6.208150 9.160348 8.621594 10.456310 7.460088 4.791395 [13] 8.260098 7.537802 7.843799 6.980328 8.201811 8.540315 [19] 5.230315 10.977168 > colMax(tmp5,na.rm=TRUE) [1] 474.39438 84.42775 81.28259 84.52878 82.31986 85.78532 83.29545 [8] 84.52362 79.60731 89.97230 88.45567 77.63346 82.58328 81.70814 [15] 80.68292 82.28633 86.11047 91.08992 75.66933 90.94590 > colMin(tmp5,na.rm=TRUE) [1] 60.08257 59.33948 63.73910 61.51724 65.22317 60.10129 64.25832 54.71078 [9] 54.57581 59.51368 64.65763 62.64697 57.05013 57.57490 56.90022 60.65295 [17] 60.75965 67.88358 57.16290 53.05789 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 92.66411 68.81324 71.09683 NaN 71.53669 73.25510 70.05642 68.57714 [9] 69.05074 68.51876 > rowSums(tmp5,na.rm=TRUE) [1] 1853.282 1376.265 1421.937 0.000 1430.734 1465.102 1401.128 1371.543 [9] 1381.015 1370.375 > rowVars(tmp5,na.rm=TRUE) [1] 8119.29921 31.84066 91.78199 NA 69.43910 55.35638 [7] 59.00268 61.41812 59.71384 46.10951 > rowSd(tmp5,na.rm=TRUE) [1] 90.107154 5.642753 9.580292 NA 8.333013 7.440187 7.681320 [8] 7.836972 7.727473 6.790399 > rowMax(tmp5,na.rm=TRUE) [1] 474.39438 77.04442 90.94590 NA 89.97230 85.78532 84.52878 [8] 91.08992 87.88715 84.42775 > rowMin(tmp5,na.rm=TRUE) [1] 63.45890 56.90022 54.57581 NA 62.52709 58.77448 56.89882 53.05789 [9] 54.71078 57.16290 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 113.68497 68.30909 NaN 70.11593 72.39558 69.98796 72.46473 [8] 67.22672 66.51680 73.86420 74.39906 68.42691 74.78093 68.47684 [15] 72.08269 73.02831 65.94773 74.32730 66.89087 68.31818 > colSums(tmp5,na.rm=TRUE) [1] 1023.1647 614.7818 0.0000 631.0433 651.5603 629.8916 652.1826 [8] 605.0405 598.6512 664.7778 669.5915 615.8422 673.0283 616.2916 [15] 648.7442 657.2548 593.5296 668.9457 602.0179 614.8636 > colVars(tmp5,na.rm=TRUE) [1] 18316.81241 62.80594 NA 60.93671 26.45959 88.49680 [7] 35.78243 60.74295 70.87127 115.04388 55.14493 16.29158 [13] 41.38998 55.89770 68.67040 53.14606 29.94310 63.00255 [19] 30.52622 133.94415 > colSd(tmp5,na.rm=TRUE) [1] 135.339619 7.925020 NA 7.806197 5.143889 9.407274 [7] 5.981842 7.793776 8.418507 10.725851 7.425963 4.036283 [13] 6.433504 7.476477 8.286761 7.290134 5.472029 7.937415 [19] 5.525054 11.573424 > colMax(tmp5,na.rm=TRUE) [1] 474.39438 84.42775 -Inf 84.52878 82.31986 85.78532 83.29545 [8] 76.09838 79.60731 89.97230 88.45567 74.17827 82.58328 81.70814 [15] 80.68292 82.28633 78.98416 91.08992 75.66933 90.94590 > colMin(tmp5,na.rm=TRUE) [1] 60.08257 59.33948 Inf 61.51724 65.22317 60.10129 64.58618 54.71078 [9] 54.57581 59.51368 64.65763 62.64697 65.15326 57.57490 56.90022 60.65295 [17] 60.75965 67.88358 57.16290 53.05789 > > > > > 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] 235.0863 204.6517 303.0753 103.9708 216.7571 217.7475 329.8975 204.6624 [9] 215.1711 266.5125 > apply(copymatrix,1,var,na.rm=TRUE) [1] 235.0863 204.6517 303.0753 103.9708 216.7571 217.7475 329.8975 204.6624 [9] 215.1711 266.5125 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] -1.421085e-13 1.705303e-13 1.136868e-13 -1.136868e-13 -4.263256e-14 [6] 2.842171e-14 5.684342e-14 2.842171e-14 -2.557954e-13 -1.421085e-14 [11] 2.842171e-14 9.947598e-14 0.000000e+00 -5.684342e-14 0.000000e+00 [16] 8.526513e-14 -1.705303e-13 5.684342e-14 -1.421085e-13 0.000000e+00 > > > > > > > > > > > ## 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) + } 6 17 1 9 9 8 1 16 9 5 1 20 4 7 5 14 3 2 2 9 9 8 10 16 3 2 9 6 5 2 6 14 7 13 3 11 9 18 10 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.591877 > Min(tmp) [1] -2.385943 > mean(tmp) [1] -0.0378411 > Sum(tmp) [1] -3.78411 > Var(tmp) [1] 1.065146 > > rowMeans(tmp) [1] -0.0378411 > rowSums(tmp) [1] -3.78411 > rowVars(tmp) [1] 1.065146 > rowSd(tmp) [1] 1.032059 > rowMax(tmp) [1] 2.591877 > rowMin(tmp) [1] -2.385943 > > colMeans(tmp) [1] -1.861424126 -1.348970114 0.337309230 -0.131984551 1.252937721 [6] 2.591876708 2.044594276 -0.737330177 0.712599085 -0.385250473 [11] 0.844008027 -1.703971101 -0.328319248 -0.439543702 0.583267761 [16] 0.082937723 -1.573586036 -0.785955863 -0.915159394 -0.668672441 [21] 1.278658184 -0.791644743 1.617380395 0.450761544 0.384056522 [26] -1.726835394 1.167581375 -2.385942819 0.070435121 -0.670767448 [31] 1.477892308 -1.299761785 -1.603969234 -1.169262535 -0.766863253 [36] -1.189554058 0.420448842 0.003185129 -1.320837172 0.404089731 [41] 1.164494451 0.045523681 2.258048965 0.440583980 -0.394305393 [46] 0.353189316 0.358155653 0.475289496 -1.005173383 1.554363087 [51] -1.394977071 -0.675567188 0.683892523 0.393702446 0.609319033 [56] -1.018841798 -1.497016688 -0.784167735 -1.370943186 -0.806313973 [61] 0.521070806 -1.080245234 0.107525558 0.366511575 -0.034171593 [66] -1.100827562 1.838595578 -0.187943374 -0.206259166 -1.192067429 [71] -0.247163194 0.703820701 -0.981635074 -0.645389850 -0.112579934 [76] -0.112348253 1.434831801 0.316448222 0.989344724 1.273338615 [81] 0.597673449 -0.875168770 -0.704593511 0.628815806 -1.092933725 [86] -0.683000993 -0.019521058 -0.438456957 1.177196155 -1.273342036 [91] 0.225528026 2.010597088 0.838380316 0.468276734 0.475653691 [96] -0.815402507 0.853611481 0.452411273 0.180028599 1.251609468 > colSums(tmp) [1] -1.861424126 -1.348970114 0.337309230 -0.131984551 1.252937721 [6] 2.591876708 2.044594276 -0.737330177 0.712599085 -0.385250473 [11] 0.844008027 -1.703971101 -0.328319248 -0.439543702 0.583267761 [16] 0.082937723 -1.573586036 -0.785955863 -0.915159394 -0.668672441 [21] 1.278658184 -0.791644743 1.617380395 0.450761544 0.384056522 [26] -1.726835394 1.167581375 -2.385942819 0.070435121 -0.670767448 [31] 1.477892308 -1.299761785 -1.603969234 -1.169262535 -0.766863253 [36] -1.189554058 0.420448842 0.003185129 -1.320837172 0.404089731 [41] 1.164494451 0.045523681 2.258048965 0.440583980 -0.394305393 [46] 0.353189316 0.358155653 0.475289496 -1.005173383 1.554363087 [51] -1.394977071 -0.675567188 0.683892523 0.393702446 0.609319033 [56] -1.018841798 -1.497016688 -0.784167735 -1.370943186 -0.806313973 [61] 0.521070806 -1.080245234 0.107525558 0.366511575 -0.034171593 [66] -1.100827562 1.838595578 -0.187943374 -0.206259166 -1.192067429 [71] -0.247163194 0.703820701 -0.981635074 -0.645389850 -0.112579934 [76] -0.112348253 1.434831801 0.316448222 0.989344724 1.273338615 [81] 0.597673449 -0.875168770 -0.704593511 0.628815806 -1.092933725 [86] -0.683000993 -0.019521058 -0.438456957 1.177196155 -1.273342036 [91] 0.225528026 2.010597088 0.838380316 0.468276734 0.475653691 [96] -0.815402507 0.853611481 0.452411273 0.180028599 1.251609468 > 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.861424126 -1.348970114 0.337309230 -0.131984551 1.252937721 [6] 2.591876708 2.044594276 -0.737330177 0.712599085 -0.385250473 [11] 0.844008027 -1.703971101 -0.328319248 -0.439543702 0.583267761 [16] 0.082937723 -1.573586036 -0.785955863 -0.915159394 -0.668672441 [21] 1.278658184 -0.791644743 1.617380395 0.450761544 0.384056522 [26] -1.726835394 1.167581375 -2.385942819 0.070435121 -0.670767448 [31] 1.477892308 -1.299761785 -1.603969234 -1.169262535 -0.766863253 [36] -1.189554058 0.420448842 0.003185129 -1.320837172 0.404089731 [41] 1.164494451 0.045523681 2.258048965 0.440583980 -0.394305393 [46] 0.353189316 0.358155653 0.475289496 -1.005173383 1.554363087 [51] -1.394977071 -0.675567188 0.683892523 0.393702446 0.609319033 [56] -1.018841798 -1.497016688 -0.784167735 -1.370943186 -0.806313973 [61] 0.521070806 -1.080245234 0.107525558 0.366511575 -0.034171593 [66] -1.100827562 1.838595578 -0.187943374 -0.206259166 -1.192067429 [71] -0.247163194 0.703820701 -0.981635074 -0.645389850 -0.112579934 [76] -0.112348253 1.434831801 0.316448222 0.989344724 1.273338615 [81] 0.597673449 -0.875168770 -0.704593511 0.628815806 -1.092933725 [86] -0.683000993 -0.019521058 -0.438456957 1.177196155 -1.273342036 [91] 0.225528026 2.010597088 0.838380316 0.468276734 0.475653691 [96] -0.815402507 0.853611481 0.452411273 0.180028599 1.251609468 > colMin(tmp) [1] -1.861424126 -1.348970114 0.337309230 -0.131984551 1.252937721 [6] 2.591876708 2.044594276 -0.737330177 0.712599085 -0.385250473 [11] 0.844008027 -1.703971101 -0.328319248 -0.439543702 0.583267761 [16] 0.082937723 -1.573586036 -0.785955863 -0.915159394 -0.668672441 [21] 1.278658184 -0.791644743 1.617380395 0.450761544 0.384056522 [26] -1.726835394 1.167581375 -2.385942819 0.070435121 -0.670767448 [31] 1.477892308 -1.299761785 -1.603969234 -1.169262535 -0.766863253 [36] -1.189554058 0.420448842 0.003185129 -1.320837172 0.404089731 [41] 1.164494451 0.045523681 2.258048965 0.440583980 -0.394305393 [46] 0.353189316 0.358155653 0.475289496 -1.005173383 1.554363087 [51] -1.394977071 -0.675567188 0.683892523 0.393702446 0.609319033 [56] -1.018841798 -1.497016688 -0.784167735 -1.370943186 -0.806313973 [61] 0.521070806 -1.080245234 0.107525558 0.366511575 -0.034171593 [66] -1.100827562 1.838595578 -0.187943374 -0.206259166 -1.192067429 [71] -0.247163194 0.703820701 -0.981635074 -0.645389850 -0.112579934 [76] -0.112348253 1.434831801 0.316448222 0.989344724 1.273338615 [81] 0.597673449 -0.875168770 -0.704593511 0.628815806 -1.092933725 [86] -0.683000993 -0.019521058 -0.438456957 1.177196155 -1.273342036 [91] 0.225528026 2.010597088 0.838380316 0.468276734 0.475653691 [96] -0.815402507 0.853611481 0.452411273 0.180028599 1.251609468 > colMedians(tmp) [1] -1.861424126 -1.348970114 0.337309230 -0.131984551 1.252937721 [6] 2.591876708 2.044594276 -0.737330177 0.712599085 -0.385250473 [11] 0.844008027 -1.703971101 -0.328319248 -0.439543702 0.583267761 [16] 0.082937723 -1.573586036 -0.785955863 -0.915159394 -0.668672441 [21] 1.278658184 -0.791644743 1.617380395 0.450761544 0.384056522 [26] -1.726835394 1.167581375 -2.385942819 0.070435121 -0.670767448 [31] 1.477892308 -1.299761785 -1.603969234 -1.169262535 -0.766863253 [36] -1.189554058 0.420448842 0.003185129 -1.320837172 0.404089731 [41] 1.164494451 0.045523681 2.258048965 0.440583980 -0.394305393 [46] 0.353189316 0.358155653 0.475289496 -1.005173383 1.554363087 [51] -1.394977071 -0.675567188 0.683892523 0.393702446 0.609319033 [56] -1.018841798 -1.497016688 -0.784167735 -1.370943186 -0.806313973 [61] 0.521070806 -1.080245234 0.107525558 0.366511575 -0.034171593 [66] -1.100827562 1.838595578 -0.187943374 -0.206259166 -1.192067429 [71] -0.247163194 0.703820701 -0.981635074 -0.645389850 -0.112579934 [76] -0.112348253 1.434831801 0.316448222 0.989344724 1.273338615 [81] 0.597673449 -0.875168770 -0.704593511 0.628815806 -1.092933725 [86] -0.683000993 -0.019521058 -0.438456957 1.177196155 -1.273342036 [91] 0.225528026 2.010597088 0.838380316 0.468276734 0.475653691 [96] -0.815402507 0.853611481 0.452411273 0.180028599 1.251609468 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.861424 -1.34897 0.3373092 -0.1319846 1.252938 2.591877 2.044594 [2,] -1.861424 -1.34897 0.3373092 -0.1319846 1.252938 2.591877 2.044594 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.7373302 0.7125991 -0.3852505 0.844008 -1.703971 -0.3283192 -0.4395437 [2,] -0.7373302 0.7125991 -0.3852505 0.844008 -1.703971 -0.3283192 -0.4395437 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.5832678 0.08293772 -1.573586 -0.7859559 -0.9151594 -0.6686724 1.278658 [2,] 0.5832678 0.08293772 -1.573586 -0.7859559 -0.9151594 -0.6686724 1.278658 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.7916447 1.61738 0.4507615 0.3840565 -1.726835 1.167581 -2.385943 [2,] -0.7916447 1.61738 0.4507615 0.3840565 -1.726835 1.167581 -2.385943 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.07043512 -0.6707674 1.477892 -1.299762 -1.603969 -1.169263 -0.7668633 [2,] 0.07043512 -0.6707674 1.477892 -1.299762 -1.603969 -1.169263 -0.7668633 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.189554 0.4204488 0.003185129 -1.320837 0.4040897 1.164494 0.04552368 [2,] -1.189554 0.4204488 0.003185129 -1.320837 0.4040897 1.164494 0.04552368 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 2.258049 0.440584 -0.3943054 0.3531893 0.3581557 0.4752895 -1.005173 [2,] 2.258049 0.440584 -0.3943054 0.3531893 0.3581557 0.4752895 -1.005173 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.554363 -1.394977 -0.6755672 0.6838925 0.3937024 0.609319 -1.018842 [2,] 1.554363 -1.394977 -0.6755672 0.6838925 0.3937024 0.609319 -1.018842 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.497017 -0.7841677 -1.370943 -0.806314 0.5210708 -1.080245 0.1075256 [2,] -1.497017 -0.7841677 -1.370943 -0.806314 0.5210708 -1.080245 0.1075256 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.3665116 -0.03417159 -1.100828 1.838596 -0.1879434 -0.2062592 -1.192067 [2,] 0.3665116 -0.03417159 -1.100828 1.838596 -0.1879434 -0.2062592 -1.192067 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.2471632 0.7038207 -0.9816351 -0.6453899 -0.1125799 -0.1123483 1.434832 [2,] -0.2471632 0.7038207 -0.9816351 -0.6453899 -0.1125799 -0.1123483 1.434832 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.3164482 0.9893447 1.273339 0.5976734 -0.8751688 -0.7045935 0.6288158 [2,] 0.3164482 0.9893447 1.273339 0.5976734 -0.8751688 -0.7045935 0.6288158 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -1.092934 -0.683001 -0.01952106 -0.438457 1.177196 -1.273342 0.225528 [2,] -1.092934 -0.683001 -0.01952106 -0.438457 1.177196 -1.273342 0.225528 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 2.010597 0.8383803 0.4682767 0.4756537 -0.8154025 0.8536115 0.4524113 [2,] 2.010597 0.8383803 0.4682767 0.4756537 -0.8154025 0.8536115 0.4524113 [,99] [,100] [1,] 0.1800286 1.251609 [2,] 0.1800286 1.251609 > > > Max(tmp2) [1] 2.620584 > Min(tmp2) [1] -2.562306 > mean(tmp2) [1] 0.06115067 > Sum(tmp2) [1] 6.115067 > Var(tmp2) [1] 1.342691 > > rowMeans(tmp2) [1] 1.09006772 0.40114914 1.69876687 -0.11880733 -1.32504899 -0.46636794 [7] -1.09969647 -0.16962679 -1.54359416 -2.53055570 0.61879384 0.64067080 [13] 0.46088118 0.09844985 -1.67941723 1.49546821 1.26933515 0.56459809 [19] -1.46216411 -0.40706037 1.31279285 -0.92217961 0.32375358 0.49606940 [25] 0.97196916 0.28712507 2.25698983 1.22169892 -0.31605770 0.54189787 [31] -1.32404827 -0.82202471 2.62058400 1.85628570 -0.40613486 -0.59607232 [37] -2.55176281 0.36234707 -0.89451465 -0.28893928 -0.59009017 -0.25080524 [43] 0.38870848 -0.81463918 -0.04971012 -0.76176881 0.55305892 1.26627776 [49] 0.32536111 2.35552766 0.43717630 2.60846789 0.05163514 0.50784249 [55] 0.35781620 -0.08147415 -1.62480921 0.17509932 0.28753061 -0.41946424 [61] -0.68387960 0.32910929 -0.14086839 -1.32547556 -0.55393722 -1.38021728 [67] -0.29400118 0.93971768 -1.38999892 1.46193166 -1.61613856 0.39585974 [73] -2.19920300 -0.02693907 0.20287910 -0.29170037 0.08533538 1.79887622 [79] -0.15044301 0.67071208 1.73265863 0.09304140 -0.64037627 1.58308758 [85] 2.45271254 -1.40745287 1.46028923 -0.47417565 0.02041531 2.33970626 [91] 1.23356729 0.68160044 0.35081075 -0.33971754 -1.86749822 -0.25864157 [97] -0.22076735 -2.56230579 0.07756030 -0.35842809 > rowSums(tmp2) [1] 1.09006772 0.40114914 1.69876687 -0.11880733 -1.32504899 -0.46636794 [7] -1.09969647 -0.16962679 -1.54359416 -2.53055570 0.61879384 0.64067080 [13] 0.46088118 0.09844985 -1.67941723 1.49546821 1.26933515 0.56459809 [19] -1.46216411 -0.40706037 1.31279285 -0.92217961 0.32375358 0.49606940 [25] 0.97196916 0.28712507 2.25698983 1.22169892 -0.31605770 0.54189787 [31] -1.32404827 -0.82202471 2.62058400 1.85628570 -0.40613486 -0.59607232 [37] -2.55176281 0.36234707 -0.89451465 -0.28893928 -0.59009017 -0.25080524 [43] 0.38870848 -0.81463918 -0.04971012 -0.76176881 0.55305892 1.26627776 [49] 0.32536111 2.35552766 0.43717630 2.60846789 0.05163514 0.50784249 [55] 0.35781620 -0.08147415 -1.62480921 0.17509932 0.28753061 -0.41946424 [61] -0.68387960 0.32910929 -0.14086839 -1.32547556 -0.55393722 -1.38021728 [67] -0.29400118 0.93971768 -1.38999892 1.46193166 -1.61613856 0.39585974 [73] -2.19920300 -0.02693907 0.20287910 -0.29170037 0.08533538 1.79887622 [79] -0.15044301 0.67071208 1.73265863 0.09304140 -0.64037627 1.58308758 [85] 2.45271254 -1.40745287 1.46028923 -0.47417565 0.02041531 2.33970626 [91] 1.23356729 0.68160044 0.35081075 -0.33971754 -1.86749822 -0.25864157 [97] -0.22076735 -2.56230579 0.07756030 -0.35842809 > 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.09006772 0.40114914 1.69876687 -0.11880733 -1.32504899 -0.46636794 [7] -1.09969647 -0.16962679 -1.54359416 -2.53055570 0.61879384 0.64067080 [13] 0.46088118 0.09844985 -1.67941723 1.49546821 1.26933515 0.56459809 [19] -1.46216411 -0.40706037 1.31279285 -0.92217961 0.32375358 0.49606940 [25] 0.97196916 0.28712507 2.25698983 1.22169892 -0.31605770 0.54189787 [31] -1.32404827 -0.82202471 2.62058400 1.85628570 -0.40613486 -0.59607232 [37] -2.55176281 0.36234707 -0.89451465 -0.28893928 -0.59009017 -0.25080524 [43] 0.38870848 -0.81463918 -0.04971012 -0.76176881 0.55305892 1.26627776 [49] 0.32536111 2.35552766 0.43717630 2.60846789 0.05163514 0.50784249 [55] 0.35781620 -0.08147415 -1.62480921 0.17509932 0.28753061 -0.41946424 [61] -0.68387960 0.32910929 -0.14086839 -1.32547556 -0.55393722 -1.38021728 [67] -0.29400118 0.93971768 -1.38999892 1.46193166 -1.61613856 0.39585974 [73] -2.19920300 -0.02693907 0.20287910 -0.29170037 0.08533538 1.79887622 [79] -0.15044301 0.67071208 1.73265863 0.09304140 -0.64037627 1.58308758 [85] 2.45271254 -1.40745287 1.46028923 -0.47417565 0.02041531 2.33970626 [91] 1.23356729 0.68160044 0.35081075 -0.33971754 -1.86749822 -0.25864157 [97] -0.22076735 -2.56230579 0.07756030 -0.35842809 > rowMin(tmp2) [1] 1.09006772 0.40114914 1.69876687 -0.11880733 -1.32504899 -0.46636794 [7] -1.09969647 -0.16962679 -1.54359416 -2.53055570 0.61879384 0.64067080 [13] 0.46088118 0.09844985 -1.67941723 1.49546821 1.26933515 0.56459809 [19] -1.46216411 -0.40706037 1.31279285 -0.92217961 0.32375358 0.49606940 [25] 0.97196916 0.28712507 2.25698983 1.22169892 -0.31605770 0.54189787 [31] -1.32404827 -0.82202471 2.62058400 1.85628570 -0.40613486 -0.59607232 [37] -2.55176281 0.36234707 -0.89451465 -0.28893928 -0.59009017 -0.25080524 [43] 0.38870848 -0.81463918 -0.04971012 -0.76176881 0.55305892 1.26627776 [49] 0.32536111 2.35552766 0.43717630 2.60846789 0.05163514 0.50784249 [55] 0.35781620 -0.08147415 -1.62480921 0.17509932 0.28753061 -0.41946424 [61] -0.68387960 0.32910929 -0.14086839 -1.32547556 -0.55393722 -1.38021728 [67] -0.29400118 0.93971768 -1.38999892 1.46193166 -1.61613856 0.39585974 [73] -2.19920300 -0.02693907 0.20287910 -0.29170037 0.08533538 1.79887622 [79] -0.15044301 0.67071208 1.73265863 0.09304140 -0.64037627 1.58308758 [85] 2.45271254 -1.40745287 1.46028923 -0.47417565 0.02041531 2.33970626 [91] 1.23356729 0.68160044 0.35081075 -0.33971754 -1.86749822 -0.25864157 [97] -0.22076735 -2.56230579 0.07756030 -0.35842809 > > colMeans(tmp2) [1] 0.06115067 > colSums(tmp2) [1] 6.115067 > colVars(tmp2) [1] 1.342691 > colSd(tmp2) [1] 1.158745 > colMax(tmp2) [1] 2.620584 > colMin(tmp2) [1] -2.562306 > colMedians(tmp2) [1] 0.06459772 > colRanges(tmp2) [,1] [1,] -2.562306 [2,] 2.620584 > > 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.59263453 0.34229920 1.63096619 -3.74986120 -4.08844290 -4.72434074 [7] -0.42671098 3.06476201 -3.26052148 -0.05936979 > colApply(tmp,quantile)[,1] [,1] [1,] -0.90620463 [2,] -0.08556796 [3,] 0.22881265 [4,] 0.60467378 [5,] 1.74418986 > > rowApply(tmp,sum) [1] -2.1108943 -2.6753830 -4.3136309 0.7401411 1.1913479 -0.9852490 [7] 0.5649558 2.7261167 -1.0356340 -2.7803555 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 7 6 9 7 4 10 4 7 3 8 [2,] 3 9 8 6 7 1 6 5 9 6 [3,] 6 3 1 10 6 9 10 6 5 3 [4,] 1 2 6 1 8 5 9 10 6 4 [5,] 4 1 10 2 3 8 2 2 8 7 [6,] 5 8 4 3 1 6 1 4 7 2 [7,] 8 10 7 8 9 3 7 1 1 9 [8,] 10 5 5 9 10 2 8 8 10 1 [9,] 2 4 2 4 2 4 5 9 2 10 [10,] 9 7 3 5 5 7 3 3 4 5 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 2.2042302 -4.0529527 0.9191608 -6.1430233 -2.0250191 -2.1417951 [7] 3.1700173 4.2976940 -1.1718811 -0.1339319 -0.7298287 2.5066066 [13] -0.1529737 -1.1780063 2.5110154 3.5405655 3.0324342 -3.9194342 [19] 1.1683542 -0.3706642 > colApply(tmp,quantile)[,1] [,1] [1,] -2.3006053 [2,] -0.4783445 [3,] 0.6871384 [4,] 1.1799676 [5,] 3.1160741 > > rowApply(tmp,sum) [1] 0.07292746 -7.53799868 0.96450592 3.28592996 4.54520324 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 20 9 1 18 14 [2,] 7 12 3 1 10 [3,] 17 4 14 9 12 [4,] 2 6 2 3 6 [5,] 5 13 4 8 7 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 3.1160741 -0.5972777 1.2987523 -1.77531967 -1.01247471 -1.8797776 [2,] -0.4783445 -0.1001392 -1.7778651 -0.77802775 0.05253883 -0.4816523 [3,] -2.3006053 -1.3851511 0.7248888 -2.23932992 -1.33270215 -0.9593792 [4,] 1.1799676 -2.2856701 0.1711396 -1.25523004 0.06379628 1.4649322 [5,] 0.6871384 0.3152854 0.5022451 -0.09511594 0.20382262 -0.2859182 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 2.1104504 -0.6202746 0.5654222 0.4562923 -0.49906014 -0.3533167 [2,] 1.1863105 0.4280770 -2.9678922 -0.6759477 -2.24116726 2.1576180 [3,] -0.9735237 2.1031928 -0.1974166 -0.8004098 1.77829938 2.1639271 [4,] 0.4419239 0.6886449 0.5946094 -0.4770490 -0.08264586 0.4151358 [5,] 0.4048563 1.6980540 0.8333961 1.3631822 0.31474516 -1.8767576 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [1,] -1.4426445 -1.6868220 -0.4446180 0.5137224 1.3888036 -0.4327882 0.7007200 [2,] -2.6592688 1.4665983 -0.3811214 0.3869843 0.5094663 -1.1013593 0.1713599 [3,] 2.2850217 -1.2212544 0.5187550 1.0309263 0.1917104 0.2249193 0.9838266 [4,] 0.8324360 1.1779347 1.6199561 0.6259409 0.3489859 -0.3028919 -0.5209751 [5,] 0.8314819 -0.9144629 1.1980437 0.9829916 0.5934681 -2.3073141 -0.1665772 [,20] [1,] 0.6670639 [2,] -0.2541664 [3,] 0.3688110 [4,] -1.4150112 [5,] 0.2626385 > > > 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 : 654 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 : 566 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.55734 -1.111504 0.6059647 0.2621396 1.943071 -0.0346701 -0.1585542 col8 col9 col10 col11 col12 col13 col14 row1 1.549754 -0.4881073 0.2246907 0.8716969 0.1513464 -0.3304921 -1.121802 col15 col16 col17 col18 col19 col20 row1 1.920551 -1.77462 -0.5622811 -0.7636673 -0.2316114 0.8727426 > tmp[,"col10"] col10 row1 0.2246907 row2 -0.7411924 row3 0.2393207 row4 -0.1765502 row5 1.0321468 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 1.557340 -1.1115037 0.6059647 0.2621396 1.9430706 -0.0346701 -0.1585542 row5 -0.362221 0.7377479 1.7475002 -1.9423681 -0.3393374 -0.2137862 -1.0115849 col8 col9 col10 col11 col12 col13 row1 1.5497538 -0.4881073 0.2246907 0.87169691 0.1513464 -0.330492090 row5 0.4704949 0.9975118 1.0321468 0.09243583 0.4065043 0.004819475 col14 col15 col16 col17 col18 col19 row1 -1.12180166 1.9205514 -1.7746202 -0.5622811 -0.7636673 -0.2316114 row5 0.05753241 -0.8938128 -0.3972125 -1.7164641 -0.2130356 -1.3399360 col20 row1 0.8727426 row5 -0.6569501 > tmp[,c("col6","col20")] col6 col20 row1 -0.0346701 0.8727426 row2 -0.6128825 -0.9433250 row3 -1.8832884 -1.1172145 row4 -0.3920357 1.1877419 row5 -0.2137862 -0.6569501 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.0346701 0.8727426 row5 -0.2137862 -0.6569501 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.53997 50.12249 50.51548 51.10446 51.62705 103.7733 48.47494 50.45633 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.4259 49.06127 51.02144 50.29304 52.25142 50.73069 51.5359 49.89953 col17 col18 col19 col20 row1 49.85676 49.86615 50.77637 106.1933 > tmp[,"col10"] col10 row1 49.06127 row2 28.60029 row3 29.30911 row4 31.00967 row5 48.42320 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.53997 50.12249 50.51548 51.10446 51.62705 103.7733 48.47494 50.45633 row5 48.96476 49.60904 50.40028 48.98935 48.59672 106.2927 50.53347 50.66645 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.42590 49.06127 51.02144 50.29304 52.25142 50.73069 51.53590 49.89953 row5 50.81048 48.42320 49.35925 49.07728 48.38150 50.67324 51.32723 50.93059 col17 col18 col19 col20 row1 49.85676 49.86615 50.77637 106.1933 row5 49.79153 49.39334 47.49130 104.4822 > tmp[,c("col6","col20")] col6 col20 row1 103.77327 106.19334 row2 75.60352 75.18807 row3 74.02031 76.04511 row4 75.32933 75.54237 row5 106.29266 104.48224 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.7733 106.1933 row5 106.2927 104.4822 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.7733 106.1933 row5 106.2927 104.4822 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.6668812 [2,] 0.9984328 [3,] 2.5451405 [4,] -1.3839623 [5,] -0.5057663 > tmp[,c("col17","col7")] col17 col7 [1,] 1.9602704 -0.4104722 [2,] 1.3730643 1.0403453 [3,] 0.2442243 -0.6744491 [4,] 0.2418060 -1.1911142 [5,] -1.0392677 1.7024936 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.3221968 3.00917115 [2,] 0.6130718 1.48981064 [3,] 0.3234376 -0.06945214 [4,] -0.3340214 -0.91869969 [5,] 0.1707711 1.59152293 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.3221968 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.3221968 [2,] 0.6130718 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 1.5787850 -1.4655487 -1.027959 -0.5797713 -0.2232493 -0.5201240 row1 0.4097799 -0.7675045 -2.649473 0.4994576 -0.8751781 -0.5372192 [,7] [,8] [,9] [,10] [,11] [,12] row3 0.05277048 -0.6724382 -0.07889721 2.0054726 -1.0112971 -0.9646821 row1 -0.76394190 -1.4762531 0.99833214 -0.2668216 0.0638854 0.3644815 [,13] [,14] [,15] [,16] [,17] [,18] row3 1.746079 -1.05309102 0.1919961 -0.1392086 -0.40285014 0.5946917 row1 0.533959 -0.01466605 -0.1826569 -0.3096767 -0.01459247 -1.2419748 [,19] [,20] row3 0.1729235 0.42574625 row1 0.2737472 -0.07524686 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.7223768 0.4411344 -1.449149 1.451827 -0.05939127 0.6880516 -0.9593972 [,8] [,9] [,10] row2 -1.344281 -0.1680064 1.552281 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.02785472 1.30244 -0.456301 0.3140045 -1.550745 -0.3681185 -0.8859623 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.405696 -0.9662372 -0.1811705 -0.1236936 0.07338171 1.43112 1.07072 [,15] [,16] [,17] [,18] [,19] [,20] row5 -1.515664 0.06218649 -0.01670851 0.7169019 -1.540257 0.6962885 > > > 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: 0x600002458000> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1668375262ead" [2] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM166831dc29bf1" [3] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM16683538bfa7a" [4] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM16683ae98a70" [5] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM166836a7fc4a8" [6] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM166836a482837" [7] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1668327486964" [8] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM166832ff3862" [9] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1668341ceab77" [10] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM16683675b3361" [11] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM16683148a5a4a" [12] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1668372dbacf" [13] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM166834b436fb7" [14] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM16683385b7dfb" [15] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM166837eac06a4" > > > ### 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: 0x600002440120> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600002440120> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600002440120> > rowMedians(tmp) [1] -0.134915335 0.014382076 -0.631712579 -0.276966318 -0.788862385 [6] -0.381827029 -0.224408690 -0.075455552 -0.024552103 0.714167162 [11] -0.449029364 -0.159291872 -0.239386443 -0.049120932 -0.174329988 [16] -0.297279662 -0.316826629 -0.500909799 0.220825892 -0.283814836 [21] -0.238184617 -0.503123239 -0.372750178 0.069276490 -0.448330853 [26] -0.178282501 -0.236582622 -0.239436781 0.481789288 0.454912243 [31] -0.271887028 -0.052791502 0.827434323 0.096626693 0.375644005 [36] -0.597290060 0.464581690 0.132874149 -0.204698609 -0.225218706 [41] -0.501423712 0.321620442 -0.156655031 0.218699480 -0.431221230 [46] -0.275112775 0.496703036 -0.261948899 -0.453964894 0.519023456 [51] 0.253549493 -0.089159251 0.064891485 -0.114931397 -0.063569163 [56] 0.142044566 -0.641723396 0.261614268 0.095933244 -0.182511519 [61] -0.028012444 -0.192932662 -0.136820813 -0.651509996 0.151782824 [66] 0.148444015 0.378876140 0.261312491 -0.771964617 -0.379656894 [71] 0.114206536 0.112695745 0.208130212 -0.028569065 0.676399220 [76] 0.588453259 0.741345970 0.456393166 0.031028421 0.005796196 [81] 0.079700651 0.378324268 0.050788593 -0.253820689 0.454627735 [86] -0.310272819 0.015444371 -0.217418975 -0.217164159 0.029840637 [91] -0.051724134 -0.101871671 -0.006062760 -0.439931045 0.248019134 [96] 0.316928227 -0.078427778 0.078814909 0.243780666 0.023626348 [101] -0.462260290 0.295726990 0.081265901 -0.320537793 -0.067081749 [106] 0.180870124 0.336616065 0.266216761 0.767189304 0.316840824 [111] 0.182155553 0.095648220 -0.205082873 0.283799995 -0.200159842 [116] -0.076046111 -0.275362878 0.299158438 0.159959143 0.421872073 [121] 0.304608966 0.469889420 -0.128873355 -0.618814301 0.134578677 [126] -0.153578698 0.664361799 -0.356810108 -0.247701921 -0.223302152 [131] -0.505270700 0.188483807 0.542090379 0.092516071 -0.253768195 [136] -0.242388063 0.289827438 0.335087272 -0.423159427 -0.285649755 [141] 0.188041762 0.043934360 0.212182578 -0.489428394 -0.432304253 [146] 0.021811054 -0.156141466 -0.072579326 0.380876281 0.705524650 [151] -0.117812014 -0.139055275 -0.119002336 0.124382589 -0.275314938 [156] -0.241436608 -0.300015258 -0.094194646 -0.542998916 1.005341568 [161] 0.067021218 0.222993578 0.116126876 -0.217368625 0.054811157 [166] 0.144024934 -0.327726732 0.139652299 -0.328102008 -0.046665171 [171] 0.280637600 -0.335112573 0.420343368 0.185750558 0.630667817 [176] -0.317820821 -0.022040483 0.246133680 0.290297668 0.344083446 [181] 0.115993466 -0.245281445 0.126910344 0.431494095 0.216153617 [186] 0.228545931 0.152932105 0.183616652 0.634307527 -0.401659459 [191] 0.557079762 0.183263436 -0.094361883 -0.211317492 0.146297546 [196] 0.084043550 -0.171109985 -0.220038085 -0.073347006 0.367206334 [201] -0.191452463 -0.566258367 0.095760540 0.563773806 -0.126640256 [206] 0.599721683 -0.149494548 0.360365504 0.123084263 0.124902021 [211] -0.274048173 0.237174864 0.339650929 0.137000529 0.528089389 [216] -0.434644767 -0.110885164 0.740613609 -0.111259066 0.192601414 [221] 0.056548361 -0.887612034 0.433107726 -0.052607371 -0.427245423 [226] 0.127114704 0.114841203 0.130582941 -0.320390599 0.193065650 > > proc.time() user system elapsed 2.528 14.424 17.318
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.5.1 (2025-06-13) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x600002340000> > .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: 0x600002340000> > .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: 0x600002340000> > .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: 0x600002340000> > 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: 0x600002348000> > .Call("R_bm_AddColumn",P) <pointer: 0x600002348000> > .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: 0x600002348000> > .Call("R_bm_AddColumn",P) <pointer: 0x600002348000> > .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: 0x600002348000> > 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: 0x600002348180> > .Call("R_bm_AddColumn",P) <pointer: 0x600002348180> > .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: 0x600002348180> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600002348180> > .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: 0x600002348180> > > .Call("R_bm_RowMode",P) <pointer: 0x600002348180> > .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: 0x600002348180> > > .Call("R_bm_ColMode",P) <pointer: 0x600002348180> > .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: 0x600002348180> > 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: 0x60000237c180> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x60000237c180> > .Call("R_bm_AddColumn",P) <pointer: 0x60000237c180> > .Call("R_bm_AddColumn",P) <pointer: 0x60000237c180> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile16b075b95dce7" "BufferedMatrixFile16b0773fec66f" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile16b075b95dce7" "BufferedMatrixFile16b0773fec66f" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x60000234c120> > .Call("R_bm_AddColumn",P) <pointer: 0x60000234c120> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x60000234c120> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x60000234c120> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x60000234c120> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x60000234c120> > .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: 0x600002330000> > .Call("R_bm_AddColumn",P) <pointer: 0x600002330000> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600002330000> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600002330000> > 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: 0x600002330180> > .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: 0x600002330180> > rm(P) > > proc.time() user system elapsed 0.312 0.142 0.447
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.1 (2025-06-13) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.325 0.087 0.402