Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-09-25 11:39 -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 00:52:34 -0400 (Tue, 23 Sep 2025) |
EndedAt: 2025-09-23 00:53:49 -0400 (Tue, 23 Sep 2025) |
EllapsedTime: 74.6 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 RC (2025-06-05 r88288) * using platform: x86_64-apple-darwin20 * R was compiled by Apple clang version 14.0.0 (clang-1400.0.29.202) GNU Fortran (GCC) 14.2.0 * running under: macOS Monterey 12.7.6 * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.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 14.0.0 (clang-1400.0.29.202)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking sizes of PDF files under ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.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-x86_64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.72.0’ ** using staged installation ** libs using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R installing to /Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.572 0.201 0.752
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/Users/biocbuild/bbs-3.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 480849 25.7 1056621 56.5 NA 634465 33.9 Vcells 891080 6.8 8388608 64.0 65536 2108740 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 00:53:07 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 00:53:08 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: 0x6000012480c0> > > > > 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 00:53:14 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 00:53:17 2025" > > ColMode(tmp2) <pointer: 0x6000012480c0> > > > > ### 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,] 99.1000701 -2.03269380 -1.2292769 -0.01913776 [2,] 0.7726599 0.08989433 1.5382828 -0.56799189 [3,] 0.8034903 1.09761069 0.2130690 0.04858485 [4,] 0.8881456 -0.81522677 -0.4011098 1.07648902 > 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,] 99.1000701 2.03269380 1.2292769 0.01913776 [2,] 0.7726599 0.08989433 1.5382828 0.56799189 [3,] 0.8034903 1.09761069 0.2130690 0.04858485 [4,] 0.8881456 0.81522677 0.4011098 1.07648902 > 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.9549018 1.4257257 1.1087276 0.1383393 [2,] 0.8790107 0.2998238 1.2402753 0.7536524 [3,] 0.8963762 1.0476692 0.4615940 0.2204197 [4,] 0.9424148 0.9028991 0.6333323 1.0375399 > > 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,] 223.64909 41.28995 37.31655 26.40253 [2,] 34.56277 28.08813 38.94104 33.10452 [3,] 34.76725 36.57430 29.82901 27.25278 [4,] 35.31229 34.84422 31.73443 36.45189 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600001258000> > exp(tmp5) <pointer: 0x600001258000> > log(tmp5,2) <pointer: 0x600001258000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 465.4963 > Min(tmp5) [1] 54.95341 > mean(tmp5) [1] 73.90025 > Sum(tmp5) [1] 14780.05 > Var(tmp5) [1] 848.7408 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 94.54250 69.12040 73.26993 71.22242 69.61656 70.13488 77.33502 70.83931 [9] 72.31276 70.60875 > rowSums(tmp5) [1] 1890.850 1382.408 1465.399 1424.448 1392.331 1402.698 1546.700 1416.786 [9] 1446.255 1412.175 > rowVars(tmp5) [1] 7690.62807 61.54943 84.79685 43.62230 79.42864 87.48675 [7] 67.80100 87.09717 84.80685 51.10292 > rowSd(tmp5) [1] 87.696226 7.845345 9.208520 6.604718 8.912275 9.353435 8.234136 [8] 9.332586 9.209064 7.148631 > rowMax(tmp5) [1] 465.49627 85.30524 87.46848 91.86122 85.74322 91.01770 94.24804 [8] 92.74434 87.44444 83.69263 > rowMin(tmp5) [1] 54.95341 57.50200 56.72309 62.25213 55.05644 55.52589 61.10431 57.19012 [9] 57.76746 55.21769 > > colMeans(tmp5) [1] 111.88449 69.93521 73.64946 70.77855 68.35211 75.68823 67.57137 [8] 73.13332 68.08495 68.51044 71.14749 73.38268 71.53689 74.12361 [15] 73.67316 73.32508 74.24119 75.97484 69.32699 73.68498 > colSums(tmp5) [1] 1118.8449 699.3521 736.4946 707.7855 683.5211 756.8823 675.7137 [8] 731.3332 680.8495 685.1044 711.4749 733.8268 715.3689 741.2361 [15] 736.7316 733.2508 742.4119 759.7484 693.2699 736.8498 > colVars(tmp5) [1] 15492.01203 71.41624 56.98398 122.91648 30.86530 49.71776 [7] 65.55971 82.79834 104.17542 63.22630 38.58783 95.27078 [13] 83.56488 88.07990 81.57059 69.84920 71.46387 106.39520 [19] 54.86866 109.42777 > colSd(tmp5) [1] 124.466911 8.450813 7.548774 11.086771 5.555655 7.051082 [7] 8.096895 9.099360 10.206636 7.951497 6.211910 9.760675 [13] 9.141383 9.385089 9.031644 8.357583 8.453631 10.314805 [19] 7.407338 10.460773 > colMax(tmp5) [1] 465.49627 85.93962 84.83202 92.74434 77.08265 83.69263 77.81164 [8] 85.30524 86.12745 78.14877 80.05334 87.44444 85.34435 91.86122 [15] 87.94410 83.55966 87.46848 94.24804 81.60980 91.01770 > colMin(tmp5) [1] 61.74767 58.46177 62.08517 54.95341 59.38439 63.39873 57.19012 55.21769 [9] 55.05644 56.25325 60.15941 57.24482 55.52589 64.04062 62.65408 60.51805 [17] 60.25688 59.27814 57.90891 61.30956 > > > ### 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] 94.54250 69.12040 73.26993 NA 69.61656 70.13488 77.33502 70.83931 [9] 72.31276 70.60875 > rowSums(tmp5) [1] 1890.850 1382.408 1465.399 NA 1392.331 1402.698 1546.700 1416.786 [9] 1446.255 1412.175 > rowVars(tmp5) [1] 7690.62807 61.54943 84.79685 44.72788 79.42864 87.48675 [7] 67.80100 87.09717 84.80685 51.10292 > rowSd(tmp5) [1] 87.696226 7.845345 9.208520 6.687891 8.912275 9.353435 8.234136 [8] 9.332586 9.209064 7.148631 > rowMax(tmp5) [1] 465.49627 85.30524 87.46848 NA 85.74322 91.01770 94.24804 [8] 92.74434 87.44444 83.69263 > rowMin(tmp5) [1] 54.95341 57.50200 56.72309 NA 55.05644 55.52589 61.10431 57.19012 [9] 57.76746 55.21769 > > colMeans(tmp5) [1] 111.88449 69.93521 73.64946 70.77855 68.35211 75.68823 67.57137 [8] 73.13332 68.08495 68.51044 71.14749 73.38268 71.53689 74.12361 [15] 73.67316 73.32508 74.24119 75.97484 NA 73.68498 > colSums(tmp5) [1] 1118.8449 699.3521 736.4946 707.7855 683.5211 756.8823 675.7137 [8] 731.3332 680.8495 685.1044 711.4749 733.8268 715.3689 741.2361 [15] 736.7316 733.2508 742.4119 759.7484 NA 736.8498 > colVars(tmp5) [1] 15492.01203 71.41624 56.98398 122.91648 30.86530 49.71776 [7] 65.55971 82.79834 104.17542 63.22630 38.58783 95.27078 [13] 83.56488 88.07990 81.57059 69.84920 71.46387 106.39520 [19] NA 109.42777 > colSd(tmp5) [1] 124.466911 8.450813 7.548774 11.086771 5.555655 7.051082 [7] 8.096895 9.099360 10.206636 7.951497 6.211910 9.760675 [13] 9.141383 9.385089 9.031644 8.357583 8.453631 10.314805 [19] NA 10.460773 > colMax(tmp5) [1] 465.49627 85.93962 84.83202 92.74434 77.08265 83.69263 77.81164 [8] 85.30524 86.12745 78.14877 80.05334 87.44444 85.34435 91.86122 [15] 87.94410 83.55966 87.46848 94.24804 NA 91.01770 > colMin(tmp5) [1] 61.74767 58.46177 62.08517 54.95341 59.38439 63.39873 57.19012 55.21769 [9] 55.05644 56.25325 60.15941 57.24482 55.52589 64.04062 62.65408 60.51805 [17] 60.25688 59.27814 NA 61.30956 > > Max(tmp5,na.rm=TRUE) [1] 465.4963 > Min(tmp5,na.rm=TRUE) [1] 54.95341 > mean(tmp5,na.rm=TRUE) [1] 73.93756 > Sum(tmp5,na.rm=TRUE) [1] 14713.58 > Var(tmp5,na.rm=TRUE) [1] 852.7475 > > rowMeans(tmp5,na.rm=TRUE) [1] 94.54250 69.12040 73.26993 71.47227 69.61656 70.13488 77.33502 70.83931 [9] 72.31276 70.60875 > rowSums(tmp5,na.rm=TRUE) [1] 1890.850 1382.408 1465.399 1357.973 1392.331 1402.698 1546.700 1416.786 [9] 1446.255 1412.175 > rowVars(tmp5,na.rm=TRUE) [1] 7690.62807 61.54943 84.79685 44.72788 79.42864 87.48675 [7] 67.80100 87.09717 84.80685 51.10292 > rowSd(tmp5,na.rm=TRUE) [1] 87.696226 7.845345 9.208520 6.687891 8.912275 9.353435 8.234136 [8] 9.332586 9.209064 7.148631 > rowMax(tmp5,na.rm=TRUE) [1] 465.49627 85.30524 87.46848 91.86122 85.74322 91.01770 94.24804 [8] 92.74434 87.44444 83.69263 > rowMin(tmp5,na.rm=TRUE) [1] 54.95341 57.50200 56.72309 62.25213 55.05644 55.52589 61.10431 57.19012 [9] 57.76746 55.21769 > > colMeans(tmp5,na.rm=TRUE) [1] 111.88449 69.93521 73.64946 70.77855 68.35211 75.68823 67.57137 [8] 73.13332 68.08495 68.51044 71.14749 73.38268 71.53689 74.12361 [15] 73.67316 73.32508 74.24119 75.97484 69.64385 73.68498 > colSums(tmp5,na.rm=TRUE) [1] 1118.8449 699.3521 736.4946 707.7855 683.5211 756.8823 675.7137 [8] 731.3332 680.8495 685.1044 711.4749 733.8268 715.3689 741.2361 [15] 736.7316 733.2508 742.4119 759.7484 626.7947 736.8498 > colVars(tmp5,na.rm=TRUE) [1] 15492.01203 71.41624 56.98398 122.91648 30.86530 49.71776 [7] 65.55971 82.79834 104.17542 63.22630 38.58783 95.27078 [13] 83.56488 88.07990 81.57059 69.84920 71.46387 106.39520 [19] 60.59773 109.42777 > colSd(tmp5,na.rm=TRUE) [1] 124.466911 8.450813 7.548774 11.086771 5.555655 7.051082 [7] 8.096895 9.099360 10.206636 7.951497 6.211910 9.760675 [13] 9.141383 9.385089 9.031644 8.357583 8.453631 10.314805 [19] 7.784454 10.460773 > colMax(tmp5,na.rm=TRUE) [1] 465.49627 85.93962 84.83202 92.74434 77.08265 83.69263 77.81164 [8] 85.30524 86.12745 78.14877 80.05334 87.44444 85.34435 91.86122 [15] 87.94410 83.55966 87.46848 94.24804 81.60980 91.01770 > colMin(tmp5,na.rm=TRUE) [1] 61.74767 58.46177 62.08517 54.95341 59.38439 63.39873 57.19012 55.21769 [9] 55.05644 56.25325 60.15941 57.24482 55.52589 64.04062 62.65408 60.51805 [17] 60.25688 59.27814 57.90891 61.30956 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 94.54250 69.12040 73.26993 NaN 69.61656 70.13488 77.33502 70.83931 [9] 72.31276 70.60875 > rowSums(tmp5,na.rm=TRUE) [1] 1890.850 1382.408 1465.399 0.000 1392.331 1402.698 1546.700 1416.786 [9] 1446.255 1412.175 > rowVars(tmp5,na.rm=TRUE) [1] 7690.62807 61.54943 84.79685 NA 79.42864 87.48675 [7] 67.80100 87.09717 84.80685 51.10292 > rowSd(tmp5,na.rm=TRUE) [1] 87.696226 7.845345 9.208520 NA 8.912275 9.353435 8.234136 [8] 9.332586 9.209064 7.148631 > rowMax(tmp5,na.rm=TRUE) [1] 465.49627 85.30524 87.46848 NA 85.74322 91.01770 94.24804 [8] 92.74434 87.44444 83.69263 > rowMin(tmp5,na.rm=TRUE) [1] 54.95341 57.50200 56.72309 NA 55.05644 55.52589 61.10431 57.19012 [9] 57.76746 55.21769 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 116.14967 69.64761 74.49372 70.21285 67.78142 76.38705 66.99745 [8] 72.97106 68.73304 68.91423 70.20025 73.50942 71.98334 72.15277 [15] 73.86759 73.63567 74.74910 77.04438 NaN 74.88132 > colSums(tmp5,na.rm=TRUE) [1] 1045.3470 626.8285 670.4435 631.9157 610.0328 687.4835 602.9771 [8] 656.7395 618.5973 620.2281 631.8022 661.5848 647.8501 649.3749 [15] 664.8083 662.7211 672.7419 693.3994 0.0000 673.9319 > colVars(tmp5,na.rm=TRUE) [1] 17223.85664 79.41270 56.08815 134.68089 31.05949 50.43859 [7] 70.04915 92.85193 112.47211 69.29533 33.31703 106.99893 [13] 91.76812 55.39230 91.34164 77.49509 77.49462 106.82558 [19] NA 107.00497 > colSd(tmp5,na.rm=TRUE) [1] 131.239692 8.911380 7.489202 11.605209 5.573104 7.102013 [7] 8.369537 9.635971 10.605287 8.324382 5.772091 10.344029 [13] 9.579568 7.442600 9.557282 8.803130 8.803103 10.335646 [19] NA 10.344321 > colMax(tmp5,na.rm=TRUE) [1] 465.49627 85.93962 84.83202 92.74434 77.08265 83.69263 77.81164 [8] 85.30524 86.12745 78.14877 80.05334 87.44444 85.34435 84.95862 [15] 87.94410 83.55966 87.46848 94.24804 -Inf 91.01770 > colMin(tmp5,na.rm=TRUE) [1] 61.74767 58.46177 62.08517 54.95341 59.38439 63.39873 57.19012 55.21769 [9] 55.05644 56.25325 60.15941 57.24482 55.52589 64.04062 62.65408 60.51805 [17] 60.25688 59.27814 Inf 61.30956 > > > > > 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] 204.3760 241.3059 194.1854 204.1915 184.8232 175.0674 281.2133 199.3153 [9] 185.6795 144.8315 > apply(copymatrix,1,var,na.rm=TRUE) [1] 204.3760 241.3059 194.1854 204.1915 184.8232 175.0674 281.2133 199.3153 [9] 185.6795 144.8315 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 0.000000e+00 -2.842171e-14 -2.842171e-14 -1.421085e-13 -5.684342e-14 [6] 0.000000e+00 0.000000e+00 0.000000e+00 1.136868e-13 -5.684342e-14 [11] -5.684342e-14 1.705303e-13 -1.136868e-13 -2.273737e-13 2.842171e-13 [16] 1.421085e-13 5.684342e-14 -5.684342e-14 -2.557954e-13 1.136868e-13 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 10 6 9 3 2 8 3 5 2 17 5 2 3 1 7 9 10 12 9 9 1 20 5 19 3 18 3 13 6 5 2 12 7 5 8 1 10 13 2 6 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.012661 > Min(tmp) [1] -2.2024 > mean(tmp) [1] -0.1019663 > Sum(tmp) [1] -10.19663 > Var(tmp) [1] 0.808275 > > rowMeans(tmp) [1] -0.1019663 > rowSums(tmp) [1] -10.19663 > rowVars(tmp) [1] 0.808275 > rowSd(tmp) [1] 0.8990411 > rowMax(tmp) [1] 2.012661 > rowMin(tmp) [1] -2.2024 > > colMeans(tmp) [1] 1.32319770 1.03415936 0.02578761 -0.74243457 0.63255540 -0.22780238 [7] -0.63526060 -0.76596048 -1.12269627 -1.01575607 0.32969916 -0.10981857 [13] 0.28050477 -1.34716815 0.21611872 1.34554519 -0.66710747 0.06593966 [19] 0.51488628 -0.85177953 -0.08882843 0.19684017 0.57336939 -0.27959063 [25] -0.15356106 0.84501330 -0.60240985 -0.48003523 0.42944510 -0.83155615 [31] 1.11491451 -1.21486897 1.55900958 1.15631349 -0.83404710 -0.87596929 [37] -0.16186161 1.40196352 1.69744466 0.01477749 -0.06031520 0.88051437 [43] -1.91304083 -1.34051809 -0.39269003 0.77333162 0.87925949 -0.16719214 [49] 1.74522488 -0.59405322 -0.10964907 -0.03768073 1.17111716 -0.02084720 [55] -2.20239969 0.83878019 -0.37330905 -0.31944261 -0.74959841 -1.36985010 [61] -0.12779086 -1.50204254 -1.79997460 -0.43143424 -1.41626075 0.60511849 [67] -0.35096252 -1.56605323 0.17819359 0.06238706 0.65196512 -0.66892479 [73] 0.47110017 -0.12322847 0.18834975 0.85721535 -1.82461315 0.82881760 [79] -0.19310664 0.18260068 0.77372118 -0.13908756 2.01266131 -1.19645584 [85] -0.75276636 0.48462412 -0.54475740 0.48377605 -0.85471565 0.15535554 [91] -0.24417892 -0.17716628 -0.45192145 -0.82685766 -0.34649456 -0.10738423 [97] 1.57200479 0.13694723 -0.75188583 -1.83002295 > colSums(tmp) [1] 1.32319770 1.03415936 0.02578761 -0.74243457 0.63255540 -0.22780238 [7] -0.63526060 -0.76596048 -1.12269627 -1.01575607 0.32969916 -0.10981857 [13] 0.28050477 -1.34716815 0.21611872 1.34554519 -0.66710747 0.06593966 [19] 0.51488628 -0.85177953 -0.08882843 0.19684017 0.57336939 -0.27959063 [25] -0.15356106 0.84501330 -0.60240985 -0.48003523 0.42944510 -0.83155615 [31] 1.11491451 -1.21486897 1.55900958 1.15631349 -0.83404710 -0.87596929 [37] -0.16186161 1.40196352 1.69744466 0.01477749 -0.06031520 0.88051437 [43] -1.91304083 -1.34051809 -0.39269003 0.77333162 0.87925949 -0.16719214 [49] 1.74522488 -0.59405322 -0.10964907 -0.03768073 1.17111716 -0.02084720 [55] -2.20239969 0.83878019 -0.37330905 -0.31944261 -0.74959841 -1.36985010 [61] -0.12779086 -1.50204254 -1.79997460 -0.43143424 -1.41626075 0.60511849 [67] -0.35096252 -1.56605323 0.17819359 0.06238706 0.65196512 -0.66892479 [73] 0.47110017 -0.12322847 0.18834975 0.85721535 -1.82461315 0.82881760 [79] -0.19310664 0.18260068 0.77372118 -0.13908756 2.01266131 -1.19645584 [85] -0.75276636 0.48462412 -0.54475740 0.48377605 -0.85471565 0.15535554 [91] -0.24417892 -0.17716628 -0.45192145 -0.82685766 -0.34649456 -0.10738423 [97] 1.57200479 0.13694723 -0.75188583 -1.83002295 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] 1.32319770 1.03415936 0.02578761 -0.74243457 0.63255540 -0.22780238 [7] -0.63526060 -0.76596048 -1.12269627 -1.01575607 0.32969916 -0.10981857 [13] 0.28050477 -1.34716815 0.21611872 1.34554519 -0.66710747 0.06593966 [19] 0.51488628 -0.85177953 -0.08882843 0.19684017 0.57336939 -0.27959063 [25] -0.15356106 0.84501330 -0.60240985 -0.48003523 0.42944510 -0.83155615 [31] 1.11491451 -1.21486897 1.55900958 1.15631349 -0.83404710 -0.87596929 [37] -0.16186161 1.40196352 1.69744466 0.01477749 -0.06031520 0.88051437 [43] -1.91304083 -1.34051809 -0.39269003 0.77333162 0.87925949 -0.16719214 [49] 1.74522488 -0.59405322 -0.10964907 -0.03768073 1.17111716 -0.02084720 [55] -2.20239969 0.83878019 -0.37330905 -0.31944261 -0.74959841 -1.36985010 [61] -0.12779086 -1.50204254 -1.79997460 -0.43143424 -1.41626075 0.60511849 [67] -0.35096252 -1.56605323 0.17819359 0.06238706 0.65196512 -0.66892479 [73] 0.47110017 -0.12322847 0.18834975 0.85721535 -1.82461315 0.82881760 [79] -0.19310664 0.18260068 0.77372118 -0.13908756 2.01266131 -1.19645584 [85] -0.75276636 0.48462412 -0.54475740 0.48377605 -0.85471565 0.15535554 [91] -0.24417892 -0.17716628 -0.45192145 -0.82685766 -0.34649456 -0.10738423 [97] 1.57200479 0.13694723 -0.75188583 -1.83002295 > colMin(tmp) [1] 1.32319770 1.03415936 0.02578761 -0.74243457 0.63255540 -0.22780238 [7] -0.63526060 -0.76596048 -1.12269627 -1.01575607 0.32969916 -0.10981857 [13] 0.28050477 -1.34716815 0.21611872 1.34554519 -0.66710747 0.06593966 [19] 0.51488628 -0.85177953 -0.08882843 0.19684017 0.57336939 -0.27959063 [25] -0.15356106 0.84501330 -0.60240985 -0.48003523 0.42944510 -0.83155615 [31] 1.11491451 -1.21486897 1.55900958 1.15631349 -0.83404710 -0.87596929 [37] -0.16186161 1.40196352 1.69744466 0.01477749 -0.06031520 0.88051437 [43] -1.91304083 -1.34051809 -0.39269003 0.77333162 0.87925949 -0.16719214 [49] 1.74522488 -0.59405322 -0.10964907 -0.03768073 1.17111716 -0.02084720 [55] -2.20239969 0.83878019 -0.37330905 -0.31944261 -0.74959841 -1.36985010 [61] -0.12779086 -1.50204254 -1.79997460 -0.43143424 -1.41626075 0.60511849 [67] -0.35096252 -1.56605323 0.17819359 0.06238706 0.65196512 -0.66892479 [73] 0.47110017 -0.12322847 0.18834975 0.85721535 -1.82461315 0.82881760 [79] -0.19310664 0.18260068 0.77372118 -0.13908756 2.01266131 -1.19645584 [85] -0.75276636 0.48462412 -0.54475740 0.48377605 -0.85471565 0.15535554 [91] -0.24417892 -0.17716628 -0.45192145 -0.82685766 -0.34649456 -0.10738423 [97] 1.57200479 0.13694723 -0.75188583 -1.83002295 > colMedians(tmp) [1] 1.32319770 1.03415936 0.02578761 -0.74243457 0.63255540 -0.22780238 [7] -0.63526060 -0.76596048 -1.12269627 -1.01575607 0.32969916 -0.10981857 [13] 0.28050477 -1.34716815 0.21611872 1.34554519 -0.66710747 0.06593966 [19] 0.51488628 -0.85177953 -0.08882843 0.19684017 0.57336939 -0.27959063 [25] -0.15356106 0.84501330 -0.60240985 -0.48003523 0.42944510 -0.83155615 [31] 1.11491451 -1.21486897 1.55900958 1.15631349 -0.83404710 -0.87596929 [37] -0.16186161 1.40196352 1.69744466 0.01477749 -0.06031520 0.88051437 [43] -1.91304083 -1.34051809 -0.39269003 0.77333162 0.87925949 -0.16719214 [49] 1.74522488 -0.59405322 -0.10964907 -0.03768073 1.17111716 -0.02084720 [55] -2.20239969 0.83878019 -0.37330905 -0.31944261 -0.74959841 -1.36985010 [61] -0.12779086 -1.50204254 -1.79997460 -0.43143424 -1.41626075 0.60511849 [67] -0.35096252 -1.56605323 0.17819359 0.06238706 0.65196512 -0.66892479 [73] 0.47110017 -0.12322847 0.18834975 0.85721535 -1.82461315 0.82881760 [79] -0.19310664 0.18260068 0.77372118 -0.13908756 2.01266131 -1.19645584 [85] -0.75276636 0.48462412 -0.54475740 0.48377605 -0.85471565 0.15535554 [91] -0.24417892 -0.17716628 -0.45192145 -0.82685766 -0.34649456 -0.10738423 [97] 1.57200479 0.13694723 -0.75188583 -1.83002295 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.323198 1.034159 0.02578761 -0.7424346 0.6325554 -0.2278024 -0.6352606 [2,] 1.323198 1.034159 0.02578761 -0.7424346 0.6325554 -0.2278024 -0.6352606 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.7659605 -1.122696 -1.015756 0.3296992 -0.1098186 0.2805048 -1.347168 [2,] -0.7659605 -1.122696 -1.015756 0.3296992 -0.1098186 0.2805048 -1.347168 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.2161187 1.345545 -0.6671075 0.06593966 0.5148863 -0.8517795 -0.08882843 [2,] 0.2161187 1.345545 -0.6671075 0.06593966 0.5148863 -0.8517795 -0.08882843 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.1968402 0.5733694 -0.2795906 -0.1535611 0.8450133 -0.6024099 -0.4800352 [2,] 0.1968402 0.5733694 -0.2795906 -0.1535611 0.8450133 -0.6024099 -0.4800352 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.4294451 -0.8315561 1.114915 -1.214869 1.55901 1.156313 -0.8340471 [2,] 0.4294451 -0.8315561 1.114915 -1.214869 1.55901 1.156313 -0.8340471 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.8759693 -0.1618616 1.401964 1.697445 0.01477749 -0.0603152 0.8805144 [2,] -0.8759693 -0.1618616 1.401964 1.697445 0.01477749 -0.0603152 0.8805144 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -1.913041 -1.340518 -0.39269 0.7733316 0.8792595 -0.1671921 1.745225 [2,] -1.913041 -1.340518 -0.39269 0.7733316 0.8792595 -0.1671921 1.745225 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -0.5940532 -0.1096491 -0.03768073 1.171117 -0.0208472 -2.2024 0.8387802 [2,] -0.5940532 -0.1096491 -0.03768073 1.171117 -0.0208472 -2.2024 0.8387802 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.3733091 -0.3194426 -0.7495984 -1.36985 -0.1277909 -1.502043 -1.799975 [2,] -0.3733091 -0.3194426 -0.7495984 -1.36985 -0.1277909 -1.502043 -1.799975 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.4314342 -1.416261 0.6051185 -0.3509625 -1.566053 0.1781936 0.06238706 [2,] -0.4314342 -1.416261 0.6051185 -0.3509625 -1.566053 0.1781936 0.06238706 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.6519651 -0.6689248 0.4711002 -0.1232285 0.1883497 0.8572153 -1.824613 [2,] 0.6519651 -0.6689248 0.4711002 -0.1232285 0.1883497 0.8572153 -1.824613 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.8288176 -0.1931066 0.1826007 0.7737212 -0.1390876 2.012661 -1.196456 [2,] 0.8288176 -0.1931066 0.1826007 0.7737212 -0.1390876 2.012661 -1.196456 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.7527664 0.4846241 -0.5447574 0.4837761 -0.8547157 0.1553555 -0.2441789 [2,] -0.7527664 0.4846241 -0.5447574 0.4837761 -0.8547157 0.1553555 -0.2441789 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.1771663 -0.4519214 -0.8268577 -0.3464946 -0.1073842 1.572005 0.1369472 [2,] -0.1771663 -0.4519214 -0.8268577 -0.3464946 -0.1073842 1.572005 0.1369472 [,99] [,100] [1,] -0.7518858 -1.830023 [2,] -0.7518858 -1.830023 > > > Max(tmp2) [1] 2.723081 > Min(tmp2) [1] -2.670146 > mean(tmp2) [1] 0.02145673 > Sum(tmp2) [1] 2.145673 > Var(tmp2) [1] 0.9430549 > > rowMeans(tmp2) [1] 1.525310440 -0.627783930 1.314294964 -0.776095467 -0.424966541 [6] 1.219972078 2.723080771 -0.611653266 -0.742058043 0.875364335 [11] 0.748221081 1.033009498 -0.255227669 -1.477158265 1.028835931 [16] -0.600060979 1.225670525 0.051465784 0.388699222 -0.288382219 [21] -0.524183062 -0.178056358 0.281108385 -0.196309923 -0.934846157 [26] -0.491961783 0.565170312 1.473585741 2.714920187 -2.112842946 [31] 0.597009715 -1.450110365 0.820358472 0.914465493 1.180669463 [36] -0.896651099 1.043126277 -0.361389439 -0.265427444 -1.277703401 [41] -0.500374757 0.642387392 -1.234820807 0.237681737 -1.638840584 [46] 0.503765826 0.307309067 0.890767834 0.036169791 -0.383346559 [51] 1.287329275 -0.591031973 -0.229439274 -1.341817939 0.543088706 [56] 1.005264202 -0.555967510 -0.074227685 0.932278032 0.084566866 [61] 0.683702334 -0.289877508 -0.710731080 0.438592197 -0.316071783 [66] -0.390271453 -0.054216292 -0.238862543 0.405893214 -0.171650025 [71] -0.551082076 0.347365423 -2.176003524 -0.367811883 -0.193434951 [76] -0.089924568 -0.234558465 -2.670146357 0.706048252 0.971074809 [81] 0.473360190 -1.635207461 -0.374383527 -1.458323584 -0.575470547 [86] -0.249111188 0.081803933 -1.737442233 -0.656793149 2.391507782 [91] 0.701918641 0.000099282 -0.256477136 0.499678706 0.340920060 [96] 0.652381982 -0.064591857 0.343849937 0.499188196 0.918519569 > rowSums(tmp2) [1] 1.525310440 -0.627783930 1.314294964 -0.776095467 -0.424966541 [6] 1.219972078 2.723080771 -0.611653266 -0.742058043 0.875364335 [11] 0.748221081 1.033009498 -0.255227669 -1.477158265 1.028835931 [16] -0.600060979 1.225670525 0.051465784 0.388699222 -0.288382219 [21] -0.524183062 -0.178056358 0.281108385 -0.196309923 -0.934846157 [26] -0.491961783 0.565170312 1.473585741 2.714920187 -2.112842946 [31] 0.597009715 -1.450110365 0.820358472 0.914465493 1.180669463 [36] -0.896651099 1.043126277 -0.361389439 -0.265427444 -1.277703401 [41] -0.500374757 0.642387392 -1.234820807 0.237681737 -1.638840584 [46] 0.503765826 0.307309067 0.890767834 0.036169791 -0.383346559 [51] 1.287329275 -0.591031973 -0.229439274 -1.341817939 0.543088706 [56] 1.005264202 -0.555967510 -0.074227685 0.932278032 0.084566866 [61] 0.683702334 -0.289877508 -0.710731080 0.438592197 -0.316071783 [66] -0.390271453 -0.054216292 -0.238862543 0.405893214 -0.171650025 [71] -0.551082076 0.347365423 -2.176003524 -0.367811883 -0.193434951 [76] -0.089924568 -0.234558465 -2.670146357 0.706048252 0.971074809 [81] 0.473360190 -1.635207461 -0.374383527 -1.458323584 -0.575470547 [86] -0.249111188 0.081803933 -1.737442233 -0.656793149 2.391507782 [91] 0.701918641 0.000099282 -0.256477136 0.499678706 0.340920060 [96] 0.652381982 -0.064591857 0.343849937 0.499188196 0.918519569 > 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.525310440 -0.627783930 1.314294964 -0.776095467 -0.424966541 [6] 1.219972078 2.723080771 -0.611653266 -0.742058043 0.875364335 [11] 0.748221081 1.033009498 -0.255227669 -1.477158265 1.028835931 [16] -0.600060979 1.225670525 0.051465784 0.388699222 -0.288382219 [21] -0.524183062 -0.178056358 0.281108385 -0.196309923 -0.934846157 [26] -0.491961783 0.565170312 1.473585741 2.714920187 -2.112842946 [31] 0.597009715 -1.450110365 0.820358472 0.914465493 1.180669463 [36] -0.896651099 1.043126277 -0.361389439 -0.265427444 -1.277703401 [41] -0.500374757 0.642387392 -1.234820807 0.237681737 -1.638840584 [46] 0.503765826 0.307309067 0.890767834 0.036169791 -0.383346559 [51] 1.287329275 -0.591031973 -0.229439274 -1.341817939 0.543088706 [56] 1.005264202 -0.555967510 -0.074227685 0.932278032 0.084566866 [61] 0.683702334 -0.289877508 -0.710731080 0.438592197 -0.316071783 [66] -0.390271453 -0.054216292 -0.238862543 0.405893214 -0.171650025 [71] -0.551082076 0.347365423 -2.176003524 -0.367811883 -0.193434951 [76] -0.089924568 -0.234558465 -2.670146357 0.706048252 0.971074809 [81] 0.473360190 -1.635207461 -0.374383527 -1.458323584 -0.575470547 [86] -0.249111188 0.081803933 -1.737442233 -0.656793149 2.391507782 [91] 0.701918641 0.000099282 -0.256477136 0.499678706 0.340920060 [96] 0.652381982 -0.064591857 0.343849937 0.499188196 0.918519569 > rowMin(tmp2) [1] 1.525310440 -0.627783930 1.314294964 -0.776095467 -0.424966541 [6] 1.219972078 2.723080771 -0.611653266 -0.742058043 0.875364335 [11] 0.748221081 1.033009498 -0.255227669 -1.477158265 1.028835931 [16] -0.600060979 1.225670525 0.051465784 0.388699222 -0.288382219 [21] -0.524183062 -0.178056358 0.281108385 -0.196309923 -0.934846157 [26] -0.491961783 0.565170312 1.473585741 2.714920187 -2.112842946 [31] 0.597009715 -1.450110365 0.820358472 0.914465493 1.180669463 [36] -0.896651099 1.043126277 -0.361389439 -0.265427444 -1.277703401 [41] -0.500374757 0.642387392 -1.234820807 0.237681737 -1.638840584 [46] 0.503765826 0.307309067 0.890767834 0.036169791 -0.383346559 [51] 1.287329275 -0.591031973 -0.229439274 -1.341817939 0.543088706 [56] 1.005264202 -0.555967510 -0.074227685 0.932278032 0.084566866 [61] 0.683702334 -0.289877508 -0.710731080 0.438592197 -0.316071783 [66] -0.390271453 -0.054216292 -0.238862543 0.405893214 -0.171650025 [71] -0.551082076 0.347365423 -2.176003524 -0.367811883 -0.193434951 [76] -0.089924568 -0.234558465 -2.670146357 0.706048252 0.971074809 [81] 0.473360190 -1.635207461 -0.374383527 -1.458323584 -0.575470547 [86] -0.249111188 0.081803933 -1.737442233 -0.656793149 2.391507782 [91] 0.701918641 0.000099282 -0.256477136 0.499678706 0.340920060 [96] 0.652381982 -0.064591857 0.343849937 0.499188196 0.918519569 > > colMeans(tmp2) [1] 0.02145673 > colSums(tmp2) [1] 2.145673 > colVars(tmp2) [1] 0.9430549 > colSd(tmp2) [1] 0.9711101 > colMax(tmp2) [1] 2.723081 > colMin(tmp2) [1] -2.670146 > colMedians(tmp2) [1] -0.06940977 > colRanges(tmp2) [,1] [1,] -2.670146 [2,] 2.723081 > > 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] -4.7214973 3.7574347 0.8977053 1.4825010 -0.5946969 -1.9037096 [7] -3.7347286 6.0845212 0.5613415 1.2226673 > colApply(tmp,quantile)[,1] [,1] [1,] -2.9119009 [2,] -1.5495577 [3,] -1.0024190 [4,] 0.9114408 [5,] 2.0312158 > > rowApply(tmp,sum) [1] -3.171158 3.443423 2.445467 1.413214 2.925080 -1.310227 -2.034698 [8] -4.734415 1.439892 2.634960 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 1 1 10 10 1 1 1 8 7 [2,] 4 9 3 6 8 7 4 6 3 10 [3,] 10 3 8 9 4 4 6 9 7 2 [4,] 9 6 7 8 3 6 5 7 5 5 [5,] 5 7 9 3 2 8 10 2 1 8 [6,] 2 5 5 2 5 2 3 4 6 9 [7,] 7 2 2 7 7 3 2 5 2 6 [8,] 8 10 4 4 9 9 8 8 9 4 [9,] 6 8 6 5 6 5 7 3 4 3 [10,] 3 4 10 1 1 10 9 10 10 1 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -2.81682976 -1.07176481 0.89267033 3.33636373 -0.01871787 -0.30418355 [7] 3.64173380 1.24643677 -1.32325564 -0.04625585 -1.59753484 0.78393675 [13] -0.47658607 -0.13404353 -1.66525211 2.00562372 -0.83329606 0.80946071 [19] 0.52860837 1.34936600 > colApply(tmp,quantile)[,1] [,1] [1,] -0.9527197 [2,] -0.8815335 [3,] -0.4078734 [4,] -0.4038145 [5,] -0.1708887 > > rowApply(tmp,sum) [1] 3.974050 1.964900 -6.391729 -1.153767 5.913026 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 1 2 11 8 6 [2,] 4 17 14 11 1 [3,] 9 19 7 10 17 [4,] 20 6 13 2 20 [5,] 12 13 9 3 12 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.9527197 -0.6268912 -0.1086067 2.7099684 0.1131140 -0.1137216 [2,] -0.8815335 0.6520001 0.7201041 -0.4409764 0.4224541 0.2485059 [3,] -0.1708887 0.3056499 -0.8560103 0.2333550 -0.3418958 0.5857563 [4,] -0.4038145 -0.1108849 -0.1361597 -1.1823498 -0.9321364 -0.8484155 [5,] -0.4078734 -1.2916387 1.2733428 2.0163665 0.7197463 -0.1763086 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 2.2855570 0.4464507 0.003526822 -0.5440610 0.76745599 1.0711335 [2,] 0.1757235 1.8788877 0.486322243 -0.4451172 -0.67095768 0.1286785 [3,] 0.6392409 -1.5944498 -1.547173896 0.2184012 -1.76064113 0.5962755 [4,] 0.7563621 1.2121626 -0.650837302 -0.1056093 -0.03575152 -2.1036089 [5,] -0.2151497 -0.6966144 0.384906490 0.8301305 0.10235951 1.0914581 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.0440898 0.4436513 -0.2612742 0.2271440 -0.4677311 -0.7050509 [2,] -1.5372333 0.6280305 0.5773565 -0.2288806 -0.6531056 0.3670285 [3,] 0.6045847 -1.1001640 -0.1880347 1.0238665 -0.5708240 -2.1126466 [4,] 0.9582681 -0.2992759 -0.6251719 0.2017380 -0.6726198 2.3172865 [5,] -0.5462954 0.1937145 -1.1681278 0.7817558 1.5309845 0.9428432 [,19] [,20] [1,] 0.4733148 -0.8312999 [2,] 0.7097029 -0.1720903 [3,] -1.0551756 0.6990458 [4,] 1.1700616 0.3369891 [5,] -0.7692953 1.3167212 > > > 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 : 648 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 : 561 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.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 1.45068 -0.2992411 -0.8820347 -0.0199312 0.6534376 2.387636 0.1453893 col8 col9 col10 col11 col12 col13 col14 row1 -0.5079449 -0.9761897 0.9190747 -0.2888455 0.4479619 0.4629133 -1.809288 col15 col16 col17 col18 col19 col20 row1 -0.7032015 0.4090796 -1.064243 0.151214 0.003101036 -0.8847874 > tmp[,"col10"] col10 row1 0.9190747 row2 -1.4170807 row3 0.5788077 row4 -1.2414600 row5 2.8908529 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 1.4506795 -0.29924109 -0.8820347 -0.0199312 0.6534376 2.3876355 0.1453893 row5 -0.9879949 -0.08092135 -1.0823060 -1.4940707 1.1532293 0.1898408 0.7894079 col8 col9 col10 col11 col12 col13 col14 row1 -0.5079449 -0.9761897 0.9190747 -0.2888455 0.4479619 0.4629133 -1.809288 row5 0.3577625 -1.6303679 2.8908529 0.3054992 1.4605660 0.7100690 -2.893386 col15 col16 col17 col18 col19 col20 row1 -0.7032015 0.4090796 -1.0642428 0.1512140 0.003101036 -0.8847874 row5 -0.2568721 1.5286381 0.8169821 0.1264644 -1.021137181 0.6264819 > tmp[,c("col6","col20")] col6 col20 row1 2.38763554 -0.88478743 row2 -1.02105120 -0.52804866 row3 0.30564156 -0.11582408 row4 -0.01623588 -0.03929052 row5 0.18984083 0.62648191 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 2.3876355 -0.8847874 row5 0.1898408 0.6264819 > > > > > 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 51.12783 48.29686 49.83853 50.37023 48.97043 105.0946 50.20408 49.97185 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.20606 50.0696 50.12699 49.88968 50.42938 50.71064 51.12838 50.03833 col17 col18 col19 col20 row1 49.33261 51.08564 50.19156 104.1766 > tmp[,"col10"] col10 row1 50.06960 row2 31.12642 row3 29.40610 row4 29.18267 row5 50.09312 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.12783 48.29686 49.83853 50.37023 48.97043 105.0946 50.20408 49.97185 row5 51.50792 51.56195 49.22389 49.76008 49.60881 106.0118 49.10860 50.37857 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.20606 50.06960 50.12699 49.88968 50.42938 50.71064 51.12838 50.03833 row5 48.44502 50.09312 50.85599 50.71460 50.14965 52.31838 51.10744 51.16520 col17 col18 col19 col20 row1 49.33261 51.08564 50.19156 104.1766 row5 49.35432 50.15214 50.30212 105.4362 > tmp[,c("col6","col20")] col6 col20 row1 105.09457 104.17655 row2 75.08780 74.96988 row3 75.35222 76.49856 row4 75.12147 74.26070 row5 106.01176 105.43621 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.0946 104.1766 row5 106.0118 105.4362 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.0946 104.1766 row5 106.0118 105.4362 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.1758718 [2,] 1.7209680 [3,] 0.3347401 [4,] 0.7229187 [5,] -1.1125003 > tmp[,c("col17","col7")] col17 col7 [1,] 0.1650324 -2.07286189 [2,] 0.5849055 -1.03166200 [3,] -0.4578236 0.18390749 [4,] 2.5016395 0.06610083 [5,] 0.3711392 1.73660325 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.9976955 1.4308620 [2,] 0.8459094 1.8284427 [3,] 0.2908498 0.9265979 [4,] 1.1378295 -1.2866717 [5,] -1.9759635 0.2413276 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.9976955 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.9976955 [2,] 0.8459094 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 -0.5616376 0.2094919 2.53140351 -0.8816640 -0.7465611 0.4314229 row1 0.4062037 -1.8466398 0.01972873 -0.2678946 -1.3821465 0.6428409 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.3524288 0.2837509 1.032576 -0.4845022 0.5118529 0.8965175 0.0122813 row1 0.3245874 0.9956254 1.140022 0.8172069 1.0964856 0.5207640 -0.1432309 [,14] [,15] [,16] [,17] [,18] [,19] row3 -2.29182675 -0.5324052 -0.5070873 -0.5324697 1.8547654 0.3642265 row1 -0.03420072 -0.3723810 0.4193347 -0.2969810 0.9355508 -1.2325988 [,20] row3 0.6985633 row1 -2.5742993 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 1.070134 -1.254995 -0.008278524 0.4713167 0.9228046 0.2631861 0.9517106 [,8] [,9] [,10] row2 0.04922493 0.3754271 1.932466 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.3778455 -0.9035576 0.1519416 0.6769748 0.2131386 -0.7020528 -0.4032195 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.5525097 0.3666085 0.7835786 -0.5330214 0.5032509 -0.08486945 -1.458457 [,15] [,16] [,17] [,18] [,19] [,20] row5 -1.602987 0.1909898 -1.321912 -0.1060526 -0.6401648 0.6793228 > > > 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: 0x600001234000> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad2be9158c" [2] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad27385a06f" [3] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad249e812a9" [4] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad223213b27" [5] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad25ab28f75" [6] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad2e878d8" [7] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad21e55ad5f" [8] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad2ae94788" [9] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad259573750" [10] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad26cf09302" [11] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad22643a02e" [12] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad221c93fa2" [13] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad22370b602" [14] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad23cbd4f7b" [15] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM2ad230ad3364" > > > ### 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: 0x60000125c0c0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x60000125c0c0> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x60000125c0c0> > rowMedians(tmp) [1] 0.0409107807 0.0630401190 0.0036298040 0.4560928237 0.0472489883 [6] 0.0144449720 -0.6553726667 -0.0668734275 0.1447331034 -0.1370584663 [11] -0.2492437350 0.4687283359 -0.1827771110 0.2250428296 0.2554590203 [16] -0.1235965680 0.0896630345 0.1621419214 -0.1720153068 0.0535146401 [21] 0.2982812111 0.3893681790 -0.2327985525 -0.0265535146 -0.0863531165 [26] -0.5549118067 -0.2427185906 -0.4359342428 -0.3056450422 -0.3372897634 [31] -0.5638185026 0.0131288165 0.1389795404 -0.4164094629 0.0068125742 [36] -0.2575067060 0.0163594550 0.1302555398 0.0940795845 -0.0575024863 [41] 0.3364159333 0.3939346679 0.3343995831 -0.0932244956 0.2386910721 [46] 0.0913000890 -0.5044540293 0.1258189394 0.0511199129 0.2166864837 [51] -0.3653292748 -0.4118612323 0.2011587934 0.3350965422 -0.1463789878 [56] 0.1717239358 0.1681182060 0.0174196379 -0.0967733482 0.3926257146 [61] -0.3269081140 -0.1321231944 -0.4885280799 -0.1845930362 0.1944227197 [66] -0.4572265633 -0.0758667861 0.7741288214 -0.2180464095 0.0312271885 [71] 0.4944505391 0.1341948604 -0.6394999530 -0.7622816118 0.0892025211 [76] 0.0639753544 0.4050304265 0.1895904971 -0.0412206005 -0.2038156796 [81] 0.1206727076 -0.2107333935 -0.0579041527 -0.3148243775 0.2059928063 [86] -0.3670919147 0.4230867113 -0.4818917365 -0.7196421665 -0.0368719279 [91] 0.0488337051 0.2361665266 -0.1095533329 -0.0100490139 -0.0540229576 [96] 0.6203774507 -0.3560239723 -0.4525954221 0.3926668992 0.0886451116 [101] 0.4044663854 0.0515149280 0.0714561329 0.3587805665 -0.4947450919 [106] -0.3072306586 -0.1595602190 0.2665923340 -0.0452143984 -0.1487249093 [111] -0.5667004986 -0.0736286542 0.0222209757 0.5656698708 -0.1158643297 [116] -0.2132397252 -0.0676894414 0.3952551975 -0.1708558793 0.3791856989 [121] 0.0001063572 -0.1267782243 -0.3316554323 0.0666624817 -0.1687088124 [126] -0.4326107892 -0.0246954509 -0.0591691500 0.4669344259 0.0193453743 [131] 0.1428570512 0.0175639561 -0.4988480487 0.2293950766 -0.5705998809 [136] -0.3315578812 -0.1424631383 -0.0768419131 -0.0215501012 0.0250432098 [141] 0.1756282105 -0.2748724598 0.2256998344 0.3148886041 0.1865064410 [146] -0.0468450151 0.3259573540 -0.0498067495 0.1438129334 0.0755789811 [151] 0.2991852160 -0.3680967156 0.2031180216 0.3973568494 -0.6335227106 [156] -0.2291883421 0.3899127407 -0.5472041473 -0.1296628654 0.1243439969 [161] -0.0478763198 0.1385389324 0.2708237893 -0.1191127213 0.0122167751 [166] 0.0677127239 0.3244569324 0.2363446508 -0.0283962956 -0.1391866579 [171] 0.0039740350 0.2134201200 -0.4907385950 -0.0850055644 0.4865294461 [176] 0.2485588796 0.2659774664 -0.3068667962 -0.2636436599 0.0947258288 [181] -0.5181830380 0.2519878997 -0.4058221441 -0.1323286604 -0.5180136270 [186] -0.1856828953 -0.3824864938 -0.2924288778 0.1396389349 0.3979293089 [191] 0.5007685008 0.0861644482 0.2616998801 0.4594807770 0.1277993848 [196] 0.0665222263 0.5055811479 0.0713288129 0.1639348297 -0.0338907092 [201] 0.1200663593 0.0492667020 -0.0446401786 0.0277617733 0.5182195474 [206] 0.0489138694 -0.5536410318 -0.0614351525 0.3045672221 -0.1246050426 [211] 0.1221478877 -0.2161613381 0.1530479434 -0.1174308304 0.2316796419 [216] -0.1444419734 0.0042232542 0.2264732261 0.2893711276 0.0317357190 [221] 0.4149268554 -0.1552106123 -0.3742854030 0.2429784171 0.1337603322 [226] -0.2920247694 -0.0471126612 0.1388791909 0.5784098510 -0.3489101270 > > proc.time() user system elapsed 5.047 19.024 27.403
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x600001c143c0> > .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: 0x600001c143c0> > .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: 0x600001c143c0> > .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: 0x600001c143c0> > 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: 0x600001c000c0> > .Call("R_bm_AddColumn",P) <pointer: 0x600001c000c0> > .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: 0x600001c000c0> > .Call("R_bm_AddColumn",P) <pointer: 0x600001c000c0> > .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: 0x600001c000c0> > 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: 0x600001c2c000> > .Call("R_bm_AddColumn",P) <pointer: 0x600001c2c000> > .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: 0x600001c2c000> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600001c2c000> > .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: 0x600001c2c000> > > .Call("R_bm_RowMode",P) <pointer: 0x600001c2c000> > .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: 0x600001c2c000> > > .Call("R_bm_ColMode",P) <pointer: 0x600001c2c000> > .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: 0x600001c2c000> > 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: 0x600001c301e0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600001c301e0> > .Call("R_bm_AddColumn",P) <pointer: 0x600001c301e0> > .Call("R_bm_AddColumn",P) <pointer: 0x600001c301e0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile2f0150b6286a" "BufferedMatrixFile2f016717708b" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile2f0150b6286a" "BufferedMatrixFile2f016717708b" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600001c30420> > .Call("R_bm_AddColumn",P) <pointer: 0x600001c30420> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600001c30420> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600001c30420> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600001c30420> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600001c30420> > .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: 0x600001c54000> > .Call("R_bm_AddColumn",P) <pointer: 0x600001c54000> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600001c54000> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600001c54000> > 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: 0x600001c180c0> > .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: 0x600001c180c0> > rm(P) > > proc.time() user system elapsed 0.580 0.216 0.794
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.564 0.131 0.670