Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-08-21 12:06 -0400 (Thu, 21 Aug 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4819 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4597 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4539 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4536 |
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 251/2318 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.73.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.7 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
taishan | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.73.0 |
Command: /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz |
StartedAt: 2025-08-20 18:27:17 -0400 (Wed, 20 Aug 2025) |
EndedAt: 2025-08-20 18:27:34 -0400 (Wed, 20 Aug 2025) |
EllapsedTime: 17.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.73.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.22-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.7 * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.73.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... WARNING Found the following significant warnings: doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] See ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 15.0.0 (clang-1500.1.0.2.5)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking sizes of PDF files under ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.73.0’ ** using staged installation ** libs using C compiler: ‘Apple clang version 15.0.0 (clang-1500.1.0.2.5)’ 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.123 0.039 0.155
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.22-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells 480828 25.7 1056621 56.5 NA 634345 33.9 Vcells 891019 6.8 8388608 64.0 196608 2109860 16.1 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Wed Aug 20 18:27:27 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Wed Aug 20 18:27:27 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: 0x600002ee0000> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Wed Aug 20 18:27:28 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Wed Aug 20 18:27:29 2025" > > ColMode(tmp2) <pointer: 0x600002ee0000> > > > > ### 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.6647133 0.3122969 -0.06651384 1.4260505 [2,] -0.4074112 -0.4881573 0.68581499 -2.1091920 [3,] 0.2861787 -0.4147090 0.17100793 0.1748535 [4,] 0.2349386 0.3482072 0.74958635 0.3279353 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.6647133 0.3122969 0.06651384 1.4260505 [2,] 0.4074112 0.4881573 0.68581499 2.1091920 [3,] 0.2861787 0.4147090 0.17100793 0.1748535 [4,] 0.2349386 0.3482072 0.74958635 0.3279353 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9832216 0.5588353 0.2579028 1.1941735 [2,] 0.6382877 0.6986825 0.8281395 1.4523058 [3,] 0.5349567 0.6439790 0.4135311 0.4181549 [4,] 0.4847046 0.5900909 0.8657865 0.5726564 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.49693 30.90065 27.64554 38.36779 [2,] 31.79029 32.47498 33.96721 41.63225 [3,] 30.63575 31.85450 29.30632 29.35640 [4,] 30.08198 31.24912 34.40745 31.05450 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600002eec000> > exp(tmp5) <pointer: 0x600002eec000> > log(tmp5,2) <pointer: 0x600002eec000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 467.2609 > Min(tmp5) [1] 54.05971 > mean(tmp5) [1] 72.07794 > Sum(tmp5) [1] 14415.59 > Var(tmp5) [1] 856.2539 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 89.48213 72.78856 69.74086 67.85108 69.15811 70.42051 70.03436 70.30472 [9] 70.49672 70.50233 > rowSums(tmp5) [1] 1789.643 1455.771 1394.817 1357.022 1383.162 1408.410 1400.687 1406.094 [9] 1409.934 1410.047 > rowVars(tmp5) [1] 7974.07872 80.08652 62.61833 69.89663 47.79931 43.98650 [7] 78.77558 82.81565 85.20973 74.11387 > rowSd(tmp5) [1] 89.297697 8.949107 7.913174 8.360420 6.913704 6.632232 8.875561 [8] 9.100311 9.230912 8.608941 > rowMax(tmp5) [1] 467.26094 86.65207 84.55844 84.75233 82.80390 82.19484 92.77781 [8] 87.51030 90.82898 90.04660 > rowMin(tmp5) [1] 56.82243 54.05971 58.85633 55.12418 58.96993 57.07571 58.00822 56.87379 [9] 56.49099 60.53339 > > colMeans(tmp5) [1] 107.61052 64.48921 67.25472 71.40972 67.51884 73.17126 72.56784 [8] 70.50605 71.13846 69.58469 70.68371 68.35528 73.54252 71.13296 [15] 69.00104 66.24896 72.41833 68.85381 73.20854 72.86237 > colSums(tmp5) [1] 1076.1052 644.8921 672.5472 714.0972 675.1884 731.7126 725.6784 [8] 705.0605 711.3846 695.8469 706.8371 683.5528 735.4252 711.3296 [15] 690.0104 662.4896 724.1833 688.5381 732.0854 728.6237 > colVars(tmp5) [1] 16015.92536 44.55609 72.42396 67.90039 32.70580 126.02529 [7] 108.86924 49.24834 44.09675 76.45229 119.47551 17.28624 [13] 59.84695 75.93215 82.44106 39.85251 49.87463 63.24167 [19] 41.99916 133.08117 > colSd(tmp5) [1] 126.554041 6.675035 8.510227 8.240169 5.718899 11.226099 [7] 10.434042 7.017716 6.640538 8.743700 10.930485 4.157673 [13] 7.736081 8.713906 9.079706 6.312885 7.062197 7.952463 [19] 6.480676 11.536081 > colMax(tmp5) [1] 467.26094 76.22956 81.14094 86.65207 75.68628 86.34017 88.23766 [8] 83.82024 80.56032 85.69897 90.82898 74.28525 84.55844 87.51030 [15] 90.04660 74.16641 82.89231 84.11756 84.75233 92.77781 > colMin(tmp5) [1] 59.42767 56.49099 57.54057 61.10150 56.82243 55.12418 58.91484 61.47009 [9] 59.83124 58.24030 57.07571 60.72712 64.91136 60.17377 59.78207 54.05971 [17] 62.59255 58.61064 63.23209 59.43617 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] 89.48213 72.78856 69.74086 67.85108 69.15811 70.42051 70.03436 70.30472 [9] NA 70.50233 > rowSums(tmp5) [1] 1789.643 1455.771 1394.817 1357.022 1383.162 1408.410 1400.687 1406.094 [9] NA 1410.047 > rowVars(tmp5) [1] 7974.07872 80.08652 62.61833 69.89663 47.79931 43.98650 [7] 78.77558 82.81565 78.47223 74.11387 > rowSd(tmp5) [1] 89.297697 8.949107 7.913174 8.360420 6.913704 6.632232 8.875561 [8] 9.100311 8.858455 8.608941 > rowMax(tmp5) [1] 467.26094 86.65207 84.55844 84.75233 82.80390 82.19484 92.77781 [8] 87.51030 NA 90.04660 > rowMin(tmp5) [1] 56.82243 54.05971 58.85633 55.12418 58.96993 57.07571 58.00822 56.87379 [9] NA 60.53339 > > colMeans(tmp5) [1] 107.61052 NA 67.25472 71.40972 67.51884 73.17126 72.56784 [8] 70.50605 71.13846 69.58469 70.68371 68.35528 73.54252 71.13296 [15] 69.00104 66.24896 72.41833 68.85381 73.20854 72.86237 > colSums(tmp5) [1] 1076.1052 NA 672.5472 714.0972 675.1884 731.7126 725.6784 [8] 705.0605 711.3846 695.8469 706.8371 683.5528 735.4252 711.3296 [15] 690.0104 662.4896 724.1833 688.5381 732.0854 728.6237 > colVars(tmp5) [1] 16015.92536 NA 72.42396 67.90039 32.70580 126.02529 [7] 108.86924 49.24834 44.09675 76.45229 119.47551 17.28624 [13] 59.84695 75.93215 82.44106 39.85251 49.87463 63.24167 [19] 41.99916 133.08117 > colSd(tmp5) [1] 126.554041 NA 8.510227 8.240169 5.718899 11.226099 [7] 10.434042 7.017716 6.640538 8.743700 10.930485 4.157673 [13] 7.736081 8.713906 9.079706 6.312885 7.062197 7.952463 [19] 6.480676 11.536081 > colMax(tmp5) [1] 467.26094 NA 81.14094 86.65207 75.68628 86.34017 88.23766 [8] 83.82024 80.56032 85.69897 90.82898 74.28525 84.55844 87.51030 [15] 90.04660 74.16641 82.89231 84.11756 84.75233 92.77781 > colMin(tmp5) [1] 59.42767 NA 57.54057 61.10150 56.82243 55.12418 58.91484 61.47009 [9] 59.83124 58.24030 57.07571 60.72712 64.91136 60.17377 59.78207 54.05971 [17] 62.59255 58.61064 63.23209 59.43617 > > Max(tmp5,na.rm=TRUE) [1] 467.2609 > Min(tmp5,na.rm=TRUE) [1] 54.05971 > mean(tmp5,na.rm=TRUE) [1] 72.15627 > Sum(tmp5,na.rm=TRUE) [1] 14359.1 > Var(tmp5,na.rm=TRUE) [1] 859.3453 > > rowMeans(tmp5,na.rm=TRUE) [1] 89.48213 72.78856 69.74086 67.85108 69.15811 70.42051 70.03436 70.30472 [9] 71.23387 70.50233 > rowSums(tmp5,na.rm=TRUE) [1] 1789.643 1455.771 1394.817 1357.022 1383.162 1408.410 1400.687 1406.094 [9] 1353.443 1410.047 > rowVars(tmp5,na.rm=TRUE) [1] 7974.07872 80.08652 62.61833 69.89663 47.79931 43.98650 [7] 78.77558 82.81565 78.47223 74.11387 > rowSd(tmp5,na.rm=TRUE) [1] 89.297697 8.949107 7.913174 8.360420 6.913704 6.632232 8.875561 [8] 9.100311 8.858455 8.608941 > rowMax(tmp5,na.rm=TRUE) [1] 467.26094 86.65207 84.55844 84.75233 82.80390 82.19484 92.77781 [8] 87.51030 90.82898 90.04660 > rowMin(tmp5,na.rm=TRUE) [1] 56.82243 54.05971 58.85633 55.12418 58.96993 57.07571 58.00822 56.87379 [9] 58.24030 60.53339 > > colMeans(tmp5,na.rm=TRUE) [1] 107.61052 65.37790 67.25472 71.40972 67.51884 73.17126 72.56784 [8] 70.50605 71.13846 69.58469 70.68371 68.35528 73.54252 71.13296 [15] 69.00104 66.24896 72.41833 68.85381 73.20854 72.86237 > colSums(tmp5,na.rm=TRUE) [1] 1076.1052 588.4011 672.5472 714.0972 675.1884 731.7126 725.6784 [8] 705.0605 711.3846 695.8469 706.8371 683.5528 735.4252 711.3296 [15] 690.0104 662.4896 724.1833 688.5381 732.0854 728.6237 > colVars(tmp5,na.rm=TRUE) [1] 16015.92536 41.24069 72.42396 67.90039 32.70580 126.02529 [7] 108.86924 49.24834 44.09675 76.45229 119.47551 17.28624 [13] 59.84695 75.93215 82.44106 39.85251 49.87463 63.24167 [19] 41.99916 133.08117 > colSd(tmp5,na.rm=TRUE) [1] 126.554041 6.421891 8.510227 8.240169 5.718899 11.226099 [7] 10.434042 7.017716 6.640538 8.743700 10.930485 4.157673 [13] 7.736081 8.713906 9.079706 6.312885 7.062197 7.952463 [19] 6.480676 11.536081 > colMax(tmp5,na.rm=TRUE) [1] 467.26094 76.22956 81.14094 86.65207 75.68628 86.34017 88.23766 [8] 83.82024 80.56032 85.69897 90.82898 74.28525 84.55844 87.51030 [15] 90.04660 74.16641 82.89231 84.11756 84.75233 92.77781 > colMin(tmp5,na.rm=TRUE) [1] 59.42767 56.87379 57.54057 61.10150 56.82243 55.12418 58.91484 61.47009 [9] 59.83124 58.24030 57.07571 60.72712 64.91136 60.17377 59.78207 54.05971 [17] 62.59255 58.61064 63.23209 59.43617 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 89.48213 72.78856 69.74086 67.85108 69.15811 70.42051 70.03436 70.30472 [9] NaN 70.50233 > rowSums(tmp5,na.rm=TRUE) [1] 1789.643 1455.771 1394.817 1357.022 1383.162 1408.410 1400.687 1406.094 [9] 0.000 1410.047 > rowVars(tmp5,na.rm=TRUE) [1] 7974.07872 80.08652 62.61833 69.89663 47.79931 43.98650 [7] 78.77558 82.81565 NA 74.11387 > rowSd(tmp5,na.rm=TRUE) [1] 89.297697 8.949107 7.913174 8.360420 6.913704 6.632232 8.875561 [8] 9.100311 NA 8.608941 > rowMax(tmp5,na.rm=TRUE) [1] 467.26094 86.65207 84.55844 84.75233 82.80390 82.19484 92.77781 [8] 87.51030 NA 90.04660 > rowMin(tmp5,na.rm=TRUE) [1] 56.82243 54.05971 58.85633 55.12418 58.96993 57.07571 58.00822 56.87379 [9] NA 60.53339 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 112.38888 NaN 68.19632 72.33677 66.81199 73.45508 70.82675 [8] 70.85372 71.30514 70.84517 68.44534 67.69639 74.33020 70.90742 [15] 69.40201 65.86067 72.35493 68.21943 73.89049 71.56801 > colSums(tmp5,na.rm=TRUE) [1] 1011.5000 0.0000 613.7669 651.0309 601.3079 661.0958 637.4407 [8] 637.6835 641.7462 637.6066 616.0081 609.2675 668.9718 638.1667 [15] 624.6181 592.7460 651.1944 613.9749 665.0144 644.1121 > colVars(tmp5,na.rm=TRUE) [1] 17761.04705 NA 71.50252 66.71940 31.17312 140.87219 [7] 88.37466 54.04449 49.29631 68.13450 78.04438 14.56306 [13] 60.34790 84.85138 90.93747 43.13789 56.06374 66.61950 [19] 42.01709 130.86840 > colSd(tmp5,na.rm=TRUE) [1] 133.270578 NA 8.455916 8.168194 5.583289 11.868959 [7] 9.400780 7.351496 7.021133 8.254363 8.834273 3.816158 [13] 7.768391 9.211481 9.536114 6.567944 7.487573 8.162077 [19] 6.482059 11.439773 > colMax(tmp5,na.rm=TRUE) [1] 467.26094 -Inf 81.14094 86.65207 75.68628 86.34017 82.80390 [8] 83.82024 80.56032 85.69897 80.48092 73.73248 84.55844 87.51030 [15] 90.04660 74.16641 82.89231 84.11756 84.75233 92.77781 > colMin(tmp5,na.rm=TRUE) [1] 59.42767 Inf 57.54057 61.10150 56.82243 55.12418 58.91484 61.47009 [9] 59.83124 59.91292 57.07571 60.72712 64.91136 60.17377 59.78207 54.05971 [17] 62.59255 58.61064 63.23209 59.43617 > > > > > 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] 197.5523 420.6898 202.7396 284.3233 288.6322 313.6761 141.1286 135.3738 [9] 261.3674 352.8952 > apply(copymatrix,1,var,na.rm=TRUE) [1] 197.5523 420.6898 202.7396 284.3233 288.6322 313.6761 141.1286 135.3738 [9] 261.3674 352.8952 > > > > 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] 5.684342e-14 -5.684342e-14 5.684342e-14 0.000000e+00 2.842171e-14 [6] 1.421085e-14 -2.842171e-14 1.136868e-13 0.000000e+00 -5.684342e-14 [11] 2.842171e-14 0.000000e+00 -5.684342e-14 -1.136868e-13 5.684342e-14 [16] -2.842171e-14 1.421085e-14 -1.136868e-13 2.842171e-14 -2.842171e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 6 6 2 9 8 3 7 6 9 5 10 6 9 13 8 8 8 5 3 15 8 20 8 7 3 3 5 9 9 14 5 19 5 3 5 1 1 17 7 16 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] 1.953334 > Min(tmp) [1] -1.762098 > mean(tmp) [1] 0.2624679 > Sum(tmp) [1] 26.24679 > Var(tmp) [1] 0.6878305 > > rowMeans(tmp) [1] 0.2624679 > rowSums(tmp) [1] 26.24679 > rowVars(tmp) [1] 0.6878305 > rowSd(tmp) [1] 0.8293555 > rowMax(tmp) [1] 1.953334 > rowMin(tmp) [1] -1.762098 > > colMeans(tmp) [1] -1.255707755 0.589392391 1.128666697 -0.032013565 1.642956890 [6] -0.348710299 0.029227959 1.501925246 0.202996674 0.529633247 [11] -1.205949825 0.775972627 1.556423506 -0.009869488 -0.426003972 [16] -0.102954558 -0.890369451 0.253690233 0.410414053 0.011324734 [21] -0.733097293 1.953333917 1.049959324 0.837845467 1.714503435 [26] -0.056997400 -0.176646426 -0.518723584 0.703384855 1.284840768 [31] 0.749667779 1.547010079 -0.199687747 1.869935743 -0.216602261 [36] 1.166806339 0.205940979 0.387477398 0.178702712 1.133001008 [41] 0.720174858 -1.762097520 -1.120370147 0.039402116 1.335775707 [46] 1.687994069 1.308582146 -0.154007723 -0.349197347 0.106241433 [51] -0.158237993 -0.049174344 0.215438700 -0.254620664 -0.337623727 [56] 1.251349957 1.598264307 -0.685417156 -0.439605949 1.429195409 [61] -0.739436614 0.059748047 0.302489820 0.217329661 0.258243049 [66] 0.996465187 -1.222297838 -0.592096846 0.141037390 0.847553806 [71] 0.181688349 -0.816399375 -0.065393055 0.303150888 -0.166205453 [76] 0.777151762 0.687885757 0.605786513 -0.669760584 0.553433325 [81] 0.198170491 0.796742230 0.183291887 -0.434049446 -0.225065060 [86] 1.116337858 -0.832257535 -0.392786723 0.220793207 1.242879551 [91] -1.466122796 0.503594528 1.793640584 -0.716820219 0.661041812 [96] -1.287607215 0.758442754 0.675721799 0.009938979 0.156762677 > colSums(tmp) [1] -1.255707755 0.589392391 1.128666697 -0.032013565 1.642956890 [6] -0.348710299 0.029227959 1.501925246 0.202996674 0.529633247 [11] -1.205949825 0.775972627 1.556423506 -0.009869488 -0.426003972 [16] -0.102954558 -0.890369451 0.253690233 0.410414053 0.011324734 [21] -0.733097293 1.953333917 1.049959324 0.837845467 1.714503435 [26] -0.056997400 -0.176646426 -0.518723584 0.703384855 1.284840768 [31] 0.749667779 1.547010079 -0.199687747 1.869935743 -0.216602261 [36] 1.166806339 0.205940979 0.387477398 0.178702712 1.133001008 [41] 0.720174858 -1.762097520 -1.120370147 0.039402116 1.335775707 [46] 1.687994069 1.308582146 -0.154007723 -0.349197347 0.106241433 [51] -0.158237993 -0.049174344 0.215438700 -0.254620664 -0.337623727 [56] 1.251349957 1.598264307 -0.685417156 -0.439605949 1.429195409 [61] -0.739436614 0.059748047 0.302489820 0.217329661 0.258243049 [66] 0.996465187 -1.222297838 -0.592096846 0.141037390 0.847553806 [71] 0.181688349 -0.816399375 -0.065393055 0.303150888 -0.166205453 [76] 0.777151762 0.687885757 0.605786513 -0.669760584 0.553433325 [81] 0.198170491 0.796742230 0.183291887 -0.434049446 -0.225065060 [86] 1.116337858 -0.832257535 -0.392786723 0.220793207 1.242879551 [91] -1.466122796 0.503594528 1.793640584 -0.716820219 0.661041812 [96] -1.287607215 0.758442754 0.675721799 0.009938979 0.156762677 > 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.255707755 0.589392391 1.128666697 -0.032013565 1.642956890 [6] -0.348710299 0.029227959 1.501925246 0.202996674 0.529633247 [11] -1.205949825 0.775972627 1.556423506 -0.009869488 -0.426003972 [16] -0.102954558 -0.890369451 0.253690233 0.410414053 0.011324734 [21] -0.733097293 1.953333917 1.049959324 0.837845467 1.714503435 [26] -0.056997400 -0.176646426 -0.518723584 0.703384855 1.284840768 [31] 0.749667779 1.547010079 -0.199687747 1.869935743 -0.216602261 [36] 1.166806339 0.205940979 0.387477398 0.178702712 1.133001008 [41] 0.720174858 -1.762097520 -1.120370147 0.039402116 1.335775707 [46] 1.687994069 1.308582146 -0.154007723 -0.349197347 0.106241433 [51] -0.158237993 -0.049174344 0.215438700 -0.254620664 -0.337623727 [56] 1.251349957 1.598264307 -0.685417156 -0.439605949 1.429195409 [61] -0.739436614 0.059748047 0.302489820 0.217329661 0.258243049 [66] 0.996465187 -1.222297838 -0.592096846 0.141037390 0.847553806 [71] 0.181688349 -0.816399375 -0.065393055 0.303150888 -0.166205453 [76] 0.777151762 0.687885757 0.605786513 -0.669760584 0.553433325 [81] 0.198170491 0.796742230 0.183291887 -0.434049446 -0.225065060 [86] 1.116337858 -0.832257535 -0.392786723 0.220793207 1.242879551 [91] -1.466122796 0.503594528 1.793640584 -0.716820219 0.661041812 [96] -1.287607215 0.758442754 0.675721799 0.009938979 0.156762677 > colMin(tmp) [1] -1.255707755 0.589392391 1.128666697 -0.032013565 1.642956890 [6] -0.348710299 0.029227959 1.501925246 0.202996674 0.529633247 [11] -1.205949825 0.775972627 1.556423506 -0.009869488 -0.426003972 [16] -0.102954558 -0.890369451 0.253690233 0.410414053 0.011324734 [21] -0.733097293 1.953333917 1.049959324 0.837845467 1.714503435 [26] -0.056997400 -0.176646426 -0.518723584 0.703384855 1.284840768 [31] 0.749667779 1.547010079 -0.199687747 1.869935743 -0.216602261 [36] 1.166806339 0.205940979 0.387477398 0.178702712 1.133001008 [41] 0.720174858 -1.762097520 -1.120370147 0.039402116 1.335775707 [46] 1.687994069 1.308582146 -0.154007723 -0.349197347 0.106241433 [51] -0.158237993 -0.049174344 0.215438700 -0.254620664 -0.337623727 [56] 1.251349957 1.598264307 -0.685417156 -0.439605949 1.429195409 [61] -0.739436614 0.059748047 0.302489820 0.217329661 0.258243049 [66] 0.996465187 -1.222297838 -0.592096846 0.141037390 0.847553806 [71] 0.181688349 -0.816399375 -0.065393055 0.303150888 -0.166205453 [76] 0.777151762 0.687885757 0.605786513 -0.669760584 0.553433325 [81] 0.198170491 0.796742230 0.183291887 -0.434049446 -0.225065060 [86] 1.116337858 -0.832257535 -0.392786723 0.220793207 1.242879551 [91] -1.466122796 0.503594528 1.793640584 -0.716820219 0.661041812 [96] -1.287607215 0.758442754 0.675721799 0.009938979 0.156762677 > colMedians(tmp) [1] -1.255707755 0.589392391 1.128666697 -0.032013565 1.642956890 [6] -0.348710299 0.029227959 1.501925246 0.202996674 0.529633247 [11] -1.205949825 0.775972627 1.556423506 -0.009869488 -0.426003972 [16] -0.102954558 -0.890369451 0.253690233 0.410414053 0.011324734 [21] -0.733097293 1.953333917 1.049959324 0.837845467 1.714503435 [26] -0.056997400 -0.176646426 -0.518723584 0.703384855 1.284840768 [31] 0.749667779 1.547010079 -0.199687747 1.869935743 -0.216602261 [36] 1.166806339 0.205940979 0.387477398 0.178702712 1.133001008 [41] 0.720174858 -1.762097520 -1.120370147 0.039402116 1.335775707 [46] 1.687994069 1.308582146 -0.154007723 -0.349197347 0.106241433 [51] -0.158237993 -0.049174344 0.215438700 -0.254620664 -0.337623727 [56] 1.251349957 1.598264307 -0.685417156 -0.439605949 1.429195409 [61] -0.739436614 0.059748047 0.302489820 0.217329661 0.258243049 [66] 0.996465187 -1.222297838 -0.592096846 0.141037390 0.847553806 [71] 0.181688349 -0.816399375 -0.065393055 0.303150888 -0.166205453 [76] 0.777151762 0.687885757 0.605786513 -0.669760584 0.553433325 [81] 0.198170491 0.796742230 0.183291887 -0.434049446 -0.225065060 [86] 1.116337858 -0.832257535 -0.392786723 0.220793207 1.242879551 [91] -1.466122796 0.503594528 1.793640584 -0.716820219 0.661041812 [96] -1.287607215 0.758442754 0.675721799 0.009938979 0.156762677 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.255708 0.5893924 1.128667 -0.03201356 1.642957 -0.3487103 0.02922796 [2,] -1.255708 0.5893924 1.128667 -0.03201356 1.642957 -0.3487103 0.02922796 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.501925 0.2029967 0.5296332 -1.20595 0.7759726 1.556424 -0.009869488 [2,] 1.501925 0.2029967 0.5296332 -1.20595 0.7759726 1.556424 -0.009869488 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.426004 -0.1029546 -0.8903695 0.2536902 0.4104141 0.01132473 -0.7330973 [2,] -0.426004 -0.1029546 -0.8903695 0.2536902 0.4104141 0.01132473 -0.7330973 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.953334 1.049959 0.8378455 1.714503 -0.0569974 -0.1766464 -0.5187236 [2,] 1.953334 1.049959 0.8378455 1.714503 -0.0569974 -0.1766464 -0.5187236 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.7033849 1.284841 0.7496678 1.54701 -0.1996877 1.869936 -0.2166023 [2,] 0.7033849 1.284841 0.7496678 1.54701 -0.1996877 1.869936 -0.2166023 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 1.166806 0.205941 0.3874774 0.1787027 1.133001 0.7201749 -1.762098 [2,] 1.166806 0.205941 0.3874774 0.1787027 1.133001 0.7201749 -1.762098 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -1.12037 0.03940212 1.335776 1.687994 1.308582 -0.1540077 -0.3491973 [2,] -1.12037 0.03940212 1.335776 1.687994 1.308582 -0.1540077 -0.3491973 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.1062414 -0.158238 -0.04917434 0.2154387 -0.2546207 -0.3376237 1.25135 [2,] 0.1062414 -0.158238 -0.04917434 0.2154387 -0.2546207 -0.3376237 1.25135 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 1.598264 -0.6854172 -0.4396059 1.429195 -0.7394366 0.05974805 0.3024898 [2,] 1.598264 -0.6854172 -0.4396059 1.429195 -0.7394366 0.05974805 0.3024898 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.2173297 0.258243 0.9964652 -1.222298 -0.5920968 0.1410374 0.8475538 [2,] 0.2173297 0.258243 0.9964652 -1.222298 -0.5920968 0.1410374 0.8475538 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.1816883 -0.8163994 -0.06539305 0.3031509 -0.1662055 0.7771518 0.6878858 [2,] 0.1816883 -0.8163994 -0.06539305 0.3031509 -0.1662055 0.7771518 0.6878858 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.6057865 -0.6697606 0.5534333 0.1981705 0.7967422 0.1832919 -0.4340494 [2,] 0.6057865 -0.6697606 0.5534333 0.1981705 0.7967422 0.1832919 -0.4340494 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.2250651 1.116338 -0.8322575 -0.3927867 0.2207932 1.24288 -1.466123 [2,] -0.2250651 1.116338 -0.8322575 -0.3927867 0.2207932 1.24288 -1.466123 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.5035945 1.793641 -0.7168202 0.6610418 -1.287607 0.7584428 0.6757218 [2,] 0.5035945 1.793641 -0.7168202 0.6610418 -1.287607 0.7584428 0.6757218 [,99] [,100] [1,] 0.009938979 0.1567627 [2,] 0.009938979 0.1567627 > > > Max(tmp2) [1] 2.981305 > Min(tmp2) [1] -3.2649 > mean(tmp2) [1] 0.009608868 > Sum(tmp2) [1] 0.9608868 > Var(tmp2) [1] 1.352672 > > rowMeans(tmp2) [1] -0.745411172 -1.030482800 1.515912564 -0.690763563 -0.978883666 [6] 0.105134426 -0.579238525 0.117174335 1.203236811 1.112571807 [11] 1.907525510 -2.612106813 -0.634750899 -1.024588251 0.015289224 [16] 0.231053326 -1.231083388 -1.453375507 -0.293061420 -0.779736032 [21] -0.972964409 -0.474477793 1.459833413 -2.412011715 0.329140963 [26] 0.519212753 0.874608155 1.269300470 0.282860360 -1.462407989 [31] 0.757215301 0.870926880 0.007713818 -0.667823665 -0.022004777 [36] 1.337128642 1.066298352 -0.908805027 -0.875489888 0.062833590 [41] 0.089402544 -0.309623407 1.071472967 -0.952381779 0.447340017 [46] -0.630616182 0.387732754 2.142335821 2.981304738 -1.913044500 [51] -0.873712346 -2.068015800 0.715617265 -0.431237552 0.252384387 [56] -0.326145166 -0.072919601 0.323668423 1.103755148 -0.707822628 [61] 0.192005875 -0.833257684 -0.507803901 1.480823382 2.329361608 [66] 1.264331120 2.475412425 -0.173868577 0.740869766 -1.196141077 [71] -0.107482541 -2.570875767 0.126362229 -1.666745721 0.548950579 [76] -0.649787275 -0.438566856 0.402377848 -0.409255736 -0.556990352 [81] -0.191110319 -3.264900426 0.919634264 -0.504844970 1.974331095 [86] -1.840167192 1.114557281 0.381205592 0.357974453 0.571119571 [91] 1.237030298 -0.508939301 0.040401904 1.672954421 -0.517965507 [96] 1.553107339 1.356369381 0.073466799 -1.077992696 0.739936922 > rowSums(tmp2) [1] -0.745411172 -1.030482800 1.515912564 -0.690763563 -0.978883666 [6] 0.105134426 -0.579238525 0.117174335 1.203236811 1.112571807 [11] 1.907525510 -2.612106813 -0.634750899 -1.024588251 0.015289224 [16] 0.231053326 -1.231083388 -1.453375507 -0.293061420 -0.779736032 [21] -0.972964409 -0.474477793 1.459833413 -2.412011715 0.329140963 [26] 0.519212753 0.874608155 1.269300470 0.282860360 -1.462407989 [31] 0.757215301 0.870926880 0.007713818 -0.667823665 -0.022004777 [36] 1.337128642 1.066298352 -0.908805027 -0.875489888 0.062833590 [41] 0.089402544 -0.309623407 1.071472967 -0.952381779 0.447340017 [46] -0.630616182 0.387732754 2.142335821 2.981304738 -1.913044500 [51] -0.873712346 -2.068015800 0.715617265 -0.431237552 0.252384387 [56] -0.326145166 -0.072919601 0.323668423 1.103755148 -0.707822628 [61] 0.192005875 -0.833257684 -0.507803901 1.480823382 2.329361608 [66] 1.264331120 2.475412425 -0.173868577 0.740869766 -1.196141077 [71] -0.107482541 -2.570875767 0.126362229 -1.666745721 0.548950579 [76] -0.649787275 -0.438566856 0.402377848 -0.409255736 -0.556990352 [81] -0.191110319 -3.264900426 0.919634264 -0.504844970 1.974331095 [86] -1.840167192 1.114557281 0.381205592 0.357974453 0.571119571 [91] 1.237030298 -0.508939301 0.040401904 1.672954421 -0.517965507 [96] 1.553107339 1.356369381 0.073466799 -1.077992696 0.739936922 > rowVars(tmp2) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > rowSd(tmp2) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > rowMax(tmp2) [1] -0.745411172 -1.030482800 1.515912564 -0.690763563 -0.978883666 [6] 0.105134426 -0.579238525 0.117174335 1.203236811 1.112571807 [11] 1.907525510 -2.612106813 -0.634750899 -1.024588251 0.015289224 [16] 0.231053326 -1.231083388 -1.453375507 -0.293061420 -0.779736032 [21] -0.972964409 -0.474477793 1.459833413 -2.412011715 0.329140963 [26] 0.519212753 0.874608155 1.269300470 0.282860360 -1.462407989 [31] 0.757215301 0.870926880 0.007713818 -0.667823665 -0.022004777 [36] 1.337128642 1.066298352 -0.908805027 -0.875489888 0.062833590 [41] 0.089402544 -0.309623407 1.071472967 -0.952381779 0.447340017 [46] -0.630616182 0.387732754 2.142335821 2.981304738 -1.913044500 [51] -0.873712346 -2.068015800 0.715617265 -0.431237552 0.252384387 [56] -0.326145166 -0.072919601 0.323668423 1.103755148 -0.707822628 [61] 0.192005875 -0.833257684 -0.507803901 1.480823382 2.329361608 [66] 1.264331120 2.475412425 -0.173868577 0.740869766 -1.196141077 [71] -0.107482541 -2.570875767 0.126362229 -1.666745721 0.548950579 [76] -0.649787275 -0.438566856 0.402377848 -0.409255736 -0.556990352 [81] -0.191110319 -3.264900426 0.919634264 -0.504844970 1.974331095 [86] -1.840167192 1.114557281 0.381205592 0.357974453 0.571119571 [91] 1.237030298 -0.508939301 0.040401904 1.672954421 -0.517965507 [96] 1.553107339 1.356369381 0.073466799 -1.077992696 0.739936922 > rowMin(tmp2) [1] -0.745411172 -1.030482800 1.515912564 -0.690763563 -0.978883666 [6] 0.105134426 -0.579238525 0.117174335 1.203236811 1.112571807 [11] 1.907525510 -2.612106813 -0.634750899 -1.024588251 0.015289224 [16] 0.231053326 -1.231083388 -1.453375507 -0.293061420 -0.779736032 [21] -0.972964409 -0.474477793 1.459833413 -2.412011715 0.329140963 [26] 0.519212753 0.874608155 1.269300470 0.282860360 -1.462407989 [31] 0.757215301 0.870926880 0.007713818 -0.667823665 -0.022004777 [36] 1.337128642 1.066298352 -0.908805027 -0.875489888 0.062833590 [41] 0.089402544 -0.309623407 1.071472967 -0.952381779 0.447340017 [46] -0.630616182 0.387732754 2.142335821 2.981304738 -1.913044500 [51] -0.873712346 -2.068015800 0.715617265 -0.431237552 0.252384387 [56] -0.326145166 -0.072919601 0.323668423 1.103755148 -0.707822628 [61] 0.192005875 -0.833257684 -0.507803901 1.480823382 2.329361608 [66] 1.264331120 2.475412425 -0.173868577 0.740869766 -1.196141077 [71] -0.107482541 -2.570875767 0.126362229 -1.666745721 0.548950579 [76] -0.649787275 -0.438566856 0.402377848 -0.409255736 -0.556990352 [81] -0.191110319 -3.264900426 0.919634264 -0.504844970 1.974331095 [86] -1.840167192 1.114557281 0.381205592 0.357974453 0.571119571 [91] 1.237030298 -0.508939301 0.040401904 1.672954421 -0.517965507 [96] 1.553107339 1.356369381 0.073466799 -1.077992696 0.739936922 > > colMeans(tmp2) [1] 0.009608868 > colSums(tmp2) [1] 0.9608868 > colVars(tmp2) [1] 1.352672 > colSd(tmp2) [1] 1.163044 > colMax(tmp2) [1] 2.981305 > colMin(tmp2) [1] -3.2649 > colMedians(tmp2) [1] 0.02784556 > colRanges(tmp2) [,1] [1,] -3.264900 [2,] 2.981305 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] -2.0022555 -5.9508549 0.2448837 3.3320100 1.7130373 -2.1374354 [7] 1.0794739 0.7728714 -1.7423895 3.6431927 > colApply(tmp,quantile)[,1] [,1] [1,] -2.7647939 [2,] -0.4988315 [3,] 0.0582581 [4,] 0.3034531 [5,] 1.8905807 > > rowApply(tmp,sum) [1] 0.5213378 2.0236227 -5.2980458 -6.3029121 2.8655071 2.0168681 [7] -4.6813308 4.5939037 1.6513672 1.5622158 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 2 4 7 7 3 4 10 5 10 1 [2,] 7 1 1 1 1 2 2 7 8 8 [3,] 5 2 5 4 9 6 1 4 9 10 [4,] 1 9 10 10 4 1 8 9 6 9 [5,] 10 7 6 2 5 7 4 6 4 6 [6,] 6 3 8 5 2 10 9 2 2 3 [7,] 3 6 9 3 10 5 6 10 7 2 [8,] 4 5 2 9 6 9 7 3 3 7 [9,] 8 10 4 6 7 3 3 1 1 5 [10,] 9 8 3 8 8 8 5 8 5 4 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -2.28396282 -2.05727695 0.30358454 -3.11941298 0.47345970 0.14436735 [7] 0.07367776 0.20005795 -4.32897691 3.66761433 2.05323379 0.84736216 [13] -0.35543909 4.18051419 -3.18771200 1.84632483 -5.68964529 -3.69430824 [19] -0.67323540 0.85118500 > colApply(tmp,quantile)[,1] [,1] [1,] -1.04541462 [2,] -0.67187040 [3,] -0.54569882 [4,] -0.09355347 [5,] 0.07257448 > > rowApply(tmp,sum) [1] 2.152636 4.162451 -4.509871 -1.804716 -10.749087 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 7 11 13 6 7 [2,] 11 7 12 3 11 [3,] 4 3 9 15 20 [4,] 1 20 20 7 1 [5,] 16 10 7 17 8 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.54569882 0.09721317 -0.7957205 -1.7373186 0.88136663 2.20021737 [2,] 0.07257448 -0.20744558 -0.8015816 2.3936160 0.03038779 -0.19868940 [3,] -0.09355347 -0.17290317 -0.4005738 1.1063614 -0.46890396 -0.03013146 [4,] -0.67187040 -1.40841323 0.5690904 -0.6310527 0.88399715 -1.45337632 [5,] -1.04541462 -0.36572815 1.7323701 -4.2510191 -0.85338791 -0.37365284 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.3943290 1.81771788 -0.9220502 0.1245062 -0.11230864 0.2997762 [2,] 0.0902457 -1.90890135 -0.6992089 1.2523689 1.38784107 1.7115214 [3,] -0.3970630 0.36243157 -1.0379503 0.8820680 0.52314672 -0.4580431 [4,] 0.9140954 0.06916278 -0.3465712 1.2756489 0.09534568 -0.5739401 [5,] -1.9279294 -0.14035293 -1.3231963 0.1330224 0.15920897 -0.1319521 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.9408196 0.7745057 0.5382636 -0.5489387 -1.3001197 -0.1377108 [2,] -0.3121598 0.1751704 -0.8155698 1.3134558 -0.2753275 -0.0339155 [3,] -0.5746712 -0.3989989 -0.5711575 0.6618222 -1.5060436 -2.0556909 [4,] 0.4281087 1.9698559 -0.5277803 -0.2547193 -0.7053803 -1.4404613 [5,] -0.8375364 1.6599812 -1.8114681 0.6747048 -1.9027741 -0.0265297 [,19] [,20] [1,] -0.6361289 -0.1800845 [2,] 0.7571585 0.2309105 [3,] -0.5512729 0.6712560 [4,] 0.8632384 -0.8596945 [5,] -1.1062305 0.9887975 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 655 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 567 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -1.58074 0.9979144 0.2066212 1.211563 -1.150258 0.5178354 0.4190822 col8 col9 col10 col11 col12 col13 col14 row1 0.2282616 1.284519 1.001294 2.27942 0.5341866 -1.027551 -0.2231819 col15 col16 col17 col18 col19 col20 row1 1.742135 0.6272193 0.02837241 0.3884905 -0.8214127 -0.5555808 > tmp[,"col10"] col10 row1 1.0012943 row2 0.5477120 row3 -0.2714901 row4 -0.6104439 row5 1.2562438 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -1.5807404 0.99791445 0.2066212 1.2115632 -1.1502582 0.5178354 0.4190822 row5 0.8333131 0.04768308 0.8943429 0.1741031 0.6841888 -0.9895242 -0.1009037 col8 col9 col10 col11 col12 col13 col14 row1 0.2282616 1.28451903 1.001294 2.279420 0.5341866 -1.0275510 -0.2231819 row5 -0.3472598 0.08918039 1.256244 -1.104303 1.3199775 0.6742076 1.9359599 col15 col16 col17 col18 col19 col20 row1 1.742135 0.6272193 0.02837241 0.3884905 -0.8214127 -0.5555808 row5 1.934684 0.5184094 -0.57925112 1.2350205 0.9437992 0.7610904 > tmp[,c("col6","col20")] col6 col20 row1 0.5178354 -0.5555808 row2 -0.5274328 -0.5311647 row3 0.3752505 2.3871765 row4 0.4014896 0.2097543 row5 -0.9895242 0.7610904 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.5178354 -0.5555808 row5 -0.9895242 0.7610904 > > > > > 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 49.54737 50.64612 48.89173 49.91507 50.01981 104.6471 49.30627 50.80114 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.78383 49.41511 49.04311 49.81354 51.50583 51.63737 51.21129 47.86428 col17 col18 col19 col20 row1 48.71482 51.06873 49.66226 104.5029 > tmp[,"col10"] col10 row1 49.41511 row2 29.66958 row3 31.69368 row4 30.20683 row5 49.78832 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.54737 50.64612 48.89173 49.91507 50.01981 104.6471 49.30627 50.80114 row5 49.32303 50.89441 49.90532 49.92769 52.08304 105.3627 50.32738 51.32795 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.78383 49.41511 49.04311 49.81354 51.50583 51.63737 51.21129 47.86428 row5 49.82314 49.78832 51.54798 48.68424 47.91886 48.90280 50.68602 51.13345 col17 col18 col19 col20 row1 48.71482 51.06873 49.66226 104.5029 row5 49.73702 48.44403 49.07617 105.1411 > tmp[,c("col6","col20")] col6 col20 row1 104.64712 104.50292 row2 74.21975 75.51303 row3 73.55504 74.49519 row4 75.38761 73.20556 row5 105.36272 105.14112 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.6471 104.5029 row5 105.3627 105.1411 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.6471 104.5029 row5 105.3627 105.1411 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.29790001 [2,] -0.07153087 [3,] -0.33054256 [4,] 1.96312265 [5,] 2.16609355 > tmp[,c("col17","col7")] col17 col7 [1,] -0.23804209 0.61628093 [2,] -0.19404708 -1.63342259 [3,] 0.50382884 -1.02084849 [4,] 0.42511466 -0.02694993 [5,] -0.00640584 -1.13321796 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.502808383 1.07083018 [2,] -0.003816454 0.54711353 [3,] 0.993272094 0.05030241 [4,] 1.315511021 1.03176725 [5,] 0.837654351 -0.99927606 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.502808 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.502808383 [2,] -0.003816454 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 0.7917576 -0.7012862 1.0966668 0.02592337 1.26289395 -0.9206334 1.5263413 row1 2.1212671 -0.1936359 0.4013785 1.32028851 0.02302377 -2.1705810 -0.4489104 [,8] [,9] [,10] [,11] [,12] [,13] row3 -1.3356022 0.006568484 -0.8457200 -0.6650638 0.08900893 -0.6515250 row1 -0.3889981 -1.450986000 -0.8920909 -0.6031456 -0.87885200 0.3180373 [,14] [,15] [,16] [,17] [,18] [,19] row3 -1.0419804 -0.6121932 0.9361547 -0.3648078 -0.3887736 0.734232551 row1 0.4177689 -2.0066220 -0.3047363 0.3381933 -0.6282916 -0.004190501 [,20] row3 1.356060273 row1 0.001636901 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.5438014 0.8868713 1.537689 -0.8677802 -1.537043 -0.8132026 1.182196 [,8] [,9] [,10] row2 -0.421447 1.63862 0.1167239 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.8214395 0.3066524 -0.1578388 0.428282 -0.9446113 2.097403 -0.6392544 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.4672726 0.1829395 -0.568489 -0.04881642 -1.291415 -0.3519512 -1.308416 [,15] [,16] [,17] [,18] [,19] [,20] row5 2.496012 0.06257571 -0.04367494 -0.09220678 0.08482485 -1.440276 > > > 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: 0x600002ef0420> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM158322f89c1e2" [2] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM158327d17f4cf" [3] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM158322fc98232" [4] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM158325682b920" [5] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM158322048103f" [6] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM158325b22a8a7" [7] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM15832406e9aaf" [8] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM158321d6d7835" [9] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM158327deeeeaa" [10] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1583251771b7d" [11] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1583262add553" [12] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM158322906ec2" [13] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM15832585783de" [14] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1583259929121" [15] "/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1583225763b78" > > > ### 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: 0x600002efc240> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600002efc240> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600002efc240> > rowMedians(tmp) [1] -5.017250e-02 2.014000e-02 2.262894e-01 -1.174532e-01 4.830387e-02 [6] 7.630525e-05 -4.039295e-01 -1.019339e-01 1.891071e-01 -1.528221e-01 [11] -2.263049e-01 6.346499e-02 4.267944e-01 5.277279e-02 -8.044223e-02 [16] -1.366809e-01 3.505637e-01 3.835610e-02 -1.297407e-01 -2.784647e-01 [21] 1.380544e-01 6.398159e-01 3.321641e-01 2.821799e-01 -8.177145e-02 [26] -2.582236e-01 3.228943e-01 2.241165e-01 -3.852682e-01 3.456442e-01 [31] 3.664387e-02 -8.237190e-02 7.756837e-04 -1.393160e-02 5.832907e-02 [36] 6.596224e-01 -3.680003e-01 1.285475e-01 -2.156813e-01 -7.599008e-02 [41] -1.543079e-01 3.719571e-02 2.957496e-01 -1.208998e-01 -9.614170e-03 [46] -4.613807e-02 -1.489248e-01 1.293554e-01 2.020946e-01 -8.552677e-02 [51] -2.542210e-01 3.048452e-01 3.013996e-01 2.428399e-01 2.348083e-01 [56] -4.521149e-02 -6.336937e-02 3.913172e-01 -4.711231e-01 -7.130950e-02 [61] 1.034008e-01 -2.824729e-01 -4.278545e-01 -1.627716e-01 -1.316666e-01 [66] -5.154083e-01 1.250842e-01 -1.103484e-01 -2.573869e-01 -5.474250e-01 [71] -1.021378e-01 2.084859e-01 4.925648e-01 -1.006125e-01 -2.093841e-01 [76] 4.716525e-01 1.306830e-01 -4.951387e-01 2.491205e-01 2.821239e-03 [81] -3.627855e-01 -4.447522e-01 -2.985079e-01 1.629173e-01 2.792442e-01 [86] -3.003855e-01 2.006709e-01 -2.092669e-01 -9.830341e-02 -2.105626e-01 [91] -2.284392e-02 3.717440e-03 -4.659547e-02 6.032081e-01 -1.814052e-01 [96] -4.533435e-02 2.712917e-01 2.490122e-01 -2.267053e-01 -2.667174e-01 [101] 3.148500e-01 -1.523149e-01 1.402758e-01 -2.646699e-01 -2.094110e-01 [106] 4.477357e-01 -1.915239e-01 -9.156676e-02 3.249975e-01 2.742054e-01 [111] 1.386674e-01 6.571649e-01 -8.550748e-02 -2.064236e-01 3.153935e-01 [116] -2.118436e-01 5.431349e-01 -2.222561e-01 7.487631e-02 -1.307695e-01 [121] 1.403386e-01 1.528567e-01 -2.153087e-01 4.769723e-02 -8.120699e-02 [126] 2.072523e-01 8.144739e-01 1.746164e-01 -5.004108e-01 -1.513105e-01 [131] 3.944645e-02 -6.195148e-01 -5.857319e-02 -1.014293e-01 4.343220e-01 [136] 3.113112e-01 -6.175015e-01 9.844636e-02 7.054367e-01 3.444859e-01 [141] -4.191049e-01 2.610812e-01 7.584189e-02 -3.097298e-02 -1.383430e-01 [146] 5.583366e-01 3.074603e-02 2.977143e-01 -4.962661e-01 3.141085e-01 [151] 4.703070e-01 -1.856046e-01 2.343949e-01 1.591661e-01 -1.498386e-01 [156] 9.740708e-02 -5.330620e-03 -2.229275e-01 3.727056e-01 2.220132e-01 [161] -4.183493e-01 -3.698459e-01 1.251142e-01 2.008085e-01 1.190398e-01 [166] 2.815910e-01 -2.804117e-01 1.635472e-01 -3.417315e-01 1.255640e-01 [171] -7.609131e-02 1.956616e-01 8.611095e-02 -4.447330e-01 -1.622689e-01 [176] -2.974250e-01 3.678545e-01 1.793089e-02 3.911143e-01 1.828862e-01 [181] 5.716665e-02 -4.683623e-01 6.832460e-02 3.124108e-01 -7.465746e-02 [186] -1.378648e-01 2.392991e-01 -3.223001e-01 2.410190e-01 2.479738e-01 [191] 1.028384e-01 -4.325058e-01 5.248174e-02 -2.612060e-01 -9.835601e-02 [196] 1.225546e-01 3.352326e-01 2.025486e-01 8.065044e-01 3.305202e-01 [201] -1.716485e-01 -5.460940e-01 1.013146e-01 -7.807986e-01 1.201924e-01 [206] -1.571693e-01 -4.250999e-01 1.253526e-01 -8.753107e-02 3.185723e-01 [211] 3.675711e-01 3.216846e-02 6.343672e-01 1.988754e-02 7.818957e-02 [216] 8.102753e-03 7.997204e-02 -1.473886e-01 3.182081e-01 -1.412014e-01 [221] 7.157220e-01 3.595864e-01 -3.916422e-02 -2.374413e-01 7.615351e-02 [226] -3.518389e-01 1.199116e-01 2.144111e-01 -2.597285e-01 -9.635280e-03 > > proc.time() user system elapsed 0.675 3.249 4.159
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: 0x6000033b02a0> > .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: 0x6000033b02a0> > .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: 0x6000033b02a0> > .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: 0x6000033b02a0> > 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: 0x6000033b4660> > .Call("R_bm_AddColumn",P) <pointer: 0x6000033b4660> > .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: 0x6000033b4660> > .Call("R_bm_AddColumn",P) <pointer: 0x6000033b4660> > .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: 0x6000033b4660> > 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: 0x6000033b4840> > .Call("R_bm_AddColumn",P) <pointer: 0x6000033b4840> > .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: 0x6000033b4840> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x6000033b4840> > .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: 0x6000033b4840> > > .Call("R_bm_RowMode",P) <pointer: 0x6000033b4840> > .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: 0x6000033b4840> > > .Call("R_bm_ColMode",P) <pointer: 0x6000033b4840> > .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: 0x6000033b4840> > 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: 0x6000033b4a20> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x6000033b4a20> > .Call("R_bm_AddColumn",P) <pointer: 0x6000033b4a20> > .Call("R_bm_AddColumn",P) <pointer: 0x6000033b4a20> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile15e411b21b64b" "BufferedMatrixFile15e41424703d7" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile15e411b21b64b" "BufferedMatrixFile15e41424703d7" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x6000033b4cc0> > .Call("R_bm_AddColumn",P) <pointer: 0x6000033b4cc0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x6000033b4cc0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x6000033b4cc0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x6000033b4cc0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x6000033b4cc0> > .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: 0x6000033b4ea0> > .Call("R_bm_AddColumn",P) <pointer: 0x6000033b4ea0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x6000033b4ea0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x6000033b4ea0> > 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: 0x6000033b5080> > .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: 0x6000033b5080> > rm(P) > > proc.time() user system elapsed 0.112 0.041 0.143
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.127 0.028 0.152