Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-03-17 11:37 -0400 (Mon, 17 Mar 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
palomino7 | Windows Server 2022 Datacenter | x64 | R Under development (unstable) (2025-03-01 r87860 ucrt) -- "Unsuffered Consequences" | 4545 |
lconway | macOS 12.7.1 Monterey | x86_64 | R Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" | 4576 |
kjohnson3 | macOS 13.7.1 Ventura | arm64 | R Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" | 4528 |
kunpeng2 | Linux (openEuler 24.03 LTS) | aarch64 | R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" | 4459 |
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 249/2313 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.71.1 (landing page) Ben Bolstad
| palomino7 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | ![]() | |||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.1 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kunpeng2 | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.71.1 |
Command: E:\biocbuild\bbs-3.21-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=E:\biocbuild\bbs-3.21-bioc\R\library --no-vignettes --timings BufferedMatrix_1.71.1.tar.gz |
StartedAt: 2025-03-16 23:19:40 -0400 (Sun, 16 Mar 2025) |
EndedAt: 2025-03-16 23:22:34 -0400 (Sun, 16 Mar 2025) |
EllapsedTime: 173.9 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### E:\biocbuild\bbs-3.21-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=E:\biocbuild\bbs-3.21-bioc\R\library --no-vignettes --timings BufferedMatrix_1.71.1.tar.gz ### ############################################################################## ############################################################################## * using log directory 'E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck' * using R Under development (unstable) (2025-03-01 r87860 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.3.0 GNU Fortran (GCC) 13.3.0 * running under: Windows Server 2022 x64 (build 20348) * 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 whether package 'BufferedMatrix' can be installed ... OK * used C compiler: 'gcc.exe (GCC) 14.2.0' * 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 for x64 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: 2 NOTEs See 'E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/00check.log' for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### E:\biocbuild\bbs-3.21-bioc\R\bin\R.exe CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library 'E:/biocbuild/bbs-3.21-bioc/R/library' * installing *source* package 'BufferedMatrix' ... ** this is package 'BufferedMatrix' version '1.71.1' ** using staged installation ** libs using C compiler: 'gcc.exe (GCC) 14.2.0' gcc -I"E:/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I"C:/rtools45/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu2x -mfpmath=sse -msse2 -mstackrealign -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"E:/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I"C:/rtools45/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu2x -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function 'dbm_ReadOnlyMode': doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ doubleBufferedMatrix.c: At top level: doubleBufferedMatrix.c:3327:12: warning: 'sort_double' defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ gcc -I"E:/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I"C:/rtools45/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu2x -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"E:/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I"C:/rtools45/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu2x -mfpmath=sse -msse2 -mstackrealign -c init_package.c -o init_package.o gcc -shared -s -static-libgcc -o BufferedMatrix.dll tmp.def RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -LC:/rtools45/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools45/x86_64-w64-mingw32.static.posix/lib -LE:/biocbuild/bbs-3.21-bioc/R/bin/x64 -lR installing to E:/biocbuild/bbs-3.21-bioc/R/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs/x64 ** 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 ** 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-03-01 r87860 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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.31 0.20 1.18
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2025-03-01 r87860 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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] "E:/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) max used (Mb) Ncells 474581 25.4 1041240 55.7 629411 33.7 Vcells 866380 6.7 8388608 64.0 2037272 15.6 > > > > > ## > ## 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] "Sun Mar 16 23:20:13 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] "Sun Mar 16 23:20:14 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: 0x000001fd1f4fa590> > > > > 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] "Sun Mar 16 23:20:40 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Sun Mar 16 23:20:49 2025" > > ColMode(tmp2) <pointer: 0x000001fd1f4fa590> > > > > ### 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.426131 -1.1462878 1.429808 -0.91785140 [2,] -0.693155 0.7940270 1.301990 0.45228077 [3,] 1.081799 -1.3002216 1.065763 -0.03800974 [4,] 2.021050 -0.3496684 -1.300270 1.41147241 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: E:/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.426131 1.1462878 1.429808 0.91785140 [2,] 0.693155 0.7940270 1.301990 0.45228077 [3,] 1.081799 1.3002216 1.065763 0.03800974 [4,] 2.021050 0.3496684 1.300270 1.41147241 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: E:/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.9712653 1.0706483 1.195746 0.9580456 [2,] 0.8325593 0.8910819 1.141048 0.6725182 [3,] 1.0400959 1.1402726 1.032358 0.1949609 [4,] 1.4216363 0.5913277 1.140294 1.1880540 > > 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: E:/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.13878 36.85277 38.38726 35.49831 [2,] 34.01875 34.70485 37.71247 32.17746 [3,] 36.48276 37.70295 36.38934 26.98762 [4,] 41.23741 31.26295 37.70321 38.29201 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x000001fd1f4fa1d0> > exp(tmp5) <pointer: 0x000001fd1f4fa1d0> > log(tmp5,2) <pointer: 0x000001fd1f4fa1d0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.5155 > Min(tmp5) [1] 53.32716 > mean(tmp5) [1] 72.48393 > Sum(tmp5) [1] 14496.79 > Var(tmp5) [1] 849.2057 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.54982 67.80294 69.80913 72.32445 71.66222 70.43172 69.97822 70.04786 [9] 72.21160 70.02139 > rowSums(tmp5) [1] 1810.996 1356.059 1396.183 1446.489 1433.244 1408.634 1399.564 1400.957 [9] 1444.232 1400.428 > rowVars(tmp5) [1] 7867.33779 68.68943 85.93472 66.38658 71.22125 58.96785 [7] 73.25398 61.48437 42.92004 99.47811 > rowSd(tmp5) [1] 88.698015 8.287908 9.270098 8.147796 8.439268 7.679052 8.558854 [8] 7.841197 6.551338 9.973871 > rowMax(tmp5) [1] 466.51551 85.21799 85.20942 85.83027 83.54256 89.40853 89.24986 [8] 81.26086 88.12590 85.02009 > rowMin(tmp5) [1] 56.95111 55.62951 55.81177 59.74401 58.79303 54.90767 55.34611 58.16550 [9] 62.89363 53.32716 > > colMeans(tmp5) [1] 112.52697 70.73626 75.52866 65.28649 65.33592 70.82302 71.41880 [8] 69.99988 68.71195 69.87931 70.96941 75.14741 66.65500 71.32370 [15] 69.17342 76.23952 69.95616 69.50462 69.71970 70.74249 > colSums(tmp5) [1] 1125.2697 707.3626 755.2866 652.8649 653.3592 708.2302 714.1880 [8] 699.9988 687.1195 698.7931 709.6941 751.4741 666.5500 713.2370 [15] 691.7342 762.3952 699.5616 695.0462 697.1970 707.4249 > colVars(tmp5) [1] 15502.43376 85.20268 31.72340 57.63501 45.90421 30.26267 [7] 66.60694 111.93281 37.74370 90.60620 114.90721 27.92350 [13] 64.38132 43.01591 25.55072 85.48320 81.45239 85.34007 [19] 57.75562 80.51360 > colSd(tmp5) [1] 124.508770 9.230530 5.632353 7.591772 6.775265 5.501152 [7] 8.161307 10.579830 6.143590 9.518729 10.719478 5.284269 [13] 8.023797 6.558651 5.054772 9.245712 9.025098 9.237969 [19] 7.599712 8.972937 > colMax(tmp5) [1] 466.51551 84.01743 80.40338 79.69981 76.03122 83.43978 89.24986 [8] 84.89096 79.01795 81.65126 89.40853 81.75786 83.95846 82.98170 [15] 76.63911 85.20942 85.02009 88.12590 85.21799 83.45390 > colMin(tmp5) [1] 63.16739 55.34611 62.89363 54.90767 55.62951 65.83595 63.19254 53.32716 [9] 57.40578 56.95111 57.86215 65.57123 55.95314 62.21997 61.18298 55.99928 [17] 56.46044 59.81214 58.79303 56.32664 > > > ### 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] NA 67.80294 69.80913 72.32445 71.66222 70.43172 69.97822 70.04786 [9] 72.21160 70.02139 > rowSums(tmp5) [1] NA 1356.059 1396.183 1446.489 1433.244 1408.634 1399.564 1400.957 [9] 1444.232 1400.428 > rowVars(tmp5) [1] 8257.47758 68.68943 85.93472 66.38658 71.22125 58.96785 [7] 73.25398 61.48437 42.92004 99.47811 > rowSd(tmp5) [1] 90.870664 8.287908 9.270098 8.147796 8.439268 7.679052 8.558854 [8] 7.841197 6.551338 9.973871 > rowMax(tmp5) [1] NA 85.21799 85.20942 85.83027 83.54256 89.40853 89.24986 81.26086 [9] 88.12590 85.02009 > rowMin(tmp5) [1] NA 55.62951 55.81177 59.74401 58.79303 54.90767 55.34611 58.16550 [9] 62.89363 53.32716 > > colMeans(tmp5) [1] 112.52697 70.73626 75.52866 65.28649 65.33592 70.82302 71.41880 [8] 69.99988 68.71195 69.87931 70.96941 75.14741 66.65500 NA [15] 69.17342 76.23952 69.95616 69.50462 69.71970 70.74249 > colSums(tmp5) [1] 1125.2697 707.3626 755.2866 652.8649 653.3592 708.2302 714.1880 [8] 699.9988 687.1195 698.7931 709.6941 751.4741 666.5500 NA [15] 691.7342 762.3952 699.5616 695.0462 697.1970 707.4249 > colVars(tmp5) [1] 15502.43376 85.20268 31.72340 57.63501 45.90421 30.26267 [7] 66.60694 111.93281 37.74370 90.60620 114.90721 27.92350 [13] 64.38132 NA 25.55072 85.48320 81.45239 85.34007 [19] 57.75562 80.51360 > colSd(tmp5) [1] 124.508770 9.230530 5.632353 7.591772 6.775265 5.501152 [7] 8.161307 10.579830 6.143590 9.518729 10.719478 5.284269 [13] 8.023797 NA 5.054772 9.245712 9.025098 9.237969 [19] 7.599712 8.972937 > colMax(tmp5) [1] 466.51551 84.01743 80.40338 79.69981 76.03122 83.43978 89.24986 [8] 84.89096 79.01795 81.65126 89.40853 81.75786 83.95846 NA [15] 76.63911 85.20942 85.02009 88.12590 85.21799 83.45390 > colMin(tmp5) [1] 63.16739 55.34611 62.89363 54.90767 55.62951 65.83595 63.19254 53.32716 [9] 57.40578 56.95111 57.86215 65.57123 55.95314 NA 61.18298 55.99928 [17] 56.46044 59.81214 58.79303 56.32664 > > Max(tmp5,na.rm=TRUE) [1] 466.5155 > Min(tmp5,na.rm=TRUE) [1] 53.32716 > mean(tmp5,na.rm=TRUE) [1] 72.53551 > Sum(tmp5,na.rm=TRUE) [1] 14434.57 > Var(tmp5,na.rm=TRUE) [1] 852.9599 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.04087 67.80294 69.80913 72.32445 71.66222 70.43172 69.97822 70.04786 [9] 72.21160 70.02139 > rowSums(tmp5,na.rm=TRUE) [1] 1748.777 1356.059 1396.183 1446.489 1433.244 1408.634 1399.564 1400.957 [9] 1444.232 1400.428 > rowVars(tmp5,na.rm=TRUE) [1] 8257.47758 68.68943 85.93472 66.38658 71.22125 58.96785 [7] 73.25398 61.48437 42.92004 99.47811 > rowSd(tmp5,na.rm=TRUE) [1] 90.870664 8.287908 9.270098 8.147796 8.439268 7.679052 8.558854 [8] 7.841197 6.551338 9.973871 > rowMax(tmp5,na.rm=TRUE) [1] 466.51551 85.21799 85.20942 85.83027 83.54256 89.40853 89.24986 [8] 81.26086 88.12590 85.02009 > rowMin(tmp5,na.rm=TRUE) [1] 56.95111 55.62951 55.81177 59.74401 58.79303 54.90767 55.34611 58.16550 [9] 62.89363 53.32716 > > colMeans(tmp5,na.rm=TRUE) [1] 112.52697 70.73626 75.52866 65.28649 65.33592 70.82302 71.41880 [8] 69.99988 68.71195 69.87931 70.96941 75.14741 66.65500 72.33523 [15] 69.17342 76.23952 69.95616 69.50462 69.71970 70.74249 > colSums(tmp5,na.rm=TRUE) [1] 1125.2697 707.3626 755.2866 652.8649 653.3592 708.2302 714.1880 [8] 699.9988 687.1195 698.7931 709.6941 751.4741 666.5500 651.0170 [15] 691.7342 762.3952 699.5616 695.0462 697.1970 707.4249 > colVars(tmp5,na.rm=TRUE) [1] 15502.43376 85.20268 31.72340 57.63501 45.90421 30.26267 [7] 66.60694 111.93281 37.74370 90.60620 114.90721 27.92350 [13] 64.38132 36.88208 25.55072 85.48320 81.45239 85.34007 [19] 57.75562 80.51360 > colSd(tmp5,na.rm=TRUE) [1] 124.508770 9.230530 5.632353 7.591772 6.775265 5.501152 [7] 8.161307 10.579830 6.143590 9.518729 10.719478 5.284269 [13] 8.023797 6.073062 5.054772 9.245712 9.025098 9.237969 [19] 7.599712 8.972937 > colMax(tmp5,na.rm=TRUE) [1] 466.51551 84.01743 80.40338 79.69981 76.03122 83.43978 89.24986 [8] 84.89096 79.01795 81.65126 89.40853 81.75786 83.95846 82.98170 [15] 76.63911 85.20942 85.02009 88.12590 85.21799 83.45390 > colMin(tmp5,na.rm=TRUE) [1] 63.16739 55.34611 62.89363 54.90767 55.62951 65.83595 63.19254 53.32716 [9] 57.40578 56.95111 57.86215 65.57123 55.95314 63.72942 61.18298 55.99928 [17] 56.46044 59.81214 58.79303 56.32664 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] NaN 67.80294 69.80913 72.32445 71.66222 70.43172 69.97822 70.04786 [9] 72.21160 70.02139 > rowSums(tmp5,na.rm=TRUE) [1] 0.000 1356.059 1396.183 1446.489 1433.244 1408.634 1399.564 1400.957 [9] 1444.232 1400.428 > rowVars(tmp5,na.rm=TRUE) [1] NA 68.68943 85.93472 66.38658 71.22125 58.96785 73.25398 61.48437 [9] 42.92004 99.47811 > rowSd(tmp5,na.rm=TRUE) [1] NA 8.287908 9.270098 8.147796 8.439268 7.679052 8.558854 7.841197 [9] 6.551338 9.973871 > rowMax(tmp5,na.rm=TRUE) [1] NA 85.21799 85.20942 85.83027 83.54256 89.40853 89.24986 81.26086 [9] 88.12590 85.02009 > rowMin(tmp5,na.rm=TRUE) [1] NA 55.62951 55.81177 59.74401 58.79303 54.90767 55.34611 58.16550 [9] 62.89363 53.32716 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 73.19490 70.07315 75.04317 64.33110 64.14755 71.22196 72.08966 69.02691 [9] 69.01397 71.31577 70.45846 75.58155 66.90527 NaN 69.14819 76.70474 [17] 69.92197 68.58600 69.25787 71.17484 > colSums(tmp5,na.rm=TRUE) [1] 658.7541 630.6584 675.3886 578.9799 577.3280 640.9977 648.8069 621.2422 [9] 621.1257 641.8420 634.1262 680.2340 602.1474 0.0000 622.3337 690.3427 [17] 629.2977 617.2740 623.3208 640.5736 > colVars(tmp5,na.rm=TRUE) [1] 36.36416 90.90628 33.03720 54.57055 35.75482 32.25504 69.86972 [8] 115.27425 41.43549 78.71832 126.33361 29.29352 71.72435 NA [15] 28.73740 93.73374 91.62079 86.51404 62.57555 88.47483 > colSd(tmp5,na.rm=TRUE) [1] 6.030271 9.534478 5.747800 7.387188 5.979533 5.679352 8.358811 [8] 10.736585 6.437040 8.872335 11.239822 5.412349 8.469023 NA [15] 5.360727 9.681618 9.571875 9.301292 7.910471 9.406106 > colMax(tmp5,na.rm=TRUE) [1] 85.83027 84.01743 80.40338 79.69981 71.53598 83.43978 89.24986 84.89096 [9] 79.01795 81.65126 89.40853 81.75786 83.95846 -Inf 76.63911 85.20942 [17] 85.02009 88.12590 85.21799 83.45390 > colMin(tmp5,na.rm=TRUE) [1] 63.16739 55.34611 62.89363 54.90767 55.62951 65.83595 63.19254 53.32716 [9] 57.40578 57.64801 57.86215 65.57123 55.95314 Inf 61.18298 55.99928 [17] 56.46044 59.81214 58.79303 56.32664 > > > > > 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] 214.7533 191.5237 248.8236 208.5844 182.0897 185.4778 252.6329 308.0862 [9] 187.0635 318.5889 > apply(copymatrix,1,var,na.rm=TRUE) [1] 214.7533 191.5237 248.8236 208.5844 182.0897 185.4778 252.6329 308.0862 [9] 187.0635 318.5889 > > > > 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] -8.526513e-14 1.421085e-13 -5.684342e-14 2.842171e-14 -1.136868e-13 [6] 0.000000e+00 2.842171e-14 2.842171e-14 -8.526513e-14 0.000000e+00 [11] -5.684342e-14 2.842171e-14 0.000000e+00 0.000000e+00 0.000000e+00 [16] 1.705303e-13 5.684342e-14 0.000000e+00 1.136868e-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) + } 9 3 3 11 1 11 9 3 8 9 6 4 4 13 2 15 9 5 2 5 1 14 4 1 9 16 3 1 10 2 9 1 3 15 10 11 8 19 1 19 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.716747 > Min(tmp) [1] -2.036387 > mean(tmp) [1] 0.1168923 > Sum(tmp) [1] 11.68923 > Var(tmp) [1] 1.1925 > > rowMeans(tmp) [1] 0.1168923 > rowSums(tmp) [1] 11.68923 > rowVars(tmp) [1] 1.1925 > rowSd(tmp) [1] 1.092016 > rowMax(tmp) [1] 2.716747 > rowMin(tmp) [1] -2.036387 > > colMeans(tmp) [1] 1.836923877 0.736167399 1.398666810 0.710546295 -0.717480926 [6] -0.473304332 1.177644584 1.110200984 0.405262201 0.487291389 [11] 1.467526241 -1.275058567 -1.765928288 0.197719844 -2.036387424 [16] 1.029895280 0.769817838 -0.337322192 0.496736000 -0.108965258 [21] 0.473348802 0.859486959 1.150148388 2.413982029 -0.673305304 [26] -1.369171148 1.219652371 -0.745440719 1.546588066 0.371110040 [31] 0.156473850 -0.455498001 -0.381545241 0.218184100 0.484848840 [36] 0.057374626 -1.491002130 -1.747698171 -0.128950699 -0.606015760 [41] 0.597363301 -0.620564591 -1.568900822 2.500893562 -1.830493728 [46] -0.170836567 -0.362150956 -1.167142895 0.462899858 1.573646094 [51] 1.527414329 -1.128479921 1.057186840 -0.006599636 1.180395395 [56] -0.640446461 -1.774438911 1.044585411 -0.259630873 0.120742435 [61] -0.770658247 0.321025114 -0.737067599 1.542799378 2.490269084 [66] -1.227566387 0.088700991 -0.472794555 1.580742659 -1.693016210 [71] 0.396397919 1.267460778 -0.498380591 -0.232959551 -1.261846461 [76] 0.906586522 0.118182853 -0.497281026 0.034757635 2.133322430 [81] 0.557989480 -0.326517712 0.628465281 1.230479996 -0.542467556 [86] 0.942289527 0.644457192 -1.199030875 -0.047392823 -1.123201314 [91] 0.811241793 -0.370050069 0.163163360 -0.037158079 -0.705629847 [96] 2.716746802 0.575222699 -1.179295143 0.353651867 -1.890369702 > colSums(tmp) [1] 1.836923877 0.736167399 1.398666810 0.710546295 -0.717480926 [6] -0.473304332 1.177644584 1.110200984 0.405262201 0.487291389 [11] 1.467526241 -1.275058567 -1.765928288 0.197719844 -2.036387424 [16] 1.029895280 0.769817838 -0.337322192 0.496736000 -0.108965258 [21] 0.473348802 0.859486959 1.150148388 2.413982029 -0.673305304 [26] -1.369171148 1.219652371 -0.745440719 1.546588066 0.371110040 [31] 0.156473850 -0.455498001 -0.381545241 0.218184100 0.484848840 [36] 0.057374626 -1.491002130 -1.747698171 -0.128950699 -0.606015760 [41] 0.597363301 -0.620564591 -1.568900822 2.500893562 -1.830493728 [46] -0.170836567 -0.362150956 -1.167142895 0.462899858 1.573646094 [51] 1.527414329 -1.128479921 1.057186840 -0.006599636 1.180395395 [56] -0.640446461 -1.774438911 1.044585411 -0.259630873 0.120742435 [61] -0.770658247 0.321025114 -0.737067599 1.542799378 2.490269084 [66] -1.227566387 0.088700991 -0.472794555 1.580742659 -1.693016210 [71] 0.396397919 1.267460778 -0.498380591 -0.232959551 -1.261846461 [76] 0.906586522 0.118182853 -0.497281026 0.034757635 2.133322430 [81] 0.557989480 -0.326517712 0.628465281 1.230479996 -0.542467556 [86] 0.942289527 0.644457192 -1.199030875 -0.047392823 -1.123201314 [91] 0.811241793 -0.370050069 0.163163360 -0.037158079 -0.705629847 [96] 2.716746802 0.575222699 -1.179295143 0.353651867 -1.890369702 > 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.836923877 0.736167399 1.398666810 0.710546295 -0.717480926 [6] -0.473304332 1.177644584 1.110200984 0.405262201 0.487291389 [11] 1.467526241 -1.275058567 -1.765928288 0.197719844 -2.036387424 [16] 1.029895280 0.769817838 -0.337322192 0.496736000 -0.108965258 [21] 0.473348802 0.859486959 1.150148388 2.413982029 -0.673305304 [26] -1.369171148 1.219652371 -0.745440719 1.546588066 0.371110040 [31] 0.156473850 -0.455498001 -0.381545241 0.218184100 0.484848840 [36] 0.057374626 -1.491002130 -1.747698171 -0.128950699 -0.606015760 [41] 0.597363301 -0.620564591 -1.568900822 2.500893562 -1.830493728 [46] -0.170836567 -0.362150956 -1.167142895 0.462899858 1.573646094 [51] 1.527414329 -1.128479921 1.057186840 -0.006599636 1.180395395 [56] -0.640446461 -1.774438911 1.044585411 -0.259630873 0.120742435 [61] -0.770658247 0.321025114 -0.737067599 1.542799378 2.490269084 [66] -1.227566387 0.088700991 -0.472794555 1.580742659 -1.693016210 [71] 0.396397919 1.267460778 -0.498380591 -0.232959551 -1.261846461 [76] 0.906586522 0.118182853 -0.497281026 0.034757635 2.133322430 [81] 0.557989480 -0.326517712 0.628465281 1.230479996 -0.542467556 [86] 0.942289527 0.644457192 -1.199030875 -0.047392823 -1.123201314 [91] 0.811241793 -0.370050069 0.163163360 -0.037158079 -0.705629847 [96] 2.716746802 0.575222699 -1.179295143 0.353651867 -1.890369702 > colMin(tmp) [1] 1.836923877 0.736167399 1.398666810 0.710546295 -0.717480926 [6] -0.473304332 1.177644584 1.110200984 0.405262201 0.487291389 [11] 1.467526241 -1.275058567 -1.765928288 0.197719844 -2.036387424 [16] 1.029895280 0.769817838 -0.337322192 0.496736000 -0.108965258 [21] 0.473348802 0.859486959 1.150148388 2.413982029 -0.673305304 [26] -1.369171148 1.219652371 -0.745440719 1.546588066 0.371110040 [31] 0.156473850 -0.455498001 -0.381545241 0.218184100 0.484848840 [36] 0.057374626 -1.491002130 -1.747698171 -0.128950699 -0.606015760 [41] 0.597363301 -0.620564591 -1.568900822 2.500893562 -1.830493728 [46] -0.170836567 -0.362150956 -1.167142895 0.462899858 1.573646094 [51] 1.527414329 -1.128479921 1.057186840 -0.006599636 1.180395395 [56] -0.640446461 -1.774438911 1.044585411 -0.259630873 0.120742435 [61] -0.770658247 0.321025114 -0.737067599 1.542799378 2.490269084 [66] -1.227566387 0.088700991 -0.472794555 1.580742659 -1.693016210 [71] 0.396397919 1.267460778 -0.498380591 -0.232959551 -1.261846461 [76] 0.906586522 0.118182853 -0.497281026 0.034757635 2.133322430 [81] 0.557989480 -0.326517712 0.628465281 1.230479996 -0.542467556 [86] 0.942289527 0.644457192 -1.199030875 -0.047392823 -1.123201314 [91] 0.811241793 -0.370050069 0.163163360 -0.037158079 -0.705629847 [96] 2.716746802 0.575222699 -1.179295143 0.353651867 -1.890369702 > colMedians(tmp) [1] 1.836923877 0.736167399 1.398666810 0.710546295 -0.717480926 [6] -0.473304332 1.177644584 1.110200984 0.405262201 0.487291389 [11] 1.467526241 -1.275058567 -1.765928288 0.197719844 -2.036387424 [16] 1.029895280 0.769817838 -0.337322192 0.496736000 -0.108965258 [21] 0.473348802 0.859486959 1.150148388 2.413982029 -0.673305304 [26] -1.369171148 1.219652371 -0.745440719 1.546588066 0.371110040 [31] 0.156473850 -0.455498001 -0.381545241 0.218184100 0.484848840 [36] 0.057374626 -1.491002130 -1.747698171 -0.128950699 -0.606015760 [41] 0.597363301 -0.620564591 -1.568900822 2.500893562 -1.830493728 [46] -0.170836567 -0.362150956 -1.167142895 0.462899858 1.573646094 [51] 1.527414329 -1.128479921 1.057186840 -0.006599636 1.180395395 [56] -0.640446461 -1.774438911 1.044585411 -0.259630873 0.120742435 [61] -0.770658247 0.321025114 -0.737067599 1.542799378 2.490269084 [66] -1.227566387 0.088700991 -0.472794555 1.580742659 -1.693016210 [71] 0.396397919 1.267460778 -0.498380591 -0.232959551 -1.261846461 [76] 0.906586522 0.118182853 -0.497281026 0.034757635 2.133322430 [81] 0.557989480 -0.326517712 0.628465281 1.230479996 -0.542467556 [86] 0.942289527 0.644457192 -1.199030875 -0.047392823 -1.123201314 [91] 0.811241793 -0.370050069 0.163163360 -0.037158079 -0.705629847 [96] 2.716746802 0.575222699 -1.179295143 0.353651867 -1.890369702 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.836924 0.7361674 1.398667 0.7105463 -0.7174809 -0.4733043 1.177645 [2,] 1.836924 0.7361674 1.398667 0.7105463 -0.7174809 -0.4733043 1.177645 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.110201 0.4052622 0.4872914 1.467526 -1.275059 -1.765928 0.1977198 [2,] 1.110201 0.4052622 0.4872914 1.467526 -1.275059 -1.765928 0.1977198 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -2.036387 1.029895 0.7698178 -0.3373222 0.496736 -0.1089653 0.4733488 [2,] -2.036387 1.029895 0.7698178 -0.3373222 0.496736 -0.1089653 0.4733488 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.859487 1.150148 2.413982 -0.6733053 -1.369171 1.219652 -0.7454407 [2,] 0.859487 1.150148 2.413982 -0.6733053 -1.369171 1.219652 -0.7454407 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 1.546588 0.37111 0.1564739 -0.455498 -0.3815452 0.2181841 0.4848488 [2,] 1.546588 0.37111 0.1564739 -0.455498 -0.3815452 0.2181841 0.4848488 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.05737463 -1.491002 -1.747698 -0.1289507 -0.6060158 0.5973633 -0.6205646 [2,] 0.05737463 -1.491002 -1.747698 -0.1289507 -0.6060158 0.5973633 -0.6205646 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -1.568901 2.500894 -1.830494 -0.1708366 -0.362151 -1.167143 0.4628999 [2,] -1.568901 2.500894 -1.830494 -0.1708366 -0.362151 -1.167143 0.4628999 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.573646 1.527414 -1.12848 1.057187 -0.006599636 1.180395 -0.6404465 [2,] 1.573646 1.527414 -1.12848 1.057187 -0.006599636 1.180395 -0.6404465 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.774439 1.044585 -0.2596309 0.1207424 -0.7706582 0.3210251 -0.7370676 [2,] -1.774439 1.044585 -0.2596309 0.1207424 -0.7706582 0.3210251 -0.7370676 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 1.542799 2.490269 -1.227566 0.08870099 -0.4727946 1.580743 -1.693016 [2,] 1.542799 2.490269 -1.227566 0.08870099 -0.4727946 1.580743 -1.693016 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.3963979 1.267461 -0.4983806 -0.2329596 -1.261846 0.9065865 0.1181829 [2,] 0.3963979 1.267461 -0.4983806 -0.2329596 -1.261846 0.9065865 0.1181829 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.497281 0.03475763 2.133322 0.5579895 -0.3265177 0.6284653 1.23048 [2,] -0.497281 0.03475763 2.133322 0.5579895 -0.3265177 0.6284653 1.23048 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.5424676 0.9422895 0.6444572 -1.199031 -0.04739282 -1.123201 0.8112418 [2,] -0.5424676 0.9422895 0.6444572 -1.199031 -0.04739282 -1.123201 0.8112418 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.3700501 0.1631634 -0.03715808 -0.7056298 2.716747 0.5752227 -1.179295 [2,] -0.3700501 0.1631634 -0.03715808 -0.7056298 2.716747 0.5752227 -1.179295 [,99] [,100] [1,] 0.3536519 -1.89037 [2,] 0.3536519 -1.89037 > > > Max(tmp2) [1] 2.78042 > Min(tmp2) [1] -2.040228 > mean(tmp2) [1] 0.0235959 > Sum(tmp2) [1] 2.35959 > Var(tmp2) [1] 0.9844809 > > rowMeans(tmp2) [1] 1.74987867 -0.27292405 -0.88594976 -0.13791709 -0.61434610 0.06791423 [7] -1.82200094 1.47342274 0.49826845 0.97448622 -0.12885092 2.35527310 [13] -1.76108637 -0.13723593 0.73686106 0.84964284 1.28206314 -0.52430876 [19] 1.13907860 0.33587731 -0.41421381 -1.07353009 0.41823392 -0.54139819 [25] -0.56760988 -0.26505231 -0.21060071 0.26302640 1.12496141 0.52764076 [31] -1.02594066 -0.96524795 0.39984430 -0.14963729 1.36696784 0.12425171 [37] 0.29071483 -0.30039239 -1.65538494 -0.28450638 0.33850671 2.54228268 [43] -0.12972101 -0.11935231 -0.20161267 0.50163406 -1.38323119 -0.40355070 [49] -0.69205054 0.51157426 -0.11053791 0.29346863 -0.66824910 -0.94742871 [55] 0.50827026 -0.84322401 -0.15399035 0.20091240 0.05995962 -0.22011397 [61] -0.04072465 1.38779969 -0.68939586 0.37564930 0.38376330 0.71496970 [67] -0.06632804 -0.56129981 1.50345449 -0.28331397 -0.65873916 -0.50085914 [73] -1.00671318 0.89895574 0.36972706 -0.71320216 1.59465510 0.82958678 [79] 0.14024379 -1.95126821 -0.91617652 2.78042007 -0.26237319 -1.54009804 [85] -0.12592826 -1.06041698 -0.66088836 -0.55816005 -0.15384062 -1.57528469 [91] -1.46938155 -2.04022835 1.68363710 0.96604261 -0.29323742 2.01586758 [97] 0.16369324 2.03043533 -0.13519986 0.45992758 > rowSums(tmp2) [1] 1.74987867 -0.27292405 -0.88594976 -0.13791709 -0.61434610 0.06791423 [7] -1.82200094 1.47342274 0.49826845 0.97448622 -0.12885092 2.35527310 [13] -1.76108637 -0.13723593 0.73686106 0.84964284 1.28206314 -0.52430876 [19] 1.13907860 0.33587731 -0.41421381 -1.07353009 0.41823392 -0.54139819 [25] -0.56760988 -0.26505231 -0.21060071 0.26302640 1.12496141 0.52764076 [31] -1.02594066 -0.96524795 0.39984430 -0.14963729 1.36696784 0.12425171 [37] 0.29071483 -0.30039239 -1.65538494 -0.28450638 0.33850671 2.54228268 [43] -0.12972101 -0.11935231 -0.20161267 0.50163406 -1.38323119 -0.40355070 [49] -0.69205054 0.51157426 -0.11053791 0.29346863 -0.66824910 -0.94742871 [55] 0.50827026 -0.84322401 -0.15399035 0.20091240 0.05995962 -0.22011397 [61] -0.04072465 1.38779969 -0.68939586 0.37564930 0.38376330 0.71496970 [67] -0.06632804 -0.56129981 1.50345449 -0.28331397 -0.65873916 -0.50085914 [73] -1.00671318 0.89895574 0.36972706 -0.71320216 1.59465510 0.82958678 [79] 0.14024379 -1.95126821 -0.91617652 2.78042007 -0.26237319 -1.54009804 [85] -0.12592826 -1.06041698 -0.66088836 -0.55816005 -0.15384062 -1.57528469 [91] -1.46938155 -2.04022835 1.68363710 0.96604261 -0.29323742 2.01586758 [97] 0.16369324 2.03043533 -0.13519986 0.45992758 > 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.74987867 -0.27292405 -0.88594976 -0.13791709 -0.61434610 0.06791423 [7] -1.82200094 1.47342274 0.49826845 0.97448622 -0.12885092 2.35527310 [13] -1.76108637 -0.13723593 0.73686106 0.84964284 1.28206314 -0.52430876 [19] 1.13907860 0.33587731 -0.41421381 -1.07353009 0.41823392 -0.54139819 [25] -0.56760988 -0.26505231 -0.21060071 0.26302640 1.12496141 0.52764076 [31] -1.02594066 -0.96524795 0.39984430 -0.14963729 1.36696784 0.12425171 [37] 0.29071483 -0.30039239 -1.65538494 -0.28450638 0.33850671 2.54228268 [43] -0.12972101 -0.11935231 -0.20161267 0.50163406 -1.38323119 -0.40355070 [49] -0.69205054 0.51157426 -0.11053791 0.29346863 -0.66824910 -0.94742871 [55] 0.50827026 -0.84322401 -0.15399035 0.20091240 0.05995962 -0.22011397 [61] -0.04072465 1.38779969 -0.68939586 0.37564930 0.38376330 0.71496970 [67] -0.06632804 -0.56129981 1.50345449 -0.28331397 -0.65873916 -0.50085914 [73] -1.00671318 0.89895574 0.36972706 -0.71320216 1.59465510 0.82958678 [79] 0.14024379 -1.95126821 -0.91617652 2.78042007 -0.26237319 -1.54009804 [85] -0.12592826 -1.06041698 -0.66088836 -0.55816005 -0.15384062 -1.57528469 [91] -1.46938155 -2.04022835 1.68363710 0.96604261 -0.29323742 2.01586758 [97] 0.16369324 2.03043533 -0.13519986 0.45992758 > rowMin(tmp2) [1] 1.74987867 -0.27292405 -0.88594976 -0.13791709 -0.61434610 0.06791423 [7] -1.82200094 1.47342274 0.49826845 0.97448622 -0.12885092 2.35527310 [13] -1.76108637 -0.13723593 0.73686106 0.84964284 1.28206314 -0.52430876 [19] 1.13907860 0.33587731 -0.41421381 -1.07353009 0.41823392 -0.54139819 [25] -0.56760988 -0.26505231 -0.21060071 0.26302640 1.12496141 0.52764076 [31] -1.02594066 -0.96524795 0.39984430 -0.14963729 1.36696784 0.12425171 [37] 0.29071483 -0.30039239 -1.65538494 -0.28450638 0.33850671 2.54228268 [43] -0.12972101 -0.11935231 -0.20161267 0.50163406 -1.38323119 -0.40355070 [49] -0.69205054 0.51157426 -0.11053791 0.29346863 -0.66824910 -0.94742871 [55] 0.50827026 -0.84322401 -0.15399035 0.20091240 0.05995962 -0.22011397 [61] -0.04072465 1.38779969 -0.68939586 0.37564930 0.38376330 0.71496970 [67] -0.06632804 -0.56129981 1.50345449 -0.28331397 -0.65873916 -0.50085914 [73] -1.00671318 0.89895574 0.36972706 -0.71320216 1.59465510 0.82958678 [79] 0.14024379 -1.95126821 -0.91617652 2.78042007 -0.26237319 -1.54009804 [85] -0.12592826 -1.06041698 -0.66088836 -0.55816005 -0.15384062 -1.57528469 [91] -1.46938155 -2.04022835 1.68363710 0.96604261 -0.29323742 2.01586758 [97] 0.16369324 2.03043533 -0.13519986 0.45992758 > > colMeans(tmp2) [1] 0.0235959 > colSums(tmp2) [1] 2.35959 > colVars(tmp2) [1] 0.9844809 > colSd(tmp2) [1] 0.9922101 > colMax(tmp2) [1] 2.78042 > colMin(tmp2) [1] -2.040228 > colMedians(tmp2) [1] -0.129286 > colRanges(tmp2) [,1] [1,] -2.040228 [2,] 2.780420 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] -2.7284647 -3.3538754 1.3208320 -1.9648078 -1.9199940 -1.8772146 [7] 0.3139519 0.1710979 1.1779066 6.1597964 > colApply(tmp,quantile)[,1] [,1] [1,] -2.1448188 [2,] -0.8275302 [3,] -0.2707751 [4,] -0.1140120 [5,] 1.5312155 > > rowApply(tmp,sum) [1] 0.4711967 -1.2340586 -5.2431134 0.6536107 3.2553946 -2.7032249 [7] 0.8080231 4.4417474 -4.2321458 1.0817983 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 3 6 5 10 5 10 3 6 1 [2,] 4 1 5 9 2 6 8 4 2 2 [3,] 8 9 10 2 4 1 9 9 5 4 [4,] 6 7 1 6 5 8 6 2 3 5 [5,] 7 8 9 1 1 2 2 5 10 9 [6,] 3 4 2 4 3 3 5 8 9 7 [7,] 9 2 3 7 9 10 3 1 8 3 [8,] 2 10 4 8 8 9 4 6 1 8 [9,] 5 5 8 3 7 4 1 10 7 6 [10,] 10 6 7 10 6 7 7 7 4 10 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.8468546 -1.3601631 0.8882043 0.8627832 0.3604815 -0.8767165 [7] 3.6102281 2.0050292 2.5029232 1.2877783 -0.7555786 -0.6552400 [13] -3.4250157 2.6408178 -2.9889468 0.5888447 2.3788181 0.1600410 [19] 1.2536334 -2.6453312 > colApply(tmp,quantile)[,1] [,1] [1,] -1.5504386 [2,] -1.1320793 [3,] -0.2526001 [4,] 0.5371998 [5,] 1.5510637 > > rowApply(tmp,sum) [1] -2.5666659 5.6843261 -0.0760398 0.4586682 1.4854478 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 2 12 19 7 3 [2,] 6 20 6 4 4 [3,] 19 7 5 17 9 [4,] 15 9 3 10 17 [5,] 11 8 9 3 19 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.1320793 -0.6554055 1.18619267 0.40535284 -0.2470613 -0.5104052 [2,] 0.5371998 1.6899934 -0.40226338 0.35125782 0.1880496 1.1758607 [3,] 1.5510637 -0.2318218 -0.76393545 -1.24526138 -0.1278928 -1.4145817 [4,] -0.2526001 -0.8469639 0.78578337 -0.02448656 -0.9449487 -0.9948905 [5,] -1.5504386 -1.3159653 0.08242711 1.37592046 1.4923347 0.8673001 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.637512494 0.328290973 1.28127023 0.1179871 -0.5252778 -0.3676390 [2,] 0.891883943 0.952775161 -0.87679089 -0.4274704 -0.4667509 -0.4961465 [3,] -0.009479461 0.545048921 -0.09607295 0.2954755 0.7454894 -0.1534191 [4,] 0.550059908 0.008775831 1.11651660 -0.1529108 -1.3884983 0.2399616 [5,] 1.540251208 0.170138327 1.07800018 1.4546969 0.8794590 0.1220030 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -1.06743916 1.0698666 -1.3950840 -0.8509109 0.09615049 -0.5400724 [2,] 0.45462597 0.7629530 -0.6027276 0.8845352 1.34549409 0.4631688 [3,] -1.57262598 0.3380838 0.2934922 0.1913482 0.11104949 2.4433023 [4,] 0.00564043 -0.6993577 0.7646983 1.1719614 0.74951381 -0.2799075 [5,] -1.24521693 1.1692721 -2.0493257 -0.8080892 0.07661021 -1.9264503 [,19] [,20] [1,] 0.5103995 -0.9083143 [2,] 0.8877283 -1.6290501 [3,] -0.7853777 -0.1899250 [4,] -0.1662551 0.8165760 [5,] 0.8071384 -0.7346178 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 626 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 542 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 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.02097509 -0.1056192 -1.296404 0.6801906 0.6193612 1.06679 -0.8656944 col8 col9 col10 col11 col12 col13 col14 row1 -1.910095 0.3126826 0.2723828 1.67325 -0.5478907 0.2664246 0.7480093 col15 col16 col17 col18 col19 col20 row1 -2.753229 -0.1338783 0.8258633 0.01119313 0.591536 1.00292 > tmp[,"col10"] col10 row1 0.2723828 row2 -0.4605587 row3 0.2712674 row4 1.8466024 row5 1.6227776 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -0.02097509 -0.1056192 -1.2964041 0.6801906 0.6193612 1.06679040 row5 -0.38742244 0.3654524 0.2770316 0.1631786 -1.4921460 0.08755521 col7 col8 col9 col10 col11 col12 row1 -0.8656944 -1.9100945 0.3126826 0.2723828 1.6732497 -0.5478907 row5 -0.5832749 0.3824151 -0.2393773 1.6227776 0.8475301 -1.6070908 col13 col14 col15 col16 col17 col18 row1 0.26642456 0.74800934 -2.7532291 -0.1338783 0.8258633 0.01119313 row5 -0.07916565 -0.09799329 0.3345317 0.1800602 -0.9358068 0.09164116 col19 col20 row1 0.591536 1.0029199 row5 -1.440797 -0.6330053 > tmp[,c("col6","col20")] col6 col20 row1 1.06679040 1.0029199 row2 0.36479675 1.5906846 row3 -0.71191750 1.2462656 row4 0.51025608 0.4115825 row5 0.08755521 -0.6330053 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 1.06679040 1.0029199 row5 0.08755521 -0.6330053 > > > > > 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.53857 50.1335 50.00011 49.81285 51.14657 104.4901 50.62758 49.35417 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.17793 48.89255 51.38985 50.18783 49.56201 50.50069 49.78876 50.7011 col17 col18 col19 col20 row1 49.282 50.45239 50.97388 105.9407 > tmp[,"col10"] col10 row1 48.89255 row2 30.58736 row3 29.98735 row4 30.29735 row5 52.38945 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.53857 50.1335 50.00011 49.81285 51.14657 104.4901 50.62758 49.35417 row5 50.38718 50.9475 50.58809 49.03742 49.75143 105.0146 48.97643 49.11893 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.17793 48.89255 51.38985 50.18783 49.56201 50.50069 49.78876 50.70110 row5 50.72132 52.38945 49.44294 53.58660 50.07675 48.79748 50.30552 49.83671 col17 col18 col19 col20 row1 49.28200 50.45239 50.97388 105.9407 row5 49.95873 48.84835 50.68754 102.6201 > tmp[,c("col6","col20")] col6 col20 row1 104.49011 105.94071 row2 77.52654 75.79755 row3 76.09591 73.42380 row4 76.44037 74.88578 row5 105.01458 102.62011 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.4901 105.9407 row5 105.0146 102.6201 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.4901 105.9407 row5 105.0146 102.6201 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.20773968 [2,] -1.15245323 [3,] -0.28217403 [4,] -0.08780729 [5,] -1.34373233 > tmp[,c("col17","col7")] col17 col7 [1,] 0.8484997 0.42978619 [2,] 3.0671938 -0.65192250 [3,] -0.9775006 -0.27591456 [4,] 1.2620527 0.62588452 [5,] -0.2773596 -0.05015695 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.24985550 0.5718944 [2,] -2.12437210 -0.0276265 [3,] 1.59765212 -1.1478050 [4,] 0.49155907 -2.0766429 [5,] 0.08025285 0.2934351 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.249855 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.249855 [2,] -2.124372 > > > > 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.5186906 0.03293482 0.4483203 -0.1500269 0.7265727 0.04376592 row1 -1.2293361 1.55508673 -0.2951558 1.7312420 1.6093368 -1.75514621 [,7] [,8] [,9] [,10] [,11] [,12] row3 1.30610456 -1.3086052 -0.5569887 -0.9182311 1.3137118 0.3133882 row1 -0.01615081 0.6295836 -0.4380605 -0.9671651 -0.7059735 -0.9657634 [,13] [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.2750028 -1.146006 0.1118774 -0.6414731 -1.7168310 0.9042027 0.9856751 row1 1.2142424 1.847451 -0.9671772 0.9612582 -0.6524275 -0.6306553 0.8082660 [,20] row3 -0.6644611 row1 0.6461304 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -1.266772 0.8679176 1.837244 0.8090365 -0.009688709 0.4873261 -1.87849 [,8] [,9] [,10] row2 -0.05056128 -0.9819725 -0.7861329 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 2.114234 0.1074194 -0.9685535 0.8852791 -1.278605 0.5766249 0.2636176 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.1339132 0.8043789 -0.8410992 0.004562963 -0.3373784 -1.349453 0.9291116 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.8248854 1.996199 -0.4632443 -0.9588268 -1.22754 1.108588 > > > 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: 0x000001fd1f4fab90> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab03c747cc" [2] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab04380e49" [3] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab074ae2bef" [4] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab04acb548a" [5] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab027c83251" [6] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab044dc79f6" [7] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab04ae72407" [8] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab01ec11e73" [9] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab092e1f39" [10] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab05f524989" [11] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab037d320d6" [12] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab05a1461b8" [13] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab040245686" [14] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab095d2e0f" [15] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BMaab06ac84ce1" > > > ### 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: 0x000001fd21cff950> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x000001fd21cff950> Warning message: In dir.create(new.directory) : 'E:\biocbuild\bbs-3.21-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x000001fd21cff950> > rowMedians(tmp) [1] 0.190151804 0.083565295 0.320457878 0.003617331 0.033035765 [6] -0.278669473 -0.069927647 -0.074680601 -0.049631163 -0.016006507 [11] -0.273325331 0.047211786 0.282322933 0.784278136 0.439653610 [16] -0.034980847 0.112192917 -0.418984350 -0.478448010 0.445783013 [21] -0.380827055 -0.231089960 0.940739729 -0.086402717 -0.076288337 [26] 0.313665110 -0.305785335 -0.058477938 -0.401002975 -0.486340401 [31] 0.116629781 -0.273013299 0.056371894 0.851930328 -0.507715133 [36] 0.030344222 -0.292748102 0.454941595 0.063064403 0.045797614 [41] 0.077273045 -0.087161036 0.390274831 -0.101900024 -0.047336143 [46] 0.396638937 -0.749375316 0.005422902 -0.580459749 0.672458752 [51] 0.085718442 -0.281351410 -0.179107206 0.523498920 -0.271772751 [56] 0.029077940 -0.162668260 0.411940984 0.191736172 0.526950766 [61] -0.303784214 -0.027977796 -0.504221202 0.178658432 -0.298367122 [66] 0.293171441 0.004189557 -0.093143575 -0.809028174 0.020371967 [71] 0.498765150 -0.275626718 0.175095843 -0.694032872 -0.208319061 [76] -0.009454697 -0.306127614 -0.098394649 0.221921526 -0.582089245 [81] 0.049788104 0.239161920 0.116487071 0.289524229 -0.346744203 [86] -0.021096232 0.377710136 0.129459167 -0.300401749 0.071445131 [91] -0.460649245 -0.294620516 -0.021433813 0.517612815 0.151541112 [96] -0.426076403 0.057458114 -0.228612289 -0.297926647 -0.150679101 [101] -0.426932184 -0.119875437 0.305979586 -0.043464998 0.604334262 [106] 0.636986648 0.263916153 0.340555264 0.756519442 0.310275228 [111] 0.657966989 0.304533931 0.044145600 0.353258323 0.559892554 [116] 0.224883527 -0.257341224 -0.014889787 -0.051144380 0.309689537 [121] -0.315248609 0.137828520 0.433270607 -0.252121040 0.053401217 [126] 0.117595736 -0.151610773 0.188244724 0.512559085 -0.062485274 [131] 0.244108445 -0.480224947 -0.098769966 -0.035924940 -0.144313869 [136] -0.077432802 -0.139116275 -0.011399338 -0.106201057 -0.041517180 [141] 0.315952651 0.189055685 0.147458463 -0.180733344 0.248790751 [146] -0.108678635 0.274055408 0.325461358 -0.065277397 -0.413379214 [151] 0.153487155 -0.419684027 0.098710130 -0.416504714 0.021339824 [156] -0.067349234 -0.143650396 -0.214659603 0.278015545 -0.118107798 [161] 0.089177738 -0.164177512 -0.161927922 0.121953086 0.115462897 [166] 0.050364174 -0.191702962 0.174429332 0.002835551 0.349091186 [171] -0.598491446 0.287545939 0.242841710 -0.133259420 0.272117254 [176] -0.305902874 -0.576484100 -0.292138004 0.071189960 0.366516648 [181] -0.393605553 -0.582463910 -0.414536804 -0.306247174 -0.163429557 [186] 0.723346440 0.044071332 0.205763273 -0.111600509 -0.211815198 [191] 0.551112059 0.055721249 -0.035814645 -0.103940709 -0.300100555 [196] -0.205396169 -0.488551680 -0.216188218 -0.267292546 0.502736801 [201] 0.208992902 -0.050353502 -0.270207082 -0.355889449 0.395439177 [206] 0.026467254 0.201876302 -0.007954156 -0.125523303 0.677695632 [211] -0.498832486 0.321699450 -0.214732673 0.201210363 0.078986429 [216] 0.111388754 0.155082458 -0.419652331 -0.193522296 0.424838258 [221] 0.094183536 0.295650718 0.150723411 -0.362427116 0.783869123 [226] 0.009646944 -0.014803944 0.089971750 0.183061240 0.293704831 > > proc.time() user system elapsed 3.26 14.45 134.23
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2025-03-01 r87860 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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: 0x0000021cb82f94d0> > .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: 0x0000021cb82f94d0> > .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: 0x0000021cb82f94d0> > .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: 0x0000021cb82f94d0> > 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: 0x0000021cb82f90b0> > .Call("R_bm_AddColumn",P) <pointer: 0x0000021cb82f90b0> > .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: 0x0000021cb82f90b0> > .Call("R_bm_AddColumn",P) <pointer: 0x0000021cb82f90b0> > .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: 0x0000021cb82f90b0> > 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: 0x0000021cb82f9110> > .Call("R_bm_AddColumn",P) <pointer: 0x0000021cb82f9110> > .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: 0x0000021cb82f9110> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x0000021cb82f9110> > .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: 0x0000021cb82f9110> > > .Call("R_bm_RowMode",P) <pointer: 0x0000021cb82f9110> > .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: 0x0000021cb82f9110> > > .Call("R_bm_ColMode",P) <pointer: 0x0000021cb82f9110> > .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: 0x0000021cb82f9110> > 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: 0x0000021cb82f9890> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x0000021cb82f9890> > .Call("R_bm_AddColumn",P) <pointer: 0x0000021cb82f9890> > .Call("R_bm_AddColumn",P) <pointer: 0x0000021cb82f9890> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile19d2049967802" "BufferedMatrixFile19d205b1683c" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile19d2049967802" "BufferedMatrixFile19d205b1683c" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x0000021cb82f9ef0> > .Call("R_bm_AddColumn",P) <pointer: 0x0000021cb82f9ef0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x0000021cb82f9ef0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x0000021cb82f9ef0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x0000021cb82f9ef0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x0000021cb82f9ef0> > .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: 0x0000021cb8fff7d0> > .Call("R_bm_AddColumn",P) <pointer: 0x0000021cb8fff7d0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x0000021cb8fff7d0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x0000021cb8fff7d0> > 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: 0x0000021cb8fffad0> > .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: 0x0000021cb8fffad0> > rm(P) > > proc.time() user system elapsed 0.35 0.14 1.29
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2025-03-01 r87860 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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.35 0.10 0.43