Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-03-21 11:45 -0400 (Fri, 21 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" | 4545 |
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-20 18:27:20 -0400 (Thu, 20 Mar 2025) |
EndedAt: 2025-03-20 18:27:38 -0400 (Thu, 20 Mar 2025) |
EllapsedTime: 18.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: aarch64-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 Ventura 13.7.1 * 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 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.21-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.71.1’ ** 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 -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 -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 -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 -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 -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 -Wl,-framework -Wl,CoreFoundation 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 Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" 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.108 0.048 0.154
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: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells 480271 25.7 1055041 56.4 NA 634322 33.9 Vcells 890108 6.8 8388608 64.0 196608 2109030 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] "Thu Mar 20 18:27:31 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] "Thu Mar 20 18:27:31 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: 0x600002398120> > > > > 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] "Thu Mar 20 18:27:32 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] "Thu Mar 20 18:27:32 2025" > > ColMode(tmp2) <pointer: 0x600002398120> > > > > ### 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.0236525 -0.085541733 -0.5567805 0.1700166 [2,] 0.4986302 -1.436457901 -1.2370747 -0.5703953 [3,] 2.1326961 0.070251048 -0.3144511 0.9118780 [4,] 0.6104145 -0.004674682 -2.1246849 2.7137961 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.0236525 0.085541733 0.5567805 0.1700166 [2,] 0.4986302 1.436457901 1.2370747 0.5703953 [3,] 2.1326961 0.070251048 0.3144511 0.9118780 [4,] 0.6104145 0.004674682 2.1246849 2.7137961 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9510629 0.29247518 0.7461772 0.4123307 [2,] 0.7061375 1.19852322 1.1122386 0.7552452 [3,] 1.4603753 0.26504914 0.5607594 0.9549230 [4,] 0.7812903 0.06837165 1.4576299 1.6473603 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 223.53428 28.01029 33.01855 29.29332 [2,] 32.56001 38.42169 37.35946 33.12285 [3,] 41.73645 27.72074 30.92205 35.46111 [4,] 33.42332 25.68839 41.70098 44.18740 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600002394120> > exp(tmp5) <pointer: 0x600002394120> > log(tmp5,2) <pointer: 0x600002394120> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 465.2573 > Min(tmp5) [1] 53.46702 > mean(tmp5) [1] 72.29223 > Sum(tmp5) [1] 14458.45 > Var(tmp5) [1] 858.3853 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 88.73781 70.44957 67.79761 72.17708 72.81366 70.45147 68.09221 71.31204 [9] 74.84992 66.24092 > rowSums(tmp5) [1] 1774.756 1408.991 1355.952 1443.542 1456.273 1409.029 1361.844 1426.241 [9] 1496.998 1324.818 > rowVars(tmp5) [1] 7946.73384 57.72259 46.90353 83.70349 68.42872 82.84819 [7] 81.62904 111.20006 54.04149 78.83609 > rowSd(tmp5) [1] 89.144455 7.597538 6.848615 9.148961 8.272165 9.102098 9.034879 [8] 10.545144 7.351291 8.878969 > rowMax(tmp5) [1] 465.25732 83.03231 86.86895 91.97028 87.73698 87.92302 86.96359 [8] 94.45779 88.74104 88.89783 > rowMin(tmp5) [1] 58.29976 55.82308 57.69709 53.46702 59.38034 59.19845 55.49214 55.61532 [9] 58.07171 53.83401 > > colMeans(tmp5) [1] 110.24967 68.46852 69.93429 72.36645 73.25131 68.78817 69.45905 [8] 71.44642 70.53782 71.93320 70.62763 69.96238 67.55603 70.20746 [15] 69.48476 68.96691 70.88792 69.27921 70.68202 71.75539 > colSums(tmp5) [1] 1102.4967 684.6852 699.3429 723.6645 732.5131 687.8817 694.5905 [8] 714.4642 705.3782 719.3320 706.2763 699.6238 675.5603 702.0746 [15] 694.8476 689.6691 708.8792 692.7921 706.8202 717.5539 > colVars(tmp5) [1] 15655.37265 89.42371 101.18760 87.59775 101.52392 131.83875 [7] 47.95867 45.32645 142.61138 56.49844 52.65501 76.26742 [13] 70.47551 80.42469 152.19371 95.35197 45.46664 74.92235 [19] 56.97885 89.16641 > colSd(tmp5) [1] 125.121432 9.456411 10.059205 9.359367 10.075908 11.482106 [7] 6.925220 6.732492 11.942001 7.516544 7.256377 8.733122 [13] 8.394969 8.967981 12.336682 9.764833 6.742895 8.655770 [19] 7.548434 9.442797 > colMax(tmp5) [1] 465.25732 80.22120 86.79513 91.97028 87.73698 87.26195 81.18521 [8] 82.90523 94.45779 83.03231 79.65967 84.55118 85.91273 80.68374 [15] 91.13263 86.96359 81.67970 87.92302 81.48934 92.01483 > colMin(tmp5) [1] 59.38034 53.46702 55.61532 58.29321 61.22909 56.50877 60.47250 61.60341 [9] 55.49214 58.07171 57.25396 56.63584 58.08196 53.83401 56.00781 55.82308 [17] 60.67459 57.59922 61.25267 59.19845 > > > ### 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] 88.73781 70.44957 67.79761 72.17708 72.81366 NA 68.09221 71.31204 [9] 74.84992 66.24092 > rowSums(tmp5) [1] 1774.756 1408.991 1355.952 1443.542 1456.273 NA 1361.844 1426.241 [9] 1496.998 1324.818 > rowVars(tmp5) [1] 7946.73384 57.72259 46.90353 83.70349 68.42872 87.07561 [7] 81.62904 111.20006 54.04149 78.83609 > rowSd(tmp5) [1] 89.144455 7.597538 6.848615 9.148961 8.272165 9.331431 9.034879 [8] 10.545144 7.351291 8.878969 > rowMax(tmp5) [1] 465.25732 83.03231 86.86895 91.97028 87.73698 NA 86.96359 [8] 94.45779 88.74104 88.89783 > rowMin(tmp5) [1] 58.29976 55.82308 57.69709 53.46702 59.38034 NA 55.49214 55.61532 [9] 58.07171 53.83401 > > colMeans(tmp5) [1] 110.24967 68.46852 69.93429 72.36645 73.25131 NA 69.45905 [8] 71.44642 70.53782 71.93320 70.62763 69.96238 67.55603 70.20746 [15] 69.48476 68.96691 70.88792 69.27921 70.68202 71.75539 > colSums(tmp5) [1] 1102.4967 684.6852 699.3429 723.6645 732.5131 NA 694.5905 [8] 714.4642 705.3782 719.3320 706.2763 699.6238 675.5603 702.0746 [15] 694.8476 689.6691 708.8792 692.7921 706.8202 717.5539 > colVars(tmp5) [1] 15655.37265 89.42371 101.18760 87.59775 101.52392 NA [7] 47.95867 45.32645 142.61138 56.49844 52.65501 76.26742 [13] 70.47551 80.42469 152.19371 95.35197 45.46664 74.92235 [19] 56.97885 89.16641 > colSd(tmp5) [1] 125.121432 9.456411 10.059205 9.359367 10.075908 NA [7] 6.925220 6.732492 11.942001 7.516544 7.256377 8.733122 [13] 8.394969 8.967981 12.336682 9.764833 6.742895 8.655770 [19] 7.548434 9.442797 > colMax(tmp5) [1] 465.25732 80.22120 86.79513 91.97028 87.73698 NA 81.18521 [8] 82.90523 94.45779 83.03231 79.65967 84.55118 85.91273 80.68374 [15] 91.13263 86.96359 81.67970 87.92302 81.48934 92.01483 > colMin(tmp5) [1] 59.38034 53.46702 55.61532 58.29321 61.22909 NA 60.47250 61.60341 [9] 55.49214 58.07171 57.25396 56.63584 58.08196 53.83401 56.00781 55.82308 [17] 60.67459 57.59922 61.25267 59.19845 > > Max(tmp5,na.rm=TRUE) [1] 465.2573 > Min(tmp5,na.rm=TRUE) [1] 53.46702 > mean(tmp5,na.rm=TRUE) [1] 72.31421 > Sum(tmp5,na.rm=TRUE) [1] 14390.53 > Var(tmp5,na.rm=TRUE) [1] 862.6234 > > rowMeans(tmp5,na.rm=TRUE) [1] 88.73781 70.44957 67.79761 72.17708 72.81366 70.58480 68.09221 71.31204 [9] 74.84992 66.24092 > rowSums(tmp5,na.rm=TRUE) [1] 1774.756 1408.991 1355.952 1443.542 1456.273 1341.111 1361.844 1426.241 [9] 1496.998 1324.818 > rowVars(tmp5,na.rm=TRUE) [1] 7946.73384 57.72259 46.90353 83.70349 68.42872 87.07561 [7] 81.62904 111.20006 54.04149 78.83609 > rowSd(tmp5,na.rm=TRUE) [1] 89.144455 7.597538 6.848615 9.148961 8.272165 9.331431 9.034879 [8] 10.545144 7.351291 8.878969 > rowMax(tmp5,na.rm=TRUE) [1] 465.25732 83.03231 86.86895 91.97028 87.73698 87.92302 86.96359 [8] 94.45779 88.74104 88.89783 > rowMin(tmp5,na.rm=TRUE) [1] 58.29976 55.82308 57.69709 53.46702 59.38034 59.19845 55.49214 55.61532 [9] 58.07171 53.83401 > > colMeans(tmp5,na.rm=TRUE) [1] 110.24967 68.46852 69.93429 72.36645 73.25131 68.88482 69.45905 [8] 71.44642 70.53782 71.93320 70.62763 69.96238 67.55603 70.20746 [15] 69.48476 68.96691 70.88792 69.27921 70.68202 71.75539 > colSums(tmp5,na.rm=TRUE) [1] 1102.4967 684.6852 699.3429 723.6645 732.5131 619.9634 694.5905 [8] 714.4642 705.3782 719.3320 706.2763 699.6238 675.5603 702.0746 [15] 694.8476 689.6691 708.8792 692.7921 706.8202 717.5539 > colVars(tmp5,na.rm=TRUE) [1] 15655.37265 89.42371 101.18760 87.59775 101.52392 148.21350 [7] 47.95867 45.32645 142.61138 56.49844 52.65501 76.26742 [13] 70.47551 80.42469 152.19371 95.35197 45.46664 74.92235 [19] 56.97885 89.16641 > colSd(tmp5,na.rm=TRUE) [1] 125.121432 9.456411 10.059205 9.359367 10.075908 12.174297 [7] 6.925220 6.732492 11.942001 7.516544 7.256377 8.733122 [13] 8.394969 8.967981 12.336682 9.764833 6.742895 8.655770 [19] 7.548434 9.442797 > colMax(tmp5,na.rm=TRUE) [1] 465.25732 80.22120 86.79513 91.97028 87.73698 87.26195 81.18521 [8] 82.90523 94.45779 83.03231 79.65967 84.55118 85.91273 80.68374 [15] 91.13263 86.96359 81.67970 87.92302 81.48934 92.01483 > colMin(tmp5,na.rm=TRUE) [1] 59.38034 53.46702 55.61532 58.29321 61.22909 56.50877 60.47250 61.60341 [9] 55.49214 58.07171 57.25396 56.63584 58.08196 53.83401 56.00781 55.82308 [17] 60.67459 57.59922 61.25267 59.19845 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 88.73781 70.44957 67.79761 72.17708 72.81366 NaN 68.09221 71.31204 [9] 74.84992 66.24092 > rowSums(tmp5,na.rm=TRUE) [1] 1774.756 1408.991 1355.952 1443.542 1456.273 0.000 1361.844 1426.241 [9] 1496.998 1324.818 > rowVars(tmp5,na.rm=TRUE) [1] 7946.73384 57.72259 46.90353 83.70349 68.42872 NA [7] 81.62904 111.20006 54.04149 78.83609 > rowSd(tmp5,na.rm=TRUE) [1] 89.144455 7.597538 6.848615 9.148961 8.272165 NA 9.034879 [8] 10.545144 7.351291 8.878969 > rowMax(tmp5,na.rm=TRUE) [1] 465.25732 83.03231 86.86895 91.97028 87.73698 NA 86.96359 [8] 94.45779 88.74104 88.89783 > rowMin(tmp5,na.rm=TRUE) [1] 58.29976 55.82308 57.69709 53.46702 59.38034 NA 55.49214 55.61532 [9] 58.07171 53.83401 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.78944 68.89693 69.99341 72.15510 72.14636 NaN 70.40399 [8] 70.17322 70.87032 72.17489 70.66578 70.24295 65.51640 69.10078 [15] 70.41761 69.60403 70.81115 67.20768 71.72972 73.15061 > colSums(tmp5,na.rm=TRUE) [1] 1042.1049 620.0724 629.9407 649.3959 649.3172 0.0000 633.6359 [8] 631.5590 637.8329 649.5740 635.9920 632.1866 589.6476 621.9070 [15] 633.7585 626.4363 637.3003 604.8691 645.5675 658.3555 > colVars(tmp5,na.rm=TRUE) [1] 17267.04302 98.53684 113.79673 98.04492 100.47900 NA [7] 43.90816 32.75555 159.19404 62.90362 59.22051 84.91523 [13] 32.48379 76.69944 161.42811 102.70431 51.08367 36.01106 [19] 51.75224 78.41265 > colSd(tmp5,na.rm=TRUE) [1] 131.404121 9.926572 10.667555 9.901764 10.023921 NA [7] 6.626323 5.723247 12.617212 7.931181 7.695487 9.214946 [13] 5.699455 8.757822 12.705436 10.134314 7.147284 6.000921 [19] 7.193903 8.855092 > colMax(tmp5,na.rm=TRUE) [1] 465.25732 80.22120 86.79513 91.97028 87.73698 -Inf 81.18521 [8] 77.95859 94.45779 83.03231 79.65967 84.55118 76.82138 80.68374 [15] 91.13263 86.96359 81.67970 75.54248 81.48934 92.01483 > colMin(tmp5,na.rm=TRUE) [1] 59.38034 53.46702 55.61532 58.29321 61.22909 Inf 60.47250 61.60341 [9] 55.49214 58.07171 57.25396 56.63584 58.08196 53.83401 56.00781 55.82308 [17] 60.67459 57.59922 62.63478 65.09065 > > > > > 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] 276.8909 183.5739 309.7780 264.3600 256.5397 156.0164 207.5493 137.5832 [9] 199.2532 249.4652 > apply(copymatrix,1,var,na.rm=TRUE) [1] 276.8909 183.5739 309.7780 264.3600 256.5397 156.0164 207.5493 137.5832 [9] 199.2532 249.4652 > > > > 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] -8.526513e-14 -5.684342e-14 -1.421085e-13 -1.421085e-14 5.684342e-14 [6] -5.684342e-14 1.705303e-13 1.136868e-13 0.000000e+00 3.979039e-13 [11] 0.000000e+00 1.705303e-13 5.684342e-14 -8.526513e-14 -2.842171e-14 [16] -4.547474e-13 5.684342e-14 -2.273737e-13 1.136868e-13 0.000000e+00 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 3 12 8 14 7 14 10 18 10 12 8 15 7 15 3 13 8 18 5 1 2 18 3 1 8 19 3 6 10 1 3 8 10 14 1 8 8 5 4 20 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 2.208886 > Min(tmp) [1] -2.398153 > mean(tmp) [1] 0.0531332 > Sum(tmp) [1] 5.31332 > Var(tmp) [1] 0.9813202 > > rowMeans(tmp) [1] 0.0531332 > rowSums(tmp) [1] 5.31332 > rowVars(tmp) [1] 0.9813202 > rowSd(tmp) [1] 0.9906161 > rowMax(tmp) [1] 2.208886 > rowMin(tmp) [1] -2.398153 > > colMeans(tmp) [1] -0.389345825 0.767855237 0.355739980 -0.105729808 0.903992549 [6] 0.660981216 1.054843292 1.029240290 0.917712617 -0.057273489 [11] 0.336479960 0.692138660 -2.398153018 -0.551457649 -0.235722683 [16] 0.206179587 -1.051281618 -1.323811026 2.124227530 -0.361590530 [21] -0.686961044 -0.620085370 0.073459108 -0.574253688 -0.676503312 [26] -1.389052015 1.815394532 -1.228102003 -0.730262092 1.457526123 [31] -0.458015735 0.198401198 0.548408419 -1.441461995 0.335789133 [36] -0.815424554 0.687277406 -0.007273996 1.959901743 1.434478055 [41] 0.440092127 -0.407074787 0.447540558 0.740741106 0.863999050 [46] -0.189223351 1.012515709 -1.320250589 -0.034101356 0.034794896 [51] -0.111781815 -0.469412088 0.092419334 -1.678354020 -1.392081782 [56] 1.308249542 1.395938108 0.853975255 -1.158934547 -0.005772976 [61] -0.588260948 -0.430807384 -0.194581835 0.605612090 0.438881774 [66] -0.619981848 1.177507090 1.330072152 -1.094352912 -0.831094900 [71] 0.615728362 -0.498239750 -0.386284588 -1.987135183 0.826491548 [76] -0.619686747 -1.326486851 -0.812827290 -0.746550051 -0.871946947 [81] -0.561921365 -0.065554993 0.333743278 1.307577649 0.812192718 [86] 0.544016990 -0.120370668 -1.142951629 0.275159464 -0.850809893 [91] 1.545885346 -0.401137504 2.208885756 -0.702738486 1.736926507 [96] 0.160998459 0.683155612 -1.204947312 2.146917027 1.740693926 > colSums(tmp) [1] -0.389345825 0.767855237 0.355739980 -0.105729808 0.903992549 [6] 0.660981216 1.054843292 1.029240290 0.917712617 -0.057273489 [11] 0.336479960 0.692138660 -2.398153018 -0.551457649 -0.235722683 [16] 0.206179587 -1.051281618 -1.323811026 2.124227530 -0.361590530 [21] -0.686961044 -0.620085370 0.073459108 -0.574253688 -0.676503312 [26] -1.389052015 1.815394532 -1.228102003 -0.730262092 1.457526123 [31] -0.458015735 0.198401198 0.548408419 -1.441461995 0.335789133 [36] -0.815424554 0.687277406 -0.007273996 1.959901743 1.434478055 [41] 0.440092127 -0.407074787 0.447540558 0.740741106 0.863999050 [46] -0.189223351 1.012515709 -1.320250589 -0.034101356 0.034794896 [51] -0.111781815 -0.469412088 0.092419334 -1.678354020 -1.392081782 [56] 1.308249542 1.395938108 0.853975255 -1.158934547 -0.005772976 [61] -0.588260948 -0.430807384 -0.194581835 0.605612090 0.438881774 [66] -0.619981848 1.177507090 1.330072152 -1.094352912 -0.831094900 [71] 0.615728362 -0.498239750 -0.386284588 -1.987135183 0.826491548 [76] -0.619686747 -1.326486851 -0.812827290 -0.746550051 -0.871946947 [81] -0.561921365 -0.065554993 0.333743278 1.307577649 0.812192718 [86] 0.544016990 -0.120370668 -1.142951629 0.275159464 -0.850809893 [91] 1.545885346 -0.401137504 2.208885756 -0.702738486 1.736926507 [96] 0.160998459 0.683155612 -1.204947312 2.146917027 1.740693926 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] -0.389345825 0.767855237 0.355739980 -0.105729808 0.903992549 [6] 0.660981216 1.054843292 1.029240290 0.917712617 -0.057273489 [11] 0.336479960 0.692138660 -2.398153018 -0.551457649 -0.235722683 [16] 0.206179587 -1.051281618 -1.323811026 2.124227530 -0.361590530 [21] -0.686961044 -0.620085370 0.073459108 -0.574253688 -0.676503312 [26] -1.389052015 1.815394532 -1.228102003 -0.730262092 1.457526123 [31] -0.458015735 0.198401198 0.548408419 -1.441461995 0.335789133 [36] -0.815424554 0.687277406 -0.007273996 1.959901743 1.434478055 [41] 0.440092127 -0.407074787 0.447540558 0.740741106 0.863999050 [46] -0.189223351 1.012515709 -1.320250589 -0.034101356 0.034794896 [51] -0.111781815 -0.469412088 0.092419334 -1.678354020 -1.392081782 [56] 1.308249542 1.395938108 0.853975255 -1.158934547 -0.005772976 [61] -0.588260948 -0.430807384 -0.194581835 0.605612090 0.438881774 [66] -0.619981848 1.177507090 1.330072152 -1.094352912 -0.831094900 [71] 0.615728362 -0.498239750 -0.386284588 -1.987135183 0.826491548 [76] -0.619686747 -1.326486851 -0.812827290 -0.746550051 -0.871946947 [81] -0.561921365 -0.065554993 0.333743278 1.307577649 0.812192718 [86] 0.544016990 -0.120370668 -1.142951629 0.275159464 -0.850809893 [91] 1.545885346 -0.401137504 2.208885756 -0.702738486 1.736926507 [96] 0.160998459 0.683155612 -1.204947312 2.146917027 1.740693926 > colMin(tmp) [1] -0.389345825 0.767855237 0.355739980 -0.105729808 0.903992549 [6] 0.660981216 1.054843292 1.029240290 0.917712617 -0.057273489 [11] 0.336479960 0.692138660 -2.398153018 -0.551457649 -0.235722683 [16] 0.206179587 -1.051281618 -1.323811026 2.124227530 -0.361590530 [21] -0.686961044 -0.620085370 0.073459108 -0.574253688 -0.676503312 [26] -1.389052015 1.815394532 -1.228102003 -0.730262092 1.457526123 [31] -0.458015735 0.198401198 0.548408419 -1.441461995 0.335789133 [36] -0.815424554 0.687277406 -0.007273996 1.959901743 1.434478055 [41] 0.440092127 -0.407074787 0.447540558 0.740741106 0.863999050 [46] -0.189223351 1.012515709 -1.320250589 -0.034101356 0.034794896 [51] -0.111781815 -0.469412088 0.092419334 -1.678354020 -1.392081782 [56] 1.308249542 1.395938108 0.853975255 -1.158934547 -0.005772976 [61] -0.588260948 -0.430807384 -0.194581835 0.605612090 0.438881774 [66] -0.619981848 1.177507090 1.330072152 -1.094352912 -0.831094900 [71] 0.615728362 -0.498239750 -0.386284588 -1.987135183 0.826491548 [76] -0.619686747 -1.326486851 -0.812827290 -0.746550051 -0.871946947 [81] -0.561921365 -0.065554993 0.333743278 1.307577649 0.812192718 [86] 0.544016990 -0.120370668 -1.142951629 0.275159464 -0.850809893 [91] 1.545885346 -0.401137504 2.208885756 -0.702738486 1.736926507 [96] 0.160998459 0.683155612 -1.204947312 2.146917027 1.740693926 > colMedians(tmp) [1] -0.389345825 0.767855237 0.355739980 -0.105729808 0.903992549 [6] 0.660981216 1.054843292 1.029240290 0.917712617 -0.057273489 [11] 0.336479960 0.692138660 -2.398153018 -0.551457649 -0.235722683 [16] 0.206179587 -1.051281618 -1.323811026 2.124227530 -0.361590530 [21] -0.686961044 -0.620085370 0.073459108 -0.574253688 -0.676503312 [26] -1.389052015 1.815394532 -1.228102003 -0.730262092 1.457526123 [31] -0.458015735 0.198401198 0.548408419 -1.441461995 0.335789133 [36] -0.815424554 0.687277406 -0.007273996 1.959901743 1.434478055 [41] 0.440092127 -0.407074787 0.447540558 0.740741106 0.863999050 [46] -0.189223351 1.012515709 -1.320250589 -0.034101356 0.034794896 [51] -0.111781815 -0.469412088 0.092419334 -1.678354020 -1.392081782 [56] 1.308249542 1.395938108 0.853975255 -1.158934547 -0.005772976 [61] -0.588260948 -0.430807384 -0.194581835 0.605612090 0.438881774 [66] -0.619981848 1.177507090 1.330072152 -1.094352912 -0.831094900 [71] 0.615728362 -0.498239750 -0.386284588 -1.987135183 0.826491548 [76] -0.619686747 -1.326486851 -0.812827290 -0.746550051 -0.871946947 [81] -0.561921365 -0.065554993 0.333743278 1.307577649 0.812192718 [86] 0.544016990 -0.120370668 -1.142951629 0.275159464 -0.850809893 [91] 1.545885346 -0.401137504 2.208885756 -0.702738486 1.736926507 [96] 0.160998459 0.683155612 -1.204947312 2.146917027 1.740693926 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.3893458 0.7678552 0.35574 -0.1057298 0.9039925 0.6609812 1.054843 [2,] -0.3893458 0.7678552 0.35574 -0.1057298 0.9039925 0.6609812 1.054843 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.02924 0.9177126 -0.05727349 0.33648 0.6921387 -2.398153 -0.5514576 [2,] 1.02924 0.9177126 -0.05727349 0.33648 0.6921387 -2.398153 -0.5514576 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.2357227 0.2061796 -1.051282 -1.323811 2.124228 -0.3615905 -0.686961 [2,] -0.2357227 0.2061796 -1.051282 -1.323811 2.124228 -0.3615905 -0.686961 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.6200854 0.07345911 -0.5742537 -0.6765033 -1.389052 1.815395 -1.228102 [2,] -0.6200854 0.07345911 -0.5742537 -0.6765033 -1.389052 1.815395 -1.228102 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.7302621 1.457526 -0.4580157 0.1984012 0.5484084 -1.441462 0.3357891 [2,] -0.7302621 1.457526 -0.4580157 0.1984012 0.5484084 -1.441462 0.3357891 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.8154246 0.6872774 -0.007273996 1.959902 1.434478 0.4400921 -0.4070748 [2,] -0.8154246 0.6872774 -0.007273996 1.959902 1.434478 0.4400921 -0.4070748 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.4475406 0.7407411 0.8639991 -0.1892234 1.012516 -1.320251 -0.03410136 [2,] 0.4475406 0.7407411 0.8639991 -0.1892234 1.012516 -1.320251 -0.03410136 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.0347949 -0.1117818 -0.4694121 0.09241933 -1.678354 -1.392082 1.30825 [2,] 0.0347949 -0.1117818 -0.4694121 0.09241933 -1.678354 -1.392082 1.30825 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 1.395938 0.8539753 -1.158935 -0.005772976 -0.5882609 -0.4308074 -0.1945818 [2,] 1.395938 0.8539753 -1.158935 -0.005772976 -0.5882609 -0.4308074 -0.1945818 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.6056121 0.4388818 -0.6199818 1.177507 1.330072 -1.094353 -0.8310949 [2,] 0.6056121 0.4388818 -0.6199818 1.177507 1.330072 -1.094353 -0.8310949 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.6157284 -0.4982398 -0.3862846 -1.987135 0.8264915 -0.6196867 -1.326487 [2,] 0.6157284 -0.4982398 -0.3862846 -1.987135 0.8264915 -0.6196867 -1.326487 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.8128273 -0.7465501 -0.8719469 -0.5619214 -0.06555499 0.3337433 1.307578 [2,] -0.8128273 -0.7465501 -0.8719469 -0.5619214 -0.06555499 0.3337433 1.307578 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.8121927 0.544017 -0.1203707 -1.142952 0.2751595 -0.8508099 1.545885 [2,] 0.8121927 0.544017 -0.1203707 -1.142952 0.2751595 -0.8508099 1.545885 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.4011375 2.208886 -0.7027385 1.736927 0.1609985 0.6831556 -1.204947 [2,] -0.4011375 2.208886 -0.7027385 1.736927 0.1609985 0.6831556 -1.204947 [,99] [,100] [1,] 2.146917 1.740694 [2,] 2.146917 1.740694 > > > Max(tmp2) [1] 2.117493 > Min(tmp2) [1] -1.513087 > mean(tmp2) [1] 0.04987535 > Sum(tmp2) [1] 4.987535 > Var(tmp2) [1] 0.7175352 > > rowMeans(tmp2) [1] -0.051683108 0.350245920 0.977611075 -0.168501524 0.197549814 [6] -0.309994294 1.209540384 0.882391907 0.496604858 1.193853290 [11] -0.826967673 0.491543895 -0.907785818 -0.429932939 0.267670821 [16] 1.157831614 1.363003113 0.518088269 -0.411830709 -0.419957746 [21] 0.571278888 -0.533086590 0.007707205 1.249008484 -0.864914914 [26] -1.440923817 -0.222252074 -0.898223053 0.461554621 0.310681193 [31] -0.564432089 0.785140347 0.399444438 -1.338338242 -1.167902056 [36] 1.041273835 1.090003173 -0.624540795 -0.756564889 0.984012208 [41] -1.252490881 -0.732459236 0.967340814 -0.528449038 1.819182462 [46] -0.365323095 0.153491507 0.389685917 -0.572174888 0.087141883 [51] -0.713188649 -1.160959788 -1.146406512 0.222832353 -0.690493378 [56] 0.415962517 -1.513086717 -0.040052275 -0.788380551 -1.306346037 [61] 0.699087834 -1.207198325 0.360919995 0.639674208 -0.247202640 [66] 0.373190787 -0.398316160 -0.242686453 0.778938272 2.020739314 [71] 1.356875677 2.117492602 -0.498039798 1.517406776 0.476645890 [76] 0.583867512 -0.103420106 -0.065365850 0.280731509 -0.076516289 [81] -0.185798878 -1.369197983 -0.558594131 0.090079166 -0.052017497 [86] -0.302839982 0.610041198 1.510870622 0.577372472 0.020898377 [91] 1.162488131 -0.320637136 0.600513431 -1.414437408 -0.324824578 [96] -0.309525093 -1.097289643 -0.954819910 0.935723733 0.688671655 > rowSums(tmp2) [1] -0.051683108 0.350245920 0.977611075 -0.168501524 0.197549814 [6] -0.309994294 1.209540384 0.882391907 0.496604858 1.193853290 [11] -0.826967673 0.491543895 -0.907785818 -0.429932939 0.267670821 [16] 1.157831614 1.363003113 0.518088269 -0.411830709 -0.419957746 [21] 0.571278888 -0.533086590 0.007707205 1.249008484 -0.864914914 [26] -1.440923817 -0.222252074 -0.898223053 0.461554621 0.310681193 [31] -0.564432089 0.785140347 0.399444438 -1.338338242 -1.167902056 [36] 1.041273835 1.090003173 -0.624540795 -0.756564889 0.984012208 [41] -1.252490881 -0.732459236 0.967340814 -0.528449038 1.819182462 [46] -0.365323095 0.153491507 0.389685917 -0.572174888 0.087141883 [51] -0.713188649 -1.160959788 -1.146406512 0.222832353 -0.690493378 [56] 0.415962517 -1.513086717 -0.040052275 -0.788380551 -1.306346037 [61] 0.699087834 -1.207198325 0.360919995 0.639674208 -0.247202640 [66] 0.373190787 -0.398316160 -0.242686453 0.778938272 2.020739314 [71] 1.356875677 2.117492602 -0.498039798 1.517406776 0.476645890 [76] 0.583867512 -0.103420106 -0.065365850 0.280731509 -0.076516289 [81] -0.185798878 -1.369197983 -0.558594131 0.090079166 -0.052017497 [86] -0.302839982 0.610041198 1.510870622 0.577372472 0.020898377 [91] 1.162488131 -0.320637136 0.600513431 -1.414437408 -0.324824578 [96] -0.309525093 -1.097289643 -0.954819910 0.935723733 0.688671655 > 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.051683108 0.350245920 0.977611075 -0.168501524 0.197549814 [6] -0.309994294 1.209540384 0.882391907 0.496604858 1.193853290 [11] -0.826967673 0.491543895 -0.907785818 -0.429932939 0.267670821 [16] 1.157831614 1.363003113 0.518088269 -0.411830709 -0.419957746 [21] 0.571278888 -0.533086590 0.007707205 1.249008484 -0.864914914 [26] -1.440923817 -0.222252074 -0.898223053 0.461554621 0.310681193 [31] -0.564432089 0.785140347 0.399444438 -1.338338242 -1.167902056 [36] 1.041273835 1.090003173 -0.624540795 -0.756564889 0.984012208 [41] -1.252490881 -0.732459236 0.967340814 -0.528449038 1.819182462 [46] -0.365323095 0.153491507 0.389685917 -0.572174888 0.087141883 [51] -0.713188649 -1.160959788 -1.146406512 0.222832353 -0.690493378 [56] 0.415962517 -1.513086717 -0.040052275 -0.788380551 -1.306346037 [61] 0.699087834 -1.207198325 0.360919995 0.639674208 -0.247202640 [66] 0.373190787 -0.398316160 -0.242686453 0.778938272 2.020739314 [71] 1.356875677 2.117492602 -0.498039798 1.517406776 0.476645890 [76] 0.583867512 -0.103420106 -0.065365850 0.280731509 -0.076516289 [81] -0.185798878 -1.369197983 -0.558594131 0.090079166 -0.052017497 [86] -0.302839982 0.610041198 1.510870622 0.577372472 0.020898377 [91] 1.162488131 -0.320637136 0.600513431 -1.414437408 -0.324824578 [96] -0.309525093 -1.097289643 -0.954819910 0.935723733 0.688671655 > rowMin(tmp2) [1] -0.051683108 0.350245920 0.977611075 -0.168501524 0.197549814 [6] -0.309994294 1.209540384 0.882391907 0.496604858 1.193853290 [11] -0.826967673 0.491543895 -0.907785818 -0.429932939 0.267670821 [16] 1.157831614 1.363003113 0.518088269 -0.411830709 -0.419957746 [21] 0.571278888 -0.533086590 0.007707205 1.249008484 -0.864914914 [26] -1.440923817 -0.222252074 -0.898223053 0.461554621 0.310681193 [31] -0.564432089 0.785140347 0.399444438 -1.338338242 -1.167902056 [36] 1.041273835 1.090003173 -0.624540795 -0.756564889 0.984012208 [41] -1.252490881 -0.732459236 0.967340814 -0.528449038 1.819182462 [46] -0.365323095 0.153491507 0.389685917 -0.572174888 0.087141883 [51] -0.713188649 -1.160959788 -1.146406512 0.222832353 -0.690493378 [56] 0.415962517 -1.513086717 -0.040052275 -0.788380551 -1.306346037 [61] 0.699087834 -1.207198325 0.360919995 0.639674208 -0.247202640 [66] 0.373190787 -0.398316160 -0.242686453 0.778938272 2.020739314 [71] 1.356875677 2.117492602 -0.498039798 1.517406776 0.476645890 [76] 0.583867512 -0.103420106 -0.065365850 0.280731509 -0.076516289 [81] -0.185798878 -1.369197983 -0.558594131 0.090079166 -0.052017497 [86] -0.302839982 0.610041198 1.510870622 0.577372472 0.020898377 [91] 1.162488131 -0.320637136 0.600513431 -1.414437408 -0.324824578 [96] -0.309525093 -1.097289643 -0.954819910 0.935723733 0.688671655 > > colMeans(tmp2) [1] 0.04987535 > colSums(tmp2) [1] 4.987535 > colVars(tmp2) [1] 0.7175352 > colSd(tmp2) [1] 0.8470745 > colMax(tmp2) [1] 2.117493 > colMin(tmp2) [1] -1.513087 > colMedians(tmp2) [1] -0.01617253 > colRanges(tmp2) [,1] [1,] -1.513087 [2,] 2.117493 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 3.47852704 0.24378484 2.73296502 -7.10480532 -3.73168702 -0.08338898 [7] 2.85666570 0.28268896 6.64335690 3.94130637 > colApply(tmp,quantile)[,1] [,1] [1,] -0.9572967 [2,] -0.4740805 [3,] 0.2562269 [4,] 1.0051008 [5,] 1.9650463 > > rowApply(tmp,sum) [1] 0.64008764 0.52450958 6.43416857 3.64764147 4.61735127 -5.90646209 [7] -7.16830739 0.97798558 0.09814061 5.39429825 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 7 9 9 5 1 9 5 3 9 4 [2,] 10 4 8 8 3 7 10 4 3 1 [3,] 1 7 7 3 7 10 8 8 4 6 [4,] 5 2 1 2 2 3 3 2 6 5 [5,] 3 3 10 6 5 1 2 5 2 3 [6,] 2 6 6 10 4 4 1 1 8 7 [7,] 4 5 4 1 8 6 4 7 7 10 [8,] 9 8 3 4 6 5 7 9 1 2 [9,] 6 10 2 9 10 8 6 10 5 8 [10,] 8 1 5 7 9 2 9 6 10 9 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 7.18800611 -0.41892439 -0.81331337 0.98044804 1.25229158 -1.54005798 [7] -1.21928555 -2.27997182 0.78075131 1.59814660 0.99302767 0.66032645 [13] 1.36391485 -0.05362561 -0.84360018 0.73646616 0.48833568 1.46750119 [19] -0.30943807 -1.78851000 > colApply(tmp,quantile)[,1] [,1] [1,] 0.4245440 [2,] 0.8039025 [3,] 0.8199644 [4,] 1.7777971 [5,] 3.3617980 > > rowApply(tmp,sum) [1] 7.228482 2.127670 -3.589696 5.507753 -3.031719 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 20 16 20 11 20 [2,] 14 15 10 9 3 [3,] 4 4 6 16 14 [4,] 6 12 11 19 11 [5,] 13 20 17 4 2 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 3.3617980 0.43340283 -0.4401263 -0.08086406 0.4118786 -0.04316168 [2,] 0.8039025 0.50710529 -0.8684869 0.20832316 1.6313231 0.92346586 [3,] 0.8199644 -0.41493939 -0.6854754 -0.39402298 0.6728958 -1.57404854 [4,] 0.4245440 0.03921822 0.8631594 1.61885701 -0.4423183 -0.40339676 [5,] 1.7777971 -0.98371135 0.3176159 -0.37184510 -1.0214877 -0.44291685 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.4553552 -0.5159544 0.35693272 0.64697950 0.2286393 0.8136007 [2,] 0.3923363 -0.2306608 0.07671842 -0.06999309 -0.9778311 -1.1094611 [3,] -1.0712628 -0.5293319 0.25683579 -0.44700879 0.6923870 0.4192797 [4,] -0.2232797 -0.4291731 0.83379778 0.97126106 1.1512345 0.4239619 [5,] -0.7724345 -0.5748516 -0.74353340 0.49690792 -0.1014020 0.1129453 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.66338603 -0.1084296 -0.5107252 1.7341963 0.6428642 0.1156039 [2,] -0.01587873 0.8438548 -0.1015288 0.4035692 -0.2629130 1.0034078 [3,] -0.84121151 -0.7699181 -0.9180231 0.3910734 0.1284103 0.3491073 [4,] 1.87592655 0.4448800 -0.3997885 -1.2280718 0.4940585 -0.4789094 [5,] 1.00846457 -0.4640128 1.0864655 -0.5643009 -0.5140843 0.4782916 [,19] [,20] [1,] 0.003579523 0.3862981 [2,] -0.899894729 -0.1296886 [3,] 0.774760632 -0.4491681 [4,] -0.586057374 0.5578488 [5,] 0.398173876 -2.1538002 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 649 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 563 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 1.000145 -1.521208 1.034497 0.2570729 -1.576719 -1.397724 -1.133767 col8 col9 col10 col11 col12 col13 col14 row1 0.7222012 -0.3642107 1.266311 0.4585341 -1.87889 -0.8789846 0.3815691 col15 col16 col17 col18 col19 col20 row1 -0.07167053 0.1712235 0.9114814 -0.5448841 -1.835662 1.537325 > tmp[,"col10"] col10 row1 1.26631144 row2 0.19306397 row3 -0.74509221 row4 -0.09354539 row5 -1.02878531 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 1.000145 -1.521208 1.0344970 0.2570729 -1.5767192 -1.3977238 -1.1337673 row5 -1.686883 -2.370217 0.8520319 -1.8780374 0.9270188 -0.8208738 0.5598913 col8 col9 col10 col11 col12 col13 col14 row1 0.7222012 -0.3642107 1.266311 0.4585341 -1.878890 -0.8789846 0.38156909 row5 1.8697147 -1.4799176 -1.028785 -0.5389489 -1.598978 0.3459614 -0.03460256 col15 col16 col17 col18 col19 col20 row1 -0.07167053 0.1712235 0.9114814 -0.5448841 -1.8356625 1.53732463 row5 -0.02015781 -0.4612603 2.3289593 -0.4183766 0.9949983 0.05012098 > tmp[,c("col6","col20")] col6 col20 row1 -1.3977238 1.53732463 row2 1.3351262 0.34227213 row3 -1.8371761 0.86988692 row4 1.3747741 0.26106357 row5 -0.8208738 0.05012098 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.3977238 1.53732463 row5 -0.8208738 0.05012098 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.31938 49.79213 49.4336 50.58725 50.62082 107.3154 51.21721 50.08035 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.23684 49.90163 50.08061 49.38006 50.35145 49.02698 49.09836 48.70127 col17 col18 col19 col20 row1 50.31982 49.15154 50.76208 102.8608 > tmp[,"col10"] col10 row1 49.90163 row2 29.69925 row3 30.79118 row4 29.49465 row5 49.53829 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.31938 49.79213 49.4336 50.58725 50.62082 107.3154 51.21721 50.08035 row5 49.41441 51.69661 50.6599 49.27999 50.03153 105.2919 49.40530 50.01540 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.23684 49.90163 50.08061 49.38006 50.35145 49.02698 49.09836 48.70127 row5 51.40268 49.53829 51.32004 49.00931 51.45304 50.96105 50.78195 50.46191 col17 col18 col19 col20 row1 50.31982 49.15154 50.76208 102.8608 row5 49.98255 48.94415 49.58804 106.3021 > tmp[,c("col6","col20")] col6 col20 row1 107.31539 102.86081 row2 75.32443 73.99977 row3 75.51889 74.11533 row4 75.04756 73.75975 row5 105.29186 106.30212 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 107.3154 102.8608 row5 105.2919 106.3021 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 107.3154 102.8608 row5 105.2919 106.3021 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -1.08174163 [2,] 1.65457394 [3,] 0.11226997 [4,] -0.61962005 [5,] 0.09946393 > tmp[,c("col17","col7")] col17 col7 [1,] 0.4570831 -0.28539488 [2,] 0.7076129 -0.24616769 [3,] -1.6101728 0.87431702 [4,] -1.3201568 -0.01492200 [5,] -1.3646472 -0.09892075 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -1.0309154 0.5024411 [2,] 1.5809693 -0.8481642 [3,] -0.1682639 -0.1031906 [4,] -0.0767969 0.6434137 [5,] 2.1845158 -0.3424992 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -1.030915 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -1.030915 [2,] 1.580969 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 -0.2119802 0.4873463 -0.3151636 0.03335114 -0.04351081 -1.231668 row1 0.8543306 -0.4072778 1.8971959 -0.42144355 2.29432777 2.265736 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.3817509 0.7558959 -0.7732035 -0.2581383 0.09361024 -0.4391484 0.3339308 row1 -0.5637349 0.2726840 -0.7276787 -0.9343833 0.37205814 2.5533379 1.0328736 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.5930682 0.1985999 -0.24817269 -1.1124021 1.3200854 0.4969634 row1 -1.0760778 0.1990538 -0.01557918 -0.5165961 -0.0846352 -0.1488773 [,20] row3 -0.326469 row1 1.359070 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.3955931 -0.5026316 0.3856434 -0.9081162 -0.1239091 0.6799094 0.05685565 [,8] [,9] [,10] row2 1.415178 1.029897 -0.1614756 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -1.255378 1.313263 1.256768 -0.03453479 0.3040883 -0.4184525 0.2747341 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.240754 -0.6566522 -1.691611 -1.510221 -0.8286063 -0.9235073 0.137892 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.9310098 -0.3711996 0.4953902 0.1218177 -1.064492 -0.8184277 > > > 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: 0x60000238c960> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a62dd661b1" [2] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a655a7c2f9" [3] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a678f1955d" [4] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a63c854ab3" [5] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a652eb4ccf" [6] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a655ffd490" [7] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a6edc660c" [8] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a627afa573" [9] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a67c97355f" [10] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a62b312fe0" [11] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a62a3e3147" [12] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a6591541fb" [13] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a629ef36e" [14] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a6117fbc1a" [15] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMa8a6591657ef" > > > ### 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: 0x6000023b8000> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6000023b8000> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6000023b8000> > rowMedians(tmp) [1] -0.101483639 0.571328884 -0.381534055 0.196293712 0.651684666 [6] 0.046772249 0.076723169 0.220211904 -0.334780793 -0.021349542 [11] 0.345935330 0.234263882 -0.744437770 0.159509960 -0.230046626 [16] -0.370712262 0.307154154 0.390250893 0.179763597 0.353800380 [21] -0.146407338 -0.323657784 0.125943306 0.204062651 -0.432906588 [26] 0.042704025 -0.015755006 0.306303174 0.108499951 -0.045244805 [31] -0.141828220 0.506607654 -0.270602682 -0.053607136 0.838176358 [36] 0.224288785 0.155563375 -0.347504190 0.620185462 -0.612355528 [41] -0.085621363 0.121738244 -0.029044572 0.087583514 -0.562724736 [46] 0.364546066 0.128858315 -0.136252091 0.177437563 0.182987994 [51] 0.088454921 0.025701204 -0.293314355 0.174839122 0.287940307 [56] -0.016334012 -0.169265137 -0.048007461 -0.362154795 -0.210408759 [61] -0.030081473 -0.241219305 -0.196227706 -0.459279747 0.364979304 [66] 0.450277433 -0.309679263 -0.139619577 -0.317240034 -0.258529941 [71] -0.336133364 -0.205135992 0.245612786 0.634282752 0.024565337 [76] 0.415226787 0.232789937 0.208114433 -0.818261106 -0.169810339 [81] -0.049606533 -0.135844998 -0.122626027 0.298451077 0.081001037 [86] -0.208224101 0.229517051 -0.155373972 -0.315996163 0.272753646 [91] 0.030387545 0.135817540 -0.491747794 -0.221161923 -0.234575361 [96] -0.118882727 -0.263103145 0.399569144 -0.222767798 -0.194131842 [101] 0.387642271 -0.044507380 -0.805667485 -0.154534320 -0.196530808 [106] 0.395405120 -0.692640466 -0.033809764 0.832143669 -0.282877804 [111] -0.580376542 -0.117678389 -0.057981872 0.476815969 -0.024015753 [116] 0.471944968 -0.451885230 0.132533718 0.255405339 -0.224060599 [121] -0.339757743 -0.760399976 -0.386563173 0.045170608 0.585296248 [126] 0.087058661 -0.570550505 0.118139329 0.107268311 -0.426013105 [131] 0.014496717 0.063688549 -0.661635619 0.292655096 0.612362073 [136] -0.133771451 0.198964004 0.416341270 -0.171487447 -0.505450925 [141] 0.084169393 0.172590749 0.322669189 -0.226960607 0.056723568 [146] 0.414977004 0.028892623 -0.443867123 -0.368461762 -0.193443510 [151] 0.004721488 -0.110915156 -0.292452123 0.234135709 0.440619360 [156] -0.056760091 -0.112980146 0.144361142 0.058804856 -0.351393285 [161] 0.092236250 -0.042749549 0.199084413 -0.311663691 -0.068002890 [166] -0.023613261 0.393406457 -0.135073874 0.045391510 -0.446278163 [171] -0.243722768 0.275251388 0.116913943 -0.144224321 -0.022378235 [176] -0.612330218 -0.357159957 0.317347318 -0.563118007 0.619356739 [181] 0.037894082 -0.060300280 -0.158065246 0.129276911 -0.293617104 [186] 0.156325004 -0.573969331 -0.035125576 -0.484405978 -0.069185105 [191] -0.264415122 0.092833583 -0.170885619 -0.145423797 -0.043562006 [196] 0.614481472 -0.300888277 0.074637098 -0.121032789 0.188664254 [201] -0.229866603 0.557303935 0.455864442 -0.362199077 0.029259055 [206] -0.247162243 0.023545519 -0.319259674 0.180537090 0.504696757 [211] -0.624577405 0.458817856 -0.020839741 0.384000090 0.016311572 [216] 0.755650028 0.072426112 -0.341520771 -0.236593330 0.537934384 [221] 0.351436313 0.138910201 0.226835496 -0.356113051 0.083696299 [226] 0.062120048 0.623012032 -0.260057104 -0.532151541 -0.392124586 > > proc.time() user system elapsed 0.657 3.281 4.056
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: 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: 0x600001bf4660> > .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: 0x600001bf4660> > .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: 0x600001bf4660> > .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: 0x600001bf4660> > 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: 0x600001bf8360> > .Call("R_bm_AddColumn",P) <pointer: 0x600001bf8360> > .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: 0x600001bf8360> > .Call("R_bm_AddColumn",P) <pointer: 0x600001bf8360> > .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: 0x600001bf8360> > 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: 0x600001bf8540> > .Call("R_bm_AddColumn",P) <pointer: 0x600001bf8540> > .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: 0x600001bf8540> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600001bf8540> > .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: 0x600001bf8540> > > .Call("R_bm_RowMode",P) <pointer: 0x600001bf8540> > .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: 0x600001bf8540> > > .Call("R_bm_ColMode",P) <pointer: 0x600001bf8540> > .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: 0x600001bf8540> > 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: 0x600001bf8720> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600001bf8720> > .Call("R_bm_AddColumn",P) <pointer: 0x600001bf8720> > .Call("R_bm_AddColumn",P) <pointer: 0x600001bf8720> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilea9295aba4128" "BufferedMatrixFilea92973f6f6a2" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilea9295aba4128" "BufferedMatrixFilea92973f6f6a2" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600001bf89c0> > .Call("R_bm_AddColumn",P) <pointer: 0x600001bf89c0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600001bf89c0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600001bf89c0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600001bf89c0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600001bf89c0> > .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: 0x600001bf8ba0> > .Call("R_bm_AddColumn",P) <pointer: 0x600001bf8ba0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600001bf8ba0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600001bf8ba0> > 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: 0x600001bf8d80> > .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: 0x600001bf8d80> > rm(P) > > proc.time() user system elapsed 0.113 0.047 0.159
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: 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.112 0.028 0.136