Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-05-19 11:44 -0400 (Mon, 19 May 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | 4.5.0 RC (2025-04-04 r88126) -- "How About a Twenty-Six" | 4835 |
palomino7 | Windows Server 2022 Datacenter | x64 | 4.5.0 RC (2025-04-04 r88126 ucrt) -- "How About a Twenty-Six" | 4575 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.5.0 RC (2025-04-04 r88126) -- "How About a Twenty-Six" | 4600 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.5.0 RC (2025-04-04 r88129) -- "How About a Twenty-Six" | 4554 |
kunpeng2 | Linux (openEuler 24.03 LTS) | aarch64 | R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" | 4571 |
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.1 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino7 | Windows Server 2022 Datacenter / x64 | OK | ERROR | skipped | skipped | |||||||||
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-05-16 13:36:44 -0400 (Fri, 16 May 2025) |
EndedAt: 2025-05-16 13:37:22 -0400 (Fri, 16 May 2025) |
EllapsedTime: 37.9 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.0 RC (2025-04-04 r88129) * using platform: aarch64-apple-darwin20 * R was compiled by Apple clang version 14.0.0 (clang-1400.0.29.202) GNU Fortran (GCC) 14.2.0 * running under: macOS Ventura 13.7.5 * 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 15.0.0 (clang-1500.0.40.1)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking sizes of PDF files under ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.72.0’ ** using staged installation ** libs using C compiler: ‘Apple clang version 15.0.0 (clang-1500.0.40.1)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R installing to /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.5.0 RC (2025-04-04 r88129) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.332 0.103 0.429
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.0 RC (2025-04-04 r88129) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells 480809 25.7 1056525 56.5 NA 634428 33.9 Vcells 890970 6.8 8388608 64.0 65536 2108795 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 May 16 13:37:03 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 May 16 13:37:03 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: 0x600000c64de0> > > > > 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 May 16 13:37:06 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 May 16 13:37:07 2025" > > ColMode(tmp2) <pointer: 0x600000c64de0> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.38286750 -0.7863604 -0.4151873 0.3411912 [2,] -0.20989507 -1.0956169 -0.4974876 -0.3691847 [3,] 0.02972879 -1.3806393 0.6132690 0.4983650 [4,] -2.05622755 0.9124694 1.5615629 -0.8382751 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.38286750 0.7863604 0.4151873 0.3411912 [2,] 0.20989507 1.0956169 0.4974876 0.3691847 [3,] 0.02972879 1.3806393 0.6132690 0.4983650 [4,] 2.05622755 0.9124694 1.5615629 0.8382751 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 10.0191251 0.8867696 0.6443503 0.5841158 [2,] 0.4581431 1.0467172 0.7053280 0.6076057 [3,] 0.1724204 1.1750061 0.7831150 0.7059497 [4,] 1.4339552 0.9552326 1.2496251 0.9155737 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 225.57412 34.65406 31.85869 31.18235 [2,] 29.79133 36.56279 32.55077 31.44524 [3,] 26.75393 38.13070 33.44442 32.55786 [4,] 41.39578 35.46480 39.05781 34.99401 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600000c68000> > exp(tmp5) <pointer: 0x600000c68000> > log(tmp5,2) <pointer: 0x600000c68000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 469.503 > Min(tmp5) [1] 52.64426 > mean(tmp5) [1] 72.98781 > Sum(tmp5) [1] 14597.56 > Var(tmp5) [1] 869.1956 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 86.87189 68.11126 71.46576 76.51648 71.93693 72.81094 73.49794 70.09135 [9] 68.58186 69.99373 > rowSums(tmp5) [1] 1737.438 1362.225 1429.315 1530.330 1438.739 1456.219 1469.959 1401.827 [9] 1371.637 1399.875 > rowVars(tmp5) [1] 8188.50519 41.58010 84.95031 45.11179 68.21245 80.81358 [7] 52.31286 62.27482 88.86346 107.39388 > rowSd(tmp5) [1] 90.490360 6.448263 9.216849 6.716531 8.259083 8.989638 7.232763 [8] 7.891440 9.426742 10.363102 > rowMax(tmp5) [1] 469.50297 77.75054 84.12215 88.92923 87.07039 90.41825 85.05920 [8] 81.81466 84.94893 84.84910 > rowMin(tmp5) [1] 55.67573 57.38883 52.64426 66.21883 61.14890 58.85195 60.90846 54.28368 [9] 55.94114 55.02855 > > colMeans(tmp5) [1] 110.83615 73.69524 72.47240 71.26963 73.60163 71.27270 64.74954 [8] 73.26651 71.36938 69.57796 69.92785 73.24564 70.68980 68.74923 [15] 71.53586 71.88254 66.59470 72.31043 71.25524 71.45386 > colSums(tmp5) [1] 1108.3615 736.9524 724.7240 712.6963 736.0163 712.7270 647.4954 [8] 732.6651 713.6938 695.7796 699.2785 732.4564 706.8980 687.4923 [15] 715.3586 718.8254 665.9470 723.1043 712.5524 714.5386 > colVars(tmp5) [1] 15961.48572 69.95510 64.37567 41.87003 134.60087 32.42876 [7] 74.73064 80.12252 60.55296 76.80971 55.16752 64.41341 [13] 60.15493 53.32050 87.14919 183.60341 80.90297 87.64507 [19] 72.56544 94.33946 > colSd(tmp5) [1] 126.338774 8.363916 8.023445 6.470706 11.601761 5.694625 [7] 8.644688 8.951118 7.781578 8.764115 7.427484 8.025797 [13] 7.755961 7.302089 9.335373 13.550033 8.994608 9.361894 [19] 8.518535 9.712850 > colMax(tmp5) [1] 469.50297 83.50183 81.81466 81.35712 93.10771 77.46004 88.39598 [8] 84.64781 86.04158 80.80487 84.75932 82.21023 83.55545 79.71604 [15] 86.62444 90.41825 83.79801 84.84910 88.92923 87.07039 > colMin(tmp5) [1] 55.68481 56.74295 58.91343 62.77171 55.12107 62.02272 56.74604 60.70161 [9] 59.37709 55.02855 61.27286 55.79566 59.84405 55.67573 56.17745 54.28368 [17] 52.64426 58.85195 58.57076 57.38883 > > > ### 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] 86.87189 68.11126 71.46576 76.51648 71.93693 NA 73.49794 70.09135 [9] 68.58186 69.99373 > rowSums(tmp5) [1] 1737.438 1362.225 1429.315 1530.330 1438.739 NA 1469.959 1401.827 [9] 1371.637 1399.875 > rowVars(tmp5) [1] 8188.50519 41.58010 84.95031 45.11179 68.21245 84.75320 [7] 52.31286 62.27482 88.86346 107.39388 > rowSd(tmp5) [1] 90.490360 6.448263 9.216849 6.716531 8.259083 9.206150 7.232763 [8] 7.891440 9.426742 10.363102 > rowMax(tmp5) [1] 469.50297 77.75054 84.12215 88.92923 87.07039 NA 85.05920 [8] 81.81466 84.94893 84.84910 > rowMin(tmp5) [1] 55.67573 57.38883 52.64426 66.21883 61.14890 NA 60.90846 54.28368 [9] 55.94114 55.02855 > > colMeans(tmp5) [1] 110.83615 73.69524 72.47240 71.26963 73.60163 71.27270 64.74954 [8] 73.26651 71.36938 69.57796 69.92785 NA 70.68980 68.74923 [15] 71.53586 71.88254 66.59470 72.31043 71.25524 71.45386 > colSums(tmp5) [1] 1108.3615 736.9524 724.7240 712.6963 736.0163 712.7270 647.4954 [8] 732.6651 713.6938 695.7796 699.2785 NA 706.8980 687.4923 [15] 715.3586 718.8254 665.9470 723.1043 712.5524 714.5386 > colVars(tmp5) [1] 15961.48572 69.95510 64.37567 41.87003 134.60087 32.42876 [7] 74.73064 80.12252 60.55296 76.80971 55.16752 NA [13] 60.15493 53.32050 87.14919 183.60341 80.90297 87.64507 [19] 72.56544 94.33946 > colSd(tmp5) [1] 126.338774 8.363916 8.023445 6.470706 11.601761 5.694625 [7] 8.644688 8.951118 7.781578 8.764115 7.427484 NA [13] 7.755961 7.302089 9.335373 13.550033 8.994608 9.361894 [19] 8.518535 9.712850 > colMax(tmp5) [1] 469.50297 83.50183 81.81466 81.35712 93.10771 77.46004 88.39598 [8] 84.64781 86.04158 80.80487 84.75932 NA 83.55545 79.71604 [15] 86.62444 90.41825 83.79801 84.84910 88.92923 87.07039 > colMin(tmp5) [1] 55.68481 56.74295 58.91343 62.77171 55.12107 62.02272 56.74604 60.70161 [9] 59.37709 55.02855 61.27286 NA 59.84405 55.67573 56.17745 54.28368 [17] 52.64426 58.85195 58.57076 57.38883 > > Max(tmp5,na.rm=TRUE) [1] 469.503 > Min(tmp5,na.rm=TRUE) [1] 52.64426 > mean(tmp5,na.rm=TRUE) [1] 73.00411 > Sum(tmp5,na.rm=TRUE) [1] 14527.82 > Var(tmp5,na.rm=TRUE) [1] 873.5321 > > rowMeans(tmp5,na.rm=TRUE) [1] 86.87189 68.11126 71.46576 76.51648 71.93693 72.97235 73.49794 70.09135 [9] 68.58186 69.99373 > rowSums(tmp5,na.rm=TRUE) [1] 1737.438 1362.225 1429.315 1530.330 1438.739 1386.475 1469.959 1401.827 [9] 1371.637 1399.875 > rowVars(tmp5,na.rm=TRUE) [1] 8188.50519 41.58010 84.95031 45.11179 68.21245 84.75320 [7] 52.31286 62.27482 88.86346 107.39388 > rowSd(tmp5,na.rm=TRUE) [1] 90.490360 6.448263 9.216849 6.716531 8.259083 9.206150 7.232763 [8] 7.891440 9.426742 10.363102 > rowMax(tmp5,na.rm=TRUE) [1] 469.50297 77.75054 84.12215 88.92923 87.07039 90.41825 85.05920 [8] 81.81466 84.94893 84.84910 > rowMin(tmp5,na.rm=TRUE) [1] 55.67573 57.38883 52.64426 66.21883 61.14890 58.85195 60.90846 54.28368 [9] 55.94114 55.02855 > > colMeans(tmp5,na.rm=TRUE) [1] 110.83615 73.69524 72.47240 71.26963 73.60163 71.27270 64.74954 [8] 73.26651 71.36938 69.57796 69.92785 73.63470 70.68980 68.74923 [15] 71.53586 71.88254 66.59470 72.31043 71.25524 71.45386 > colSums(tmp5,na.rm=TRUE) [1] 1108.3615 736.9524 724.7240 712.6963 736.0163 712.7270 647.4954 [8] 732.6651 713.6938 695.7796 699.2785 662.7123 706.8980 687.4923 [15] 715.3586 718.8254 665.9470 723.1043 712.5524 714.5386 > colVars(tmp5,na.rm=TRUE) [1] 15961.48572 69.95510 64.37567 41.87003 134.60087 32.42876 [7] 74.73064 80.12252 60.55296 76.80971 55.16752 70.76220 [13] 60.15493 53.32050 87.14919 183.60341 80.90297 87.64507 [19] 72.56544 94.33946 > colSd(tmp5,na.rm=TRUE) [1] 126.338774 8.363916 8.023445 6.470706 11.601761 5.694625 [7] 8.644688 8.951118 7.781578 8.764115 7.427484 8.412027 [13] 7.755961 7.302089 9.335373 13.550033 8.994608 9.361894 [19] 8.518535 9.712850 > colMax(tmp5,na.rm=TRUE) [1] 469.50297 83.50183 81.81466 81.35712 93.10771 77.46004 88.39598 [8] 84.64781 86.04158 80.80487 84.75932 82.21023 83.55545 79.71604 [15] 86.62444 90.41825 83.79801 84.84910 88.92923 87.07039 > colMin(tmp5,na.rm=TRUE) [1] 55.68481 56.74295 58.91343 62.77171 55.12107 62.02272 56.74604 60.70161 [9] 59.37709 55.02855 61.27286 55.79566 59.84405 55.67573 56.17745 54.28368 [17] 52.64426 58.85195 58.57076 57.38883 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 86.87189 68.11126 71.46576 76.51648 71.93693 NaN 73.49794 70.09135 [9] 68.58186 69.99373 > rowSums(tmp5,na.rm=TRUE) [1] 1737.438 1362.225 1429.315 1530.330 1438.739 0.000 1469.959 1401.827 [9] 1371.637 1399.875 > rowVars(tmp5,na.rm=TRUE) [1] 8188.50519 41.58010 84.95031 45.11179 68.21245 NA [7] 52.31286 62.27482 88.86346 107.39388 > rowSd(tmp5,na.rm=TRUE) [1] 90.490360 6.448263 9.216849 6.716531 8.259083 NA 7.232763 [8] 7.891440 9.426742 10.363102 > rowMax(tmp5,na.rm=TRUE) [1] 469.50297 77.75054 84.12215 88.92923 87.07039 NA 85.05920 [8] 81.81466 84.94893 84.84910 > rowMin(tmp5,na.rm=TRUE) [1] 55.67573 57.38883 52.64426 66.21883 61.14890 NA 60.90846 54.28368 [9] 55.94114 55.02855 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 114.64885 72.67154 71.97781 71.50430 73.59406 70.82592 65.10793 [8] 72.27715 71.43361 68.33053 70.88951 NaN 71.89488 68.72489 [15] 69.85935 69.82301 66.00953 73.80581 70.87631 72.25963 > colSums(tmp5,na.rm=TRUE) [1] 1031.8397 654.0439 647.8003 643.5387 662.3465 637.4333 585.9714 [8] 650.4944 642.9025 614.9748 638.0056 0.0000 647.0539 618.5240 [15] 628.7342 628.4071 594.0858 664.2523 637.8868 650.3367 > colVars(tmp5,na.rm=TRUE) [1] 17793.13333 66.90996 69.67067 46.48421 151.42533 34.23666 [7] 82.62697 79.12597 68.07568 68.90489 51.65945 NA [13] 51.33675 59.97890 66.42265 158.83542 87.16358 73.44366 [19] 80.02070 98.82767 > colSd(tmp5,na.rm=TRUE) [1] 133.390904 8.179851 8.346896 6.817933 12.305500 5.851210 [7] 9.089938 8.895278 8.250799 8.300897 7.187451 NA [13] 7.164967 7.744605 8.150009 12.602993 9.336144 8.569927 [19] 8.945429 9.941211 > colMax(tmp5,na.rm=TRUE) [1] 469.50297 83.50183 81.81466 81.35712 93.10771 77.46004 88.39598 [8] 84.64781 86.04158 78.05452 84.75932 -Inf 83.55545 79.71604 [15] 78.91410 85.05920 83.79801 84.84910 88.92923 87.07039 > colMin(tmp5,na.rm=TRUE) [1] 55.68481 56.74295 58.91343 62.77171 55.12107 62.02272 56.74604 60.70161 [9] 59.37709 55.02855 63.58708 Inf 63.24406 55.67573 56.17745 54.28368 [17] 52.64426 61.11784 58.57076 57.38883 > > > > > 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] 264.4190 222.0927 148.7314 340.5224 202.7917 243.5276 186.8487 191.7461 [9] 148.3924 240.5381 > apply(copymatrix,1,var,na.rm=TRUE) [1] 264.4190 222.0927 148.7314 340.5224 202.7917 243.5276 186.8487 191.7461 [9] 148.3924 240.5381 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 2.842171e-14 0.000000e+00 -8.526513e-14 -2.842171e-14 5.684342e-14 [6] -5.684342e-14 2.842171e-14 0.000000e+00 -4.263256e-14 1.136868e-13 [11] 2.842171e-14 5.684342e-14 -1.136868e-13 2.842171e-14 -5.684342e-14 [16] 0.000000e+00 1.136868e-13 -5.684342e-14 1.705303e-13 -2.842171e-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) + } 1 16 9 9 10 5 5 18 7 9 9 14 5 2 9 11 2 11 7 8 9 2 7 20 8 12 6 13 6 5 2 7 6 3 4 10 6 7 4 7 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.031409 > Min(tmp) [1] -2.008538 > mean(tmp) [1] 0.09619113 > Sum(tmp) [1] 9.619113 > Var(tmp) [1] 0.7603718 > > rowMeans(tmp) [1] 0.09619113 > rowSums(tmp) [1] 9.619113 > rowVars(tmp) [1] 0.7603718 > rowSd(tmp) [1] 0.871993 > rowMax(tmp) [1] 2.031409 > rowMin(tmp) [1] -2.008538 > > colMeans(tmp) [1] 0.78689407 0.79749813 -0.07138020 -0.87815348 1.10679920 -1.08332705 [7] -1.06283709 0.14787693 0.91279146 0.12474310 0.57908341 0.20769679 [13] 0.29884181 -0.17135328 0.77486544 1.04700405 -0.19999454 1.81100896 [19] -0.35901382 -0.85382118 -0.88850975 0.07104268 0.26137251 -1.34747029 [25] -1.01379765 -0.21092751 0.03131840 -1.65611961 -1.27118785 -0.10433037 [31] -0.45578430 0.64473378 -0.98818531 -0.33019480 1.15914939 1.23547523 [37] 0.40643318 0.24723673 -0.51014011 -0.66829087 0.41812729 2.00840316 [43] 1.17788093 -0.36212856 -0.79941758 -0.85840407 -0.76736018 -0.20393349 [49] 0.17521346 2.03140919 1.17354349 0.12642573 0.27859064 -0.30019418 [55] -0.69065218 0.73865325 1.11941657 0.54212539 0.82194586 0.66161619 [61] -0.15326592 -1.04955755 -0.64085335 0.25678482 0.23226381 1.68569699 [67] 1.42121468 -0.08746669 0.31535095 0.83664868 -0.76057560 0.29251144 [73] 1.12298590 -0.62789506 0.55203546 0.56926878 0.44020912 1.92090413 [79] 1.08832757 1.36519206 -1.23269138 0.10315473 -0.89836288 -0.90538529 [85] -0.08786991 0.14402300 -0.33965003 -2.00853805 1.26239140 0.43877752 [91] 0.27684446 0.49027596 -1.45739697 0.41025789 -1.20393601 0.22187995 [97] 0.87172589 -1.14595837 0.28823213 -0.20674848 > colSums(tmp) [1] 0.78689407 0.79749813 -0.07138020 -0.87815348 1.10679920 -1.08332705 [7] -1.06283709 0.14787693 0.91279146 0.12474310 0.57908341 0.20769679 [13] 0.29884181 -0.17135328 0.77486544 1.04700405 -0.19999454 1.81100896 [19] -0.35901382 -0.85382118 -0.88850975 0.07104268 0.26137251 -1.34747029 [25] -1.01379765 -0.21092751 0.03131840 -1.65611961 -1.27118785 -0.10433037 [31] -0.45578430 0.64473378 -0.98818531 -0.33019480 1.15914939 1.23547523 [37] 0.40643318 0.24723673 -0.51014011 -0.66829087 0.41812729 2.00840316 [43] 1.17788093 -0.36212856 -0.79941758 -0.85840407 -0.76736018 -0.20393349 [49] 0.17521346 2.03140919 1.17354349 0.12642573 0.27859064 -0.30019418 [55] -0.69065218 0.73865325 1.11941657 0.54212539 0.82194586 0.66161619 [61] -0.15326592 -1.04955755 -0.64085335 0.25678482 0.23226381 1.68569699 [67] 1.42121468 -0.08746669 0.31535095 0.83664868 -0.76057560 0.29251144 [73] 1.12298590 -0.62789506 0.55203546 0.56926878 0.44020912 1.92090413 [79] 1.08832757 1.36519206 -1.23269138 0.10315473 -0.89836288 -0.90538529 [85] -0.08786991 0.14402300 -0.33965003 -2.00853805 1.26239140 0.43877752 [91] 0.27684446 0.49027596 -1.45739697 0.41025789 -1.20393601 0.22187995 [97] 0.87172589 -1.14595837 0.28823213 -0.20674848 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] 0.78689407 0.79749813 -0.07138020 -0.87815348 1.10679920 -1.08332705 [7] -1.06283709 0.14787693 0.91279146 0.12474310 0.57908341 0.20769679 [13] 0.29884181 -0.17135328 0.77486544 1.04700405 -0.19999454 1.81100896 [19] -0.35901382 -0.85382118 -0.88850975 0.07104268 0.26137251 -1.34747029 [25] -1.01379765 -0.21092751 0.03131840 -1.65611961 -1.27118785 -0.10433037 [31] -0.45578430 0.64473378 -0.98818531 -0.33019480 1.15914939 1.23547523 [37] 0.40643318 0.24723673 -0.51014011 -0.66829087 0.41812729 2.00840316 [43] 1.17788093 -0.36212856 -0.79941758 -0.85840407 -0.76736018 -0.20393349 [49] 0.17521346 2.03140919 1.17354349 0.12642573 0.27859064 -0.30019418 [55] -0.69065218 0.73865325 1.11941657 0.54212539 0.82194586 0.66161619 [61] -0.15326592 -1.04955755 -0.64085335 0.25678482 0.23226381 1.68569699 [67] 1.42121468 -0.08746669 0.31535095 0.83664868 -0.76057560 0.29251144 [73] 1.12298590 -0.62789506 0.55203546 0.56926878 0.44020912 1.92090413 [79] 1.08832757 1.36519206 -1.23269138 0.10315473 -0.89836288 -0.90538529 [85] -0.08786991 0.14402300 -0.33965003 -2.00853805 1.26239140 0.43877752 [91] 0.27684446 0.49027596 -1.45739697 0.41025789 -1.20393601 0.22187995 [97] 0.87172589 -1.14595837 0.28823213 -0.20674848 > colMin(tmp) [1] 0.78689407 0.79749813 -0.07138020 -0.87815348 1.10679920 -1.08332705 [7] -1.06283709 0.14787693 0.91279146 0.12474310 0.57908341 0.20769679 [13] 0.29884181 -0.17135328 0.77486544 1.04700405 -0.19999454 1.81100896 [19] -0.35901382 -0.85382118 -0.88850975 0.07104268 0.26137251 -1.34747029 [25] -1.01379765 -0.21092751 0.03131840 -1.65611961 -1.27118785 -0.10433037 [31] -0.45578430 0.64473378 -0.98818531 -0.33019480 1.15914939 1.23547523 [37] 0.40643318 0.24723673 -0.51014011 -0.66829087 0.41812729 2.00840316 [43] 1.17788093 -0.36212856 -0.79941758 -0.85840407 -0.76736018 -0.20393349 [49] 0.17521346 2.03140919 1.17354349 0.12642573 0.27859064 -0.30019418 [55] -0.69065218 0.73865325 1.11941657 0.54212539 0.82194586 0.66161619 [61] -0.15326592 -1.04955755 -0.64085335 0.25678482 0.23226381 1.68569699 [67] 1.42121468 -0.08746669 0.31535095 0.83664868 -0.76057560 0.29251144 [73] 1.12298590 -0.62789506 0.55203546 0.56926878 0.44020912 1.92090413 [79] 1.08832757 1.36519206 -1.23269138 0.10315473 -0.89836288 -0.90538529 [85] -0.08786991 0.14402300 -0.33965003 -2.00853805 1.26239140 0.43877752 [91] 0.27684446 0.49027596 -1.45739697 0.41025789 -1.20393601 0.22187995 [97] 0.87172589 -1.14595837 0.28823213 -0.20674848 > colMedians(tmp) [1] 0.78689407 0.79749813 -0.07138020 -0.87815348 1.10679920 -1.08332705 [7] -1.06283709 0.14787693 0.91279146 0.12474310 0.57908341 0.20769679 [13] 0.29884181 -0.17135328 0.77486544 1.04700405 -0.19999454 1.81100896 [19] -0.35901382 -0.85382118 -0.88850975 0.07104268 0.26137251 -1.34747029 [25] -1.01379765 -0.21092751 0.03131840 -1.65611961 -1.27118785 -0.10433037 [31] -0.45578430 0.64473378 -0.98818531 -0.33019480 1.15914939 1.23547523 [37] 0.40643318 0.24723673 -0.51014011 -0.66829087 0.41812729 2.00840316 [43] 1.17788093 -0.36212856 -0.79941758 -0.85840407 -0.76736018 -0.20393349 [49] 0.17521346 2.03140919 1.17354349 0.12642573 0.27859064 -0.30019418 [55] -0.69065218 0.73865325 1.11941657 0.54212539 0.82194586 0.66161619 [61] -0.15326592 -1.04955755 -0.64085335 0.25678482 0.23226381 1.68569699 [67] 1.42121468 -0.08746669 0.31535095 0.83664868 -0.76057560 0.29251144 [73] 1.12298590 -0.62789506 0.55203546 0.56926878 0.44020912 1.92090413 [79] 1.08832757 1.36519206 -1.23269138 0.10315473 -0.89836288 -0.90538529 [85] -0.08786991 0.14402300 -0.33965003 -2.00853805 1.26239140 0.43877752 [91] 0.27684446 0.49027596 -1.45739697 0.41025789 -1.20393601 0.22187995 [97] 0.87172589 -1.14595837 0.28823213 -0.20674848 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.7868941 0.7974981 -0.0713802 -0.8781535 1.106799 -1.083327 -1.062837 [2,] 0.7868941 0.7974981 -0.0713802 -0.8781535 1.106799 -1.083327 -1.062837 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.1478769 0.9127915 0.1247431 0.5790834 0.2076968 0.2988418 -0.1713533 [2,] 0.1478769 0.9127915 0.1247431 0.5790834 0.2076968 0.2988418 -0.1713533 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.7748654 1.047004 -0.1999945 1.811009 -0.3590138 -0.8538212 -0.8885098 [2,] 0.7748654 1.047004 -0.1999945 1.811009 -0.3590138 -0.8538212 -0.8885098 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.07104268 0.2613725 -1.34747 -1.013798 -0.2109275 0.0313184 -1.65612 [2,] 0.07104268 0.2613725 -1.34747 -1.013798 -0.2109275 0.0313184 -1.65612 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -1.271188 -0.1043304 -0.4557843 0.6447338 -0.9881853 -0.3301948 1.159149 [2,] -1.271188 -0.1043304 -0.4557843 0.6447338 -0.9881853 -0.3301948 1.159149 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 1.235475 0.4064332 0.2472367 -0.5101401 -0.6682909 0.4181273 2.008403 [2,] 1.235475 0.4064332 0.2472367 -0.5101401 -0.6682909 0.4181273 2.008403 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 1.177881 -0.3621286 -0.7994176 -0.8584041 -0.7673602 -0.2039335 0.1752135 [2,] 1.177881 -0.3621286 -0.7994176 -0.8584041 -0.7673602 -0.2039335 0.1752135 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 2.031409 1.173543 0.1264257 0.2785906 -0.3001942 -0.6906522 0.7386533 [2,] 2.031409 1.173543 0.1264257 0.2785906 -0.3001942 -0.6906522 0.7386533 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 1.119417 0.5421254 0.8219459 0.6616162 -0.1532659 -1.049558 -0.6408533 [2,] 1.119417 0.5421254 0.8219459 0.6616162 -0.1532659 -1.049558 -0.6408533 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.2567848 0.2322638 1.685697 1.421215 -0.08746669 0.315351 0.8366487 [2,] 0.2567848 0.2322638 1.685697 1.421215 -0.08746669 0.315351 0.8366487 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.7605756 0.2925114 1.122986 -0.6278951 0.5520355 0.5692688 0.4402091 [2,] -0.7605756 0.2925114 1.122986 -0.6278951 0.5520355 0.5692688 0.4402091 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 1.920904 1.088328 1.365192 -1.232691 0.1031547 -0.8983629 -0.9053853 [2,] 1.920904 1.088328 1.365192 -1.232691 0.1031547 -0.8983629 -0.9053853 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.08786991 0.144023 -0.33965 -2.008538 1.262391 0.4387775 0.2768445 [2,] -0.08786991 0.144023 -0.33965 -2.008538 1.262391 0.4387775 0.2768445 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.490276 -1.457397 0.4102579 -1.203936 0.2218799 0.8717259 -1.145958 [2,] 0.490276 -1.457397 0.4102579 -1.203936 0.2218799 0.8717259 -1.145958 [,99] [,100] [1,] 0.2882321 -0.2067485 [2,] 0.2882321 -0.2067485 > > > Max(tmp2) [1] 2.125765 > Min(tmp2) [1] -2.165415 > mean(tmp2) [1] 0.0247308 > Sum(tmp2) [1] 2.47308 > Var(tmp2) [1] 0.8172926 > > rowMeans(tmp2) [1] -0.720988057 -1.707812982 0.273895213 -0.002284812 1.405224773 [6] -0.020715597 0.883792106 -0.028418818 -0.579018929 0.558949380 [11] 0.387975147 -0.966858158 0.167505088 0.472460934 -0.484918727 [16] -1.090605481 1.136959277 -0.309706644 0.378608737 0.136614928 [21] -0.058728486 -0.414647980 -0.339201892 2.091647995 0.384137722 [26] -0.089788651 -0.335098134 1.492299593 0.145452496 -0.585233734 [31] 0.904863804 -0.132079426 0.854992159 -0.500467590 -1.044793505 [36] 1.134310517 -0.124489789 0.351640941 0.818467615 0.142974997 [41] 0.281748349 0.315364319 -0.431817847 -0.081180781 -0.237332952 [46] 0.242137929 2.103078299 -0.426773484 1.336585872 -0.661017151 [51] 1.392629375 -0.632837778 0.682885397 0.182917736 -1.040813427 [56] 0.845014791 1.413321698 -0.525537082 -0.452361881 0.739913122 [61] 0.822521662 0.152853581 1.204658174 1.012846961 -1.371406576 [66] 2.125764777 -1.220154830 -0.448086666 -0.045230693 -0.894854384 [71] -0.255204711 -0.400345438 0.369508142 -0.311795989 -1.417987630 [76] -0.681808507 -0.797372998 1.628580341 -0.147583202 0.282463022 [81] 0.844672940 -0.925401675 -1.592702638 0.204369442 1.338642443 [86] 0.958944935 -2.120207680 0.826814908 -0.927344829 -0.275061095 [91] 0.108681145 0.699138686 -1.917172714 -0.232206138 0.088711011 [96] -2.165415385 -0.034853582 0.186417918 -0.595014838 -1.238138416 > rowSums(tmp2) [1] -0.720988057 -1.707812982 0.273895213 -0.002284812 1.405224773 [6] -0.020715597 0.883792106 -0.028418818 -0.579018929 0.558949380 [11] 0.387975147 -0.966858158 0.167505088 0.472460934 -0.484918727 [16] -1.090605481 1.136959277 -0.309706644 0.378608737 0.136614928 [21] -0.058728486 -0.414647980 -0.339201892 2.091647995 0.384137722 [26] -0.089788651 -0.335098134 1.492299593 0.145452496 -0.585233734 [31] 0.904863804 -0.132079426 0.854992159 -0.500467590 -1.044793505 [36] 1.134310517 -0.124489789 0.351640941 0.818467615 0.142974997 [41] 0.281748349 0.315364319 -0.431817847 -0.081180781 -0.237332952 [46] 0.242137929 2.103078299 -0.426773484 1.336585872 -0.661017151 [51] 1.392629375 -0.632837778 0.682885397 0.182917736 -1.040813427 [56] 0.845014791 1.413321698 -0.525537082 -0.452361881 0.739913122 [61] 0.822521662 0.152853581 1.204658174 1.012846961 -1.371406576 [66] 2.125764777 -1.220154830 -0.448086666 -0.045230693 -0.894854384 [71] -0.255204711 -0.400345438 0.369508142 -0.311795989 -1.417987630 [76] -0.681808507 -0.797372998 1.628580341 -0.147583202 0.282463022 [81] 0.844672940 -0.925401675 -1.592702638 0.204369442 1.338642443 [86] 0.958944935 -2.120207680 0.826814908 -0.927344829 -0.275061095 [91] 0.108681145 0.699138686 -1.917172714 -0.232206138 0.088711011 [96] -2.165415385 -0.034853582 0.186417918 -0.595014838 -1.238138416 > 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.720988057 -1.707812982 0.273895213 -0.002284812 1.405224773 [6] -0.020715597 0.883792106 -0.028418818 -0.579018929 0.558949380 [11] 0.387975147 -0.966858158 0.167505088 0.472460934 -0.484918727 [16] -1.090605481 1.136959277 -0.309706644 0.378608737 0.136614928 [21] -0.058728486 -0.414647980 -0.339201892 2.091647995 0.384137722 [26] -0.089788651 -0.335098134 1.492299593 0.145452496 -0.585233734 [31] 0.904863804 -0.132079426 0.854992159 -0.500467590 -1.044793505 [36] 1.134310517 -0.124489789 0.351640941 0.818467615 0.142974997 [41] 0.281748349 0.315364319 -0.431817847 -0.081180781 -0.237332952 [46] 0.242137929 2.103078299 -0.426773484 1.336585872 -0.661017151 [51] 1.392629375 -0.632837778 0.682885397 0.182917736 -1.040813427 [56] 0.845014791 1.413321698 -0.525537082 -0.452361881 0.739913122 [61] 0.822521662 0.152853581 1.204658174 1.012846961 -1.371406576 [66] 2.125764777 -1.220154830 -0.448086666 -0.045230693 -0.894854384 [71] -0.255204711 -0.400345438 0.369508142 -0.311795989 -1.417987630 [76] -0.681808507 -0.797372998 1.628580341 -0.147583202 0.282463022 [81] 0.844672940 -0.925401675 -1.592702638 0.204369442 1.338642443 [86] 0.958944935 -2.120207680 0.826814908 -0.927344829 -0.275061095 [91] 0.108681145 0.699138686 -1.917172714 -0.232206138 0.088711011 [96] -2.165415385 -0.034853582 0.186417918 -0.595014838 -1.238138416 > rowMin(tmp2) [1] -0.720988057 -1.707812982 0.273895213 -0.002284812 1.405224773 [6] -0.020715597 0.883792106 -0.028418818 -0.579018929 0.558949380 [11] 0.387975147 -0.966858158 0.167505088 0.472460934 -0.484918727 [16] -1.090605481 1.136959277 -0.309706644 0.378608737 0.136614928 [21] -0.058728486 -0.414647980 -0.339201892 2.091647995 0.384137722 [26] -0.089788651 -0.335098134 1.492299593 0.145452496 -0.585233734 [31] 0.904863804 -0.132079426 0.854992159 -0.500467590 -1.044793505 [36] 1.134310517 -0.124489789 0.351640941 0.818467615 0.142974997 [41] 0.281748349 0.315364319 -0.431817847 -0.081180781 -0.237332952 [46] 0.242137929 2.103078299 -0.426773484 1.336585872 -0.661017151 [51] 1.392629375 -0.632837778 0.682885397 0.182917736 -1.040813427 [56] 0.845014791 1.413321698 -0.525537082 -0.452361881 0.739913122 [61] 0.822521662 0.152853581 1.204658174 1.012846961 -1.371406576 [66] 2.125764777 -1.220154830 -0.448086666 -0.045230693 -0.894854384 [71] -0.255204711 -0.400345438 0.369508142 -0.311795989 -1.417987630 [76] -0.681808507 -0.797372998 1.628580341 -0.147583202 0.282463022 [81] 0.844672940 -0.925401675 -1.592702638 0.204369442 1.338642443 [86] 0.958944935 -2.120207680 0.826814908 -0.927344829 -0.275061095 [91] 0.108681145 0.699138686 -1.917172714 -0.232206138 0.088711011 [96] -2.165415385 -0.034853582 0.186417918 -0.595014838 -1.238138416 > > colMeans(tmp2) [1] 0.0247308 > colSums(tmp2) [1] 2.47308 > colVars(tmp2) [1] 0.8172926 > colSd(tmp2) [1] 0.9040424 > colMax(tmp2) [1] 2.125765 > colMin(tmp2) [1] -2.165415 > colMedians(tmp2) [1] -0.02456721 > colRanges(tmp2) [,1] [1,] -2.165415 [2,] 2.125765 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 2.80219978 -0.88612925 -0.60047404 -0.84043977 3.63622284 0.38617770 [7] 3.41113778 -2.19292127 -0.01117846 0.56325803 > colApply(tmp,quantile)[,1] [,1] [1,] -1.094311 [2,] -0.606727 [3,] 0.600022 [4,] 0.947336 [5,] 1.575349 > > rowApply(tmp,sum) [1] 6.621893 -1.063237 1.516025 3.472059 2.948042 -1.034089 5.431862 [8] -2.655190 -6.302185 -2.667327 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 6 2 6 8 10 8 9 2 6 6 [2,] 4 8 5 10 3 1 5 8 8 2 [3,] 7 1 10 6 1 6 8 1 7 3 [4,] 3 4 7 2 7 4 4 9 5 7 [5,] 8 7 9 4 5 5 2 5 9 9 [6,] 5 6 2 3 9 7 7 3 3 8 [7,] 1 9 8 1 8 10 6 7 2 10 [8,] 9 3 3 7 2 2 1 10 4 5 [9,] 2 5 4 9 6 9 10 4 1 4 [10,] 10 10 1 5 4 3 3 6 10 1 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -1.91593591 -6.34515510 -0.07706213 -0.28536795 1.75359829 0.29973351 [7] -5.26293259 2.40009695 -0.62256706 0.09930997 1.28902636 0.30485914 [13] -3.24923185 -2.12621259 -0.35716395 1.33311150 1.03022427 0.18458046 [19] -0.65780394 2.33691913 > colApply(tmp,quantile)[,1] [,1] [1,] -0.9441712 [2,] -0.6634269 [3,] -0.6449996 [4,] -0.2905924 [5,] 0.6272542 > > rowApply(tmp,sum) [1] -9.030945 -1.120761 1.300010 3.846901 -4.863178 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 11 6 2 13 7 [2,] 4 16 8 3 1 [3,] 5 3 14 18 15 [4,] 8 8 7 10 14 [5,] 12 11 9 16 18 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.2905924 -1.6052837 -1.1247456 -0.4780407 -0.26539116 2.0053701 [2,] -0.6634269 0.7141310 -1.2380658 -0.2907830 -0.04370646 -1.7588443 [3,] -0.9441712 -0.2777171 0.3860244 -0.3144144 -0.05139788 0.8318385 [4,] 0.6272542 -0.7439425 1.3192967 0.3127073 0.81798146 1.4079051 [5,] -0.6449996 -4.4323428 0.5804281 0.4851628 1.29611233 -2.1865358 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.4456187 -0.03638868 -0.73896046 0.6348685 -0.5659042 -0.07913751 [2,] -2.1978101 1.53765229 0.68952118 -0.4806053 0.3826536 0.24415455 [3,] -0.8939477 0.30196351 -0.56876108 -0.5060900 1.2493321 1.09342889 [4,] -1.2947454 0.85286158 -0.10301414 -0.4840873 -0.5319147 0.54159920 [5,] -1.3220481 -0.25599174 0.09864744 0.9352240 0.7548595 -1.49518599 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -1.6516284 -1.9320884 -0.02395988 -0.223086 -0.38944646 -0.4741746 [2,] -0.0125967 -1.1689405 1.60705890 -1.064663 -0.08882318 -0.1411473 [3,] -1.5388414 0.6100514 -0.86715486 1.241082 0.06327451 0.9839359 [4,] -1.6281111 0.6788398 0.42925583 1.365392 -0.53102668 0.7092814 [5,] 1.5819458 -0.3140748 -1.50236393 0.014387 1.97624607 -0.8933149 [,19] [,20] [1,] -2.0927505 -0.14522356 [2,] 0.9888342 1.86464588 [3,] 0.2441480 0.25742729 [4,] -0.1661951 0.26756249 [5,] 0.3681595 0.09250702 > > > 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 : 565 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 -0.1410176 1.282186 0.2897304 -0.478003 1.184666 0.410794 -0.2712949 col8 col9 col10 col11 col12 col13 col14 row1 -0.4688348 0.6086548 0.827547 0.1231001 0.4610089 -0.6216027 -0.2281741 col15 col16 col17 col18 col19 col20 row1 -0.4000666 -1.118131 -0.1144273 -1.16201 -0.8297051 0.5662828 > tmp[,"col10"] col10 row1 0.8275470 row2 1.0305973 row3 1.4068747 row4 0.1275486 row5 1.7224789 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.1410176 1.282186 0.2897304 -0.4780030 1.184666 0.4107940 -0.2712949 row5 -1.5417994 -1.105084 -0.8945749 -0.3568879 2.026227 0.4303763 -0.7941432 col8 col9 col10 col11 col12 col13 col14 row1 -0.4688348 0.6086548 0.827547 0.1231001 0.4610089 -0.62160271 -0.2281741 row5 0.6024433 1.3913897 1.722479 0.1271383 -0.8089431 0.05264481 -1.5601858 col15 col16 col17 col18 col19 col20 row1 -0.4000666 -1.1181313 -0.1144273 -1.1620104 -0.8297051 0.5662828 row5 0.6213067 -0.6793303 -0.3791224 0.8657726 -1.0741309 1.4522031 > tmp[,c("col6","col20")] col6 col20 row1 0.4107940 0.5662828 row2 -0.0262938 0.6996056 row3 -1.4743983 -0.1568471 row4 0.4823293 -0.9807329 row5 0.4303763 1.4522031 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.4107940 0.5662828 row5 0.4303763 1.4522031 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 48.55883 52.23009 49.27011 50.36554 47.49047 104.9382 51.68797 48.34144 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.57111 50.41393 50.30778 50.1253 51.09492 50.44758 49.76414 50.21088 col17 col18 col19 col20 row1 49.58482 49.64654 49.99964 105.3679 > tmp[,"col10"] col10 row1 50.41393 row2 28.43805 row3 29.12732 row4 29.86070 row5 49.87347 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 48.55883 52.23009 49.27011 50.36554 47.49047 104.9382 51.68797 48.34144 row5 49.39302 49.28680 50.79471 49.80718 49.10746 105.2396 49.92983 49.45527 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.57111 50.41393 50.30778 50.12530 51.09492 50.44758 49.76414 50.21088 row5 52.29582 49.87347 50.64158 50.60383 50.62087 47.75973 49.76489 49.11413 col17 col18 col19 col20 row1 49.58482 49.64654 49.99964 105.3679 row5 50.10615 50.90691 49.77442 103.5303 > tmp[,c("col6","col20")] col6 col20 row1 104.93816 105.36793 row2 76.80815 75.98455 row3 76.18135 74.76595 row4 75.20817 75.52765 row5 105.23959 103.53026 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.9382 105.3679 row5 105.2396 103.5303 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.9382 105.3679 row5 105.2396 103.5303 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.9581915 [2,] 1.1157647 [3,] 0.9688444 [4,] 0.2510042 [5,] 0.8807433 > tmp[,c("col17","col7")] col17 col7 [1,] 0.20263706 -0.8916143 [2,] -0.53648339 -0.8290380 [3,] 0.62278754 -0.6267738 [4,] 0.97893806 -1.2571892 [5,] -0.01501002 0.1509591 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.4541592 -0.9077330 [2,] 0.9185441 0.3385340 [3,] -1.5220902 0.3186377 [4,] 0.5318263 -1.0970323 [5,] -1.1159110 -0.2874368 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.4541592 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.4541592 [2,] 0.9185441 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 0.2380546 0.2921495 -1.020482 0.4217873 0.02608032 0.5927560 -1.7484280 row1 0.3802162 0.2564162 -1.042596 0.5652088 -1.63366530 0.4072095 0.8815936 [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.080810676 -0.26134991 -1.2180535 1.072243 -0.7661198 0.009950534 row1 -0.005757539 0.04343923 -0.5193792 -1.152942 -1.2665508 0.105803557 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 0.4903586 0.1497451 -1.7346501 1.020889 -0.855115 -0.4283213 1.085474 row1 -1.1560818 0.3669249 0.7739924 -1.133410 1.648352 1.4702381 1.504201 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.4739342 0.8291211 0.0716431 2.302519 0.8951588 0.2962123 -0.4561085 [,8] [,9] [,10] row2 -0.4774448 2.588466 -1.509246 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.7793256 -0.07751601 -1.114531 -0.7435306 -1.025346 -0.6922578 -0.4278333 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.4730147 2.208253 2.090072 0.1433416 0.1798378 0.7751782 2.455237 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.05695606 0.2962401 -0.1806393 0.9197375 -0.1714859 -1.013245 > > > 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: 0x600000c68420> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b129b64bb3" [2] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b17f23ea29" [3] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b1ee26af5" [4] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b132dc0275" [5] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b1a256969" [6] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b11e2b71b3" [7] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b13635ae3e" [8] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b17e42843f" [9] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b140f884db" [10] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b17bda672f" [11] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b13fac7e2f" [12] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b155906051" [13] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b179a391b9" [14] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b161b44712" [15] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM170b12a620db" > > > ### 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: 0x600000c68fc0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600000c68fc0> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600000c68fc0> > rowMedians(tmp) [1] 0.097402615 0.499671888 0.536445228 -0.199697892 0.012082833 [6] 0.076954670 -0.029376118 0.287413481 -0.375810783 0.392114184 [11] 0.220442204 -0.126844660 -0.065672807 -0.560450068 -0.149480218 [16] -0.375605291 -0.286442572 0.430604732 0.506442396 -0.396439826 [21] -0.247877664 -0.177069786 0.164547761 -0.033348066 0.016155516 [26] -0.816531728 -0.068956408 0.066514252 -0.238032220 -0.394623215 [31] 0.650306718 -0.198553675 -0.255024662 -0.417326557 0.105591271 [36] 0.909094482 -0.047143642 -0.066225163 0.201489517 -0.315839850 [41] 0.389826965 -0.056610731 0.099688412 -0.032486986 -0.182952768 [46] -0.136414880 0.439496137 -0.182421768 -0.220125627 0.277887935 [51] 0.325865675 -0.201742134 0.015689499 0.349097498 -0.395818821 [56] -0.328620055 -0.534693056 0.212920767 -0.003415240 0.084070233 [61] 0.047678064 0.469819407 0.249662556 0.489997046 0.250975373 [66] 0.234973685 -0.080993709 -0.528031287 -0.357928340 -0.211814731 [71] 0.078498175 -0.096641025 0.506441043 0.483798317 0.447236368 [76] 0.136955387 -0.075243532 0.131439933 0.102478970 0.125927235 [81] 0.252723640 -0.061152433 -0.098133834 -0.077405299 -0.178779283 [86] 0.036605777 0.132506234 0.491482185 0.092036833 0.508768488 [91] 0.074165514 -0.137853575 0.042426874 -0.243159105 0.374419078 [96] -0.213256961 0.512456004 -0.261498396 0.317867083 0.458250016 [101] 0.117728670 -0.468370218 0.779086935 -0.108023495 0.156679609 [106] 0.158102711 -0.439702604 -0.499387885 -0.002912082 0.495367886 [111] -0.396697296 0.053945584 0.234423905 0.293583667 -0.057284855 [116] -0.152715930 -0.128410318 0.495200156 0.350449307 0.228074732 [121] 0.189766230 0.245516007 0.239964953 0.440300843 -0.588567997 [126] 0.077495871 -0.176848946 0.177491950 -0.023343561 -0.307492737 [131] -0.314716878 0.014132166 0.045409783 -0.282806283 -0.250716589 [136] -0.256488824 0.706585734 0.069850597 0.348343957 0.190163740 [141] 0.400576012 -0.378717839 -0.291308187 -0.383795407 -0.451959489 [146] 0.392157385 0.258693062 -0.109117721 -0.167754952 0.079854942 [151] -0.403264347 -0.650527931 0.242318768 -0.928378780 0.069778816 [156] 0.282603238 0.360639224 0.395481608 0.188893014 0.556297110 [161] -0.282180218 0.047242097 0.087741931 -0.055421861 -0.169396556 [166] 0.090905965 0.209318782 0.352044849 0.284338454 0.488852057 [171] 0.459338163 0.430594311 0.174957283 0.594536881 -0.167861653 [176] 0.050200727 0.011335709 -0.103609211 -0.440772566 0.445137979 [181] 0.204271272 0.108499182 -0.452613972 -0.035507374 -0.034738164 [186] -0.491473375 0.284119156 -0.573491411 0.036273612 0.001851323 [191] -0.706488785 -0.181817665 -0.020216281 0.057422571 -0.235552729 [196] 0.040417049 0.573806878 -0.254980988 0.034948657 0.101868499 [201] 0.492023259 -0.043491871 0.406800437 -0.080094943 0.259891097 [206] 0.050138159 0.069050106 -0.065627883 -0.248099024 0.038093366 [211] 0.243915477 -0.415404371 0.429852200 0.137955047 0.276285272 [216] 0.267714241 0.018972065 0.201317802 0.067738450 0.006528182 [221] 0.143454902 -0.316535178 0.040155966 -0.008500118 0.241929822 [226] -0.077051342 -0.062637685 -0.591145151 0.015976818 0.258749100 > > proc.time() user system elapsed 1.908 8.573 10.627
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.5.0 RC (2025-04-04 r88129) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x600003a30e40> > .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: 0x600003a30e40> > .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: 0x600003a30e40> > .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: 0x600003a30e40> > 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: 0x600003a3c660> > .Call("R_bm_AddColumn",P) <pointer: 0x600003a3c660> > .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: 0x600003a3c660> > .Call("R_bm_AddColumn",P) <pointer: 0x600003a3c660> > .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: 0x600003a3c660> > 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: 0x600003a3c840> > .Call("R_bm_AddColumn",P) <pointer: 0x600003a3c840> > .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: 0x600003a3c840> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600003a3c840> > .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: 0x600003a3c840> > > .Call("R_bm_RowMode",P) <pointer: 0x600003a3c840> > .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: 0x600003a3c840> > > .Call("R_bm_ColMode",P) <pointer: 0x600003a3c840> > .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: 0x600003a3c840> > 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: 0x600003a3ca20> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600003a3ca20> > .Call("R_bm_AddColumn",P) <pointer: 0x600003a3ca20> > .Call("R_bm_AddColumn",P) <pointer: 0x600003a3ca20> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile170f53765bd50" "BufferedMatrixFile170f54a6b0253" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile170f53765bd50" "BufferedMatrixFile170f54a6b0253" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600003a3ccc0> > .Call("R_bm_AddColumn",P) <pointer: 0x600003a3ccc0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600003a3ccc0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600003a3ccc0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600003a3ccc0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600003a3ccc0> > .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: 0x600003a3cea0> > .Call("R_bm_AddColumn",P) <pointer: 0x600003a3cea0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600003a3cea0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600003a3cea0> > 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: 0x600003a3d080> > .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: 0x600003a3d080> > rm(P) > > proc.time() user system elapsed 0.340 0.106 0.429
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.0 RC (2025-04-04 r88129) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.293 0.060 0.343