Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-03-22 11:43 -0400 (Sat, 22 Mar 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | R Under development (unstable) (2025-03-13 r87965) -- "Unsuffered Consequences" | 4777 |
palomino7 | Windows Server 2022 Datacenter | x64 | R Under development (unstable) (2025-03-01 r87860 ucrt) -- "Unsuffered Consequences" | 4547 |
lconway | macOS 12.7.1 Monterey | x86_64 | R Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" | 4576 |
kjohnson3 | macOS 13.7.1 Ventura | arm64 | R Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" | 4528 |
kunpeng2 | Linux (openEuler 24.03 LTS) | aarch64 | R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" | 4458 |
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 249/2313 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.71.1 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino7 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.1 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.71.1 |
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.71.1.tar.gz |
StartedAt: 2025-03-21 19:49:29 -0400 (Fri, 21 Mar 2025) |
EndedAt: 2025-03-21 19:50:23 -0400 (Fri, 21 Mar 2025) |
EllapsedTime: 54.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.71.1.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck’ * using R Under development (unstable) (2025-03-02 r87868) * 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.71.1’ * 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.71.1’ ** 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 -Wl,-framework -Wl,CoreFoundation 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 Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" 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.359 0.159 0.513
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" 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 480291 25.7 1055038 56.4 NA 634442 33.9 Vcells 890168 6.8 8388608 64.0 98304 2107859 16.1 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Mar 21 19:49:54 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Mar 21 19:49:55 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: 0x600003934000> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Mar 21 19:50:00 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Mar 21 19:50:02 2025" > > ColMode(tmp2) <pointer: 0x600003934000> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.4441041 1.9809738 -0.3467496 2.4843276 [2,] -0.2814180 -0.9882344 0.2096685 0.7419643 [3,] 1.6425438 1.2247496 2.7229210 0.6544147 [4,] 0.2056658 -0.1195005 1.3434668 0.8919311 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.4441041 1.9809738 0.3467496 2.4843276 [2,] 0.2814180 0.9882344 0.2096685 0.7419643 [3,] 1.6425438 1.2247496 2.7229210 0.6544147 [4,] 0.2056658 0.1195005 1.3434668 0.8919311 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 10.0221806 1.4074707 0.5888545 1.5761750 [2,] 0.5304885 0.9940998 0.4578957 0.8613735 [3,] 1.2816176 1.1066840 1.6501276 0.8089590 [4,] 0.4535039 0.3456884 1.1590801 0.9444211 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 225.66591 41.05568 31.23529 43.24608 [2,] 30.58630 35.92923 29.78863 34.35570 [3,] 39.45872 37.29159 44.22420 33.74401 [4,] 29.74070 28.57638 37.93427 35.33614 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600003938000> > exp(tmp5) <pointer: 0x600003938000> > log(tmp5,2) <pointer: 0x600003938000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 469.694 > Min(tmp5) [1] 53.1697 > mean(tmp5) [1] 72.42682 > Sum(tmp5) [1] 14485.36 > Var(tmp5) [1] 883.8305 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 94.08958 68.82693 71.50865 71.21195 69.06402 68.31618 71.72437 70.13888 [9] 70.92005 68.46755 > rowSums(tmp5) [1] 1881.792 1376.539 1430.173 1424.239 1381.280 1366.324 1434.487 1402.778 [9] 1418.401 1369.351 > rowVars(tmp5) [1] 7941.52865 40.06910 100.02322 107.87318 105.87262 55.29442 [7] 78.72319 71.56492 90.06797 101.27710 > rowSd(tmp5) [1] 89.115255 6.330016 10.001161 10.386201 10.289442 7.436022 8.872609 [8] 8.459605 9.490415 10.063652 > rowMax(tmp5) [1] 469.69403 79.01360 92.04687 91.34850 92.87828 87.00360 91.57996 [8] 80.19158 95.79420 86.70737 > rowMin(tmp5) [1] 57.79990 58.65203 58.20273 53.16970 55.78066 58.12021 59.84305 55.09892 [9] 54.88059 54.34697 > > colMeans(tmp5) [1] 109.20402 71.80507 72.08607 69.37404 71.57644 69.44671 69.68404 [8] 66.33592 73.71749 70.40331 70.30863 70.27063 70.59812 73.20480 [15] 74.83185 70.68842 62.79455 72.05324 67.83267 72.32033 > colSums(tmp5) [1] 1092.0402 718.0507 720.8607 693.7404 715.7644 694.4671 696.8404 [8] 663.3592 737.1749 704.0331 703.0863 702.7063 705.9812 732.0480 [15] 748.3185 706.8842 627.9455 720.5324 678.3267 723.2033 > colVars(tmp5) [1] 16158.16409 139.37941 88.15394 89.54089 146.67944 107.41342 [7] 65.18619 86.82126 136.46187 47.66163 77.71652 51.12842 [13] 58.44455 70.35970 83.91486 63.53395 46.05254 120.37547 [19] 52.73876 121.30183 > colSd(tmp5) [1] 127.114767 11.805906 9.389033 9.462605 12.111129 10.364045 [7] 8.073797 9.317792 11.681690 6.903740 8.815697 7.150414 [13] 7.644903 8.388069 9.160505 7.970818 6.786202 10.971576 [19] 7.262146 11.013711 > colMax(tmp5) [1] 469.69403 92.87828 92.04687 90.01104 95.79420 85.93714 84.33680 [8] 84.98154 91.34850 80.14638 84.38858 86.70737 80.26407 87.00360 [15] 91.57996 80.57228 74.30502 95.41328 78.74531 84.72952 > colMin(tmp5) [1] 56.67487 59.47800 61.97434 57.08969 55.09892 55.78066 54.88059 54.23295 [9] 57.79990 60.89042 55.49307 62.16453 57.82437 59.56310 63.41327 58.24620 [17] 53.16970 60.78366 59.06551 54.34697 > > > ### 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.08958 68.82693 71.50865 71.21195 NA 68.31618 71.72437 70.13888 [9] 70.92005 68.46755 > rowSums(tmp5) [1] 1881.792 1376.539 1430.173 1424.239 NA 1366.324 1434.487 1402.778 [9] 1418.401 1369.351 > rowVars(tmp5) [1] 7941.52865 40.06910 100.02322 107.87318 111.42233 55.29442 [7] 78.72319 71.56492 90.06797 101.27710 > rowSd(tmp5) [1] 89.115255 6.330016 10.001161 10.386201 10.555678 7.436022 8.872609 [8] 8.459605 9.490415 10.063652 > rowMax(tmp5) [1] 469.69403 79.01360 92.04687 91.34850 NA 87.00360 91.57996 [8] 80.19158 95.79420 86.70737 > rowMin(tmp5) [1] 57.79990 58.65203 58.20273 53.16970 NA 58.12021 59.84305 55.09892 [9] 54.88059 54.34697 > > colMeans(tmp5) [1] 109.20402 71.80507 72.08607 69.37404 71.57644 69.44671 NA [8] 66.33592 73.71749 70.40331 70.30863 70.27063 70.59812 73.20480 [15] 74.83185 70.68842 62.79455 72.05324 67.83267 72.32033 > colSums(tmp5) [1] 1092.0402 718.0507 720.8607 693.7404 715.7644 694.4671 NA [8] 663.3592 737.1749 704.0331 703.0863 702.7063 705.9812 732.0480 [15] 748.3185 706.8842 627.9455 720.5324 678.3267 723.2033 > colVars(tmp5) [1] 16158.16409 139.37941 88.15394 89.54089 146.67944 107.41342 [7] NA 86.82126 136.46187 47.66163 77.71652 51.12842 [13] 58.44455 70.35970 83.91486 63.53395 46.05254 120.37547 [19] 52.73876 121.30183 > colSd(tmp5) [1] 127.114767 11.805906 9.389033 9.462605 12.111129 10.364045 [7] NA 9.317792 11.681690 6.903740 8.815697 7.150414 [13] 7.644903 8.388069 9.160505 7.970818 6.786202 10.971576 [19] 7.262146 11.013711 > colMax(tmp5) [1] 469.69403 92.87828 92.04687 90.01104 95.79420 85.93714 NA [8] 84.98154 91.34850 80.14638 84.38858 86.70737 80.26407 87.00360 [15] 91.57996 80.57228 74.30502 95.41328 78.74531 84.72952 > colMin(tmp5) [1] 56.67487 59.47800 61.97434 57.08969 55.09892 55.78066 NA 54.23295 [9] 57.79990 60.89042 55.49307 62.16453 57.82437 59.56310 63.41327 58.24620 [17] 53.16970 60.78366 59.06551 54.34697 > > Max(tmp5,na.rm=TRUE) [1] 469.694 > Min(tmp5,na.rm=TRUE) [1] 53.1697 > mean(tmp5,na.rm=TRUE) [1] 72.43174 > Sum(tmp5,na.rm=TRUE) [1] 14413.92 > Var(tmp5,na.rm=TRUE) [1] 888.2894 > > rowMeans(tmp5,na.rm=TRUE) [1] 94.08958 68.82693 71.50865 71.21195 68.93860 68.31618 71.72437 70.13888 [9] 70.92005 68.46755 > rowSums(tmp5,na.rm=TRUE) [1] 1881.792 1376.539 1430.173 1424.239 1309.833 1366.324 1434.487 1402.778 [9] 1418.401 1369.351 > rowVars(tmp5,na.rm=TRUE) [1] 7941.52865 40.06910 100.02322 107.87318 111.42233 55.29442 [7] 78.72319 71.56492 90.06797 101.27710 > rowSd(tmp5,na.rm=TRUE) [1] 89.115255 6.330016 10.001161 10.386201 10.555678 7.436022 8.872609 [8] 8.459605 9.490415 10.063652 > rowMax(tmp5,na.rm=TRUE) [1] 469.69403 79.01360 92.04687 91.34850 92.87828 87.00360 91.57996 [8] 80.19158 95.79420 86.70737 > rowMin(tmp5,na.rm=TRUE) [1] 57.79990 58.65203 58.20273 53.16970 55.78066 58.12021 59.84305 55.09892 [9] 54.88059 54.34697 > > colMeans(tmp5,na.rm=TRUE) [1] 109.20402 71.80507 72.08607 69.37404 71.57644 69.44671 69.48815 [8] 66.33592 73.71749 70.40331 70.30863 70.27063 70.59812 73.20480 [15] 74.83185 70.68842 62.79455 72.05324 67.83267 72.32033 > colSums(tmp5,na.rm=TRUE) [1] 1092.0402 718.0507 720.8607 693.7404 715.7644 694.4671 625.3934 [8] 663.3592 737.1749 704.0331 703.0863 702.7063 705.9812 732.0480 [15] 748.3185 706.8842 627.9455 720.5324 678.3267 723.2033 > colVars(tmp5,na.rm=TRUE) [1] 16158.16409 139.37941 88.15394 89.54089 146.67944 107.41342 [7] 72.90276 86.82126 136.46187 47.66163 77.71652 51.12842 [13] 58.44455 70.35970 83.91486 63.53395 46.05254 120.37547 [19] 52.73876 121.30183 > colSd(tmp5,na.rm=TRUE) [1] 127.114767 11.805906 9.389033 9.462605 12.111129 10.364045 [7] 8.538311 9.317792 11.681690 6.903740 8.815697 7.150414 [13] 7.644903 8.388069 9.160505 7.970818 6.786202 10.971576 [19] 7.262146 11.013711 > colMax(tmp5,na.rm=TRUE) [1] 469.69403 92.87828 92.04687 90.01104 95.79420 85.93714 84.33680 [8] 84.98154 91.34850 80.14638 84.38858 86.70737 80.26407 87.00360 [15] 91.57996 80.57228 74.30502 95.41328 78.74531 84.72952 > colMin(tmp5,na.rm=TRUE) [1] 56.67487 59.47800 61.97434 57.08969 55.09892 55.78066 54.88059 54.23295 [9] 57.79990 60.89042 55.49307 62.16453 57.82437 59.56310 63.41327 58.24620 [17] 53.16970 60.78366 59.06551 54.34697 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 94.08958 68.82693 71.50865 71.21195 NaN 68.31618 71.72437 70.13888 [9] 70.92005 68.46755 > rowSums(tmp5,na.rm=TRUE) [1] 1881.792 1376.539 1430.173 1424.239 0.000 1366.324 1434.487 1402.778 [9] 1418.401 1369.351 > rowVars(tmp5,na.rm=TRUE) [1] 7941.52865 40.06910 100.02322 107.87318 NA 55.29442 [7] 78.72319 71.56492 90.06797 101.27710 > rowSd(tmp5,na.rm=TRUE) [1] 89.115255 6.330016 10.001161 10.386201 NA 7.436022 8.872609 [8] 8.459605 9.490415 10.063652 > rowMax(tmp5,na.rm=TRUE) [1] 469.69403 79.01360 92.04687 91.34850 NA 87.00360 91.57996 [8] 80.19158 95.79420 86.70737 > rowMin(tmp5,na.rm=TRUE) [1] 57.79990 58.65203 58.20273 53.16970 NA 58.12021 59.84305 55.09892 [9] 54.88059 54.34697 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 114.77476 69.46360 72.44807 70.73896 70.51146 70.96516 NaN [8] 67.44065 73.40890 70.18720 69.83125 70.90824 69.54600 73.82414 [15] 76.10058 71.64006 61.60774 73.30542 68.75636 71.06252 > colSums(tmp5,na.rm=TRUE) [1] 1032.9728 625.1724 652.0326 636.6507 634.6032 638.6864 0.0000 [8] 606.9659 660.6801 631.6848 628.4813 638.1741 625.9140 664.4173 [15] 684.9053 644.7605 554.4696 659.7488 618.8073 639.5627 > colVars(tmp5,na.rm=TRUE) [1] 17828.81192 95.12404 97.69891 79.77446 152.25494 94.90108 [7] NA 83.94395 152.44829 53.09396 84.86734 52.94592 [13] 53.29671 74.83943 76.29532 61.28751 35.96317 117.78305 [19] 49.73252 118.66615 > colSd(tmp5,na.rm=TRUE) [1] 133.524574 9.753155 9.884276 8.931655 12.339163 9.741719 [7] NA 9.162093 12.346995 7.286560 9.212347 7.276395 [13] 7.300459 8.650978 8.734719 7.828634 5.996930 10.852790 [19] 7.052129 10.893399 > colMax(tmp5,na.rm=TRUE) [1] 469.69403 85.45202 92.04687 90.01104 95.79420 85.93714 -Inf [8] 84.98154 91.34850 80.14638 84.38858 86.70737 80.26407 87.00360 [15] 91.57996 80.57228 74.30502 95.41328 78.74531 84.72952 > colMin(tmp5,na.rm=TRUE) [1] 56.67487 59.47800 61.97434 58.47691 55.09892 58.12021 Inf 54.23295 [9] 57.79990 60.89042 55.49307 62.16453 57.82437 59.56310 63.66597 58.24620 [17] 53.16970 61.53636 59.06551 54.34697 > > > > > 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] 177.9768 106.6579 254.1106 165.5304 325.6560 154.0373 271.1253 371.9009 [9] 241.9049 166.1109 > apply(copymatrix,1,var,na.rm=TRUE) [1] 177.9768 106.6579 254.1106 165.5304 325.6560 154.0373 271.1253 371.9009 [9] 241.9049 166.1109 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 2.842171e-14 3.694822e-13 0.000000e+00 -8.526513e-14 5.684342e-14 [6] -5.684342e-14 1.136868e-13 -1.705303e-13 1.421085e-14 8.526513e-14 [11] 1.136868e-13 -1.705303e-13 0.000000e+00 0.000000e+00 2.273737e-13 [16] -1.705303e-13 -1.136868e-13 1.136868e-13 -1.989520e-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) + } 6 15 7 5 7 14 8 10 5 3 4 12 7 8 4 4 4 20 6 14 3 12 3 13 2 18 8 11 4 18 8 9 5 17 9 8 10 6 4 15 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.353188 > Min(tmp) [1] -2.021432 > mean(tmp) [1] 0.1076954 > Sum(tmp) [1] 10.76954 > Var(tmp) [1] 0.8721616 > > rowMeans(tmp) [1] 0.1076954 > rowSums(tmp) [1] 10.76954 > rowVars(tmp) [1] 0.8721616 > rowSd(tmp) [1] 0.9338959 > rowMax(tmp) [1] 2.353188 > rowMin(tmp) [1] -2.021432 > > colMeans(tmp) [1] 1.254788711 -0.159396107 0.427546969 -0.093088289 -0.360309045 [6] 1.058611412 0.004867247 -0.358859001 -0.563814766 0.945405765 [11] 0.684682651 -2.021431947 0.348402493 -0.067694758 1.945187820 [16] 0.597846579 -0.550742592 -0.004366512 -0.188998771 0.793795562 [21] 1.028718336 -0.582525973 0.667139065 -0.821713778 0.932577400 [26] 0.079150150 -1.502243226 -0.563432027 0.009812847 -1.334477433 [31] -0.369012704 1.545193508 0.196831528 -0.699594983 -1.108291028 [36] -0.571579991 -0.128062211 0.049559422 -0.861525783 0.635566827 [41] -0.431246689 0.611030333 1.577444804 -0.770455919 -1.064527293 [46] 1.211190115 -0.384709782 -0.111600275 1.946444925 -1.398639437 [51] -0.024438297 -1.778707158 -0.313321979 -0.084157890 0.576172074 [56] -0.823509936 0.996193415 1.650862046 1.715602783 -1.149752963 [61] -0.549838997 -0.995105431 0.968674685 -0.032934052 1.157839704 [66] 0.158260180 1.386556655 -0.194632114 -0.305504190 0.157923624 [71] 1.204631934 1.007948750 -0.504565286 0.942109825 -0.020201995 [76] -1.286263710 -0.573709039 1.375559816 1.583374777 -0.085336896 [81] -0.751001712 0.375968730 0.778193628 -0.644117872 1.502621962 [86] 1.474738242 -0.909519111 -1.371829991 -0.786150775 -0.243364933 [91] 2.353188035 0.368426825 0.390822563 -0.133049803 1.287173805 [96] 0.067061486 0.291304938 0.651696021 -0.104439735 -1.467370114 > colSums(tmp) [1] 1.254788711 -0.159396107 0.427546969 -0.093088289 -0.360309045 [6] 1.058611412 0.004867247 -0.358859001 -0.563814766 0.945405765 [11] 0.684682651 -2.021431947 0.348402493 -0.067694758 1.945187820 [16] 0.597846579 -0.550742592 -0.004366512 -0.188998771 0.793795562 [21] 1.028718336 -0.582525973 0.667139065 -0.821713778 0.932577400 [26] 0.079150150 -1.502243226 -0.563432027 0.009812847 -1.334477433 [31] -0.369012704 1.545193508 0.196831528 -0.699594983 -1.108291028 [36] -0.571579991 -0.128062211 0.049559422 -0.861525783 0.635566827 [41] -0.431246689 0.611030333 1.577444804 -0.770455919 -1.064527293 [46] 1.211190115 -0.384709782 -0.111600275 1.946444925 -1.398639437 [51] -0.024438297 -1.778707158 -0.313321979 -0.084157890 0.576172074 [56] -0.823509936 0.996193415 1.650862046 1.715602783 -1.149752963 [61] -0.549838997 -0.995105431 0.968674685 -0.032934052 1.157839704 [66] 0.158260180 1.386556655 -0.194632114 -0.305504190 0.157923624 [71] 1.204631934 1.007948750 -0.504565286 0.942109825 -0.020201995 [76] -1.286263710 -0.573709039 1.375559816 1.583374777 -0.085336896 [81] -0.751001712 0.375968730 0.778193628 -0.644117872 1.502621962 [86] 1.474738242 -0.909519111 -1.371829991 -0.786150775 -0.243364933 [91] 2.353188035 0.368426825 0.390822563 -0.133049803 1.287173805 [96] 0.067061486 0.291304938 0.651696021 -0.104439735 -1.467370114 > 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.254788711 -0.159396107 0.427546969 -0.093088289 -0.360309045 [6] 1.058611412 0.004867247 -0.358859001 -0.563814766 0.945405765 [11] 0.684682651 -2.021431947 0.348402493 -0.067694758 1.945187820 [16] 0.597846579 -0.550742592 -0.004366512 -0.188998771 0.793795562 [21] 1.028718336 -0.582525973 0.667139065 -0.821713778 0.932577400 [26] 0.079150150 -1.502243226 -0.563432027 0.009812847 -1.334477433 [31] -0.369012704 1.545193508 0.196831528 -0.699594983 -1.108291028 [36] -0.571579991 -0.128062211 0.049559422 -0.861525783 0.635566827 [41] -0.431246689 0.611030333 1.577444804 -0.770455919 -1.064527293 [46] 1.211190115 -0.384709782 -0.111600275 1.946444925 -1.398639437 [51] -0.024438297 -1.778707158 -0.313321979 -0.084157890 0.576172074 [56] -0.823509936 0.996193415 1.650862046 1.715602783 -1.149752963 [61] -0.549838997 -0.995105431 0.968674685 -0.032934052 1.157839704 [66] 0.158260180 1.386556655 -0.194632114 -0.305504190 0.157923624 [71] 1.204631934 1.007948750 -0.504565286 0.942109825 -0.020201995 [76] -1.286263710 -0.573709039 1.375559816 1.583374777 -0.085336896 [81] -0.751001712 0.375968730 0.778193628 -0.644117872 1.502621962 [86] 1.474738242 -0.909519111 -1.371829991 -0.786150775 -0.243364933 [91] 2.353188035 0.368426825 0.390822563 -0.133049803 1.287173805 [96] 0.067061486 0.291304938 0.651696021 -0.104439735 -1.467370114 > colMin(tmp) [1] 1.254788711 -0.159396107 0.427546969 -0.093088289 -0.360309045 [6] 1.058611412 0.004867247 -0.358859001 -0.563814766 0.945405765 [11] 0.684682651 -2.021431947 0.348402493 -0.067694758 1.945187820 [16] 0.597846579 -0.550742592 -0.004366512 -0.188998771 0.793795562 [21] 1.028718336 -0.582525973 0.667139065 -0.821713778 0.932577400 [26] 0.079150150 -1.502243226 -0.563432027 0.009812847 -1.334477433 [31] -0.369012704 1.545193508 0.196831528 -0.699594983 -1.108291028 [36] -0.571579991 -0.128062211 0.049559422 -0.861525783 0.635566827 [41] -0.431246689 0.611030333 1.577444804 -0.770455919 -1.064527293 [46] 1.211190115 -0.384709782 -0.111600275 1.946444925 -1.398639437 [51] -0.024438297 -1.778707158 -0.313321979 -0.084157890 0.576172074 [56] -0.823509936 0.996193415 1.650862046 1.715602783 -1.149752963 [61] -0.549838997 -0.995105431 0.968674685 -0.032934052 1.157839704 [66] 0.158260180 1.386556655 -0.194632114 -0.305504190 0.157923624 [71] 1.204631934 1.007948750 -0.504565286 0.942109825 -0.020201995 [76] -1.286263710 -0.573709039 1.375559816 1.583374777 -0.085336896 [81] -0.751001712 0.375968730 0.778193628 -0.644117872 1.502621962 [86] 1.474738242 -0.909519111 -1.371829991 -0.786150775 -0.243364933 [91] 2.353188035 0.368426825 0.390822563 -0.133049803 1.287173805 [96] 0.067061486 0.291304938 0.651696021 -0.104439735 -1.467370114 > colMedians(tmp) [1] 1.254788711 -0.159396107 0.427546969 -0.093088289 -0.360309045 [6] 1.058611412 0.004867247 -0.358859001 -0.563814766 0.945405765 [11] 0.684682651 -2.021431947 0.348402493 -0.067694758 1.945187820 [16] 0.597846579 -0.550742592 -0.004366512 -0.188998771 0.793795562 [21] 1.028718336 -0.582525973 0.667139065 -0.821713778 0.932577400 [26] 0.079150150 -1.502243226 -0.563432027 0.009812847 -1.334477433 [31] -0.369012704 1.545193508 0.196831528 -0.699594983 -1.108291028 [36] -0.571579991 -0.128062211 0.049559422 -0.861525783 0.635566827 [41] -0.431246689 0.611030333 1.577444804 -0.770455919 -1.064527293 [46] 1.211190115 -0.384709782 -0.111600275 1.946444925 -1.398639437 [51] -0.024438297 -1.778707158 -0.313321979 -0.084157890 0.576172074 [56] -0.823509936 0.996193415 1.650862046 1.715602783 -1.149752963 [61] -0.549838997 -0.995105431 0.968674685 -0.032934052 1.157839704 [66] 0.158260180 1.386556655 -0.194632114 -0.305504190 0.157923624 [71] 1.204631934 1.007948750 -0.504565286 0.942109825 -0.020201995 [76] -1.286263710 -0.573709039 1.375559816 1.583374777 -0.085336896 [81] -0.751001712 0.375968730 0.778193628 -0.644117872 1.502621962 [86] 1.474738242 -0.909519111 -1.371829991 -0.786150775 -0.243364933 [91] 2.353188035 0.368426825 0.390822563 -0.133049803 1.287173805 [96] 0.067061486 0.291304938 0.651696021 -0.104439735 -1.467370114 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.254789 -0.1593961 0.427547 -0.09308829 -0.360309 1.058611 0.004867247 [2,] 1.254789 -0.1593961 0.427547 -0.09308829 -0.360309 1.058611 0.004867247 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.358859 -0.5638148 0.9454058 0.6846827 -2.021432 0.3484025 -0.06769476 [2,] -0.358859 -0.5638148 0.9454058 0.6846827 -2.021432 0.3484025 -0.06769476 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 1.945188 0.5978466 -0.5507426 -0.004366512 -0.1889988 0.7937956 1.028718 [2,] 1.945188 0.5978466 -0.5507426 -0.004366512 -0.1889988 0.7937956 1.028718 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.582526 0.6671391 -0.8217138 0.9325774 0.07915015 -1.502243 -0.563432 [2,] -0.582526 0.6671391 -0.8217138 0.9325774 0.07915015 -1.502243 -0.563432 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.009812847 -1.334477 -0.3690127 1.545194 0.1968315 -0.699595 -1.108291 [2,] 0.009812847 -1.334477 -0.3690127 1.545194 0.1968315 -0.699595 -1.108291 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.57158 -0.1280622 0.04955942 -0.8615258 0.6355668 -0.4312467 0.6110303 [2,] -0.57158 -0.1280622 0.04955942 -0.8615258 0.6355668 -0.4312467 0.6110303 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 1.577445 -0.7704559 -1.064527 1.21119 -0.3847098 -0.1116003 1.946445 [2,] 1.577445 -0.7704559 -1.064527 1.21119 -0.3847098 -0.1116003 1.946445 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -1.398639 -0.0244383 -1.778707 -0.313322 -0.08415789 0.5761721 -0.8235099 [2,] -1.398639 -0.0244383 -1.778707 -0.313322 -0.08415789 0.5761721 -0.8235099 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.9961934 1.650862 1.715603 -1.149753 -0.549839 -0.9951054 0.9686747 [2,] 0.9961934 1.650862 1.715603 -1.149753 -0.549839 -0.9951054 0.9686747 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.03293405 1.15784 0.1582602 1.386557 -0.1946321 -0.3055042 0.1579236 [2,] -0.03293405 1.15784 0.1582602 1.386557 -0.1946321 -0.3055042 0.1579236 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 1.204632 1.007949 -0.5045653 0.9421098 -0.020202 -1.286264 -0.573709 [2,] 1.204632 1.007949 -0.5045653 0.9421098 -0.020202 -1.286264 -0.573709 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 1.37556 1.583375 -0.0853369 -0.7510017 0.3759687 0.7781936 -0.6441179 [2,] 1.37556 1.583375 -0.0853369 -0.7510017 0.3759687 0.7781936 -0.6441179 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 1.502622 1.474738 -0.9095191 -1.37183 -0.7861508 -0.2433649 2.353188 [2,] 1.502622 1.474738 -0.9095191 -1.37183 -0.7861508 -0.2433649 2.353188 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.3684268 0.3908226 -0.1330498 1.287174 0.06706149 0.2913049 0.651696 [2,] 0.3684268 0.3908226 -0.1330498 1.287174 0.06706149 0.2913049 0.651696 [,99] [,100] [1,] -0.1044397 -1.46737 [2,] -0.1044397 -1.46737 > > > Max(tmp2) [1] 2.692818 > Min(tmp2) [1] -3.337906 > mean(tmp2) [1] 0.05482679 > Sum(tmp2) [1] 5.482679 > Var(tmp2) [1] 1.059377 > > rowMeans(tmp2) [1] 0.428529088 -0.368175573 -0.004415496 1.064401454 -0.327406033 [6] 0.830930374 -0.111145317 -0.666322033 0.026570384 0.765306752 [11] -0.617727716 0.691560429 -1.674174941 -0.254682566 -0.555676086 [16] 0.046480881 0.827308567 1.775064927 -0.065145365 1.990719812 [21] -0.323658148 -0.908372333 0.432915192 -0.696746606 -0.737291189 [26] 0.883475197 -1.319316101 0.869418568 0.145405559 1.829263542 [31] 0.140698084 -0.110040097 -0.786695289 1.792345351 1.018190647 [36] 1.348910984 0.584339852 0.419427394 -1.115302369 0.992179452 [41] 0.032470051 2.692818365 -3.337905640 -0.867616751 -1.169364600 [46] -1.961661534 0.292856942 1.246130258 0.117209235 2.042403763 [51] -0.372827765 0.727825020 -1.181210468 0.818803325 1.870573419 [56] 1.024292241 0.365147704 0.317321356 -0.888917388 -1.349484517 [61] 0.051755671 -0.637042180 0.779449856 -0.561055883 -0.246010678 [66] 1.760927495 -1.143553138 0.516212109 -0.563009651 -1.260416181 [71] 0.292474181 -1.831351575 0.708967748 0.289254124 -1.014587781 [76] 1.134429315 -0.225126736 0.212542569 -1.251544538 -0.612315258 [81] -0.349785557 -0.692425136 -0.168650492 -0.097209740 0.666020740 [86] -0.793713835 -0.589665294 0.808460319 0.767011838 -0.277149451 [91] -0.285144045 -1.473307335 1.137885622 -0.060695915 -0.155072489 [96] -1.036297160 1.643307466 0.353107343 1.875039250 -0.869049012 > rowSums(tmp2) [1] 0.428529088 -0.368175573 -0.004415496 1.064401454 -0.327406033 [6] 0.830930374 -0.111145317 -0.666322033 0.026570384 0.765306752 [11] -0.617727716 0.691560429 -1.674174941 -0.254682566 -0.555676086 [16] 0.046480881 0.827308567 1.775064927 -0.065145365 1.990719812 [21] -0.323658148 -0.908372333 0.432915192 -0.696746606 -0.737291189 [26] 0.883475197 -1.319316101 0.869418568 0.145405559 1.829263542 [31] 0.140698084 -0.110040097 -0.786695289 1.792345351 1.018190647 [36] 1.348910984 0.584339852 0.419427394 -1.115302369 0.992179452 [41] 0.032470051 2.692818365 -3.337905640 -0.867616751 -1.169364600 [46] -1.961661534 0.292856942 1.246130258 0.117209235 2.042403763 [51] -0.372827765 0.727825020 -1.181210468 0.818803325 1.870573419 [56] 1.024292241 0.365147704 0.317321356 -0.888917388 -1.349484517 [61] 0.051755671 -0.637042180 0.779449856 -0.561055883 -0.246010678 [66] 1.760927495 -1.143553138 0.516212109 -0.563009651 -1.260416181 [71] 0.292474181 -1.831351575 0.708967748 0.289254124 -1.014587781 [76] 1.134429315 -0.225126736 0.212542569 -1.251544538 -0.612315258 [81] -0.349785557 -0.692425136 -0.168650492 -0.097209740 0.666020740 [86] -0.793713835 -0.589665294 0.808460319 0.767011838 -0.277149451 [91] -0.285144045 -1.473307335 1.137885622 -0.060695915 -0.155072489 [96] -1.036297160 1.643307466 0.353107343 1.875039250 -0.869049012 > 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.428529088 -0.368175573 -0.004415496 1.064401454 -0.327406033 [6] 0.830930374 -0.111145317 -0.666322033 0.026570384 0.765306752 [11] -0.617727716 0.691560429 -1.674174941 -0.254682566 -0.555676086 [16] 0.046480881 0.827308567 1.775064927 -0.065145365 1.990719812 [21] -0.323658148 -0.908372333 0.432915192 -0.696746606 -0.737291189 [26] 0.883475197 -1.319316101 0.869418568 0.145405559 1.829263542 [31] 0.140698084 -0.110040097 -0.786695289 1.792345351 1.018190647 [36] 1.348910984 0.584339852 0.419427394 -1.115302369 0.992179452 [41] 0.032470051 2.692818365 -3.337905640 -0.867616751 -1.169364600 [46] -1.961661534 0.292856942 1.246130258 0.117209235 2.042403763 [51] -0.372827765 0.727825020 -1.181210468 0.818803325 1.870573419 [56] 1.024292241 0.365147704 0.317321356 -0.888917388 -1.349484517 [61] 0.051755671 -0.637042180 0.779449856 -0.561055883 -0.246010678 [66] 1.760927495 -1.143553138 0.516212109 -0.563009651 -1.260416181 [71] 0.292474181 -1.831351575 0.708967748 0.289254124 -1.014587781 [76] 1.134429315 -0.225126736 0.212542569 -1.251544538 -0.612315258 [81] -0.349785557 -0.692425136 -0.168650492 -0.097209740 0.666020740 [86] -0.793713835 -0.589665294 0.808460319 0.767011838 -0.277149451 [91] -0.285144045 -1.473307335 1.137885622 -0.060695915 -0.155072489 [96] -1.036297160 1.643307466 0.353107343 1.875039250 -0.869049012 > rowMin(tmp2) [1] 0.428529088 -0.368175573 -0.004415496 1.064401454 -0.327406033 [6] 0.830930374 -0.111145317 -0.666322033 0.026570384 0.765306752 [11] -0.617727716 0.691560429 -1.674174941 -0.254682566 -0.555676086 [16] 0.046480881 0.827308567 1.775064927 -0.065145365 1.990719812 [21] -0.323658148 -0.908372333 0.432915192 -0.696746606 -0.737291189 [26] 0.883475197 -1.319316101 0.869418568 0.145405559 1.829263542 [31] 0.140698084 -0.110040097 -0.786695289 1.792345351 1.018190647 [36] 1.348910984 0.584339852 0.419427394 -1.115302369 0.992179452 [41] 0.032470051 2.692818365 -3.337905640 -0.867616751 -1.169364600 [46] -1.961661534 0.292856942 1.246130258 0.117209235 2.042403763 [51] -0.372827765 0.727825020 -1.181210468 0.818803325 1.870573419 [56] 1.024292241 0.365147704 0.317321356 -0.888917388 -1.349484517 [61] 0.051755671 -0.637042180 0.779449856 -0.561055883 -0.246010678 [66] 1.760927495 -1.143553138 0.516212109 -0.563009651 -1.260416181 [71] 0.292474181 -1.831351575 0.708967748 0.289254124 -1.014587781 [76] 1.134429315 -0.225126736 0.212542569 -1.251544538 -0.612315258 [81] -0.349785557 -0.692425136 -0.168650492 -0.097209740 0.666020740 [86] -0.793713835 -0.589665294 0.808460319 0.767011838 -0.277149451 [91] -0.285144045 -1.473307335 1.137885622 -0.060695915 -0.155072489 [96] -1.036297160 1.643307466 0.353107343 1.875039250 -0.869049012 > > colMeans(tmp2) [1] 0.05482679 > colSums(tmp2) [1] 5.482679 > colVars(tmp2) [1] 1.059377 > colSd(tmp2) [1] 1.02926 > colMax(tmp2) [1] 2.692818 > colMin(tmp2) [1] -3.337906 > colMedians(tmp2) [1] 0.01107744 > colRanges(tmp2) [,1] [1,] -3.337906 [2,] 2.692818 > > 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] 5.7155232 -0.7349445 1.3499409 5.6549388 -3.0403894 4.2943549 [7] -1.0128410 2.6095216 0.2758966 1.8970899 > colApply(tmp,quantile)[,1] [,1] [1,] -0.3892527 [2,] 0.0928799 [3,] 0.5705159 [4,] 1.0662974 [5,] 1.5685519 > > rowApply(tmp,sum) [1] 3.4677513 3.2802104 4.0215224 6.0453615 -0.7680540 1.9911021 [7] 6.9907053 -1.4225245 -6.2253155 -0.3716682 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 7 7 4 10 10 3 8 9 7 5 [2,] 8 4 8 6 3 1 9 7 1 2 [3,] 9 1 9 2 1 10 3 1 9 9 [4,] 2 9 10 3 7 8 5 4 10 8 [5,] 3 10 1 1 2 5 6 3 3 3 [6,] 10 5 7 8 6 9 2 10 2 7 [7,] 1 6 3 5 5 4 4 8 8 1 [8,] 4 2 6 9 9 2 1 5 5 10 [9,] 6 3 5 7 4 7 7 6 4 4 [10,] 5 8 2 4 8 6 10 2 6 6 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -2.7179780 -3.4519116 2.2946956 -0.4604538 -1.9180829 -4.6273399 [7] 0.9350035 -0.6425347 -0.8682750 4.3587909 0.2966472 -1.2576464 [13] -2.7263971 -3.7365610 -0.9986915 0.7793433 -0.1160101 4.9389418 [19] 0.3142515 -1.0465082 > colApply(tmp,quantile)[,1] [,1] [1,] -2.0840331 [2,] -1.1191654 [3,] -1.1063786 [4,] 0.1605171 [5,] 1.4310819 > > rowApply(tmp,sum) [1] -1.8334993 -3.5625157 -2.7264404 -0.9596471 -1.5686137 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 19 11 4 1 3 [2,] 6 6 3 3 10 [3,] 16 16 18 4 14 [4,] 13 5 8 15 12 [5,] 1 8 15 8 17 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.4310819 -0.8768065 1.1451576 0.4414508 -2.7103338 -0.2518714 [2,] 0.1605171 -0.3751070 0.6148251 -0.9542875 -0.1683691 -2.9611485 [3,] -1.1191654 -1.2065921 0.8985013 -0.6360625 0.4895851 0.4304529 [4,] -2.0840331 -1.0287457 -0.9057891 0.5609656 -0.2948628 0.1598667 [5,] -1.1063786 0.0353397 0.5420007 0.1274798 0.7658977 -2.0046396 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.0027840 -0.43585862 0.12303722 1.2056182 0.7491075 0.276781390 [2,] -0.2959265 1.45638404 0.16904995 1.2004477 -2.8456601 -0.001379127 [3,] 1.5738662 -0.99797659 -0.45709248 0.7183393 2.7697493 -1.583734282 [4,] 0.1647134 -0.03510298 -0.73372473 2.2474111 -0.1847062 0.003326173 [5,] 0.4951344 -0.62998059 0.03045501 -1.0130253 -0.1918432 0.047359494 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -1.9541368 -0.4442204 0.20507486 -1.3344460 -1.7812167 1.6335771 [2,] -0.1139992 0.3330239 -1.30270596 0.4929127 0.4273298 0.7285318 [3,] -1.2567586 -0.9986136 -0.01822099 -0.3873514 -0.4218278 0.5012238 [4,] 0.8357758 -1.7725261 -0.75193063 1.0598692 1.1140332 1.3092499 [5,] -0.2372784 -0.8542248 0.86909120 0.9483589 0.5456714 0.7663592 [,19] [,20] [1,] 1.2768814 0.4704069 [2,] 1.3199008 -1.4468558 [3,] -0.7886670 -0.2360955 [4,] -0.2456504 -0.3777863 [5,] -1.2482133 0.5438225 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 655 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 566 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.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.149912 -0.9648462 0.7700765 -1.817412 0.7757268 -1.449338 0.7640373 col8 col9 col10 col11 col12 col13 col14 row1 0.8624515 0.9714839 -0.7469914 0.4709802 2.456842 0.170729 1.43843 col15 col16 col17 col18 col19 col20 row1 -2.503605 1.242092 1.482955 -1.033659 1.110083 1.085566 > tmp[,"col10"] col10 row1 -0.74699137 row2 -1.01559109 row3 0.08866539 row4 -0.31390195 row5 0.48084628 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 1.1499119 -0.9648462 0.7700765 -1.817412 0.7757268 -1.4493378 0.7640373 row5 0.2165651 -0.2931574 -0.6517242 -1.098702 1.9138649 -0.7455232 0.8805820 col8 col9 col10 col11 col12 col13 row1 0.8624515 0.97148389 -0.7469914 0.4709802 2.4568418 0.1707290 row5 -1.0536781 0.06349348 0.4808463 -0.9226624 -0.6427987 0.2676519 col14 col15 col16 col17 col18 col19 col20 row1 1.4384301 -2.50360497 1.242092 1.4829553 -1.0336590 1.1100830 1.085566 row5 -0.1239278 -0.09194852 1.063963 0.5990636 -0.8639012 -0.9778084 -1.736616 > tmp[,c("col6","col20")] col6 col20 row1 -1.4493378 1.0855657 row2 -2.4895060 1.3326099 row3 -1.4444439 0.2120665 row4 -1.1484980 0.3064146 row5 -0.7455232 -1.7366156 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.4493378 1.085566 row5 -0.7455232 -1.736616 > > > > > 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 48.89142 49.43776 49.95906 51.29614 50.33777 103.8903 49.62675 50.74798 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.52215 50.20205 49.48608 50.66234 50.65016 48.09967 51.28569 48.5483 col17 col18 col19 col20 row1 50.09029 50.62902 50.75197 105.8481 > tmp[,"col10"] col10 row1 50.20205 row2 30.38394 row3 30.01499 row4 30.00961 row5 50.21772 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 48.89142 49.43776 49.95906 51.29614 50.33777 103.8903 49.62675 50.74798 row5 49.84758 48.80434 48.59434 49.88220 50.19411 104.9743 50.08732 50.10124 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.52215 50.20205 49.48608 50.66234 50.65016 48.09967 51.28569 48.54830 row5 51.12598 50.21772 50.23299 50.53219 50.40304 49.50849 48.90065 51.13572 col17 col18 col19 col20 row1 50.09029 50.62902 50.75197 105.8481 row5 48.77750 48.01082 50.24396 102.8816 > tmp[,c("col6","col20")] col6 col20 row1 103.89030 105.84814 row2 73.82057 74.39144 row3 74.21201 75.92930 row4 76.13560 74.21519 row5 104.97428 102.88156 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.8903 105.8481 row5 104.9743 102.8816 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.8903 105.8481 row5 104.9743 102.8816 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.14344236 [2,] -1.58003913 [3,] 0.56646542 [4,] -0.16255324 [5,] 0.08723824 > tmp[,c("col17","col7")] col17 col7 [1,] 1.6018212 0.17723925 [2,] -0.1888774 1.23570514 [3,] 1.3404124 0.07907441 [4,] -1.2519755 -0.73445924 [5,] -0.3919381 0.17457332 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.6418300 -0.237276678 [2,] -0.7954519 -0.003038634 [3,] 0.5422049 0.617094418 [4,] -1.0437847 0.278661757 [5,] 1.2301438 -2.177861807 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.64183 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.6418300 [2,] -0.7954519 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 1.0435733 0.7246564 -0.07724566 0.07023876 2.536479 -0.08149724 row1 0.4132246 -0.7184874 -0.84762605 0.62176749 -1.808285 -1.89614972 [,7] [,8] [,9] [,10] [,11] [,12] row3 -0.1011136 0.82305733 1.0592779 -1.0033870 0.04935784 0.2918791 row1 0.6093422 0.02721502 0.8751074 0.8049153 0.73578851 -0.4508028 [,13] [,14] [,15] [,16] [,17] [,18] row3 -0.01124277 -2.0169364 0.06991121 -0.1512367 -0.6741903 1.197454 row1 -1.08662238 0.3691719 -0.41923757 0.4439459 -0.3629645 1.613675 [,19] [,20] row3 0.08538307 -1.39517142 row1 -0.64497940 -0.05218846 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 1.894505 0.2464596 2.449815 -0.4651361 -0.7408103 0.7617953 1.603808 [,8] [,9] [,10] row2 -0.2003759 0.3217674 -1.381535 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.06853647 0.8424166 -1.296756 -0.752125 0.5331057 -0.138325 -0.6727174 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.8231582 0.453519 0.5438638 -0.1238563 -1.109823 -2.217617 -0.6540237 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.3012161 0.9956147 -1.566173 -0.6264621 -0.7209264 -0.7112196 > > > 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: 0x60000393c000> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b1178e31b47" [2] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b116141052" [3] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b11f3b7a9c" [4] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b119ee9f94" [5] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b11112eb2a4" [6] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b1110d235cc" [7] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b1158c9ecb4" [8] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b1130d34af6" [9] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b117fde7584" [10] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b1165f56eb1" [11] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b1154365ac2" [12] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b113c80a1bf" [13] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b1120fb21a1" [14] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b11475ce1f1" [15] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM13b1122f5b9d1" > > > ### 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: 0x6000039c0060> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6000039c0060> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6000039c0060> > rowMedians(tmp) [1] -0.361046910 -0.299351164 0.390638307 -0.322961816 0.021017101 [6] -0.131816637 -0.129863773 -0.627869827 -0.511561202 0.118279847 [11] -0.283347144 0.231888524 0.191968614 0.590667750 -0.608974593 [16] -0.709340844 -0.186519120 0.462911907 0.171660956 0.103409271 [21] 0.314737172 -0.088782116 -0.107277326 -0.148380338 -0.107643286 [26] 0.363669098 0.668158055 -0.368847585 -0.411355022 -0.347010714 [31] 0.007509888 -0.427291641 0.090049753 -0.208426170 -0.197041492 [36] -0.934354367 -0.427243820 -0.433337068 0.253951591 0.767787551 [41] 0.182952432 0.421521833 0.048320063 0.492122580 -0.294322792 [46] 0.181708388 -0.076477676 -0.247055119 -0.118909870 0.513514131 [51] -0.010426035 -0.008842149 0.239850012 -0.533959803 -0.109988231 [56] 0.275213142 -0.018522749 0.025183158 0.176297404 -0.003766783 [61] -0.183882098 0.083837283 0.315659484 -0.099720597 0.584479337 [66] -0.272043293 0.365252303 0.469677781 -0.295732673 0.390935321 [71] 0.290693602 -0.471816099 -0.397831294 -0.496724850 -0.263234485 [76] -0.566649605 0.008918924 0.598493796 -0.128920628 0.262963884 [81] 0.220633403 -0.465914335 0.576641775 0.109064579 0.131717963 [86] 0.313993763 -0.338379860 -0.140363596 -0.531004909 0.380477409 [91] 0.237275775 0.518009251 0.275185944 0.009383733 0.343610946 [96] 0.036028592 0.094742297 0.080002296 -0.108441218 -0.219638049 [101] 0.020570832 -0.325012704 -0.054414772 -0.008476862 0.425861223 [106] 0.467011268 0.201732695 -0.281134342 0.151308816 0.149944125 [111] 0.209048573 -0.382964679 -0.172902623 -0.360678222 -0.103311514 [116] 0.198810828 -0.075258050 0.232099128 0.502305798 0.468793899 [121] 0.483706090 -0.078981591 -0.231341137 -0.366165065 -0.148416418 [126] 0.276721293 0.484630465 -0.245265771 -0.068517071 -0.334038868 [131] -0.065596392 -0.229880622 -0.139719204 0.362800427 0.302402939 [136] 0.048473178 0.098096135 -0.376154617 0.133601121 0.599877161 [141] 0.123284710 -0.458814683 0.215081421 0.140387588 0.103342200 [146] 0.197576689 -0.093671082 -0.373374278 0.294796277 -0.133767681 [151] 0.133232570 0.464706863 0.520366012 0.061335689 0.261554827 [156] -0.568651348 0.031036150 0.245195087 -0.278855416 -0.300179444 [161] -0.340153250 0.429845480 -0.134261042 0.390752240 0.579343262 [166] 0.075737902 -0.723517918 -0.101847218 -0.422176631 0.121665068 [171] 0.202662649 0.133865156 -0.330750107 -0.131855148 -0.107343159 [176] 0.297362283 0.478439297 0.502706070 -0.218836878 0.462424675 [181] -0.038227637 0.205928105 0.157898205 -0.481363694 -0.190670281 [186] 0.561262765 -0.180514644 -0.462049237 -0.278850425 0.075290529 [191] 0.078524905 -0.356979974 0.144642464 0.266435548 -0.170603410 [196] -0.109423115 0.104271629 -0.199136878 -0.395008084 0.152257952 [201] 0.314761855 -0.087225983 -0.100749453 -0.424769611 -0.180014347 [206] 0.161101818 0.293985791 -0.595375460 -0.359176472 0.258048467 [211] -0.196815709 -0.387372113 0.076437906 -0.222622848 -0.025757283 [216] -0.054590894 -0.052431861 0.361711576 0.440700733 0.221680528 [221] 0.141578703 -0.399700947 0.567148673 -0.064375040 0.320918307 [226] -0.050836488 -0.124770953 -0.016865576 -0.103148264 -0.633135240 > > proc.time() user system elapsed 2.666 16.311 19.562
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" 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: 0x600003e94000> > .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: 0x600003e94000> > .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: 0x600003e94000> > .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: 0x600003e94000> > 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: 0x600003eac000> > .Call("R_bm_AddColumn",P) <pointer: 0x600003eac000> > .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: 0x600003eac000> > .Call("R_bm_AddColumn",P) <pointer: 0x600003eac000> > .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: 0x600003eac000> > 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: 0x600003eb0000> > .Call("R_bm_AddColumn",P) <pointer: 0x600003eb0000> > .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: 0x600003eb0000> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600003eb0000> > .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: 0x600003eb0000> > > .Call("R_bm_RowMode",P) <pointer: 0x600003eb0000> > .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: 0x600003eb0000> > > .Call("R_bm_ColMode",P) <pointer: 0x600003eb0000> > .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: 0x600003eb0000> > 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: 0x600003ec4120> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600003ec4120> > .Call("R_bm_AddColumn",P) <pointer: 0x600003ec4120> > .Call("R_bm_AddColumn",P) <pointer: 0x600003ec4120> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile141cc4e05f6f9" "BufferedMatrixFile141cc69997d73" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile141cc4e05f6f9" "BufferedMatrixFile141cc69997d73" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600003eb4000> > .Call("R_bm_AddColumn",P) <pointer: 0x600003eb4000> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600003eb4000> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600003eb4000> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600003eb4000> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600003eb4000> > .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: 0x600003ea4060> > .Call("R_bm_AddColumn",P) <pointer: 0x600003ea4060> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600003ea4060> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600003ea4060> > 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: 0x600003eec1e0> > .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: 0x600003eec1e0> > rm(P) > > proc.time() user system elapsed 0.337 0.153 0.483
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" 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.368 0.107 0.457