Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2025-04-02 19:33 -0400 (Wed, 02 Apr 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4764 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.3 (2025-02-28 ucrt) -- "Trophy Case" | 4495 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4522 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4449 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4426 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 251/2289 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.70.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino8 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | ![]() | ||||||||
merida1 | macOS 12.7.5 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson1 | macOS 13.6.6 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
taishan | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.70.0 |
Command: /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.70.0.tar.gz |
StartedAt: 2025-04-01 12:50:13 -0400 (Tue, 01 Apr 2025) |
EndedAt: 2025-04-01 12:50:53 -0400 (Tue, 01 Apr 2025) |
EllapsedTime: 40.5 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.70.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.4.3 (2025-02-28) * using platform: aarch64-apple-darwin20 * R was compiled by Apple clang version 14.0.0 (clang-1400.0.29.202) GNU Fortran (GCC) 12.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.70.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... WARNING Found the following significant warnings: doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] See ‘/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 15.0.0 (clang-1500.0.40.1)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking sizes of PDF files under ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.20-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.4-arm64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘Apple clang version 15.0.0 (clang-1500.0.40.1)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch arm64 -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.4-arm64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.4.3 (2025-02-28) -- "Trophy Case" 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.328 0.119 0.442
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.3 (2025-02-28) -- "Trophy Case" 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.20-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 473648 25.3 1033988 55.3 NA 638582 34.2 Vcells 877222 6.7 8388608 64.0 65536 2072452 15.9 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Tue Apr 1 12:50:32 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Tue Apr 1 12:50:33 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: 0x600002f8c000> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Tue Apr 1 12:50:36 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Tue Apr 1 12:50:37 2025" > > ColMode(tmp2) <pointer: 0x600002f8c000> > > > > ### 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.8124431 -0.6364316 1.5287245 -0.6421785 [2,] 0.4391479 0.9220498 -0.2667682 0.8251169 [3,] 2.1971869 -0.8622237 -0.7998255 1.3482293 [4,] -0.5680249 0.4010513 -0.7281828 -0.6679995 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.20-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.8124431 0.6364316 1.5287245 0.6421785 [2,] 0.4391479 0.9220498 0.2667682 0.8251169 [3,] 2.1971869 0.8622237 0.7998255 1.3482293 [4,] 0.5680249 0.4010513 0.7281828 0.6679995 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.20-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.0405400 0.7977666 1.2364160 0.8013604 [2,] 0.6626823 0.9602343 0.5164961 0.9083594 [3,] 1.4822911 0.9285600 0.8943296 1.1611328 [4,] 0.7536742 0.6332861 0.8533363 0.8173124 > > 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.20-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,] 226.21784 33.61410 38.89288 33.65578 [2,] 32.06597 35.52439 30.43173 34.90871 [3,] 42.02010 35.14782 34.74312 37.95956 [4,] 33.10477 31.73391 34.26155 33.84112 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600002fa4120> > exp(tmp5) <pointer: 0x600002fa4120> > log(tmp5,2) <pointer: 0x600002fa4120> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 470.8428 > Min(tmp5) [1] 52.82791 > mean(tmp5) [1] 73.41102 > Sum(tmp5) [1] 14682.2 > Var(tmp5) [1] 869.1602 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 92.43276 70.47315 70.95547 70.28058 72.12700 71.06521 71.52070 68.63740 [9] 70.99997 75.61797 > rowSums(tmp5) [1] 1848.655 1409.463 1419.109 1405.612 1442.540 1421.304 1430.414 1372.748 [9] 1419.999 1512.359 > rowVars(tmp5) [1] 7984.44314 70.40691 95.82315 68.98689 89.23556 66.75397 [7] 66.50348 50.68596 70.44569 86.88413 > rowSd(tmp5) [1] 89.355711 8.390882 9.788930 8.305834 9.446457 8.170310 8.154966 [8] 7.119407 8.393193 9.321166 > rowMax(tmp5) [1] 470.84280 93.84552 87.45933 87.11475 87.40765 84.39930 86.35248 [8] 88.56014 83.79096 92.42896 > rowMin(tmp5) [1] 59.09120 59.28940 52.82791 56.47643 56.04561 55.80803 57.93023 57.50790 [9] 58.59299 59.46420 > > colMeans(tmp5) [1] 115.01124 74.90892 68.50426 73.14382 74.07463 67.47867 71.29101 [8] 69.28136 72.43575 72.92796 71.52117 68.66796 69.58572 74.33699 [15] 68.74271 71.65926 70.28940 72.14109 74.73964 67.47887 > colSums(tmp5) [1] 1150.1124 749.0892 685.0426 731.4382 740.7463 674.7867 712.9101 [8] 692.8136 724.3575 729.2796 715.2117 686.6796 695.8572 743.3699 [15] 687.4271 716.5926 702.8940 721.4109 747.3964 674.7887 > colVars(tmp5) [1] 15689.71460 69.78569 55.52081 69.31184 60.42197 25.45689 [7] 156.15172 41.83670 96.13998 80.60325 128.40153 81.93362 [13] 53.51102 70.93343 66.72102 45.93730 80.23174 123.94342 [19] 32.32811 44.69120 > colSd(tmp5) [1] 125.258591 8.353783 7.451229 8.325373 7.773157 5.045483 [7] 12.496068 6.468129 9.805099 8.977931 11.331440 9.051719 [13] 7.315123 8.422199 8.168293 6.777706 8.957217 11.132988 [19] 5.685781 6.685148 > colMax(tmp5) [1] 470.84280 92.42896 80.95044 83.46759 88.55512 76.75659 93.84552 [8] 80.41657 87.13028 85.02212 87.40765 81.61589 86.54467 85.49710 [15] 87.11475 83.79096 82.66718 88.56014 80.02800 76.62704 > colMin(tmp5) [1] 65.32280 65.76648 59.06489 55.80803 61.07236 58.62342 54.04729 59.39672 [9] 61.26523 59.36554 52.82791 56.04561 61.59091 57.93023 59.28940 57.79884 [17] 59.09120 58.59299 65.83548 56.47643 > > > ### 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] NA 70.47315 70.95547 70.28058 72.12700 71.06521 71.52070 68.63740 [9] 70.99997 75.61797 > rowSums(tmp5) [1] NA 1409.463 1419.109 1405.612 1442.540 1421.304 1430.414 1372.748 [9] 1419.999 1512.359 > rowVars(tmp5) [1] 8390.23248 70.40691 95.82315 68.98689 89.23556 66.75397 [7] 66.50348 50.68596 70.44569 86.88413 > rowSd(tmp5) [1] 91.598212 8.390882 9.788930 8.305834 9.446457 8.170310 8.154966 [8] 7.119407 8.393193 9.321166 > rowMax(tmp5) [1] NA 93.84552 87.45933 87.11475 87.40765 84.39930 86.35248 88.56014 [9] 83.79096 92.42896 > rowMin(tmp5) [1] NA 59.28940 52.82791 56.47643 56.04561 55.80803 57.93023 57.50790 [9] 58.59299 59.46420 > > colMeans(tmp5) [1] 115.01124 74.90892 68.50426 73.14382 74.07463 67.47867 71.29101 [8] 69.28136 72.43575 72.92796 71.52117 68.66796 69.58572 74.33699 [15] 68.74271 71.65926 70.28940 72.14109 NA 67.47887 > colSums(tmp5) [1] 1150.1124 749.0892 685.0426 731.4382 740.7463 674.7867 712.9101 [8] 692.8136 724.3575 729.2796 715.2117 686.6796 695.8572 743.3699 [15] 687.4271 716.5926 702.8940 721.4109 NA 674.7887 > colVars(tmp5) [1] 15689.71460 69.78569 55.52081 69.31184 60.42197 25.45689 [7] 156.15172 41.83670 96.13998 80.60325 128.40153 81.93362 [13] 53.51102 70.93343 66.72102 45.93730 80.23174 123.94342 [19] NA 44.69120 > colSd(tmp5) [1] 125.258591 8.353783 7.451229 8.325373 7.773157 5.045483 [7] 12.496068 6.468129 9.805099 8.977931 11.331440 9.051719 [13] 7.315123 8.422199 8.168293 6.777706 8.957217 11.132988 [19] NA 6.685148 > colMax(tmp5) [1] 470.84280 92.42896 80.95044 83.46759 88.55512 76.75659 93.84552 [8] 80.41657 87.13028 85.02212 87.40765 81.61589 86.54467 85.49710 [15] 87.11475 83.79096 82.66718 88.56014 NA 76.62704 > colMin(tmp5) [1] 65.32280 65.76648 59.06489 55.80803 61.07236 58.62342 54.04729 59.39672 [9] 61.26523 59.36554 52.82791 56.04561 61.59091 57.93023 59.28940 57.79884 [17] 59.09120 58.59299 NA 56.47643 > > Max(tmp5,na.rm=TRUE) [1] 470.8428 > Min(tmp5,na.rm=TRUE) [1] 52.82791 > mean(tmp5,na.rm=TRUE) [1] 73.44318 > Sum(tmp5,na.rm=TRUE) [1] 14615.19 > Var(tmp5,na.rm=TRUE) [1] 873.342 > > rowMeans(tmp5,na.rm=TRUE) [1] 93.77071 70.47315 70.95547 70.28058 72.12700 71.06521 71.52070 68.63740 [9] 70.99997 75.61797 > rowSums(tmp5,na.rm=TRUE) [1] 1781.643 1409.463 1419.109 1405.612 1442.540 1421.304 1430.414 1372.748 [9] 1419.999 1512.359 > rowVars(tmp5,na.rm=TRUE) [1] 8390.23248 70.40691 95.82315 68.98689 89.23556 66.75397 [7] 66.50348 50.68596 70.44569 86.88413 > rowSd(tmp5,na.rm=TRUE) [1] 91.598212 8.390882 9.788930 8.305834 9.446457 8.170310 8.154966 [8] 7.119407 8.393193 9.321166 > rowMax(tmp5,na.rm=TRUE) [1] 470.84280 93.84552 87.45933 87.11475 87.40765 84.39930 86.35248 [8] 88.56014 83.79096 92.42896 > rowMin(tmp5,na.rm=TRUE) [1] 59.09120 59.28940 52.82791 56.47643 56.04561 55.80803 57.93023 57.50790 [9] 58.59299 59.46420 > > colMeans(tmp5,na.rm=TRUE) [1] 115.01124 74.90892 68.50426 73.14382 74.07463 67.47867 71.29101 [8] 69.28136 72.43575 72.92796 71.52117 68.66796 69.58572 74.33699 [15] 68.74271 71.65926 70.28940 72.14109 75.59828 67.47887 > colSums(tmp5,na.rm=TRUE) [1] 1150.1124 749.0892 685.0426 731.4382 740.7463 674.7867 712.9101 [8] 692.8136 724.3575 729.2796 715.2117 686.6796 695.8572 743.3699 [15] 687.4271 716.5926 702.8940 721.4109 680.3846 674.7887 > colVars(tmp5,na.rm=TRUE) [1] 15689.71460 69.78569 55.52081 69.31184 60.42197 25.45689 [7] 156.15172 41.83670 96.13998 80.60325 128.40153 81.93362 [13] 53.51102 70.93343 66.72102 45.93730 80.23174 123.94342 [19] 28.07483 44.69120 > colSd(tmp5,na.rm=TRUE) [1] 125.258591 8.353783 7.451229 8.325373 7.773157 5.045483 [7] 12.496068 6.468129 9.805099 8.977931 11.331440 9.051719 [13] 7.315123 8.422199 8.168293 6.777706 8.957217 11.132988 [19] 5.298569 6.685148 > colMax(tmp5,na.rm=TRUE) [1] 470.84280 92.42896 80.95044 83.46759 88.55512 76.75659 93.84552 [8] 80.41657 87.13028 85.02212 87.40765 81.61589 86.54467 85.49710 [15] 87.11475 83.79096 82.66718 88.56014 80.02800 76.62704 > colMin(tmp5,na.rm=TRUE) [1] 65.32280 65.76648 59.06489 55.80803 61.07236 58.62342 54.04729 59.39672 [9] 61.26523 59.36554 52.82791 56.04561 61.59091 57.93023 59.28940 57.79884 [17] 59.09120 58.59299 65.83548 56.47643 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] NaN 70.47315 70.95547 70.28058 72.12700 71.06521 71.52070 68.63740 [9] 70.99997 75.61797 > rowSums(tmp5,na.rm=TRUE) [1] 0.000 1409.463 1419.109 1405.612 1442.540 1421.304 1430.414 1372.748 [9] 1419.999 1512.359 > rowVars(tmp5,na.rm=TRUE) [1] NA 70.40691 95.82315 68.98689 89.23556 66.75397 66.50348 50.68596 [9] 70.44569 86.88413 > rowSd(tmp5,na.rm=TRUE) [1] NA 8.390882 9.788930 8.305834 9.446457 8.170310 8.154966 7.119407 [9] 8.393193 9.321166 > rowMax(tmp5,na.rm=TRUE) [1] NA 93.84552 87.45933 87.11475 87.40765 84.39930 86.35248 88.56014 [9] 83.79096 92.42896 > rowMin(tmp5,na.rm=TRUE) [1] NA 59.28940 52.82791 56.47643 56.04561 55.80803 57.93023 57.50790 [9] 58.59299 59.46420 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 75.47440 75.45843 67.12135 73.48756 74.05789 66.96496 72.34999 68.92217 [9] 73.29040 72.32499 71.58637 67.53819 69.43289 73.21886 68.98430 71.71378 [17] 71.53365 70.42903 NaN 66.46241 > colSums(tmp5,na.rm=TRUE) [1] 679.2696 679.1259 604.0921 661.3881 666.5210 602.6846 651.1499 620.2995 [9] 659.6136 650.9249 644.2773 607.8437 624.8960 658.9697 620.8587 645.4240 [17] 643.8028 633.8612 0.0000 598.1617 > colVars(tmp5,na.rm=TRUE) [1] 65.35956 75.11185 40.94598 76.64650 67.97156 25.67013 163.05434 [8] 45.61478 99.94018 86.58851 144.40390 77.81615 59.93713 65.73521 [15] 74.40454 51.64603 72.84409 106.46069 NA 38.65413 > colSd(tmp5,na.rm=TRUE) [1] 8.084526 8.666709 6.398905 8.754799 8.244487 5.066569 12.769273 [8] 6.753872 9.997008 9.305295 12.016817 8.821346 7.741907 8.107726 [15] 8.625806 7.186517 8.534875 10.317979 NA 6.217245 > colMax(tmp5,na.rm=TRUE) [1] 87.45933 92.42896 75.00107 83.46759 88.55512 76.75659 93.84552 80.41657 [9] 87.13028 85.02212 87.40765 81.61589 86.54467 85.49710 87.11475 83.79096 [17] 82.66718 88.56014 -Inf 72.35256 > colMin(tmp5,na.rm=TRUE) [1] 65.32280 65.76648 59.06489 55.80803 61.07236 58.62342 54.04729 59.39672 [9] 61.26523 59.36554 52.82791 56.04561 61.59091 57.93023 59.28940 57.79884 [17] 60.82123 58.59299 Inf 56.47643 > > > > > 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] 337.1969 263.4476 213.4114 257.5988 255.4679 220.1315 137.8325 322.0766 [9] 153.9165 275.5309 > apply(copymatrix,1,var,na.rm=TRUE) [1] 337.1969 263.4476 213.4114 257.5988 255.4679 220.1315 137.8325 322.0766 [9] 153.9165 275.5309 > > > > 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 0.000000e+00 0.000000e+00 2.273737e-13 5.684342e-14 [6] 8.526513e-14 1.136868e-13 0.000000e+00 4.263256e-14 7.105427e-14 [11] -1.421085e-13 1.136868e-13 -4.263256e-14 5.684342e-14 -5.684342e-14 [16] -2.842171e-14 -5.684342e-14 1.136868e-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 14 10 14 2 3 10 1 5 16 9 2 10 11 1 14 9 17 10 13 3 15 8 4 1 2 9 6 4 20 9 16 10 18 1 14 5 15 6 18 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.422242 > Min(tmp) [1] -2.136664 > mean(tmp) [1] -0.02095926 > Sum(tmp) [1] -2.095926 > Var(tmp) [1] 0.9839843 > > rowMeans(tmp) [1] -0.02095926 > rowSums(tmp) [1] -2.095926 > rowVars(tmp) [1] 0.9839843 > rowSd(tmp) [1] 0.9919598 > rowMax(tmp) [1] 2.422242 > rowMin(tmp) [1] -2.136664 > > colMeans(tmp) [1] -1.909822599 -0.451698788 -0.207722769 -1.430753075 -1.127020944 [6] 0.932988486 -1.608565238 -0.816313999 -0.123080605 0.754303801 [11] 2.171179672 -0.351258859 1.893992310 0.512771191 -0.217814697 [16] 0.500715813 -0.766935954 0.460580994 -0.208876740 -0.776879517 [21] -0.395704056 -1.354567266 0.542260761 -1.041647569 0.145026163 [26] 0.388232135 -0.761779430 -1.473147686 -0.068857548 0.389264774 [31] -1.171251687 -2.136664458 -0.916970782 -0.447820424 -1.010318803 [36] 0.644024425 0.181561173 2.049026402 0.583816932 -0.826361892 [41] -1.109296272 0.280309210 -1.141305294 -0.884055863 -1.255804064 [46] 0.141215560 0.357568209 0.041396033 -0.844434221 0.831074313 [51] -0.007813674 -0.065567563 2.422241775 0.320715026 1.837716748 [56] 0.394451125 -0.162572313 1.911754659 -1.308572856 -0.361854460 [61] -1.136464974 1.730453320 -0.599365380 -0.533363357 0.334472136 [66] 0.802731534 1.362610868 0.570008864 -1.125014748 1.494724839 [71] -0.500988144 0.809653304 0.901504939 0.422891406 -0.673059129 [76] -0.250127352 0.988710254 0.869989015 -0.615529437 -0.753257224 [81] 0.674978796 0.508511662 -1.184211238 -0.828630811 -1.220739137 [86] 1.992617692 1.601171975 0.631639528 -0.025962288 0.235819597 [91] -0.832824038 -0.773151750 0.839126498 -0.290388159 -1.258420125 [96] -0.009372509 0.364433192 0.343866322 -0.222483985 1.312436625 > colSums(tmp) [1] -1.909822599 -0.451698788 -0.207722769 -1.430753075 -1.127020944 [6] 0.932988486 -1.608565238 -0.816313999 -0.123080605 0.754303801 [11] 2.171179672 -0.351258859 1.893992310 0.512771191 -0.217814697 [16] 0.500715813 -0.766935954 0.460580994 -0.208876740 -0.776879517 [21] -0.395704056 -1.354567266 0.542260761 -1.041647569 0.145026163 [26] 0.388232135 -0.761779430 -1.473147686 -0.068857548 0.389264774 [31] -1.171251687 -2.136664458 -0.916970782 -0.447820424 -1.010318803 [36] 0.644024425 0.181561173 2.049026402 0.583816932 -0.826361892 [41] -1.109296272 0.280309210 -1.141305294 -0.884055863 -1.255804064 [46] 0.141215560 0.357568209 0.041396033 -0.844434221 0.831074313 [51] -0.007813674 -0.065567563 2.422241775 0.320715026 1.837716748 [56] 0.394451125 -0.162572313 1.911754659 -1.308572856 -0.361854460 [61] -1.136464974 1.730453320 -0.599365380 -0.533363357 0.334472136 [66] 0.802731534 1.362610868 0.570008864 -1.125014748 1.494724839 [71] -0.500988144 0.809653304 0.901504939 0.422891406 -0.673059129 [76] -0.250127352 0.988710254 0.869989015 -0.615529437 -0.753257224 [81] 0.674978796 0.508511662 -1.184211238 -0.828630811 -1.220739137 [86] 1.992617692 1.601171975 0.631639528 -0.025962288 0.235819597 [91] -0.832824038 -0.773151750 0.839126498 -0.290388159 -1.258420125 [96] -0.009372509 0.364433192 0.343866322 -0.222483985 1.312436625 > 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.909822599 -0.451698788 -0.207722769 -1.430753075 -1.127020944 [6] 0.932988486 -1.608565238 -0.816313999 -0.123080605 0.754303801 [11] 2.171179672 -0.351258859 1.893992310 0.512771191 -0.217814697 [16] 0.500715813 -0.766935954 0.460580994 -0.208876740 -0.776879517 [21] -0.395704056 -1.354567266 0.542260761 -1.041647569 0.145026163 [26] 0.388232135 -0.761779430 -1.473147686 -0.068857548 0.389264774 [31] -1.171251687 -2.136664458 -0.916970782 -0.447820424 -1.010318803 [36] 0.644024425 0.181561173 2.049026402 0.583816932 -0.826361892 [41] -1.109296272 0.280309210 -1.141305294 -0.884055863 -1.255804064 [46] 0.141215560 0.357568209 0.041396033 -0.844434221 0.831074313 [51] -0.007813674 -0.065567563 2.422241775 0.320715026 1.837716748 [56] 0.394451125 -0.162572313 1.911754659 -1.308572856 -0.361854460 [61] -1.136464974 1.730453320 -0.599365380 -0.533363357 0.334472136 [66] 0.802731534 1.362610868 0.570008864 -1.125014748 1.494724839 [71] -0.500988144 0.809653304 0.901504939 0.422891406 -0.673059129 [76] -0.250127352 0.988710254 0.869989015 -0.615529437 -0.753257224 [81] 0.674978796 0.508511662 -1.184211238 -0.828630811 -1.220739137 [86] 1.992617692 1.601171975 0.631639528 -0.025962288 0.235819597 [91] -0.832824038 -0.773151750 0.839126498 -0.290388159 -1.258420125 [96] -0.009372509 0.364433192 0.343866322 -0.222483985 1.312436625 > colMin(tmp) [1] -1.909822599 -0.451698788 -0.207722769 -1.430753075 -1.127020944 [6] 0.932988486 -1.608565238 -0.816313999 -0.123080605 0.754303801 [11] 2.171179672 -0.351258859 1.893992310 0.512771191 -0.217814697 [16] 0.500715813 -0.766935954 0.460580994 -0.208876740 -0.776879517 [21] -0.395704056 -1.354567266 0.542260761 -1.041647569 0.145026163 [26] 0.388232135 -0.761779430 -1.473147686 -0.068857548 0.389264774 [31] -1.171251687 -2.136664458 -0.916970782 -0.447820424 -1.010318803 [36] 0.644024425 0.181561173 2.049026402 0.583816932 -0.826361892 [41] -1.109296272 0.280309210 -1.141305294 -0.884055863 -1.255804064 [46] 0.141215560 0.357568209 0.041396033 -0.844434221 0.831074313 [51] -0.007813674 -0.065567563 2.422241775 0.320715026 1.837716748 [56] 0.394451125 -0.162572313 1.911754659 -1.308572856 -0.361854460 [61] -1.136464974 1.730453320 -0.599365380 -0.533363357 0.334472136 [66] 0.802731534 1.362610868 0.570008864 -1.125014748 1.494724839 [71] -0.500988144 0.809653304 0.901504939 0.422891406 -0.673059129 [76] -0.250127352 0.988710254 0.869989015 -0.615529437 -0.753257224 [81] 0.674978796 0.508511662 -1.184211238 -0.828630811 -1.220739137 [86] 1.992617692 1.601171975 0.631639528 -0.025962288 0.235819597 [91] -0.832824038 -0.773151750 0.839126498 -0.290388159 -1.258420125 [96] -0.009372509 0.364433192 0.343866322 -0.222483985 1.312436625 > colMedians(tmp) [1] -1.909822599 -0.451698788 -0.207722769 -1.430753075 -1.127020944 [6] 0.932988486 -1.608565238 -0.816313999 -0.123080605 0.754303801 [11] 2.171179672 -0.351258859 1.893992310 0.512771191 -0.217814697 [16] 0.500715813 -0.766935954 0.460580994 -0.208876740 -0.776879517 [21] -0.395704056 -1.354567266 0.542260761 -1.041647569 0.145026163 [26] 0.388232135 -0.761779430 -1.473147686 -0.068857548 0.389264774 [31] -1.171251687 -2.136664458 -0.916970782 -0.447820424 -1.010318803 [36] 0.644024425 0.181561173 2.049026402 0.583816932 -0.826361892 [41] -1.109296272 0.280309210 -1.141305294 -0.884055863 -1.255804064 [46] 0.141215560 0.357568209 0.041396033 -0.844434221 0.831074313 [51] -0.007813674 -0.065567563 2.422241775 0.320715026 1.837716748 [56] 0.394451125 -0.162572313 1.911754659 -1.308572856 -0.361854460 [61] -1.136464974 1.730453320 -0.599365380 -0.533363357 0.334472136 [66] 0.802731534 1.362610868 0.570008864 -1.125014748 1.494724839 [71] -0.500988144 0.809653304 0.901504939 0.422891406 -0.673059129 [76] -0.250127352 0.988710254 0.869989015 -0.615529437 -0.753257224 [81] 0.674978796 0.508511662 -1.184211238 -0.828630811 -1.220739137 [86] 1.992617692 1.601171975 0.631639528 -0.025962288 0.235819597 [91] -0.832824038 -0.773151750 0.839126498 -0.290388159 -1.258420125 [96] -0.009372509 0.364433192 0.343866322 -0.222483985 1.312436625 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.909823 -0.4516988 -0.2077228 -1.430753 -1.127021 0.9329885 -1.608565 [2,] -1.909823 -0.4516988 -0.2077228 -1.430753 -1.127021 0.9329885 -1.608565 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.816314 -0.1230806 0.7543038 2.17118 -0.3512589 1.893992 0.5127712 [2,] -0.816314 -0.1230806 0.7543038 2.17118 -0.3512589 1.893992 0.5127712 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.2178147 0.5007158 -0.766936 0.460581 -0.2088767 -0.7768795 -0.3957041 [2,] -0.2178147 0.5007158 -0.766936 0.460581 -0.2088767 -0.7768795 -0.3957041 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1.354567 0.5422608 -1.041648 0.1450262 0.3882321 -0.7617794 -1.473148 [2,] -1.354567 0.5422608 -1.041648 0.1450262 0.3882321 -0.7617794 -1.473148 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.06885755 0.3892648 -1.171252 -2.136664 -0.9169708 -0.4478204 -1.010319 [2,] -0.06885755 0.3892648 -1.171252 -2.136664 -0.9169708 -0.4478204 -1.010319 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.6440244 0.1815612 2.049026 0.5838169 -0.8263619 -1.109296 0.2803092 [2,] 0.6440244 0.1815612 2.049026 0.5838169 -0.8263619 -1.109296 0.2803092 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -1.141305 -0.8840559 -1.255804 0.1412156 0.3575682 0.04139603 -0.8444342 [2,] -1.141305 -0.8840559 -1.255804 0.1412156 0.3575682 0.04139603 -0.8444342 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.8310743 -0.007813674 -0.06556756 2.422242 0.320715 1.837717 0.3944511 [2,] 0.8310743 -0.007813674 -0.06556756 2.422242 0.320715 1.837717 0.3944511 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.1625723 1.911755 -1.308573 -0.3618545 -1.136465 1.730453 -0.5993654 [2,] -0.1625723 1.911755 -1.308573 -0.3618545 -1.136465 1.730453 -0.5993654 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.5333634 0.3344721 0.8027315 1.362611 0.5700089 -1.125015 1.494725 [2,] -0.5333634 0.3344721 0.8027315 1.362611 0.5700089 -1.125015 1.494725 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.5009881 0.8096533 0.9015049 0.4228914 -0.6730591 -0.2501274 0.9887103 [2,] -0.5009881 0.8096533 0.9015049 0.4228914 -0.6730591 -0.2501274 0.9887103 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.869989 -0.6155294 -0.7532572 0.6749788 0.5085117 -1.184211 -0.8286308 [2,] 0.869989 -0.6155294 -0.7532572 0.6749788 0.5085117 -1.184211 -0.8286308 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -1.220739 1.992618 1.601172 0.6316395 -0.02596229 0.2358196 -0.832824 [2,] -1.220739 1.992618 1.601172 0.6316395 -0.02596229 0.2358196 -0.832824 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.7731517 0.8391265 -0.2903882 -1.25842 -0.009372509 0.3644332 0.3438663 [2,] -0.7731517 0.8391265 -0.2903882 -1.25842 -0.009372509 0.3644332 0.3438663 [,99] [,100] [1,] -0.222484 1.312437 [2,] -0.222484 1.312437 > > > Max(tmp2) [1] 2.538595 > Min(tmp2) [1] -1.978792 > mean(tmp2) [1] 0.01879486 > Sum(tmp2) [1] 1.879486 > Var(tmp2) [1] 1.008783 > > rowMeans(tmp2) [1] -0.47675362 0.06840191 -0.95167553 0.80378523 0.83900349 1.25619545 [7] 1.98537080 0.07732226 -0.41357204 1.07169772 0.90132022 -1.31403718 [13] -1.32895512 -0.41274442 -0.69356410 -1.03615625 -1.21656458 0.59616322 [19] -0.54129593 0.09217631 -0.98076769 -1.97879221 0.61292471 1.10276406 [25] -0.44270684 2.23912493 1.08684847 2.53859507 -1.29619781 -0.61674022 [31] 0.01440766 -1.68396910 -1.51392348 1.62892644 -0.60426206 -0.09366675 [37] 0.19477247 0.66912114 0.30583607 0.69430695 -0.08457350 0.87270873 [43] 0.53809181 -0.65338244 -0.69264052 0.09569295 -0.52565108 -0.20537655 [49] 0.83821069 -0.65899635 0.71414001 1.44547459 1.70110178 1.04048238 [55] 0.94879676 -0.40020336 0.16294316 0.46789046 -0.91665779 -1.86168834 [61] 1.88121730 0.78036287 0.64231099 0.61600422 -1.11653101 0.08217524 [67] 0.63875399 0.01940558 -1.66347955 -1.26433134 -1.93917294 -0.26735151 [73] 0.52659282 1.34024025 0.35988862 -0.52294604 -1.47281729 0.53915216 [79] -0.02558449 0.93189026 -0.97085762 -1.25092527 0.32871888 0.51074185 [85] 0.49090553 -0.19844965 0.97401930 -0.44255874 0.45490167 -1.18584809 [91] -0.18452959 -0.40465017 -0.55155720 -0.98853392 1.61686400 0.59786631 [97] 1.55028518 -0.92372664 -0.25443887 -1.38360428 > rowSums(tmp2) [1] -0.47675362 0.06840191 -0.95167553 0.80378523 0.83900349 1.25619545 [7] 1.98537080 0.07732226 -0.41357204 1.07169772 0.90132022 -1.31403718 [13] -1.32895512 -0.41274442 -0.69356410 -1.03615625 -1.21656458 0.59616322 [19] -0.54129593 0.09217631 -0.98076769 -1.97879221 0.61292471 1.10276406 [25] -0.44270684 2.23912493 1.08684847 2.53859507 -1.29619781 -0.61674022 [31] 0.01440766 -1.68396910 -1.51392348 1.62892644 -0.60426206 -0.09366675 [37] 0.19477247 0.66912114 0.30583607 0.69430695 -0.08457350 0.87270873 [43] 0.53809181 -0.65338244 -0.69264052 0.09569295 -0.52565108 -0.20537655 [49] 0.83821069 -0.65899635 0.71414001 1.44547459 1.70110178 1.04048238 [55] 0.94879676 -0.40020336 0.16294316 0.46789046 -0.91665779 -1.86168834 [61] 1.88121730 0.78036287 0.64231099 0.61600422 -1.11653101 0.08217524 [67] 0.63875399 0.01940558 -1.66347955 -1.26433134 -1.93917294 -0.26735151 [73] 0.52659282 1.34024025 0.35988862 -0.52294604 -1.47281729 0.53915216 [79] -0.02558449 0.93189026 -0.97085762 -1.25092527 0.32871888 0.51074185 [85] 0.49090553 -0.19844965 0.97401930 -0.44255874 0.45490167 -1.18584809 [91] -0.18452959 -0.40465017 -0.55155720 -0.98853392 1.61686400 0.59786631 [97] 1.55028518 -0.92372664 -0.25443887 -1.38360428 > 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.47675362 0.06840191 -0.95167553 0.80378523 0.83900349 1.25619545 [7] 1.98537080 0.07732226 -0.41357204 1.07169772 0.90132022 -1.31403718 [13] -1.32895512 -0.41274442 -0.69356410 -1.03615625 -1.21656458 0.59616322 [19] -0.54129593 0.09217631 -0.98076769 -1.97879221 0.61292471 1.10276406 [25] -0.44270684 2.23912493 1.08684847 2.53859507 -1.29619781 -0.61674022 [31] 0.01440766 -1.68396910 -1.51392348 1.62892644 -0.60426206 -0.09366675 [37] 0.19477247 0.66912114 0.30583607 0.69430695 -0.08457350 0.87270873 [43] 0.53809181 -0.65338244 -0.69264052 0.09569295 -0.52565108 -0.20537655 [49] 0.83821069 -0.65899635 0.71414001 1.44547459 1.70110178 1.04048238 [55] 0.94879676 -0.40020336 0.16294316 0.46789046 -0.91665779 -1.86168834 [61] 1.88121730 0.78036287 0.64231099 0.61600422 -1.11653101 0.08217524 [67] 0.63875399 0.01940558 -1.66347955 -1.26433134 -1.93917294 -0.26735151 [73] 0.52659282 1.34024025 0.35988862 -0.52294604 -1.47281729 0.53915216 [79] -0.02558449 0.93189026 -0.97085762 -1.25092527 0.32871888 0.51074185 [85] 0.49090553 -0.19844965 0.97401930 -0.44255874 0.45490167 -1.18584809 [91] -0.18452959 -0.40465017 -0.55155720 -0.98853392 1.61686400 0.59786631 [97] 1.55028518 -0.92372664 -0.25443887 -1.38360428 > rowMin(tmp2) [1] -0.47675362 0.06840191 -0.95167553 0.80378523 0.83900349 1.25619545 [7] 1.98537080 0.07732226 -0.41357204 1.07169772 0.90132022 -1.31403718 [13] -1.32895512 -0.41274442 -0.69356410 -1.03615625 -1.21656458 0.59616322 [19] -0.54129593 0.09217631 -0.98076769 -1.97879221 0.61292471 1.10276406 [25] -0.44270684 2.23912493 1.08684847 2.53859507 -1.29619781 -0.61674022 [31] 0.01440766 -1.68396910 -1.51392348 1.62892644 -0.60426206 -0.09366675 [37] 0.19477247 0.66912114 0.30583607 0.69430695 -0.08457350 0.87270873 [43] 0.53809181 -0.65338244 -0.69264052 0.09569295 -0.52565108 -0.20537655 [49] 0.83821069 -0.65899635 0.71414001 1.44547459 1.70110178 1.04048238 [55] 0.94879676 -0.40020336 0.16294316 0.46789046 -0.91665779 -1.86168834 [61] 1.88121730 0.78036287 0.64231099 0.61600422 -1.11653101 0.08217524 [67] 0.63875399 0.01940558 -1.66347955 -1.26433134 -1.93917294 -0.26735151 [73] 0.52659282 1.34024025 0.35988862 -0.52294604 -1.47281729 0.53915216 [79] -0.02558449 0.93189026 -0.97085762 -1.25092527 0.32871888 0.51074185 [85] 0.49090553 -0.19844965 0.97401930 -0.44255874 0.45490167 -1.18584809 [91] -0.18452959 -0.40465017 -0.55155720 -0.98853392 1.61686400 0.59786631 [97] 1.55028518 -0.92372664 -0.25443887 -1.38360428 > > colMeans(tmp2) [1] 0.01879486 > colSums(tmp2) [1] 1.879486 > colVars(tmp2) [1] 1.008783 > colSd(tmp2) [1] 1.004382 > colMax(tmp2) [1] 2.538595 > colMin(tmp2) [1] -1.978792 > colMedians(tmp2) [1] 0.04390374 > colRanges(tmp2) [,1] [1,] -1.978792 [2,] 2.538595 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 2.6417327 2.4498732 -1.7478656 -1.0708124 1.3165336 3.5367543 [7] -3.2871232 -5.1001065 -0.3888985 -4.3510037 > colApply(tmp,quantile)[,1] [,1] [1,] -2.0038029 [2,] -0.3242631 [3,] 0.4761786 [4,] 1.0083149 [5,] 1.4125984 > > rowApply(tmp,sum) [1] -1.7996510 4.9765734 -5.1415127 0.1429660 -4.3471153 1.9764798 [7] 2.3707383 -0.7273327 -5.2429998 1.7909382 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 7 9 7 8 1 9 9 7 6 8 [2,] 10 7 8 9 2 3 4 6 2 10 [3,] 2 6 4 4 8 1 6 4 10 7 [4,] 4 10 2 2 7 10 5 2 5 6 [5,] 6 4 3 6 6 7 10 10 7 1 [6,] 1 8 9 5 9 6 3 9 9 9 [7,] 8 3 5 1 5 8 1 8 8 3 [8,] 3 5 1 7 4 2 7 3 4 5 [9,] 5 2 6 10 10 4 8 1 3 4 [10,] 9 1 10 3 3 5 2 5 1 2 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 3.60195756 -0.06503467 0.22620780 1.88149158 1.55427685 0.93424886 [7] -3.16335806 -3.64171895 2.31927180 0.38661612 0.35374299 -0.97589127 [13] 0.86352639 1.27162040 1.04815806 5.94616606 -1.07491541 -1.92584823 [19] -0.45124388 -0.47220218 > colApply(tmp,quantile)[,1] [,1] [1,] 0.2790186 [2,] 0.4567265 [3,] 0.5551182 [4,] 0.8150987 [5,] 1.4959956 > > rowApply(tmp,sum) [1] -2.106565 3.581313 2.857010 6.462971 -2.177658 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 15 20 15 14 13 [2,] 8 11 9 7 14 [3,] 4 1 20 12 9 [4,] 14 14 13 2 19 [5,] 19 17 7 8 10 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.4567265 -0.4327691 -1.24509379 0.4566007 1.33651422 0.95811650 [2,] 1.4959956 0.2201071 -1.20036347 0.6665135 1.09638787 -0.07874198 [3,] 0.8150987 0.1305247 2.49240616 0.6762061 -0.61605070 -0.78929125 [4,] 0.5551182 -0.2643893 0.24661886 -0.7597711 -0.25634038 0.03781168 [5,] 0.2790186 0.2814919 -0.06735996 0.8419423 -0.00623416 0.80635391 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.3531839 0.7839068 1.7212344 -0.5517220 -0.3903905 0.3384378 [2,] -0.3783824 -0.8679718 -0.3768227 -0.6241434 0.4815644 -0.9367683 [3,] -1.7980020 -1.3489535 1.1615893 0.7958887 0.4669743 -1.7735680 [4,] 0.5817455 -0.7095565 0.4937238 1.3788027 -1.3053159 1.7583953 [5,] -1.9219031 -1.4991440 -0.6804530 -0.6122099 1.1009107 -0.3623882 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -1.46463437 -0.4593543 -0.9815801 0.7662945 -1.99782146 -1.4740123 [2,] 0.31381416 -0.3332093 0.6707075 1.2785691 -0.04862235 0.8358500 [3,] 1.47171049 1.6799702 0.6462147 0.3635055 -0.62640494 0.9473222 [4,] 0.06403385 0.9936913 0.1595184 3.2906783 1.74740911 -0.5391137 [5,] 0.47860225 -0.6094775 0.5532977 0.2471187 -0.14947577 -1.6958945 [,19] [,20] [1,] -0.19417118 -0.08603116 [2,] 0.01026822 1.35656163 [3,] -0.44986064 -1.38827007 [4,] -0.49746131 -0.51262807 [5,] 0.67998103 0.15816549 > > > 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.20-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.20-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.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 567 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 0.4312729 2.644896 1.29778 1.097027 -2.076493 0.6812915 0.6144016 col8 col9 col10 col11 col12 col13 col14 row1 0.3003657 -0.5939944 0.4874476 -0.7566704 1.322484 -0.8734515 0.002813468 col15 col16 col17 col18 col19 col20 row1 -0.03027667 -0.8328589 0.8285247 1.3955 -0.9160292 0.6202088 > tmp[,"col10"] col10 row1 0.4874476 row2 0.3579541 row3 -0.4120689 row4 -0.4251029 row5 -0.4558770 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.43127293 2.6448956 1.2977802 1.0970268 -2.0764927 0.6812915 row5 -0.05465634 -0.5487533 -0.8520518 0.4560567 0.9547079 0.3425737 col7 col8 col9 col10 col11 col12 row1 0.6144016 0.3003657 -0.5939944 0.4874476 -0.75667043 1.3224841 row5 -2.0418663 1.1317806 0.9514007 -0.4558770 -0.06140725 0.2581085 col13 col14 col15 col16 col17 col18 row1 -0.8734515 0.002813468 -0.03027667 -0.8328589 0.8285247 1.395500 row5 -0.8902967 0.251532413 -0.28079820 -0.9039995 0.1600728 2.380905 col19 col20 row1 -0.9160292 0.6202088 row5 -2.2156580 -1.2783998 > tmp[,c("col6","col20")] col6 col20 row1 0.6812915 0.62020881 row2 -1.3318266 0.53628550 row3 1.0035285 0.95712492 row4 -1.3188278 -0.02165601 row5 0.3425737 -1.27839983 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.6812915 0.6202088 row5 0.3425737 -1.2783998 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.1637 51.95121 49.75557 48.87067 49.52281 105.0963 51.1775 50.2498 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.55396 50.22975 49.94359 50.61875 49.0017 50.04187 50.67107 49.73857 col17 col18 col19 col20 row1 48.9089 49.52666 50.24483 105.2936 > tmp[,"col10"] col10 row1 50.22975 row2 28.94581 row3 30.72273 row4 29.79684 row5 50.44772 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.16370 51.95121 49.75557 48.87067 49.52281 105.0963 51.17750 50.24980 row5 50.90056 49.79273 49.98138 49.32000 49.10870 105.9735 49.24128 50.21246 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.55396 50.22975 49.94359 50.61875 49.0017 50.04187 50.67107 49.73857 row5 50.32788 50.44772 49.77211 49.26450 50.3666 52.44299 50.19046 48.91327 col17 col18 col19 col20 row1 48.9089 49.52666 50.24483 105.2936 row5 50.1469 50.79594 47.98350 105.7466 > tmp[,c("col6","col20")] col6 col20 row1 105.09627 105.29361 row2 78.17571 73.84834 row3 75.74729 74.37226 row4 74.43744 75.01026 row5 105.97354 105.74664 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.0963 105.2936 row5 105.9735 105.7466 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.0963 105.2936 row5 105.9735 105.7466 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 1.1636694 [2,] -0.9951622 [3,] 1.1629313 [4,] -1.5664902 [5,] 1.7322553 > tmp[,c("col17","col7")] col17 col7 [1,] -0.5588655 1.1640464 [2,] -0.7347490 1.8754309 [3,] 0.1618431 1.2351334 [4,] 0.1540561 0.6190668 [5,] 1.2076010 0.1375351 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -1.4407654 -0.3696244 [2,] 0.3485777 -0.5590799 [3,] -0.5214457 -0.6687986 [4,] -0.4972123 -0.6999254 [5,] -1.4402513 -0.1691466 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -1.440765 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -1.4407654 [2,] 0.3485777 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 1.806394 -1.458154 0.2138098 -2.1908266 0.1792917 -0.06319458 -0.50611742 row1 -1.468394 -1.388104 0.4357540 -0.8360655 0.7435369 -1.21268089 -0.01795165 [,8] [,9] [,10] [,11] [,12] [,13] row3 -1.0924581 1.1138629 1.1125999 -0.3673594 -1.09924110 -1.860554 row1 -0.2573871 0.6361249 -0.9040849 -1.3254471 -0.07170349 1.668596 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.4632826 0.9488777 -0.06122396 0.7233568 -0.9024001 -0.4096390 row1 0.4432862 -0.7833460 -1.30673603 0.2359055 0.5857168 0.1751206 [,20] row3 0.5349105 row1 0.8547047 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.3105778 1.622282 0.4578423 -0.3876919 0.2933164 0.002800742 1.865194 [,8] [,9] [,10] row2 1.10717 -0.1000301 -1.066348 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.05932505 -0.6612003 0.795606 0.4160692 0.9763552 -0.1931411 1.323425 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.1019898 0.8543774 0.8834923 -0.1821187 0.2664412 0.2905767 -0.45957 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.04410121 -0.4570788 1.967814 -0.418018 -0.5821944 0.3057191 > > > 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: 0x600002f880c0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1030848418d3b" [2] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10308479f418c" [3] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1030828887310" [4] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10308163a343a" [5] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10308473ad73c" [6] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM103086808c8ac" [7] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1030818aec990" [8] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM103087b331998" [9] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1030857d58958" [10] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1030842c1d75" [11] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM103086c41ee76" [12] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM103085c8ebc80" [13] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM103081ef9a6f9" [14] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1030818413552" [15] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM103086113a6ee" > > > ### 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: 0x600002f884e0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600002f884e0> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600002f884e0> > rowMedians(tmp) [1] -5.677368e-01 1.200652e-01 3.351578e-01 -5.089151e-01 2.154921e-02 [6] 5.701292e-01 1.148173e-01 -2.047339e-01 -7.262374e-02 2.527170e-01 [11] -2.356606e-01 -1.576407e-01 -2.102436e-01 4.941654e-01 -2.068814e-01 [16] -4.687534e-02 2.983805e-01 -3.089776e-01 -1.145673e-01 2.952713e-01 [21] -2.391262e-01 -3.295864e-01 6.885189e-01 -5.706188e-02 2.404166e-01 [26] 1.802869e-01 -2.532987e-02 -6.876412e-01 -4.388727e-03 -4.072541e-01 [31] -8.286501e-02 -2.230990e-01 1.578964e-01 1.386154e-02 4.526941e-01 [36] -4.285830e-01 -6.488249e-02 -2.120055e-01 5.507099e-01 2.462712e-01 [41] -2.002987e-01 -1.452515e-01 -1.132706e-01 -5.569478e-04 -2.665664e-01 [46] 1.401209e-02 3.282987e-01 3.807935e-02 -6.991457e-01 2.665693e-01 [51] 1.592988e-01 2.955593e-01 6.389199e-02 2.185194e-01 4.444625e-01 [56] 9.708804e-02 1.700361e-01 2.242337e-01 2.224928e-01 -4.505386e-02 [61] -5.459626e-01 4.624290e-03 1.418376e-01 -5.964934e-01 4.136739e-02 [66] -1.723311e-01 -4.606875e-02 -1.918208e-01 -7.120062e-02 4.343680e-01 [71] 3.510306e-01 -2.588633e-01 1.808141e-01 -2.474630e-02 3.002996e-01 [76] 4.457648e-01 9.028855e-02 5.681069e-01 2.498273e-01 3.441552e-01 [81] -1.828824e-01 1.849147e-01 6.307243e-03 -1.354282e-03 -1.001160e-01 [86] 4.715269e-01 3.525038e-01 -3.312352e-02 -8.185790e-01 2.739169e-01 [91] 2.535443e-01 -5.369558e-01 -6.423389e-01 -3.026441e-01 3.451123e-01 [96] 3.419626e-01 1.101813e-01 -4.152819e-01 -1.264554e-01 2.993906e-01 [101] 3.241875e-01 -4.061625e-05 4.397798e-01 2.955196e-01 5.651650e-02 [106] 2.672584e-01 2.097764e-01 1.018369e-01 8.612002e-02 7.933829e-02 [111] -3.798593e-04 -5.091234e-01 -2.364553e-01 -2.699656e-01 -5.480797e-01 [116] 1.409425e-02 3.617496e-01 7.113427e-02 -2.428277e-01 -6.715803e-02 [121] 3.734858e-03 -3.439276e-01 2.815517e-01 -2.459144e-01 4.452814e-01 [126] 2.275671e-01 1.443339e-01 -2.900341e-01 3.923651e-01 2.479507e-01 [131] -3.129984e-02 1.049828e-01 -2.298567e-01 -3.819507e-01 -6.284965e-02 [136] 8.374432e-03 -3.936524e-02 4.132440e-01 2.705996e-01 -1.091564e-01 [141] 1.298336e-01 -8.500252e-02 1.105330e-01 -1.110016e-01 -9.185222e-01 [146] -1.883237e-01 1.155960e-01 -7.270194e-02 4.121730e-02 4.023081e-02 [151] 6.350135e-02 -8.926224e-03 -1.939743e-01 8.812487e-02 -1.157328e-01 [156] 3.608527e-01 1.541802e-01 -6.003950e-01 3.253329e-01 2.054500e-01 [161] -4.770414e-01 4.393145e-01 -6.528635e-02 5.334187e-01 8.039292e-02 [166] -1.144558e-01 5.355920e-01 1.410653e-01 -3.414060e-01 -1.390760e-02 [171] -3.139358e-01 1.869448e-01 -1.161816e-01 2.603825e-01 3.029362e-01 [176] -3.389663e-01 -3.351495e-01 1.634069e-01 5.895167e-01 9.650815e-02 [181] -7.669039e-03 6.024851e-01 -1.412349e-01 2.375522e-01 -1.390637e-01 [186] 7.209146e-02 3.628070e-01 1.622609e-01 1.766547e-01 -3.914920e-01 [191] 2.946708e-01 3.521960e-01 1.273665e-01 -7.734854e-03 -3.385912e-01 [196] -4.398560e-01 -3.825366e-01 3.469902e-01 -1.496483e-01 -4.873930e-01 [201] -5.048098e-01 2.445813e-01 -4.142532e-01 2.778431e-01 1.665429e-01 [206] 4.023964e-02 -7.243205e-01 -1.846713e-01 -6.746372e-01 4.403831e-02 [211] -1.672768e-01 -4.133771e-01 2.760969e-01 3.144072e-01 -3.610827e-02 [216] -1.044441e-03 -4.358489e-01 -4.707990e-01 -3.511597e-01 4.370851e-01 [221] -6.505212e-01 2.493782e-01 6.108882e-01 -5.016879e-02 3.861832e-01 [226] 3.333488e-01 1.157376e-01 -3.281865e-01 -3.790502e-01 -4.224244e-01 > > proc.time() user system elapsed 1.990 8.482 11.026
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.3 (2025-02-28) -- "Trophy Case" 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: 0x600002cac000> > .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: 0x600002cac000> > .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: 0x600002cac000> > .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: 0x600002cac000> > 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: 0x600002cb01e0> > .Call("R_bm_AddColumn",P) <pointer: 0x600002cb01e0> > .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: 0x600002cb01e0> > .Call("R_bm_AddColumn",P) <pointer: 0x600002cb01e0> > .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: 0x600002cb01e0> > 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: 0x600002cbc0c0> > .Call("R_bm_AddColumn",P) <pointer: 0x600002cbc0c0> > .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: 0x600002cbc0c0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600002cbc0c0> > .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: 0x600002cbc0c0> > > .Call("R_bm_RowMode",P) <pointer: 0x600002cbc0c0> > .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: 0x600002cbc0c0> > > .Call("R_bm_ColMode",P) <pointer: 0x600002cbc0c0> > .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: 0x600002cbc0c0> > 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: 0x600002ca0660> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600002ca0660> > .Call("R_bm_AddColumn",P) <pointer: 0x600002ca0660> > .Call("R_bm_AddColumn",P) <pointer: 0x600002ca0660> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile103c353ca1ad7" "BufferedMatrixFile103c379a8443a" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile103c353ca1ad7" "BufferedMatrixFile103c379a8443a" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600002ca0900> > .Call("R_bm_AddColumn",P) <pointer: 0x600002ca0900> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600002ca0900> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600002ca0900> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600002ca0900> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600002ca0900> > .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: 0x600002ca0ae0> > .Call("R_bm_AddColumn",P) <pointer: 0x600002ca0ae0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600002ca0ae0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600002ca0ae0> > 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: 0x600002ca81e0> > .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: 0x600002ca81e0> > rm(P) > > proc.time() user system elapsed 0.344 0.115 0.448
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.3 (2025-02-28) -- "Trophy Case" 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.328 0.087 0.414