Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-02-04 11:44 -0500 (Tue, 04 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" | 4716 |
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-03 18:57:32 -0500 (Mon, 03 Feb 2025) |
EndedAt: 2025-02-03 18:57:48 -0500 (Mon, 03 Feb 2025) |
EllapsedTime: 16.2 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-20 r87609) * using platform: aarch64-apple-darwin20 * R was compiled by Apple clang version 14.0.0 (clang-1400.0.29.202) GNU Fortran (GCC) 14.2.0 * running under: macOS Ventura 13.7.1 * 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 15.0.0 (clang-1500.1.0.2.5)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking sizes of PDF files under ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.71.1’ ** using staged installation ** libs using C compiler: ‘Apple clang version 15.0.0 (clang-1500.1.0.2.5)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R Under development (unstable) (2025-01-20 r87609) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.107 0.041 0.148
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2025-01-20 r87609) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells 480164 25.7 1054610 56.4 NA 634574 33.9 Vcells 889893 6.8 8388608 64.0 196608 2108065 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] "Mon Feb 3 18:57:41 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] "Mon Feb 3 18:57:41 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: 0x600002abc000> > > > > 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] "Mon Feb 3 18:57:42 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] "Mon Feb 3 18:57:42 2025" > > ColMode(tmp2) <pointer: 0x600002abc000> > > > > ### 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.9709611 -0.3118771 -0.4365943 -0.1155001 [2,] 0.4965011 -0.6994600 0.5710596 -0.9963990 [3,] -1.5761054 0.2659242 0.3426786 -2.1997311 [4,] -1.0726359 1.5740620 -0.3851852 0.2759134 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.9709611 0.3118771 0.4365943 0.1155001 [2,] 0.4965011 0.6994600 0.5710596 0.9963990 [3,] 1.5761054 0.2659242 0.3426786 2.1997311 [4,] 1.0726359 1.5740620 0.3851852 0.2759134 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9985479 0.5584596 0.6607528 0.3398530 [2,] 0.7046284 0.8363372 0.7556848 0.9981979 [3,] 1.2554304 0.5156784 0.5853876 1.4831490 [4,] 1.0356814 1.2546163 0.6206329 0.5252746 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.95644 30.89647 32.04412 28.51403 [2,] 32.54278 34.06283 33.12791 35.97838 [3,] 39.13041 30.42271 31.19655 42.03122 [4,] 36.42945 39.12022 31.59151 30.52866 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600002a80000> > exp(tmp5) <pointer: 0x600002a80000> > log(tmp5,2) <pointer: 0x600002a80000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 468.2174 > Min(tmp5) [1] 53.61225 > mean(tmp5) [1] 72.80218 > Sum(tmp5) [1] 14560.44 > Var(tmp5) [1] 865.4933 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.28900 69.92127 71.07089 70.42631 72.03198 70.84008 68.77948 72.80156 [9] 72.94767 68.91353 > rowSums(tmp5) [1] 1805.780 1398.425 1421.418 1408.526 1440.640 1416.802 1375.590 1456.031 [9] 1458.953 1378.271 > rowVars(tmp5) [1] 8003.02235 86.58749 50.84872 61.73162 87.73642 81.27828 [7] 75.21674 48.30549 114.11133 78.69753 > rowSd(tmp5) [1] 89.459613 9.305240 7.130829 7.856947 9.366772 9.015447 8.672758 [8] 6.950215 10.682291 8.871163 > rowMax(tmp5) [1] 468.21736 87.77993 87.48248 89.23477 90.02722 87.00462 83.85266 [8] 86.24632 88.66310 81.66076 > rowMin(tmp5) [1] 55.52990 53.61225 60.73215 53.68698 56.88365 58.93252 57.06477 63.88370 [9] 54.19903 54.70846 > > colMeans(tmp5) [1] 111.49583 68.73824 71.82891 70.76383 70.80342 66.09719 74.08821 [8] 68.25324 73.57517 72.59759 69.19509 73.47820 72.06121 71.29059 [15] 67.57317 72.58938 66.39659 73.68594 71.98894 69.54283 > colSums(tmp5) [1] 1114.9583 687.3824 718.2891 707.6383 708.0342 660.9719 740.8821 [8] 682.5324 735.7517 725.9759 691.9509 734.7820 720.6121 712.9059 [15] 675.7317 725.8938 663.9659 736.8594 719.8894 695.4283 > colVars(tmp5) [1] 15782.13553 52.22066 87.91202 78.74849 82.79253 56.72806 [7] 101.93484 43.64065 55.58290 88.24004 49.87694 82.79065 [13] 137.49086 121.48033 43.27028 37.04123 98.79085 66.23604 [19] 150.21925 44.83917 > colSd(tmp5) [1] 125.626970 7.226386 9.376141 8.874035 9.099040 7.531804 [7] 10.096278 6.606107 7.455394 9.393617 7.062361 9.098937 [13] 11.725650 11.021812 6.578015 6.086151 9.939359 8.138553 [19] 12.256396 6.696205 > colMax(tmp5) [1] 468.21736 81.42362 87.65894 87.48248 84.40266 75.78817 92.53434 [8] 78.44968 83.24372 89.23477 83.85266 86.92345 87.77993 85.07247 [15] 76.04897 83.21341 80.85228 87.00462 90.02722 81.07867 > colMin(tmp5) [1] 54.70846 60.51908 60.28201 59.34822 56.88365 54.72094 58.60174 57.83046 [9] 59.57459 62.10250 60.22244 58.96747 55.23440 53.61225 53.68698 64.37253 [17] 54.19903 61.55770 58.93252 57.06477 > > > ### 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.28900 69.92127 71.07089 NA 72.03198 70.84008 68.77948 72.80156 [9] 72.94767 68.91353 > rowSums(tmp5) [1] 1805.780 1398.425 1421.418 NA 1440.640 1416.802 1375.590 1456.031 [9] 1458.953 1378.271 > rowVars(tmp5) [1] 8003.02235 86.58749 50.84872 64.62985 87.73642 81.27828 [7] 75.21674 48.30549 114.11133 78.69753 > rowSd(tmp5) [1] 89.459613 9.305240 7.130829 8.039269 9.366772 9.015447 8.672758 [8] 6.950215 10.682291 8.871163 > rowMax(tmp5) [1] 468.21736 87.77993 87.48248 NA 90.02722 87.00462 83.85266 [8] 86.24632 88.66310 81.66076 > rowMin(tmp5) [1] 55.52990 53.61225 60.73215 NA 56.88365 58.93252 57.06477 63.88370 [9] 54.19903 54.70846 > > colMeans(tmp5) [1] 111.49583 68.73824 71.82891 70.76383 70.80342 66.09719 74.08821 [8] 68.25324 73.57517 72.59759 69.19509 73.47820 72.06121 71.29059 [15] 67.57317 72.58938 66.39659 NA 71.98894 69.54283 > colSums(tmp5) [1] 1114.9583 687.3824 718.2891 707.6383 708.0342 660.9719 740.8821 [8] 682.5324 735.7517 725.9759 691.9509 734.7820 720.6121 712.9059 [15] 675.7317 725.8938 663.9659 NA 719.8894 695.4283 > colVars(tmp5) [1] 15782.13553 52.22066 87.91202 78.74849 82.79253 56.72806 [7] 101.93484 43.64065 55.58290 88.24004 49.87694 82.79065 [13] 137.49086 121.48033 43.27028 37.04123 98.79085 NA [19] 150.21925 44.83917 > colSd(tmp5) [1] 125.626970 7.226386 9.376141 8.874035 9.099040 7.531804 [7] 10.096278 6.606107 7.455394 9.393617 7.062361 9.098937 [13] 11.725650 11.021812 6.578015 6.086151 9.939359 NA [19] 12.256396 6.696205 > colMax(tmp5) [1] 468.21736 81.42362 87.65894 87.48248 84.40266 75.78817 92.53434 [8] 78.44968 83.24372 89.23477 83.85266 86.92345 87.77993 85.07247 [15] 76.04897 83.21341 80.85228 NA 90.02722 81.07867 > colMin(tmp5) [1] 54.70846 60.51908 60.28201 59.34822 56.88365 54.72094 58.60174 57.83046 [9] 59.57459 62.10250 60.22244 58.96747 55.23440 53.61225 53.68698 64.37253 [17] 54.19903 NA 58.93252 57.06477 > > Max(tmp5,na.rm=TRUE) [1] 468.2174 > Min(tmp5,na.rm=TRUE) [1] 53.61225 > mean(tmp5,na.rm=TRUE) [1] 72.82926 > Sum(tmp5,na.rm=TRUE) [1] 14493.02 > Var(tmp5,na.rm=TRUE) [1] 869.717 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.28900 69.92127 71.07089 70.58495 72.03198 70.84008 68.77948 72.80156 [9] 72.94767 68.91353 > rowSums(tmp5,na.rm=TRUE) [1] 1805.780 1398.425 1421.418 1341.114 1440.640 1416.802 1375.590 1456.031 [9] 1458.953 1378.271 > rowVars(tmp5,na.rm=TRUE) [1] 8003.02235 86.58749 50.84872 64.62985 87.73642 81.27828 [7] 75.21674 48.30549 114.11133 78.69753 > rowSd(tmp5,na.rm=TRUE) [1] 89.459613 9.305240 7.130829 8.039269 9.366772 9.015447 8.672758 [8] 6.950215 10.682291 8.871163 > rowMax(tmp5,na.rm=TRUE) [1] 468.21736 87.77993 87.48248 89.23477 90.02722 87.00462 83.85266 [8] 86.24632 88.66310 81.66076 > rowMin(tmp5,na.rm=TRUE) [1] 55.52990 53.61225 60.73215 53.68698 56.88365 58.93252 57.06477 63.88370 [9] 54.19903 54.70846 > > colMeans(tmp5,na.rm=TRUE) [1] 111.49583 68.73824 71.82891 70.76383 70.80342 66.09719 74.08821 [8] 68.25324 73.57517 72.59759 69.19509 73.47820 72.06121 71.29059 [15] 67.57317 72.58938 66.39659 74.38303 71.98894 69.54283 > colSums(tmp5,na.rm=TRUE) [1] 1114.9583 687.3824 718.2891 707.6383 708.0342 660.9719 740.8821 [8] 682.5324 735.7517 725.9759 691.9509 734.7820 720.6121 712.9059 [15] 675.7317 725.8938 663.9659 669.4473 719.8894 695.4283 > colVars(tmp5,na.rm=TRUE) [1] 15782.13553 52.22066 87.91202 78.74849 82.79253 56.72806 [7] 101.93484 43.64065 55.58290 88.24004 49.87694 82.79065 [13] 137.49086 121.48033 43.27028 37.04123 98.79085 69.04878 [19] 150.21925 44.83917 > colSd(tmp5,na.rm=TRUE) [1] 125.626970 7.226386 9.376141 8.874035 9.099040 7.531804 [7] 10.096278 6.606107 7.455394 9.393617 7.062361 9.098937 [13] 11.725650 11.021812 6.578015 6.086151 9.939359 8.309560 [19] 12.256396 6.696205 > colMax(tmp5,na.rm=TRUE) [1] 468.21736 81.42362 87.65894 87.48248 84.40266 75.78817 92.53434 [8] 78.44968 83.24372 89.23477 83.85266 86.92345 87.77993 85.07247 [15] 76.04897 83.21341 80.85228 87.00462 90.02722 81.07867 > colMin(tmp5,na.rm=TRUE) [1] 54.70846 60.51908 60.28201 59.34822 56.88365 54.72094 58.60174 57.83046 [9] 59.57459 62.10250 60.22244 58.96747 55.23440 53.61225 53.68698 64.37253 [17] 54.19903 61.55770 58.93252 57.06477 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.28900 69.92127 71.07089 NaN 72.03198 70.84008 68.77948 72.80156 [9] 72.94767 68.91353 > rowSums(tmp5,na.rm=TRUE) [1] 1805.780 1398.425 1421.418 0.000 1440.640 1416.802 1375.590 1456.031 [9] 1458.953 1378.271 > rowVars(tmp5,na.rm=TRUE) [1] 8003.02235 86.58749 50.84872 NA 87.73642 81.27828 [7] 75.21674 48.30549 114.11133 78.69753 > rowSd(tmp5,na.rm=TRUE) [1] 89.459613 9.305240 7.130829 NA 9.366772 9.015447 8.672758 [8] 6.950215 10.682291 8.871163 > rowMax(tmp5,na.rm=TRUE) [1] 468.21736 87.77993 87.48248 NA 90.02722 87.00462 83.85266 [8] 86.24632 88.66310 81.66076 > rowMin(tmp5,na.rm=TRUE) [1] 55.52990 53.61225 60.73215 NA 56.88365 58.93252 57.06477 63.88370 [9] 54.19903 54.70846 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.45946 67.32875 72.50395 71.56632 71.09643 65.61356 74.98481 [8] 68.00961 74.25200 70.74902 68.89302 72.84478 73.39308 72.14332 [15] 69.11608 72.68735 65.46480 NaN 71.80642 69.02750 > colSums(tmp5,na.rm=TRUE) [1] 1039.1352 605.9587 652.5355 644.0969 639.8679 590.5221 674.8633 [8] 612.0865 668.2680 636.7411 620.0372 655.6030 660.5377 649.2899 [15] 622.0448 654.1862 589.1832 0.0000 646.2577 621.2475 > colVars(tmp5,na.rm=TRUE) [1] 17578.16055 36.39838 93.77472 81.34714 92.17572 61.18776 [7] 105.63277 48.42795 57.37716 60.82619 55.08505 88.62574 [13] 134.72119 128.48492 21.89762 41.56339 101.37188 NA [19] 168.62185 47.45640 > colSd(tmp5,na.rm=TRUE) [1] 132.582656 6.033107 9.683735 9.019265 9.600819 7.822261 [7] 10.277780 6.959020 7.574771 7.799115 7.421931 9.414125 [13] 11.606946 11.335119 4.679490 6.446968 10.068360 NA [19] 12.985447 6.888860 > colMax(tmp5,na.rm=TRUE) [1] 468.21736 78.13953 87.65894 87.48248 84.40266 75.78817 92.53434 [8] 78.44968 83.24372 81.38563 83.85266 86.92345 87.77993 85.07247 [15] 76.04897 83.21341 80.85228 -Inf 90.02722 81.07867 > colMin(tmp5,na.rm=TRUE) [1] 54.70846 60.51908 60.28201 59.34822 56.88365 54.72094 58.60174 57.83046 [9] 59.57459 62.10250 60.22244 58.96747 55.23440 53.61225 60.86505 64.37253 [17] 54.19903 Inf 58.93252 57.06477 > > > > > 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] 281.4821 142.9873 215.6013 202.7906 175.0063 203.9485 193.1111 271.3357 [9] 255.5230 271.2604 > apply(copymatrix,1,var,na.rm=TRUE) [1] 281.4821 142.9873 215.6013 202.7906 175.0063 203.9485 193.1111 271.3357 [9] 255.5230 271.2604 > > > > 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] -1.136868e-13 8.526513e-14 5.684342e-14 2.842171e-14 0.000000e+00 [6] -2.842171e-14 2.273737e-13 5.684342e-14 -8.526513e-14 1.705303e-13 [11] 0.000000e+00 -2.273737e-13 -1.421085e-13 0.000000e+00 0.000000e+00 [16] -2.842171e-14 1.705303e-13 2.842171e-14 -1.847411e-13 0.000000e+00 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 1 6 2 19 3 10 5 2 4 1 4 4 8 20 6 2 4 11 3 20 9 18 10 9 9 15 9 1 9 18 2 11 2 20 10 2 5 5 4 12 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.193459 > Min(tmp) [1] -2.405437 > mean(tmp) [1] -0.1212592 > Sum(tmp) [1] -12.12592 > Var(tmp) [1] 0.9632806 > > rowMeans(tmp) [1] -0.1212592 > rowSums(tmp) [1] -12.12592 > rowVars(tmp) [1] 0.9632806 > rowSd(tmp) [1] 0.9814686 > rowMax(tmp) [1] 2.193459 > rowMin(tmp) [1] -2.405437 > > colMeans(tmp) [1] 0.194148846 -1.160448850 -0.821449827 0.207636804 -0.242842744 [6] 1.466094691 -1.487496846 -1.286366763 -1.372621436 -0.024008811 [11] 0.691586690 -0.750223678 0.500048172 -0.071236205 -1.898904821 [16] 2.193459119 1.394021264 -1.903607868 -1.034671091 1.584494030 [21] -1.006315254 1.263531462 0.029688376 0.212256824 0.243247533 [26] -1.065556148 -2.405437150 1.534398373 0.891822003 -1.049263328 [31] -1.299172955 0.107864116 0.119215539 0.656490126 -1.168441514 [36] 1.151275767 -0.635790715 -0.009679015 -0.039723765 -0.641139066 [41] -0.881020865 0.346028164 1.819109253 0.704791150 0.576476290 [46] -1.335400176 -0.762078691 -0.265487215 0.315141206 -0.900514601 [51] 1.435015477 0.370656802 1.236676372 -0.519028479 0.712834950 [56] 1.372223932 0.857716628 -1.339727589 0.600161795 0.672332220 [61] -0.240676078 -1.387006468 -1.322212102 0.408234315 -0.829690699 [66] 0.136170523 0.045682637 -0.301004394 -1.013135572 -0.954159620 [71] 0.710606599 -0.645667956 0.146666710 -0.482861034 -0.433292643 [76] 0.138256427 -0.501733915 0.153727079 -0.775267731 -0.260214855 [81] 1.166425174 -0.789939930 0.606794840 -0.133779975 -0.849331564 [86] -0.549516070 1.630159524 0.735741984 0.090908638 -0.721574988 [91] 0.191444161 -0.667509339 -2.392853312 0.215430200 1.309906521 [96] -0.425211398 -0.037369333 0.792546805 -2.186877594 -0.786523699 > colSums(tmp) [1] 0.194148846 -1.160448850 -0.821449827 0.207636804 -0.242842744 [6] 1.466094691 -1.487496846 -1.286366763 -1.372621436 -0.024008811 [11] 0.691586690 -0.750223678 0.500048172 -0.071236205 -1.898904821 [16] 2.193459119 1.394021264 -1.903607868 -1.034671091 1.584494030 [21] -1.006315254 1.263531462 0.029688376 0.212256824 0.243247533 [26] -1.065556148 -2.405437150 1.534398373 0.891822003 -1.049263328 [31] -1.299172955 0.107864116 0.119215539 0.656490126 -1.168441514 [36] 1.151275767 -0.635790715 -0.009679015 -0.039723765 -0.641139066 [41] -0.881020865 0.346028164 1.819109253 0.704791150 0.576476290 [46] -1.335400176 -0.762078691 -0.265487215 0.315141206 -0.900514601 [51] 1.435015477 0.370656802 1.236676372 -0.519028479 0.712834950 [56] 1.372223932 0.857716628 -1.339727589 0.600161795 0.672332220 [61] -0.240676078 -1.387006468 -1.322212102 0.408234315 -0.829690699 [66] 0.136170523 0.045682637 -0.301004394 -1.013135572 -0.954159620 [71] 0.710606599 -0.645667956 0.146666710 -0.482861034 -0.433292643 [76] 0.138256427 -0.501733915 0.153727079 -0.775267731 -0.260214855 [81] 1.166425174 -0.789939930 0.606794840 -0.133779975 -0.849331564 [86] -0.549516070 1.630159524 0.735741984 0.090908638 -0.721574988 [91] 0.191444161 -0.667509339 -2.392853312 0.215430200 1.309906521 [96] -0.425211398 -0.037369333 0.792546805 -2.186877594 -0.786523699 > 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.194148846 -1.160448850 -0.821449827 0.207636804 -0.242842744 [6] 1.466094691 -1.487496846 -1.286366763 -1.372621436 -0.024008811 [11] 0.691586690 -0.750223678 0.500048172 -0.071236205 -1.898904821 [16] 2.193459119 1.394021264 -1.903607868 -1.034671091 1.584494030 [21] -1.006315254 1.263531462 0.029688376 0.212256824 0.243247533 [26] -1.065556148 -2.405437150 1.534398373 0.891822003 -1.049263328 [31] -1.299172955 0.107864116 0.119215539 0.656490126 -1.168441514 [36] 1.151275767 -0.635790715 -0.009679015 -0.039723765 -0.641139066 [41] -0.881020865 0.346028164 1.819109253 0.704791150 0.576476290 [46] -1.335400176 -0.762078691 -0.265487215 0.315141206 -0.900514601 [51] 1.435015477 0.370656802 1.236676372 -0.519028479 0.712834950 [56] 1.372223932 0.857716628 -1.339727589 0.600161795 0.672332220 [61] -0.240676078 -1.387006468 -1.322212102 0.408234315 -0.829690699 [66] 0.136170523 0.045682637 -0.301004394 -1.013135572 -0.954159620 [71] 0.710606599 -0.645667956 0.146666710 -0.482861034 -0.433292643 [76] 0.138256427 -0.501733915 0.153727079 -0.775267731 -0.260214855 [81] 1.166425174 -0.789939930 0.606794840 -0.133779975 -0.849331564 [86] -0.549516070 1.630159524 0.735741984 0.090908638 -0.721574988 [91] 0.191444161 -0.667509339 -2.392853312 0.215430200 1.309906521 [96] -0.425211398 -0.037369333 0.792546805 -2.186877594 -0.786523699 > colMin(tmp) [1] 0.194148846 -1.160448850 -0.821449827 0.207636804 -0.242842744 [6] 1.466094691 -1.487496846 -1.286366763 -1.372621436 -0.024008811 [11] 0.691586690 -0.750223678 0.500048172 -0.071236205 -1.898904821 [16] 2.193459119 1.394021264 -1.903607868 -1.034671091 1.584494030 [21] -1.006315254 1.263531462 0.029688376 0.212256824 0.243247533 [26] -1.065556148 -2.405437150 1.534398373 0.891822003 -1.049263328 [31] -1.299172955 0.107864116 0.119215539 0.656490126 -1.168441514 [36] 1.151275767 -0.635790715 -0.009679015 -0.039723765 -0.641139066 [41] -0.881020865 0.346028164 1.819109253 0.704791150 0.576476290 [46] -1.335400176 -0.762078691 -0.265487215 0.315141206 -0.900514601 [51] 1.435015477 0.370656802 1.236676372 -0.519028479 0.712834950 [56] 1.372223932 0.857716628 -1.339727589 0.600161795 0.672332220 [61] -0.240676078 -1.387006468 -1.322212102 0.408234315 -0.829690699 [66] 0.136170523 0.045682637 -0.301004394 -1.013135572 -0.954159620 [71] 0.710606599 -0.645667956 0.146666710 -0.482861034 -0.433292643 [76] 0.138256427 -0.501733915 0.153727079 -0.775267731 -0.260214855 [81] 1.166425174 -0.789939930 0.606794840 -0.133779975 -0.849331564 [86] -0.549516070 1.630159524 0.735741984 0.090908638 -0.721574988 [91] 0.191444161 -0.667509339 -2.392853312 0.215430200 1.309906521 [96] -0.425211398 -0.037369333 0.792546805 -2.186877594 -0.786523699 > colMedians(tmp) [1] 0.194148846 -1.160448850 -0.821449827 0.207636804 -0.242842744 [6] 1.466094691 -1.487496846 -1.286366763 -1.372621436 -0.024008811 [11] 0.691586690 -0.750223678 0.500048172 -0.071236205 -1.898904821 [16] 2.193459119 1.394021264 -1.903607868 -1.034671091 1.584494030 [21] -1.006315254 1.263531462 0.029688376 0.212256824 0.243247533 [26] -1.065556148 -2.405437150 1.534398373 0.891822003 -1.049263328 [31] -1.299172955 0.107864116 0.119215539 0.656490126 -1.168441514 [36] 1.151275767 -0.635790715 -0.009679015 -0.039723765 -0.641139066 [41] -0.881020865 0.346028164 1.819109253 0.704791150 0.576476290 [46] -1.335400176 -0.762078691 -0.265487215 0.315141206 -0.900514601 [51] 1.435015477 0.370656802 1.236676372 -0.519028479 0.712834950 [56] 1.372223932 0.857716628 -1.339727589 0.600161795 0.672332220 [61] -0.240676078 -1.387006468 -1.322212102 0.408234315 -0.829690699 [66] 0.136170523 0.045682637 -0.301004394 -1.013135572 -0.954159620 [71] 0.710606599 -0.645667956 0.146666710 -0.482861034 -0.433292643 [76] 0.138256427 -0.501733915 0.153727079 -0.775267731 -0.260214855 [81] 1.166425174 -0.789939930 0.606794840 -0.133779975 -0.849331564 [86] -0.549516070 1.630159524 0.735741984 0.090908638 -0.721574988 [91] 0.191444161 -0.667509339 -2.392853312 0.215430200 1.309906521 [96] -0.425211398 -0.037369333 0.792546805 -2.186877594 -0.786523699 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.1941488 -1.160449 -0.8214498 0.2076368 -0.2428427 1.466095 -1.487497 [2,] 0.1941488 -1.160449 -0.8214498 0.2076368 -0.2428427 1.466095 -1.487497 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.286367 -1.372621 -0.02400881 0.6915867 -0.7502237 0.5000482 -0.0712362 [2,] -1.286367 -1.372621 -0.02400881 0.6915867 -0.7502237 0.5000482 -0.0712362 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -1.898905 2.193459 1.394021 -1.903608 -1.034671 1.584494 -1.006315 [2,] -1.898905 2.193459 1.394021 -1.903608 -1.034671 1.584494 -1.006315 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.263531 0.02968838 0.2122568 0.2432475 -1.065556 -2.405437 1.534398 [2,] 1.263531 0.02968838 0.2122568 0.2432475 -1.065556 -2.405437 1.534398 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.891822 -1.049263 -1.299173 0.1078641 0.1192155 0.6564901 -1.168442 [2,] 0.891822 -1.049263 -1.299173 0.1078641 0.1192155 0.6564901 -1.168442 [,36] [,37] [,38] [,39] [,40] [,41] [1,] 1.151276 -0.6357907 -0.009679015 -0.03972377 -0.6411391 -0.8810209 [2,] 1.151276 -0.6357907 -0.009679015 -0.03972377 -0.6411391 -0.8810209 [,42] [,43] [,44] [,45] [,46] [,47] [,48] [1,] 0.3460282 1.819109 0.7047911 0.5764763 -1.3354 -0.7620787 -0.2654872 [2,] 0.3460282 1.819109 0.7047911 0.5764763 -1.3354 -0.7620787 -0.2654872 [,49] [,50] [,51] [,52] [,53] [,54] [,55] [1,] 0.3151412 -0.9005146 1.435015 0.3706568 1.236676 -0.5190285 0.7128349 [2,] 0.3151412 -0.9005146 1.435015 0.3706568 1.236676 -0.5190285 0.7128349 [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] 1.372224 0.8577166 -1.339728 0.6001618 0.6723322 -0.2406761 -1.387006 [2,] 1.372224 0.8577166 -1.339728 0.6001618 0.6723322 -0.2406761 -1.387006 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [1,] -1.322212 0.4082343 -0.8296907 0.1361705 0.04568264 -0.3010044 -1.013136 [2,] -1.322212 0.4082343 -0.8296907 0.1361705 0.04568264 -0.3010044 -1.013136 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] -0.9541596 0.7106066 -0.645668 0.1466667 -0.482861 -0.4332926 0.1382564 [2,] -0.9541596 0.7106066 -0.645668 0.1466667 -0.482861 -0.4332926 0.1382564 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] -0.5017339 0.1537271 -0.7752677 -0.2602149 1.166425 -0.7899399 0.6067948 [2,] -0.5017339 0.1537271 -0.7752677 -0.2602149 1.166425 -0.7899399 0.6067948 [,84] [,85] [,86] [,87] [,88] [,89] [,90] [1,] -0.13378 -0.8493316 -0.5495161 1.63016 0.735742 0.09090864 -0.721575 [2,] -0.13378 -0.8493316 -0.5495161 1.63016 0.735742 0.09090864 -0.721575 [,91] [,92] [,93] [,94] [,95] [,96] [,97] [1,] 0.1914442 -0.6675093 -2.392853 0.2154302 1.309907 -0.4252114 -0.03736933 [2,] 0.1914442 -0.6675093 -2.392853 0.2154302 1.309907 -0.4252114 -0.03736933 [,98] [,99] [,100] [1,] 0.7925468 -2.186878 -0.7865237 [2,] 0.7925468 -2.186878 -0.7865237 > > > Max(tmp2) [1] 2.642867 > Min(tmp2) [1] -2.319167 > mean(tmp2) [1] 0.1155462 > Sum(tmp2) [1] 11.55462 > Var(tmp2) [1] 0.8085514 > > rowMeans(tmp2) [1] 1.13635031 -0.03070618 -0.52753168 -0.51221134 1.34446671 0.94487820 [7] 0.93981543 -1.42600992 -0.53109524 1.32112420 -0.43421095 -1.09930603 [13] 0.38011843 -0.42214830 1.02116833 0.10152826 -0.11061472 0.50222092 [19] 0.95546934 -0.63353383 -1.23378915 1.79952460 -0.56357086 -0.54775655 [25] 0.87648319 0.03699481 0.34527603 -0.76705089 -0.71736204 0.18876003 [31] -0.59779500 0.76261484 0.54256623 -1.57612735 -1.30262804 0.16504344 [37] 0.51981905 0.83342378 0.31715051 -0.95083186 -0.49160911 0.41017970 [43] -0.47816889 -0.12048779 -0.19135370 1.38402654 0.95423410 1.13705977 [49] 0.84155842 -0.12681371 0.75987848 0.45284849 -0.43289152 -1.32243141 [55] 0.02884897 0.61065019 -2.31916749 0.46854052 0.44873449 0.73503634 [61] -0.53563947 -0.52960190 -1.53093395 1.08336491 0.48999206 -0.83948464 [67] 0.10851488 0.67055601 -0.69446609 1.47152319 -0.54365586 -0.21964842 [73] 1.90364706 -0.41559563 -0.35046653 1.06774153 1.08963867 0.62613213 [79] 0.53989370 -0.18353612 0.87236181 2.20225191 -0.41589460 0.15461740 [85] 0.23946575 -0.29292292 1.15765028 0.16278275 -1.43599246 0.90818897 [91] -0.08996124 0.48476839 -0.31832552 -1.42439230 0.65413521 0.31729390 [97] -1.00677362 2.64286741 -0.90193874 0.63727610 > rowSums(tmp2) [1] 1.13635031 -0.03070618 -0.52753168 -0.51221134 1.34446671 0.94487820 [7] 0.93981543 -1.42600992 -0.53109524 1.32112420 -0.43421095 -1.09930603 [13] 0.38011843 -0.42214830 1.02116833 0.10152826 -0.11061472 0.50222092 [19] 0.95546934 -0.63353383 -1.23378915 1.79952460 -0.56357086 -0.54775655 [25] 0.87648319 0.03699481 0.34527603 -0.76705089 -0.71736204 0.18876003 [31] -0.59779500 0.76261484 0.54256623 -1.57612735 -1.30262804 0.16504344 [37] 0.51981905 0.83342378 0.31715051 -0.95083186 -0.49160911 0.41017970 [43] -0.47816889 -0.12048779 -0.19135370 1.38402654 0.95423410 1.13705977 [49] 0.84155842 -0.12681371 0.75987848 0.45284849 -0.43289152 -1.32243141 [55] 0.02884897 0.61065019 -2.31916749 0.46854052 0.44873449 0.73503634 [61] -0.53563947 -0.52960190 -1.53093395 1.08336491 0.48999206 -0.83948464 [67] 0.10851488 0.67055601 -0.69446609 1.47152319 -0.54365586 -0.21964842 [73] 1.90364706 -0.41559563 -0.35046653 1.06774153 1.08963867 0.62613213 [79] 0.53989370 -0.18353612 0.87236181 2.20225191 -0.41589460 0.15461740 [85] 0.23946575 -0.29292292 1.15765028 0.16278275 -1.43599246 0.90818897 [91] -0.08996124 0.48476839 -0.31832552 -1.42439230 0.65413521 0.31729390 [97] -1.00677362 2.64286741 -0.90193874 0.63727610 > 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.13635031 -0.03070618 -0.52753168 -0.51221134 1.34446671 0.94487820 [7] 0.93981543 -1.42600992 -0.53109524 1.32112420 -0.43421095 -1.09930603 [13] 0.38011843 -0.42214830 1.02116833 0.10152826 -0.11061472 0.50222092 [19] 0.95546934 -0.63353383 -1.23378915 1.79952460 -0.56357086 -0.54775655 [25] 0.87648319 0.03699481 0.34527603 -0.76705089 -0.71736204 0.18876003 [31] -0.59779500 0.76261484 0.54256623 -1.57612735 -1.30262804 0.16504344 [37] 0.51981905 0.83342378 0.31715051 -0.95083186 -0.49160911 0.41017970 [43] -0.47816889 -0.12048779 -0.19135370 1.38402654 0.95423410 1.13705977 [49] 0.84155842 -0.12681371 0.75987848 0.45284849 -0.43289152 -1.32243141 [55] 0.02884897 0.61065019 -2.31916749 0.46854052 0.44873449 0.73503634 [61] -0.53563947 -0.52960190 -1.53093395 1.08336491 0.48999206 -0.83948464 [67] 0.10851488 0.67055601 -0.69446609 1.47152319 -0.54365586 -0.21964842 [73] 1.90364706 -0.41559563 -0.35046653 1.06774153 1.08963867 0.62613213 [79] 0.53989370 -0.18353612 0.87236181 2.20225191 -0.41589460 0.15461740 [85] 0.23946575 -0.29292292 1.15765028 0.16278275 -1.43599246 0.90818897 [91] -0.08996124 0.48476839 -0.31832552 -1.42439230 0.65413521 0.31729390 [97] -1.00677362 2.64286741 -0.90193874 0.63727610 > rowMin(tmp2) [1] 1.13635031 -0.03070618 -0.52753168 -0.51221134 1.34446671 0.94487820 [7] 0.93981543 -1.42600992 -0.53109524 1.32112420 -0.43421095 -1.09930603 [13] 0.38011843 -0.42214830 1.02116833 0.10152826 -0.11061472 0.50222092 [19] 0.95546934 -0.63353383 -1.23378915 1.79952460 -0.56357086 -0.54775655 [25] 0.87648319 0.03699481 0.34527603 -0.76705089 -0.71736204 0.18876003 [31] -0.59779500 0.76261484 0.54256623 -1.57612735 -1.30262804 0.16504344 [37] 0.51981905 0.83342378 0.31715051 -0.95083186 -0.49160911 0.41017970 [43] -0.47816889 -0.12048779 -0.19135370 1.38402654 0.95423410 1.13705977 [49] 0.84155842 -0.12681371 0.75987848 0.45284849 -0.43289152 -1.32243141 [55] 0.02884897 0.61065019 -2.31916749 0.46854052 0.44873449 0.73503634 [61] -0.53563947 -0.52960190 -1.53093395 1.08336491 0.48999206 -0.83948464 [67] 0.10851488 0.67055601 -0.69446609 1.47152319 -0.54365586 -0.21964842 [73] 1.90364706 -0.41559563 -0.35046653 1.06774153 1.08963867 0.62613213 [79] 0.53989370 -0.18353612 0.87236181 2.20225191 -0.41589460 0.15461740 [85] 0.23946575 -0.29292292 1.15765028 0.16278275 -1.43599246 0.90818897 [91] -0.08996124 0.48476839 -0.31832552 -1.42439230 0.65413521 0.31729390 [97] -1.00677362 2.64286741 -0.90193874 0.63727610 > > colMeans(tmp2) [1] 0.1155462 > colSums(tmp2) [1] 11.55462 > colVars(tmp2) [1] 0.8085514 > colSd(tmp2) [1] 0.8991949 > colMax(tmp2) [1] 2.642867 > colMin(tmp2) [1] -2.319167 > colMedians(tmp2) [1] 0.1587001 > colRanges(tmp2) [,1] [1,] -2.319167 [2,] 2.642867 > > 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.743284893 0.934288923 -1.116153821 -7.128836192 4.208812566 [6] -0.004736631 -3.151706094 2.438437279 8.044564565 0.947176133 > colApply(tmp,quantile)[,1] [,1] [1,] -1.6307536 [2,] -0.7726579 [3,] 0.1699673 [4,] 0.3940892 [5,] 1.3170020 > > rowApply(tmp,sum) [1] -1.0459553 1.5371043 -1.5703279 -5.4322892 1.1039415 3.7974986 [7] -0.6271026 2.3783587 3.9358639 0.3514699 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 8 9 7 3 3 4 7 10 1 1 [2,] 9 3 2 6 8 5 5 3 9 3 [3,] 4 8 5 5 2 3 1 8 6 7 [4,] 1 1 3 2 5 9 4 2 4 5 [5,] 5 6 6 10 6 7 2 7 7 9 [6,] 6 5 9 8 9 2 8 1 5 8 [7,] 3 2 1 1 1 8 9 4 10 2 [8,] 10 4 4 4 10 1 10 6 8 6 [9,] 7 10 10 9 4 6 6 9 2 10 [10,] 2 7 8 7 7 10 3 5 3 4 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 2.12721398 0.47938584 0.06666946 -1.28685458 -0.84287995 -2.27311947 [7] -0.94322068 -0.31442476 -0.74655760 -2.07036815 2.68005560 -1.06411851 [13] -5.89508003 1.77731142 0.87226304 -2.35620501 -3.11460316 -4.20746529 [19] -1.16762633 1.67557055 > colApply(tmp,quantile)[,1] [,1] [1,] -1.5271506 [2,] 0.4326266 [3,] 0.5286054 [4,] 1.0554556 [5,] 1.6376769 > > rowApply(tmp,sum) [1] -4.159800 -7.370918 2.258958 -6.155868 -1.176426 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 20 16 13 20 1 [2,] 16 10 4 10 19 [3,] 19 13 2 3 16 [4,] 7 18 5 17 3 [5,] 2 3 17 16 20 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.6376769 0.3283827 1.3320867 -0.4778038 -1.8181734 -1.00747300 [2,] 0.5286054 -0.0399082 0.3265607 0.6382987 -1.6696589 -1.84019655 [3,] 0.4326266 -0.7223606 -1.2409972 -0.5229051 0.8410900 -0.15293192 [4,] 1.0554556 -0.3085239 -1.1043873 0.2600918 0.1886991 0.05499917 [5,] -1.5271506 1.2217958 0.7534067 -1.1845361 1.6151632 0.67248282 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.56517661 -0.1970678 -0.5055200 -1.936279453 0.49783729 -0.6437434 [2,] -0.60185161 0.2118727 -0.9737589 0.429083380 0.33059453 0.6321707 [3,] 0.14673973 -0.2152686 0.0544312 0.591767530 1.94071703 0.3451614 [4,] 0.13014275 -0.7640880 0.3269644 0.006193536 -0.18374651 -1.1573582 [5,] -0.05307493 0.6501268 0.3513258 -1.161133138 0.09465326 -0.2403491 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.3780337 -0.25368998 0.2128629 0.02450519 -0.2747605 0.7219806 [2,] -1.1106058 0.01602025 -0.5931348 -1.15551893 -1.5380484 -2.6198013 [3,] -2.7754834 1.16308878 1.8268522 0.82035048 0.4469586 -1.1942923 [4,] -0.7166955 0.02909143 -0.3319207 -1.61548534 -1.0513924 -0.7867006 [5,] -0.9142615 0.82280094 -0.2423965 -0.43005641 -0.6973605 -0.3286517 [,19] [,20] [1,] -0.4441327 -0.41327809 [2,] 0.9127040 0.74565504 [3,] 0.3760851 0.09732856 [4,] -0.5793736 0.39216627 [5,] -1.4329091 0.85369878 > > > 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 : 654 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 567 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 1.116556 -1.34912 -0.4651697 1.530115 0.4125852 -1.268397 0.1914456 col8 col9 col10 col11 col12 col13 col14 row1 -0.3958244 0.9781827 1.479847 -0.730836 -0.04713424 1.15044 -1.361836 col15 col16 col17 col18 col19 col20 row1 -1.065121 -0.5736855 -0.5290509 0.1024557 -0.7191647 -1.355748 > tmp[,"col10"] col10 row1 1.479847 row2 -0.082500 row3 -0.325192 row4 -1.624916 row5 1.198671 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 1.1165562 -1.34912 -0.4651697 1.53011536 0.4125852 -1.2683967 row5 -0.8765161 -1.37468 -0.1874407 -0.08112126 -1.3393903 0.5458185 col7 col8 col9 col10 col11 col12 row1 0.1914456 -0.3958244 0.9781827 1.479847 -0.7308360 -0.04713424 row5 -0.1674476 -0.4414238 -1.2249598 1.198671 -0.3987006 -1.87337722 col13 col14 col15 col16 col17 col18 row1 1.1504401 -1.3618356 -1.0651210 -0.5736855 -0.5290509 0.1024557 row5 -0.6741624 0.3715209 0.4130587 -0.2641930 -0.2309935 0.8292897 col19 col20 row1 -0.7191647 -1.3557480 row5 -0.1657053 0.8488389 > tmp[,c("col6","col20")] col6 col20 row1 -1.2683967 -1.3557480 row2 -0.8150150 -0.7302644 row3 -0.4031130 -1.2079860 row4 2.1620587 0.2513343 row5 0.5458185 0.8488389 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.2683967 -1.3557480 row5 0.5458185 0.8488389 > > > > > 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 50.78259 50.04971 49.91954 49.82612 48.71398 103.429 50.55013 49.48321 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.13989 49.76994 49.47065 50.24835 48.64537 50.63798 49.7525 48.9931 col17 col18 col19 col20 row1 49.18366 52.19571 51.5334 103.321 > tmp[,"col10"] col10 row1 49.76994 row2 30.90167 row3 28.89231 row4 29.95232 row5 50.70466 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.78259 50.04971 49.91954 49.82612 48.71398 103.4290 50.55013 49.48321 row5 47.84588 48.68175 48.98719 49.99804 49.71350 104.8352 49.78963 50.00823 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.13989 49.76994 49.47065 50.24835 48.64537 50.63798 49.75250 48.99310 row5 49.63329 50.70466 50.84651 48.42654 49.94207 49.32272 49.75357 50.05775 col17 col18 col19 col20 row1 49.18366 52.19571 51.53340 103.321 row5 49.93542 52.04009 49.53018 105.331 > tmp[,c("col6","col20")] col6 col20 row1 103.42896 103.32101 row2 76.65195 74.25315 row3 75.21817 76.38438 row4 74.60404 74.81638 row5 104.83521 105.33101 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.4290 103.321 row5 104.8352 105.331 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.4290 103.321 row5 104.8352 105.331 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.5127721 [2,] 0.7214180 [3,] 0.5761740 [4,] 0.6203741 [5,] 1.4398105 > tmp[,c("col17","col7")] col17 col7 [1,] -0.5680161 0.812687065 [2,] -0.7547951 -0.333011237 [3,] -0.6457836 0.007029575 [4,] -0.3852671 -1.026827641 [5,] 0.2536257 -0.618026963 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.04568512 -2.0781855 [2,] -0.69068837 -0.1500440 [3,] 0.30026280 0.8657706 [4,] 0.77238607 1.9215400 [5,] 1.78940879 1.4780977 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.04568512 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.04568512 [2,] -0.69068837 > > > > 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.0731123 -1.208428 -1.412028 0.4796602 -0.9226732 -0.5002904 row1 -0.8554691 1.082491 1.387725 1.3459592 -0.8565054 -0.1825173 [,7] [,8] [,9] [,10] [,11] [,12] row3 -0.346273240 -0.2346476 -0.3223234 -1.7940466 0.07793791 0.2186424 row1 0.000497356 -0.1102715 -2.2269894 -0.2453221 -1.46280549 -0.0106066 [,13] [,14] [,15] [,16] [,17] [,18] [,19] row3 0.6916262 -0.04118249 -0.2521221 0.2683224 1.3846508 0.6220874 0.5018929 row1 0.1563179 0.76452802 -3.4377640 0.9812442 -0.7979819 0.4258898 1.3650895 [,20] row3 0.8835494 row1 -0.5092678 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.1640113 2.379256 -0.2731321 0.9985984 1.051054 0.5984501 -2.113436 [,8] [,9] [,10] row2 -0.202538 0.3196286 1.854746 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.3698599 -0.05178728 -2.568879 -0.124033 -0.01869174 -1.463943 0.4135726 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.08038066 -0.8451544 0.4786785 -0.2790761 0.211313 1.317451 0.8000428 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.2526235 -0.6359414 -0.1500424 -0.5359313 -0.2180349 0.10107 > > > 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: 0x600002a88120> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d14a465ac7" [2] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d150f1e4e9" [3] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d138eba683" [4] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d17700ffa6" [5] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d162902853" [6] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d1664793b2" [7] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d16531bf93" [8] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d125187fcc" [9] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d16b6e3d1a" [10] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d1126dad10" [11] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d15e7cfee3" [12] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d16042198b" [13] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d1139b260c" [14] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d12edee7e2" [15] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM167d12c49be78" > > > ### 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: 0x600002ab4d80> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600002ab4d80> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600002ab4d80> > rowMedians(tmp) [1] 0.1744275493 -0.1350025044 -0.0329559238 0.2674444823 0.0313459801 [6] 0.3032453749 0.1681774028 0.2867313243 0.2765935401 -0.0278370246 [11] -0.2946560565 0.2190123688 -0.8433010587 0.2974180722 0.1530204807 [16] 0.1816230467 -0.2264082180 -0.3138012910 0.3777710868 0.6859859924 [21] 0.0151192211 0.0223608647 -0.0514651239 0.1970491783 -0.4450886808 [26] -0.1196666618 0.5665008892 0.1263329572 -0.1210745118 0.1940052526 [31] 0.0368020734 0.3349092674 -0.0064826144 -0.6196577461 -0.0479518093 [36] 0.6483521914 -1.0075533482 0.2101372057 -0.0514557236 0.1908471604 [41] 0.3526686863 -0.1624847308 -0.0130774892 -0.5144679919 -0.5526380710 [46] -0.0989218340 -0.2818000090 -0.1052491764 0.0892536087 -0.3466647261 [51] 0.1374572043 -0.1729201711 0.0623830804 0.4080712109 0.1128976605 [56] -0.2603185304 -0.2325813395 -0.0654015649 -0.0327180811 0.4444970529 [61] -0.1440964932 0.1371461021 0.0586602703 -0.5662109967 0.0737845970 [66] 0.1852167142 0.1107798013 -0.6471249354 0.1475548613 -0.3606543717 [71] -0.1057071937 -0.2292303219 -0.3689255934 0.2984480582 -0.0545411415 [76] 0.0084296277 0.0543016412 0.0803765223 -0.6170706051 0.6146926396 [81] 0.2174436549 0.5419491404 -0.0108679351 0.1016476927 -0.5958667433 [86] 0.7738711403 0.4814644969 0.2095969210 0.1635839036 -0.4528772278 [91] -0.0672629406 0.0700492454 -0.5469923275 -0.3626098986 0.1102812709 [96] 0.5550291121 0.2534199294 -0.1191077596 0.0008095441 0.0855065883 [101] 0.3064077972 -0.0353983241 -0.1740787913 0.4101404860 0.3065270047 [106] -0.7351075518 0.1646324998 0.3066398027 0.0086040368 -0.1246001623 [111] -0.1274864997 -0.2694449256 -0.4738670846 -0.3994418878 0.0412602594 [116] 0.3778953633 0.8402198698 -0.0776532089 -0.0493241344 0.4168444829 [121] 0.0036185742 -0.0842279481 0.0303154644 0.5411181791 0.1692632627 [126] -0.1885534562 0.2064874688 0.3580402675 -0.4198165626 -0.6877622132 [131] 0.2104355621 0.2214263372 -0.1216815324 0.0554649337 -0.0210005143 [136] -0.1759352934 0.0151158890 -0.3198068922 0.1935379476 0.0980425177 [141] 0.2633493695 0.1403271221 0.0760068866 0.1073937550 -0.4848781799 [146] -0.2736976151 0.0714287779 0.1360727229 -0.3668358329 -0.4441792460 [151] 0.0577085178 0.4302851801 -0.1353926615 -0.3920944663 -0.2069773597 [156] 0.1029521067 0.0563609655 -0.1727911769 -0.0452849707 -0.2105690611 [161] -0.0004262563 -0.0132246077 -0.0718295333 -0.0839520322 0.2589778979 [166] 0.1951465342 -0.2121399974 -0.8706169306 -0.1171616147 -0.1482822544 [171] 0.6573940982 0.1053774500 0.1564141261 0.2744145840 0.0225122707 [176] -0.0971973826 0.2940721422 -0.2300753519 0.0518772672 0.0156268358 [181] -0.3000197470 -0.1083304267 -0.4291166395 0.2644420554 0.5598141014 [186] -0.0601877163 -0.1741481714 -0.6296010851 -0.4787261329 -0.1588446762 [191] 0.1529319708 0.1896939719 0.2095718602 0.2303136000 0.3899567363 [196] -0.3424889315 0.0053398361 -0.6033921986 -0.0442611158 0.0094469290 [201] -0.0081404152 0.5571304798 0.2558058809 -0.0134259551 0.0182874183 [206] 0.3013134727 0.2493439514 -0.1273441618 0.2391395490 -0.3697690839 [211] 0.0643970230 -0.2838586193 0.1023656567 -0.1092033996 -0.0166714534 [216] 0.4009506857 0.4633544028 -0.0914011577 -0.3442386404 0.5590053290 [221] 0.2413117307 0.0250835427 -0.4798114495 -0.1836653072 0.2649049264 [226] 0.0571039014 0.2656301123 -0.6792204825 0.2057949943 -0.0666235790 > > proc.time() user system elapsed 0.648 3.047 3.832
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2025-01-20 r87609) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x6000037f4060> > .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: 0x6000037f4060> > .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: 0x6000037f4060> > .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: 0x6000037f4060> > 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: 0x6000037f4660> > .Call("R_bm_AddColumn",P) <pointer: 0x6000037f4660> > .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: 0x6000037f4660> > .Call("R_bm_AddColumn",P) <pointer: 0x6000037f4660> > .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: 0x6000037f4660> > 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: 0x6000037f4840> > .Call("R_bm_AddColumn",P) <pointer: 0x6000037f4840> > .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: 0x6000037f4840> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x6000037f4840> > .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: 0x6000037f4840> > > .Call("R_bm_RowMode",P) <pointer: 0x6000037f4840> > .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: 0x6000037f4840> > > .Call("R_bm_ColMode",P) <pointer: 0x6000037f4840> > .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: 0x6000037f4840> > 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: 0x6000037ec000> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x6000037ec000> > .Call("R_bm_AddColumn",P) <pointer: 0x6000037ec000> > .Call("R_bm_AddColumn",P) <pointer: 0x6000037ec000> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1683b11ffde75" "BufferedMatrixFile1683b376620fd" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1683b11ffde75" "BufferedMatrixFile1683b376620fd" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x6000037f4a20> > .Call("R_bm_AddColumn",P) <pointer: 0x6000037f4a20> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x6000037f4a20> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x6000037f4a20> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x6000037f4a20> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x6000037f4a20> > .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: 0x6000037f4c00> > .Call("R_bm_AddColumn",P) <pointer: 0x6000037f4c00> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x6000037f4c00> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x6000037f4c00> > 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: 0x6000037f4de0> > .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: 0x6000037f4de0> > rm(P) > > proc.time() user system elapsed 0.139 0.047 0.182
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2025-01-20 r87609) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.112 0.026 0.134