Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-09-01 11:41 -0400 (Mon, 01 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" | 4824 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" | 4606 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4547 |
kunpeng2 | Linux (openEuler 24.03 LTS) | aarch64 | R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" | 4579 |
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-08-29 14:38:27 -0400 (Fri, 29 Aug 2025) |
EndedAt: 2025-08-29 14:39:13 -0400 (Fri, 29 Aug 2025) |
EllapsedTime: 45.2 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.342 0.132 0.469
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] "Fri Aug 29 14:38:50 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Aug 29 14:38:50 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: 0x600001fbc120> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Aug 29 14:38:53 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Aug 29 14:38:54 2025" > > ColMode(tmp2) <pointer: 0x600001fbc120> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 98.3739082 0.896487677 0.38909064 -1.8209288 [2,] 1.1101356 -1.185460583 -0.08268782 0.6749717 [3,] 0.3659083 0.265364120 -0.57646601 -0.5858910 [4,] -0.6230144 0.008176239 -0.04478246 -0.2721344 > 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 : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 98.3739082 0.896487677 0.38909064 1.8209288 [2,] 1.1101356 1.185460583 0.08268782 0.6749717 [3,] 0.3659083 0.265364120 0.57646601 0.5858910 [4,] 0.6230144 0.008176239 0.04478246 0.2721344 > 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 : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9183622 0.94683033 0.6237713 1.3494180 [2,] 1.0536297 1.08878858 0.2875549 0.8215666 [3,] 0.6049035 0.51513505 0.7592536 0.7654352 [4,] 0.7893126 0.09042256 0.2116187 0.5216650 > > 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 : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 222.55753 35.36479 31.62680 40.31511 [2,] 36.64643 37.07335 27.95824 33.89064 [3,] 31.41494 30.41671 33.16900 33.24024 [4,] 33.51614 25.91240 27.16097 30.48878 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600001fb4360> > exp(tmp5) <pointer: 0x600001fb4360> > log(tmp5,2) <pointer: 0x600001fb4360> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 463.2243 > Min(tmp5) [1] 53.1973 > mean(tmp5) [1] 72.8588 > Sum(tmp5) [1] 14571.76 > Var(tmp5) [1] 841.772 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.38519 72.96902 66.79877 67.76597 72.40220 72.00343 70.16148 71.18681 [9] 71.69859 72.21650 > rowSums(tmp5) [1] 1827.704 1459.380 1335.975 1355.319 1448.044 1440.069 1403.230 1423.736 [9] 1433.972 1444.330 > rowVars(tmp5) [1] 7722.97403 55.01789 48.12841 72.74219 79.46231 42.28656 [7] 89.22055 86.39812 101.04710 78.47143 > rowSd(tmp5) [1] 87.880453 7.417405 6.937464 8.528903 8.914164 6.502812 9.445663 [8] 9.295059 10.052219 8.858410 > rowMax(tmp5) [1] 463.22434 83.50508 79.94770 82.62979 90.39193 86.18476 87.59179 [8] 97.28265 90.08892 85.25590 > rowMin(tmp5) [1] 58.67932 58.19141 55.62590 53.93327 53.19730 63.46332 54.28606 56.84236 [9] 53.82065 55.72038 > > colMeans(tmp5) [1] 105.56566 68.08447 71.37111 72.12810 72.89717 75.12073 72.87969 [8] 72.90465 69.78017 71.19295 68.92717 70.07579 68.60768 69.24991 [15] 73.02848 73.53907 68.78703 69.88143 68.61377 74.54093 > colSums(tmp5) [1] 1055.6566 680.8447 713.7111 721.2810 728.9717 751.2073 728.7969 [8] 729.0465 697.8017 711.9295 689.2717 700.7579 686.0768 692.4991 [15] 730.2848 735.3907 687.8703 698.8143 686.1377 745.4093 > colVars(tmp5) [1] 15849.50567 98.10557 106.20904 43.83684 59.74224 46.96721 [7] 111.27801 84.31311 81.90146 49.86586 61.59589 64.51080 [13] 94.70063 28.56725 80.66941 84.78180 54.11841 93.40496 [19] 74.38972 95.45236 > colSd(tmp5) [1] 125.894820 9.904825 10.305777 6.620939 7.729310 6.853263 [7] 10.548839 9.182217 9.049943 7.061576 7.848305 8.031861 [13] 9.731425 5.344834 8.981615 9.207703 7.356522 9.664624 [19] 8.624948 9.769972 > colMax(tmp5) [1] 463.22434 84.37141 90.08892 83.91062 82.56448 86.18476 90.39193 [8] 87.59179 83.50508 82.79320 79.94770 82.35583 83.51514 78.71464 [15] 86.62558 84.51817 81.02928 82.27277 81.73046 97.28265 > colMin(tmp5) [1] 53.19730 53.93327 56.53200 63.45841 58.67932 63.95461 56.53906 58.41326 [9] 53.82065 64.61875 57.30342 56.84236 55.62590 63.80804 62.18587 59.29292 [17] 58.70505 54.28606 58.92002 62.53241 > > > ### 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] 91.38519 72.96902 66.79877 67.76597 72.40220 72.00343 70.16148 NA [9] 71.69859 72.21650 > rowSums(tmp5) [1] 1827.704 1459.380 1335.975 1355.319 1448.044 1440.069 1403.230 NA [9] 1433.972 1444.330 > rowVars(tmp5) [1] 7722.97403 55.01789 48.12841 72.74219 79.46231 42.28656 [7] 89.22055 90.89897 101.04710 78.47143 > rowSd(tmp5) [1] 87.880453 7.417405 6.937464 8.528903 8.914164 6.502812 9.445663 [8] 9.534095 10.052219 8.858410 > rowMax(tmp5) [1] 463.22434 83.50508 79.94770 82.62979 90.39193 86.18476 87.59179 [8] NA 90.08892 85.25590 > rowMin(tmp5) [1] 58.67932 58.19141 55.62590 53.93327 53.19730 63.46332 54.28606 NA [9] 53.82065 55.72038 > > colMeans(tmp5) [1] NA 68.08447 71.37111 72.12810 72.89717 75.12073 72.87969 72.90465 [9] 69.78017 71.19295 68.92717 70.07579 68.60768 69.24991 73.02848 73.53907 [17] 68.78703 69.88143 68.61377 74.54093 > colSums(tmp5) [1] NA 680.8447 713.7111 721.2810 728.9717 751.2073 728.7969 729.0465 [9] 697.8017 711.9295 689.2717 700.7579 686.0768 692.4991 730.2848 735.3907 [17] 687.8703 698.8143 686.1377 745.4093 > colVars(tmp5) [1] NA 98.10557 106.20904 43.83684 59.74224 46.96721 111.27801 [8] 84.31311 81.90146 49.86586 61.59589 64.51080 94.70063 28.56725 [15] 80.66941 84.78180 54.11841 93.40496 74.38972 95.45236 > colSd(tmp5) [1] NA 9.904825 10.305777 6.620939 7.729310 6.853263 10.548839 [8] 9.182217 9.049943 7.061576 7.848305 8.031861 9.731425 5.344834 [15] 8.981615 9.207703 7.356522 9.664624 8.624948 9.769972 > colMax(tmp5) [1] NA 84.37141 90.08892 83.91062 82.56448 86.18476 90.39193 87.59179 [9] 83.50508 82.79320 79.94770 82.35583 83.51514 78.71464 86.62558 84.51817 [17] 81.02928 82.27277 81.73046 97.28265 > colMin(tmp5) [1] NA 53.93327 56.53200 63.45841 58.67932 63.95461 56.53906 58.41326 [9] 53.82065 64.61875 57.30342 56.84236 55.62590 63.80804 62.18587 59.29292 [17] 58.70505 54.28606 58.92002 62.53241 > > Max(tmp5,na.rm=TRUE) [1] 463.2243 > Min(tmp5,na.rm=TRUE) [1] 53.1973 > mean(tmp5,na.rm=TRUE) [1] 72.85584 > Sum(tmp5,na.rm=TRUE) [1] 14498.31 > Var(tmp5,na.rm=TRUE) [1] 846.0216 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.38519 72.96902 66.79877 67.76597 72.40220 72.00343 70.16148 71.06779 [9] 71.69859 72.21650 > rowSums(tmp5,na.rm=TRUE) [1] 1827.704 1459.380 1335.975 1355.319 1448.044 1440.069 1403.230 1350.288 [9] 1433.972 1444.330 > rowVars(tmp5,na.rm=TRUE) [1] 7722.97403 55.01789 48.12841 72.74219 79.46231 42.28656 [7] 89.22055 90.89897 101.04710 78.47143 > rowSd(tmp5,na.rm=TRUE) [1] 87.880453 7.417405 6.937464 8.528903 8.914164 6.502812 9.445663 [8] 9.534095 10.052219 8.858410 > rowMax(tmp5,na.rm=TRUE) [1] 463.22434 83.50508 79.94770 82.62979 90.39193 86.18476 87.59179 [8] 97.28265 90.08892 85.25590 > rowMin(tmp5,na.rm=TRUE) [1] 58.67932 58.19141 55.62590 53.93327 53.19730 63.46332 54.28606 56.84236 [9] 53.82065 55.72038 > > colMeans(tmp5,na.rm=TRUE) [1] 109.13427 68.08447 71.37111 72.12810 72.89717 75.12073 72.87969 [8] 72.90465 69.78017 71.19295 68.92717 70.07579 68.60768 69.24991 [15] 73.02848 73.53907 68.78703 69.88143 68.61377 74.54093 > colSums(tmp5,na.rm=TRUE) [1] 982.2084 680.8447 713.7111 721.2810 728.9717 751.2073 728.7969 729.0465 [9] 697.8017 711.9295 689.2717 700.7579 686.0768 692.4991 730.2848 735.3907 [17] 687.8703 698.8143 686.1377 745.4093 > colVars(tmp5,na.rm=TRUE) [1] 17687.42541 98.10557 106.20904 43.83684 59.74224 46.96721 [7] 111.27801 84.31311 81.90146 49.86586 61.59589 64.51080 [13] 94.70063 28.56725 80.66941 84.78180 54.11841 93.40496 [19] 74.38972 95.45236 > colSd(tmp5,na.rm=TRUE) [1] 132.994080 9.904825 10.305777 6.620939 7.729310 6.853263 [7] 10.548839 9.182217 9.049943 7.061576 7.848305 8.031861 [13] 9.731425 5.344834 8.981615 9.207703 7.356522 9.664624 [19] 8.624948 9.769972 > colMax(tmp5,na.rm=TRUE) [1] 463.22434 84.37141 90.08892 83.91062 82.56448 86.18476 90.39193 [8] 87.59179 83.50508 82.79320 79.94770 82.35583 83.51514 78.71464 [15] 86.62558 84.51817 81.02928 82.27277 81.73046 97.28265 > colMin(tmp5,na.rm=TRUE) [1] 53.19730 53.93327 56.53200 63.45841 58.67932 63.95461 56.53906 58.41326 [9] 53.82065 64.61875 57.30342 56.84236 55.62590 63.80804 62.18587 59.29292 [17] 58.70505 54.28606 58.92002 62.53241 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.38519 72.96902 66.79877 67.76597 72.40220 72.00343 70.16148 NaN [9] 71.69859 72.21650 > rowSums(tmp5,na.rm=TRUE) [1] 1827.704 1459.380 1335.975 1355.319 1448.044 1440.069 1403.230 0.000 [9] 1433.972 1444.330 > rowVars(tmp5,na.rm=TRUE) [1] 7722.97403 55.01789 48.12841 72.74219 79.46231 42.28656 [7] 89.22055 NA 101.04710 78.47143 > rowSd(tmp5,na.rm=TRUE) [1] 87.880453 7.417405 6.937464 8.528903 8.914164 6.502812 9.445663 [8] NA 10.052219 8.858410 > rowMax(tmp5,na.rm=TRUE) [1] 463.22434 83.50508 79.94770 82.62979 90.39193 86.18476 87.59179 [8] NA 90.08892 85.25590 > rowMin(tmp5,na.rm=TRUE) [1] 58.67932 58.19141 55.62590 53.93327 53.19730 63.46332 54.28606 NA [9] 53.82065 55.72038 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] NaN 68.34034 71.40674 72.22194 73.80403 74.05446 73.89607 72.97214 [9] 70.52314 71.78254 69.66191 71.54617 68.25661 68.19828 72.51289 74.88209 [17] 68.26615 69.97240 67.44522 72.01407 > colSums(tmp5,na.rm=TRUE) [1] 0.0000 615.0631 642.6607 649.9975 664.2363 666.4902 665.0647 656.7493 [9] 634.7082 646.0429 626.9572 643.9155 614.3095 613.7845 652.6160 673.9388 [17] 614.3953 629.7516 607.0069 648.1266 > colVars(tmp5,na.rm=TRUE) [1] NA 109.63222 119.47089 49.21738 57.95803 40.04779 113.56608 [8] 94.80100 85.92906 52.18837 63.22206 48.25191 105.15164 19.69636 [15] 87.76243 75.08784 57.83084 104.98746 68.32647 35.55256 > colSd(tmp5,na.rm=TRUE) [1] NA 10.470541 10.930274 7.015510 7.613017 6.328332 10.656739 [8] 9.736580 9.269793 7.224152 7.951230 6.946359 10.254347 4.438058 [15] 9.368160 8.665324 7.604659 10.246339 8.265983 5.962596 > colMax(tmp5,na.rm=TRUE) [1] -Inf 84.37141 90.08892 83.91062 82.56448 86.18476 90.39193 87.59179 [9] 83.50508 82.79320 79.94770 82.35583 83.51514 77.13419 86.62558 84.51817 [17] 81.02928 82.27277 81.73046 81.81236 > colMin(tmp5,na.rm=TRUE) [1] Inf 53.93327 56.53200 63.45841 58.67932 63.95461 56.53906 58.41326 [9] 53.82065 64.61875 57.30342 57.76629 55.62590 63.80804 62.18587 59.29292 [17] 58.70505 54.28606 58.92002 62.53241 > > > > > 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] 324.9210 190.6371 167.4067 255.6073 122.4824 135.5269 118.7113 289.3302 [9] 206.1670 248.7469 > apply(copymatrix,1,var,na.rm=TRUE) [1] 324.9210 190.6371 167.4067 255.6073 122.4824 135.5269 118.7113 289.3302 [9] 206.1670 248.7469 > > > > 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.136868e-13 -5.684342e-14 -2.842171e-14 -1.136868e-13 -2.131628e-14 [6] -5.684342e-14 -5.684342e-14 -5.684342e-14 -8.526513e-14 -2.842171e-14 [11] -2.273737e-13 1.705303e-13 5.684342e-14 1.705303e-13 -1.136868e-13 [16] 1.705303e-13 2.842171e-14 5.684342e-14 -1.136868e-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) + } 3 11 8 19 7 11 5 9 4 7 6 15 7 7 2 16 9 16 9 17 3 17 6 8 5 9 6 19 3 11 10 7 9 12 8 12 5 20 2 10 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.346645 > Min(tmp) [1] -2.120931 > mean(tmp) [1] 0.0184276 > Sum(tmp) [1] 1.84276 > Var(tmp) [1] 1.052314 > > rowMeans(tmp) [1] 0.0184276 > rowSums(tmp) [1] 1.84276 > rowVars(tmp) [1] 1.052314 > rowSd(tmp) [1] 1.025824 > rowMax(tmp) [1] 2.346645 > rowMin(tmp) [1] -2.120931 > > colMeans(tmp) [1] -0.75561533 0.42781465 -2.02392153 2.34130628 -1.47965356 0.20799728 [7] 0.99312795 1.77001915 -1.00373384 0.52472113 1.21751203 -0.30036343 [13] -1.00877819 0.81011660 0.45998435 -0.12939267 -0.28278668 1.50827059 [19] -0.61005262 -1.74393638 0.12885096 0.68247985 1.35105519 1.29080280 [25] 0.40319212 0.69368052 0.03377035 -0.59348378 0.49053277 -0.77597459 [31] 0.64671029 -2.12093101 0.92483575 -0.36236481 -0.73956585 0.85912176 [37] -1.08808140 -0.86994065 -0.15826151 0.58435134 0.18528284 0.86123414 [43] -0.21270433 -1.06465342 1.39236855 -0.25686671 -0.36867577 -0.38651453 [49] 0.86428634 0.07777319 1.19610884 0.28730357 0.86363628 1.44086616 [55] -1.57449766 -0.14575926 -1.96969998 -1.06790119 -0.31531964 1.73438775 [61] -1.50877092 -0.39282592 0.93404292 0.22431793 0.49025415 1.05746137 [67] 0.98050478 -0.16516685 -0.11076256 -1.91865064 -1.05368727 -0.37723454 [73] 1.48417267 -1.88419200 0.56201265 -0.06020666 2.34664496 1.30611019 [79] 0.22042588 -1.17771917 -1.25871239 -1.21539544 0.94245668 0.87123148 [85] 0.13894369 -1.52612581 -0.84675175 -1.23864113 -0.39265620 1.17169895 [91] -0.33427507 0.75912885 0.48331270 -0.78582672 -0.37108874 -0.61723236 [97] -0.69432825 1.45820580 -0.35920573 0.85721908 > colSums(tmp) [1] -0.75561533 0.42781465 -2.02392153 2.34130628 -1.47965356 0.20799728 [7] 0.99312795 1.77001915 -1.00373384 0.52472113 1.21751203 -0.30036343 [13] -1.00877819 0.81011660 0.45998435 -0.12939267 -0.28278668 1.50827059 [19] -0.61005262 -1.74393638 0.12885096 0.68247985 1.35105519 1.29080280 [25] 0.40319212 0.69368052 0.03377035 -0.59348378 0.49053277 -0.77597459 [31] 0.64671029 -2.12093101 0.92483575 -0.36236481 -0.73956585 0.85912176 [37] -1.08808140 -0.86994065 -0.15826151 0.58435134 0.18528284 0.86123414 [43] -0.21270433 -1.06465342 1.39236855 -0.25686671 -0.36867577 -0.38651453 [49] 0.86428634 0.07777319 1.19610884 0.28730357 0.86363628 1.44086616 [55] -1.57449766 -0.14575926 -1.96969998 -1.06790119 -0.31531964 1.73438775 [61] -1.50877092 -0.39282592 0.93404292 0.22431793 0.49025415 1.05746137 [67] 0.98050478 -0.16516685 -0.11076256 -1.91865064 -1.05368727 -0.37723454 [73] 1.48417267 -1.88419200 0.56201265 -0.06020666 2.34664496 1.30611019 [79] 0.22042588 -1.17771917 -1.25871239 -1.21539544 0.94245668 0.87123148 [85] 0.13894369 -1.52612581 -0.84675175 -1.23864113 -0.39265620 1.17169895 [91] -0.33427507 0.75912885 0.48331270 -0.78582672 -0.37108874 -0.61723236 [97] -0.69432825 1.45820580 -0.35920573 0.85721908 > 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.75561533 0.42781465 -2.02392153 2.34130628 -1.47965356 0.20799728 [7] 0.99312795 1.77001915 -1.00373384 0.52472113 1.21751203 -0.30036343 [13] -1.00877819 0.81011660 0.45998435 -0.12939267 -0.28278668 1.50827059 [19] -0.61005262 -1.74393638 0.12885096 0.68247985 1.35105519 1.29080280 [25] 0.40319212 0.69368052 0.03377035 -0.59348378 0.49053277 -0.77597459 [31] 0.64671029 -2.12093101 0.92483575 -0.36236481 -0.73956585 0.85912176 [37] -1.08808140 -0.86994065 -0.15826151 0.58435134 0.18528284 0.86123414 [43] -0.21270433 -1.06465342 1.39236855 -0.25686671 -0.36867577 -0.38651453 [49] 0.86428634 0.07777319 1.19610884 0.28730357 0.86363628 1.44086616 [55] -1.57449766 -0.14575926 -1.96969998 -1.06790119 -0.31531964 1.73438775 [61] -1.50877092 -0.39282592 0.93404292 0.22431793 0.49025415 1.05746137 [67] 0.98050478 -0.16516685 -0.11076256 -1.91865064 -1.05368727 -0.37723454 [73] 1.48417267 -1.88419200 0.56201265 -0.06020666 2.34664496 1.30611019 [79] 0.22042588 -1.17771917 -1.25871239 -1.21539544 0.94245668 0.87123148 [85] 0.13894369 -1.52612581 -0.84675175 -1.23864113 -0.39265620 1.17169895 [91] -0.33427507 0.75912885 0.48331270 -0.78582672 -0.37108874 -0.61723236 [97] -0.69432825 1.45820580 -0.35920573 0.85721908 > colMin(tmp) [1] -0.75561533 0.42781465 -2.02392153 2.34130628 -1.47965356 0.20799728 [7] 0.99312795 1.77001915 -1.00373384 0.52472113 1.21751203 -0.30036343 [13] -1.00877819 0.81011660 0.45998435 -0.12939267 -0.28278668 1.50827059 [19] -0.61005262 -1.74393638 0.12885096 0.68247985 1.35105519 1.29080280 [25] 0.40319212 0.69368052 0.03377035 -0.59348378 0.49053277 -0.77597459 [31] 0.64671029 -2.12093101 0.92483575 -0.36236481 -0.73956585 0.85912176 [37] -1.08808140 -0.86994065 -0.15826151 0.58435134 0.18528284 0.86123414 [43] -0.21270433 -1.06465342 1.39236855 -0.25686671 -0.36867577 -0.38651453 [49] 0.86428634 0.07777319 1.19610884 0.28730357 0.86363628 1.44086616 [55] -1.57449766 -0.14575926 -1.96969998 -1.06790119 -0.31531964 1.73438775 [61] -1.50877092 -0.39282592 0.93404292 0.22431793 0.49025415 1.05746137 [67] 0.98050478 -0.16516685 -0.11076256 -1.91865064 -1.05368727 -0.37723454 [73] 1.48417267 -1.88419200 0.56201265 -0.06020666 2.34664496 1.30611019 [79] 0.22042588 -1.17771917 -1.25871239 -1.21539544 0.94245668 0.87123148 [85] 0.13894369 -1.52612581 -0.84675175 -1.23864113 -0.39265620 1.17169895 [91] -0.33427507 0.75912885 0.48331270 -0.78582672 -0.37108874 -0.61723236 [97] -0.69432825 1.45820580 -0.35920573 0.85721908 > colMedians(tmp) [1] -0.75561533 0.42781465 -2.02392153 2.34130628 -1.47965356 0.20799728 [7] 0.99312795 1.77001915 -1.00373384 0.52472113 1.21751203 -0.30036343 [13] -1.00877819 0.81011660 0.45998435 -0.12939267 -0.28278668 1.50827059 [19] -0.61005262 -1.74393638 0.12885096 0.68247985 1.35105519 1.29080280 [25] 0.40319212 0.69368052 0.03377035 -0.59348378 0.49053277 -0.77597459 [31] 0.64671029 -2.12093101 0.92483575 -0.36236481 -0.73956585 0.85912176 [37] -1.08808140 -0.86994065 -0.15826151 0.58435134 0.18528284 0.86123414 [43] -0.21270433 -1.06465342 1.39236855 -0.25686671 -0.36867577 -0.38651453 [49] 0.86428634 0.07777319 1.19610884 0.28730357 0.86363628 1.44086616 [55] -1.57449766 -0.14575926 -1.96969998 -1.06790119 -0.31531964 1.73438775 [61] -1.50877092 -0.39282592 0.93404292 0.22431793 0.49025415 1.05746137 [67] 0.98050478 -0.16516685 -0.11076256 -1.91865064 -1.05368727 -0.37723454 [73] 1.48417267 -1.88419200 0.56201265 -0.06020666 2.34664496 1.30611019 [79] 0.22042588 -1.17771917 -1.25871239 -1.21539544 0.94245668 0.87123148 [85] 0.13894369 -1.52612581 -0.84675175 -1.23864113 -0.39265620 1.17169895 [91] -0.33427507 0.75912885 0.48331270 -0.78582672 -0.37108874 -0.61723236 [97] -0.69432825 1.45820580 -0.35920573 0.85721908 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.7556153 0.4278146 -2.023922 2.341306 -1.479654 0.2079973 0.9931279 [2,] -0.7556153 0.4278146 -2.023922 2.341306 -1.479654 0.2079973 0.9931279 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.770019 -1.003734 0.5247211 1.217512 -0.3003634 -1.008778 0.8101166 [2,] 1.770019 -1.003734 0.5247211 1.217512 -0.3003634 -1.008778 0.8101166 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.4599844 -0.1293927 -0.2827867 1.508271 -0.6100526 -1.743936 0.128851 [2,] 0.4599844 -0.1293927 -0.2827867 1.508271 -0.6100526 -1.743936 0.128851 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.6824799 1.351055 1.290803 0.4031921 0.6936805 0.03377035 -0.5934838 [2,] 0.6824799 1.351055 1.290803 0.4031921 0.6936805 0.03377035 -0.5934838 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.4905328 -0.7759746 0.6467103 -2.120931 0.9248358 -0.3623648 -0.7395658 [2,] 0.4905328 -0.7759746 0.6467103 -2.120931 0.9248358 -0.3623648 -0.7395658 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.8591218 -1.088081 -0.8699407 -0.1582615 0.5843513 0.1852828 0.8612341 [2,] 0.8591218 -1.088081 -0.8699407 -0.1582615 0.5843513 0.1852828 0.8612341 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.2127043 -1.064653 1.392369 -0.2568667 -0.3686758 -0.3865145 0.8642863 [2,] -0.2127043 -1.064653 1.392369 -0.2568667 -0.3686758 -0.3865145 0.8642863 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.07777319 1.196109 0.2873036 0.8636363 1.440866 -1.574498 -0.1457593 [2,] 0.07777319 1.196109 0.2873036 0.8636363 1.440866 -1.574498 -0.1457593 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.9697 -1.067901 -0.3153196 1.734388 -1.508771 -0.3928259 0.9340429 [2,] -1.9697 -1.067901 -0.3153196 1.734388 -1.508771 -0.3928259 0.9340429 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.2243179 0.4902542 1.057461 0.9805048 -0.1651668 -0.1107626 -1.918651 [2,] 0.2243179 0.4902542 1.057461 0.9805048 -0.1651668 -0.1107626 -1.918651 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -1.053687 -0.3772345 1.484173 -1.884192 0.5620127 -0.06020666 2.346645 [2,] -1.053687 -0.3772345 1.484173 -1.884192 0.5620127 -0.06020666 2.346645 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 1.30611 0.2204259 -1.177719 -1.258712 -1.215395 0.9424567 0.8712315 [2,] 1.30611 0.2204259 -1.177719 -1.258712 -1.215395 0.9424567 0.8712315 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.1389437 -1.526126 -0.8467518 -1.238641 -0.3926562 1.171699 -0.3342751 [2,] 0.1389437 -1.526126 -0.8467518 -1.238641 -0.3926562 1.171699 -0.3342751 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.7591288 0.4833127 -0.7858267 -0.3710887 -0.6172324 -0.6943282 1.458206 [2,] 0.7591288 0.4833127 -0.7858267 -0.3710887 -0.6172324 -0.6943282 1.458206 [,99] [,100] [1,] -0.3592057 0.8572191 [2,] -0.3592057 0.8572191 > > > Max(tmp2) [1] 2.808825 > Min(tmp2) [1] -2.381706 > mean(tmp2) [1] -0.05668672 > Sum(tmp2) [1] -5.668672 > Var(tmp2) [1] 0.9684776 > > rowMeans(tmp2) [1] 1.26554376 0.98916159 -0.27727819 -0.38712195 -0.68874406 -0.50814845 [7] -1.60961458 -0.18050082 1.67039076 1.11135191 0.38394376 -0.29799700 [13] 1.07600232 0.32215771 -1.29189314 -1.19045609 -0.68267679 0.07746111 [19] -1.19681644 -0.47272672 -0.80273382 0.05126321 -0.17223939 0.41118533 [25] -0.72638093 -0.57149377 0.55600235 1.17380316 -2.09512187 -1.61249571 [31] -0.87637525 2.80882509 0.31496371 -0.17654798 -1.25020803 -0.59682143 [37] 0.53653995 -1.59123575 -1.76909322 -0.89940523 -0.14901690 -0.72238568 [43] 0.82226412 0.11749546 0.80745437 -2.38170577 -1.44720060 0.57123847 [49] -0.57107327 -1.38067178 0.61538279 0.25880083 -1.72884353 -0.20709001 [55] 0.53784736 -0.58496641 -0.41161841 1.07768325 -0.55469945 1.02898351 [61] 0.27845380 0.44314342 0.49229450 1.18573980 0.67239124 0.40610370 [67] -1.13134514 -0.40815218 -1.00517015 -1.29717134 1.27030403 0.08105122 [73] 0.02425391 -0.20193783 -1.05643361 -0.20418033 1.81351598 -0.11035349 [79] -1.11856133 0.25159299 1.20166320 0.77265071 0.84837277 -0.25890548 [85] 1.34125558 -1.33776888 -0.64954766 0.68089562 0.11400388 -1.09006969 [91] 0.13592739 1.01631756 0.11587628 1.82722236 0.23014357 1.25998601 [97] 1.53921926 -0.53395808 0.84781693 -0.63766043 > rowSums(tmp2) [1] 1.26554376 0.98916159 -0.27727819 -0.38712195 -0.68874406 -0.50814845 [7] -1.60961458 -0.18050082 1.67039076 1.11135191 0.38394376 -0.29799700 [13] 1.07600232 0.32215771 -1.29189314 -1.19045609 -0.68267679 0.07746111 [19] -1.19681644 -0.47272672 -0.80273382 0.05126321 -0.17223939 0.41118533 [25] -0.72638093 -0.57149377 0.55600235 1.17380316 -2.09512187 -1.61249571 [31] -0.87637525 2.80882509 0.31496371 -0.17654798 -1.25020803 -0.59682143 [37] 0.53653995 -1.59123575 -1.76909322 -0.89940523 -0.14901690 -0.72238568 [43] 0.82226412 0.11749546 0.80745437 -2.38170577 -1.44720060 0.57123847 [49] -0.57107327 -1.38067178 0.61538279 0.25880083 -1.72884353 -0.20709001 [55] 0.53784736 -0.58496641 -0.41161841 1.07768325 -0.55469945 1.02898351 [61] 0.27845380 0.44314342 0.49229450 1.18573980 0.67239124 0.40610370 [67] -1.13134514 -0.40815218 -1.00517015 -1.29717134 1.27030403 0.08105122 [73] 0.02425391 -0.20193783 -1.05643361 -0.20418033 1.81351598 -0.11035349 [79] -1.11856133 0.25159299 1.20166320 0.77265071 0.84837277 -0.25890548 [85] 1.34125558 -1.33776888 -0.64954766 0.68089562 0.11400388 -1.09006969 [91] 0.13592739 1.01631756 0.11587628 1.82722236 0.23014357 1.25998601 [97] 1.53921926 -0.53395808 0.84781693 -0.63766043 > 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.26554376 0.98916159 -0.27727819 -0.38712195 -0.68874406 -0.50814845 [7] -1.60961458 -0.18050082 1.67039076 1.11135191 0.38394376 -0.29799700 [13] 1.07600232 0.32215771 -1.29189314 -1.19045609 -0.68267679 0.07746111 [19] -1.19681644 -0.47272672 -0.80273382 0.05126321 -0.17223939 0.41118533 [25] -0.72638093 -0.57149377 0.55600235 1.17380316 -2.09512187 -1.61249571 [31] -0.87637525 2.80882509 0.31496371 -0.17654798 -1.25020803 -0.59682143 [37] 0.53653995 -1.59123575 -1.76909322 -0.89940523 -0.14901690 -0.72238568 [43] 0.82226412 0.11749546 0.80745437 -2.38170577 -1.44720060 0.57123847 [49] -0.57107327 -1.38067178 0.61538279 0.25880083 -1.72884353 -0.20709001 [55] 0.53784736 -0.58496641 -0.41161841 1.07768325 -0.55469945 1.02898351 [61] 0.27845380 0.44314342 0.49229450 1.18573980 0.67239124 0.40610370 [67] -1.13134514 -0.40815218 -1.00517015 -1.29717134 1.27030403 0.08105122 [73] 0.02425391 -0.20193783 -1.05643361 -0.20418033 1.81351598 -0.11035349 [79] -1.11856133 0.25159299 1.20166320 0.77265071 0.84837277 -0.25890548 [85] 1.34125558 -1.33776888 -0.64954766 0.68089562 0.11400388 -1.09006969 [91] 0.13592739 1.01631756 0.11587628 1.82722236 0.23014357 1.25998601 [97] 1.53921926 -0.53395808 0.84781693 -0.63766043 > rowMin(tmp2) [1] 1.26554376 0.98916159 -0.27727819 -0.38712195 -0.68874406 -0.50814845 [7] -1.60961458 -0.18050082 1.67039076 1.11135191 0.38394376 -0.29799700 [13] 1.07600232 0.32215771 -1.29189314 -1.19045609 -0.68267679 0.07746111 [19] -1.19681644 -0.47272672 -0.80273382 0.05126321 -0.17223939 0.41118533 [25] -0.72638093 -0.57149377 0.55600235 1.17380316 -2.09512187 -1.61249571 [31] -0.87637525 2.80882509 0.31496371 -0.17654798 -1.25020803 -0.59682143 [37] 0.53653995 -1.59123575 -1.76909322 -0.89940523 -0.14901690 -0.72238568 [43] 0.82226412 0.11749546 0.80745437 -2.38170577 -1.44720060 0.57123847 [49] -0.57107327 -1.38067178 0.61538279 0.25880083 -1.72884353 -0.20709001 [55] 0.53784736 -0.58496641 -0.41161841 1.07768325 -0.55469945 1.02898351 [61] 0.27845380 0.44314342 0.49229450 1.18573980 0.67239124 0.40610370 [67] -1.13134514 -0.40815218 -1.00517015 -1.29717134 1.27030403 0.08105122 [73] 0.02425391 -0.20193783 -1.05643361 -0.20418033 1.81351598 -0.11035349 [79] -1.11856133 0.25159299 1.20166320 0.77265071 0.84837277 -0.25890548 [85] 1.34125558 -1.33776888 -0.64954766 0.68089562 0.11400388 -1.09006969 [91] 0.13592739 1.01631756 0.11587628 1.82722236 0.23014357 1.25998601 [97] 1.53921926 -0.53395808 0.84781693 -0.63766043 > > colMeans(tmp2) [1] -0.05668672 > colSums(tmp2) [1] -5.668672 > colVars(tmp2) [1] 0.9684776 > colSd(tmp2) [1] 0.9841126 > colMax(tmp2) [1] 2.808825 > colMin(tmp2) [1] -2.381706 > colMedians(tmp2) [1] -0.1296852 > colRanges(tmp2) [,1] [1,] -2.381706 [2,] 2.808825 > > 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] 3.3397800 1.0904356 -3.4566458 -0.8744355 1.2282121 2.1245634 [7] -1.4757226 7.0879422 -3.0682865 -3.3184837 > colApply(tmp,quantile)[,1] [,1] [1,] -1.1389430 [2,] -0.6679934 [3,] 0.2008189 [4,] 1.1909842 [5,] 2.4436713 > > rowApply(tmp,sum) [1] 1.4999869 -2.3909145 3.1945146 -0.4265465 1.8691479 -6.4591959 [7] -1.4106705 1.1192734 1.2610156 4.4207485 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 1 10 3 8 6 2 8 9 6 [2,] 9 3 4 1 10 9 4 6 3 5 [3,] 3 6 3 4 3 7 1 7 8 1 [4,] 5 4 6 9 6 2 6 10 4 2 [5,] 6 5 8 10 7 10 9 1 1 3 [6,] 7 8 5 5 5 3 5 9 5 9 [7,] 10 7 1 6 1 8 7 3 6 4 [8,] 2 10 9 8 9 5 8 4 10 10 [9,] 4 2 7 2 2 4 3 2 7 8 [10,] 8 9 2 7 4 1 10 5 2 7 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 3.8590542 1.6168191 2.1117593 0.2291656 2.1936448 1.4695152 [7] 2.1217078 1.5133579 -1.5202759 -1.8824574 3.5397831 -2.2554127 [13] 2.6431485 5.3205803 -0.5045242 1.0151329 -1.4569804 1.1169861 [19] -0.3944337 -2.9122026 > colApply(tmp,quantile)[,1] [,1] [1,] -0.1013236 [2,] 0.5569440 [3,] 0.6872570 [4,] 1.1310910 [5,] 1.5850858 > > rowApply(tmp,sum) [1] 0.4133551 -1.5843200 4.9015525 3.3629538 10.7308263 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 11 16 14 19 14 [2,] 10 11 11 20 3 [3,] 13 8 20 7 12 [4,] 7 10 12 5 13 [5,] 16 20 13 2 8 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.1013236 -0.18059045 0.08733855 -0.40659793 1.0888085 -0.8410462 [2,] 0.6872570 -0.04481721 -0.37149207 -0.08815874 1.2744142 -0.7975174 [3,] 0.5569440 0.34655713 2.01547801 0.43618729 0.4850981 1.6583356 [4,] 1.5850858 2.06674502 -0.32451913 -0.44207495 -0.9029174 0.9048621 [5,] 1.1310910 -0.57107538 0.70495397 0.72980994 0.2482414 0.5448812 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.7185067 1.8243137 0.006328581 -1.12552241 0.3367057 1.3122338 [2,] 1.1014071 0.0189198 0.071007681 0.30978415 -0.5618575 -1.6250179 [3,] 2.0012572 -0.9658052 -1.458945171 -0.38471434 1.1929816 -0.9471719 [4,] 0.1337188 -0.5067256 0.242881102 -0.09452149 0.9789670 -1.5064434 [5,] 0.6038314 1.1426551 -0.381548097 -0.58748335 1.5929864 0.5109867 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.3382116 1.5481338 -0.32837315 -0.20925881 -2.0014103 -0.4396331 [2,] -0.6723676 1.0581392 -0.71559307 -0.24975727 -0.9567730 1.0539276 [3,] 1.1129918 0.2107080 -0.01957981 0.09057525 1.1141935 -0.7074627 [4,] 0.6798295 -0.3979157 0.70695945 -0.49035709 0.4721830 -0.2573203 [5,] 1.1844833 2.9015149 -0.14793760 1.87393079 -0.0851736 1.4674746 [,19] [,20] [1,] 1.9173060 -0.69376248 [2,] -1.0526132 -0.02321171 [3,] -1.7290815 -0.10699451 [4,] 0.5749579 -0.06044060 [5,] -0.1050030 -2.02779330 > > > 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 : 649 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 563 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.8563498 1.394381 2.502012 0.5451004 -0.6581519 -0.1449589 -0.09719034 col8 col9 col10 col11 col12 col13 col14 row1 0.3401157 -0.8261249 0.08125335 -1.449776 0.1499486 0.2077708 -1.124929 col15 col16 col17 col18 col19 col20 row1 -1.441147 -1.162093 -0.02098297 -0.130579 -1.93271 0.6432885 > tmp[,"col10"] col10 row1 0.08125335 row2 1.24900569 row3 0.69842835 row4 -2.12670875 row5 -0.03176103 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -0.8563498 1.3943812 2.5020120 0.5451004 -0.6581519 -0.1449589 row5 0.2804808 -0.5424613 0.4783002 1.0597444 2.3754963 1.6013163 col7 col8 col9 col10 col11 col12 row1 -0.09719034 0.34011572 -0.8261249 0.08125335 -1.449776 0.1499486 row5 1.38631506 0.01443016 1.1855561 -0.03176103 -2.416186 -0.7986813 col13 col14 col15 col16 col17 col18 row1 0.2077708 -1.124929 -1.441147 -1.1620927 -0.02098297 -0.13057901 row5 -0.4284256 -2.357920 -0.602218 -0.6390658 -1.32748537 -0.06801223 col19 col20 row1 -1.932710 0.6432885 row5 -0.432232 -0.7328204 > tmp[,c("col6","col20")] col6 col20 row1 -0.1449589 0.6432885 row2 -2.1175906 1.5605520 row3 0.9980634 1.1211249 row4 0.7936142 -0.5283838 row5 1.6013163 -0.7328204 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.1449589 0.6432885 row5 1.6013163 -0.7328204 > > > > > 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 47.18083 50.00772 50.7459 48.34555 50.77203 105.7915 51.48958 49.71551 col9 col10 col11 col12 col13 col14 col15 col16 row1 52.63647 49.13149 51.4161 49.97383 49.92775 50.22606 50.73834 50.13748 col17 col18 col19 col20 row1 49.85437 47.86616 50.09812 104.7085 > tmp[,"col10"] col10 row1 49.13149 row2 30.96612 row3 28.97643 row4 30.37548 row5 51.34332 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 47.18083 50.00772 50.74590 48.34555 50.77203 105.7915 51.48958 49.71551 row5 50.61801 49.38762 51.21357 49.02019 50.49336 105.9181 50.38163 50.08867 col9 col10 col11 col12 col13 col14 col15 col16 row1 52.63647 49.13149 51.41610 49.97383 49.92775 50.22606 50.73834 50.13748 row5 50.68188 51.34332 50.90599 50.21426 48.18116 49.77316 50.85201 50.01671 col17 col18 col19 col20 row1 49.85437 47.86616 50.09812 104.7085 row5 49.88317 52.94709 50.02919 104.4779 > tmp[,c("col6","col20")] col6 col20 row1 105.79148 104.70854 row2 75.13857 76.00520 row3 73.63263 75.36975 row4 73.32273 73.71309 row5 105.91808 104.47785 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.7915 104.7085 row5 105.9181 104.4779 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.7915 104.7085 row5 105.9181 104.4779 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 1.3309605 [2,] -0.9015525 [3,] 0.4661180 [4,] -1.7399174 [5,] -1.0107492 > tmp[,c("col17","col7")] col17 col7 [1,] 0.86919554 1.2500554 [2,] -0.36442506 1.0236277 [3,] 0.07142114 -0.4165738 [4,] 0.16027852 -0.6948526 [5,] -1.45651449 0.1268175 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 2.4546640 0.4261299 [2,] -1.4042852 -1.3152780 [3,] -0.8621802 -0.8611462 [4,] -0.3983286 -0.3805307 [5,] -1.1121324 -1.7056706 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 2.454664 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 2.454664 [2,] -1.404285 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 -1.8546487 2.1184496 1.333557 -1.3520659 1.472989 -0.6425089 -0.40539049 row1 -0.2462442 0.4788581 0.153609 0.1700321 0.171550 1.1351679 0.07076641 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 -0.7231435 -0.6770315 -0.2900603 0.3224951 -1.518242 -0.41948194 -1.483452 row1 0.1785293 2.6911961 0.5839897 0.7248394 1.295565 -0.07366855 1.381846 [,15] [,16] [,17] [,18] [,19] [,20] row3 0.4055162 -0.6277314 1.3228725 0.6538780 -1.254679 0.7453950 row1 -0.8940702 0.9162105 0.8832033 -0.1148416 0.100857 -0.1090311 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 1.102667 1.573744 -1.510418 -1.121952 -1.190207 -0.8434692 0.3783235 [,8] [,9] [,10] row2 0.1180843 -0.3876045 -0.8158732 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.7072292 1.824009 0.2985847 -0.3685523 2.368948 -0.7133929 -1.08127 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.165243 0.3383453 -1.535159 -0.1794502 2.280243 -0.4471384 -0.01890834 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.6354976 1.81567 -0.05651266 1.188394 1.041144 -3.560632 > > > 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: 0x600001f98180> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9153165bd5a2" [2] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM915367268a25" [3] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM91531337b80b" [4] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM91532f13e408" [5] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM915342dfe15d" [6] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM91537844c2f7" [7] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM91536a5c23d0" [8] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM91534733633d" [9] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM91537eb85e4f" [10] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM91537a37d587" [11] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM915367a3d0c0" [12] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM915333de2268" [13] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM91533ca4f472" [14] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM915371ac8778" [15] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM915375f21195" > > > ### 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: 0x600001fbc1e0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600001fbc1e0> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600001fbc1e0> > rowMedians(tmp) [1] 0.237810235 -0.376877750 -0.483943768 -0.135682143 -0.600764496 [6] -0.188999930 -0.631969822 -0.334212836 0.086066514 -0.036548961 [11] 0.443426438 0.414968896 0.097294990 -0.042272880 0.349771626 [16] -0.182312258 0.614882679 -0.003914299 0.005400929 0.091374231 [21] -0.123038815 0.250676285 0.252193025 0.210390016 -0.367247786 [26] -0.388220455 -0.229714345 -0.040071216 0.126722615 0.828022959 [31] 0.366589974 0.026585722 -0.162944055 0.941440269 -0.825219174 [36] 0.191869378 0.171132065 -0.264470610 0.717176745 0.482927218 [41] -0.409467682 0.137958104 0.311811485 0.565662121 0.203347564 [46] -0.328136779 0.094899858 -0.145869858 0.114640289 -0.174942904 [51] 0.296312388 0.475886434 0.658429400 -0.553163990 -0.031314222 [56] -0.384483640 -0.451906523 0.108414189 -0.435206466 -0.219745065 [61] -0.052606172 0.296840332 -0.152477986 0.216584034 0.277428966 [66] 0.184230202 0.106324600 -0.150427116 -0.137491058 0.038951165 [71] 0.022670117 0.191950255 -0.086709408 0.104988971 0.415368045 [76] 0.316882287 -0.531488190 -0.219105618 -0.237886006 -0.292716837 [81] -0.231497637 0.815626337 -0.110487450 0.055227467 0.207442349 [86] 0.122981460 0.489374410 -0.080909877 -0.101485539 -0.265296396 [91] -0.102151358 0.549207880 0.352982024 0.226797577 -0.096314941 [96] -0.005805240 0.007425589 0.001632076 -0.058125949 -0.017493360 [101] -0.242869074 0.457348395 -0.278397153 0.509153048 -0.506466576 [106] 0.223469855 0.138517198 0.163688330 -0.169411786 0.450620486 [111] -0.367478529 0.154115700 -0.159514814 0.406189280 0.438434800 [116] -0.017371438 0.337768783 0.030657908 0.090363789 0.410313089 [121] -0.393982609 -0.261514759 -0.329893376 -0.444320058 -0.146988413 [126] -0.222620753 0.078305779 0.445504906 -0.278938839 0.117096341 [131] 0.265566506 0.198564477 0.252941239 0.251002391 -0.088128951 [136] -0.254440370 0.259138948 0.003276582 0.404762621 -0.116932977 [141] -0.288698894 0.338610866 0.060765097 -0.071066956 0.324232807 [146] -0.001507721 -0.264900413 0.293362555 0.669998317 0.277331225 [151] -0.556001961 0.006635471 0.504119060 -0.004465732 0.006328278 [156] 0.025989471 0.497978027 0.350134669 0.174069333 0.091258020 [161] 0.037440012 0.055892755 -0.166446317 0.495940537 0.594981620 [166] 0.061144198 -0.062846058 0.271955064 0.519904039 -0.176980485 [171] -0.264028163 -0.069046741 0.339503205 0.261246283 -0.216778560 [176] -0.636893395 0.220542832 -0.172013169 0.231457311 -0.694394148 [181] 0.093632999 -0.017984773 -0.401782736 -0.084107869 0.051098945 [186] -0.016666393 -0.344351085 -0.524000434 0.211833291 -0.472097916 [191] 0.054425387 0.063353131 0.439446394 0.005178400 0.472049513 [196] -0.327790923 0.173355660 -0.496703401 -0.152823077 0.017491905 [201] -0.263818552 0.188015743 0.028547099 -0.065650824 -0.338258974 [206] -0.101451941 0.184854488 0.031361569 0.302017602 0.193269201 [211] 0.213766681 0.054655705 -0.276255155 -0.296410459 -0.123802514 [216] -0.433717801 0.470839419 0.432802114 -0.012481060 -0.097085980 [221] 0.357675115 -0.471810173 -0.463253520 0.337806935 0.026110318 [226] 0.087664944 -0.174471840 -0.235999570 -0.137753409 0.126054328 > > proc.time() user system elapsed 2.216 9.056 12.563
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: 0x6000002401e0> > .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: 0x6000002401e0> > .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: 0x6000002401e0> > .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: 0x6000002401e0> > 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: 0x6000002704e0> > .Call("R_bm_AddColumn",P) <pointer: 0x6000002704e0> > .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: 0x6000002704e0> > .Call("R_bm_AddColumn",P) <pointer: 0x6000002704e0> > .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: 0x6000002704e0> > 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: 0x60000025c1e0> > .Call("R_bm_AddColumn",P) <pointer: 0x60000025c1e0> > .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: 0x60000025c1e0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x60000025c1e0> > .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: 0x60000025c1e0> > > .Call("R_bm_RowMode",P) <pointer: 0x60000025c1e0> > .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: 0x60000025c1e0> > > .Call("R_bm_ColMode",P) <pointer: 0x60000025c1e0> > .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: 0x60000025c1e0> > 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: 0x600000240780> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600000240780> > .Call("R_bm_AddColumn",P) <pointer: 0x600000240780> > .Call("R_bm_AddColumn",P) <pointer: 0x600000240780> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile918e43913f36" "BufferedMatrixFile918e67042ea0" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile918e43913f36" "BufferedMatrixFile918e67042ea0" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600000240a20> > .Call("R_bm_AddColumn",P) <pointer: 0x600000240a20> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600000240a20> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600000240a20> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600000240a20> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600000240a20> > .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: 0x600000240c00> > .Call("R_bm_AddColumn",P) <pointer: 0x600000240c00> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600000240c00> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600000240c00> > 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: 0x600000240de0> > .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: 0x600000240de0> > rm(P) > > proc.time() user system elapsed 0.356 0.139 0.498
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.345 0.105 0.441