Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-02-05 11:42 -0500 (Wed, 05 Feb 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | R Under development (unstable) (2025-01-20 r87609) -- "Unsuffered Consequences" | 4717 |
palomino7 | Windows Server 2022 Datacenter | x64 | R Under development (unstable) (2025-01-21 r87610 ucrt) -- "Unsuffered Consequences" | 4478 |
lconway | macOS 12.7.1 Monterey | x86_64 | R Under development (unstable) (2025-01-22 r87618) -- "Unsuffered Consequences" | 4489 |
kjohnson3 | macOS 13.7.1 Ventura | arm64 | R Under development (unstable) (2025-01-20 r87609) -- "Unsuffered Consequences" | 4442 |
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 247/2295 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.71.1 (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 | ![]() | ||||||||
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.71.1 |
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.71.1.tar.gz |
StartedAt: 2025-02-04 19:18:55 -0500 (Tue, 04 Feb 2025) |
EndedAt: 2025-02-04 19:19:47 -0500 (Tue, 04 Feb 2025) |
EllapsedTime: 51.7 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.71.1.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck’ * using R Under development (unstable) (2025-01-22 r87618) * 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.71.1’ * 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.71.1’ ** using staged installation ** libs using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /Library/Frameworks/R.framework/Versions/4.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 Under development (unstable) (2025-01-22 r87618) -- "Unsuffered Consequences" 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.299 0.138 0.432
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2025-01-22 r87618) -- "Unsuffered Consequences" 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 480185 25.7 1054630 56.4 NA 634654 33.9 Vcells 889954 6.8 8388608 64.0 98304 2107350 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] "Tue Feb 4 19:19:19 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Tue Feb 4 19:19:19 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: 0x600003ba8000> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Tue Feb 4 19:19:23 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Tue Feb 4 19:19:25 2025" > > ColMode(tmp2) <pointer: 0x600003ba8000> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.56855550 -0.62966879 -1.6086055 -1.15781599 [2,] 0.07878536 0.16035399 0.1626438 -1.70921541 [3,] 1.58941659 0.02742933 0.4334517 -0.11067196 [4,] 0.38343475 0.40942203 0.3666300 0.06800902 > 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,] 99.56855550 0.62966879 1.6086055 1.15781599 [2,] 0.07878536 0.16035399 0.1626438 1.70921541 [3,] 1.58941659 0.02742933 0.4334517 0.11067196 [4,] 0.38343475 0.40942203 0.3666300 0.06800902 > 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,] 9.9784045 0.7935167 1.2683081 1.0760186 [2,] 0.2806873 0.4004422 0.4032912 1.3073697 [3,] 1.2607207 0.1656180 0.6583705 0.3326740 [4,] 0.6192211 0.6398609 0.6054998 0.2607854 > > 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,] 224.35260 33.56484 39.29169 36.91800 [2,] 27.88566 29.16478 29.19556 39.78291 [3,] 39.19662 26.68361 32.01716 28.43741 [4,] 31.57565 31.80803 31.42163 27.67586 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600003bb4000> > exp(tmp5) <pointer: 0x600003bb4000> > log(tmp5,2) <pointer: 0x600003bb4000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.9605 > Min(tmp5) [1] 53.18732 > mean(tmp5) [1] 73.24871 > Sum(tmp5) [1] 14649.74 > Var(tmp5) [1] 860.5995 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.36634 70.72722 72.80347 69.48926 72.13868 69.93012 72.23548 67.51482 [9] 72.53284 74.74882 > rowSums(tmp5) [1] 1807.327 1414.544 1456.069 1389.785 1442.774 1398.602 1444.710 1350.296 [9] 1450.657 1494.976 > rowVars(tmp5) [1] 7945.07893 92.99096 106.92085 51.23136 62.28475 101.97842 [7] 41.64364 75.27434 78.38452 76.15988 > rowSd(tmp5) [1] 89.135172 9.643182 10.340254 7.157608 7.892069 10.098436 6.453189 [8] 8.676078 8.853503 8.726963 > rowMax(tmp5) [1] 466.96054 88.32076 92.49796 84.32957 84.16860 86.89642 80.53905 [8] 80.99808 93.10161 97.38816 > rowMin(tmp5) [1] 56.40553 56.58735 54.51561 57.39253 57.71403 53.27949 58.58319 53.18732 [9] 54.21792 59.04557 > > colMeans(tmp5) [1] 112.28757 65.77805 71.60023 68.59025 75.27721 70.39151 66.50651 [8] 70.49682 70.75067 70.06182 75.73413 71.26321 69.68253 67.91951 [15] 72.20326 72.85105 72.73612 72.70099 76.13941 72.00326 > colSums(tmp5) [1] 1122.8757 657.7805 716.0023 685.9025 752.7721 703.9151 665.0651 [8] 704.9682 707.5067 700.6182 757.3413 712.6321 696.8253 679.1951 [15] 722.0326 728.5105 727.3612 727.0099 761.3941 720.0326 > colVars(tmp5) [1] 15592.88003 55.24218 73.89933 141.35298 45.28225 106.05403 [7] 45.77545 61.31080 36.81868 95.84261 83.82491 54.63895 [13] 61.42180 91.00995 85.77280 94.99616 52.85404 126.57430 [19] 59.44151 120.56796 > colSd(tmp5) [1] 124.871454 7.432508 8.596472 11.889196 6.729209 10.298254 [7] 6.765756 7.830121 6.067840 9.789924 9.155594 7.391817 [13] 7.837206 9.539913 9.261361 9.746597 7.270078 11.250525 [19] 7.709832 10.980344 > colMax(tmp5) [1] 466.96054 79.55167 85.82058 84.16860 84.89985 86.89642 73.39263 [8] 83.68089 80.76784 85.45022 91.87308 79.97574 80.54146 84.25363 [15] 89.16413 88.32076 81.77789 97.38816 92.49796 93.10161 > colMin(tmp5) [1] 58.04034 55.53844 60.76672 53.27949 63.51773 56.75053 54.51561 53.73606 [9] 62.35479 53.18732 59.72609 56.58735 58.83125 55.51858 60.41158 59.48404 [17] 56.59617 60.90699 64.43904 58.58319 > > > ### 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] 90.36634 NA 72.80347 69.48926 72.13868 69.93012 72.23548 67.51482 [9] 72.53284 74.74882 > rowSums(tmp5) [1] 1807.327 NA 1456.069 1389.785 1442.774 1398.602 1444.710 1350.296 [9] 1450.657 1494.976 > rowVars(tmp5) [1] 7945.07893 96.10786 106.92085 51.23136 62.28475 101.97842 [7] 41.64364 75.27434 78.38452 76.15988 > rowSd(tmp5) [1] 89.135172 9.803462 10.340254 7.157608 7.892069 10.098436 6.453189 [8] 8.676078 8.853503 8.726963 > rowMax(tmp5) [1] 466.96054 NA 92.49796 84.32957 84.16860 86.89642 80.53905 [8] 80.99808 93.10161 97.38816 > rowMin(tmp5) [1] 56.40553 NA 54.51561 57.39253 57.71403 53.27949 58.58319 53.18732 [9] 54.21792 59.04557 > > colMeans(tmp5) [1] 112.28757 65.77805 71.60023 68.59025 75.27721 70.39151 66.50651 [8] 70.49682 70.75067 70.06182 75.73413 71.26321 NA 67.91951 [15] 72.20326 72.85105 72.73612 72.70099 76.13941 72.00326 > colSums(tmp5) [1] 1122.8757 657.7805 716.0023 685.9025 752.7721 703.9151 665.0651 [8] 704.9682 707.5067 700.6182 757.3413 712.6321 NA 679.1951 [15] 722.0326 728.5105 727.3612 727.0099 761.3941 720.0326 > colVars(tmp5) [1] 15592.88003 55.24218 73.89933 141.35298 45.28225 106.05403 [7] 45.77545 61.31080 36.81868 95.84261 83.82491 54.63895 [13] NA 91.00995 85.77280 94.99616 52.85404 126.57430 [19] 59.44151 120.56796 > colSd(tmp5) [1] 124.871454 7.432508 8.596472 11.889196 6.729209 10.298254 [7] 6.765756 7.830121 6.067840 9.789924 9.155594 7.391817 [13] NA 9.539913 9.261361 9.746597 7.270078 11.250525 [19] 7.709832 10.980344 > colMax(tmp5) [1] 466.96054 79.55167 85.82058 84.16860 84.89985 86.89642 73.39263 [8] 83.68089 80.76784 85.45022 91.87308 79.97574 NA 84.25363 [15] 89.16413 88.32076 81.77789 97.38816 92.49796 93.10161 > colMin(tmp5) [1] 58.04034 55.53844 60.76672 53.27949 63.51773 56.75053 54.51561 53.73606 [9] 62.35479 53.18732 59.72609 56.58735 NA 55.51858 60.41158 59.48404 [17] 56.59617 60.90699 64.43904 58.58319 > > Max(tmp5,na.rm=TRUE) [1] 466.9605 > Min(tmp5,na.rm=TRUE) [1] 53.18732 > mean(tmp5,na.rm=TRUE) [1] 73.23163 > Sum(tmp5,na.rm=TRUE) [1] 14573.09 > Var(tmp5,na.rm=TRUE) [1] 864.8874 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.36634 70.41566 72.80347 69.48926 72.13868 69.93012 72.23548 67.51482 [9] 72.53284 74.74882 > rowSums(tmp5,na.rm=TRUE) [1] 1807.327 1337.898 1456.069 1389.785 1442.774 1398.602 1444.710 1350.296 [9] 1450.657 1494.976 > rowVars(tmp5,na.rm=TRUE) [1] 7945.07893 96.10786 106.92085 51.23136 62.28475 101.97842 [7] 41.64364 75.27434 78.38452 76.15988 > rowSd(tmp5,na.rm=TRUE) [1] 89.135172 9.803462 10.340254 7.157608 7.892069 10.098436 6.453189 [8] 8.676078 8.853503 8.726963 > rowMax(tmp5,na.rm=TRUE) [1] 466.96054 88.32076 92.49796 84.32957 84.16860 86.89642 80.53905 [8] 80.99808 93.10161 97.38816 > rowMin(tmp5,na.rm=TRUE) [1] 56.40553 56.58735 54.51561 57.39253 57.71403 53.27949 58.58319 53.18732 [9] 54.21792 59.04557 > > colMeans(tmp5,na.rm=TRUE) [1] 112.28757 65.77805 71.60023 68.59025 75.27721 70.39151 66.50651 [8] 70.49682 70.75067 70.06182 75.73413 71.26321 68.90872 67.91951 [15] 72.20326 72.85105 72.73612 72.70099 76.13941 72.00326 > colSums(tmp5,na.rm=TRUE) [1] 1122.8757 657.7805 716.0023 685.9025 752.7721 703.9151 665.0651 [8] 704.9682 707.5067 700.6182 757.3413 712.6321 620.1784 679.1951 [15] 722.0326 728.5105 727.3612 727.0099 761.3941 720.0326 > colVars(tmp5,na.rm=TRUE) [1] 15592.88003 55.24218 73.89933 141.35298 45.28225 106.05403 [7] 45.77545 61.31080 36.81868 95.84261 83.82491 54.63895 [13] 62.36312 91.00995 85.77280 94.99616 52.85404 126.57430 [19] 59.44151 120.56796 > colSd(tmp5,na.rm=TRUE) [1] 124.871454 7.432508 8.596472 11.889196 6.729209 10.298254 [7] 6.765756 7.830121 6.067840 9.789924 9.155594 7.391817 [13] 7.897032 9.539913 9.261361 9.746597 7.270078 11.250525 [19] 7.709832 10.980344 > colMax(tmp5,na.rm=TRUE) [1] 466.96054 79.55167 85.82058 84.16860 84.89985 86.89642 73.39263 [8] 83.68089 80.76784 85.45022 91.87308 79.97574 80.54146 84.25363 [15] 89.16413 88.32076 81.77789 97.38816 92.49796 93.10161 > colMin(tmp5,na.rm=TRUE) [1] 58.04034 55.53844 60.76672 53.27949 63.51773 56.75053 54.51561 53.73606 [9] 62.35479 53.18732 59.72609 56.58735 58.83125 55.51858 60.41158 59.48404 [17] 56.59617 60.90699 64.43904 58.58319 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.36634 NaN 72.80347 69.48926 72.13868 69.93012 72.23548 67.51482 [9] 72.53284 74.74882 > rowSums(tmp5,na.rm=TRUE) [1] 1807.327 0.000 1456.069 1389.785 1442.774 1398.602 1444.710 1350.296 [9] 1450.657 1494.976 > rowVars(tmp5,na.rm=TRUE) [1] 7945.07893 NA 106.92085 51.23136 62.28475 101.97842 [7] 41.64364 75.27434 78.38452 76.15988 > rowSd(tmp5,na.rm=TRUE) [1] 89.135172 NA 10.340254 7.157608 7.892069 10.098436 6.453189 [8] 8.676078 8.853503 8.726963 > rowMax(tmp5,na.rm=TRUE) [1] 466.96054 NA 92.49796 84.32957 84.16860 86.89642 80.53905 [8] 80.99808 93.10161 97.38816 > rowMin(tmp5,na.rm=TRUE) [1] 56.40553 NA 54.51561 57.39253 57.71403 53.27949 58.58319 53.18732 [9] 54.21792 59.04557 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 118.31504 66.34198 72.80396 67.01107 75.66148 70.12537 66.03753 [8] 70.95803 71.56808 68.35200 74.97037 72.89387 NaN 68.80194 [15] 73.14631 71.13220 72.12392 73.37311 76.03510 72.01739 > colSums(tmp5,na.rm=TRUE) [1] 1064.8354 597.0778 655.2356 603.0996 680.9533 631.1283 594.3377 [8] 638.6223 644.1127 615.1680 674.7333 656.0448 0.0000 619.2175 [15] 658.3168 640.1898 649.1152 660.3580 684.3159 648.1565 > colVars(tmp5,na.rm=TRUE) [1] 17133.27312 58.56973 66.83606 130.96657 49.28135 118.51392 [7] 49.02300 66.58164 33.90419 74.93364 87.74056 31.55481 [13] NA 93.62597 86.48917 73.63293 55.24430 137.31397 [19] 66.74928 135.63671 > colSd(tmp5,na.rm=TRUE) [1] 130.894129 7.653086 8.175332 11.444063 7.020068 10.886410 [7] 7.001643 8.159757 5.822730 8.656422 9.366993 5.617367 [13] NA 9.676051 9.299955 8.580963 7.432651 11.718104 [19] 8.170023 11.646317 > colMax(tmp5,na.rm=TRUE) [1] 466.96054 79.55167 85.82058 84.16860 84.89985 86.89642 73.39263 [8] 83.68089 80.76784 77.27019 91.87308 79.97574 -Inf 84.25363 [15] 89.16413 83.86996 81.77789 97.38816 92.49796 93.10161 > colMin(tmp5,na.rm=TRUE) [1] 65.72057 55.53844 62.42415 53.27949 63.51773 56.75053 54.51561 53.73606 [9] 62.35479 53.18732 59.72609 61.31655 Inf 55.51858 60.41158 59.48404 [17] 56.59617 60.90699 64.43904 58.58319 > > > > > 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] 120.7095 266.6274 148.9774 204.9651 132.4954 296.3747 186.6313 174.1552 [9] 200.8606 179.2221 > apply(copymatrix,1,var,na.rm=TRUE) [1] 120.7095 266.6274 148.9774 204.9651 132.4954 296.3747 186.6313 174.1552 [9] 200.8606 179.2221 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] -5.684342e-14 2.273737e-13 -2.842171e-14 0.000000e+00 7.105427e-14 [6] 0.000000e+00 -1.278977e-13 -1.421085e-14 0.000000e+00 -2.842171e-14 [11] -7.105427e-14 1.136868e-13 1.136868e-13 -8.526513e-14 0.000000e+00 [16] 0.000000e+00 0.000000e+00 2.842171e-14 -1.136868e-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) + } 7 15 9 9 2 20 4 14 10 16 10 7 7 2 10 16 6 20 1 8 5 20 1 7 2 4 10 5 3 9 6 2 4 18 4 12 10 12 4 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] 2.235006 > Min(tmp) [1] -2.314035 > mean(tmp) [1] -0.07902827 > Sum(tmp) [1] -7.902827 > Var(tmp) [1] 1.130449 > > rowMeans(tmp) [1] -0.07902827 > rowSums(tmp) [1] -7.902827 > rowVars(tmp) [1] 1.130449 > rowSd(tmp) [1] 1.063226 > rowMax(tmp) [1] 2.235006 > rowMin(tmp) [1] -2.314035 > > colMeans(tmp) [1] -1.426332498 -1.006239947 -0.896362459 0.358868710 0.700753929 [6] -0.485452360 0.527267849 0.729231515 1.367450008 -1.361923850 [11] -1.234851738 1.141437960 0.493469579 0.928490833 0.922589887 [16] -0.504872790 -0.006219056 -1.104850470 -0.274480034 -1.661460394 [21] -0.176124407 1.070493364 0.506623102 -0.157601466 -1.349605503 [26] 1.755200034 -1.022832731 2.235005881 -1.807232726 -1.196853781 [31] -2.039578068 -1.420723035 -0.490456708 0.579654355 1.304931111 [36] 0.098791230 1.466989519 1.171291766 0.114653863 -1.650870597 [41] 0.087579880 0.460308407 0.509887024 1.993010920 -1.872326191 [46] -0.222246519 -1.723515360 -0.426320553 0.754388112 -1.362005825 [51] 0.813091211 1.451284059 -0.080282618 1.322548172 0.428282863 [56] -2.314034816 -0.580355042 1.818689324 -1.055687907 -0.369126779 [61] -1.072665590 -0.601759304 -0.460653039 -0.517323869 -0.894954744 [66] 1.299740375 1.437811419 -0.166806781 -0.598010513 -1.804679950 [71] -1.400624322 0.004408910 -1.429366873 -0.537382750 -0.500988464 [76] -1.657288759 0.779281231 -0.244763899 0.393867179 0.283072061 [81] 0.535021193 0.636148746 1.507820247 0.769716858 0.564823837 [86] -0.813207405 0.251474611 0.254030572 0.313932919 -2.028696374 [91] 1.517070380 0.863656610 -0.972355297 1.258155847 -0.531505486 [96] 0.487501846 -0.384089089 -0.268989512 -0.357424352 0.351736739 > colSums(tmp) [1] -1.426332498 -1.006239947 -0.896362459 0.358868710 0.700753929 [6] -0.485452360 0.527267849 0.729231515 1.367450008 -1.361923850 [11] -1.234851738 1.141437960 0.493469579 0.928490833 0.922589887 [16] -0.504872790 -0.006219056 -1.104850470 -0.274480034 -1.661460394 [21] -0.176124407 1.070493364 0.506623102 -0.157601466 -1.349605503 [26] 1.755200034 -1.022832731 2.235005881 -1.807232726 -1.196853781 [31] -2.039578068 -1.420723035 -0.490456708 0.579654355 1.304931111 [36] 0.098791230 1.466989519 1.171291766 0.114653863 -1.650870597 [41] 0.087579880 0.460308407 0.509887024 1.993010920 -1.872326191 [46] -0.222246519 -1.723515360 -0.426320553 0.754388112 -1.362005825 [51] 0.813091211 1.451284059 -0.080282618 1.322548172 0.428282863 [56] -2.314034816 -0.580355042 1.818689324 -1.055687907 -0.369126779 [61] -1.072665590 -0.601759304 -0.460653039 -0.517323869 -0.894954744 [66] 1.299740375 1.437811419 -0.166806781 -0.598010513 -1.804679950 [71] -1.400624322 0.004408910 -1.429366873 -0.537382750 -0.500988464 [76] -1.657288759 0.779281231 -0.244763899 0.393867179 0.283072061 [81] 0.535021193 0.636148746 1.507820247 0.769716858 0.564823837 [86] -0.813207405 0.251474611 0.254030572 0.313932919 -2.028696374 [91] 1.517070380 0.863656610 -0.972355297 1.258155847 -0.531505486 [96] 0.487501846 -0.384089089 -0.268989512 -0.357424352 0.351736739 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] -1.426332498 -1.006239947 -0.896362459 0.358868710 0.700753929 [6] -0.485452360 0.527267849 0.729231515 1.367450008 -1.361923850 [11] -1.234851738 1.141437960 0.493469579 0.928490833 0.922589887 [16] -0.504872790 -0.006219056 -1.104850470 -0.274480034 -1.661460394 [21] -0.176124407 1.070493364 0.506623102 -0.157601466 -1.349605503 [26] 1.755200034 -1.022832731 2.235005881 -1.807232726 -1.196853781 [31] -2.039578068 -1.420723035 -0.490456708 0.579654355 1.304931111 [36] 0.098791230 1.466989519 1.171291766 0.114653863 -1.650870597 [41] 0.087579880 0.460308407 0.509887024 1.993010920 -1.872326191 [46] -0.222246519 -1.723515360 -0.426320553 0.754388112 -1.362005825 [51] 0.813091211 1.451284059 -0.080282618 1.322548172 0.428282863 [56] -2.314034816 -0.580355042 1.818689324 -1.055687907 -0.369126779 [61] -1.072665590 -0.601759304 -0.460653039 -0.517323869 -0.894954744 [66] 1.299740375 1.437811419 -0.166806781 -0.598010513 -1.804679950 [71] -1.400624322 0.004408910 -1.429366873 -0.537382750 -0.500988464 [76] -1.657288759 0.779281231 -0.244763899 0.393867179 0.283072061 [81] 0.535021193 0.636148746 1.507820247 0.769716858 0.564823837 [86] -0.813207405 0.251474611 0.254030572 0.313932919 -2.028696374 [91] 1.517070380 0.863656610 -0.972355297 1.258155847 -0.531505486 [96] 0.487501846 -0.384089089 -0.268989512 -0.357424352 0.351736739 > colMin(tmp) [1] -1.426332498 -1.006239947 -0.896362459 0.358868710 0.700753929 [6] -0.485452360 0.527267849 0.729231515 1.367450008 -1.361923850 [11] -1.234851738 1.141437960 0.493469579 0.928490833 0.922589887 [16] -0.504872790 -0.006219056 -1.104850470 -0.274480034 -1.661460394 [21] -0.176124407 1.070493364 0.506623102 -0.157601466 -1.349605503 [26] 1.755200034 -1.022832731 2.235005881 -1.807232726 -1.196853781 [31] -2.039578068 -1.420723035 -0.490456708 0.579654355 1.304931111 [36] 0.098791230 1.466989519 1.171291766 0.114653863 -1.650870597 [41] 0.087579880 0.460308407 0.509887024 1.993010920 -1.872326191 [46] -0.222246519 -1.723515360 -0.426320553 0.754388112 -1.362005825 [51] 0.813091211 1.451284059 -0.080282618 1.322548172 0.428282863 [56] -2.314034816 -0.580355042 1.818689324 -1.055687907 -0.369126779 [61] -1.072665590 -0.601759304 -0.460653039 -0.517323869 -0.894954744 [66] 1.299740375 1.437811419 -0.166806781 -0.598010513 -1.804679950 [71] -1.400624322 0.004408910 -1.429366873 -0.537382750 -0.500988464 [76] -1.657288759 0.779281231 -0.244763899 0.393867179 0.283072061 [81] 0.535021193 0.636148746 1.507820247 0.769716858 0.564823837 [86] -0.813207405 0.251474611 0.254030572 0.313932919 -2.028696374 [91] 1.517070380 0.863656610 -0.972355297 1.258155847 -0.531505486 [96] 0.487501846 -0.384089089 -0.268989512 -0.357424352 0.351736739 > colMedians(tmp) [1] -1.426332498 -1.006239947 -0.896362459 0.358868710 0.700753929 [6] -0.485452360 0.527267849 0.729231515 1.367450008 -1.361923850 [11] -1.234851738 1.141437960 0.493469579 0.928490833 0.922589887 [16] -0.504872790 -0.006219056 -1.104850470 -0.274480034 -1.661460394 [21] -0.176124407 1.070493364 0.506623102 -0.157601466 -1.349605503 [26] 1.755200034 -1.022832731 2.235005881 -1.807232726 -1.196853781 [31] -2.039578068 -1.420723035 -0.490456708 0.579654355 1.304931111 [36] 0.098791230 1.466989519 1.171291766 0.114653863 -1.650870597 [41] 0.087579880 0.460308407 0.509887024 1.993010920 -1.872326191 [46] -0.222246519 -1.723515360 -0.426320553 0.754388112 -1.362005825 [51] 0.813091211 1.451284059 -0.080282618 1.322548172 0.428282863 [56] -2.314034816 -0.580355042 1.818689324 -1.055687907 -0.369126779 [61] -1.072665590 -0.601759304 -0.460653039 -0.517323869 -0.894954744 [66] 1.299740375 1.437811419 -0.166806781 -0.598010513 -1.804679950 [71] -1.400624322 0.004408910 -1.429366873 -0.537382750 -0.500988464 [76] -1.657288759 0.779281231 -0.244763899 0.393867179 0.283072061 [81] 0.535021193 0.636148746 1.507820247 0.769716858 0.564823837 [86] -0.813207405 0.251474611 0.254030572 0.313932919 -2.028696374 [91] 1.517070380 0.863656610 -0.972355297 1.258155847 -0.531505486 [96] 0.487501846 -0.384089089 -0.268989512 -0.357424352 0.351736739 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.426332 -1.00624 -0.8963625 0.3588687 0.7007539 -0.4854524 0.5272678 [2,] -1.426332 -1.00624 -0.8963625 0.3588687 0.7007539 -0.4854524 0.5272678 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.7292315 1.36745 -1.361924 -1.234852 1.141438 0.4934696 0.9284908 [2,] 0.7292315 1.36745 -1.361924 -1.234852 1.141438 0.4934696 0.9284908 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.9225899 -0.5048728 -0.006219056 -1.10485 -0.27448 -1.66146 -0.1761244 [2,] 0.9225899 -0.5048728 -0.006219056 -1.10485 -0.27448 -1.66146 -0.1761244 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.070493 0.5066231 -0.1576015 -1.349606 1.7552 -1.022833 2.235006 [2,] 1.070493 0.5066231 -0.1576015 -1.349606 1.7552 -1.022833 2.235006 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -1.807233 -1.196854 -2.039578 -1.420723 -0.4904567 0.5796544 1.304931 [2,] -1.807233 -1.196854 -2.039578 -1.420723 -0.4904567 0.5796544 1.304931 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.09879123 1.46699 1.171292 0.1146539 -1.650871 0.08757988 0.4603084 [2,] 0.09879123 1.46699 1.171292 0.1146539 -1.650871 0.08757988 0.4603084 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.509887 1.993011 -1.872326 -0.2222465 -1.723515 -0.4263206 0.7543881 [2,] 0.509887 1.993011 -1.872326 -0.2222465 -1.723515 -0.4263206 0.7543881 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -1.362006 0.8130912 1.451284 -0.08028262 1.322548 0.4282829 -2.314035 [2,] -1.362006 0.8130912 1.451284 -0.08028262 1.322548 0.4282829 -2.314035 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.580355 1.818689 -1.055688 -0.3691268 -1.072666 -0.6017593 -0.460653 [2,] -0.580355 1.818689 -1.055688 -0.3691268 -1.072666 -0.6017593 -0.460653 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.5173239 -0.8949547 1.29974 1.437811 -0.1668068 -0.5980105 -1.80468 [2,] -0.5173239 -0.8949547 1.29974 1.437811 -0.1668068 -0.5980105 -1.80468 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -1.400624 0.00440891 -1.429367 -0.5373827 -0.5009885 -1.657289 0.7792812 [2,] -1.400624 0.00440891 -1.429367 -0.5373827 -0.5009885 -1.657289 0.7792812 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.2447639 0.3938672 0.2830721 0.5350212 0.6361487 1.50782 0.7697169 [2,] -0.2447639 0.3938672 0.2830721 0.5350212 0.6361487 1.50782 0.7697169 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.5648238 -0.8132074 0.2514746 0.2540306 0.3139329 -2.028696 1.51707 [2,] 0.5648238 -0.8132074 0.2514746 0.2540306 0.3139329 -2.028696 1.51707 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.8636566 -0.9723553 1.258156 -0.5315055 0.4875018 -0.3840891 -0.2689895 [2,] 0.8636566 -0.9723553 1.258156 -0.5315055 0.4875018 -0.3840891 -0.2689895 [,99] [,100] [1,] -0.3574244 0.3517367 [2,] -0.3574244 0.3517367 > > > Max(tmp2) [1] 2.65353 > Min(tmp2) [1] -2.390486 > mean(tmp2) [1] -0.03719936 > Sum(tmp2) [1] -3.719936 > Var(tmp2) [1] 1.027379 > > rowMeans(tmp2) [1] 1.11945608 -0.10928697 -1.17070487 -0.78124460 0.99247862 1.75950092 [7] -2.39048633 0.83202430 -0.50826586 -0.82147047 1.90057646 0.34608753 [13] -0.67611104 -1.16692661 -0.83824277 1.03189383 -0.79921660 0.20277606 [19] 1.54303215 0.59395376 -1.08192508 -1.84321040 -0.12782222 0.43277944 [25] -1.82963817 -0.50778526 -0.13425965 0.62068249 0.93175768 0.54568549 [31] -0.97376878 0.35799249 0.87784654 0.81946639 -0.39647494 0.43348313 [37] -0.74379678 1.81237141 2.45290249 -0.49004869 -1.13760347 -1.06289601 [43] -0.32413303 0.05696900 -1.16215701 -0.46839041 -1.97932737 -0.20987616 [49] -0.57886398 0.80153386 0.10563323 1.46005228 0.96504928 1.40612093 [55] -0.50763094 0.15543564 -0.35865205 -1.12140712 1.30494450 1.08748173 [61] -0.34289917 -0.03663877 0.76373747 -0.67487025 2.14225728 -0.67538047 [67] -1.23308310 0.36199453 -0.45217137 -0.50800301 0.69945335 0.44994540 [73] -1.09304503 -0.23890773 -0.61304670 0.40153710 -0.90035408 0.36800668 [79] -1.40653772 -0.80610666 -1.64346098 -0.61815582 0.72286803 0.92304240 [85] -0.33240942 -0.90784091 -0.42220142 -0.77961032 -1.04123361 0.40105427 [91] 2.65352970 -0.96303412 -0.25560691 -0.15724876 -0.93114269 1.03313771 [97] 1.60203686 -0.35247216 0.63312893 -0.13854826 > rowSums(tmp2) [1] 1.11945608 -0.10928697 -1.17070487 -0.78124460 0.99247862 1.75950092 [7] -2.39048633 0.83202430 -0.50826586 -0.82147047 1.90057646 0.34608753 [13] -0.67611104 -1.16692661 -0.83824277 1.03189383 -0.79921660 0.20277606 [19] 1.54303215 0.59395376 -1.08192508 -1.84321040 -0.12782222 0.43277944 [25] -1.82963817 -0.50778526 -0.13425965 0.62068249 0.93175768 0.54568549 [31] -0.97376878 0.35799249 0.87784654 0.81946639 -0.39647494 0.43348313 [37] -0.74379678 1.81237141 2.45290249 -0.49004869 -1.13760347 -1.06289601 [43] -0.32413303 0.05696900 -1.16215701 -0.46839041 -1.97932737 -0.20987616 [49] -0.57886398 0.80153386 0.10563323 1.46005228 0.96504928 1.40612093 [55] -0.50763094 0.15543564 -0.35865205 -1.12140712 1.30494450 1.08748173 [61] -0.34289917 -0.03663877 0.76373747 -0.67487025 2.14225728 -0.67538047 [67] -1.23308310 0.36199453 -0.45217137 -0.50800301 0.69945335 0.44994540 [73] -1.09304503 -0.23890773 -0.61304670 0.40153710 -0.90035408 0.36800668 [79] -1.40653772 -0.80610666 -1.64346098 -0.61815582 0.72286803 0.92304240 [85] -0.33240942 -0.90784091 -0.42220142 -0.77961032 -1.04123361 0.40105427 [91] 2.65352970 -0.96303412 -0.25560691 -0.15724876 -0.93114269 1.03313771 [97] 1.60203686 -0.35247216 0.63312893 -0.13854826 > 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.11945608 -0.10928697 -1.17070487 -0.78124460 0.99247862 1.75950092 [7] -2.39048633 0.83202430 -0.50826586 -0.82147047 1.90057646 0.34608753 [13] -0.67611104 -1.16692661 -0.83824277 1.03189383 -0.79921660 0.20277606 [19] 1.54303215 0.59395376 -1.08192508 -1.84321040 -0.12782222 0.43277944 [25] -1.82963817 -0.50778526 -0.13425965 0.62068249 0.93175768 0.54568549 [31] -0.97376878 0.35799249 0.87784654 0.81946639 -0.39647494 0.43348313 [37] -0.74379678 1.81237141 2.45290249 -0.49004869 -1.13760347 -1.06289601 [43] -0.32413303 0.05696900 -1.16215701 -0.46839041 -1.97932737 -0.20987616 [49] -0.57886398 0.80153386 0.10563323 1.46005228 0.96504928 1.40612093 [55] -0.50763094 0.15543564 -0.35865205 -1.12140712 1.30494450 1.08748173 [61] -0.34289917 -0.03663877 0.76373747 -0.67487025 2.14225728 -0.67538047 [67] -1.23308310 0.36199453 -0.45217137 -0.50800301 0.69945335 0.44994540 [73] -1.09304503 -0.23890773 -0.61304670 0.40153710 -0.90035408 0.36800668 [79] -1.40653772 -0.80610666 -1.64346098 -0.61815582 0.72286803 0.92304240 [85] -0.33240942 -0.90784091 -0.42220142 -0.77961032 -1.04123361 0.40105427 [91] 2.65352970 -0.96303412 -0.25560691 -0.15724876 -0.93114269 1.03313771 [97] 1.60203686 -0.35247216 0.63312893 -0.13854826 > rowMin(tmp2) [1] 1.11945608 -0.10928697 -1.17070487 -0.78124460 0.99247862 1.75950092 [7] -2.39048633 0.83202430 -0.50826586 -0.82147047 1.90057646 0.34608753 [13] -0.67611104 -1.16692661 -0.83824277 1.03189383 -0.79921660 0.20277606 [19] 1.54303215 0.59395376 -1.08192508 -1.84321040 -0.12782222 0.43277944 [25] -1.82963817 -0.50778526 -0.13425965 0.62068249 0.93175768 0.54568549 [31] -0.97376878 0.35799249 0.87784654 0.81946639 -0.39647494 0.43348313 [37] -0.74379678 1.81237141 2.45290249 -0.49004869 -1.13760347 -1.06289601 [43] -0.32413303 0.05696900 -1.16215701 -0.46839041 -1.97932737 -0.20987616 [49] -0.57886398 0.80153386 0.10563323 1.46005228 0.96504928 1.40612093 [55] -0.50763094 0.15543564 -0.35865205 -1.12140712 1.30494450 1.08748173 [61] -0.34289917 -0.03663877 0.76373747 -0.67487025 2.14225728 -0.67538047 [67] -1.23308310 0.36199453 -0.45217137 -0.50800301 0.69945335 0.44994540 [73] -1.09304503 -0.23890773 -0.61304670 0.40153710 -0.90035408 0.36800668 [79] -1.40653772 -0.80610666 -1.64346098 -0.61815582 0.72286803 0.92304240 [85] -0.33240942 -0.90784091 -0.42220142 -0.77961032 -1.04123361 0.40105427 [91] 2.65352970 -0.96303412 -0.25560691 -0.15724876 -0.93114269 1.03313771 [97] 1.60203686 -0.35247216 0.63312893 -0.13854826 > > colMeans(tmp2) [1] -0.03719936 > colSums(tmp2) [1] -3.719936 > colVars(tmp2) [1] 1.027379 > colSd(tmp2) [1] 1.013597 > colMax(tmp2) [1] 2.65353 > colMin(tmp2) [1] -2.390486 > colMedians(tmp2) [1] -0.2243919 > colRanges(tmp2) [,1] [1,] -2.390486 [2,] 2.653530 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] -0.3301290 4.3980165 -1.6507347 0.2852976 -4.8865201 -0.6975870 [7] 5.0950106 -1.9387954 4.3670496 0.9197772 > colApply(tmp,quantile)[,1] [,1] [1,] -1.6449849 [2,] -0.4284202 [3,] 0.1503932 [4,] 0.5449954 [5,] 0.7636212 > > rowApply(tmp,sum) [1] 1.82998552 0.64751361 0.12486715 -4.50821939 -3.07645500 4.07154339 [7] 0.06989893 2.56851068 3.42245531 0.41128526 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 8 1 7 5 9 1 7 6 3 3 [2,] 10 8 6 2 7 9 6 3 7 10 [3,] 9 9 2 1 8 7 3 1 9 2 [4,] 4 10 3 3 5 2 9 7 2 5 [5,] 1 3 1 8 6 8 4 2 1 4 [6,] 3 4 9 10 2 4 5 4 6 6 [7,] 2 6 4 7 3 10 10 8 8 8 [8,] 6 7 5 9 4 5 1 5 5 1 [9,] 5 2 10 4 10 6 8 9 10 7 [10,] 7 5 8 6 1 3 2 10 4 9 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.80650721 2.91419064 -2.52965417 4.45799818 2.81210458 0.79310632 [7] -0.58335547 -0.92375822 -2.63151439 0.54474237 -1.62875952 -3.00170302 [13] 3.11188165 4.20851533 -1.99451804 0.03183679 1.58781497 0.81788537 [19] 2.11243325 -0.10963387 > colApply(tmp,quantile)[,1] [,1] [1,] -1.5566822 [2,] -0.9482705 [3,] 0.2001356 [4,] 0.2664096 [5,] 1.2319003 > > rowApply(tmp,sum) [1] -0.4621218 -0.9678296 0.5341398 4.9124880 5.1664292 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 18 1 11 12 2 [2,] 20 16 7 6 13 [3,] 11 7 4 5 3 [4,] 17 18 20 15 7 [5,] 16 15 15 7 17 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.2319003 2.3717050 0.06722109 1.1591764 0.9035192 0.2465346 [2,] -1.5566822 0.6756497 -0.58738791 0.9300042 0.6481316 1.3353136 [3,] 0.2001356 -0.3277078 -0.54682768 1.6334534 0.4995552 0.8964045 [4,] 0.2664096 -0.2921438 -0.55527261 0.8741743 -0.2820850 -1.9891833 [5,] -0.9482705 0.4866876 -0.90738705 -0.1388101 1.0429836 0.3040369 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.51210712 0.4810938 1.2820726 -0.90140494 0.2065677 -1.1452574 [2,] 0.40233169 -0.5261972 -1.3397399 0.59683563 -0.2275820 -0.8837127 [3,] 0.05101914 -1.9335214 -2.2104985 0.38076501 0.2346243 1.1164925 [4,] 0.24209670 1.3407344 0.2317331 0.02886051 -1.1162918 -0.8661486 [5,] 0.23330412 -0.2858678 -0.5950816 0.43968615 -0.7260777 -1.2230767 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.5855587 -1.6032350 -0.5403415 -0.0093250796 0.6995987 -1.1105332 [2,] -0.5221500 1.0411528 -0.6385462 -0.0488258393 -0.6820683 0.8952064 [3,] 1.3910876 0.4445338 -0.2326929 -0.4909781677 -0.3486581 -0.2643801 [4,] 1.3076018 3.0538979 -0.8359626 -0.0008231498 0.9265310 0.5837126 [5,] 1.5209009 1.2721659 0.2530253 0.5817890246 0.9924117 0.7138796 [,19] [,20] [1,] -1.2320772 -0.4716711 [2,] -0.7142381 0.2346754 [3,] 0.7351023 -0.6937688 [4,] 1.5037896 0.4908574 [5,] 1.8198567 0.3302733 > > > 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 : 649 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 col7 row1 0.8557102 -0.5886416 0.6612519 0.5441677 0.9889502 1.625535 1.07045 col8 col9 col10 col11 col12 col13 col14 row1 0.8796412 0.915494 0.4709057 -1.719682 -0.755236 -0.3201129 -0.9353001 col15 col16 col17 col18 col19 col20 row1 0.9756188 2.554069 -1.415874 1.440782 2.023694 1.70736 > tmp[,"col10"] col10 row1 0.4709057 row2 2.3875450 row3 -1.5830151 row4 -0.4253329 row5 -1.0357450 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 0.8557102 -0.5886416 0.6612519 0.5441677 0.9889502 1.6255350 1.0704502 row5 1.3013333 -0.8935918 2.4261740 1.7374212 0.6590905 -0.1992945 0.2329103 col8 col9 col10 col11 col12 col13 col14 row1 0.8796412 0.915494 0.4709057 -1.719682 -0.755236 -0.3201129 -0.9353001 row5 -1.3854021 -1.622139 -1.0357450 1.246997 1.286471 0.1719808 2.1568148 col15 col16 col17 col18 col19 col20 row1 0.9756188 2.5540688 -1.41587415 1.440782 2.0236944 1.7073598 row5 1.5918845 -0.2554075 -0.08054993 1.329153 -0.1476321 -0.5739936 > tmp[,c("col6","col20")] col6 col20 row1 1.6255350 1.7073598 row2 -0.2010416 0.5529507 row3 -1.3667958 0.0579373 row4 1.7029483 1.0093692 row5 -0.1992945 -0.5739936 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 1.6255350 1.7073598 row5 -0.1992945 -0.5739936 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 47.69454 50.49036 49.67456 51.15699 50.13771 106.2384 50.7285 51.43015 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.31888 49.275 48.79532 50.06001 49.34739 51.38232 48.68451 49.99233 col17 col18 col19 col20 row1 50.16717 49.34788 49.62771 105.2259 > tmp[,"col10"] col10 row1 49.27500 row2 31.67296 row3 29.13670 row4 29.51096 row5 48.90210 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 47.69454 50.49036 49.67456 51.15699 50.13771 106.2384 50.72850 51.43015 row5 50.42669 49.98735 49.24708 49.47979 50.20878 105.2922 48.90496 49.36378 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.31888 49.2750 48.79532 50.06001 49.34739 51.38232 48.68451 49.99233 row5 49.24815 48.9021 49.98669 51.26494 50.46182 49.41814 48.55275 50.29877 col17 col18 col19 col20 row1 50.16717 49.34788 49.62771 105.2259 row5 49.21211 50.13024 48.04656 104.8366 > tmp[,c("col6","col20")] col6 col20 row1 106.23845 105.22593 row2 74.67822 73.91777 row3 75.84005 75.40658 row4 77.05477 74.08579 row5 105.29221 104.83655 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 106.2384 105.2259 row5 105.2922 104.8366 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 106.2384 105.2259 row5 105.2922 104.8366 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.1581784 [2,] -1.0825712 [3,] 1.4656757 [4,] 0.9714095 [5,] -0.4150167 > tmp[,c("col17","col7")] col17 col7 [1,] 0.4769217 0.4218915 [2,] -0.3245598 0.9967710 [3,] -1.4328781 -1.1325274 [4,] 1.0721605 2.0256415 [5,] -0.2427063 -0.8358154 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.4931461 -0.3212618 [2,] 0.8641755 1.5717181 [3,] -1.1581102 -0.3170904 [4,] 1.3197674 -0.4188931 [5,] 2.0626232 -0.3403932 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.493146 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.4931461 [2,] 0.8641755 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 -0.3487482 -0.2973065 0.9461689 -0.8624966 -0.4947619 -0.672013146 row1 -0.4726335 1.3248721 1.4413307 -0.4919241 -0.9549800 0.006245772 [,7] [,8] [,9] [,10] [,11] [,12] row3 -1.71936934 0.5064641 -1.9718061 -1.651374 -1.857602 -0.86676743 row1 -0.07480853 -0.9218339 0.2289434 -0.523027 -1.268548 -0.08523349 [,13] [,14] [,15] [,16] [,17] [,18] row3 -0.545766477 1.043768 -1.4020702 0.09631153 -0.762496754 -0.7556651 row1 0.008169723 -2.332568 0.5587294 -0.52201368 0.006503634 -0.1679822 [,19] [,20] row3 1.206259 0.07813302 row1 -2.041490 0.32316702 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.9160208 -0.2093841 -0.7208487 1.42447 -0.0839458 1.691207 -0.9769534 [,8] [,9] [,10] row2 -0.1450568 2.429535 -0.5039726 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 1.157378 -0.7507224 -1.110341 1.396329 0.1969461 -0.01877922 1.389506 [,8] [,9] [,10] [,11] [,12] [,13] row5 -1.716283 0.6956588 -0.06700635 -0.9640136 -0.5384658 0.02334993 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.2335085 1.070041 0.0600807 -0.5421943 0.1623219 -0.1293024 -1.750208 > > > 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: 0x600003be4240> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c3555f15765" [2] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c3557a0d3f7" [3] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c357fbc2a12" [4] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c351a6e4542" [5] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c353d84fd9c" [6] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c3566262c51" [7] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c355427ae3b" [8] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c35791fcea6" [9] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c351738326a" [10] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c356a75d90e" [11] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c355efd5cbc" [12] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c354bd36b5c" [13] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c35252d8be8" [14] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c35513c3f69" [15] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9c354a673029" > > > ### 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: 0x600003b98120> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600003b98120> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600003b98120> > rowMedians(tmp) [1] -0.062550123 -0.430626697 0.343810126 -0.263817307 0.047310889 [6] -0.491424367 0.004773889 0.465445288 0.289392939 -0.346843375 [11] 0.551145502 -0.449901926 0.053244767 0.061920417 0.117986867 [16] -0.199000351 0.265537863 0.273283606 0.080583832 0.013807970 [21] -0.399781967 0.064685018 -0.175729194 -0.699835872 0.128981187 [26] -0.181005003 0.083609304 0.124276673 0.314146241 0.122333084 [31] -0.217943345 -0.038811809 0.118491818 -0.318533677 -0.165800191 [36] 0.159278381 -0.099607948 -0.472864057 0.210678964 -0.131595237 [41] 0.233611450 -0.233794770 -0.288595737 0.213935812 -0.655304520 [46] 0.391124462 -0.084287256 0.324650968 -0.518375817 0.105769714 [51] 0.420712054 -0.321357717 -0.272567387 0.082121122 0.410177081 [56] 0.430470271 0.223829928 -0.189757006 -0.163614102 0.233347658 [61] 0.186533448 -0.374811603 -0.309192875 0.171987762 -0.182254945 [66] -0.344821823 -0.058964106 0.110527908 -0.156167977 0.007126567 [71] 0.325695076 -0.174369763 -0.415959375 -0.672243722 -0.738553739 [76] -0.119614529 0.647382542 -0.046983039 -0.299627820 -0.091018099 [81] 0.289976170 0.397615224 -0.384240515 -0.436321283 0.222041430 [86] 0.733943709 0.231978741 -0.184134152 -0.207465586 0.014519924 [91] -0.186454680 -0.373533270 0.003010278 0.023370187 -0.464538526 [96] -0.590295043 -0.048498839 0.242652448 -0.007364809 -0.197631860 [101] -0.011715033 0.189857244 0.348197051 -0.265207367 0.087815749 [106] -0.133872166 -0.034814146 -0.044462792 -0.292404863 0.221734434 [111] -0.569768266 -0.058677189 -0.053957706 0.066501143 0.038337267 [116] -0.369769513 -0.570599592 0.195203446 0.127106563 0.020355298 [121] -0.039892996 0.495289055 0.361198005 0.107954088 -0.551544352 [126] 0.414320902 -0.259806859 0.074438176 -0.489787620 -0.120012646 [131] -0.083835236 0.550235271 -0.620658181 -0.028874367 -0.043670199 [136] -0.106103769 -0.136470546 -0.240059410 0.075190627 0.158613606 [141] -0.023286110 0.245095135 0.367304550 -0.026671904 -0.049525309 [146] 0.093849700 0.303795520 0.236011438 -0.219769885 -0.511925720 [151] -0.095666352 0.405258266 -0.021565552 0.195335640 0.579329594 [156] 0.165531146 0.405622242 0.010215661 -0.093944685 0.390842800 [161] -0.095598654 -0.328915312 0.046090005 0.320594404 -0.048935768 [166] 0.619033364 -0.191766593 -0.389073254 0.690324021 0.182892719 [171] -0.088876722 -0.589913396 0.395177775 -0.006318601 -0.225554359 [176] 0.198944150 -0.573634316 -0.142245799 -0.299869189 0.158698626 [181] -0.468418913 -0.490476601 -0.235029167 0.474852739 0.723001463 [186] -0.082365385 0.070360643 0.190909960 -0.007727891 0.498163205 [191] -0.124745105 0.445810532 0.108571309 -0.192157140 0.423004540 [196] -0.291315887 -0.151292506 -0.351874774 -0.540923955 -0.285035552 [201] -0.317293270 0.640365985 0.426528362 -0.086805240 0.040541857 [206] -0.180894012 -0.030706426 0.259182840 -0.451079303 -0.262396327 [211] 0.309638839 -0.247388505 -0.100241581 -0.110258368 -0.418876732 [216] -0.157160448 0.514773665 0.156190582 0.105665827 0.133121668 [221] 0.344967730 0.209644005 -0.125619723 -0.094915253 0.071522210 [226] 0.224539853 0.251167575 0.118434660 0.075335013 0.433236770 > > proc.time() user system elapsed 2.656 15.926 19.166
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2025-01-22 r87618) -- "Unsuffered Consequences" 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: 0x600000830000> > .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: 0x600000830000> > .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: 0x600000830000> > .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: 0x600000830000> > 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: 0x60000081c000> > .Call("R_bm_AddColumn",P) <pointer: 0x60000081c000> > .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: 0x60000081c000> > .Call("R_bm_AddColumn",P) <pointer: 0x60000081c000> > .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: 0x60000081c000> > 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: 0x600000818000> > .Call("R_bm_AddColumn",P) <pointer: 0x600000818000> > .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: 0x600000818000> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600000818000> > .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: 0x600000818000> > > .Call("R_bm_RowMode",P) <pointer: 0x600000818000> > .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: 0x600000818000> > > .Call("R_bm_ColMode",P) <pointer: 0x600000818000> > .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: 0x600000818000> > 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: 0x60000085c3c0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x60000085c3c0> > .Call("R_bm_AddColumn",P) <pointer: 0x60000085c3c0> > .Call("R_bm_AddColumn",P) <pointer: 0x60000085c3c0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilea2ab21f12d48" "BufferedMatrixFilea2ab60d3e360" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilea2ab21f12d48" "BufferedMatrixFilea2ab60d3e360" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x60000080c000> > .Call("R_bm_AddColumn",P) <pointer: 0x60000080c000> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x60000080c000> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x60000080c000> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x60000080c000> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x60000080c000> > .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: 0x600000864000> > .Call("R_bm_AddColumn",P) <pointer: 0x600000864000> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600000864000> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600000864000> > 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: 0x600000874000> > .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: 0x600000874000> > rm(P) > > proc.time() user system elapsed 0.330 0.152 0.468
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2025-01-22 r87618) -- "Unsuffered Consequences" 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.337 0.087 0.418