Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-09-25 11:40 -0400 (Thu, 25 Sep 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4827 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" | 4608 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4549 |
kunpeng2 | Linux (openEuler 24.03 LTS) | aarch64 | R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" | 4581 |
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/2341 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.72.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 24.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
merida1 | macOS 12.7.5 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson1 | macOS 13.6.6 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kunpeng2 | 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.72.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.72.0.tar.gz |
StartedAt: 2025-09-23 14:42:17 -0400 (Tue, 23 Sep 2025) |
EndedAt: 2025-09-23 14:42:59 -0400 (Tue, 23 Sep 2025) |
EllapsedTime: 41.4 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.72.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.5.1 Patched (2025-06-14 r88325) * using platform: aarch64-apple-darwin20 * R was compiled by Apple clang version 16.0.0 (clang-1600.0.26.6) GNU Fortran (GCC) 14.2.0 * running under: macOS Ventura 13.7.5 * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.72.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.21-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 15.0.0 (clang-1500.0.40.1)’ * 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.21-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.72.0’ ** using staged installation ** libs using C compiler: ‘Apple clang version 15.0.0 (clang-1500.0.40.1)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch arm64 -std=gnu2x -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R installing to /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.343 0.116 0.448
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells 480828 25.7 1056581 56.5 NA 634425 33.9 Vcells 891011 6.8 8388608 64.0 65536 2109041 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] "Tue Sep 23 14:42:38 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] "Tue Sep 23 14:42:38 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: 0x6000039700c0> > > > > 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] "Tue Sep 23 14:42:41 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] "Tue Sep 23 14:42:42 2025" > > ColMode(tmp2) <pointer: 0x6000039700c0> > > > > ### 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.7912796 0.65268332 -0.1229816 0.27843566 [2,] -0.3938915 0.92265657 -2.8664379 -0.79012361 [3,] 0.1459943 0.04688072 -1.8163946 -0.05874226 [4,] 0.7567018 0.90620596 0.1621977 0.75779636 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-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,] 100.7912796 0.65268332 0.1229816 0.27843566 [2,] 0.3938915 0.92265657 2.8664379 0.79012361 [3,] 0.1459943 0.04688072 1.8163946 0.05874226 [4,] 0.7567018 0.90620596 0.1621977 0.75779636 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-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.0394860 0.8078882 0.3506873 0.527670 [2,] 0.6276078 0.9605501 1.6930558 0.888889 [3,] 0.3820920 0.2165196 1.3477368 0.242368 [4,] 0.8698861 0.9519485 0.4027378 0.870515 > > 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.21-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,] 226.18614 33.73157 28.62985 30.55514 [2,] 31.66997 35.52816 44.79700 34.67901 [3,] 28.96691 27.21208 40.29376 27.48242 [4,] 34.45556 35.42569 29.18958 34.46295 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600003974120> > exp(tmp5) <pointer: 0x600003974120> > log(tmp5,2) <pointer: 0x600003974120> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 470.7768 > Min(tmp5) [1] 53.69133 > mean(tmp5) [1] 72.7678 > Sum(tmp5) [1] 14553.56 > Var(tmp5) [1] 871.0416 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 89.20078 74.99253 72.59282 71.38657 71.29227 69.78083 68.84447 72.39954 [9] 70.09519 67.09302 > rowSums(tmp5) [1] 1784.016 1499.851 1451.856 1427.731 1425.845 1395.617 1376.889 1447.991 [9] 1401.904 1341.860 > rowVars(tmp5) [1] 8135.19182 71.12589 67.86622 50.03856 69.56224 87.12852 [7] 84.35287 86.88592 39.44105 70.47042 > rowSd(tmp5) [1] 90.195298 8.433617 8.238096 7.073794 8.340398 9.334266 9.184382 [8] 9.321262 6.280211 8.394666 > rowMax(tmp5) [1] 470.77682 93.23908 84.05760 83.74197 85.05837 91.80654 85.02629 [8] 90.76662 83.93664 85.09628 > rowMin(tmp5) [1] 53.69133 57.71849 56.63837 57.34453 58.93472 57.42736 54.76149 58.23362 [9] 56.04700 55.59265 > > colMeans(tmp5) [1] 107.83356 68.94791 70.61065 68.12412 73.53787 70.46404 74.02950 [8] 71.17647 67.03432 72.48491 70.79582 69.97537 70.44745 72.15276 [15] 72.28924 66.62445 69.24872 72.95715 75.36246 71.25925 > colSums(tmp5) [1] 1078.3356 689.4791 706.1065 681.2412 735.3787 704.6404 740.2950 [8] 711.7647 670.3432 724.8491 707.9582 699.7537 704.4745 721.5276 [15] 722.8924 666.2445 692.4872 729.5715 753.6246 712.5925 > colVars(tmp5) [1] 16307.15265 104.48664 176.99562 128.86707 31.41599 22.93664 [7] 78.34143 85.03876 38.15186 65.24497 136.62725 83.96239 [13] 49.40499 41.33038 77.52292 54.35253 63.22514 44.03011 [19] 48.96951 76.93057 > colSd(tmp5) [1] 127.699462 10.221871 13.303970 11.351963 5.604997 4.789221 [7] 8.851069 9.221647 6.176719 8.077436 11.688766 9.163099 [13] 7.028868 6.428871 8.804710 7.372417 7.951424 6.635519 [19] 6.997822 8.771007 > colMax(tmp5) [1] 470.77682 90.76662 93.23908 87.43059 82.28524 79.82135 91.80654 [8] 88.67110 73.17605 83.23934 89.09853 82.38188 83.74197 81.04155 [15] 84.05760 79.62466 79.45022 85.09628 86.38614 81.93630 > colMin(tmp5) [1] 56.15834 56.63837 54.76149 56.78948 65.73542 62.55430 62.23041 57.71849 [9] 57.42736 61.83077 57.34453 55.59265 62.34913 63.08097 53.69133 56.71971 [17] 57.20320 64.34579 66.10659 57.78847 > > > ### 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] 89.20078 74.99253 72.59282 71.38657 71.29227 69.78083 68.84447 NA [9] 70.09519 67.09302 > rowSums(tmp5) [1] 1784.016 1499.851 1451.856 1427.731 1425.845 1395.617 1376.889 NA [9] 1401.904 1341.860 > rowVars(tmp5) [1] 8135.19182 71.12589 67.86622 50.03856 69.56224 87.12852 [7] 84.35287 87.93519 39.44105 70.47042 > rowSd(tmp5) [1] 90.195298 8.433617 8.238096 7.073794 8.340398 9.334266 9.184382 [8] 9.377376 6.280211 8.394666 > rowMax(tmp5) [1] 470.77682 93.23908 84.05760 83.74197 85.05837 91.80654 85.02629 [8] NA 83.93664 85.09628 > rowMin(tmp5) [1] 53.69133 57.71849 56.63837 57.34453 58.93472 57.42736 54.76149 NA [9] 56.04700 55.59265 > > colMeans(tmp5) [1] 107.83356 68.94791 70.61065 68.12412 73.53787 70.46404 74.02950 [8] 71.17647 67.03432 NA 70.79582 69.97537 70.44745 72.15276 [15] 72.28924 66.62445 69.24872 72.95715 75.36246 71.25925 > colSums(tmp5) [1] 1078.3356 689.4791 706.1065 681.2412 735.3787 704.6404 740.2950 [8] 711.7647 670.3432 NA 707.9582 699.7537 704.4745 721.5276 [15] 722.8924 666.2445 692.4872 729.5715 753.6246 712.5925 > colVars(tmp5) [1] 16307.15265 104.48664 176.99562 128.86707 31.41599 22.93664 [7] 78.34143 85.03876 38.15186 NA 136.62725 83.96239 [13] 49.40499 41.33038 77.52292 54.35253 63.22514 44.03011 [19] 48.96951 76.93057 > colSd(tmp5) [1] 127.699462 10.221871 13.303970 11.351963 5.604997 4.789221 [7] 8.851069 9.221647 6.176719 NA 11.688766 9.163099 [13] 7.028868 6.428871 8.804710 7.372417 7.951424 6.635519 [19] 6.997822 8.771007 > colMax(tmp5) [1] 470.77682 90.76662 93.23908 87.43059 82.28524 79.82135 91.80654 [8] 88.67110 73.17605 NA 89.09853 82.38188 83.74197 81.04155 [15] 84.05760 79.62466 79.45022 85.09628 86.38614 81.93630 > colMin(tmp5) [1] 56.15834 56.63837 54.76149 56.78948 65.73542 62.55430 62.23041 57.71849 [9] 57.42736 NA 57.34453 55.59265 62.34913 63.08097 53.69133 56.71971 [17] 57.20320 64.34579 66.10659 57.78847 > > Max(tmp5,na.rm=TRUE) [1] 470.7768 > Min(tmp5,na.rm=TRUE) [1] 53.69133 > mean(tmp5,na.rm=TRUE) [1] 72.72926 > Sum(tmp5,na.rm=TRUE) [1] 14473.12 > Var(tmp5,na.rm=TRUE) [1] 875.1423 > > rowMeans(tmp5,na.rm=TRUE) [1] 89.20078 74.99253 72.59282 71.38657 71.29227 69.78083 68.84447 71.97652 [9] 70.09519 67.09302 > rowSums(tmp5,na.rm=TRUE) [1] 1784.016 1499.851 1451.856 1427.731 1425.845 1395.617 1376.889 1367.554 [9] 1401.904 1341.860 > rowVars(tmp5,na.rm=TRUE) [1] 8135.19182 71.12589 67.86622 50.03856 69.56224 87.12852 [7] 84.35287 87.93519 39.44105 70.47042 > rowSd(tmp5,na.rm=TRUE) [1] 90.195298 8.433617 8.238096 7.073794 8.340398 9.334266 9.184382 [8] 9.377376 6.280211 8.394666 > rowMax(tmp5,na.rm=TRUE) [1] 470.77682 93.23908 84.05760 83.74197 85.05837 91.80654 85.02629 [8] 90.76662 83.93664 85.09628 > rowMin(tmp5,na.rm=TRUE) [1] 53.69133 57.71849 56.63837 57.34453 58.93472 57.42736 54.76149 58.23362 [9] 56.04700 55.59265 > > colMeans(tmp5,na.rm=TRUE) [1] 107.83356 68.94791 70.61065 68.12412 73.53787 70.46404 74.02950 [8] 71.17647 67.03432 71.60135 70.79582 69.97537 70.44745 72.15276 [15] 72.28924 66.62445 69.24872 72.95715 75.36246 71.25925 > colSums(tmp5,na.rm=TRUE) [1] 1078.3356 689.4791 706.1065 681.2412 735.3787 704.6404 740.2950 [8] 711.7647 670.3432 644.4122 707.9582 699.7537 704.4745 721.5276 [15] 722.8924 666.2445 692.4872 729.5715 753.6246 712.5925 > colVars(tmp5,na.rm=TRUE) [1] 16307.15265 104.48664 176.99562 128.86707 31.41599 22.93664 [7] 78.34143 85.03876 38.15186 64.61808 136.62725 83.96239 [13] 49.40499 41.33038 77.52292 54.35253 63.22514 44.03011 [19] 48.96951 76.93057 > colSd(tmp5,na.rm=TRUE) [1] 127.699462 10.221871 13.303970 11.351963 5.604997 4.789221 [7] 8.851069 9.221647 6.176719 8.038537 11.688766 9.163099 [13] 7.028868 6.428871 8.804710 7.372417 7.951424 6.635519 [19] 6.997822 8.771007 > colMax(tmp5,na.rm=TRUE) [1] 470.77682 90.76662 93.23908 87.43059 82.28524 79.82135 91.80654 [8] 88.67110 73.17605 83.23934 89.09853 82.38188 83.74197 81.04155 [15] 84.05760 79.62466 79.45022 85.09628 86.38614 81.93630 > colMin(tmp5,na.rm=TRUE) [1] 56.15834 56.63837 54.76149 56.78948 65.73542 62.55430 62.23041 57.71849 [9] 57.42736 61.83077 57.34453 55.59265 62.34913 63.08097 53.69133 56.71971 [17] 57.20320 64.34579 66.10659 57.78847 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 89.20078 74.99253 72.59282 71.38657 71.29227 69.78083 68.84447 NaN [9] 70.09519 67.09302 > rowSums(tmp5,na.rm=TRUE) [1] 1784.016 1499.851 1451.856 1427.731 1425.845 1395.617 1376.889 0.000 [9] 1401.904 1341.860 > rowVars(tmp5,na.rm=TRUE) [1] 8135.19182 71.12589 67.86622 50.03856 69.56224 87.12852 [7] 84.35287 NA 39.44105 70.47042 > rowSd(tmp5,na.rm=TRUE) [1] 90.195298 8.433617 8.238096 7.073794 8.340398 9.334266 9.184382 [8] NA 6.280211 8.394666 > rowMax(tmp5,na.rm=TRUE) [1] 470.77682 93.23908 84.05760 83.74197 85.05837 91.80654 85.02629 [8] NA 83.93664 85.09628 > rowMin(tmp5,na.rm=TRUE) [1] 53.69133 57.71849 56.63837 57.34453 58.93472 57.42736 54.76149 NA [9] 56.04700 55.59265 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 111.96267 66.52361 70.83852 65.97896 74.38161 70.37945 75.34051 [8] 70.94363 67.93639 NaN 68.76218 69.70722 69.49394 72.13349 [15] 73.04297 67.55676 68.39338 73.90430 76.19970 71.09373 > colSums(tmp5,na.rm=TRUE) [1] 1007.6641 598.7125 637.5466 593.8106 669.4345 633.4151 678.0646 [8] 638.4927 611.4275 0.0000 618.8596 627.3650 625.4454 649.2014 [15] 657.3868 608.0109 615.5404 665.1387 685.7973 639.8435 > colVars(tmp5,na.rm=TRUE) [1] 18153.73933 51.42860 198.53596 93.20606 27.33414 25.72323 [7] 68.79819 95.05869 33.76635 NA 107.17937 93.64880 [13] 45.35225 46.49250 80.82200 51.36799 62.89780 39.44140 [19] 47.20488 86.23866 > colSd(tmp5,na.rm=TRUE) [1] 134.735813 7.171373 14.090279 9.654329 5.228206 5.071807 [7] 8.294467 9.749805 5.810882 NA 10.352747 9.677231 [13] 6.734408 6.818541 8.990106 7.167147 7.930813 6.280239 [19] 6.870581 9.286477 > colMax(tmp5,na.rm=TRUE) [1] 470.77682 73.94721 93.23908 85.02629 82.28524 79.82135 91.80654 [8] 88.67110 73.17605 -Inf 83.93664 82.38188 83.74197 81.04155 [15] 84.05760 79.62466 79.45022 85.09628 86.38614 81.93630 > colMin(tmp5,na.rm=TRUE) [1] 56.15834 56.63837 54.76149 56.78948 65.73542 62.55430 65.58680 57.71849 [9] 57.42736 Inf 57.34453 55.59265 62.34913 63.08097 53.69133 56.71971 [17] 57.20320 64.34579 66.10659 57.78847 > > > > > 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] 223.4589 147.2723 341.0307 209.0377 248.9444 237.7124 234.3164 186.7225 [9] 235.7139 327.3072 > apply(copymatrix,1,var,na.rm=TRUE) [1] 223.4589 147.2723 341.0307 209.0377 248.9444 237.7124 234.3164 186.7225 [9] 235.7139 327.3072 > > > > 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] 2.842171e-13 2.842171e-14 0.000000e+00 -1.989520e-13 -7.105427e-14 [6] -1.136868e-13 5.684342e-13 1.421085e-13 4.263256e-13 -1.989520e-13 [11] 0.000000e+00 1.989520e-13 5.684342e-14 0.000000e+00 1.705303e-13 [16] -3.410605e-13 -2.842171e-14 0.000000e+00 1.136868e-13 2.842171e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 6 3 6 9 8 9 9 2 2 15 5 10 6 8 9 15 7 12 9 12 5 14 3 4 1 9 8 9 9 7 8 15 3 10 8 16 7 20 5 20 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.352624 > Min(tmp) [1] -3.150217 > mean(tmp) [1] -0.1679926 > Sum(tmp) [1] -16.79926 > Var(tmp) [1] 1.047198 > > rowMeans(tmp) [1] -0.1679926 > rowSums(tmp) [1] -16.79926 > rowVars(tmp) [1] 1.047198 > rowSd(tmp) [1] 1.023327 > rowMax(tmp) [1] 2.352624 > rowMin(tmp) [1] -3.150217 > > colMeans(tmp) [1] -0.61929811 -0.74672923 -0.34261805 -0.92884781 -0.54494577 0.16967723 [7] 1.62270553 0.33991751 -0.50156737 -1.02150915 0.52808713 0.18648188 [13] -0.72447457 -0.19056867 -0.61737614 -0.79858583 1.04293468 1.52110587 [19] -0.79403639 -0.19722203 -1.20033709 -1.75266406 -1.10408569 -1.34069520 [25] -0.38005467 -0.39448623 -0.56043115 -0.08717398 0.23810535 -0.99912216 [31] 0.62623063 -0.78198318 -1.32266636 -0.74423950 0.15246172 0.96330759 [37] 0.08754313 -1.23047639 0.02933459 -0.42640043 -0.36310609 1.13917619 [43] -1.54795169 -1.28313982 -1.31124884 0.20623017 1.40303479 1.17404080 [49] 0.75518615 -2.85112912 -0.05726673 -0.96547422 0.22813555 -1.40335858 [55] -0.11470622 0.52877545 -1.11208190 0.68004598 -0.85802147 0.36278901 [61] -0.93758134 -1.19230625 0.33762852 0.64572087 -1.64201314 0.10405396 [67] -0.43581321 1.17189583 1.15219640 1.41451706 0.79067810 1.43431993 [73] 0.91062041 -2.05159505 0.51062688 -0.07099217 0.95791333 -0.90782586 [79] 2.35262392 -0.75705705 -0.99344353 0.45196954 0.06267414 -0.56227502 [85] -3.15021687 -0.16125216 -0.88617652 -0.01983038 1.56429387 -0.20785932 [91] -0.52840541 -0.46018209 1.33299175 -0.85029632 2.14885767 0.05868596 [97] -0.72071044 1.82645419 -1.22566838 -0.03170411 > colSums(tmp) [1] -0.61929811 -0.74672923 -0.34261805 -0.92884781 -0.54494577 0.16967723 [7] 1.62270553 0.33991751 -0.50156737 -1.02150915 0.52808713 0.18648188 [13] -0.72447457 -0.19056867 -0.61737614 -0.79858583 1.04293468 1.52110587 [19] -0.79403639 -0.19722203 -1.20033709 -1.75266406 -1.10408569 -1.34069520 [25] -0.38005467 -0.39448623 -0.56043115 -0.08717398 0.23810535 -0.99912216 [31] 0.62623063 -0.78198318 -1.32266636 -0.74423950 0.15246172 0.96330759 [37] 0.08754313 -1.23047639 0.02933459 -0.42640043 -0.36310609 1.13917619 [43] -1.54795169 -1.28313982 -1.31124884 0.20623017 1.40303479 1.17404080 [49] 0.75518615 -2.85112912 -0.05726673 -0.96547422 0.22813555 -1.40335858 [55] -0.11470622 0.52877545 -1.11208190 0.68004598 -0.85802147 0.36278901 [61] -0.93758134 -1.19230625 0.33762852 0.64572087 -1.64201314 0.10405396 [67] -0.43581321 1.17189583 1.15219640 1.41451706 0.79067810 1.43431993 [73] 0.91062041 -2.05159505 0.51062688 -0.07099217 0.95791333 -0.90782586 [79] 2.35262392 -0.75705705 -0.99344353 0.45196954 0.06267414 -0.56227502 [85] -3.15021687 -0.16125216 -0.88617652 -0.01983038 1.56429387 -0.20785932 [91] -0.52840541 -0.46018209 1.33299175 -0.85029632 2.14885767 0.05868596 [97] -0.72071044 1.82645419 -1.22566838 -0.03170411 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] -0.61929811 -0.74672923 -0.34261805 -0.92884781 -0.54494577 0.16967723 [7] 1.62270553 0.33991751 -0.50156737 -1.02150915 0.52808713 0.18648188 [13] -0.72447457 -0.19056867 -0.61737614 -0.79858583 1.04293468 1.52110587 [19] -0.79403639 -0.19722203 -1.20033709 -1.75266406 -1.10408569 -1.34069520 [25] -0.38005467 -0.39448623 -0.56043115 -0.08717398 0.23810535 -0.99912216 [31] 0.62623063 -0.78198318 -1.32266636 -0.74423950 0.15246172 0.96330759 [37] 0.08754313 -1.23047639 0.02933459 -0.42640043 -0.36310609 1.13917619 [43] -1.54795169 -1.28313982 -1.31124884 0.20623017 1.40303479 1.17404080 [49] 0.75518615 -2.85112912 -0.05726673 -0.96547422 0.22813555 -1.40335858 [55] -0.11470622 0.52877545 -1.11208190 0.68004598 -0.85802147 0.36278901 [61] -0.93758134 -1.19230625 0.33762852 0.64572087 -1.64201314 0.10405396 [67] -0.43581321 1.17189583 1.15219640 1.41451706 0.79067810 1.43431993 [73] 0.91062041 -2.05159505 0.51062688 -0.07099217 0.95791333 -0.90782586 [79] 2.35262392 -0.75705705 -0.99344353 0.45196954 0.06267414 -0.56227502 [85] -3.15021687 -0.16125216 -0.88617652 -0.01983038 1.56429387 -0.20785932 [91] -0.52840541 -0.46018209 1.33299175 -0.85029632 2.14885767 0.05868596 [97] -0.72071044 1.82645419 -1.22566838 -0.03170411 > colMin(tmp) [1] -0.61929811 -0.74672923 -0.34261805 -0.92884781 -0.54494577 0.16967723 [7] 1.62270553 0.33991751 -0.50156737 -1.02150915 0.52808713 0.18648188 [13] -0.72447457 -0.19056867 -0.61737614 -0.79858583 1.04293468 1.52110587 [19] -0.79403639 -0.19722203 -1.20033709 -1.75266406 -1.10408569 -1.34069520 [25] -0.38005467 -0.39448623 -0.56043115 -0.08717398 0.23810535 -0.99912216 [31] 0.62623063 -0.78198318 -1.32266636 -0.74423950 0.15246172 0.96330759 [37] 0.08754313 -1.23047639 0.02933459 -0.42640043 -0.36310609 1.13917619 [43] -1.54795169 -1.28313982 -1.31124884 0.20623017 1.40303479 1.17404080 [49] 0.75518615 -2.85112912 -0.05726673 -0.96547422 0.22813555 -1.40335858 [55] -0.11470622 0.52877545 -1.11208190 0.68004598 -0.85802147 0.36278901 [61] -0.93758134 -1.19230625 0.33762852 0.64572087 -1.64201314 0.10405396 [67] -0.43581321 1.17189583 1.15219640 1.41451706 0.79067810 1.43431993 [73] 0.91062041 -2.05159505 0.51062688 -0.07099217 0.95791333 -0.90782586 [79] 2.35262392 -0.75705705 -0.99344353 0.45196954 0.06267414 -0.56227502 [85] -3.15021687 -0.16125216 -0.88617652 -0.01983038 1.56429387 -0.20785932 [91] -0.52840541 -0.46018209 1.33299175 -0.85029632 2.14885767 0.05868596 [97] -0.72071044 1.82645419 -1.22566838 -0.03170411 > colMedians(tmp) [1] -0.61929811 -0.74672923 -0.34261805 -0.92884781 -0.54494577 0.16967723 [7] 1.62270553 0.33991751 -0.50156737 -1.02150915 0.52808713 0.18648188 [13] -0.72447457 -0.19056867 -0.61737614 -0.79858583 1.04293468 1.52110587 [19] -0.79403639 -0.19722203 -1.20033709 -1.75266406 -1.10408569 -1.34069520 [25] -0.38005467 -0.39448623 -0.56043115 -0.08717398 0.23810535 -0.99912216 [31] 0.62623063 -0.78198318 -1.32266636 -0.74423950 0.15246172 0.96330759 [37] 0.08754313 -1.23047639 0.02933459 -0.42640043 -0.36310609 1.13917619 [43] -1.54795169 -1.28313982 -1.31124884 0.20623017 1.40303479 1.17404080 [49] 0.75518615 -2.85112912 -0.05726673 -0.96547422 0.22813555 -1.40335858 [55] -0.11470622 0.52877545 -1.11208190 0.68004598 -0.85802147 0.36278901 [61] -0.93758134 -1.19230625 0.33762852 0.64572087 -1.64201314 0.10405396 [67] -0.43581321 1.17189583 1.15219640 1.41451706 0.79067810 1.43431993 [73] 0.91062041 -2.05159505 0.51062688 -0.07099217 0.95791333 -0.90782586 [79] 2.35262392 -0.75705705 -0.99344353 0.45196954 0.06267414 -0.56227502 [85] -3.15021687 -0.16125216 -0.88617652 -0.01983038 1.56429387 -0.20785932 [91] -0.52840541 -0.46018209 1.33299175 -0.85029632 2.14885767 0.05868596 [97] -0.72071044 1.82645419 -1.22566838 -0.03170411 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.6192981 -0.7467292 -0.342618 -0.9288478 -0.5449458 0.1696772 1.622706 [2,] -0.6192981 -0.7467292 -0.342618 -0.9288478 -0.5449458 0.1696772 1.622706 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.3399175 -0.5015674 -1.021509 0.5280871 0.1864819 -0.7244746 -0.1905687 [2,] 0.3399175 -0.5015674 -1.021509 0.5280871 0.1864819 -0.7244746 -0.1905687 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.6173761 -0.7985858 1.042935 1.521106 -0.7940364 -0.197222 -1.200337 [2,] -0.6173761 -0.7985858 1.042935 1.521106 -0.7940364 -0.197222 -1.200337 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1.752664 -1.104086 -1.340695 -0.3800547 -0.3944862 -0.5604312 -0.08717398 [2,] -1.752664 -1.104086 -1.340695 -0.3800547 -0.3944862 -0.5604312 -0.08717398 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.2381053 -0.9991222 0.6262306 -0.7819832 -1.322666 -0.7442395 0.1524617 [2,] 0.2381053 -0.9991222 0.6262306 -0.7819832 -1.322666 -0.7442395 0.1524617 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.9633076 0.08754313 -1.230476 0.02933459 -0.4264004 -0.3631061 1.139176 [2,] 0.9633076 0.08754313 -1.230476 0.02933459 -0.4264004 -0.3631061 1.139176 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -1.547952 -1.28314 -1.311249 0.2062302 1.403035 1.174041 0.7551862 [2,] -1.547952 -1.28314 -1.311249 0.2062302 1.403035 1.174041 0.7551862 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -2.851129 -0.05726673 -0.9654742 0.2281355 -1.403359 -0.1147062 0.5287754 [2,] -2.851129 -0.05726673 -0.9654742 0.2281355 -1.403359 -0.1147062 0.5287754 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.112082 0.680046 -0.8580215 0.362789 -0.9375813 -1.192306 0.3376285 [2,] -1.112082 0.680046 -0.8580215 0.362789 -0.9375813 -1.192306 0.3376285 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.6457209 -1.642013 0.104054 -0.4358132 1.171896 1.152196 1.414517 [2,] 0.6457209 -1.642013 0.104054 -0.4358132 1.171896 1.152196 1.414517 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.7906781 1.43432 0.9106204 -2.051595 0.5106269 -0.07099217 0.9579133 [2,] 0.7906781 1.43432 0.9106204 -2.051595 0.5106269 -0.07099217 0.9579133 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.9078259 2.352624 -0.7570571 -0.9934435 0.4519695 0.06267414 -0.562275 [2,] -0.9078259 2.352624 -0.7570571 -0.9934435 0.4519695 0.06267414 -0.562275 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -3.150217 -0.1612522 -0.8861765 -0.01983038 1.564294 -0.2078593 -0.5284054 [2,] -3.150217 -0.1612522 -0.8861765 -0.01983038 1.564294 -0.2078593 -0.5284054 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.4601821 1.332992 -0.8502963 2.148858 0.05868596 -0.7207104 1.826454 [2,] -0.4601821 1.332992 -0.8502963 2.148858 0.05868596 -0.7207104 1.826454 [,99] [,100] [1,] -1.225668 -0.03170411 [2,] -1.225668 -0.03170411 > > > Max(tmp2) [1] 1.930374 > Min(tmp2) [1] -3.19852 > mean(tmp2) [1] 0.02203682 > Sum(tmp2) [1] 2.203682 > Var(tmp2) [1] 1.066482 > > rowMeans(tmp2) [1] -0.004761304 1.010578755 -0.081795379 0.266841191 0.005020038 [6] 0.546599572 -0.948904081 1.051173979 0.423893825 1.005039943 [11] 1.705794520 0.715319156 0.278928573 -0.277272809 0.106747439 [16] 0.575311165 0.186741515 1.003896869 0.639912830 0.413588316 [21] -0.454928008 -0.749612641 -0.315525452 0.283140985 -1.366625354 [26] 1.138165206 1.858422479 1.753764298 -2.237100571 1.216147801 [31] -0.723068581 -0.668518106 0.589783374 1.284042702 1.490946050 [36] 1.894427244 -0.763944017 0.344568903 0.945747517 0.713113681 [41] 0.847399564 -0.394398734 -2.425218926 0.001557464 0.124947925 [46] 0.612739258 -0.424905262 -0.047878817 0.274539634 -0.152807666 [51] 0.537878572 1.590323216 -0.686896932 -0.771134263 -0.470567470 [56] -0.133521520 1.476999214 -3.198519512 -0.180516911 0.556697029 [61] -1.223819643 -0.561508481 0.059078906 -0.224508569 0.072399470 [66] -0.755218106 -0.672315036 -0.715613930 0.351901521 -0.315629318 [71] -2.254432908 0.192475570 -0.268305274 -0.054864650 -0.238350785 [76] -0.001967319 -1.793753941 0.524953602 0.472014989 -3.114820882 [81] -0.643230822 0.994044526 1.930373563 0.852416299 -0.649388086 [86] -1.314704279 1.272832474 0.528441244 1.083516639 -0.117630578 [91] -2.371995289 0.652732790 0.162507179 -0.348318716 -0.178124386 [96] -1.671633817 0.809640944 0.033814093 -0.323996628 0.032352131 > rowSums(tmp2) [1] -0.004761304 1.010578755 -0.081795379 0.266841191 0.005020038 [6] 0.546599572 -0.948904081 1.051173979 0.423893825 1.005039943 [11] 1.705794520 0.715319156 0.278928573 -0.277272809 0.106747439 [16] 0.575311165 0.186741515 1.003896869 0.639912830 0.413588316 [21] -0.454928008 -0.749612641 -0.315525452 0.283140985 -1.366625354 [26] 1.138165206 1.858422479 1.753764298 -2.237100571 1.216147801 [31] -0.723068581 -0.668518106 0.589783374 1.284042702 1.490946050 [36] 1.894427244 -0.763944017 0.344568903 0.945747517 0.713113681 [41] 0.847399564 -0.394398734 -2.425218926 0.001557464 0.124947925 [46] 0.612739258 -0.424905262 -0.047878817 0.274539634 -0.152807666 [51] 0.537878572 1.590323216 -0.686896932 -0.771134263 -0.470567470 [56] -0.133521520 1.476999214 -3.198519512 -0.180516911 0.556697029 [61] -1.223819643 -0.561508481 0.059078906 -0.224508569 0.072399470 [66] -0.755218106 -0.672315036 -0.715613930 0.351901521 -0.315629318 [71] -2.254432908 0.192475570 -0.268305274 -0.054864650 -0.238350785 [76] -0.001967319 -1.793753941 0.524953602 0.472014989 -3.114820882 [81] -0.643230822 0.994044526 1.930373563 0.852416299 -0.649388086 [86] -1.314704279 1.272832474 0.528441244 1.083516639 -0.117630578 [91] -2.371995289 0.652732790 0.162507179 -0.348318716 -0.178124386 [96] -1.671633817 0.809640944 0.033814093 -0.323996628 0.032352131 > 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.004761304 1.010578755 -0.081795379 0.266841191 0.005020038 [6] 0.546599572 -0.948904081 1.051173979 0.423893825 1.005039943 [11] 1.705794520 0.715319156 0.278928573 -0.277272809 0.106747439 [16] 0.575311165 0.186741515 1.003896869 0.639912830 0.413588316 [21] -0.454928008 -0.749612641 -0.315525452 0.283140985 -1.366625354 [26] 1.138165206 1.858422479 1.753764298 -2.237100571 1.216147801 [31] -0.723068581 -0.668518106 0.589783374 1.284042702 1.490946050 [36] 1.894427244 -0.763944017 0.344568903 0.945747517 0.713113681 [41] 0.847399564 -0.394398734 -2.425218926 0.001557464 0.124947925 [46] 0.612739258 -0.424905262 -0.047878817 0.274539634 -0.152807666 [51] 0.537878572 1.590323216 -0.686896932 -0.771134263 -0.470567470 [56] -0.133521520 1.476999214 -3.198519512 -0.180516911 0.556697029 [61] -1.223819643 -0.561508481 0.059078906 -0.224508569 0.072399470 [66] -0.755218106 -0.672315036 -0.715613930 0.351901521 -0.315629318 [71] -2.254432908 0.192475570 -0.268305274 -0.054864650 -0.238350785 [76] -0.001967319 -1.793753941 0.524953602 0.472014989 -3.114820882 [81] -0.643230822 0.994044526 1.930373563 0.852416299 -0.649388086 [86] -1.314704279 1.272832474 0.528441244 1.083516639 -0.117630578 [91] -2.371995289 0.652732790 0.162507179 -0.348318716 -0.178124386 [96] -1.671633817 0.809640944 0.033814093 -0.323996628 0.032352131 > rowMin(tmp2) [1] -0.004761304 1.010578755 -0.081795379 0.266841191 0.005020038 [6] 0.546599572 -0.948904081 1.051173979 0.423893825 1.005039943 [11] 1.705794520 0.715319156 0.278928573 -0.277272809 0.106747439 [16] 0.575311165 0.186741515 1.003896869 0.639912830 0.413588316 [21] -0.454928008 -0.749612641 -0.315525452 0.283140985 -1.366625354 [26] 1.138165206 1.858422479 1.753764298 -2.237100571 1.216147801 [31] -0.723068581 -0.668518106 0.589783374 1.284042702 1.490946050 [36] 1.894427244 -0.763944017 0.344568903 0.945747517 0.713113681 [41] 0.847399564 -0.394398734 -2.425218926 0.001557464 0.124947925 [46] 0.612739258 -0.424905262 -0.047878817 0.274539634 -0.152807666 [51] 0.537878572 1.590323216 -0.686896932 -0.771134263 -0.470567470 [56] -0.133521520 1.476999214 -3.198519512 -0.180516911 0.556697029 [61] -1.223819643 -0.561508481 0.059078906 -0.224508569 0.072399470 [66] -0.755218106 -0.672315036 -0.715613930 0.351901521 -0.315629318 [71] -2.254432908 0.192475570 -0.268305274 -0.054864650 -0.238350785 [76] -0.001967319 -1.793753941 0.524953602 0.472014989 -3.114820882 [81] -0.643230822 0.994044526 1.930373563 0.852416299 -0.649388086 [86] -1.314704279 1.272832474 0.528441244 1.083516639 -0.117630578 [91] -2.371995289 0.652732790 0.162507179 -0.348318716 -0.178124386 [96] -1.671633817 0.809640944 0.033814093 -0.323996628 0.032352131 > > colMeans(tmp2) [1] 0.02203682 > colSums(tmp2) [1] 2.203682 > colVars(tmp2) [1] 1.066482 > colSd(tmp2) [1] 1.032706 > colMax(tmp2) [1] 1.930374 > colMin(tmp2) [1] -3.19852 > colMedians(tmp2) [1] 0.0464465 > colRanges(tmp2) [,1] [1,] -3.198520 [2,] 1.930374 > > 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] 1.24984586 -1.40863961 -2.44912456 3.85762761 0.04748163 0.53146549 [7] 2.11509255 4.18870775 5.95310412 -0.51895913 > colApply(tmp,quantile)[,1] [,1] [1,] -1.6776898 [2,] -0.6029950 [3,] 0.2333389 [4,] 0.7325361 [5,] 1.7364172 > > rowApply(tmp,sum) [1] -0.1717906 2.4209893 1.0733637 1.2253011 6.5935625 -0.4417559 [7] 2.5333439 0.9370189 2.8068847 -3.4103161 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 7 1 4 9 10 6 5 1 10 4 [2,] 9 7 8 1 2 1 2 2 4 7 [3,] 1 4 3 6 3 8 4 3 6 3 [4,] 10 9 7 7 7 3 7 10 7 1 [5,] 5 5 6 10 1 5 1 6 2 10 [6,] 2 3 1 5 6 4 6 9 5 5 [7,] 4 2 10 3 4 9 3 8 9 6 [8,] 3 10 2 8 8 7 8 4 8 8 [9,] 8 8 9 4 9 2 10 5 3 9 [10,] 6 6 5 2 5 10 9 7 1 2 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 3.4899164 -1.6291129 -1.1920805 0.3528428 -2.4651857 4.4564814 [7] -1.3926232 3.1694450 -1.5691569 1.5656638 0.8134165 1.6330319 [13] 0.2050322 -2.0940707 -2.3486763 -2.3422697 1.6618362 3.2108723 [19] -1.8740078 3.1887224 > colApply(tmp,quantile)[,1] [,1] [1,] -0.72793534 [2,] 0.02219205 [3,] 0.57880192 [4,] 1.66557104 [5,] 1.95128669 > > rowApply(tmp,sum) [1] -4.5262074 0.5598343 -4.1196382 12.8226007 2.1034880 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 19 20 16 4 9 [2,] 11 7 2 15 6 [3,] 2 9 15 10 5 [4,] 16 8 5 14 12 [5,] 6 5 3 12 4 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.66557104 -0.2266088 -1.6007973 0.3225532 -0.6145259 -0.06436142 [2,] 1.95128669 -0.3134041 -0.1520221 -0.2220277 -0.8808835 0.71902227 [3,] 0.57880192 -1.5986802 0.3415768 -0.8557472 -1.2545392 0.21929263 [4,] -0.72793534 0.9272693 0.6906708 0.8815886 0.7823245 2.87084128 [5,] 0.02219205 -0.4176891 -0.4715086 0.2264760 -0.4975616 0.71168669 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.5244170 0.8926100 -0.4038821 -0.4604657 -0.04467884 -1.5156394 [2,] 0.2092726 0.7994495 1.6277486 0.7588217 0.68445290 1.0764921 [3,] -0.5691586 -1.6469521 -0.7694073 -0.3374779 -0.28666236 1.0920682 [4,] -0.8776401 1.2435530 0.5758145 2.3619670 0.38227437 0.7112650 [5,] 0.3693199 1.8807846 -2.5994307 -0.7571813 0.07803044 0.2688461 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.7829827 -2.39368104 -1.536636 -0.64717268 -0.290702769 1.3546422 [2,] -1.2186667 -0.53254062 -1.173991 -2.19681430 0.599935921 -0.1371229 [3,] 0.8646391 0.77401928 -0.540894 -0.51649061 -0.007525995 0.3085308 [4,] -0.9385058 0.02862191 -1.479554 -0.02741485 0.804735972 1.8438070 [5,] -0.2854172 0.02950978 2.382399 1.04562272 0.555393120 -0.1589848 [,19] [,20] [1,] -0.1689464 -0.0520514 [2,] -1.6498511 0.6106765 [3,] -1.2543800 1.3393486 [4,] 2.3709918 0.3979260 [5,] -1.1718221 0.8928227 > > > 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.21-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.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 655 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 567 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-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.7133836 0.02680431 1.56387 -0.9237041 0.5192913 -0.02060518 0.1702799 col8 col9 col10 col11 col12 col13 col14 col15 row1 0.615088 1.888353 0.338858 0.3668615 1.147628 0.5701473 1.893718 -1.219286 col16 col17 col18 col19 col20 row1 0.9335816 1.548001 0.6699832 -0.4284587 0.498055 > tmp[,"col10"] col10 row1 0.3388580 row2 -1.4578209 row3 -2.3655916 row4 -1.6128579 row5 -0.9094991 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.7133836 0.02680431 1.563870455 -0.9237041 0.5192913 -0.02060518 row5 -0.9214457 -0.26875028 0.002202595 -1.9742629 -1.1598425 0.83100526 col7 col8 col9 col10 col11 col12 col13 row1 0.1702799 0.6150880 1.8883532 0.3388580 0.3668615 1.147628 0.5701473 row5 -1.1963345 -0.4269151 0.4070062 -0.9094991 -1.0868912 1.356926 0.2425511 col14 col15 col16 col17 col18 col19 col20 row1 1.8937185 -1.21928633 0.9335816 1.5480007 0.6699832 -0.4284587 0.4980550 row5 0.4593532 0.08938557 -1.6553121 0.7835699 1.7292990 -0.6809160 0.3223914 > tmp[,c("col6","col20")] col6 col20 row1 -0.02060518 0.4980550 row2 -0.61319742 0.9157738 row3 -0.26100947 -0.3057905 row4 0.28902538 0.4544973 row5 0.83100526 0.3223914 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.02060518 0.4980550 row5 0.83100526 0.3223914 > > > > > 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.55154 50.67787 48.81654 50.11447 49.8454 106.1039 51.15918 52.3895 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.56338 51.29243 49.40639 52.53652 48.92134 50.1899 49.91009 51.10944 col17 col18 col19 col20 row1 50.90843 50.13035 49.71517 105.9384 > tmp[,"col10"] col10 row1 51.29243 row2 30.07349 row3 29.34995 row4 29.49924 row5 49.68375 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.55154 50.67787 48.81654 50.11447 49.84540 106.1039 51.15918 52.38950 row5 51.81781 51.15964 51.38113 49.28570 49.23834 104.8138 49.46152 49.59831 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.56338 51.29243 49.40639 52.53652 48.92134 50.18990 49.91009 51.10944 row5 49.22621 49.68375 50.77298 51.60885 49.93971 49.57242 51.84902 48.22516 col17 col18 col19 col20 row1 50.90843 50.13035 49.71517 105.9384 row5 49.33156 51.72416 52.22222 104.5645 > tmp[,c("col6","col20")] col6 col20 row1 106.10388 105.93844 row2 75.73809 73.37515 row3 75.84758 74.43098 row4 75.39752 74.94927 row5 104.81376 104.56447 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 106.1039 105.9384 row5 104.8138 104.5645 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 106.1039 105.9384 row5 104.8138 104.5645 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.44068482 [2,] -0.81782327 [3,] 0.04818247 [4,] -0.59071785 [5,] 0.08940211 > tmp[,c("col17","col7")] col17 col7 [1,] -1.1216405 0.3561719 [2,] -1.7336123 -1.4249430 [3,] -1.1278817 0.4059755 [4,] 1.7472586 -0.7627835 [5,] -0.2776739 -0.5794709 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.07182447 -0.752702741 [2,] -0.93657030 1.255324174 [3,] 1.16655806 1.343968032 [4,] 0.90760519 0.001856285 [5,] 0.94247636 0.733069422 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.07182447 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.07182447 [2,] -0.93657030 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 0.5849057 0.4556171 -0.407111 -0.5074137 0.7949584 0.5999183 0.9264043 row1 0.3471362 -2.4234408 1.395475 1.0269116 -1.3889610 0.2930948 0.2121745 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 -0.7742959 0.9114535 -0.1055143 -2.806809 0.04213806 1.322752 0.4325303 row1 -1.6024350 0.4840941 0.6040374 1.451919 -0.38319625 -0.308092 1.8123360 [,15] [,16] [,17] [,18] [,19] [,20] row3 0.4733797 -1.437108 -0.9398305 -0.2263614 0.4332833 1.163565 row1 -0.5258308 -1.238057 0.8865703 -0.1081759 -0.1674473 1.425609 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.08506014 0.1053045 0.01761123 0.2442667 0.177273 0.7853408 -2.551713 [,8] [,9] [,10] row2 1.3321 0.602103 -0.8700179 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -1.733111 -0.4444153 -0.5900727 -1.435366 0.5120701 -0.6099006 1.442063 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.347742 0.1938498 -1.888705 -2.905689 0.9092773 0.09930637 0.5389707 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.4004553 0.6002938 0.2757323 0.5231815 1.313187 0.7897857 > > > 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: 0x600003974240> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a52a1584c" [2] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a5eac0ff5" [3] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a724bce61" [4] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a4eda7ce6" [5] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a6a3e087b" [6] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307ae9ef9bb" [7] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a671d6b7c" [8] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a3c7bcec7" [9] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a644489d6" [10] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a4fb57407" [11] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a11d4a073" [12] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a1e71e72a" [13] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a47ff8603" [14] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a58b753e2" [15] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM1307a6be447ee" > > > ### 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: 0x600003974720> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600003974720> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600003974720> > rowMedians(tmp) [1] -0.174817126 -0.268350174 -0.168776215 -0.422084318 0.187600004 [6] 0.400949016 -0.241724469 -0.301539591 -0.085182338 -0.101416361 [11] 0.060826417 -0.015336896 0.409639255 -0.253199872 -0.009913941 [16] 0.287212787 0.166830751 0.295368008 0.376930269 0.002994767 [21] -0.197907457 -0.064195705 -0.444301337 0.132652811 -0.473376987 [26] -0.238237357 0.040256339 -0.053649797 0.192111828 -0.324518211 [31] -0.630559435 0.272074083 0.143551649 0.022111940 0.375393422 [36] 0.422834137 0.260172272 -0.072754642 -0.020260952 -0.637859697 [41] 0.077512038 0.386396244 -0.030430439 -0.193118849 -0.025119224 [46] -0.358390675 -0.134545191 -0.371672053 -0.169616472 -0.751056484 [51] 0.442142127 -0.135124010 -0.003785015 0.038345547 -0.275952979 [56] -0.187075771 -0.830470799 0.013926297 0.232356045 0.090696970 [61] -0.110861354 0.507715264 0.144437187 0.152678418 0.197305605 [66] -0.127997384 -0.019178800 0.236598141 0.103679054 -0.032946226 [71] -0.882055507 0.022943645 0.607702225 -0.565896377 0.297282811 [76] 0.063150609 0.223120706 -0.529333622 0.054964069 -0.164875788 [81] 0.110044294 0.084165020 0.247964760 0.436441254 0.142965846 [86] 0.140037572 -0.006659261 -0.418410219 0.111013640 -0.046832055 [91] 0.042233620 0.306758964 0.326843978 -0.399884943 0.009208307 [96] 0.027912289 -0.333103963 0.165581376 -0.328844094 0.568378912 [101] 0.085181849 0.128616372 0.603177550 -0.100289728 0.617170869 [106] -0.184402897 0.548014651 0.226002877 -0.229546069 -0.210756623 [111] 0.162201450 -0.656992316 -0.453898222 0.669942542 0.256436736 [116] -0.223446006 0.050015880 -0.127389591 -0.136482410 0.371596307 [121] -0.510349918 0.034673886 0.449493477 0.065383833 0.309026654 [126] -0.023411165 -0.202994735 0.392181602 0.464671575 -0.095335598 [131] -0.379514629 0.083456580 0.073235736 -0.760152874 -0.148050521 [136] -0.228954373 0.242393096 0.054406644 0.114729045 0.631898559 [141] 0.469357869 -0.778650798 -0.393071189 0.271731341 0.289348535 [146] -0.380620711 0.401308215 -0.679404198 -0.378732767 -0.202872062 [151] 0.442908700 -0.207793359 -0.109049950 -0.185772738 -0.284480095 [156] 0.454065160 -0.013903404 -0.144302193 -0.423333228 0.109639253 [161] -0.353075354 -0.620750224 -0.172012066 -0.180378638 0.334210078 [166] 0.218253606 -0.130819599 -0.051455523 0.557344389 -0.022763582 [171] 0.304126881 -0.300313724 0.207469112 -0.087619401 0.008655860 [176] -0.021149961 0.606814204 -0.291388829 -0.278405808 0.372431518 [181] -0.255578188 -0.608793884 -0.039103485 -0.094444221 0.013511630 [186] 0.180341341 -0.059403816 -0.374045093 -0.445153891 0.002668257 [191] 0.323572705 0.244142407 0.308469803 0.177226833 -0.072626632 [196] 0.095964255 0.361317510 -0.235873259 0.345630396 -0.294224366 [201] -0.022387565 0.231498506 -0.429078216 0.031784269 -0.002145585 [206] 0.533143800 0.217441197 -0.062394842 -0.021051846 -0.083802600 [211] -0.508855392 0.025725242 0.507319287 -0.070552022 0.082095404 [216] -0.149633958 -0.695136624 -0.347843435 0.037111718 0.256131692 [221] 0.047789831 0.381223140 -0.187830092 0.438449561 0.211200782 [226] -0.259109252 0.291787321 0.428892458 -0.103189792 -0.220798256 > > proc.time() user system elapsed 2.045 8.580 11.098
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x60000316c2a0> > .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: 0x60000316c2a0> > .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: 0x60000316c2a0> > .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: 0x60000316c2a0> > 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: 0x600003174300> > .Call("R_bm_AddColumn",P) <pointer: 0x600003174300> > .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: 0x600003174300> > .Call("R_bm_AddColumn",P) <pointer: 0x600003174300> > .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: 0x600003174300> > 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: 0x600003174480> > .Call("R_bm_AddColumn",P) <pointer: 0x600003174480> > .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: 0x600003174480> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600003174480> > .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: 0x600003174480> > > .Call("R_bm_RowMode",P) <pointer: 0x600003174480> > .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: 0x600003174480> > > .Call("R_bm_ColMode",P) <pointer: 0x600003174480> > .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: 0x600003174480> > 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: 0x600003174660> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600003174660> > .Call("R_bm_AddColumn",P) <pointer: 0x600003174660> > .Call("R_bm_AddColumn",P) <pointer: 0x600003174660> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile130a5287f8799" "BufferedMatrixFile130a54c9f6294" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile130a5287f8799" "BufferedMatrixFile130a54c9f6294" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600003174900> > .Call("R_bm_AddColumn",P) <pointer: 0x600003174900> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600003174900> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600003174900> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600003174900> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600003174900> > .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: 0x600003174ae0> > .Call("R_bm_AddColumn",P) <pointer: 0x600003174ae0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600003174ae0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600003174ae0> > 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: 0x600003174cc0> > .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: 0x600003174cc0> > rm(P) > > proc.time() user system elapsed 0.343 0.130 0.474
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.339 0.087 0.417