Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-10-06 11:38 -0400 (Mon, 06 Oct 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4832 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" | 4613 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4554 |
kunpeng2 | Linux (openEuler 24.03 LTS) | aarch64 | R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" | 4585 |
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 252/2341 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.72.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 24.04.3 LTS) / x86_64 | 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 | ![]() | ||||||||
kunpeng2 | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.72.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.72.0.tar.gz |
StartedAt: 2025-10-03 00:58:12 -0400 (Fri, 03 Oct 2025) |
EndedAt: 2025-10-03 00:59:51 -0400 (Fri, 03 Oct 2025) |
EllapsedTime: 99.0 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.72.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.5.1 RC (2025-06-05 r88288) * using platform: x86_64-apple-darwin20 * R was compiled by Apple clang version 14.0.0 (clang-1400.0.29.202) GNU Fortran (GCC) 14.2.0 * running under: macOS Monterey 12.7.6 * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.72.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.21-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking sizes of PDF files under ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.72.0’ ** 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 installing to /Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" 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.587 0.209 0.788
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells 480849 25.7 1056621 56.5 NA 634465 33.9 Vcells 891080 6.8 8388608 64.0 65536 2108740 16.1 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Oct 3 00:58:45 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 Oct 3 00:58:46 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: 0x600003adc0c0> > > > > 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 Oct 3 00:58:53 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 Oct 3 00:58:56 2025" > > ColMode(tmp2) <pointer: 0x600003adc0c0> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.5043401 -1.4685361 -0.9202651 0.4956857 [2,] 0.1220686 -1.3741372 -0.7746773 -0.3326652 [3,] 0.4956704 -0.5237212 0.2815247 -0.1223822 [4,] 0.7390815 0.9927762 0.6742711 1.1670770 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.5043401 1.4685361 0.9202651 0.4956857 [2,] 0.1220686 1.3741372 0.7746773 0.3326652 [3,] 0.4956704 0.5237212 0.2815247 0.1223822 [4,] 0.7390815 0.9927762 0.6742711 1.1670770 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9751862 1.2118317 0.9593045 0.7040495 [2,] 0.3493832 1.1722360 0.8801576 0.5767713 [3,] 0.7040386 0.7236859 0.5305890 0.3498317 [4,] 0.8596985 0.9963816 0.8211401 1.0803134 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.25620 38.58685 35.51331 32.53618 [2,] 28.61590 38.09650 34.57625 31.10038 [3,] 32.53606 32.76058 30.58742 28.62070 [4,] 34.33607 35.95659 33.88567 36.97021 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600003af45a0> > exp(tmp5) <pointer: 0x600003af45a0> > log(tmp5,2) <pointer: 0x600003af45a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.7599 > Min(tmp5) [1] 52.68481 > mean(tmp5) [1] 73.07075 > Sum(tmp5) [1] 14614.15 > Var(tmp5) [1] 856.0855 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.53537 75.47037 69.07406 69.94556 71.65733 72.87974 68.27283 73.81035 [9] 68.60960 69.45228 > rowSums(tmp5) [1] 1830.707 1509.407 1381.481 1398.911 1433.147 1457.595 1365.457 1476.207 [9] 1372.192 1389.046 > rowVars(tmp5) [1] 7853.48493 86.99681 62.67509 59.21291 97.37515 65.17989 [7] 73.92039 32.71233 114.84843 66.23924 > rowSd(tmp5) [1] 88.619890 9.327208 7.916760 7.694993 9.867885 8.073406 8.597697 [8] 5.719469 10.716736 8.138749 > rowMax(tmp5) [1] 466.75990 91.90229 81.56582 81.30663 86.49411 94.30609 89.67667 [8] 80.27272 85.29921 82.33226 > rowMin(tmp5) [1] 55.77964 58.26295 55.28948 55.12579 54.59444 60.33345 55.88644 58.65760 [9] 52.68481 53.67342 > > colMeans(tmp5) [1] 109.28932 72.45180 71.63674 72.32728 76.03722 69.79276 70.78761 [8] 68.99200 73.68611 74.30110 66.68719 71.62381 70.28858 67.06640 [15] 72.29590 70.28647 71.62918 69.36010 73.17228 69.70314 > colSums(tmp5) [1] 1092.8932 724.5180 716.3674 723.2728 760.3722 697.9276 707.8761 [8] 689.9200 736.8611 743.0110 666.8719 716.2381 702.8858 670.6640 [15] 722.9590 702.8647 716.2918 693.6010 731.7228 697.0314 > colVars(tmp5) [1] 15848.51994 61.71378 35.02084 107.03108 54.90728 97.07518 [7] 103.42775 34.38779 72.45637 66.93825 62.69909 99.66778 [13] 94.68253 114.09550 62.41922 68.66099 77.28253 92.12831 [19] 67.70834 63.45529 > colSd(tmp5) [1] 125.890905 7.855812 5.917841 10.345583 7.409945 9.852674 [7] 10.169944 5.864110 8.512131 8.181580 7.918276 9.983375 [13] 9.730495 10.681550 7.900584 8.286193 8.791048 9.598349 [19] 8.228508 7.965883 > colMax(tmp5) [1] 466.75990 80.31348 83.16027 94.30609 87.89467 82.11018 85.80970 [8] 77.61173 86.49411 85.29921 76.45623 79.56668 91.90229 89.67667 [15] 87.77186 82.12061 82.33226 79.73319 82.70350 80.64670 > colMin(tmp5) [1] 59.56025 53.67342 63.66370 59.57024 65.36434 52.68481 58.26295 59.40615 [9] 58.22867 63.47217 55.88644 53.96266 59.13952 55.28948 57.87946 56.23118 [17] 54.59444 55.12579 59.69557 56.90124 > > > ### 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] 91.53537 75.47037 NA 69.94556 71.65733 72.87974 68.27283 73.81035 [9] 68.60960 69.45228 > rowSums(tmp5) [1] 1830.707 1509.407 NA 1398.911 1433.147 1457.595 1365.457 1476.207 [9] 1372.192 1389.046 > rowVars(tmp5) [1] 7853.48493 86.99681 61.22024 59.21291 97.37515 65.17989 [7] 73.92039 32.71233 114.84843 66.23924 > rowSd(tmp5) [1] 88.619890 9.327208 7.824337 7.694993 9.867885 8.073406 8.597697 [8] 5.719469 10.716736 8.138749 > rowMax(tmp5) [1] 466.75990 91.90229 NA 81.30663 86.49411 94.30609 89.67667 [8] 80.27272 85.29921 82.33226 > rowMin(tmp5) [1] 55.77964 58.26295 NA 55.12579 54.59444 60.33345 55.88644 58.65760 [9] 52.68481 53.67342 > > colMeans(tmp5) [1] 109.28932 72.45180 71.63674 72.32728 76.03722 NA 70.78761 [8] 68.99200 73.68611 74.30110 66.68719 71.62381 70.28858 67.06640 [15] 72.29590 70.28647 71.62918 69.36010 73.17228 69.70314 > colSums(tmp5) [1] 1092.8932 724.5180 716.3674 723.2728 760.3722 NA 707.8761 [8] 689.9200 736.8611 743.0110 666.8719 716.2381 702.8858 670.6640 [15] 722.9590 702.8647 716.2918 693.6010 731.7228 697.0314 > colVars(tmp5) [1] 15848.51994 61.71378 35.02084 107.03108 54.90728 NA [7] 103.42775 34.38779 72.45637 66.93825 62.69909 99.66778 [13] 94.68253 114.09550 62.41922 68.66099 77.28253 92.12831 [19] 67.70834 63.45529 > colSd(tmp5) [1] 125.890905 7.855812 5.917841 10.345583 7.409945 NA [7] 10.169944 5.864110 8.512131 8.181580 7.918276 9.983375 [13] 9.730495 10.681550 7.900584 8.286193 8.791048 9.598349 [19] 8.228508 7.965883 > colMax(tmp5) [1] 466.75990 80.31348 83.16027 94.30609 87.89467 NA 85.80970 [8] 77.61173 86.49411 85.29921 76.45623 79.56668 91.90229 89.67667 [15] 87.77186 82.12061 82.33226 79.73319 82.70350 80.64670 > colMin(tmp5) [1] 59.56025 53.67342 63.66370 59.57024 65.36434 NA 58.26295 59.40615 [9] 58.22867 63.47217 55.88644 53.96266 59.13952 55.28948 57.87946 56.23118 [17] 54.59444 55.12579 59.69557 56.90124 > > Max(tmp5,na.rm=TRUE) [1] 466.7599 > Min(tmp5,na.rm=TRUE) [1] 52.68481 > mean(tmp5,na.rm=TRUE) [1] 73.04466 > Sum(tmp5,na.rm=TRUE) [1] 14535.89 > Var(tmp5,na.rm=TRUE) [1] 860.2723 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.53537 75.47037 68.59048 69.94556 71.65733 72.87974 68.27283 73.81035 [9] 68.60960 69.45228 > rowSums(tmp5,na.rm=TRUE) [1] 1830.707 1509.407 1303.219 1398.911 1433.147 1457.595 1365.457 1476.207 [9] 1372.192 1389.046 > rowVars(tmp5,na.rm=TRUE) [1] 7853.48493 86.99681 61.22024 59.21291 97.37515 65.17989 [7] 73.92039 32.71233 114.84843 66.23924 > rowSd(tmp5,na.rm=TRUE) [1] 88.619890 9.327208 7.824337 7.694993 9.867885 8.073406 8.597697 [8] 5.719469 10.716736 8.138749 > rowMax(tmp5,na.rm=TRUE) [1] 466.75990 91.90229 81.56582 81.30663 86.49411 94.30609 89.67667 [8] 80.27272 85.29921 82.33226 > rowMin(tmp5,na.rm=TRUE) [1] 55.77964 58.26295 55.28948 55.12579 54.59444 60.33345 55.88644 58.65760 [9] 52.68481 53.67342 > > colMeans(tmp5,na.rm=TRUE) [1] 109.28932 72.45180 71.63674 72.32728 76.03722 68.85172 70.78761 [8] 68.99200 73.68611 74.30110 66.68719 71.62381 70.28858 67.06640 [15] 72.29590 70.28647 71.62918 69.36010 73.17228 69.70314 > colSums(tmp5,na.rm=TRUE) [1] 1092.8932 724.5180 716.3674 723.2728 760.3722 619.6655 707.8761 [8] 689.9200 736.8611 743.0110 666.8719 716.2381 702.8858 670.6640 [15] 722.9590 702.8647 716.2918 693.6010 731.7228 697.0314 > colVars(tmp5,na.rm=TRUE) [1] 15848.51994 61.71378 35.02084 107.03108 54.90728 99.24723 [7] 103.42775 34.38779 72.45637 66.93825 62.69909 99.66778 [13] 94.68253 114.09550 62.41922 68.66099 77.28253 92.12831 [19] 67.70834 63.45529 > colSd(tmp5,na.rm=TRUE) [1] 125.890905 7.855812 5.917841 10.345583 7.409945 9.962291 [7] 10.169944 5.864110 8.512131 8.181580 7.918276 9.983375 [13] 9.730495 10.681550 7.900584 8.286193 8.791048 9.598349 [19] 8.228508 7.965883 > colMax(tmp5,na.rm=TRUE) [1] 466.75990 80.31348 83.16027 94.30609 87.89467 82.11018 85.80970 [8] 77.61173 86.49411 85.29921 76.45623 79.56668 91.90229 89.67667 [15] 87.77186 82.12061 82.33226 79.73319 82.70350 80.64670 > colMin(tmp5,na.rm=TRUE) [1] 59.56025 53.67342 63.66370 59.57024 65.36434 52.68481 58.26295 59.40615 [9] 58.22867 63.47217 55.88644 53.96266 59.13952 55.28948 57.87946 56.23118 [17] 54.59444 55.12579 59.69557 56.90124 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.53537 75.47037 NaN 69.94556 71.65733 72.87974 68.27283 73.81035 [9] 68.60960 69.45228 > rowSums(tmp5,na.rm=TRUE) [1] 1830.707 1509.407 0.000 1398.911 1433.147 1457.595 1365.457 1476.207 [9] 1372.192 1389.046 > rowVars(tmp5,na.rm=TRUE) [1] 7853.48493 86.99681 NA 59.21291 97.37515 65.17989 [7] 73.92039 32.71233 114.84843 66.23924 > rowSd(tmp5,na.rm=TRUE) [1] 88.619890 9.327208 NA 7.694993 9.867885 8.073406 8.597697 [8] 5.719469 10.716736 8.138749 > rowMax(tmp5,na.rm=TRUE) [1] 466.75990 91.90229 NA 81.30663 86.49411 94.30609 89.67667 [8] 80.27272 85.29921 82.33226 > rowMin(tmp5,na.rm=TRUE) [1] 55.77964 58.26295 NA 55.12579 54.59444 60.33345 55.88644 58.65760 [9] 52.68481 53.67342 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 113.90818 72.92568 72.52264 73.74473 76.35370 NaN 70.21132 [8] 69.77980 75.40361 74.76963 66.53863 70.74127 69.67946 68.37494 [15] 72.87109 69.51123 72.22175 70.62517 72.23967 69.02230 > colSums(tmp5,na.rm=TRUE) [1] 1025.1737 656.3311 652.7037 663.7026 687.1833 0.0000 631.9019 [8] 628.0182 678.6325 672.9266 598.8477 636.6714 627.1152 615.3745 [15] 655.8399 625.6011 649.9958 635.6265 650.1570 621.2007 > colVars(tmp5,na.rm=TRUE) [1] 17589.57847 66.90165 30.56935 97.80687 60.64391 NA [7] 112.62001 31.70413 48.32834 72.83598 70.28818 103.36387 [13] 102.34384 109.09415 66.49959 70.48232 82.99249 85.63977 [19] 66.38695 66.17237 > colSd(tmp5,na.rm=TRUE) [1] 132.625708 8.179343 5.528956 9.889735 7.787420 NA [7] 10.612257 5.630642 6.951858 8.534400 8.383805 10.166802 [13] 10.116513 10.444814 8.154728 8.395375 9.110021 9.254176 [19] 8.147819 8.134640 > colMax(tmp5,na.rm=TRUE) [1] 466.75990 80.31348 83.16027 94.30609 87.89467 -Inf 85.80970 [8] 77.61173 86.49411 85.29921 76.45623 79.38564 91.90229 89.67667 [15] 87.77186 82.12061 82.33226 79.73319 82.70350 80.64670 > colMin(tmp5,na.rm=TRUE) [1] 59.56025 53.67342 64.01806 63.85991 65.36434 Inf 58.26295 59.40615 [9] 65.37272 63.47217 55.88644 53.96266 59.13952 57.13073 57.87946 56.23118 [17] 54.59444 55.12579 59.69557 56.90124 > > > > > 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] 216.56943 245.64254 227.05316 115.27459 124.94524 93.21712 214.26857 [8] 174.83061 325.65422 196.09249 > apply(copymatrix,1,var,na.rm=TRUE) [1] 216.56943 245.64254 227.05316 115.27459 124.94524 93.21712 214.26857 [8] 174.83061 325.65422 196.09249 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 5.684342e-14 2.842171e-14 1.705303e-13 1.421085e-14 5.684342e-14 [6] -3.126388e-13 4.547474e-13 5.684342e-14 1.989520e-13 4.263256e-14 [11] -2.842171e-14 -2.842171e-14 -2.273737e-13 1.136868e-13 -1.989520e-13 [16] -1.705303e-13 1.705303e-13 5.684342e-14 0.000000e+00 -2.842171e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 5 14 4 4 5 1 6 2 9 19 2 13 1 4 9 12 8 12 7 5 6 2 8 7 7 13 2 14 5 4 3 8 5 7 1 6 10 9 8 11 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.751618 > Min(tmp) [1] -3.177546 > mean(tmp) [1] -0.02640448 > Sum(tmp) [1] -2.640448 > Var(tmp) [1] 1.179584 > > rowMeans(tmp) [1] -0.02640448 > rowSums(tmp) [1] -2.640448 > rowVars(tmp) [1] 1.179584 > rowSd(tmp) [1] 1.086087 > rowMax(tmp) [1] 2.751618 > rowMin(tmp) [1] -3.177546 > > colMeans(tmp) [1] 1.196891984 0.403850372 1.059715401 -0.684029710 0.003987465 [6] -0.135295415 -1.003515292 -0.612411563 -1.068099672 -1.313010517 [11] -2.582755514 -0.372801899 1.304135935 -0.316238913 -0.857619275 [16] 0.493161444 -1.457646952 0.674521368 0.816984988 -0.797751788 [21] 0.371148933 0.786786264 1.103787289 0.583508854 -0.261253213 [26] 0.482968483 2.047209482 -1.249763237 0.384069329 0.578755803 [31] 0.411809860 2.751618390 -0.512241226 -0.169610902 0.812906637 [36] 0.204170036 1.939329761 -2.229352429 0.847810905 1.040755572 [41] -0.681471909 -0.491437462 0.305006349 -2.149744720 0.781734279 [46] -2.106893061 -0.435309416 0.033407922 -0.963175023 0.084108609 [51] 2.401892997 0.730979776 0.123676667 0.365411357 0.493392582 [56] -0.210225294 0.705406324 -3.177546179 0.494313346 0.845793319 [61] -0.294690259 -0.021589318 0.606756508 -0.845523726 0.065866114 [66] 0.688666204 -0.226983776 1.382047410 0.105174535 -1.388801238 [71] -0.786624239 -0.950401113 0.943079273 0.577772981 0.836805284 [76] 0.412396395 0.335386882 1.097510190 -0.101682505 0.802561114 [81] -1.757652011 0.480851831 -0.862637631 -0.982521485 0.400813903 [86] -1.584432821 0.326712340 -0.875509284 0.226407275 -0.396696540 [91] -1.200257634 -0.376326724 -0.899104269 2.199285743 1.295034184 [96] -1.707503253 -1.999352063 -0.722606466 1.198330504 -0.466817567 > colSums(tmp) [1] 1.196891984 0.403850372 1.059715401 -0.684029710 0.003987465 [6] -0.135295415 -1.003515292 -0.612411563 -1.068099672 -1.313010517 [11] -2.582755514 -0.372801899 1.304135935 -0.316238913 -0.857619275 [16] 0.493161444 -1.457646952 0.674521368 0.816984988 -0.797751788 [21] 0.371148933 0.786786264 1.103787289 0.583508854 -0.261253213 [26] 0.482968483 2.047209482 -1.249763237 0.384069329 0.578755803 [31] 0.411809860 2.751618390 -0.512241226 -0.169610902 0.812906637 [36] 0.204170036 1.939329761 -2.229352429 0.847810905 1.040755572 [41] -0.681471909 -0.491437462 0.305006349 -2.149744720 0.781734279 [46] -2.106893061 -0.435309416 0.033407922 -0.963175023 0.084108609 [51] 2.401892997 0.730979776 0.123676667 0.365411357 0.493392582 [56] -0.210225294 0.705406324 -3.177546179 0.494313346 0.845793319 [61] -0.294690259 -0.021589318 0.606756508 -0.845523726 0.065866114 [66] 0.688666204 -0.226983776 1.382047410 0.105174535 -1.388801238 [71] -0.786624239 -0.950401113 0.943079273 0.577772981 0.836805284 [76] 0.412396395 0.335386882 1.097510190 -0.101682505 0.802561114 [81] -1.757652011 0.480851831 -0.862637631 -0.982521485 0.400813903 [86] -1.584432821 0.326712340 -0.875509284 0.226407275 -0.396696540 [91] -1.200257634 -0.376326724 -0.899104269 2.199285743 1.295034184 [96] -1.707503253 -1.999352063 -0.722606466 1.198330504 -0.466817567 > 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.196891984 0.403850372 1.059715401 -0.684029710 0.003987465 [6] -0.135295415 -1.003515292 -0.612411563 -1.068099672 -1.313010517 [11] -2.582755514 -0.372801899 1.304135935 -0.316238913 -0.857619275 [16] 0.493161444 -1.457646952 0.674521368 0.816984988 -0.797751788 [21] 0.371148933 0.786786264 1.103787289 0.583508854 -0.261253213 [26] 0.482968483 2.047209482 -1.249763237 0.384069329 0.578755803 [31] 0.411809860 2.751618390 -0.512241226 -0.169610902 0.812906637 [36] 0.204170036 1.939329761 -2.229352429 0.847810905 1.040755572 [41] -0.681471909 -0.491437462 0.305006349 -2.149744720 0.781734279 [46] -2.106893061 -0.435309416 0.033407922 -0.963175023 0.084108609 [51] 2.401892997 0.730979776 0.123676667 0.365411357 0.493392582 [56] -0.210225294 0.705406324 -3.177546179 0.494313346 0.845793319 [61] -0.294690259 -0.021589318 0.606756508 -0.845523726 0.065866114 [66] 0.688666204 -0.226983776 1.382047410 0.105174535 -1.388801238 [71] -0.786624239 -0.950401113 0.943079273 0.577772981 0.836805284 [76] 0.412396395 0.335386882 1.097510190 -0.101682505 0.802561114 [81] -1.757652011 0.480851831 -0.862637631 -0.982521485 0.400813903 [86] -1.584432821 0.326712340 -0.875509284 0.226407275 -0.396696540 [91] -1.200257634 -0.376326724 -0.899104269 2.199285743 1.295034184 [96] -1.707503253 -1.999352063 -0.722606466 1.198330504 -0.466817567 > colMin(tmp) [1] 1.196891984 0.403850372 1.059715401 -0.684029710 0.003987465 [6] -0.135295415 -1.003515292 -0.612411563 -1.068099672 -1.313010517 [11] -2.582755514 -0.372801899 1.304135935 -0.316238913 -0.857619275 [16] 0.493161444 -1.457646952 0.674521368 0.816984988 -0.797751788 [21] 0.371148933 0.786786264 1.103787289 0.583508854 -0.261253213 [26] 0.482968483 2.047209482 -1.249763237 0.384069329 0.578755803 [31] 0.411809860 2.751618390 -0.512241226 -0.169610902 0.812906637 [36] 0.204170036 1.939329761 -2.229352429 0.847810905 1.040755572 [41] -0.681471909 -0.491437462 0.305006349 -2.149744720 0.781734279 [46] -2.106893061 -0.435309416 0.033407922 -0.963175023 0.084108609 [51] 2.401892997 0.730979776 0.123676667 0.365411357 0.493392582 [56] -0.210225294 0.705406324 -3.177546179 0.494313346 0.845793319 [61] -0.294690259 -0.021589318 0.606756508 -0.845523726 0.065866114 [66] 0.688666204 -0.226983776 1.382047410 0.105174535 -1.388801238 [71] -0.786624239 -0.950401113 0.943079273 0.577772981 0.836805284 [76] 0.412396395 0.335386882 1.097510190 -0.101682505 0.802561114 [81] -1.757652011 0.480851831 -0.862637631 -0.982521485 0.400813903 [86] -1.584432821 0.326712340 -0.875509284 0.226407275 -0.396696540 [91] -1.200257634 -0.376326724 -0.899104269 2.199285743 1.295034184 [96] -1.707503253 -1.999352063 -0.722606466 1.198330504 -0.466817567 > colMedians(tmp) [1] 1.196891984 0.403850372 1.059715401 -0.684029710 0.003987465 [6] -0.135295415 -1.003515292 -0.612411563 -1.068099672 -1.313010517 [11] -2.582755514 -0.372801899 1.304135935 -0.316238913 -0.857619275 [16] 0.493161444 -1.457646952 0.674521368 0.816984988 -0.797751788 [21] 0.371148933 0.786786264 1.103787289 0.583508854 -0.261253213 [26] 0.482968483 2.047209482 -1.249763237 0.384069329 0.578755803 [31] 0.411809860 2.751618390 -0.512241226 -0.169610902 0.812906637 [36] 0.204170036 1.939329761 -2.229352429 0.847810905 1.040755572 [41] -0.681471909 -0.491437462 0.305006349 -2.149744720 0.781734279 [46] -2.106893061 -0.435309416 0.033407922 -0.963175023 0.084108609 [51] 2.401892997 0.730979776 0.123676667 0.365411357 0.493392582 [56] -0.210225294 0.705406324 -3.177546179 0.494313346 0.845793319 [61] -0.294690259 -0.021589318 0.606756508 -0.845523726 0.065866114 [66] 0.688666204 -0.226983776 1.382047410 0.105174535 -1.388801238 [71] -0.786624239 -0.950401113 0.943079273 0.577772981 0.836805284 [76] 0.412396395 0.335386882 1.097510190 -0.101682505 0.802561114 [81] -1.757652011 0.480851831 -0.862637631 -0.982521485 0.400813903 [86] -1.584432821 0.326712340 -0.875509284 0.226407275 -0.396696540 [91] -1.200257634 -0.376326724 -0.899104269 2.199285743 1.295034184 [96] -1.707503253 -1.999352063 -0.722606466 1.198330504 -0.466817567 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.196892 0.4038504 1.059715 -0.6840297 0.003987465 -0.1352954 -1.003515 [2,] 1.196892 0.4038504 1.059715 -0.6840297 0.003987465 -0.1352954 -1.003515 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.6124116 -1.0681 -1.313011 -2.582756 -0.3728019 1.304136 -0.3162389 [2,] -0.6124116 -1.0681 -1.313011 -2.582756 -0.3728019 1.304136 -0.3162389 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.8576193 0.4931614 -1.457647 0.6745214 0.816985 -0.7977518 0.3711489 [2,] -0.8576193 0.4931614 -1.457647 0.6745214 0.816985 -0.7977518 0.3711489 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.7867863 1.103787 0.5835089 -0.2612532 0.4829685 2.047209 -1.249763 [2,] 0.7867863 1.103787 0.5835089 -0.2612532 0.4829685 2.047209 -1.249763 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.3840693 0.5787558 0.4118099 2.751618 -0.5122412 -0.1696109 0.8129066 [2,] 0.3840693 0.5787558 0.4118099 2.751618 -0.5122412 -0.1696109 0.8129066 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.20417 1.93933 -2.229352 0.8478109 1.040756 -0.6814719 -0.4914375 [2,] 0.20417 1.93933 -2.229352 0.8478109 1.040756 -0.6814719 -0.4914375 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.3050063 -2.149745 0.7817343 -2.106893 -0.4353094 0.03340792 -0.963175 [2,] 0.3050063 -2.149745 0.7817343 -2.106893 -0.4353094 0.03340792 -0.963175 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.08410861 2.401893 0.7309798 0.1236767 0.3654114 0.4933926 -0.2102253 [2,] 0.08410861 2.401893 0.7309798 0.1236767 0.3654114 0.4933926 -0.2102253 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.7054063 -3.177546 0.4943133 0.8457933 -0.2946903 -0.02158932 0.6067565 [2,] 0.7054063 -3.177546 0.4943133 0.8457933 -0.2946903 -0.02158932 0.6067565 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.8455237 0.06586611 0.6886662 -0.2269838 1.382047 0.1051745 -1.388801 [2,] -0.8455237 0.06586611 0.6886662 -0.2269838 1.382047 0.1051745 -1.388801 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.7866242 -0.9504011 0.9430793 0.577773 0.8368053 0.4123964 0.3353869 [2,] -0.7866242 -0.9504011 0.9430793 0.577773 0.8368053 0.4123964 0.3353869 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 1.09751 -0.1016825 0.8025611 -1.757652 0.4808518 -0.8626376 -0.9825215 [2,] 1.09751 -0.1016825 0.8025611 -1.757652 0.4808518 -0.8626376 -0.9825215 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.4008139 -1.584433 0.3267123 -0.8755093 0.2264073 -0.3966965 -1.200258 [2,] 0.4008139 -1.584433 0.3267123 -0.8755093 0.2264073 -0.3966965 -1.200258 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.3763267 -0.8991043 2.199286 1.295034 -1.707503 -1.999352 -0.7226065 [2,] -0.3763267 -0.8991043 2.199286 1.295034 -1.707503 -1.999352 -0.7226065 [,99] [,100] [1,] 1.198331 -0.4668176 [2,] 1.198331 -0.4668176 > > > Max(tmp2) [1] 2.110382 > Min(tmp2) [1] -2.803393 > mean(tmp2) [1] -0.1530501 > Sum(tmp2) [1] -15.30501 > Var(tmp2) [1] 0.918904 > > rowMeans(tmp2) [1] -0.85296007 -0.33204787 0.50613248 -0.56987668 -1.75877410 -0.16420034 [7] 0.94829073 0.31576849 0.19049280 -0.19490235 -1.55432236 -1.28913062 [13] -1.12685573 1.12931521 -0.34580016 -1.39230864 0.22931231 -1.36226893 [19] 1.58666603 -0.72046397 -1.40035733 0.50496951 -0.09992884 0.82721801 [25] 1.03780563 0.10607183 -0.29108429 0.80696045 -0.21819368 0.73955318 [31] -0.79588690 -0.07176903 -1.21474834 -2.80339331 0.10808791 1.75133323 [37] -0.35387151 -0.90367586 -1.42593341 -0.20963358 0.42496532 0.70927719 [43] -0.73749773 0.48914828 0.19120030 -0.44946061 -0.82604561 -1.73733171 [49] -0.68710757 0.65273457 -0.74671831 0.91629571 -0.45583808 0.40258959 [55] 0.17530396 0.31360732 -1.07041393 -0.35263881 1.31890255 -0.41218312 [61] -0.70127892 -1.53350288 -0.79241323 1.82984570 -0.03244898 -0.81672935 [67] -0.71770052 0.94840137 1.12585329 -0.62028785 -0.13892290 0.76622734 [73] -0.27973609 2.11038166 -0.86085695 -0.21575216 -0.68922602 0.40643935 [79] -0.87770369 -0.16181588 1.13165033 -2.25423990 0.07701313 -0.79400085 [85] 1.90656194 -1.65337426 -0.43821836 1.52920370 -0.55265812 0.50374664 [91] 0.37039297 0.36037756 1.18629312 0.13467465 0.42500848 -1.39461398 [97] -0.08001113 -1.34713064 0.42902632 -1.04785940 > rowSums(tmp2) [1] -0.85296007 -0.33204787 0.50613248 -0.56987668 -1.75877410 -0.16420034 [7] 0.94829073 0.31576849 0.19049280 -0.19490235 -1.55432236 -1.28913062 [13] -1.12685573 1.12931521 -0.34580016 -1.39230864 0.22931231 -1.36226893 [19] 1.58666603 -0.72046397 -1.40035733 0.50496951 -0.09992884 0.82721801 [25] 1.03780563 0.10607183 -0.29108429 0.80696045 -0.21819368 0.73955318 [31] -0.79588690 -0.07176903 -1.21474834 -2.80339331 0.10808791 1.75133323 [37] -0.35387151 -0.90367586 -1.42593341 -0.20963358 0.42496532 0.70927719 [43] -0.73749773 0.48914828 0.19120030 -0.44946061 -0.82604561 -1.73733171 [49] -0.68710757 0.65273457 -0.74671831 0.91629571 -0.45583808 0.40258959 [55] 0.17530396 0.31360732 -1.07041393 -0.35263881 1.31890255 -0.41218312 [61] -0.70127892 -1.53350288 -0.79241323 1.82984570 -0.03244898 -0.81672935 [67] -0.71770052 0.94840137 1.12585329 -0.62028785 -0.13892290 0.76622734 [73] -0.27973609 2.11038166 -0.86085695 -0.21575216 -0.68922602 0.40643935 [79] -0.87770369 -0.16181588 1.13165033 -2.25423990 0.07701313 -0.79400085 [85] 1.90656194 -1.65337426 -0.43821836 1.52920370 -0.55265812 0.50374664 [91] 0.37039297 0.36037756 1.18629312 0.13467465 0.42500848 -1.39461398 [97] -0.08001113 -1.34713064 0.42902632 -1.04785940 > 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.85296007 -0.33204787 0.50613248 -0.56987668 -1.75877410 -0.16420034 [7] 0.94829073 0.31576849 0.19049280 -0.19490235 -1.55432236 -1.28913062 [13] -1.12685573 1.12931521 -0.34580016 -1.39230864 0.22931231 -1.36226893 [19] 1.58666603 -0.72046397 -1.40035733 0.50496951 -0.09992884 0.82721801 [25] 1.03780563 0.10607183 -0.29108429 0.80696045 -0.21819368 0.73955318 [31] -0.79588690 -0.07176903 -1.21474834 -2.80339331 0.10808791 1.75133323 [37] -0.35387151 -0.90367586 -1.42593341 -0.20963358 0.42496532 0.70927719 [43] -0.73749773 0.48914828 0.19120030 -0.44946061 -0.82604561 -1.73733171 [49] -0.68710757 0.65273457 -0.74671831 0.91629571 -0.45583808 0.40258959 [55] 0.17530396 0.31360732 -1.07041393 -0.35263881 1.31890255 -0.41218312 [61] -0.70127892 -1.53350288 -0.79241323 1.82984570 -0.03244898 -0.81672935 [67] -0.71770052 0.94840137 1.12585329 -0.62028785 -0.13892290 0.76622734 [73] -0.27973609 2.11038166 -0.86085695 -0.21575216 -0.68922602 0.40643935 [79] -0.87770369 -0.16181588 1.13165033 -2.25423990 0.07701313 -0.79400085 [85] 1.90656194 -1.65337426 -0.43821836 1.52920370 -0.55265812 0.50374664 [91] 0.37039297 0.36037756 1.18629312 0.13467465 0.42500848 -1.39461398 [97] -0.08001113 -1.34713064 0.42902632 -1.04785940 > rowMin(tmp2) [1] -0.85296007 -0.33204787 0.50613248 -0.56987668 -1.75877410 -0.16420034 [7] 0.94829073 0.31576849 0.19049280 -0.19490235 -1.55432236 -1.28913062 [13] -1.12685573 1.12931521 -0.34580016 -1.39230864 0.22931231 -1.36226893 [19] 1.58666603 -0.72046397 -1.40035733 0.50496951 -0.09992884 0.82721801 [25] 1.03780563 0.10607183 -0.29108429 0.80696045 -0.21819368 0.73955318 [31] -0.79588690 -0.07176903 -1.21474834 -2.80339331 0.10808791 1.75133323 [37] -0.35387151 -0.90367586 -1.42593341 -0.20963358 0.42496532 0.70927719 [43] -0.73749773 0.48914828 0.19120030 -0.44946061 -0.82604561 -1.73733171 [49] -0.68710757 0.65273457 -0.74671831 0.91629571 -0.45583808 0.40258959 [55] 0.17530396 0.31360732 -1.07041393 -0.35263881 1.31890255 -0.41218312 [61] -0.70127892 -1.53350288 -0.79241323 1.82984570 -0.03244898 -0.81672935 [67] -0.71770052 0.94840137 1.12585329 -0.62028785 -0.13892290 0.76622734 [73] -0.27973609 2.11038166 -0.86085695 -0.21575216 -0.68922602 0.40643935 [79] -0.87770369 -0.16181588 1.13165033 -2.25423990 0.07701313 -0.79400085 [85] 1.90656194 -1.65337426 -0.43821836 1.52920370 -0.55265812 0.50374664 [91] 0.37039297 0.36037756 1.18629312 0.13467465 0.42500848 -1.39461398 [97] -0.08001113 -1.34713064 0.42902632 -1.04785940 > > colMeans(tmp2) [1] -0.1530501 > colSums(tmp2) [1] -15.30501 > colVars(tmp2) [1] 0.918904 > colSd(tmp2) [1] 0.9585948 > colMax(tmp2) [1] 2.110382 > colMin(tmp2) [1] -2.803393 > colMedians(tmp2) [1] -0.202268 > colRanges(tmp2) [,1] [1,] -2.803393 [2,] 2.110382 > > 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] 1.8842097 -6.3262865 0.4052369 -4.7648038 2.2438670 -3.6633600 [7] 2.1234732 1.5606775 0.3096817 1.5120885 > colApply(tmp,quantile)[,1] [,1] [1,] -1.3217616 [2,] -0.4857674 [3,] 0.1914494 [4,] 0.3857396 [5,] 2.3576278 > > rowApply(tmp,sum) [1] 5.02524442 3.93491123 -0.68131565 -7.10559951 -0.54422621 -1.89591847 [7] 1.12024562 -6.53672389 -0.08060875 2.04877551 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 3 3 3 9 10 10 6 5 8 5 [2,] 2 1 4 6 5 7 2 4 5 2 [3,] 5 4 9 2 1 4 10 9 9 7 [4,] 8 2 1 4 2 8 4 1 7 6 [5,] 6 9 6 5 3 1 9 10 4 10 [6,] 4 7 7 8 4 6 1 3 1 4 [7,] 7 10 8 10 7 2 5 7 10 1 [8,] 9 8 2 7 6 5 8 6 2 9 [9,] 1 6 5 3 9 3 7 8 3 8 [10,] 10 5 10 1 8 9 3 2 6 3 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 2.9304208 1.8274694 -4.5798516 4.2795360 -0.1961730 -0.4524968 [7] 1.0837190 0.8693181 -1.4942745 0.6078475 -1.9182315 -1.7869608 [13] -1.3287717 -1.7091016 -0.2969586 0.4838737 -1.3373871 0.4151986 [19] 3.7848713 0.7977016 > colApply(tmp,quantile)[,1] [,1] [1,] -2.0050091 [2,] 0.1563976 [3,] 1.1937007 [4,] 1.6484286 [5,] 1.9369029 > > rowApply(tmp,sum) [1] 2.499390 -2.953410 4.379097 3.379911 -5.325238 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 18 1 11 20 19 [2,] 13 15 6 19 11 [3,] 1 12 3 4 3 [4,] 8 13 19 11 20 [5,] 9 16 5 14 8 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.1937007 0.4701333 -2.1995536 -0.2169992 -0.06468614 0.3713356 [2,] -2.0050091 0.3900459 0.2818852 0.3292844 0.43589987 -1.0764699 [3,] 0.1563976 -0.2038824 -0.6371579 1.9474627 -0.26741835 0.2838707 [4,] 1.9369029 1.5097697 -0.5117031 0.1346325 0.55967904 1.0577327 [5,] 1.6484286 -0.3385972 -1.5133222 2.0851556 -0.85964747 -1.0889659 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.9352359 0.5861232 -0.2429705 1.0942191 0.05682443 0.32401180 [2,] 0.8855124 -1.0480451 -1.4533781 -1.3445807 -1.66908170 -1.93636469 [3,] -0.1356386 -0.1877624 -0.4604700 0.5145894 0.75328932 0.09196013 [4,] -0.6801930 0.2681946 0.6110239 -0.1570060 0.59579524 -0.50559489 [5,] -0.9211977 1.2508079 0.0515202 0.5006259 -1.65505879 0.23902683 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.4804236 -1.36075833 -0.7140488 0.9339921 -1.1807067 -0.7324542 [2,] 0.8908151 -0.07630964 0.3424801 -0.1501863 3.4630857 1.6101861 [3,] 1.1121109 0.21506681 0.7318383 -0.7223110 -2.2026000 1.1177566 [4,] -1.0296424 -0.32611801 -0.2955377 1.2150497 -0.4632546 -0.5379235 [5,] -1.8216317 -0.16098243 -0.3616905 -0.7926708 -0.9539115 -1.0423664 [,19] [,20] [1,] 0.9691926 1.7572221 [2,] -0.3429394 -0.4802405 [3,] 2.1410779 0.1309170 [4,] 0.4309252 -0.4328212 [5,] 0.5866150 -0.1773758 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 655 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 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.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 2.976655 0.2777415 -0.0696968 -0.4630063 0.2072053 0.6275556 1.236928 col8 col9 col10 col11 col12 col13 col14 row1 0.2900505 0.9387722 -0.2628918 -1.070975 -1.226666 0.7500919 -1.037618 col15 col16 col17 col18 col19 col20 row1 -0.9201665 0.6667012 1.753402 0.9017106 1.167608 0.5703707 > tmp[,"col10"] col10 row1 -0.26289178 row2 0.31907104 row3 -0.50730299 row4 -0.03711322 row5 0.67537678 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 2.9766554 0.2777415 -0.0696968 -0.4630063 0.2072053 0.6275556 1.236928 row5 -0.2166702 -1.0573410 -0.8080461 -0.1818896 1.3556350 -0.4396500 1.095940 col8 col9 col10 col11 col12 col13 row1 0.2900505 0.9387722 -0.2628918 -1.0709746 -1.2266664 0.7500919 row5 -0.1683800 -0.3811546 0.6753768 -0.6503219 -0.2154468 0.5504331 col14 col15 col16 col17 col18 col19 col20 row1 -1.0376184 -0.9201665 0.6667012 1.753402 0.9017106 1.1676077 0.5703707 row5 0.9558365 -1.8018901 0.1455462 1.560815 -1.3299518 -0.1735715 0.9296640 > tmp[,c("col6","col20")] col6 col20 row1 0.6275556 0.5703707 row2 -0.8375561 2.1910690 row3 -1.0734052 1.3102005 row4 -0.6387836 -0.9150140 row5 -0.4396500 0.9296640 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.6275556 0.5703707 row5 -0.4396500 0.9296640 > > > > > 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 47.62757 49.4821 50.44512 51.58279 50.27915 105.3328 50.05235 51.10519 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.25421 53.01391 49.41553 49.8009 50.22703 51.18435 51.89075 51.2369 col17 col18 col19 col20 row1 47.99988 50.66222 50.2317 104.3665 > tmp[,"col10"] col10 row1 53.01391 row2 28.57202 row3 31.08724 row4 30.10158 row5 49.60393 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 47.62757 49.4821 50.44512 51.58279 50.27915 105.3328 50.05235 51.10519 row5 50.48163 50.1659 50.14063 49.77037 49.19473 107.3990 50.47781 49.85015 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.25421 53.01391 49.41553 49.80090 50.22703 51.18435 51.89075 51.23690 row5 50.62616 49.60393 49.50653 51.28727 51.34869 50.68798 52.75836 51.09179 col17 col18 col19 col20 row1 47.99988 50.66222 50.2317 104.3665 row5 50.39911 50.40341 49.0347 105.4593 > tmp[,c("col6","col20")] col6 col20 row1 105.33281 104.36650 row2 74.22667 75.78403 row3 74.57720 75.87704 row4 74.47917 75.68915 row5 107.39895 105.45930 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.3328 104.3665 row5 107.3990 105.4593 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.3328 104.3665 row5 107.3990 105.4593 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.4988672 [2,] 1.5940392 [3,] -0.7585972 [4,] -0.3264499 [5,] -0.8022004 > tmp[,c("col17","col7")] col17 col7 [1,] 0.05113204 -0.2596767 [2,] -0.91288633 1.9808374 [3,] 0.27438047 0.9657827 [4,] 1.15076968 -1.1959563 [5,] 0.83291047 2.4398903 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.16442118 0.8866434 [2,] -0.42778936 0.6243208 [3,] -0.03405151 -0.8563565 [4,] -0.08386582 0.7127437 [5,] -0.04267646 -2.1182803 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.1644212 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.1644212 [2,] -0.4277894 > > > > 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.02356459 0.9337187 -0.3551622 0.80120584 -0.4585574 0.710276 row1 -2.23299038 -0.7024499 0.7397466 0.07113261 -1.2660604 -0.509214 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.2093509 2.513231 -0.1179873 0.6518321 0.07280274 -0.2876281 -0.4307144 row1 -0.7452583 1.528331 0.5094185 -0.5283137 0.29864361 -0.5995592 -0.1368207 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.9922504 1.145956 0.75148809 -1.2400949 -0.7940468 -0.8770938 row1 1.0383566 -3.092505 -0.05177454 -0.5233479 -0.4927382 1.0593048 [,20] row3 -0.6829207 row1 -1.5202028 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 1.496723 -0.7297314 -1.223835 1.380659 -1.16617 0.2656505 0.6406108 [,8] [,9] [,10] row2 0.378098 -1.11598 0.02398687 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.1802433 -0.3960293 -1.587699 -1.497345 -1.812102 -0.5812636 -1.570416 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 1.268791 -2.009567 0.01767577 -0.5606833 -0.6102209 2.093194 0.8033374 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.258756 -2.883815 0.09729669 0.9430787 -1.058273 0.1534282 > > > 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: 0x600003af4600> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c986ea87aa4" [2] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c98770bddbd" [3] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c982c0ae05a" [4] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c987e0f4b4c" [5] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c981e18ab3c" [6] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c986591ff93" [7] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c9854223ffd" [8] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c9814972632" [9] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c984f4ca72d" [10] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c983173a407" [11] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c981f15e0ee" [12] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c9855623933" [13] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c9823996f10" [14] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c982e4a95b2" [15] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM14c9822a9f0dc" > > > ### 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: 0x600003aec1e0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600003aec1e0> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600003aec1e0> > rowMedians(tmp) [1] -0.072749330 -0.019728631 0.083889586 0.297233785 -0.107008880 [6] 0.322395848 -0.026010937 0.501289844 0.094170151 0.234686508 [11] 0.046325301 -0.380242435 -0.122909747 0.137536092 0.179073188 [16] 0.296621667 0.211772955 0.015130235 -0.087250810 -0.313193120 [21] -0.322149423 -0.068805894 -0.483756546 -0.390411814 -0.235350151 [26] 0.226559183 -0.125630490 -0.683064256 -0.020850019 -0.395499028 [31] 0.205114654 -0.265083880 -0.446864746 0.011561873 -0.123264300 [36] -0.161805415 -0.079884538 0.149003142 0.007168717 -0.230865638 [41] -0.246677304 0.150025959 0.482440221 0.023387045 -0.338544465 [46] -0.083694739 0.214691410 0.051048482 -0.170708453 -0.267869839 [51] 0.079903890 0.242819099 -0.459417853 -0.300300406 0.053473215 [56] 0.501632718 0.407200946 -0.418215526 0.261623088 -0.013537644 [61] 0.380869235 -0.252735589 0.107170818 -0.810356703 -0.170878540 [66] -0.532398015 0.639647379 0.023650070 0.511648642 -0.756382816 [71] 0.115260297 -0.013738602 0.006731721 0.187598507 0.216929182 [76] 0.024799014 -0.281919549 -0.401769067 0.376131093 -0.269004206 [81] -0.333385949 0.564107992 -0.423884475 0.085833814 -0.155777606 [86] -0.131242812 -0.106228682 -0.364477020 -0.021528710 -0.219621052 [91] 0.141747082 0.219802779 0.052405228 -0.429567292 -0.296401603 [96] 0.333349669 -0.048325427 -0.026274307 0.534469961 0.326556337 [101] 0.433754364 -0.299757874 -0.144128931 -0.262317035 -0.260085185 [106] 0.093765139 -0.260470474 -0.432421557 0.728610110 -0.141670058 [111] -0.334401082 -0.094594443 -0.155491689 -0.380965975 0.001532221 [116] -0.130632210 0.214120311 -0.287201752 0.497322413 -0.227624354 [121] 0.519833070 0.031623203 0.585461882 0.195586963 0.494738894 [126] 0.125213015 0.023424031 -0.237256157 0.177485976 -0.370245478 [131] -0.756170898 0.224453902 -0.522819691 0.056156459 -0.548289752 [136] 0.500826564 0.384675160 -0.093628258 0.301410010 -0.060697811 [141] 0.325985558 0.556112712 -0.546766934 -0.387971976 0.121836870 [146] 0.008300109 0.473847322 0.353379467 0.359965091 -0.108072159 [151] -0.320275477 -0.058624307 0.031946483 -0.433275137 0.391704356 [156] -0.520752535 0.200061835 -0.188763975 -0.187183220 0.340967692 [161] 0.290105434 -0.216088729 -0.287147921 -0.016331794 -0.201995637 [166] -0.555377197 0.090401762 0.011208951 0.334639640 0.211963730 [171] -0.530505521 0.240189242 0.039597626 -0.310963233 0.323179949 [176] 0.317868193 0.054607740 0.579548937 0.414478063 0.008263945 [181] -0.198540230 0.330593975 0.118519052 0.013463758 -0.431869711 [186] 0.144700746 -0.087867755 0.164164126 -0.365624854 0.626405139 [191] 0.457980748 0.270980791 0.181318148 -0.177342696 -0.114376549 [196] -0.106216690 0.797136637 0.333384895 0.122024084 -0.019416420 [201] 0.630106018 0.640174905 0.287863889 -0.177323603 0.112154329 [206] -0.344460113 0.389935482 -0.033252321 -0.451256324 0.028916028 [211] -0.487569942 0.124906297 0.340448710 0.293694846 -0.461112765 [216] 0.106303909 -0.558315310 0.307768329 -0.321463380 0.335685027 [221] -0.181539591 0.062695514 0.420605599 -0.187279241 0.464740815 [226] 0.176919269 0.416281746 -0.022459215 0.043280522 0.046431477 > > proc.time() user system elapsed 5.109 19.192 28.545
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" 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: 0x600002a44000> > .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: 0x600002a44000> > .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: 0x600002a44000> > .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: 0x600002a44000> > 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: 0x600002a70480> > .Call("R_bm_AddColumn",P) <pointer: 0x600002a70480> > .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: 0x600002a70480> > .Call("R_bm_AddColumn",P) <pointer: 0x600002a70480> > .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: 0x600002a70480> > 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: 0x600002a482a0> > .Call("R_bm_AddColumn",P) <pointer: 0x600002a482a0> > .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: 0x600002a482a0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600002a482a0> > .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: 0x600002a482a0> > > .Call("R_bm_RowMode",P) <pointer: 0x600002a482a0> > .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: 0x600002a482a0> > > .Call("R_bm_ColMode",P) <pointer: 0x600002a482a0> > .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: 0x600002a482a0> > 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: 0x600002a50060> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600002a50060> > .Call("R_bm_AddColumn",P) <pointer: 0x600002a50060> > .Call("R_bm_AddColumn",P) <pointer: 0x600002a50060> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile152281aad1fc6" "BufferedMatrixFile152285c010dd8" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile152281aad1fc6" "BufferedMatrixFile152285c010dd8" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600002a74300> > .Call("R_bm_AddColumn",P) <pointer: 0x600002a74300> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600002a74300> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600002a74300> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600002a74300> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600002a74300> > .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: 0x600002a54060> > .Call("R_bm_AddColumn",P) <pointer: 0x600002a54060> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600002a54060> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600002a54060> > 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: 0x600002a54240> > .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: 0x600002a54240> > rm(P) > > proc.time() user system elapsed 0.577 0.212 0.778
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" 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.577 0.135 0.695