Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2025-03-10 12:08 -0400 (Mon, 10 Mar 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" | 4670 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.3 (2025-02-28 ucrt) -- "Trophy Case" | 4355 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4446 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4439 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4306 |
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-03-07 00:49:01 -0500 (Fri, 07 Mar 2025) |
EndedAt: 2025-03-07 00:50:13 -0500 (Fri, 07 Mar 2025) |
EllapsedTime: 71.4 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: x86_64-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 Monterey 12.7.6 * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.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 14.0.0 (clang-1400.0.29.202)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking sizes of PDF files under ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.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-x86_64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.4.3 (2025-02-28) -- "Trophy Case" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.565 0.204 0.738
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: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/Users/biocbuild/bbs-3.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 473668 25.3 1034025 55.3 NA 638622 34.2 Vcells 877290 6.7 8388608 64.0 65536 2072022 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] "Fri Mar 7 00:49:35 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Mar 7 00:49:35 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: 0x60000102c0c0> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Mar 7 00:49:41 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Mar 7 00:49:44 2025" > > ColMode(tmp2) <pointer: 0x60000102c0c0> > > > > ### 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,] 97.4388558 -0.77467443 1.2664615 -0.6021355 [2,] -0.8047801 0.42012236 -1.7324266 -0.2646728 [3,] -0.1706764 -0.07325552 -1.5805428 -1.5617666 [4,] -0.8850083 0.33027993 -0.8162203 1.4419546 > 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,] 97.4388558 0.77467443 1.2664615 0.6021355 [2,] 0.8047801 0.42012236 1.7324266 0.2646728 [3,] 0.1706764 0.07325552 1.5805428 1.5617666 [4,] 0.8850083 0.33027993 0.8162203 1.4419546 > 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,] 9.8711122 0.8801559 1.1253717 0.7759739 [2,] 0.8970953 0.6481685 1.3162168 0.5144636 [3,] 0.4131300 0.2706576 1.2571964 1.2497066 [4,] 0.9407488 0.5746999 0.9034491 1.2008142 > > 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,] 221.14998 34.57623 37.52018 33.36187 [2,] 34.77573 31.90181 39.89459 30.40931 [3,] 29.30198 27.77983 39.15251 39.05883 [4,] 35.29250 31.07728 34.85071 38.45010 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600001004240> > exp(tmp5) <pointer: 0x600001004240> > log(tmp5,2) <pointer: 0x600001004240> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 460.2947 > Min(tmp5) [1] 54.97839 > mean(tmp5) [1] 72.73597 > Sum(tmp5) [1] 14547.19 > Var(tmp5) [1] 831.3516 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 92.33256 69.88314 69.46820 69.23616 68.88636 70.64145 69.70550 75.03739 [9] 70.88150 71.28740 > rowSums(tmp5) [1] 1846.651 1397.663 1389.364 1384.723 1377.727 1412.829 1394.110 1500.748 [9] 1417.630 1425.748 > rowVars(tmp5) [1] 7544.56285 41.75105 77.17041 79.35967 47.58794 136.99299 [7] 97.16557 96.32538 56.64932 51.52111 > rowSd(tmp5) [1] 86.859443 6.461506 8.784669 8.908405 6.898402 11.704401 9.857260 [8] 9.814549 7.526574 7.177820 > rowMax(tmp5) [1] 460.29470 83.03537 83.29501 88.71077 78.59686 95.40615 84.68456 [8] 94.09357 81.41195 87.52274 > rowMin(tmp5) [1] 61.96697 60.17677 57.82008 56.86517 55.80415 54.97839 56.01236 56.35677 [9] 58.24059 60.25682 > > colMeans(tmp5) [1] 107.42559 65.70334 74.76081 70.72168 71.43195 72.49416 74.19023 [8] 70.18874 74.66286 72.65503 69.06325 71.39429 69.89233 73.43948 [15] 68.03027 72.81315 66.14357 67.23434 69.56127 72.91295 > colSums(tmp5) [1] 1074.2559 657.0334 747.6081 707.2168 714.3195 724.9416 741.9023 [8] 701.8874 746.6286 726.5503 690.6325 713.9429 698.9233 734.3948 [15] 680.3027 728.1315 661.4357 672.3434 695.6127 729.1295 > colVars(tmp5) [1] 15405.01433 61.26900 135.25726 36.71492 67.64056 68.85514 [7] 67.14170 53.43266 120.83654 66.72758 110.38926 96.51854 [13] 48.31697 111.96315 74.81796 42.74003 33.16816 40.62783 [19] 68.46665 111.18228 > colSd(tmp5) [1] 124.116938 7.827451 11.630015 6.059284 8.224388 8.297900 [7] 8.194004 7.309765 10.992567 8.168695 10.506629 9.824385 [13] 6.951041 10.581264 8.649737 6.537586 5.759181 6.373996 [19] 8.274457 10.544301 > colMax(tmp5) [1] 460.29470 80.52918 95.40615 81.29584 83.23260 83.67441 89.62536 [8] 79.71270 94.09357 82.94095 85.79500 87.52274 82.13372 89.19781 [15] 81.72724 84.68456 71.96123 77.10241 80.29839 88.71077 > colMin(tmp5) [1] 60.98823 56.58773 56.35677 62.78356 58.28366 56.01236 58.94072 59.48718 [9] 54.97839 61.28388 56.86517 59.84855 61.96697 59.50993 58.24059 64.07498 [17] 55.80415 56.08653 58.85611 56.99034 > > > ### 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] 92.33256 69.88314 NA 69.23616 68.88636 70.64145 69.70550 75.03739 [9] 70.88150 71.28740 > rowSums(tmp5) [1] 1846.651 1397.663 NA 1384.723 1377.727 1412.829 1394.110 1500.748 [9] 1417.630 1425.748 > rowVars(tmp5) [1] 7544.56285 41.75105 81.44597 79.35967 47.58794 136.99299 [7] 97.16557 96.32538 56.64932 51.52111 > rowSd(tmp5) [1] 86.859443 6.461506 9.024742 8.908405 6.898402 11.704401 9.857260 [8] 9.814549 7.526574 7.177820 > rowMax(tmp5) [1] 460.29470 83.03537 NA 88.71077 78.59686 95.40615 84.68456 [8] 94.09357 81.41195 87.52274 > rowMin(tmp5) [1] 61.96697 60.17677 NA 56.86517 55.80415 54.97839 56.01236 56.35677 [9] 58.24059 60.25682 > > colMeans(tmp5) [1] 107.42559 65.70334 74.76081 70.72168 71.43195 72.49416 74.19023 [8] 70.18874 74.66286 72.65503 69.06325 71.39429 69.89233 73.43948 [15] 68.03027 72.81315 66.14357 NA 69.56127 72.91295 > colSums(tmp5) [1] 1074.2559 657.0334 747.6081 707.2168 714.3195 724.9416 741.9023 [8] 701.8874 746.6286 726.5503 690.6325 713.9429 698.9233 734.3948 [15] 680.3027 728.1315 661.4357 NA 695.6127 729.1295 > colVars(tmp5) [1] 15405.01433 61.26900 135.25726 36.71492 67.64056 68.85514 [7] 67.14170 53.43266 120.83654 66.72758 110.38926 96.51854 [13] 48.31697 111.96315 74.81796 42.74003 33.16816 NA [19] 68.46665 111.18228 > colSd(tmp5) [1] 124.116938 7.827451 11.630015 6.059284 8.224388 8.297900 [7] 8.194004 7.309765 10.992567 8.168695 10.506629 9.824385 [13] 6.951041 10.581264 8.649737 6.537586 5.759181 NA [19] 8.274457 10.544301 > colMax(tmp5) [1] 460.29470 80.52918 95.40615 81.29584 83.23260 83.67441 89.62536 [8] 79.71270 94.09357 82.94095 85.79500 87.52274 82.13372 89.19781 [15] 81.72724 84.68456 71.96123 NA 80.29839 88.71077 > colMin(tmp5) [1] 60.98823 56.58773 56.35677 62.78356 58.28366 56.01236 58.94072 59.48718 [9] 54.97839 61.28388 56.86517 59.84855 61.96697 59.50993 58.24059 64.07498 [17] 55.80415 NA 58.85611 56.99034 > > Max(tmp5,na.rm=TRUE) [1] 460.2947 > Min(tmp5,na.rm=TRUE) [1] 54.97839 > mean(tmp5,na.rm=TRUE) [1] 72.75463 > Sum(tmp5,na.rm=TRUE) [1] 14478.17 > Var(tmp5,na.rm=TRUE) [1] 835.4803 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.33256 69.88314 69.49173 69.23616 68.88636 70.64145 69.70550 75.03739 [9] 70.88150 71.28740 > rowSums(tmp5,na.rm=TRUE) [1] 1846.651 1397.663 1320.343 1384.723 1377.727 1412.829 1394.110 1500.748 [9] 1417.630 1425.748 > rowVars(tmp5,na.rm=TRUE) [1] 7544.56285 41.75105 81.44597 79.35967 47.58794 136.99299 [7] 97.16557 96.32538 56.64932 51.52111 > rowSd(tmp5,na.rm=TRUE) [1] 86.859443 6.461506 9.024742 8.908405 6.898402 11.704401 9.857260 [8] 9.814549 7.526574 7.177820 > rowMax(tmp5,na.rm=TRUE) [1] 460.29470 83.03537 83.29501 88.71077 78.59686 95.40615 84.68456 [8] 94.09357 81.41195 87.52274 > rowMin(tmp5,na.rm=TRUE) [1] 61.96697 60.17677 57.82008 56.86517 55.80415 54.97839 56.01236 56.35677 [9] 58.24059 60.25682 > > colMeans(tmp5,na.rm=TRUE) [1] 107.42559 65.70334 74.76081 70.72168 71.43195 72.49416 74.19023 [8] 70.18874 74.66286 72.65503 69.06325 71.39429 69.89233 73.43948 [15] 68.03027 72.81315 66.14357 67.03582 69.56127 72.91295 > colSums(tmp5,na.rm=TRUE) [1] 1074.2559 657.0334 747.6081 707.2168 714.3195 724.9416 741.9023 [8] 701.8874 746.6286 726.5503 690.6325 713.9429 698.9233 734.3948 [15] 680.3027 728.1315 661.4357 603.3224 695.6127 729.1295 > colVars(tmp5,na.rm=TRUE) [1] 15405.01433 61.26900 135.25726 36.71492 67.64056 68.85514 [7] 67.14170 53.43266 120.83654 66.72758 110.38926 96.51854 [13] 48.31697 111.96315 74.81796 42.74003 33.16816 45.26292 [19] 68.46665 111.18228 > colSd(tmp5,na.rm=TRUE) [1] 124.116938 7.827451 11.630015 6.059284 8.224388 8.297900 [7] 8.194004 7.309765 10.992567 8.168695 10.506629 9.824385 [13] 6.951041 10.581264 8.649737 6.537586 5.759181 6.727772 [19] 8.274457 10.544301 > colMax(tmp5,na.rm=TRUE) [1] 460.29470 80.52918 95.40615 81.29584 83.23260 83.67441 89.62536 [8] 79.71270 94.09357 82.94095 85.79500 87.52274 82.13372 89.19781 [15] 81.72724 84.68456 71.96123 77.10241 80.29839 88.71077 > colMin(tmp5,na.rm=TRUE) [1] 60.98823 56.58773 56.35677 62.78356 58.28366 56.01236 58.94072 59.48718 [9] 54.97839 61.28388 56.86517 59.84855 61.96697 59.50993 58.24059 64.07498 [17] 55.80415 56.08653 58.85611 56.99034 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 92.33256 69.88314 NaN 69.23616 68.88636 70.64145 69.70550 75.03739 [9] 70.88150 71.28740 > rowSums(tmp5,na.rm=TRUE) [1] 1846.651 1397.663 0.000 1384.723 1377.727 1412.829 1394.110 1500.748 [9] 1417.630 1425.748 > rowVars(tmp5,na.rm=TRUE) [1] 7544.56285 41.75105 NA 79.35967 47.58794 136.99299 [7] 97.16557 96.32538 56.64932 51.52111 > rowSd(tmp5,na.rm=TRUE) [1] 86.859443 6.461506 NA 8.908405 6.898402 11.704401 9.857260 [8] 9.814549 7.526574 7.177820 > rowMax(tmp5,na.rm=TRUE) [1] 460.29470 83.03537 NA 88.71077 78.59686 95.40615 84.68456 [8] 94.09357 81.41195 87.52274 > rowMin(tmp5,na.rm=TRUE) [1] 61.96697 60.17677 NA 56.86517 55.80415 54.97839 56.01236 56.35677 [9] 58.24059 60.25682 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 112.58529 66.57926 74.01303 69.54677 72.89287 72.41806 74.66785 [8] 71.37780 73.70373 71.56504 68.18843 71.40802 69.79880 74.81749 [15] 67.70939 72.39466 66.51239 NaN 70.45646 74.30985 > colSums(tmp5,na.rm=TRUE) [1] 1013.2677 599.2133 666.1173 625.9209 656.0359 651.7625 672.0107 [8] 642.4002 663.3336 644.0854 613.6959 642.6721 628.1892 673.3574 [15] 609.3845 651.5519 598.6115 0.0000 634.1081 668.7887 > colVars(tmp5,na.rm=TRUE) [1] 17031.13714 60.29626 145.87373 25.77471 52.08485 77.39688 [7] 72.96801 44.20572 125.59195 61.70280 115.57808 108.58124 [13] 54.25817 104.59594 83.01183 46.11220 35.78387 NA [19] 68.00972 103.12751 > colSd(tmp5,na.rm=TRUE) [1] 130.503399 7.765067 12.077820 5.076880 7.216983 8.797550 [7] 8.542131 6.648738 11.206781 7.855113 10.750725 10.420232 [13] 7.366015 10.227216 9.111083 6.790596 5.981962 NA [19] 8.246801 10.155172 > colMax(tmp5,na.rm=TRUE) [1] 460.29470 80.52918 95.40615 80.02884 83.23260 83.67441 89.62536 [8] 79.71270 94.09357 82.94095 85.79500 87.52274 82.13372 89.19781 [15] 81.72724 84.68456 71.96123 -Inf 80.29839 88.71077 > colMin(tmp5,na.rm=TRUE) [1] 62.20532 56.58773 56.35677 62.78356 63.38014 56.01236 58.94072 60.09149 [9] 54.97839 61.28388 56.86517 59.84855 61.96697 59.50993 58.24059 64.07498 [17] 55.80415 Inf 58.85611 56.99034 > > > > > 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] 194.8962 124.0193 111.4950 159.4003 277.6835 267.9167 425.4801 143.6383 [9] 213.3794 221.0630 > apply(copymatrix,1,var,na.rm=TRUE) [1] 194.8962 124.0193 111.4950 159.4003 277.6835 267.9167 425.4801 143.6383 [9] 213.3794 221.0630 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 0.000000e+00 1.136868e-13 -3.979039e-13 -2.842171e-14 -2.273737e-13 [6] 0.000000e+00 -1.136868e-13 1.421085e-13 5.684342e-14 -5.684342e-14 [11] -2.273737e-13 -5.684342e-14 2.842171e-14 2.842171e-14 -1.705303e-13 [16] -1.421085e-14 -1.136868e-13 -1.136868e-13 1.421085e-14 1.136868e-13 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 6 1 8 11 5 14 10 17 9 19 6 15 6 4 6 2 9 18 7 2 8 17 7 11 9 1 3 13 3 15 8 17 6 8 4 3 2 11 7 1 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.645865 > Min(tmp) [1] -2.532271 > mean(tmp) [1] -0.0009510444 > Sum(tmp) [1] -0.09510444 > Var(tmp) [1] 1.196717 > > rowMeans(tmp) [1] -0.0009510444 > rowSums(tmp) [1] -0.09510444 > rowVars(tmp) [1] 1.196717 > rowSd(tmp) [1] 1.093945 > rowMax(tmp) [1] 2.645865 > rowMin(tmp) [1] -2.532271 > > colMeans(tmp) [1] 1.51828066 1.48521745 -0.22322694 -0.77581862 0.38762454 1.55534112 [7] 0.13677347 -0.28982558 -1.33574044 2.08358215 -0.87114091 0.11894878 [13] -1.72458537 1.69607910 -0.10303304 0.20156258 0.40755657 -1.27335565 [19] -1.28160726 -1.48204829 0.73578346 -0.53774296 -0.31602469 -1.00855381 [25] 2.64586538 -1.12724739 -0.35672006 1.75625516 1.44217360 0.04931476 [31] -0.34186388 -0.04697666 2.01334976 1.01421014 0.62281850 -1.44116786 [37] 0.03363688 -0.04703176 -1.58869509 -1.63883299 0.90319579 1.27198730 [43] -0.86423106 -1.60589459 -0.19835455 -0.48514726 -0.75435564 0.82481012 [49] 0.71860404 0.53176187 -0.13797285 -0.50769089 -1.21795559 -1.58195113 [55] 1.68230468 0.25469689 -0.60299633 0.54405443 -0.75486128 0.50725782 [61] -0.91730171 -2.12828740 0.23746268 -0.82954683 0.90847917 0.87123795 [67] -0.65903105 -2.53227131 -0.50041031 0.79989957 -0.84525749 0.07815628 [73] 0.67563174 -0.52475259 0.20972425 0.58149897 0.15204539 -0.68720593 [79] 1.46639807 0.45507292 -1.38601937 0.63054412 -1.95938733 1.01632694 [85] 0.82395169 -0.04671029 0.84994210 -0.73207083 -1.92584121 0.65061254 [91] -0.15279124 1.07222466 -0.22872572 1.14774161 -1.28967522 2.26148850 [97] -0.20053142 -0.77558080 1.19620316 1.52125472 > colSums(tmp) [1] 1.51828066 1.48521745 -0.22322694 -0.77581862 0.38762454 1.55534112 [7] 0.13677347 -0.28982558 -1.33574044 2.08358215 -0.87114091 0.11894878 [13] -1.72458537 1.69607910 -0.10303304 0.20156258 0.40755657 -1.27335565 [19] -1.28160726 -1.48204829 0.73578346 -0.53774296 -0.31602469 -1.00855381 [25] 2.64586538 -1.12724739 -0.35672006 1.75625516 1.44217360 0.04931476 [31] -0.34186388 -0.04697666 2.01334976 1.01421014 0.62281850 -1.44116786 [37] 0.03363688 -0.04703176 -1.58869509 -1.63883299 0.90319579 1.27198730 [43] -0.86423106 -1.60589459 -0.19835455 -0.48514726 -0.75435564 0.82481012 [49] 0.71860404 0.53176187 -0.13797285 -0.50769089 -1.21795559 -1.58195113 [55] 1.68230468 0.25469689 -0.60299633 0.54405443 -0.75486128 0.50725782 [61] -0.91730171 -2.12828740 0.23746268 -0.82954683 0.90847917 0.87123795 [67] -0.65903105 -2.53227131 -0.50041031 0.79989957 -0.84525749 0.07815628 [73] 0.67563174 -0.52475259 0.20972425 0.58149897 0.15204539 -0.68720593 [79] 1.46639807 0.45507292 -1.38601937 0.63054412 -1.95938733 1.01632694 [85] 0.82395169 -0.04671029 0.84994210 -0.73207083 -1.92584121 0.65061254 [91] -0.15279124 1.07222466 -0.22872572 1.14774161 -1.28967522 2.26148850 [97] -0.20053142 -0.77558080 1.19620316 1.52125472 > 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.51828066 1.48521745 -0.22322694 -0.77581862 0.38762454 1.55534112 [7] 0.13677347 -0.28982558 -1.33574044 2.08358215 -0.87114091 0.11894878 [13] -1.72458537 1.69607910 -0.10303304 0.20156258 0.40755657 -1.27335565 [19] -1.28160726 -1.48204829 0.73578346 -0.53774296 -0.31602469 -1.00855381 [25] 2.64586538 -1.12724739 -0.35672006 1.75625516 1.44217360 0.04931476 [31] -0.34186388 -0.04697666 2.01334976 1.01421014 0.62281850 -1.44116786 [37] 0.03363688 -0.04703176 -1.58869509 -1.63883299 0.90319579 1.27198730 [43] -0.86423106 -1.60589459 -0.19835455 -0.48514726 -0.75435564 0.82481012 [49] 0.71860404 0.53176187 -0.13797285 -0.50769089 -1.21795559 -1.58195113 [55] 1.68230468 0.25469689 -0.60299633 0.54405443 -0.75486128 0.50725782 [61] -0.91730171 -2.12828740 0.23746268 -0.82954683 0.90847917 0.87123795 [67] -0.65903105 -2.53227131 -0.50041031 0.79989957 -0.84525749 0.07815628 [73] 0.67563174 -0.52475259 0.20972425 0.58149897 0.15204539 -0.68720593 [79] 1.46639807 0.45507292 -1.38601937 0.63054412 -1.95938733 1.01632694 [85] 0.82395169 -0.04671029 0.84994210 -0.73207083 -1.92584121 0.65061254 [91] -0.15279124 1.07222466 -0.22872572 1.14774161 -1.28967522 2.26148850 [97] -0.20053142 -0.77558080 1.19620316 1.52125472 > colMin(tmp) [1] 1.51828066 1.48521745 -0.22322694 -0.77581862 0.38762454 1.55534112 [7] 0.13677347 -0.28982558 -1.33574044 2.08358215 -0.87114091 0.11894878 [13] -1.72458537 1.69607910 -0.10303304 0.20156258 0.40755657 -1.27335565 [19] -1.28160726 -1.48204829 0.73578346 -0.53774296 -0.31602469 -1.00855381 [25] 2.64586538 -1.12724739 -0.35672006 1.75625516 1.44217360 0.04931476 [31] -0.34186388 -0.04697666 2.01334976 1.01421014 0.62281850 -1.44116786 [37] 0.03363688 -0.04703176 -1.58869509 -1.63883299 0.90319579 1.27198730 [43] -0.86423106 -1.60589459 -0.19835455 -0.48514726 -0.75435564 0.82481012 [49] 0.71860404 0.53176187 -0.13797285 -0.50769089 -1.21795559 -1.58195113 [55] 1.68230468 0.25469689 -0.60299633 0.54405443 -0.75486128 0.50725782 [61] -0.91730171 -2.12828740 0.23746268 -0.82954683 0.90847917 0.87123795 [67] -0.65903105 -2.53227131 -0.50041031 0.79989957 -0.84525749 0.07815628 [73] 0.67563174 -0.52475259 0.20972425 0.58149897 0.15204539 -0.68720593 [79] 1.46639807 0.45507292 -1.38601937 0.63054412 -1.95938733 1.01632694 [85] 0.82395169 -0.04671029 0.84994210 -0.73207083 -1.92584121 0.65061254 [91] -0.15279124 1.07222466 -0.22872572 1.14774161 -1.28967522 2.26148850 [97] -0.20053142 -0.77558080 1.19620316 1.52125472 > colMedians(tmp) [1] 1.51828066 1.48521745 -0.22322694 -0.77581862 0.38762454 1.55534112 [7] 0.13677347 -0.28982558 -1.33574044 2.08358215 -0.87114091 0.11894878 [13] -1.72458537 1.69607910 -0.10303304 0.20156258 0.40755657 -1.27335565 [19] -1.28160726 -1.48204829 0.73578346 -0.53774296 -0.31602469 -1.00855381 [25] 2.64586538 -1.12724739 -0.35672006 1.75625516 1.44217360 0.04931476 [31] -0.34186388 -0.04697666 2.01334976 1.01421014 0.62281850 -1.44116786 [37] 0.03363688 -0.04703176 -1.58869509 -1.63883299 0.90319579 1.27198730 [43] -0.86423106 -1.60589459 -0.19835455 -0.48514726 -0.75435564 0.82481012 [49] 0.71860404 0.53176187 -0.13797285 -0.50769089 -1.21795559 -1.58195113 [55] 1.68230468 0.25469689 -0.60299633 0.54405443 -0.75486128 0.50725782 [61] -0.91730171 -2.12828740 0.23746268 -0.82954683 0.90847917 0.87123795 [67] -0.65903105 -2.53227131 -0.50041031 0.79989957 -0.84525749 0.07815628 [73] 0.67563174 -0.52475259 0.20972425 0.58149897 0.15204539 -0.68720593 [79] 1.46639807 0.45507292 -1.38601937 0.63054412 -1.95938733 1.01632694 [85] 0.82395169 -0.04671029 0.84994210 -0.73207083 -1.92584121 0.65061254 [91] -0.15279124 1.07222466 -0.22872572 1.14774161 -1.28967522 2.26148850 [97] -0.20053142 -0.77558080 1.19620316 1.52125472 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.518281 1.485217 -0.2232269 -0.7758186 0.3876245 1.555341 0.1367735 [2,] 1.518281 1.485217 -0.2232269 -0.7758186 0.3876245 1.555341 0.1367735 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.2898256 -1.33574 2.083582 -0.8711409 0.1189488 -1.724585 1.696079 [2,] -0.2898256 -1.33574 2.083582 -0.8711409 0.1189488 -1.724585 1.696079 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.103033 0.2015626 0.4075566 -1.273356 -1.281607 -1.482048 0.7357835 [2,] -0.103033 0.2015626 0.4075566 -1.273356 -1.281607 -1.482048 0.7357835 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.537743 -0.3160247 -1.008554 2.645865 -1.127247 -0.3567201 1.756255 [2,] -0.537743 -0.3160247 -1.008554 2.645865 -1.127247 -0.3567201 1.756255 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 1.442174 0.04931476 -0.3418639 -0.04697666 2.01335 1.01421 0.6228185 [2,] 1.442174 0.04931476 -0.3418639 -0.04697666 2.01335 1.01421 0.6228185 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.441168 0.03363688 -0.04703176 -1.588695 -1.638833 0.9031958 1.271987 [2,] -1.441168 0.03363688 -0.04703176 -1.588695 -1.638833 0.9031958 1.271987 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.8642311 -1.605895 -0.1983546 -0.4851473 -0.7543556 0.8248101 0.718604 [2,] -0.8642311 -1.605895 -0.1983546 -0.4851473 -0.7543556 0.8248101 0.718604 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.5317619 -0.1379729 -0.5076909 -1.217956 -1.581951 1.682305 0.2546969 [2,] 0.5317619 -0.1379729 -0.5076909 -1.217956 -1.581951 1.682305 0.2546969 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.6029963 0.5440544 -0.7548613 0.5072578 -0.9173017 -2.128287 0.2374627 [2,] -0.6029963 0.5440544 -0.7548613 0.5072578 -0.9173017 -2.128287 0.2374627 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.8295468 0.9084792 0.8712379 -0.6590311 -2.532271 -0.5004103 0.7998996 [2,] -0.8295468 0.9084792 0.8712379 -0.6590311 -2.532271 -0.5004103 0.7998996 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.8452575 0.07815628 0.6756317 -0.5247526 0.2097243 0.581499 0.1520454 [2,] -0.8452575 0.07815628 0.6756317 -0.5247526 0.2097243 0.581499 0.1520454 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.6872059 1.466398 0.4550729 -1.386019 0.6305441 -1.959387 1.016327 [2,] -0.6872059 1.466398 0.4550729 -1.386019 0.6305441 -1.959387 1.016327 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.8239517 -0.04671029 0.8499421 -0.7320708 -1.925841 0.6506125 -0.1527912 [2,] 0.8239517 -0.04671029 0.8499421 -0.7320708 -1.925841 0.6506125 -0.1527912 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 1.072225 -0.2287257 1.147742 -1.289675 2.261489 -0.2005314 -0.7755808 [2,] 1.072225 -0.2287257 1.147742 -1.289675 2.261489 -0.2005314 -0.7755808 [,99] [,100] [1,] 1.196203 1.521255 [2,] 1.196203 1.521255 > > > Max(tmp2) [1] 2.03729 > Min(tmp2) [1] -3.164874 > mean(tmp2) [1] -0.2421573 > Sum(tmp2) [1] -24.21573 > Var(tmp2) [1] 0.9859068 > > rowMeans(tmp2) [1] -1.005133884 -1.348803501 -0.797577827 -0.502505689 -0.418332543 [6] -0.093111206 0.408976103 0.643875496 -0.717509086 1.129830298 [11] 0.537536849 0.633171278 -0.714925001 0.093277084 0.386864701 [16] 0.026401661 -0.025215252 -1.494081486 0.705764506 -1.777967275 [21] 0.833022371 -1.015428839 -0.734671931 0.874542073 -0.501626583 [26] -0.109079327 -1.173238433 -1.036119240 -1.821461845 -0.723086588 [31] -0.810370971 1.311700844 -1.374955997 1.947475231 -0.918173684 [36] -1.731990143 -0.421880570 0.777037806 0.197993370 -0.082767491 [41] -0.871843636 -0.753060340 -0.918497345 -2.111382209 1.591474995 [46] 1.128843346 -0.617021480 0.796075174 -1.417666057 1.192182129 [51] -0.329377736 -2.339813921 2.037289772 -0.096759487 -0.203824360 [56] 0.147979371 1.638957286 -0.495124819 0.351567239 -0.091611820 [61] -0.329704681 -1.929233845 0.051533095 0.037454812 -0.477863919 [66] -0.836022353 -0.419012918 -1.958850353 0.755243499 -1.110235350 [71] -0.819126830 0.274986094 1.311093123 0.209968163 0.537717537 [76] -0.746730693 -3.164874265 0.164559165 -0.451622934 -0.307799777 [81] -1.277487746 -0.338390196 0.474794909 1.173682110 -0.042481618 [86] 0.549989606 -0.008400437 -0.390258206 -1.992265353 0.016006423 [91] -0.739685961 -0.326404127 -0.606635461 0.270618463 0.872492502 [96] 0.420181101 0.762384845 -1.589847447 -1.173606419 1.142262930 > rowSums(tmp2) [1] -1.005133884 -1.348803501 -0.797577827 -0.502505689 -0.418332543 [6] -0.093111206 0.408976103 0.643875496 -0.717509086 1.129830298 [11] 0.537536849 0.633171278 -0.714925001 0.093277084 0.386864701 [16] 0.026401661 -0.025215252 -1.494081486 0.705764506 -1.777967275 [21] 0.833022371 -1.015428839 -0.734671931 0.874542073 -0.501626583 [26] -0.109079327 -1.173238433 -1.036119240 -1.821461845 -0.723086588 [31] -0.810370971 1.311700844 -1.374955997 1.947475231 -0.918173684 [36] -1.731990143 -0.421880570 0.777037806 0.197993370 -0.082767491 [41] -0.871843636 -0.753060340 -0.918497345 -2.111382209 1.591474995 [46] 1.128843346 -0.617021480 0.796075174 -1.417666057 1.192182129 [51] -0.329377736 -2.339813921 2.037289772 -0.096759487 -0.203824360 [56] 0.147979371 1.638957286 -0.495124819 0.351567239 -0.091611820 [61] -0.329704681 -1.929233845 0.051533095 0.037454812 -0.477863919 [66] -0.836022353 -0.419012918 -1.958850353 0.755243499 -1.110235350 [71] -0.819126830 0.274986094 1.311093123 0.209968163 0.537717537 [76] -0.746730693 -3.164874265 0.164559165 -0.451622934 -0.307799777 [81] -1.277487746 -0.338390196 0.474794909 1.173682110 -0.042481618 [86] 0.549989606 -0.008400437 -0.390258206 -1.992265353 0.016006423 [91] -0.739685961 -0.326404127 -0.606635461 0.270618463 0.872492502 [96] 0.420181101 0.762384845 -1.589847447 -1.173606419 1.142262930 > rowVars(tmp2) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > rowSd(tmp2) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > rowMax(tmp2) [1] -1.005133884 -1.348803501 -0.797577827 -0.502505689 -0.418332543 [6] -0.093111206 0.408976103 0.643875496 -0.717509086 1.129830298 [11] 0.537536849 0.633171278 -0.714925001 0.093277084 0.386864701 [16] 0.026401661 -0.025215252 -1.494081486 0.705764506 -1.777967275 [21] 0.833022371 -1.015428839 -0.734671931 0.874542073 -0.501626583 [26] -0.109079327 -1.173238433 -1.036119240 -1.821461845 -0.723086588 [31] -0.810370971 1.311700844 -1.374955997 1.947475231 -0.918173684 [36] -1.731990143 -0.421880570 0.777037806 0.197993370 -0.082767491 [41] -0.871843636 -0.753060340 -0.918497345 -2.111382209 1.591474995 [46] 1.128843346 -0.617021480 0.796075174 -1.417666057 1.192182129 [51] -0.329377736 -2.339813921 2.037289772 -0.096759487 -0.203824360 [56] 0.147979371 1.638957286 -0.495124819 0.351567239 -0.091611820 [61] -0.329704681 -1.929233845 0.051533095 0.037454812 -0.477863919 [66] -0.836022353 -0.419012918 -1.958850353 0.755243499 -1.110235350 [71] -0.819126830 0.274986094 1.311093123 0.209968163 0.537717537 [76] -0.746730693 -3.164874265 0.164559165 -0.451622934 -0.307799777 [81] -1.277487746 -0.338390196 0.474794909 1.173682110 -0.042481618 [86] 0.549989606 -0.008400437 -0.390258206 -1.992265353 0.016006423 [91] -0.739685961 -0.326404127 -0.606635461 0.270618463 0.872492502 [96] 0.420181101 0.762384845 -1.589847447 -1.173606419 1.142262930 > rowMin(tmp2) [1] -1.005133884 -1.348803501 -0.797577827 -0.502505689 -0.418332543 [6] -0.093111206 0.408976103 0.643875496 -0.717509086 1.129830298 [11] 0.537536849 0.633171278 -0.714925001 0.093277084 0.386864701 [16] 0.026401661 -0.025215252 -1.494081486 0.705764506 -1.777967275 [21] 0.833022371 -1.015428839 -0.734671931 0.874542073 -0.501626583 [26] -0.109079327 -1.173238433 -1.036119240 -1.821461845 -0.723086588 [31] -0.810370971 1.311700844 -1.374955997 1.947475231 -0.918173684 [36] -1.731990143 -0.421880570 0.777037806 0.197993370 -0.082767491 [41] -0.871843636 -0.753060340 -0.918497345 -2.111382209 1.591474995 [46] 1.128843346 -0.617021480 0.796075174 -1.417666057 1.192182129 [51] -0.329377736 -2.339813921 2.037289772 -0.096759487 -0.203824360 [56] 0.147979371 1.638957286 -0.495124819 0.351567239 -0.091611820 [61] -0.329704681 -1.929233845 0.051533095 0.037454812 -0.477863919 [66] -0.836022353 -0.419012918 -1.958850353 0.755243499 -1.110235350 [71] -0.819126830 0.274986094 1.311093123 0.209968163 0.537717537 [76] -0.746730693 -3.164874265 0.164559165 -0.451622934 -0.307799777 [81] -1.277487746 -0.338390196 0.474794909 1.173682110 -0.042481618 [86] 0.549989606 -0.008400437 -0.390258206 -1.992265353 0.016006423 [91] -0.739685961 -0.326404127 -0.606635461 0.270618463 0.872492502 [96] 0.420181101 0.762384845 -1.589847447 -1.173606419 1.142262930 > > colMeans(tmp2) [1] -0.2421573 > colSums(tmp2) [1] -24.21573 > colVars(tmp2) [1] 0.9859068 > colSd(tmp2) [1] 0.9929284 > colMax(tmp2) [1] 2.03729 > colMin(tmp2) [1] -3.164874 > colMedians(tmp2) [1] -0.317102 > colRanges(tmp2) [,1] [1,] -3.164874 [2,] 2.037290 > > 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] -0.1650599 -2.0516222 -3.0877165 -2.5403330 4.7058823 -1.0852472 [7] 7.0566766 -0.7413669 -1.1138769 0.2417266 > colApply(tmp,quantile)[,1] [,1] [1,] -1.8191899 [2,] -0.4562777 [3,] -0.0429190 [4,] 0.5833595 [5,] 1.2066449 > > rowApply(tmp,sum) [1] -0.06346162 0.45724017 -0.81481043 -2.25920897 -3.05115562 0.44243235 [7] 0.40778878 0.10352051 3.89969716 2.09702054 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 4 5 7 6 9 8 5 2 9 [2,] 2 9 1 1 3 8 4 6 9 8 [3,] 5 3 9 8 1 6 10 1 1 4 [4,] 4 2 4 3 10 2 5 2 5 6 [5,] 8 6 10 10 4 1 6 10 7 5 [6,] 7 8 6 4 2 5 7 3 6 7 [7,] 10 7 7 9 7 10 9 9 3 3 [8,] 6 10 2 6 5 4 1 8 4 2 [9,] 9 5 3 5 8 3 2 4 10 1 [10,] 3 1 8 2 9 7 3 7 8 10 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.29934471 -1.56725752 2.25271477 0.30113407 -0.02134849 -0.56792977 [7] 1.17360058 1.91008873 -0.52278136 -3.77783735 1.64553594 -1.41103453 [13] -2.38541550 -1.21376765 -2.35716872 -2.10686793 4.64204826 -0.88646792 [19] -1.69431931 6.72394024 > colApply(tmp,quantile)[,1] [,1] [1,] -0.65336395 [2,] -0.59607922 [3,] -0.12168413 [4,] 0.09862321 [5,] 0.97315940 > > rowApply(tmp,sum) [1] 2.807852 2.294054 -8.822927 2.154166 1.404377 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 7 7 19 5 11 [2,] 9 3 10 7 9 [3,] 6 19 12 14 17 [4,] 11 17 5 12 15 [5,] 17 4 17 4 4 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.59607922 -0.1965555 -0.7098293 0.09897481 1.4799936 -0.5928251 [2,] -0.12168413 -0.7340628 1.4503654 0.69095285 -0.7274723 -0.0613301 [3,] 0.97315940 -0.3060086 -0.1353858 -1.39189693 0.6049981 0.1796821 [4,] -0.65336395 -0.1315685 0.4472720 0.36019578 -0.7186780 0.4391178 [5,] 0.09862321 -0.1990621 1.2002925 0.54290756 -0.6601900 -0.5325745 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.087604887 1.93019768 -1.3886710 1.8059128 0.3637613 -1.6406607 [2,] 1.081172995 0.06797604 0.1855954 -0.9630097 0.4596472 -0.3806050 [3,] -0.206275938 0.18163368 0.1356869 -1.7752778 0.1121616 -0.8877043 [4,] 0.008321881 0.33782817 0.8868067 -1.1419859 -0.3131711 1.0345477 [5,] 0.377986533 -0.60754683 -0.3421993 -1.7034768 1.0231369 0.4633878 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.4349816 -1.2812674 0.1699147 -0.73856860 1.1185518 0.6750732 [2,] -0.1800662 0.5242334 -0.0231393 0.44305805 1.8010256 -1.6934794 [3,] -1.5756533 -1.4298989 -1.8837681 -0.87410339 0.7639120 -1.3311949 [4,] -0.7358153 1.1066287 0.6824556 0.02333107 0.6646465 0.1168451 [5,] -0.3288623 -0.1334634 -1.3026317 -0.96058506 0.2939124 1.3462881 [,19] [,20] [1,] -0.8305848 2.7931366 [2,] 0.2398461 0.2350304 [3,] -1.1645313 1.1875389 [4,] -1.1566524 0.8974036 [5,] 1.2176031 1.6108308 > > > 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.9245402 -1.616581 0.1688395 0.3126752 0.9950846 0.9378148 1.418733 col8 col9 col10 col11 col12 col13 col14 row1 -0.4895485 -2.455889 0.7225626 0.07730532 -0.3498831 0.952001 1.99422 col15 col16 col17 col18 col19 col20 row1 -0.8400681 0.09379071 0.03324298 -1.00889 0.8367823 0.0446042 > tmp[,"col10"] col10 row1 0.7225626 row2 -0.5999263 row3 1.1016643 row4 0.1218069 row5 0.4666566 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.9245402 -1.6165806 0.1688395 0.3126752 0.9950846 0.9378148 1.418733 row5 -1.7691493 -0.2678134 -1.0170940 1.1542146 1.7613922 -0.4642274 1.146730 col8 col9 col10 col11 col12 col13 col14 row1 -0.48954846 -2.4558893 0.7225626 0.07730532 -0.3498831 0.9520010 1.994220 row5 -0.03018132 0.5265105 0.4666566 1.17700632 0.1786116 -0.4189373 0.634155 col15 col16 col17 col18 col19 col20 row1 -0.8400681 0.09379071 0.03324298 -1.0088896 0.83678233 0.0446042 row5 0.1686802 0.66527253 0.19399701 0.2725139 -0.02148932 1.2896257 > tmp[,c("col6","col20")] col6 col20 row1 0.9378148 0.0446042 row2 -2.1306485 -1.1681913 row3 -0.1839034 0.4800871 row4 0.2850236 2.3529262 row5 -0.4642274 1.2896257 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.9378148 0.0446042 row5 -0.4642274 1.2896257 > > > > > 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.67422 47.84846 49.81443 49.41083 48.90165 105.011 52.26934 50.67421 col9 col10 col11 col12 col13 col14 col15 col16 row1 53.26929 51.24744 50.08115 50.3943 50.1745 51.21428 49.88377 50.47611 col17 col18 col19 col20 row1 50.34011 50.6864 51.15071 105.5494 > tmp[,"col10"] col10 row1 51.24744 row2 30.30942 row3 30.55091 row4 30.71476 row5 49.99508 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.67422 47.84846 49.81443 49.41083 48.90165 105.0110 52.26934 50.67421 row5 49.22774 49.30596 49.26435 50.13192 49.07983 103.8927 49.83744 50.62532 col9 col10 col11 col12 col13 col14 col15 col16 row1 53.26929 51.24744 50.08115 50.3943 50.17450 51.21428 49.88377 50.47611 row5 52.36295 49.99508 49.80942 48.3272 48.78796 50.18298 51.85799 48.85504 col17 col18 col19 col20 row1 50.34011 50.68640 51.15071 105.5494 row5 50.11862 51.12882 51.01618 103.6509 > tmp[,c("col6","col20")] col6 col20 row1 105.01105 105.54937 row2 75.70479 74.71997 row3 75.37720 75.71297 row4 74.57536 73.96386 row5 103.89267 103.65093 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.0110 105.5494 row5 103.8927 103.6509 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.0110 105.5494 row5 103.8927 103.6509 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 1.03054717 [2,] 0.87541961 [3,] 0.68481590 [4,] -0.09863248 [5,] -0.12089834 > tmp[,c("col17","col7")] col17 col7 [1,] 2.3064328 -1.402599 [2,] -0.3427150 -1.359821 [3,] 0.1980103 -1.745451 [4,] 1.6690220 1.839102 [5,] -0.4986679 -0.857938 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.08432927 0.9799611 [2,] 0.57933322 -0.4836555 [3,] -0.45866660 -0.9223278 [4,] 0.70696900 -1.0780345 [5,] -1.02131468 0.4148471 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.08432927 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.08432927 [2,] 0.57933322 > > > > 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.6929251 -0.7117874 1.7084749 -0.7037267 -1.541930 -0.2620118 row1 0.3536584 -1.6064131 -0.7976848 -0.2614431 -1.508799 0.9526627 [,7] [,8] [,9] [,10] [,11] [,12] row3 -0.4318349 -0.3146192 -0.1295172 1.936382 0.1496203 1.00479839 row1 0.3593320 -0.6594527 1.1858092 -0.279936 -0.6610982 -0.03674867 [,13] [,14] [,15] [,16] [,17] [,18] row3 0.94095516 0.9265504 0.4933933 0.9705576 0.8571135 -1.2229376 row1 -0.09377871 -1.6293601 -0.8724512 -0.3219963 1.6902164 -0.6619866 [,19] [,20] row3 1.184275 1.5428174 row1 -1.107181 -0.2650378 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.3396806 -1.635183 -0.3274216 0.01082833 -1.174919 0.02831431 -0.2115179 [,8] [,9] [,10] row2 0.9816511 0.7958783 -1.526498 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.9507986 -0.7307125 0.4448222 0.3720649 -0.7991619 1.852786 0.9587114 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.364288 0.9808939 -0.6523906 -0.1067577 -0.5229334 -1.863432 -0.7544658 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.1085043 -1.499103 0.2171863 -0.004950007 -0.1832488 0.9599869 > > > 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: 0x600001040000> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe3619a21c" [2] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe4ce1f803" [3] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe761b464" [4] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe1f8a1505" [5] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe226a0b70" [6] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe6014f7b6" [7] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe92ff02" [8] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe32a3dc99" [9] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe23e7dac8" [10] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe4acc92e2" [11] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe3cbf59cb" [12] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe36a03d95" [13] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe522b1d37" [14] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbec8b3006" [15] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM10bbe5fde059" > > > ### 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: 0x6000010083c0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6000010083c0> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6000010083c0> > rowMedians(tmp) [1] -2.104717e-01 -7.369835e-02 3.986732e-01 6.074984e-02 -6.300651e-02 [6] -9.279229e-02 -1.038382e+00 1.085598e-01 4.460952e-01 -1.997042e-01 [11] 2.342729e-01 -2.073642e-01 -4.300635e-02 1.842776e-01 2.188458e-01 [16] 8.332903e-02 4.856228e-01 8.286782e-01 5.173094e-01 -2.556006e-02 [21] 5.978500e-02 -2.338714e-01 5.511046e-01 1.395493e-01 5.698821e-01 [26] 2.965952e-01 4.533116e-02 3.955730e-01 -5.804592e-01 2.204945e-01 [31] -2.308805e-01 -8.974452e-02 -3.582051e-01 1.142326e-01 -1.040233e-01 [36] 9.772839e-02 6.581555e-02 2.521124e-01 -2.707056e-01 4.546589e-01 [41] -1.218019e-01 -2.698592e-01 9.529675e-02 2.366367e-01 5.379369e-05 [46] 4.782873e-03 6.568317e-01 1.238103e-01 1.627156e-01 8.151142e-02 [51] -6.044424e-01 -1.158726e-01 -2.014055e-01 3.919278e-01 4.437552e-01 [56] 4.286292e-02 2.939878e-02 -1.304640e-01 -1.409742e-02 3.047676e-01 [61] 1.002090e-01 2.977424e-01 -7.738222e-01 -6.973750e-02 -2.396970e-01 [66] -5.205687e-01 -4.337739e-01 -3.179973e-01 -5.262758e-01 -2.775385e-01 [71] -3.866573e-01 -4.951342e-01 3.105996e-01 2.233822e-01 4.411582e-01 [76] 1.677700e-01 2.270480e-02 2.625383e-01 -3.139158e-02 5.606499e-01 [81] -2.704845e-01 7.495220e-02 -2.113569e-01 1.073835e-01 -3.988859e-01 [86] 6.033420e-02 -1.173769e-01 6.280371e-02 3.280089e-01 1.283955e-01 [91] -3.202861e-03 3.003576e-01 -3.644171e-01 2.529955e-01 1.806013e-01 [96] -2.935395e-01 9.260962e-04 4.655653e-01 2.822371e-01 -1.749664e-01 [101] 1.959369e-01 2.780151e-01 2.781239e-02 -2.966240e-02 -1.922135e-01 [106] -2.261041e-01 -7.054772e-02 -3.709610e-01 -9.635617e-01 -5.633230e-01 [111] 3.206424e-01 -9.960127e-02 3.689584e-03 1.676202e-01 -7.210132e-02 [116] 6.286450e-01 5.081515e-01 -1.717976e-01 -2.809891e-01 2.789616e-01 [121] -1.383613e-01 1.179460e-01 1.113221e-01 4.456462e-01 3.010921e-01 [126] 4.668906e-02 8.122028e-01 1.826924e-01 -3.464780e-01 -3.313051e-01 [131] 4.011378e-01 4.459742e-01 8.055925e-02 -3.686667e-02 -2.865440e-01 [136] 9.428875e-02 2.170860e-01 -1.620917e-01 2.118310e-01 -3.939714e-01 [141] -2.667945e-01 9.060541e-03 -1.391633e-01 -4.158656e-01 -1.081271e-01 [146] 2.259391e-01 -6.516393e-02 1.542860e-01 -8.044623e-03 -6.062543e-03 [151] -3.189436e-01 5.957834e-01 -2.797421e-01 9.618401e-02 3.855182e-01 [156] 2.758509e-01 8.416574e-01 2.298645e-01 -1.575879e-01 3.779598e-01 [161] -1.103801e-01 2.192961e-01 4.151029e-01 9.750916e-02 -9.454548e-02 [166] 2.830689e-01 -3.251917e-01 1.411926e-01 -6.666841e-01 1.694539e-01 [171] -4.012824e-01 -1.906613e-01 3.046964e-01 -5.984331e-01 5.461188e-02 [176] 1.600829e-01 -2.514365e-01 -3.700901e-01 5.465558e-01 8.912431e-02 [181] -1.825099e-01 -1.112489e-01 -4.187294e-01 3.940058e-01 -2.028515e-01 [186] -2.290699e-01 4.170982e-02 -2.899644e-01 9.616330e-02 1.103575e-01 [191] -7.369777e-02 3.838836e-02 -8.966326e-01 -1.671131e-01 -1.039765e-01 [196] -4.804995e-01 8.049896e-02 -7.252047e-01 9.669517e-02 -3.466381e-01 [201] 5.430306e-01 3.699603e-01 -5.992936e-01 -1.041328e-01 -2.679517e-01 [206] -1.190249e-01 -2.014585e-01 -5.468470e-01 1.755962e-01 5.284532e-01 [211] -5.320673e-01 -7.253434e-03 3.034486e-01 3.218493e-01 -4.562425e-02 [216] 1.567943e-01 1.980446e-01 -3.246743e-02 1.702715e-01 -1.534776e-01 [221] 3.924366e-03 -4.360006e-02 1.148134e-01 3.998251e-01 -1.428122e-01 [226] -2.587466e-01 -2.453264e-01 7.557215e-02 -3.362079e-01 5.968180e-01 > > proc.time() user system elapsed 5.027 18.918 26.284
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: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x6000031ac2a0> > .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: 0x6000031ac2a0> > .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: 0x6000031ac2a0> > .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: 0x6000031ac2a0> > 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: 0x600003190120> > .Call("R_bm_AddColumn",P) <pointer: 0x600003190120> > .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: 0x600003190120> > .Call("R_bm_AddColumn",P) <pointer: 0x600003190120> > .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: 0x600003190120> > 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: 0x6000031ec000> > .Call("R_bm_AddColumn",P) <pointer: 0x6000031ec000> > .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: 0x6000031ec000> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x6000031ec000> > .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: 0x6000031ec000> > > .Call("R_bm_RowMode",P) <pointer: 0x6000031ec000> > .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: 0x6000031ec000> > > .Call("R_bm_ColMode",P) <pointer: 0x6000031ec000> > .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: 0x6000031ec000> > 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: 0x6000031e8000> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x6000031e8000> > .Call("R_bm_AddColumn",P) <pointer: 0x6000031e8000> > .Call("R_bm_AddColumn",P) <pointer: 0x6000031e8000> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile111a02c9b0c5" "BufferedMatrixFile111a077456f1" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile111a02c9b0c5" "BufferedMatrixFile111a077456f1" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600003180120> > .Call("R_bm_AddColumn",P) <pointer: 0x600003180120> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600003180120> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600003180120> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600003180120> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600003180120> > .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: 0x6000031802a0> > .Call("R_bm_AddColumn",P) <pointer: 0x6000031802a0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x6000031802a0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x6000031802a0> > 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: 0x600003180480> > .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: 0x600003180480> > rm(P) > > proc.time() user system elapsed 0.565 0.211 0.750
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: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.555 0.134 0.655