Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-04-17 11:43 -0400 (Thu, 17 Apr 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" | 4667 |
palomino7 | Windows Server 2022 Datacenter | x64 | 4.5.0 RC (2025-04-04 r88126 ucrt) -- "How About a Twenty-Six" | 4573 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.0 RC (2025-04-04 r88126) -- "How About a Twenty-Six" | 4599 |
kjohnson3 | macOS 13.7.1 Ventura | arm64 | 4.5.0 RC (2025-04-04 r88126) -- "How About a Twenty-Six" | 4553 |
kunpeng2 | Linux (openEuler 24.03 LTS) | aarch64 | R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" | 4570 |
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 | OK | OK | OK | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.1 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kunpeng2 | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.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-04-16 20:02:10 -0400 (Wed, 16 Apr 2025) |
EndedAt: 2025-04-16 20:03:03 -0400 (Wed, 16 Apr 2025) |
EllapsedTime: 52.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 r88126) * 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.0 RC (2025-04-04 r88126) -- "How About a Twenty-Six" 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.346 0.150 0.494
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.0 RC (2025-04-04 r88126) -- "How About a Twenty-Six" 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 480829 25.7 1056567 56.5 NA 634460 33.9 Vcells 891038 6.8 8388608 64.0 98304 2108474 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] "Wed Apr 16 20:02:35 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Wed Apr 16 20:02:35 2025" > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > > > RowMode(tmp2) <pointer: 0x60000179c0c0> > > > > 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] "Wed Apr 16 20:02:40 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] "Wed Apr 16 20:02:42 2025" > > ColMode(tmp2) <pointer: 0x60000179c0c0> > > > > ### 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.4874223 -0.4894769 0.9882772 -1.34066602 [2,] -0.5347806 -0.9874901 -0.4411741 0.04017049 [3,] 1.0633363 -1.4033784 -0.1020095 -1.65869702 [4,] 2.0822398 0.4964700 1.5262659 -0.98772409 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.4874223 0.4894769 0.9882772 1.34066602 [2,] 0.5347806 0.9874901 0.4411741 0.04017049 [3,] 1.0633363 1.4033784 0.1020095 1.65869702 [4,] 2.0822398 0.4964700 1.5262659 0.98772409 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 10.024341 0.6996262 0.9941213 1.1578713 [2,] 0.731287 0.9937253 0.6642094 0.2004258 [3,] 1.031182 1.1846428 0.3193893 1.2879041 [4,] 1.442997 0.7046063 1.2354214 0.9938431 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 225.73084 32.48574 35.92949 37.91938 [2,] 32.84765 35.92474 32.08327 27.04443 [3,] 36.37516 38.24981 28.29590 39.53774 [4,] 41.51221 32.54253 38.88048 35.92615 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x6000017e4000> > exp(tmp5) <pointer: 0x6000017e4000> > log(tmp5,2) <pointer: 0x6000017e4000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 469.8292 > Min(tmp5) [1] 53.4687 > mean(tmp5) [1] 72.91253 > Sum(tmp5) [1] 14582.51 > Var(tmp5) [1] 871.0029 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 89.51691 73.13609 73.99425 72.51945 69.64381 71.35789 68.03370 70.58423 [9] 72.59346 67.74552 > rowSums(tmp5) [1] 1790.338 1462.722 1479.885 1450.389 1392.876 1427.158 1360.674 1411.685 [9] 1451.869 1354.910 > rowVars(tmp5) [1] 8070.89172 60.61426 93.01311 65.83012 78.38191 63.51369 [7] 115.09729 63.85419 84.68324 62.30296 > rowSd(tmp5) [1] 89.838142 7.785516 9.644330 8.113576 8.853356 7.969548 10.728340 [8] 7.990882 9.202350 7.893223 > rowMax(tmp5) [1] 469.82916 86.45043 91.85633 86.40222 81.24092 89.45515 88.71462 [8] 84.72936 88.93161 82.06667 > rowMin(tmp5) [1] 55.66275 56.28943 58.89421 54.57571 53.99120 57.91264 53.46870 54.92097 [9] 58.81615 55.57883 > > colMeans(tmp5) [1] 115.04127 72.16959 67.92641 69.25957 73.91558 70.48515 70.63517 [8] 71.68900 70.71330 69.47900 75.77236 68.06439 70.98183 69.47390 [15] 70.61094 68.08262 67.16826 71.49257 77.36696 67.92274 > colSums(tmp5) [1] 1150.4127 721.6959 679.2641 692.5957 739.1558 704.8515 706.3517 [8] 716.8900 707.1330 694.7900 757.7236 680.6439 709.8183 694.7390 [15] 706.1094 680.8262 671.6826 714.9257 773.6696 679.2274 > colVars(tmp5) [1] 15579.44955 112.87656 48.22145 91.72782 57.37314 92.31291 [7] 45.81415 84.92769 47.19011 110.52779 86.52456 155.27356 [13] 76.34607 96.22985 49.83400 77.42180 68.25784 87.03355 [19] 22.16988 47.76348 > colSd(tmp5) [1] 124.817665 10.624338 6.944167 9.577464 7.574506 9.607961 [7] 6.768615 9.215622 6.869506 10.513220 9.301858 12.460881 [13] 8.737624 9.809681 7.059320 8.798966 8.261831 9.329177 [19] 4.708491 6.911113 > colMax(tmp5) [1] 469.82916 89.45515 80.92462 82.29262 84.45797 86.45043 77.78201 [8] 85.86973 81.16867 85.55698 91.85633 88.93161 88.71462 88.05141 [15] 81.16133 82.74783 81.53058 87.74437 85.56297 80.48441 > colMin(tmp5) [1] 65.03734 54.57368 58.60809 54.92097 58.16695 56.90488 55.66275 54.57571 [9] 60.19694 55.38160 63.51318 53.99120 55.57883 53.46870 58.93883 57.91264 [17] 55.44071 57.26737 69.72137 58.81615 > > > ### 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] 89.51691 73.13609 73.99425 72.51945 69.64381 71.35789 68.03370 70.58423 [9] 72.59346 NA > rowSums(tmp5) [1] 1790.338 1462.722 1479.885 1450.389 1392.876 1427.158 1360.674 1411.685 [9] 1451.869 NA > rowVars(tmp5) [1] 8070.89172 60.61426 93.01311 65.83012 78.38191 63.51369 [7] 115.09729 63.85419 84.68324 57.10761 > rowSd(tmp5) [1] 89.838142 7.785516 9.644330 8.113576 8.853356 7.969548 10.728340 [8] 7.990882 9.202350 7.556958 > rowMax(tmp5) [1] 469.82916 86.45043 91.85633 86.40222 81.24092 89.45515 88.71462 [8] 84.72936 88.93161 NA > rowMin(tmp5) [1] 55.66275 56.28943 58.89421 54.57571 53.99120 57.91264 53.46870 54.92097 [9] 58.81615 NA > > colMeans(tmp5) [1] 115.04127 72.16959 67.92641 69.25957 73.91558 70.48515 70.63517 [8] 71.68900 70.71330 69.47900 75.77236 68.06439 NA 69.47390 [15] 70.61094 68.08262 67.16826 71.49257 77.36696 67.92274 > colSums(tmp5) [1] 1150.4127 721.6959 679.2641 692.5957 739.1558 704.8515 706.3517 [8] 716.8900 707.1330 694.7900 757.7236 680.6439 NA 694.7390 [15] 706.1094 680.8262 671.6826 714.9257 773.6696 679.2274 > colVars(tmp5) [1] 15579.44955 112.87656 48.22145 91.72782 57.37314 92.31291 [7] 45.81415 84.92769 47.19011 110.52779 86.52456 155.27356 [13] NA 96.22985 49.83400 77.42180 68.25784 87.03355 [19] 22.16988 47.76348 > colSd(tmp5) [1] 124.817665 10.624338 6.944167 9.577464 7.574506 9.607961 [7] 6.768615 9.215622 6.869506 10.513220 9.301858 12.460881 [13] NA 9.809681 7.059320 8.798966 8.261831 9.329177 [19] 4.708491 6.911113 > colMax(tmp5) [1] 469.82916 89.45515 80.92462 82.29262 84.45797 86.45043 77.78201 [8] 85.86973 81.16867 85.55698 91.85633 88.93161 NA 88.05141 [15] 81.16133 82.74783 81.53058 87.74437 85.56297 80.48441 > colMin(tmp5) [1] 65.03734 54.57368 58.60809 54.92097 58.16695 56.90488 55.66275 54.57571 [9] 60.19694 55.38160 63.51318 53.99120 NA 53.46870 58.93883 57.91264 [17] 55.44071 57.26737 69.72137 58.81615 > > Max(tmp5,na.rm=TRUE) [1] 469.8292 > Min(tmp5,na.rm=TRUE) [1] 53.4687 > mean(tmp5,na.rm=TRUE) [1] 72.99964 > Sum(tmp5,na.rm=TRUE) [1] 14526.93 > Var(tmp5,na.rm=TRUE) [1] 873.8768 > > rowMeans(tmp5,na.rm=TRUE) [1] 89.51691 73.13609 73.99425 72.51945 69.64381 71.35789 68.03370 70.58423 [9] 72.59346 68.38588 > rowSums(tmp5,na.rm=TRUE) [1] 1790.338 1462.722 1479.885 1450.389 1392.876 1427.158 1360.674 1411.685 [9] 1451.869 1299.332 > rowVars(tmp5,na.rm=TRUE) [1] 8070.89172 60.61426 93.01311 65.83012 78.38191 63.51369 [7] 115.09729 63.85419 84.68324 57.10761 > rowSd(tmp5,na.rm=TRUE) [1] 89.838142 7.785516 9.644330 8.113576 8.853356 7.969548 10.728340 [8] 7.990882 9.202350 7.556958 > rowMax(tmp5,na.rm=TRUE) [1] 469.82916 86.45043 91.85633 86.40222 81.24092 89.45515 88.71462 [8] 84.72936 88.93161 82.06667 > rowMin(tmp5,na.rm=TRUE) [1] 55.66275 56.28943 58.89421 54.57571 53.99120 57.91264 53.46870 54.92097 [9] 58.81615 56.90488 > > colMeans(tmp5,na.rm=TRUE) [1] 115.04127 72.16959 67.92641 69.25957 73.91558 70.48515 70.63517 [8] 71.68900 70.71330 69.47900 75.77236 68.06439 72.69327 69.47390 [15] 70.61094 68.08262 67.16826 71.49257 77.36696 67.92274 > colSums(tmp5,na.rm=TRUE) [1] 1150.4127 721.6959 679.2641 692.5957 739.1558 704.8515 706.3517 [8] 716.8900 707.1330 694.7900 757.7236 680.6439 654.2394 694.7390 [15] 706.1094 680.8262 671.6826 714.9257 773.6696 679.2274 > colVars(tmp5,na.rm=TRUE) [1] 15579.44955 112.87656 48.22145 91.72782 57.37314 92.31291 [7] 45.81415 84.92769 47.19011 110.52779 86.52456 155.27356 [13] 52.93763 96.22985 49.83400 77.42180 68.25784 87.03355 [19] 22.16988 47.76348 > colSd(tmp5,na.rm=TRUE) [1] 124.817665 10.624338 6.944167 9.577464 7.574506 9.607961 [7] 6.768615 9.215622 6.869506 10.513220 9.301858 12.460881 [13] 7.275825 9.809681 7.059320 8.798966 8.261831 9.329177 [19] 4.708491 6.911113 > colMax(tmp5,na.rm=TRUE) [1] 469.82916 89.45515 80.92462 82.29262 84.45797 86.45043 77.78201 [8] 85.86973 81.16867 85.55698 91.85633 88.93161 88.71462 88.05141 [15] 81.16133 82.74783 81.53058 87.74437 85.56297 80.48441 > colMin(tmp5,na.rm=TRUE) [1] 65.03734 54.57368 58.60809 54.92097 58.16695 56.90488 55.66275 54.57571 [9] 60.19694 55.38160 63.51318 53.99120 64.03380 53.46870 58.93883 57.91264 [17] 55.44071 57.26737 69.72137 58.81615 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 89.51691 73.13609 73.99425 72.51945 69.64381 71.35789 68.03370 70.58423 [9] 72.59346 NaN > rowSums(tmp5,na.rm=TRUE) [1] 1790.338 1462.722 1479.885 1450.389 1392.876 1427.158 1360.674 1411.685 [9] 1451.869 0.000 > rowVars(tmp5,na.rm=TRUE) [1] 8070.89172 60.61426 93.01311 65.83012 78.38191 63.51369 [7] 115.09729 63.85419 84.68324 NA > rowSd(tmp5,na.rm=TRUE) [1] 89.838142 7.785516 9.644330 8.113576 8.853356 7.969548 10.728340 [8] 7.990882 9.202350 NA > rowMax(tmp5,na.rm=TRUE) [1] 469.82916 86.45043 91.85633 86.40222 81.24092 89.45515 88.71462 [8] 84.72936 88.93161 NA > rowMin(tmp5,na.rm=TRUE) [1] 55.66275 56.28943 58.89421 54.57571 53.99120 57.91264 53.46870 54.92097 [9] 58.81615 NA > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 119.87212 73.40916 68.09123 69.11251 73.87835 71.99406 71.35008 [8] 71.56224 70.18014 68.19210 75.07300 69.27734 NaN 70.10847 [15] 71.90785 68.37548 67.06823 71.81585 77.35323 68.41815 > colSums(tmp5,na.rm=TRUE) [1] 1078.8491 660.6825 612.8211 622.0126 664.9051 647.9466 642.1507 [8] 644.0601 631.6213 613.7289 675.6570 623.4961 0.0000 630.9762 [15] 647.1706 615.3794 603.6141 646.3426 696.1791 615.7633 > colVars(tmp5,na.rm=TRUE) [1] 17264.33828 109.70005 53.94353 102.95047 64.52919 78.23765 [7] 45.79112 95.36289 49.89101 105.71260 91.83760 158.13106 [13] NA 103.72845 37.14126 86.13464 76.67750 96.73701 [19] 24.93900 50.97290 > colSd(tmp5,na.rm=TRUE) [1] 131.393829 10.473779 7.344626 10.146451 8.033006 8.845205 [7] 6.766913 9.765392 7.063357 10.281663 9.583194 12.575017 [13] NA 10.184717 6.094363 9.280875 8.756569 9.835497 [19] 4.993896 7.139531 > colMax(tmp5,na.rm=TRUE) [1] 469.82916 89.45515 80.92462 82.29262 84.45797 86.45043 77.78201 [8] 85.86973 81.16867 85.55698 91.85633 88.93161 -Inf 88.05141 [15] 81.16133 82.74783 81.53058 87.74437 85.56297 80.48441 > colMin(tmp5,na.rm=TRUE) [1] 65.03734 54.57368 58.60809 54.92097 58.16695 60.53176 55.66275 54.57571 [9] 60.19694 55.38160 63.51318 53.99120 Inf 53.46870 63.60809 57.91264 [17] 55.44071 57.26737 69.72137 58.81615 > > > > > 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] 273.1129 199.5935 224.3047 144.1712 159.4646 236.2578 267.4935 147.9843 [9] 178.4909 216.0982 > apply(copymatrix,1,var,na.rm=TRUE) [1] 273.1129 199.5935 224.3047 144.1712 159.4646 236.2578 267.4935 147.9843 [9] 178.4909 216.0982 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 0.000000e+00 2.842171e-14 5.684342e-14 0.000000e+00 -1.136868e-13 [6] 0.000000e+00 -5.684342e-14 0.000000e+00 -5.684342e-14 -2.842171e-14 [11] 0.000000e+00 1.705303e-13 2.842171e-14 2.273737e-13 5.684342e-14 [16] -5.684342e-14 -2.842171e-14 0.000000e+00 -1.705303e-13 1.989520e-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) + } 8 14 9 13 5 4 8 8 2 14 10 1 8 9 2 19 10 8 1 7 8 15 4 12 3 13 4 4 4 3 6 2 8 4 3 1 7 18 3 20 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 3.265485 > Min(tmp) [1] -3.118541 > mean(tmp) [1] 0.004922526 > Sum(tmp) [1] 0.4922526 > Var(tmp) [1] 1.334807 > > rowMeans(tmp) [1] 0.004922526 > rowSums(tmp) [1] 0.4922526 > rowVars(tmp) [1] 1.334807 > rowSd(tmp) [1] 1.155338 > rowMax(tmp) [1] 3.265485 > rowMin(tmp) [1] -3.118541 > > colMeans(tmp) [1] 0.900000646 -0.814543943 -1.025635487 0.330371881 0.645621939 [6] -0.891102907 0.559618293 1.343324602 2.369427591 0.455736513 [11] -0.803740467 0.173650823 -2.178759842 -1.542609233 0.636051455 [16] 0.896994526 0.005640722 0.585781269 -3.047828705 -0.100926157 [21] -2.197817279 0.549250216 -0.539209153 -0.155524247 1.686119411 [26] 0.349510173 -2.134854735 -0.607884442 1.704378595 -0.083649962 [31] -1.517484085 0.706154223 1.445554524 1.039977891 0.897074785 [36] -1.531792301 0.194203617 0.059257288 1.943936190 -2.163005580 [41] 0.106762249 0.107874172 -0.331562845 1.529872320 -0.174361828 [46] -1.939880362 -0.539774287 -0.152126366 0.644194902 0.315464480 [51] 0.992954242 -0.259536882 -0.158418363 1.303183283 0.772778493 [56] 1.326827323 0.449192504 0.660006597 -1.580238076 -0.583138283 [61] 0.378489171 -0.880411514 -1.665219879 0.176103375 -1.245784015 [66] -0.820454601 2.100034420 0.256097846 0.627643008 -1.387125222 [71] 0.937953701 -0.616563344 -0.057496594 -0.573722875 1.293772942 [76] 0.700405224 0.507765371 1.019281163 0.167196207 -1.074655835 [81] 0.827533722 0.668025128 -1.822231847 1.406838965 -0.389729005 [86] -0.653167864 1.103932104 -3.118540841 0.408560142 3.265484643 [91] 0.454792219 -0.421383488 -0.771661921 -0.251687165 -0.897941770 [96] 0.450010335 0.383036857 -1.213068307 -0.218072349 0.806872549 > colSums(tmp) [1] 0.900000646 -0.814543943 -1.025635487 0.330371881 0.645621939 [6] -0.891102907 0.559618293 1.343324602 2.369427591 0.455736513 [11] -0.803740467 0.173650823 -2.178759842 -1.542609233 0.636051455 [16] 0.896994526 0.005640722 0.585781269 -3.047828705 -0.100926157 [21] -2.197817279 0.549250216 -0.539209153 -0.155524247 1.686119411 [26] 0.349510173 -2.134854735 -0.607884442 1.704378595 -0.083649962 [31] -1.517484085 0.706154223 1.445554524 1.039977891 0.897074785 [36] -1.531792301 0.194203617 0.059257288 1.943936190 -2.163005580 [41] 0.106762249 0.107874172 -0.331562845 1.529872320 -0.174361828 [46] -1.939880362 -0.539774287 -0.152126366 0.644194902 0.315464480 [51] 0.992954242 -0.259536882 -0.158418363 1.303183283 0.772778493 [56] 1.326827323 0.449192504 0.660006597 -1.580238076 -0.583138283 [61] 0.378489171 -0.880411514 -1.665219879 0.176103375 -1.245784015 [66] -0.820454601 2.100034420 0.256097846 0.627643008 -1.387125222 [71] 0.937953701 -0.616563344 -0.057496594 -0.573722875 1.293772942 [76] 0.700405224 0.507765371 1.019281163 0.167196207 -1.074655835 [81] 0.827533722 0.668025128 -1.822231847 1.406838965 -0.389729005 [86] -0.653167864 1.103932104 -3.118540841 0.408560142 3.265484643 [91] 0.454792219 -0.421383488 -0.771661921 -0.251687165 -0.897941770 [96] 0.450010335 0.383036857 -1.213068307 -0.218072349 0.806872549 > 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.900000646 -0.814543943 -1.025635487 0.330371881 0.645621939 [6] -0.891102907 0.559618293 1.343324602 2.369427591 0.455736513 [11] -0.803740467 0.173650823 -2.178759842 -1.542609233 0.636051455 [16] 0.896994526 0.005640722 0.585781269 -3.047828705 -0.100926157 [21] -2.197817279 0.549250216 -0.539209153 -0.155524247 1.686119411 [26] 0.349510173 -2.134854735 -0.607884442 1.704378595 -0.083649962 [31] -1.517484085 0.706154223 1.445554524 1.039977891 0.897074785 [36] -1.531792301 0.194203617 0.059257288 1.943936190 -2.163005580 [41] 0.106762249 0.107874172 -0.331562845 1.529872320 -0.174361828 [46] -1.939880362 -0.539774287 -0.152126366 0.644194902 0.315464480 [51] 0.992954242 -0.259536882 -0.158418363 1.303183283 0.772778493 [56] 1.326827323 0.449192504 0.660006597 -1.580238076 -0.583138283 [61] 0.378489171 -0.880411514 -1.665219879 0.176103375 -1.245784015 [66] -0.820454601 2.100034420 0.256097846 0.627643008 -1.387125222 [71] 0.937953701 -0.616563344 -0.057496594 -0.573722875 1.293772942 [76] 0.700405224 0.507765371 1.019281163 0.167196207 -1.074655835 [81] 0.827533722 0.668025128 -1.822231847 1.406838965 -0.389729005 [86] -0.653167864 1.103932104 -3.118540841 0.408560142 3.265484643 [91] 0.454792219 -0.421383488 -0.771661921 -0.251687165 -0.897941770 [96] 0.450010335 0.383036857 -1.213068307 -0.218072349 0.806872549 > colMin(tmp) [1] 0.900000646 -0.814543943 -1.025635487 0.330371881 0.645621939 [6] -0.891102907 0.559618293 1.343324602 2.369427591 0.455736513 [11] -0.803740467 0.173650823 -2.178759842 -1.542609233 0.636051455 [16] 0.896994526 0.005640722 0.585781269 -3.047828705 -0.100926157 [21] -2.197817279 0.549250216 -0.539209153 -0.155524247 1.686119411 [26] 0.349510173 -2.134854735 -0.607884442 1.704378595 -0.083649962 [31] -1.517484085 0.706154223 1.445554524 1.039977891 0.897074785 [36] -1.531792301 0.194203617 0.059257288 1.943936190 -2.163005580 [41] 0.106762249 0.107874172 -0.331562845 1.529872320 -0.174361828 [46] -1.939880362 -0.539774287 -0.152126366 0.644194902 0.315464480 [51] 0.992954242 -0.259536882 -0.158418363 1.303183283 0.772778493 [56] 1.326827323 0.449192504 0.660006597 -1.580238076 -0.583138283 [61] 0.378489171 -0.880411514 -1.665219879 0.176103375 -1.245784015 [66] -0.820454601 2.100034420 0.256097846 0.627643008 -1.387125222 [71] 0.937953701 -0.616563344 -0.057496594 -0.573722875 1.293772942 [76] 0.700405224 0.507765371 1.019281163 0.167196207 -1.074655835 [81] 0.827533722 0.668025128 -1.822231847 1.406838965 -0.389729005 [86] -0.653167864 1.103932104 -3.118540841 0.408560142 3.265484643 [91] 0.454792219 -0.421383488 -0.771661921 -0.251687165 -0.897941770 [96] 0.450010335 0.383036857 -1.213068307 -0.218072349 0.806872549 > colMedians(tmp) [1] 0.900000646 -0.814543943 -1.025635487 0.330371881 0.645621939 [6] -0.891102907 0.559618293 1.343324602 2.369427591 0.455736513 [11] -0.803740467 0.173650823 -2.178759842 -1.542609233 0.636051455 [16] 0.896994526 0.005640722 0.585781269 -3.047828705 -0.100926157 [21] -2.197817279 0.549250216 -0.539209153 -0.155524247 1.686119411 [26] 0.349510173 -2.134854735 -0.607884442 1.704378595 -0.083649962 [31] -1.517484085 0.706154223 1.445554524 1.039977891 0.897074785 [36] -1.531792301 0.194203617 0.059257288 1.943936190 -2.163005580 [41] 0.106762249 0.107874172 -0.331562845 1.529872320 -0.174361828 [46] -1.939880362 -0.539774287 -0.152126366 0.644194902 0.315464480 [51] 0.992954242 -0.259536882 -0.158418363 1.303183283 0.772778493 [56] 1.326827323 0.449192504 0.660006597 -1.580238076 -0.583138283 [61] 0.378489171 -0.880411514 -1.665219879 0.176103375 -1.245784015 [66] -0.820454601 2.100034420 0.256097846 0.627643008 -1.387125222 [71] 0.937953701 -0.616563344 -0.057496594 -0.573722875 1.293772942 [76] 0.700405224 0.507765371 1.019281163 0.167196207 -1.074655835 [81] 0.827533722 0.668025128 -1.822231847 1.406838965 -0.389729005 [86] -0.653167864 1.103932104 -3.118540841 0.408560142 3.265484643 [91] 0.454792219 -0.421383488 -0.771661921 -0.251687165 -0.897941770 [96] 0.450010335 0.383036857 -1.213068307 -0.218072349 0.806872549 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.9000006 -0.8145439 -1.025635 0.3303719 0.6456219 -0.8911029 0.5596183 [2,] 0.9000006 -0.8145439 -1.025635 0.3303719 0.6456219 -0.8911029 0.5596183 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.343325 2.369428 0.4557365 -0.8037405 0.1736508 -2.17876 -1.542609 [2,] 1.343325 2.369428 0.4557365 -0.8037405 0.1736508 -2.17876 -1.542609 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.6360515 0.8969945 0.005640722 0.5857813 -3.047829 -0.1009262 -2.197817 [2,] 0.6360515 0.8969945 0.005640722 0.5857813 -3.047829 -0.1009262 -2.197817 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.5492502 -0.5392092 -0.1555242 1.686119 0.3495102 -2.134855 -0.6078844 [2,] 0.5492502 -0.5392092 -0.1555242 1.686119 0.3495102 -2.134855 -0.6078844 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 1.704379 -0.08364996 -1.517484 0.7061542 1.445555 1.039978 0.8970748 [2,] 1.704379 -0.08364996 -1.517484 0.7061542 1.445555 1.039978 0.8970748 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.531792 0.1942036 0.05925729 1.943936 -2.163006 0.1067622 0.1078742 [2,] -1.531792 0.1942036 0.05925729 1.943936 -2.163006 0.1067622 0.1078742 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.3315628 1.529872 -0.1743618 -1.93988 -0.5397743 -0.1521264 0.6441949 [2,] -0.3315628 1.529872 -0.1743618 -1.93988 -0.5397743 -0.1521264 0.6441949 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.3154645 0.9929542 -0.2595369 -0.1584184 1.303183 0.7727785 1.326827 [2,] 0.3154645 0.9929542 -0.2595369 -0.1584184 1.303183 0.7727785 1.326827 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.4491925 0.6600066 -1.580238 -0.5831383 0.3784892 -0.8804115 -1.66522 [2,] 0.4491925 0.6600066 -1.580238 -0.5831383 0.3784892 -0.8804115 -1.66522 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.1761034 -1.245784 -0.8204546 2.100034 0.2560978 0.627643 -1.387125 [2,] 0.1761034 -1.245784 -0.8204546 2.100034 0.2560978 0.627643 -1.387125 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.9379537 -0.6165633 -0.05749659 -0.5737229 1.293773 0.7004052 0.5077654 [2,] 0.9379537 -0.6165633 -0.05749659 -0.5737229 1.293773 0.7004052 0.5077654 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 1.019281 0.1671962 -1.074656 0.8275337 0.6680251 -1.822232 1.406839 [2,] 1.019281 0.1671962 -1.074656 0.8275337 0.6680251 -1.822232 1.406839 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.389729 -0.6531679 1.103932 -3.118541 0.4085601 3.265485 0.4547922 [2,] -0.389729 -0.6531679 1.103932 -3.118541 0.4085601 3.265485 0.4547922 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.4213835 -0.7716619 -0.2516872 -0.8979418 0.4500103 0.3830369 -1.213068 [2,] -0.4213835 -0.7716619 -0.2516872 -0.8979418 0.4500103 0.3830369 -1.213068 [,99] [,100] [1,] -0.2180723 0.8068725 [2,] -0.2180723 0.8068725 > > > Max(tmp2) [1] 2.980951 > Min(tmp2) [1] -2.440184 > mean(tmp2) [1] 0.06614333 > Sum(tmp2) [1] 6.614333 > Var(tmp2) [1] 1.095156 > > rowMeans(tmp2) [1] 1.23623798 0.34825229 0.02585174 -1.21214494 0.69801538 -0.35978575 [7] -0.49428550 0.76076207 0.31252729 -0.09403963 -0.35484580 -1.12830017 [13] -0.97951848 -0.53587152 0.17099220 -0.35944960 0.93665708 -0.20924005 [19] -0.28166061 0.13020751 0.59627581 1.05429086 -1.07900078 0.34807464 [25] -0.97828768 -0.46333618 -1.06031386 2.41464354 1.38992535 1.78670874 [31] -0.94370968 -1.70465625 0.09117013 -0.91580533 0.37059722 0.19437440 [37] -0.16648985 -1.57666424 -1.59418260 -0.57420442 -1.80278671 0.35450891 [43] 0.81644170 -0.32449722 0.88995866 -1.34314815 -1.82467128 1.60738805 [49] 1.23674591 1.50749859 -0.94759555 -0.74493619 -0.25971186 2.98095143 [55] 1.08735046 0.78892717 1.38587262 1.03637429 -0.99179857 -2.44018443 [61] 1.21136721 0.94775438 0.18150614 0.67623796 -1.06428960 0.31847138 [67] 0.45267734 -0.27413832 -1.33929970 0.92487869 1.44723155 -0.46676403 [73] -1.20022938 -0.28453364 0.10270443 1.11666548 0.76291325 1.75165087 [79] 1.53468522 -0.33073664 -0.86014424 1.49694750 -2.08757756 0.32099864 [85] 2.08546548 0.54071487 -0.01392374 0.62315125 -0.63655339 0.21272410 [91] 1.18096337 -0.91716402 -0.67066755 0.10170876 0.19049546 0.90690777 [97] -0.06561103 -0.06739194 -0.09045586 -0.91746696 > rowSums(tmp2) [1] 1.23623798 0.34825229 0.02585174 -1.21214494 0.69801538 -0.35978575 [7] -0.49428550 0.76076207 0.31252729 -0.09403963 -0.35484580 -1.12830017 [13] -0.97951848 -0.53587152 0.17099220 -0.35944960 0.93665708 -0.20924005 [19] -0.28166061 0.13020751 0.59627581 1.05429086 -1.07900078 0.34807464 [25] -0.97828768 -0.46333618 -1.06031386 2.41464354 1.38992535 1.78670874 [31] -0.94370968 -1.70465625 0.09117013 -0.91580533 0.37059722 0.19437440 [37] -0.16648985 -1.57666424 -1.59418260 -0.57420442 -1.80278671 0.35450891 [43] 0.81644170 -0.32449722 0.88995866 -1.34314815 -1.82467128 1.60738805 [49] 1.23674591 1.50749859 -0.94759555 -0.74493619 -0.25971186 2.98095143 [55] 1.08735046 0.78892717 1.38587262 1.03637429 -0.99179857 -2.44018443 [61] 1.21136721 0.94775438 0.18150614 0.67623796 -1.06428960 0.31847138 [67] 0.45267734 -0.27413832 -1.33929970 0.92487869 1.44723155 -0.46676403 [73] -1.20022938 -0.28453364 0.10270443 1.11666548 0.76291325 1.75165087 [79] 1.53468522 -0.33073664 -0.86014424 1.49694750 -2.08757756 0.32099864 [85] 2.08546548 0.54071487 -0.01392374 0.62315125 -0.63655339 0.21272410 [91] 1.18096337 -0.91716402 -0.67066755 0.10170876 0.19049546 0.90690777 [97] -0.06561103 -0.06739194 -0.09045586 -0.91746696 > rowVars(tmp2) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > rowSd(tmp2) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > rowMax(tmp2) [1] 1.23623798 0.34825229 0.02585174 -1.21214494 0.69801538 -0.35978575 [7] -0.49428550 0.76076207 0.31252729 -0.09403963 -0.35484580 -1.12830017 [13] -0.97951848 -0.53587152 0.17099220 -0.35944960 0.93665708 -0.20924005 [19] -0.28166061 0.13020751 0.59627581 1.05429086 -1.07900078 0.34807464 [25] -0.97828768 -0.46333618 -1.06031386 2.41464354 1.38992535 1.78670874 [31] -0.94370968 -1.70465625 0.09117013 -0.91580533 0.37059722 0.19437440 [37] -0.16648985 -1.57666424 -1.59418260 -0.57420442 -1.80278671 0.35450891 [43] 0.81644170 -0.32449722 0.88995866 -1.34314815 -1.82467128 1.60738805 [49] 1.23674591 1.50749859 -0.94759555 -0.74493619 -0.25971186 2.98095143 [55] 1.08735046 0.78892717 1.38587262 1.03637429 -0.99179857 -2.44018443 [61] 1.21136721 0.94775438 0.18150614 0.67623796 -1.06428960 0.31847138 [67] 0.45267734 -0.27413832 -1.33929970 0.92487869 1.44723155 -0.46676403 [73] -1.20022938 -0.28453364 0.10270443 1.11666548 0.76291325 1.75165087 [79] 1.53468522 -0.33073664 -0.86014424 1.49694750 -2.08757756 0.32099864 [85] 2.08546548 0.54071487 -0.01392374 0.62315125 -0.63655339 0.21272410 [91] 1.18096337 -0.91716402 -0.67066755 0.10170876 0.19049546 0.90690777 [97] -0.06561103 -0.06739194 -0.09045586 -0.91746696 > rowMin(tmp2) [1] 1.23623798 0.34825229 0.02585174 -1.21214494 0.69801538 -0.35978575 [7] -0.49428550 0.76076207 0.31252729 -0.09403963 -0.35484580 -1.12830017 [13] -0.97951848 -0.53587152 0.17099220 -0.35944960 0.93665708 -0.20924005 [19] -0.28166061 0.13020751 0.59627581 1.05429086 -1.07900078 0.34807464 [25] -0.97828768 -0.46333618 -1.06031386 2.41464354 1.38992535 1.78670874 [31] -0.94370968 -1.70465625 0.09117013 -0.91580533 0.37059722 0.19437440 [37] -0.16648985 -1.57666424 -1.59418260 -0.57420442 -1.80278671 0.35450891 [43] 0.81644170 -0.32449722 0.88995866 -1.34314815 -1.82467128 1.60738805 [49] 1.23674591 1.50749859 -0.94759555 -0.74493619 -0.25971186 2.98095143 [55] 1.08735046 0.78892717 1.38587262 1.03637429 -0.99179857 -2.44018443 [61] 1.21136721 0.94775438 0.18150614 0.67623796 -1.06428960 0.31847138 [67] 0.45267734 -0.27413832 -1.33929970 0.92487869 1.44723155 -0.46676403 [73] -1.20022938 -0.28453364 0.10270443 1.11666548 0.76291325 1.75165087 [79] 1.53468522 -0.33073664 -0.86014424 1.49694750 -2.08757756 0.32099864 [85] 2.08546548 0.54071487 -0.01392374 0.62315125 -0.63655339 0.21272410 [91] 1.18096337 -0.91716402 -0.67066755 0.10170876 0.19049546 0.90690777 [97] -0.06561103 -0.06739194 -0.09045586 -0.91746696 > > colMeans(tmp2) [1] 0.06614333 > colSums(tmp2) [1] 6.614333 > colVars(tmp2) [1] 1.095156 > colSd(tmp2) [1] 1.046497 > colMax(tmp2) [1] 2.980951 > colMin(tmp2) [1] -2.440184 > colMedians(tmp2) [1] 0.09643944 > colRanges(tmp2) [,1] [1,] -2.440184 [2,] 2.980951 > > 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.8707753 2.3542942 -0.0156536 3.8940996 -2.9030508 -2.8839184 [7] 3.5825793 2.5435138 -3.3596376 -7.8670045 > colApply(tmp,quantile)[,1] [,1] [1,] -1.3639511 [2,] -0.1246011 [3,] 0.2534275 [4,] 0.7684877 [5,] 1.5980999 > > rowApply(tmp,sum) [1] -0.8206037 2.5864622 -5.5141506 -2.9541872 0.2318675 4.8672333 [7] -2.1434768 0.9883776 3.4429316 -2.4684566 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 10 6 6 5 8 9 8 7 5 2 [2,] 1 10 9 8 6 7 6 2 9 6 [3,] 6 5 10 9 1 6 5 4 4 5 [4,] 7 7 2 6 4 8 10 3 3 10 [5,] 9 1 3 4 3 5 7 1 10 4 [6,] 3 2 4 1 9 4 9 6 8 7 [7,] 8 3 8 10 7 1 3 10 7 9 [8,] 5 4 7 7 10 10 2 9 6 8 [9,] 4 8 5 3 5 2 4 5 2 1 [10,] 2 9 1 2 2 3 1 8 1 3 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.7102844 1.6390250 -0.9767425 -4.0948395 1.2020904 -0.1335463 [7] 2.9307199 0.8568458 -1.6596842 4.8506108 0.1286201 0.6748614 [13] 3.1776273 -0.7078690 -0.9725032 3.2300192 2.8999195 -0.5549498 [19] -1.1086943 1.5801020 > colApply(tmp,quantile)[,1] [,1] [1,] -0.8210599 [2,] -0.4581670 [3,] -0.1304419 [4,] 0.1200241 [5,] 0.5793603 > > rowApply(tmp,sum) [1] 4.9688885 6.7911988 2.1186302 -1.9659993 0.3386099 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 9 5 5 16 10 [2,] 10 18 12 10 8 [3,] 3 7 11 3 16 [4,] 6 9 1 4 2 [5,] 13 11 17 2 17 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.1304419 0.25826404 -0.91482578 -0.30953366 0.3108101 -0.2736096 [2,] -0.4581670 1.43827266 -0.07002611 0.04813486 0.2059666 0.3195404 [3,] -0.8210599 0.26233214 0.20773630 -1.49329765 0.8926443 -0.8467546 [4,] 0.5793603 -0.28833293 -1.09723399 -0.97393904 -1.1151046 0.3907646 [5,] 0.1200241 -0.03151095 0.89760707 -1.36620405 0.9077740 0.2765130 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.2176440 0.8585927 -0.58719463 1.2438715 0.2983748 -0.9374857 [2,] -0.5618407 -0.9516414 0.99400919 1.3928956 -0.8129172 2.0919891 [3,] 1.0735615 -0.3953573 -0.49528873 1.5505135 0.8497666 -1.3321565 [4,] -0.3089695 1.3242657 -1.49248754 0.4512172 -0.9486418 -0.2402780 [5,] 1.5103246 0.0209861 -0.07872244 0.2121130 0.7420377 1.0927925 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.1380859 -0.30410222 -1.09773844 0.2788131 1.3601130 0.6901498 [2,] 0.7778959 -0.41281372 0.19449032 1.6656331 0.5606856 -0.5753068 [3,] 0.5035094 0.06754358 -0.31123570 1.7440517 0.6637429 0.7788245 [4,] -0.3688105 0.98512507 0.05619811 0.4879726 0.7535296 -0.4219425 [5,] 1.1269466 -1.04362168 0.18578249 -0.9464514 -0.4381516 -1.0266746 [,19] [,20] [1,] 2.55889757 -0.6897960 [2,] -0.05590265 1.0003012 [3,] -0.98114655 0.2007007 [4,] -0.42041069 0.6817185 [5,] -2.21013200 0.3871775 > > > 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 : 648 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 : 562 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 row1 0.1857232 -0.03999773 -0.3137791 -0.1331084 -0.1766545 -0.8269361 col7 col8 col9 col10 col11 col12 col13 row1 0.6663283 0.2058653 -0.5793023 -2.070444 -1.263679 0.5727048 -0.7589621 col14 col15 col16 col17 col18 col19 col20 row1 -1.182125 0.4426878 0.2925755 0.07456334 -1.469865 -1.326541 0.6850307 > tmp[,"col10"] col10 row1 -2.0704436 row2 1.2122611 row3 0.3945629 row4 0.2928387 row5 -1.2480689 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.1857232 -0.03999773 -0.3137791 -0.1331084 -0.17665453 -0.8269361 row5 0.3345049 -1.34147186 0.4081422 0.9132034 -0.03282936 0.9232146 col7 col8 col9 col10 col11 col12 row1 0.6663283 0.2058653 -0.5793023 -2.070444 -1.2636794 0.5727048 row5 0.2936218 -0.3455936 -1.0978143 -1.248069 -0.6315657 -0.2971025 col13 col14 col15 col16 col17 col18 col19 row1 -0.75896212 -1.1821255 0.4426878 0.2925755 0.07456334 -1.469865 -1.326541 row5 -0.02936014 -0.4148039 -0.5949676 0.3401645 0.42089807 -1.816000 -1.430626 col20 row1 0.6850307 row5 1.8962687 > tmp[,c("col6","col20")] col6 col20 row1 -0.8269361 0.6850307 row2 -1.1141362 0.5743916 row3 -1.8895567 -0.7466547 row4 -0.9081551 -1.2461406 row5 0.9232146 1.8962687 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.8269361 0.6850307 row5 0.9232146 1.8962687 > > > > > 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.66883 49.51977 49.09331 50.77504 50.16384 103.8572 50.32731 49.96706 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.41958 50.13443 49.22278 51.09217 49.06354 50.54482 50.82847 50.67176 col17 col18 col19 col20 row1 49.71919 50.1985 49.50364 105.7919 > tmp[,"col10"] col10 row1 50.13443 row2 28.98289 row3 29.11476 row4 29.65377 row5 51.26069 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 48.66883 49.51977 49.09331 50.77504 50.16384 103.8572 50.32731 49.96706 row5 51.62666 49.71454 50.12100 51.19129 51.37481 105.3346 51.24760 49.88817 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.41958 50.13443 49.22278 51.09217 49.06354 50.54482 50.82847 50.67176 row5 50.41252 51.26069 49.88600 51.17358 50.12581 49.08680 48.53695 49.82029 col17 col18 col19 col20 row1 49.71919 50.19850 49.50364 105.7919 row5 49.28224 49.16863 49.13540 104.2239 > tmp[,c("col6","col20")] col6 col20 row1 103.85720 105.79188 row2 74.33038 75.39031 row3 74.99860 73.83641 row4 74.46555 74.61900 row5 105.33461 104.22387 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.8572 105.7919 row5 105.3346 104.2239 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.8572 105.7919 row5 105.3346 104.2239 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.32368491 [2,] 1.22748510 [3,] -0.08227227 [4,] -1.22266406 [5,] 0.63745946 > tmp[,c("col17","col7")] col17 col7 [1,] -1.06352499 -1.0958550 [2,] -1.24205231 1.9720638 [3,] -0.05319353 0.2041408 [4,] 0.81149858 -1.9097101 [5,] 0.12973026 -1.6565631 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.2089044 0.4210351 [2,] -1.2575527 -1.0717583 [3,] -0.2490654 1.6523521 [4,] 1.7665821 0.8224219 [5,] -1.6877307 -0.8051725 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.208904 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.208904 [2,] -1.257553 > > > > 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.4310801 0.0673019 0.5523573 -0.1413315 -0.7357485 -1.248905 1.116187 row1 -1.4638590 -0.4959349 0.2278072 -1.4575195 0.1074450 -1.519353 1.904903 [,8] [,9] [,10] [,11] [,12] [,13] row3 1.309928 1.8288552 0.03083514 0.4682147 0.5306254 1.423141 row1 -1.004762 -0.3188941 -0.46912460 0.7562671 0.9142215 -1.237635 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.995335079 0.8085754 -0.6017277 -0.3669150 -0.1657047 -0.80913431 row1 0.006582287 0.7225398 -1.6111488 0.9662225 -0.3829019 0.08039309 [,20] row3 -1.2817545 row1 0.9329337 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.5695276 1.737502 0.5798756 -0.02158758 -0.4810668 0.7283682 0.889388 [,8] [,9] [,10] row2 -0.09105731 -0.5848374 -1.610938 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.1778027 0.08178937 -0.775288 -0.1566731 0.1053743 -0.4968531 0.3646987 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.1120398 -0.6858043 0.8114833 -1.276407 -0.6526057 2.092882 -0.6505631 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.5222454 -0.4126948 -1.068601 0.5723779 0.08621407 -0.4419494 > > > 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: 0x6000017dc060> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f11487a4e" [2] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f2d559fbf" [3] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f506acbd9" [4] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f136d3cce" [5] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f68b30258" [6] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f405f151b" [7] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f2262c0a1" [8] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f1549baa" [9] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f59b7b694" [10] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f2c33dc90" [11] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89fd5889c" [12] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f42fbba31" [13] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f1c7d0952" [14] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f54eef51a" [15] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMb89f141da986" > > > ### 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: 0x6000017180c0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6000017180c0> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6000017180c0> > rowMedians(tmp) [1] 0.162922778 -0.087364735 -0.468905250 -0.195390225 0.439234884 [6] -0.150978465 0.399526737 0.113580082 0.457677304 -0.316546554 [11] 0.121128466 -0.319130458 0.200030418 -0.044592486 0.119990698 [16] -0.014221313 0.001024800 -0.195628068 -0.072477490 -0.619998784 [21] -0.114054663 0.240553501 0.561064704 -0.566642312 0.483290647 [26] 0.081987190 0.296821977 -0.022101251 -0.276597869 0.132915025 [31] -0.106041417 0.429768526 -0.037602120 -0.161684093 -0.003219661 [36] -0.362215065 0.386385735 -0.574699152 0.314145360 0.336747897 [41] -0.326315057 -0.037674996 -0.147164097 -0.042629611 -0.057790326 [46] -0.253418568 -0.029825443 -0.243665913 0.240145923 0.100780407 [51] -0.417721737 0.308447422 0.166258016 0.137254254 0.081687096 [56] 0.003165056 0.398283329 -0.242551216 0.260994658 -0.282501484 [61] -0.137392783 0.095067602 -0.587934284 -0.535452577 0.179681745 [66] -0.016594919 -0.042105913 -0.198403071 0.420575158 -0.544854171 [71] 0.356231495 0.589357228 0.449589328 -0.004468308 0.235337648 [76] 0.400480020 0.255299953 -0.436797679 0.714765377 -0.082731238 [81] 0.138823174 0.129271523 -0.318810929 0.128808924 0.603859601 [86] -0.130699503 0.013017466 -0.067040107 -0.281866275 0.129742853 [91] 0.051553388 0.182380884 0.597936856 0.114611857 -0.358197161 [96] -0.021360170 -0.080082950 0.225248202 -0.028934377 0.029737042 [101] 0.042319066 -0.002010346 -0.211039923 0.221421139 -0.104904091 [106] 0.727395389 -0.441479304 0.381459455 0.369950748 -0.297888324 [111] 0.027523735 0.407494763 -0.052975506 0.729846503 -0.215061874 [116] 0.188809359 -0.280262281 0.139466128 -0.162721441 0.023151226 [121] 0.459011009 -0.285525092 -0.507763928 0.379979953 0.036095966 [126] -0.019282208 0.201861682 0.748792810 0.227426250 0.018391410 [131] -0.016062142 0.365289501 -0.241883955 0.092690049 -0.045351044 [136] 0.543128980 0.631938270 -0.326917165 0.446294330 -0.125983589 [141] 0.124554536 0.151937613 0.307379445 0.534266490 0.083588668 [146] 0.477376043 -0.081257135 -0.272181474 -0.161694781 0.147290197 [151] -0.048174001 0.001786158 -0.339954749 0.241399164 -0.371326275 [156] 0.188361488 0.259321010 0.357431764 -0.061411728 -0.126097795 [161] 0.143981581 -0.171690555 0.030477079 0.033360418 0.262812250 [166] -0.299095302 0.132770073 -0.470607332 0.155408250 -0.291608645 [171] -0.373518395 0.403880887 0.124624431 -0.314272037 0.356038611 [176] -0.017359489 -0.671564303 -0.017304933 0.179669577 -0.314953102 [181] 0.280072513 0.731311128 0.531078649 0.547232086 -0.495798421 [186] 0.466011512 0.257092554 -0.448527592 -0.476254714 0.009803555 [191] 0.269042562 -0.112021128 0.026630901 -0.095868471 0.180760806 [196] 0.046600944 0.234222071 0.006635628 -0.338189361 0.287634154 [201] -0.004309991 -0.436848862 -0.441069049 0.154986373 -0.451046531 [206] -0.033982118 0.411229610 0.130335898 0.468906700 -0.568884293 [211] 0.442138741 0.049289674 0.142050947 0.364645624 0.206104740 [216] -0.411504032 0.052514792 0.297602524 0.075748851 -0.252349224 [221] 0.444190977 -0.115317323 0.536924066 0.259367006 0.029018584 [226] 0.283438905 0.143652921 0.037918500 0.269835911 0.481591748 > > proc.time() user system elapsed 2.673 16.097 19.565
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.5.0 RC (2025-04-04 r88126) -- "How About a Twenty-Six" 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: 0x600002bf4000> > .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: 0x600002bf4000> > .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: 0x600002bf4000> > .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: 0x600002bf4000> > 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: 0x600002b94000> > .Call("R_bm_AddColumn",P) <pointer: 0x600002b94000> > .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: 0x600002b94000> > .Call("R_bm_AddColumn",P) <pointer: 0x600002b94000> > .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: 0x600002b94000> > 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: 0x600002bfc060> > .Call("R_bm_AddColumn",P) <pointer: 0x600002bfc060> > .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: 0x600002bfc060> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600002bfc060> > .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: 0x600002bfc060> > > .Call("R_bm_RowMode",P) <pointer: 0x600002bfc060> > .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: 0x600002bfc060> > > .Call("R_bm_ColMode",P) <pointer: 0x600002bfc060> > .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: 0x600002bfc060> > 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: 0x600002b90000> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600002b90000> > .Call("R_bm_AddColumn",P) <pointer: 0x600002b90000> > .Call("R_bm_AddColumn",P) <pointer: 0x600002b90000> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilebff63c9d285f" "BufferedMatrixFilebff66aa22aa2" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilebff63c9d285f" "BufferedMatrixFilebff66aa22aa2" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600002bec0c0> > .Call("R_bm_AddColumn",P) <pointer: 0x600002bec0c0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600002bec0c0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600002bec0c0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600002bec0c0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600002bec0c0> > .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: 0x600002bec240> > .Call("R_bm_AddColumn",P) <pointer: 0x600002bec240> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600002bec240> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600002bec240> > 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: 0x600002bec420> > .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: 0x600002bec420> > rm(P) > > proc.time() user system elapsed 0.326 0.157 0.474
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.0 RC (2025-04-04 r88126) -- "How About a Twenty-Six" 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.329 0.098 0.410