Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-06-19 12:02 -0400 (Thu, 19 Jun 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.2 LTS) | x86_64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4810 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.5.0 (2025-04-11 ucrt) -- "How About a Twenty-Six" | 4548 |
kjohnson3 | macOS 13.7.1 Ventura | arm64 | 4.5.0 Patched (2025-04-21 r88169) -- "How About a Twenty-Six" | 4528 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4493 |
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 250/2309 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.73.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.2 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino8 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.1 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
taishan | 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.73.0 |
Command: /home/biocbuild/bbs-3.22-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.22-bioc/R/site-library --timings BufferedMatrix_1.73.0.tar.gz |
StartedAt: 2025-06-18 21:22:25 -0400 (Wed, 18 Jun 2025) |
EndedAt: 2025-06-18 21:22:49 -0400 (Wed, 18 Jun 2025) |
EllapsedTime: 24.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.22-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.22-bioc/R/site-library --timings BufferedMatrix_1.73.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.5.0 (2025-04-11) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 * running under: Ubuntu 24.04.2 LTS * using session charset: UTF-8 * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.73.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... OK * used C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.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 loading without being on the library search path ... 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 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 re-building of vignette outputs ... OK * checking PDF version of manual ... OK * DONE Status: 2 NOTEs See ‘/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.22-bioc/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/bbs-3.22-bioc/R/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.73.0’ ** using staged installation ** libs using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’ gcc -std=gnu2x -I"/home/biocbuild/bbs-3.22-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -std=gnu2x -I"/home/biocbuild/bbs-3.22-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -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 -std=gnu2x -I"/home/biocbuild/bbs-3.22-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -std=gnu2x -I"/home/biocbuild/bbs-3.22-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c init_package.c -o init_package.o gcc -std=gnu2x -shared -L/home/biocbuild/bbs-3.22-bioc/R/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/bbs-3.22-bioc/R/lib -lR installing to /home/biocbuild/bbs-3.22-bioc/R/site-library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu 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.241 0.055 0.284
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu 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] "/home/biocbuild/bbs-3.22-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 478398 25.6 1047051 56 639600 34.2 Vcells 885190 6.8 8388608 64 2081375 15.9 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Wed Jun 18 21:22:40 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Wed Jun 18 21:22:40 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: 0x6188c9db9980> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Wed Jun 18 21:22:40 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Wed Jun 18 21:22:40 2025" > > ColMode(tmp2) <pointer: 0x6188c9db9980> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.1364556 -0.8193077 -0.1913709 0.91962482 [2,] -0.8467082 0.6672059 0.7461609 -1.04706912 [3,] 0.6849467 1.2669666 -0.2435542 -0.09574251 [4,] 0.6474048 -0.2770799 -0.9328906 0.23181399 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.1364556 0.8193077 0.1913709 0.91962482 [2,] 0.8467082 0.6672059 0.7461609 1.04706912 [3,] 0.6849467 1.2669666 0.2435542 0.09574251 [4,] 0.6474048 0.2770799 0.9328906 0.23181399 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 10.0068205 0.9051562 0.4374596 0.9589707 [2,] 0.9201675 0.8168267 0.8638060 1.0232640 [3,] 0.8276150 1.1255961 0.4935121 0.3094229 [4,] 0.8046147 0.5263838 0.9658626 0.4814707 > > 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: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 225.20466 34.87087 29.56597 35.50933 [2,] 35.04838 33.83547 34.38422 36.27971 [3,] 33.96110 37.52293 30.17868 28.18997 [4,] 33.69355 30.54092 35.59152 30.04652 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x6188ca746c70> > exp(tmp5) <pointer: 0x6188ca746c70> > log(tmp5,2) <pointer: 0x6188ca746c70> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 468.734 > Min(tmp5) [1] 55.41902 > mean(tmp5) [1] 73.34641 > Sum(tmp5) [1] 14669.28 > Var(tmp5) [1] 869.62 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.98918 68.97313 70.48877 66.40264 72.65542 73.04161 72.56807 73.25169 [9] 71.50742 72.58612 > rowSums(tmp5) [1] 1839.784 1379.463 1409.775 1328.053 1453.108 1460.832 1451.361 1465.034 [9] 1430.148 1451.722 > rowVars(tmp5) [1] 7979.21404 31.94248 59.38598 59.67946 98.70727 78.04329 [7] 102.84924 96.79368 65.89316 84.87412 > rowSd(tmp5) [1] 89.326447 5.651768 7.706230 7.725249 9.935153 8.834211 10.141461 [8] 9.838378 8.117460 9.212715 > rowMax(tmp5) [1] 468.73399 76.27722 88.42431 80.54912 88.23328 89.72674 102.07315 [8] 93.17232 83.27676 88.69820 > rowMin(tmp5) [1] 55.58389 55.97359 58.67373 55.64809 56.44821 57.85374 55.50187 55.98158 [9] 55.41902 56.77317 > > colMeans(tmp5) [1] 108.74532 74.05740 71.87846 68.20347 71.19919 67.38705 74.38583 [8] 74.97447 67.92372 70.77802 67.42674 72.85163 70.90366 72.83510 [15] 69.30223 80.30026 69.93183 73.57614 71.54835 68.71929 > colSums(tmp5) [1] 1087.4532 740.5740 718.7846 682.0347 711.9919 673.8705 743.8583 [8] 749.7447 679.2372 707.7802 674.2674 728.5163 709.0366 728.3510 [15] 693.0223 803.0026 699.3183 735.7614 715.4835 687.1929 > colVars(tmp5) [1] 16040.16820 58.61071 77.34202 86.09895 66.73703 27.45659 [7] 13.25188 188.96345 61.26275 80.35501 87.26295 20.93909 [13] 93.22365 52.32271 29.78319 168.99318 95.54205 157.09355 [19] 88.48396 62.55901 > colSd(tmp5) [1] 126.649786 7.655763 8.794431 9.278952 8.169273 5.239903 [7] 3.640313 13.746398 7.827053 8.964096 9.341464 4.575925 [13] 9.655240 7.233444 5.457398 12.999738 9.774561 12.533697 [19] 9.406591 7.909425 > colMax(tmp5) [1] 468.73399 86.75494 81.60002 82.68860 83.28181 75.02489 81.81296 [8] 102.07315 80.54912 82.91767 82.75131 79.29453 85.92212 82.10271 [15] 76.83754 100.96132 84.46762 91.90903 88.42431 80.35933 > colMin(tmp5) [1] 55.50187 63.56692 56.82124 55.41902 62.89077 61.33075 70.18261 57.88274 [9] 56.77317 59.44019 55.58389 65.39516 58.42496 60.75467 57.29363 61.13354 [17] 55.64809 55.97359 56.56559 57.85374 > > > ### 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] 91.98918 68.97313 70.48877 66.40264 NA 73.04161 72.56807 73.25169 [9] 71.50742 72.58612 > rowSums(tmp5) [1] 1839.784 1379.463 1409.775 1328.053 NA 1460.832 1451.361 1465.034 [9] 1430.148 1451.722 > rowVars(tmp5) [1] 7979.21404 31.94248 59.38598 59.67946 89.52895 78.04329 [7] 102.84924 96.79368 65.89316 84.87412 > rowSd(tmp5) [1] 89.326447 5.651768 7.706230 7.725249 9.461974 8.834211 10.141461 [8] 9.838378 8.117460 9.212715 > rowMax(tmp5) [1] 468.73399 76.27722 88.42431 80.54912 NA 89.72674 102.07315 [8] 93.17232 83.27676 88.69820 > rowMin(tmp5) [1] 55.58389 55.97359 58.67373 55.64809 NA 57.85374 55.50187 55.98158 [9] 55.41902 56.77317 > > colMeans(tmp5) [1] 108.74532 74.05740 NA 68.20347 71.19919 67.38705 74.38583 [8] 74.97447 67.92372 70.77802 67.42674 72.85163 70.90366 72.83510 [15] 69.30223 80.30026 69.93183 73.57614 71.54835 68.71929 > colSums(tmp5) [1] 1087.4532 740.5740 NA 682.0347 711.9919 673.8705 743.8583 [8] 749.7447 679.2372 707.7802 674.2674 728.5163 709.0366 728.3510 [15] 693.0223 803.0026 699.3183 735.7614 715.4835 687.1929 > colVars(tmp5) [1] 16040.16820 58.61071 NA 86.09895 66.73703 27.45659 [7] 13.25188 188.96345 61.26275 80.35501 87.26295 20.93909 [13] 93.22365 52.32271 29.78319 168.99318 95.54205 157.09355 [19] 88.48396 62.55901 > colSd(tmp5) [1] 126.649786 7.655763 NA 9.278952 8.169273 5.239903 [7] 3.640313 13.746398 7.827053 8.964096 9.341464 4.575925 [13] 9.655240 7.233444 5.457398 12.999738 9.774561 12.533697 [19] 9.406591 7.909425 > colMax(tmp5) [1] 468.73399 86.75494 NA 82.68860 83.28181 75.02489 81.81296 [8] 102.07315 80.54912 82.91767 82.75131 79.29453 85.92212 82.10271 [15] 76.83754 100.96132 84.46762 91.90903 88.42431 80.35933 > colMin(tmp5) [1] 55.50187 63.56692 NA 55.41902 62.89077 61.33075 70.18261 57.88274 [9] 56.77317 59.44019 55.58389 65.39516 58.42496 60.75467 57.29363 61.13354 [17] 55.64809 55.97359 56.56559 57.85374 > > Max(tmp5,na.rm=TRUE) [1] 468.734 > Min(tmp5,na.rm=TRUE) [1] 55.41902 > mean(tmp5,na.rm=TRUE) [1] 73.42945 > Sum(tmp5,na.rm=TRUE) [1] 14612.46 > Var(tmp5,na.rm=TRUE) [1] 872.6259 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.98918 68.97313 70.48877 66.40264 73.48880 73.04161 72.56807 73.25169 [9] 71.50742 72.58612 > rowSums(tmp5,na.rm=TRUE) [1] 1839.784 1379.463 1409.775 1328.053 1396.287 1460.832 1451.361 1465.034 [9] 1430.148 1451.722 > rowVars(tmp5,na.rm=TRUE) [1] 7979.21404 31.94248 59.38598 59.67946 89.52895 78.04329 [7] 102.84924 96.79368 65.89316 84.87412 > rowSd(tmp5,na.rm=TRUE) [1] 89.326447 5.651768 7.706230 7.725249 9.461974 8.834211 10.141461 [8] 9.838378 8.117460 9.212715 > rowMax(tmp5,na.rm=TRUE) [1] 468.73399 76.27722 88.42431 80.54912 88.23328 89.72674 102.07315 [8] 93.17232 83.27676 88.69820 > rowMin(tmp5,na.rm=TRUE) [1] 55.58389 55.97359 58.67373 55.64809 56.44821 57.85374 55.50187 55.98158 [9] 55.41902 56.77317 > > colMeans(tmp5,na.rm=TRUE) [1] 108.74532 74.05740 73.55148 68.20347 71.19919 67.38705 74.38583 [8] 74.97447 67.92372 70.77802 67.42674 72.85163 70.90366 72.83510 [15] 69.30223 80.30026 69.93183 73.57614 71.54835 68.71929 > colSums(tmp5,na.rm=TRUE) [1] 1087.4532 740.5740 661.9633 682.0347 711.9919 673.8705 743.8583 [8] 749.7447 679.2372 707.7802 674.2674 728.5163 709.0366 728.3510 [15] 693.0223 803.0026 699.3183 735.7614 715.4835 687.1929 > colVars(tmp5,na.rm=TRUE) [1] 16040.16820 58.61071 55.52092 86.09895 66.73703 27.45659 [7] 13.25188 188.96345 61.26275 80.35501 87.26295 20.93909 [13] 93.22365 52.32271 29.78319 168.99318 95.54205 157.09355 [19] 88.48396 62.55901 > colSd(tmp5,na.rm=TRUE) [1] 126.649786 7.655763 7.451236 9.278952 8.169273 5.239903 [7] 3.640313 13.746398 7.827053 8.964096 9.341464 4.575925 [13] 9.655240 7.233444 5.457398 12.999738 9.774561 12.533697 [19] 9.406591 7.909425 > colMax(tmp5,na.rm=TRUE) [1] 468.73399 86.75494 81.60002 82.68860 83.28181 75.02489 81.81296 [8] 102.07315 80.54912 82.91767 82.75131 79.29453 85.92212 82.10271 [15] 76.83754 100.96132 84.46762 91.90903 88.42431 80.35933 > colMin(tmp5,na.rm=TRUE) [1] 55.50187 63.56692 61.53769 55.41902 62.89077 61.33075 70.18261 57.88274 [9] 56.77317 59.44019 55.58389 65.39516 58.42496 60.75467 57.29363 61.13354 [17] 55.64809 55.97359 56.56559 57.85374 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.98918 68.97313 70.48877 66.40264 NaN 73.04161 72.56807 73.25169 [9] 71.50742 72.58612 > rowSums(tmp5,na.rm=TRUE) [1] 1839.784 1379.463 1409.775 1328.053 0.000 1460.832 1451.361 1465.034 [9] 1430.148 1451.722 > rowVars(tmp5,na.rm=TRUE) [1] 7979.21404 31.94248 59.38598 59.67946 NA 78.04329 [7] 102.84924 96.79368 65.89316 84.87412 > rowSd(tmp5,na.rm=TRUE) [1] 89.326447 5.651768 7.706230 7.725249 NA 8.834211 10.141461 [8] 9.838378 8.117460 9.212715 > rowMax(tmp5,na.rm=TRUE) [1] 468.73399 76.27722 88.42431 80.54912 NA 89.72674 102.07315 [8] 93.17232 83.27676 88.69820 > rowMin(tmp5,na.rm=TRUE) [1] 55.58389 55.97359 58.67373 55.64809 NA 57.85374 55.50187 55.98158 [9] 55.41902 56.77317 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 113.20250 73.01173 NaN 69.50961 71.96542 67.98803 74.59813 [8] 74.73254 68.28410 71.85494 65.72401 72.80956 69.24977 72.41892 [15] 68.69038 79.99790 68.31675 71.94757 71.62864 68.98168 > colSums(tmp5,na.rm=TRUE) [1] 1018.8225 657.1056 0.0000 625.5864 647.6888 611.8923 671.3832 [8] 672.5929 614.5569 646.6945 591.5161 655.2861 623.2479 651.7703 [15] 618.2135 719.9811 614.8507 647.5281 644.6577 620.8351 > colVars(tmp5,na.rm=TRUE) [1] 17821.69212 53.63608 NA 77.66882 68.47416 26.82533 [7] 14.40130 211.92541 67.45951 77.35190 65.55378 23.53658 [13] 74.10383 56.91444 29.29458 189.08884 78.13908 146.89249 [19] 99.47192 69.60433 > colSd(tmp5,na.rm=TRUE) [1] 133.497911 7.323666 NA 8.812992 8.274911 5.179317 [7] 3.794904 14.557658 8.213374 8.794993 8.096529 4.851451 [13] 8.608358 7.544166 5.412446 13.750958 8.839631 12.119921 [19] 9.973561 8.342921 > colMax(tmp5,na.rm=TRUE) [1] 468.73399 86.75494 -Inf 82.68860 83.28181 75.02489 81.81296 [8] 102.07315 80.54912 82.91767 76.88477 79.29453 85.92212 82.10271 [15] 76.83754 100.96132 81.07741 91.90903 88.42431 80.35933 > colMin(tmp5,na.rm=TRUE) [1] 55.50187 63.56692 Inf 55.41902 62.89077 61.33075 70.18261 57.88274 [9] 56.77317 59.44019 55.58389 65.39516 58.42496 60.75467 57.29363 61.13354 [17] 55.64809 55.97359 56.56559 57.85374 > > > > > 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] 186.3217 193.8680 136.2211 222.8325 374.7474 271.5258 271.5755 134.4860 [9] 195.2784 169.2374 > apply(copymatrix,1,var,na.rm=TRUE) [1] 186.3217 193.8680 136.2211 222.8325 374.7474 271.5258 271.5755 134.4860 [9] 195.2784 169.2374 > > > > 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.705303e-13 5.684342e-14 1.136868e-13 5.684342e-14 1.421085e-13 [6] -1.421085e-14 1.421085e-13 -2.842171e-14 2.842171e-14 2.842171e-14 [11] -2.273737e-13 -2.842171e-14 1.421085e-14 -5.684342e-14 5.684342e-14 [16] 0.000000e+00 -8.526513e-14 1.421085e-13 0.000000e+00 -5.684342e-14 > > > > > > > > > > > ## 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 7 6 18 5 10 5 10 6 18 7 17 2 6 8 5 6 7 5 14 10 17 2 15 2 12 7 8 7 13 1 19 8 15 8 7 6 16 7 13 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.644557 > Min(tmp) [1] -3.147482 > mean(tmp) [1] -0.1096978 > Sum(tmp) [1] -10.96978 > Var(tmp) [1] 1.112596 > > rowMeans(tmp) [1] -0.1096978 > rowSums(tmp) [1] -10.96978 > rowVars(tmp) [1] 1.112596 > rowSd(tmp) [1] 1.054797 > rowMax(tmp) [1] 2.644557 > rowMin(tmp) [1] -3.147482 > > colMeans(tmp) [1] 1.025158471 -0.274989688 0.162035031 1.037535968 0.404158296 [6] -1.576955942 0.430562697 0.410746836 1.262634012 -1.140641652 [11] 1.639940096 0.071512133 -0.473524395 -0.959939740 -0.925613996 [16] 0.935656083 -2.306242432 -0.189670751 -1.270271327 -0.373457574 [21] 0.177405588 -0.837689093 -1.560616357 -1.305685158 -1.100140160 [26] 0.906586898 -0.433550333 -0.330470766 -0.190769139 0.363019368 [31] -3.147481971 -0.454069672 -0.960599862 0.925545490 -0.270295445 [36] -1.115481958 1.233435491 -1.025024665 0.149783481 0.512033908 [41] -0.339606119 -0.150936921 0.096653085 0.785531101 -0.321763305 [46] -2.035298529 0.630448750 -0.509638635 -1.432423105 -1.237936332 [51] 0.004169841 -2.605131044 -0.997696002 1.049339359 1.148887716 [56] 1.491537646 1.714342166 0.050405458 0.734753921 -0.314488528 [61] 2.644557230 -0.356892742 -0.374746953 -0.225859170 0.262383425 [66] -0.652720598 -0.172657924 0.655054911 1.469104463 0.653703769 [71] 1.204240637 0.343457230 0.036129850 -1.490045715 0.213447695 [76] 0.638145936 1.194680260 -0.257596889 0.267247173 -0.012072721 [81] -0.355928061 -0.407305937 -2.035186973 1.467703105 -0.845046858 [86] 0.600094789 -1.573984456 -0.723977019 -1.264843806 -0.998405226 [91] -1.040523402 0.199588212 2.326349980 1.541959134 -0.075151510 [96] -1.149335930 0.306119305 0.473790852 0.441357496 -1.082331211 > colSums(tmp) [1] 1.025158471 -0.274989688 0.162035031 1.037535968 0.404158296 [6] -1.576955942 0.430562697 0.410746836 1.262634012 -1.140641652 [11] 1.639940096 0.071512133 -0.473524395 -0.959939740 -0.925613996 [16] 0.935656083 -2.306242432 -0.189670751 -1.270271327 -0.373457574 [21] 0.177405588 -0.837689093 -1.560616357 -1.305685158 -1.100140160 [26] 0.906586898 -0.433550333 -0.330470766 -0.190769139 0.363019368 [31] -3.147481971 -0.454069672 -0.960599862 0.925545490 -0.270295445 [36] -1.115481958 1.233435491 -1.025024665 0.149783481 0.512033908 [41] -0.339606119 -0.150936921 0.096653085 0.785531101 -0.321763305 [46] -2.035298529 0.630448750 -0.509638635 -1.432423105 -1.237936332 [51] 0.004169841 -2.605131044 -0.997696002 1.049339359 1.148887716 [56] 1.491537646 1.714342166 0.050405458 0.734753921 -0.314488528 [61] 2.644557230 -0.356892742 -0.374746953 -0.225859170 0.262383425 [66] -0.652720598 -0.172657924 0.655054911 1.469104463 0.653703769 [71] 1.204240637 0.343457230 0.036129850 -1.490045715 0.213447695 [76] 0.638145936 1.194680260 -0.257596889 0.267247173 -0.012072721 [81] -0.355928061 -0.407305937 -2.035186973 1.467703105 -0.845046858 [86] 0.600094789 -1.573984456 -0.723977019 -1.264843806 -0.998405226 [91] -1.040523402 0.199588212 2.326349980 1.541959134 -0.075151510 [96] -1.149335930 0.306119305 0.473790852 0.441357496 -1.082331211 > 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.025158471 -0.274989688 0.162035031 1.037535968 0.404158296 [6] -1.576955942 0.430562697 0.410746836 1.262634012 -1.140641652 [11] 1.639940096 0.071512133 -0.473524395 -0.959939740 -0.925613996 [16] 0.935656083 -2.306242432 -0.189670751 -1.270271327 -0.373457574 [21] 0.177405588 -0.837689093 -1.560616357 -1.305685158 -1.100140160 [26] 0.906586898 -0.433550333 -0.330470766 -0.190769139 0.363019368 [31] -3.147481971 -0.454069672 -0.960599862 0.925545490 -0.270295445 [36] -1.115481958 1.233435491 -1.025024665 0.149783481 0.512033908 [41] -0.339606119 -0.150936921 0.096653085 0.785531101 -0.321763305 [46] -2.035298529 0.630448750 -0.509638635 -1.432423105 -1.237936332 [51] 0.004169841 -2.605131044 -0.997696002 1.049339359 1.148887716 [56] 1.491537646 1.714342166 0.050405458 0.734753921 -0.314488528 [61] 2.644557230 -0.356892742 -0.374746953 -0.225859170 0.262383425 [66] -0.652720598 -0.172657924 0.655054911 1.469104463 0.653703769 [71] 1.204240637 0.343457230 0.036129850 -1.490045715 0.213447695 [76] 0.638145936 1.194680260 -0.257596889 0.267247173 -0.012072721 [81] -0.355928061 -0.407305937 -2.035186973 1.467703105 -0.845046858 [86] 0.600094789 -1.573984456 -0.723977019 -1.264843806 -0.998405226 [91] -1.040523402 0.199588212 2.326349980 1.541959134 -0.075151510 [96] -1.149335930 0.306119305 0.473790852 0.441357496 -1.082331211 > colMin(tmp) [1] 1.025158471 -0.274989688 0.162035031 1.037535968 0.404158296 [6] -1.576955942 0.430562697 0.410746836 1.262634012 -1.140641652 [11] 1.639940096 0.071512133 -0.473524395 -0.959939740 -0.925613996 [16] 0.935656083 -2.306242432 -0.189670751 -1.270271327 -0.373457574 [21] 0.177405588 -0.837689093 -1.560616357 -1.305685158 -1.100140160 [26] 0.906586898 -0.433550333 -0.330470766 -0.190769139 0.363019368 [31] -3.147481971 -0.454069672 -0.960599862 0.925545490 -0.270295445 [36] -1.115481958 1.233435491 -1.025024665 0.149783481 0.512033908 [41] -0.339606119 -0.150936921 0.096653085 0.785531101 -0.321763305 [46] -2.035298529 0.630448750 -0.509638635 -1.432423105 -1.237936332 [51] 0.004169841 -2.605131044 -0.997696002 1.049339359 1.148887716 [56] 1.491537646 1.714342166 0.050405458 0.734753921 -0.314488528 [61] 2.644557230 -0.356892742 -0.374746953 -0.225859170 0.262383425 [66] -0.652720598 -0.172657924 0.655054911 1.469104463 0.653703769 [71] 1.204240637 0.343457230 0.036129850 -1.490045715 0.213447695 [76] 0.638145936 1.194680260 -0.257596889 0.267247173 -0.012072721 [81] -0.355928061 -0.407305937 -2.035186973 1.467703105 -0.845046858 [86] 0.600094789 -1.573984456 -0.723977019 -1.264843806 -0.998405226 [91] -1.040523402 0.199588212 2.326349980 1.541959134 -0.075151510 [96] -1.149335930 0.306119305 0.473790852 0.441357496 -1.082331211 > colMedians(tmp) [1] 1.025158471 -0.274989688 0.162035031 1.037535968 0.404158296 [6] -1.576955942 0.430562697 0.410746836 1.262634012 -1.140641652 [11] 1.639940096 0.071512133 -0.473524395 -0.959939740 -0.925613996 [16] 0.935656083 -2.306242432 -0.189670751 -1.270271327 -0.373457574 [21] 0.177405588 -0.837689093 -1.560616357 -1.305685158 -1.100140160 [26] 0.906586898 -0.433550333 -0.330470766 -0.190769139 0.363019368 [31] -3.147481971 -0.454069672 -0.960599862 0.925545490 -0.270295445 [36] -1.115481958 1.233435491 -1.025024665 0.149783481 0.512033908 [41] -0.339606119 -0.150936921 0.096653085 0.785531101 -0.321763305 [46] -2.035298529 0.630448750 -0.509638635 -1.432423105 -1.237936332 [51] 0.004169841 -2.605131044 -0.997696002 1.049339359 1.148887716 [56] 1.491537646 1.714342166 0.050405458 0.734753921 -0.314488528 [61] 2.644557230 -0.356892742 -0.374746953 -0.225859170 0.262383425 [66] -0.652720598 -0.172657924 0.655054911 1.469104463 0.653703769 [71] 1.204240637 0.343457230 0.036129850 -1.490045715 0.213447695 [76] 0.638145936 1.194680260 -0.257596889 0.267247173 -0.012072721 [81] -0.355928061 -0.407305937 -2.035186973 1.467703105 -0.845046858 [86] 0.600094789 -1.573984456 -0.723977019 -1.264843806 -0.998405226 [91] -1.040523402 0.199588212 2.326349980 1.541959134 -0.075151510 [96] -1.149335930 0.306119305 0.473790852 0.441357496 -1.082331211 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.025158 -0.2749897 0.162035 1.037536 0.4041583 -1.576956 0.4305627 [2,] 1.025158 -0.2749897 0.162035 1.037536 0.4041583 -1.576956 0.4305627 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.4107468 1.262634 -1.140642 1.63994 0.07151213 -0.4735244 -0.9599397 [2,] 0.4107468 1.262634 -1.140642 1.63994 0.07151213 -0.4735244 -0.9599397 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.925614 0.9356561 -2.306242 -0.1896708 -1.270271 -0.3734576 0.1774056 [2,] -0.925614 0.9356561 -2.306242 -0.1896708 -1.270271 -0.3734576 0.1774056 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.8376891 -1.560616 -1.305685 -1.10014 0.9065869 -0.4335503 -0.3304708 [2,] -0.8376891 -1.560616 -1.305685 -1.10014 0.9065869 -0.4335503 -0.3304708 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.1907691 0.3630194 -3.147482 -0.4540697 -0.9605999 0.9255455 -0.2702954 [2,] -0.1907691 0.3630194 -3.147482 -0.4540697 -0.9605999 0.9255455 -0.2702954 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.115482 1.233435 -1.025025 0.1497835 0.5120339 -0.3396061 -0.1509369 [2,] -1.115482 1.233435 -1.025025 0.1497835 0.5120339 -0.3396061 -0.1509369 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.09665308 0.7855311 -0.3217633 -2.035299 0.6304488 -0.5096386 -1.432423 [2,] 0.09665308 0.7855311 -0.3217633 -2.035299 0.6304488 -0.5096386 -1.432423 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -1.237936 0.004169841 -2.605131 -0.997696 1.049339 1.148888 1.491538 [2,] -1.237936 0.004169841 -2.605131 -0.997696 1.049339 1.148888 1.491538 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 1.714342 0.05040546 0.7347539 -0.3144885 2.644557 -0.3568927 -0.374747 [2,] 1.714342 0.05040546 0.7347539 -0.3144885 2.644557 -0.3568927 -0.374747 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.2258592 0.2623834 -0.6527206 -0.1726579 0.6550549 1.469104 0.6537038 [2,] -0.2258592 0.2623834 -0.6527206 -0.1726579 0.6550549 1.469104 0.6537038 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 1.204241 0.3434572 0.03612985 -1.490046 0.2134477 0.6381459 1.19468 [2,] 1.204241 0.3434572 0.03612985 -1.490046 0.2134477 0.6381459 1.19468 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.2575969 0.2672472 -0.01207272 -0.3559281 -0.4073059 -2.035187 1.467703 [2,] -0.2575969 0.2672472 -0.01207272 -0.3559281 -0.4073059 -2.035187 1.467703 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.8450469 0.6000948 -1.573984 -0.723977 -1.264844 -0.9984052 -1.040523 [2,] -0.8450469 0.6000948 -1.573984 -0.723977 -1.264844 -0.9984052 -1.040523 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.1995882 2.32635 1.541959 -0.07515151 -1.149336 0.3061193 0.4737909 [2,] 0.1995882 2.32635 1.541959 -0.07515151 -1.149336 0.3061193 0.4737909 [,99] [,100] [1,] 0.4413575 -1.082331 [2,] 0.4413575 -1.082331 > > > Max(tmp2) [1] 2.570163 > Min(tmp2) [1] -2.42882 > mean(tmp2) [1] -0.06602531 > Sum(tmp2) [1] -6.602531 > Var(tmp2) [1] 1.344735 > > rowMeans(tmp2) [1] 1.90697014 -1.00298513 -0.27431612 0.51721252 2.11765902 -1.12945377 [7] 0.65697263 -0.33485613 -1.13321386 -1.08138064 -0.90167210 -0.81669345 [13] 2.52480170 0.92463092 -0.35505501 -0.51145614 1.79707188 2.10317630 [19] 1.01405797 -1.09663305 -0.07487612 -0.08715491 0.95819788 0.48523964 [25] 1.72226360 0.18998874 -1.61352255 -1.02518814 -2.35614740 1.55944736 [31] 0.30804916 0.74497906 -1.78438135 -0.73341146 1.65891511 -0.70539696 [37] 1.43675182 0.51228683 -2.42881961 0.48874614 0.14637767 -1.02987994 [43] -1.55033577 0.47349744 -0.62493793 -1.27539068 0.07834964 1.19012540 [49] 1.28629154 -2.13873759 0.32016873 -0.28889355 0.34178644 0.74169600 [55] -0.88373482 -0.48522692 0.10312700 -1.19730553 2.57016281 -0.58168515 [61] 1.21695896 -0.79798252 -0.29557330 1.45916561 -0.59625575 -0.70156127 [67] -0.35763652 -1.19323196 -0.06128091 -1.34244530 0.66848265 0.37415154 [73] -1.20076419 -0.27728375 -0.78430659 1.64746117 0.36826741 1.17827812 [79] -1.12284055 -0.56333322 0.77661676 0.23448831 -1.94847013 0.66192014 [85] -1.16144680 0.13715763 1.38404966 -0.52181019 1.60256670 -1.26272580 [91] 0.79979792 -1.92776677 -1.16608548 -1.67320164 -0.56773498 -1.28264551 [97] -0.78356010 -1.09325600 1.77701866 0.41802746 > rowSums(tmp2) [1] 1.90697014 -1.00298513 -0.27431612 0.51721252 2.11765902 -1.12945377 [7] 0.65697263 -0.33485613 -1.13321386 -1.08138064 -0.90167210 -0.81669345 [13] 2.52480170 0.92463092 -0.35505501 -0.51145614 1.79707188 2.10317630 [19] 1.01405797 -1.09663305 -0.07487612 -0.08715491 0.95819788 0.48523964 [25] 1.72226360 0.18998874 -1.61352255 -1.02518814 -2.35614740 1.55944736 [31] 0.30804916 0.74497906 -1.78438135 -0.73341146 1.65891511 -0.70539696 [37] 1.43675182 0.51228683 -2.42881961 0.48874614 0.14637767 -1.02987994 [43] -1.55033577 0.47349744 -0.62493793 -1.27539068 0.07834964 1.19012540 [49] 1.28629154 -2.13873759 0.32016873 -0.28889355 0.34178644 0.74169600 [55] -0.88373482 -0.48522692 0.10312700 -1.19730553 2.57016281 -0.58168515 [61] 1.21695896 -0.79798252 -0.29557330 1.45916561 -0.59625575 -0.70156127 [67] -0.35763652 -1.19323196 -0.06128091 -1.34244530 0.66848265 0.37415154 [73] -1.20076419 -0.27728375 -0.78430659 1.64746117 0.36826741 1.17827812 [79] -1.12284055 -0.56333322 0.77661676 0.23448831 -1.94847013 0.66192014 [85] -1.16144680 0.13715763 1.38404966 -0.52181019 1.60256670 -1.26272580 [91] 0.79979792 -1.92776677 -1.16608548 -1.67320164 -0.56773498 -1.28264551 [97] -0.78356010 -1.09325600 1.77701866 0.41802746 > 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.90697014 -1.00298513 -0.27431612 0.51721252 2.11765902 -1.12945377 [7] 0.65697263 -0.33485613 -1.13321386 -1.08138064 -0.90167210 -0.81669345 [13] 2.52480170 0.92463092 -0.35505501 -0.51145614 1.79707188 2.10317630 [19] 1.01405797 -1.09663305 -0.07487612 -0.08715491 0.95819788 0.48523964 [25] 1.72226360 0.18998874 -1.61352255 -1.02518814 -2.35614740 1.55944736 [31] 0.30804916 0.74497906 -1.78438135 -0.73341146 1.65891511 -0.70539696 [37] 1.43675182 0.51228683 -2.42881961 0.48874614 0.14637767 -1.02987994 [43] -1.55033577 0.47349744 -0.62493793 -1.27539068 0.07834964 1.19012540 [49] 1.28629154 -2.13873759 0.32016873 -0.28889355 0.34178644 0.74169600 [55] -0.88373482 -0.48522692 0.10312700 -1.19730553 2.57016281 -0.58168515 [61] 1.21695896 -0.79798252 -0.29557330 1.45916561 -0.59625575 -0.70156127 [67] -0.35763652 -1.19323196 -0.06128091 -1.34244530 0.66848265 0.37415154 [73] -1.20076419 -0.27728375 -0.78430659 1.64746117 0.36826741 1.17827812 [79] -1.12284055 -0.56333322 0.77661676 0.23448831 -1.94847013 0.66192014 [85] -1.16144680 0.13715763 1.38404966 -0.52181019 1.60256670 -1.26272580 [91] 0.79979792 -1.92776677 -1.16608548 -1.67320164 -0.56773498 -1.28264551 [97] -0.78356010 -1.09325600 1.77701866 0.41802746 > rowMin(tmp2) [1] 1.90697014 -1.00298513 -0.27431612 0.51721252 2.11765902 -1.12945377 [7] 0.65697263 -0.33485613 -1.13321386 -1.08138064 -0.90167210 -0.81669345 [13] 2.52480170 0.92463092 -0.35505501 -0.51145614 1.79707188 2.10317630 [19] 1.01405797 -1.09663305 -0.07487612 -0.08715491 0.95819788 0.48523964 [25] 1.72226360 0.18998874 -1.61352255 -1.02518814 -2.35614740 1.55944736 [31] 0.30804916 0.74497906 -1.78438135 -0.73341146 1.65891511 -0.70539696 [37] 1.43675182 0.51228683 -2.42881961 0.48874614 0.14637767 -1.02987994 [43] -1.55033577 0.47349744 -0.62493793 -1.27539068 0.07834964 1.19012540 [49] 1.28629154 -2.13873759 0.32016873 -0.28889355 0.34178644 0.74169600 [55] -0.88373482 -0.48522692 0.10312700 -1.19730553 2.57016281 -0.58168515 [61] 1.21695896 -0.79798252 -0.29557330 1.45916561 -0.59625575 -0.70156127 [67] -0.35763652 -1.19323196 -0.06128091 -1.34244530 0.66848265 0.37415154 [73] -1.20076419 -0.27728375 -0.78430659 1.64746117 0.36826741 1.17827812 [79] -1.12284055 -0.56333322 0.77661676 0.23448831 -1.94847013 0.66192014 [85] -1.16144680 0.13715763 1.38404966 -0.52181019 1.60256670 -1.26272580 [91] 0.79979792 -1.92776677 -1.16608548 -1.67320164 -0.56773498 -1.28264551 [97] -0.78356010 -1.09325600 1.77701866 0.41802746 > > colMeans(tmp2) [1] -0.06602531 > colSums(tmp2) [1] -6.602531 > colVars(tmp2) [1] 1.344735 > colSd(tmp2) [1] 1.159627 > colMax(tmp2) [1] 2.570163 > colMin(tmp2) [1] -2.42882 > colMedians(tmp2) [1] -0.2757999 > colRanges(tmp2) [,1] [1,] -2.428820 [2,] 2.570163 > > 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] -1.5317444 1.4300665 -1.7657100 -3.1550111 0.9798977 -0.4724506 [7] 8.4276389 1.5889783 -2.9940460 -11.0133856 > colApply(tmp,quantile)[,1] [,1] [1,] -1.52271242 [2,] -0.97852784 [3,] -0.56789424 [4,] -0.02812514 [5,] 2.11641030 > > rowApply(tmp,sum) [1] -3.421571 1.275050 3.402209 1.740861 -0.975261 -1.738850 -1.961762 [8] -3.056020 -5.790843 2.020420 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 10 1 10 2 4 4 4 4 7 3 [2,] 6 9 2 6 8 3 7 9 2 9 [3,] 2 3 4 5 6 8 9 2 3 10 [4,] 8 6 9 4 3 5 1 5 1 8 [5,] 4 4 7 8 5 10 6 1 9 5 [6,] 7 2 8 3 10 7 5 8 4 2 [7,] 5 5 5 10 9 6 10 10 10 7 [8,] 3 10 6 7 1 2 8 6 8 6 [9,] 9 8 1 9 7 1 3 7 5 4 [10,] 1 7 3 1 2 9 2 3 6 1 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -1.8202586 -0.6885733 -1.6802166 -2.8157283 -4.0609189 -5.2833732 [7] -2.3309062 -2.6780030 3.4367069 -0.8767649 2.7499418 2.4597588 [13] 4.6758779 0.7899661 3.2702922 -1.8530916 1.0789911 -1.5483196 [19] -0.1992999 -0.1199425 > colApply(tmp,quantile)[,1] [,1] [1,] -0.849518208 [2,] -0.602114696 [3,] -0.486250637 [4,] -0.009965363 [5,] 0.127590296 > > rowApply(tmp,sum) [1] 4.5397009 -6.0327335 -12.7449613 5.9002183 0.8439138 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 4 9 15 3 11 [2,] 7 13 16 17 1 [3,] 1 11 14 14 6 [4,] 6 8 1 18 4 [5,] 5 2 2 4 12 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.849518208 -0.2951939 -1.47126265 -0.3363550 -0.5858370 0.3068689 [2,] -0.486250637 -0.1982434 -0.37399342 -0.8143025 -1.5330443 -1.5949188 [3,] 0.127590296 0.2298660 -0.05031565 -2.4792254 -1.9507177 -0.8695169 [4,] -0.602114696 1.4972876 0.66125016 1.6514752 -0.5944592 -1.3317796 [5,] -0.009965363 -1.9222897 -0.44589501 -0.8373206 0.6031393 -1.7940269 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.2067084 -1.30285311 0.5947542 1.1914697 -0.8741069 0.7355788 [2,] -0.8420862 -0.07732455 -0.8505120 -1.2392668 2.2697455 1.1449440 [3,] -1.1912290 -1.65204302 0.5664803 -1.2659230 1.0409977 -1.5899424 [4,] 0.2905106 0.74378887 1.8076605 -0.6215937 -0.4399371 1.0793177 [5,] -0.3813932 -0.38957117 1.3183238 1.0585488 0.7532426 1.0898607 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.8345856 1.6218622 1.1988687 -0.20712450 1.11878116 -0.13748862 [2,] 0.4487624 0.2439258 0.3482513 -0.48312506 -0.24775678 0.27847569 [3,] 0.9401348 -0.5031070 -0.8234373 -1.00787319 -0.83658326 -0.84954734 [4,] 0.6600024 -0.3249920 1.7801407 0.05268968 0.03100613 -0.02992454 [5,] 0.7923927 -0.2477229 0.7664688 -0.20765850 1.01354384 -0.80983480 [,19] [,20] [1,] 1.7986043 0.40477557 [2,] -1.0814551 -0.94455880 [3,] 0.5672017 -1.14777098 [4,] -0.4261614 0.01605104 [5,] -1.0574894 1.55156069 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-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: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 653 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 566 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-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.257217 0.3981155 1.700367 -0.3632213 1.874493 0.8342563 -0.8104846 col8 col9 col10 col11 col12 col13 col14 row1 0.08053008 -1.292938 1.994313 -0.3825409 0.5431738 0.2922965 -0.5091749 col15 col16 col17 col18 col19 col20 row1 0.9142708 0.1080388 -0.2470061 -0.3355306 -0.5881174 -0.1611151 > tmp[,"col10"] col10 row1 1.9943130 row2 0.3284334 row3 0.4798483 row4 0.2485968 row5 -1.4574352 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -1.2572166 0.3981155 1.700367 -0.3632213 1.874493 0.8342563 -0.8104846 row5 -0.2735904 -1.7541771 -2.047173 1.5730564 1.451846 0.3377850 -1.4714983 col8 col9 col10 col11 col12 col13 row1 0.08053008 -1.292938 1.994313 -0.3825409 0.5431738 0.29229654 row5 -0.59820867 0.737262 -1.457435 0.3876857 1.5972656 -0.04846757 col14 col15 col16 col17 col18 col19 row1 -0.5091749 0.9142708 0.1080388 -0.2470061 -0.3355306 -0.5881174 row5 -0.6144079 -1.0237754 -0.7905711 0.5435210 0.2354440 -0.9321900 col20 row1 -0.1611151 row5 0.3716313 > tmp[,c("col6","col20")] col6 col20 row1 0.83425630 -0.1611151 row2 -0.41365437 -0.4398900 row3 0.39629126 -1.6667108 row4 -0.05460855 0.4056567 row5 0.33778499 0.3716313 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.8342563 -0.1611151 row5 0.3377850 0.3716313 > > > > > 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 49.10747 50.99828 49.70734 48.89108 49.17573 104.4547 48.0984 49.52769 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.80087 48.82897 48.09358 50.09185 50.63199 50.15087 50.20368 49.43453 col17 col18 col19 col20 row1 49.94298 48.90336 50.89143 104.5745 > tmp[,"col10"] col10 row1 48.82897 row2 31.36357 row3 29.17358 row4 30.10154 row5 50.83205 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.10747 50.99828 49.70734 48.89108 49.17573 104.4547 48.0984 49.52769 row5 47.32286 50.22251 49.72128 51.01146 49.15371 105.5099 48.9874 52.40873 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.80087 48.82897 48.09358 50.09185 50.63199 50.15087 50.20368 49.43453 row5 49.16272 50.83205 50.07743 50.14232 50.68240 52.38047 51.78318 49.97700 col17 col18 col19 col20 row1 49.94298 48.90336 50.89143 104.5745 row5 50.68037 48.35018 50.55265 107.0093 > tmp[,c("col6","col20")] col6 col20 row1 104.45473 104.57449 row2 72.17821 75.23485 row3 73.46126 75.23012 row4 75.48474 74.91507 row5 105.50991 107.00928 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.4547 104.5745 row5 105.5099 107.0093 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.4547 104.5745 row5 105.5099 107.0093 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.77779140 [2,] -0.02174784 [3,] -1.08230011 [4,] 0.10667221 [5,] -0.02672811 > tmp[,c("col17","col7")] col17 col7 [1,] 0.13771203 -0.3562692 [2,] 1.07194175 0.5580095 [3,] 2.16706560 1.4148322 [4,] -0.04013708 -0.1806302 [5,] 1.56268848 0.4491007 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.77496966 -0.04167628 [2,] 2.32177054 1.43047832 [3,] 1.12989488 0.19486897 [4,] -1.79019937 -1.83690470 [5,] -0.05639915 0.17730979 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.7749697 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.7749697 [2,] 2.3217705 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 0.06602067 2.266347 0.4527189 1.144282 1.8188810 -1.095184 1.92672560 row1 0.87716532 1.400891 -1.2184304 -1.512479 0.3156371 1.225025 0.03744202 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 0.4828240 0.1708517 0.6290414 -1.329587 2.1754039 0.1287225 -0.1405205 row1 0.5177461 1.1545039 0.3149333 -2.232263 0.6034898 0.1345402 2.0259682 [,15] [,16] [,17] [,18] [,19] [,20] row3 -1.784612 0.0948688 -1.108836 0.08934325 -0.1596976 -0.510174 row1 1.687344 -0.4931885 0.142907 -0.17759906 -0.3655393 1.783562 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.3521018 0.5496607 -1.142791 0.9799491 -0.05876039 0.8637537 1.999444 [,8] [,9] [,10] row2 -1.144696 -0.2709475 1.765593 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.4388096 -1.057382 -0.07701894 -1.161723 0.5069376 -0.8487489 0.2772806 [,8] [,9] [,10] [,11] [,12] [,13] row5 -0.2878767 -0.8809496 0.6002134 -0.2749926 -0.09519172 0.1422413 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.1404184 -1.120988 -0.2608135 0.03277214 -0.8272849 0.9089247 0.2980857 > > > 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: 0x6188cadee690> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b341c1391" [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b37daa777" [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b2e1f373a" [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b79cae85f" [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552ba1d24d5" [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b689955a0" [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b2bada3e9" [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b1b3e456d" [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b4b33851f" [10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b12368f7f" [11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b375bb48c" [12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b21ec3639" [13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b456319a1" [14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b655d68ae" [15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f552b6bcdbab8" > > > ### 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: 0x6188c95e8920> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6188c95e8920> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6188c95e8920> > rowMedians(tmp) [1] -0.229176494 -0.427790608 -0.024125519 0.055065697 -0.465271080 [6] -0.157330368 -0.034454537 0.034913627 -0.250482832 -0.590017286 [11] 0.406714627 -0.121013180 0.102240808 -0.204324027 -0.177465976 [16] 0.127378650 -0.196843576 -0.438891330 0.121318696 0.015924675 [21] 0.187045575 -0.064033193 0.625960777 0.303070303 -0.028278792 [26] 0.243407101 0.120407420 0.229796490 0.541548475 -0.107802249 [31] -0.342106536 -0.232128482 0.223006750 -0.199171723 0.115524205 [36] 0.123910171 -0.315291113 0.111319858 -0.278629717 -0.196614648 [41] 0.249269835 -0.008025685 -0.080425132 -0.508551026 -0.378336655 [46] -0.007290320 0.001937188 0.238961184 -0.336079201 0.356106954 [51] 0.455737375 -0.349865387 -0.383336527 0.622887211 0.395522466 [56] 0.560186151 -0.049157623 -0.081267854 -0.345660508 0.366312718 [61] -0.646048084 -0.561493073 0.506869334 0.002368478 -0.066721528 [66] 0.353498809 0.446458866 -0.401193533 -0.101928170 0.370350939 [71] -0.046819231 -0.336769136 0.926841709 -0.029613759 -0.193097998 [76] -0.095837293 -0.459868003 -0.146934397 0.206667352 -0.219868105 [81] 0.289700668 -0.088815163 -0.144719414 0.241225674 0.321967948 [86] 0.090248564 0.163971665 -0.579062215 0.494922116 -0.159178948 [91] 0.343920695 0.406171105 0.196605205 0.548827696 0.399197737 [96] 0.236245810 0.483610379 0.280451996 0.098688086 0.127926146 [101] 0.236382330 0.012504911 -0.169432109 0.152184569 0.203320624 [106] -0.115266334 0.267868253 0.032152969 0.138770575 0.176661091 [111] 0.018729386 0.282145778 -0.656187692 -0.365162023 -0.634165547 [116] -0.277984689 0.311786172 -0.211218040 0.965562281 -0.357771564 [121] 0.293000035 -0.100617644 -0.625060434 -0.531639155 0.072405542 [126] 0.118738352 0.110681257 -0.465198889 -0.351925416 -0.500526026 [131] 0.377621591 -0.184596975 0.295711316 -0.045428780 -0.385429344 [136] -0.040919444 0.165584402 -0.092172330 -0.423569532 0.145972626 [141] 0.701213048 0.041669444 0.914844832 -0.072879167 -0.213698577 [146] -0.458057871 0.102495650 -0.319011816 0.670330454 0.410299962 [151] 0.099994725 0.240515420 -0.073156983 -0.112000288 -0.585111841 [156] -0.357489641 0.076879126 0.141819166 0.067994747 0.286558066 [161] 0.271803295 -0.482494094 0.581523328 0.109240317 -0.184053195 [166] -0.138516302 0.547517016 0.362195653 -0.050502532 0.224856893 [171] 0.258950214 -0.332012991 -0.402176847 0.108308270 0.263561598 [176] -0.065062374 0.335244876 -0.521776870 0.274352287 -0.307240723 [181] -0.161963232 0.086250602 0.047611996 0.159382958 -0.605604758 [186] -0.120658582 0.366965497 0.465091889 0.063487760 0.067497157 [191] -0.474333440 0.067636020 0.454490123 0.590184451 -0.284663368 [196] 0.455441557 -0.228071546 -0.055263768 0.005294659 0.240062704 [201] -0.157490479 -0.156155983 -0.341920661 -0.097568249 0.216269058 [206] 0.603314229 -0.103386615 0.353694387 -0.273559269 0.220904214 [211] -0.429059065 -0.212477237 0.361539704 -0.101389424 -0.737464614 [216] -0.183914562 -0.183680984 -0.015954364 0.205995332 0.051966251 [221] -0.018385347 0.004737141 -0.383027818 -0.621431104 0.209462786 [226] -0.624266552 0.413149366 -0.074574998 0.011612791 0.312501169 > > proc.time() user system elapsed 1.274 0.644 1.908
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu 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: 0x58983758f980> > .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: 0x58983758f980> > .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: 0x58983758f980> > .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: 0x58983758f980> > 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: 0x5898363883f0> > .Call("R_bm_AddColumn",P) <pointer: 0x5898363883f0> > .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: 0x5898363883f0> > .Call("R_bm_AddColumn",P) <pointer: 0x5898363883f0> > .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: 0x5898363883f0> > 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: 0x5898364d6710> > .Call("R_bm_AddColumn",P) <pointer: 0x5898364d6710> > .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: 0x5898364d6710> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5898364d6710> > .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: 0x5898364d6710> > > .Call("R_bm_RowMode",P) <pointer: 0x5898364d6710> > .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: 0x5898364d6710> > > .Call("R_bm_ColMode",P) <pointer: 0x5898364d6710> > .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: 0x5898364d6710> > 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: 0x589836542840> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x589836542840> > .Call("R_bm_AddColumn",P) <pointer: 0x589836542840> > .Call("R_bm_AddColumn",P) <pointer: 0x589836542840> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile2f57b64666f9ef" "BufferedMatrixFile2f57b6bc10db2" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile2f57b64666f9ef" "BufferedMatrixFile2f57b6bc10db2" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x589836d46c20> > .Call("R_bm_AddColumn",P) <pointer: 0x589836d46c20> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x589836d46c20> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x589836d46c20> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x589836d46c20> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x589836d46c20> > .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: 0x589836152380> > .Call("R_bm_AddColumn",P) <pointer: 0x589836152380> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x589836152380> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x589836152380> > 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: 0x5898374f0980> > .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: 0x5898374f0980> > rm(P) > > proc.time() user system elapsed 0.235 0.050 0.274
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu 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.249 0.046 0.285