Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-10-11 12:06 -0400 (Sat, 11 Oct 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 Patched (2025-08-23 r88802) -- "Great Square Root" | 4864 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4652 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4597 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4586 |
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 255/2346 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.73.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.7 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. - See Martin Grigorov's blog post for how to debug Linux ARM64 related issues on a x86_64 host. |
Package: BufferedMatrix |
Version: 1.73.0 |
Command: /home/biocbuild/R/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R/site-library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz |
StartedAt: 2025-10-10 06:47:48 -0000 (Fri, 10 Oct 2025) |
EndedAt: 2025-10-10 06:48:11 -0000 (Fri, 10 Oct 2025) |
EllapsedTime: 23.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/R/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R/site-library --no-vignettes --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: aarch64-unknown-linux-gnu * R was compiled by aarch64-unknown-linux-gnu-gcc (GCC) 14.2.0 GNU Fortran (GCC) 14.2.0 * running under: openEuler 24.03 (LTS) * using session charset: UTF-8 * using option ‘--no-vignettes’ * 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: ‘aarch64-unknown-linux-gnu-gcc (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 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 running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * 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/R/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/R/R-4.5.0/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.73.0’ ** using staged installation ** libs using C compiler: ‘aarch64-unknown-linux-gnu-gcc (GCC) 14.2.0’ /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -I"/home/biocbuild/R/R-4.5.0/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -Werror=format-security -c RBufferedMatrix.c -o RBufferedMatrix.o /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -I"/home/biocbuild/R/R-4.5.0/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){ | ^~~~~~~~~~~ /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -I"/home/biocbuild/R/R-4.5.0/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -Werror=format-security -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -I"/home/biocbuild/R/R-4.5.0/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -Werror=format-security -c init_package.c -o init_package.o /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -shared -L/home/biocbuild/R/R-4.5.0/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/R/R-4.5.0/lib -lR installing to /home/biocbuild/R/R-4.5.0/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: aarch64-unknown-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.318 0.053 0.355
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: aarch64-unknown-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 1047041 56 639620 34.2 Vcells 885166 6.8 8388608 64 2080985 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] "Fri Oct 10 06:48:06 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] "Fri Oct 10 06:48:06 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: 0x4397ff0> > > > > 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] "Fri Oct 10 06:48:06 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] "Fri Oct 10 06:48:06 2025" > > ColMode(tmp2) <pointer: 0x4397ff0> > > > > ### 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.1706077 1.4613680 -0.2066198 -1.00494743 [2,] -0.6704932 0.3196220 0.5773739 -0.08285258 [3,] 0.2944238 0.7198554 -1.6339943 -1.09480925 [4,] 0.1216785 -0.5879002 0.8271236 -0.37082558 > 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 : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.1706077 1.4613680 0.2066198 1.00494743 [2,] 0.6704932 0.3196220 0.5773739 0.08285258 [3,] 0.2944238 0.7198554 1.6339943 1.09480925 [4,] 0.1216785 0.5879002 0.8271236 0.37082558 > 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 : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9584440 1.2088706 0.4545545 1.0024707 [2,] 0.8188365 0.5653512 0.7598513 0.2878412 [3,] 0.5426083 0.8484429 1.2782779 1.0463313 [4,] 0.3488245 0.7667465 0.9094634 0.6089545 > > 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 : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 223.75505 38.55007 29.75216 36.02965 [2,] 33.85886 30.97313 33.17589 27.96127 [3,] 30.72051 34.20428 39.41677 36.55812 [4,] 28.60992 33.25536 34.92176 31.46037 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x55c79a0> > exp(tmp5) <pointer: 0x55c79a0> > log(tmp5,2) <pointer: 0x55c79a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 465.7168 > Min(tmp5) [1] 54.42841 > mean(tmp5) [1] 72.21321 > Sum(tmp5) [1] 14442.64 > Var(tmp5) [1] 855.6552 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.80263 70.03089 67.82550 69.42382 67.26064 71.98954 73.03910 69.92298 [9] 71.57115 70.26582 > rowSums(tmp5) [1] 1816.053 1400.618 1356.510 1388.476 1345.213 1439.791 1460.782 1398.460 [9] 1431.423 1405.316 > rowVars(tmp5) [1] 7857.32538 39.62161 50.75103 64.67735 69.89036 73.64438 [7] 108.84046 108.19439 94.73994 60.41748 > rowSd(tmp5) [1] 88.641556 6.294570 7.123976 8.042223 8.360045 8.581631 10.432663 [8] 10.401653 9.733444 7.772868 > rowMax(tmp5) [1] 465.71682 80.40248 82.04085 85.21419 84.83145 92.46316 92.41308 [8] 93.85964 85.66854 86.26294 > rowMin(tmp5) [1] 57.67680 58.19771 54.88223 57.59122 54.61017 57.91029 57.06194 57.70236 [9] 54.42841 56.17562 > > colMeans(tmp5) [1] 110.18064 74.18130 74.44685 70.81199 70.31587 71.71895 73.68377 [8] 68.54184 69.59397 71.73860 69.45207 69.29814 70.57857 71.62902 [15] 65.23531 70.28047 66.96440 72.24897 67.24485 66.11855 > colSums(tmp5) [1] 1101.8064 741.8130 744.4685 708.1199 703.1587 717.1895 736.8377 [8] 685.4184 695.9397 717.3860 694.5207 692.9814 705.7857 716.2902 [15] 652.3531 702.8047 669.6440 722.4897 672.4485 661.1855 > colVars(tmp5) [1] 15641.61952 91.86601 96.63709 46.81054 80.21084 89.22910 [7] 40.43647 43.09892 74.25618 128.18364 86.78081 77.72264 [13] 106.57182 65.57655 89.37746 55.39457 117.93799 59.80621 [19] 65.52573 40.37122 > colSd(tmp5) [1] 125.066460 9.584676 9.830417 6.841823 8.956051 9.446116 [7] 6.358968 6.564977 8.617203 11.321822 9.315622 8.816045 [13] 10.323363 8.097935 9.453965 7.442753 10.859926 7.733448 [19] 8.094796 6.353835 > colMax(tmp5) [1] 465.71682 92.41308 92.46316 76.97241 85.21419 87.16339 84.86956 [8] 78.41446 85.71832 93.85964 80.78309 82.10965 86.26294 84.01948 [15] 82.45165 85.66854 84.90143 84.62765 78.56428 78.38358 > colMin(tmp5) [1] 59.54781 64.46652 61.92523 58.19771 55.99944 58.12726 64.72522 58.88953 [9] 57.29583 62.05524 56.58164 57.06194 54.61017 62.70724 54.42841 59.31395 [17] 54.88223 60.18059 55.22288 58.49465 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] 90.80263 70.03089 67.82550 69.42382 67.26064 NA 73.03910 69.92298 [9] 71.57115 70.26582 > rowSums(tmp5) [1] 1816.053 1400.618 1356.510 1388.476 1345.213 NA 1460.782 1398.460 [9] 1431.423 1405.316 > rowVars(tmp5) [1] 7857.32538 39.62161 50.75103 64.67735 69.89036 73.50861 [7] 108.84046 108.19439 94.73994 60.41748 > rowSd(tmp5) [1] 88.641556 6.294570 7.123976 8.042223 8.360045 8.573716 10.432663 [8] 10.401653 9.733444 7.772868 > rowMax(tmp5) [1] 465.71682 80.40248 82.04085 85.21419 84.83145 NA 92.41308 [8] 93.85964 85.66854 86.26294 > rowMin(tmp5) [1] 57.67680 58.19771 54.88223 57.59122 54.61017 NA 57.06194 57.70236 [9] 54.42841 56.17562 > > colMeans(tmp5) [1] 110.18064 74.18130 74.44685 70.81199 70.31587 71.71895 73.68377 [8] 68.54184 69.59397 71.73860 69.45207 69.29814 70.57857 71.62902 [15] 65.23531 70.28047 66.96440 72.24897 67.24485 NA > colSums(tmp5) [1] 1101.8064 741.8130 744.4685 708.1199 703.1587 717.1895 736.8377 [8] 685.4184 695.9397 717.3860 694.5207 692.9814 705.7857 716.2902 [15] 652.3531 702.8047 669.6440 722.4897 672.4485 NA > colVars(tmp5) [1] 15641.61952 91.86601 96.63709 46.81054 80.21084 89.22910 [7] 40.43647 43.09892 74.25618 128.18364 86.78081 77.72264 [13] 106.57182 65.57655 89.37746 55.39457 117.93799 59.80621 [19] 65.52573 NA > colSd(tmp5) [1] 125.066460 9.584676 9.830417 6.841823 8.956051 9.446116 [7] 6.358968 6.564977 8.617203 11.321822 9.315622 8.816045 [13] 10.323363 8.097935 9.453965 7.442753 10.859926 7.733448 [19] 8.094796 NA > colMax(tmp5) [1] 465.71682 92.41308 92.46316 76.97241 85.21419 87.16339 84.86956 [8] 78.41446 85.71832 93.85964 80.78309 82.10965 86.26294 84.01948 [15] 82.45165 85.66854 84.90143 84.62765 78.56428 NA > colMin(tmp5) [1] 59.54781 64.46652 61.92523 58.19771 55.99944 58.12726 64.72522 58.88953 [9] 57.29583 62.05524 56.58164 57.06194 54.61017 62.70724 54.42841 59.31395 [17] 54.88223 60.18059 55.22288 NA > > Max(tmp5,na.rm=TRUE) [1] 465.7168 > Min(tmp5,na.rm=TRUE) [1] 54.42841 > mean(tmp5,na.rm=TRUE) [1] 72.25705 > Sum(tmp5,na.rm=TRUE) [1] 14379.15 > Var(tmp5,na.rm=TRUE) [1] 859.5902 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.80263 70.03089 67.82550 69.42382 67.26064 72.43701 73.03910 69.92298 [9] 71.57115 70.26582 > rowSums(tmp5,na.rm=TRUE) [1] 1816.053 1400.618 1356.510 1388.476 1345.213 1376.303 1460.782 1398.460 [9] 1431.423 1405.316 > rowVars(tmp5,na.rm=TRUE) [1] 7857.32538 39.62161 50.75103 64.67735 69.89036 73.50861 [7] 108.84046 108.19439 94.73994 60.41748 > rowSd(tmp5,na.rm=TRUE) [1] 88.641556 6.294570 7.123976 8.042223 8.360045 8.573716 10.432663 [8] 10.401653 9.733444 7.772868 > rowMax(tmp5,na.rm=TRUE) [1] 465.71682 80.40248 82.04085 85.21419 84.83145 92.46316 92.41308 [8] 93.85964 85.66854 86.26294 > rowMin(tmp5,na.rm=TRUE) [1] 57.67680 58.19771 54.88223 57.59122 54.61017 57.91029 57.06194 57.70236 [9] 54.42841 56.17562 > > colMeans(tmp5,na.rm=TRUE) [1] 110.18064 74.18130 74.44685 70.81199 70.31587 71.71895 73.68377 [8] 68.54184 69.59397 71.73860 69.45207 69.29814 70.57857 71.62902 [15] 65.23531 70.28047 66.96440 72.24897 67.24485 66.41089 > colSums(tmp5,na.rm=TRUE) [1] 1101.8064 741.8130 744.4685 708.1199 703.1587 717.1895 736.8377 [8] 685.4184 695.9397 717.3860 694.5207 692.9814 705.7857 716.2902 [15] 652.3531 702.8047 669.6440 722.4897 672.4485 597.6980 > colVars(tmp5,na.rm=TRUE) [1] 15641.61952 91.86601 96.63709 46.81054 80.21084 89.22910 [7] 40.43647 43.09892 74.25618 128.18364 86.78081 77.72264 [13] 106.57182 65.57655 89.37746 55.39457 117.93799 59.80621 [19] 65.52573 44.45621 > colSd(tmp5,na.rm=TRUE) [1] 125.066460 9.584676 9.830417 6.841823 8.956051 9.446116 [7] 6.358968 6.564977 8.617203 11.321822 9.315622 8.816045 [13] 10.323363 8.097935 9.453965 7.442753 10.859926 7.733448 [19] 8.094796 6.667549 > colMax(tmp5,na.rm=TRUE) [1] 465.71682 92.41308 92.46316 76.97241 85.21419 87.16339 84.86956 [8] 78.41446 85.71832 93.85964 80.78309 82.10965 86.26294 84.01948 [15] 82.45165 85.66854 84.90143 84.62765 78.56428 78.38358 > colMin(tmp5,na.rm=TRUE) [1] 59.54781 64.46652 61.92523 58.19771 55.99944 58.12726 64.72522 58.88953 [9] 57.29583 62.05524 56.58164 57.06194 54.61017 62.70724 54.42841 59.31395 [17] 54.88223 60.18059 55.22288 58.49465 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.80263 70.03089 67.82550 69.42382 67.26064 NaN 73.03910 69.92298 [9] 71.57115 70.26582 > rowSums(tmp5,na.rm=TRUE) [1] 1816.053 1400.618 1356.510 1388.476 1345.213 0.000 1460.782 1398.460 [9] 1431.423 1405.316 > rowVars(tmp5,na.rm=TRUE) [1] 7857.32538 39.62161 50.75103 64.67735 69.89036 NA [7] 108.84046 108.19439 94.73994 60.41748 > rowSd(tmp5,na.rm=TRUE) [1] 88.641556 6.294570 7.123976 8.042223 8.360045 NA 10.432663 [8] 10.401653 9.733444 7.772868 > rowMax(tmp5,na.rm=TRUE) [1] 465.71682 80.40248 82.04085 85.21419 84.83145 NA 92.41308 [8] 93.85964 85.66854 86.26294 > rowMin(tmp5,na.rm=TRUE) [1] 57.67680 58.19771 54.88223 57.59122 54.61017 NA 57.06194 57.70236 [9] 54.42841 56.17562 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 113.67317 74.93989 72.44503 70.36252 70.01080 72.84294 73.76432 [8] 68.43714 67.80238 71.91707 70.18275 68.73329 70.95198 70.83579 [15] 66.04920 69.86018 67.44562 71.30749 66.78872 NaN > colSums(tmp5,na.rm=TRUE) [1] 1023.0585 674.4590 652.0053 633.2627 630.0972 655.5865 663.8789 [8] 615.9343 610.2214 647.2536 631.6448 618.5996 638.5678 637.5221 [15] 594.4428 628.7417 607.0106 641.7674 601.0984 0.0000 > colVars(tmp5,na.rm=TRUE) [1] 17459.59730 96.87530 63.63515 50.38909 89.19019 86.17009 [7] 45.41804 48.36298 47.42783 143.84826 91.62208 83.84859 [13] 118.32470 66.69501 93.09744 60.33167 130.07505 57.31007 [19] 71.37580 NA > colSd(tmp5,na.rm=TRUE) [1] 132.134769 9.842525 7.977164 7.098527 9.444056 9.282785 [7] 6.739291 6.954350 6.886786 11.993676 9.571942 9.156888 [13] 10.877716 8.166702 9.648702 7.767347 11.405045 7.570342 [19] 8.448420 NA > colMax(tmp5,na.rm=TRUE) [1] 465.71682 92.41308 84.40812 76.97241 85.21419 87.16339 84.86956 [8] 78.41446 76.22909 93.85964 80.78309 82.10965 86.26294 84.01948 [15] 82.45165 85.66854 84.90143 84.62765 78.56428 -Inf > colMin(tmp5,na.rm=TRUE) [1] 59.54781 64.46652 61.92523 58.19771 55.99944 58.12726 64.72522 58.88953 [9] 57.29583 62.05524 56.58164 57.06194 54.61017 62.70724 54.42841 59.31395 [17] 54.88223 60.18059 55.22288 Inf > > > > > 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] 162.2841 176.4049 248.6679 214.6130 159.3983 195.5999 303.4270 247.5460 [9] 308.3318 416.7168 > apply(copymatrix,1,var,na.rm=TRUE) [1] 162.2841 176.4049 248.6679 214.6130 159.3983 195.5999 303.4270 247.5460 [9] 308.3318 416.7168 > > > > 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] -2.842171e-14 0.000000e+00 5.684342e-14 0.000000e+00 7.105427e-14 [6] -1.136868e-13 0.000000e+00 8.526513e-14 -8.526513e-14 -1.421085e-13 [11] 2.842171e-14 1.278977e-13 -5.684342e-14 1.989520e-13 1.421085e-13 [16] 1.136868e-13 5.684342e-14 5.684342e-14 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) + } 3 5 8 9 6 17 5 4 10 2 3 20 4 17 7 16 8 3 7 20 2 18 1 14 8 5 10 11 4 18 10 15 8 12 1 9 8 10 3 1 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] 1.738274 > Min(tmp) [1] -2.316716 > mean(tmp) [1] -0.03661181 > Sum(tmp) [1] -3.661181 > Var(tmp) [1] 0.7774535 > > rowMeans(tmp) [1] -0.03661181 > rowSums(tmp) [1] -3.661181 > rowVars(tmp) [1] 0.7774535 > rowSd(tmp) [1] 0.8817332 > rowMax(tmp) [1] 1.738274 > rowMin(tmp) [1] -2.316716 > > colMeans(tmp) [1] -0.775966357 -1.388347292 0.253755411 0.618211457 -0.581105184 [6] -2.316715849 -0.256759577 1.593211009 -1.430122274 -0.054554905 [11] -0.500709916 1.084562306 1.200608610 -0.402333223 -0.046424497 [16] 0.129292538 -0.005345555 0.382983285 -0.505536277 -0.466545689 [21] 1.299775774 -0.188776831 -0.794385084 -0.169209319 1.384109286 [26] 0.751149394 -0.058880971 1.222590834 -1.387726495 -0.445696606 [31] -0.244285516 0.765388514 -0.186454480 -0.705104146 0.447937557 [36] -1.311637303 1.396398809 -1.045431743 1.024004752 -0.518274641 [41] 0.242443256 1.505009336 -0.190176100 0.161011750 -0.971328233 [46] -0.355642797 -0.233254122 -1.110247270 1.186517751 -0.350641887 [51] 1.077530418 -0.650803813 -1.561584927 -1.743458603 1.133050862 [56] -1.470899706 -0.591636894 0.079492826 -0.786629695 0.010525589 [61] 0.471513007 -0.255523701 0.758082215 -0.342487053 0.102417333 [66] 0.040633104 -1.304610441 1.729812481 0.517671202 -0.393285045 [71] 1.546487176 0.532252903 -0.014631007 -0.711310891 -0.044864520 [76] -0.684039150 1.339681618 -0.244958571 -0.192498724 -0.378869182 [81] -0.532421978 1.494721133 1.154971858 -0.739444122 1.738273668 [86] -0.688422783 0.007535717 -0.756235034 1.691507895 0.331542633 [91] 0.121561545 -1.160892811 0.259138699 0.066475104 -0.042252648 [96] -0.514629538 0.162765833 -0.427583593 -0.401726436 -1.044466846 > colSums(tmp) [1] -0.775966357 -1.388347292 0.253755411 0.618211457 -0.581105184 [6] -2.316715849 -0.256759577 1.593211009 -1.430122274 -0.054554905 [11] -0.500709916 1.084562306 1.200608610 -0.402333223 -0.046424497 [16] 0.129292538 -0.005345555 0.382983285 -0.505536277 -0.466545689 [21] 1.299775774 -0.188776831 -0.794385084 -0.169209319 1.384109286 [26] 0.751149394 -0.058880971 1.222590834 -1.387726495 -0.445696606 [31] -0.244285516 0.765388514 -0.186454480 -0.705104146 0.447937557 [36] -1.311637303 1.396398809 -1.045431743 1.024004752 -0.518274641 [41] 0.242443256 1.505009336 -0.190176100 0.161011750 -0.971328233 [46] -0.355642797 -0.233254122 -1.110247270 1.186517751 -0.350641887 [51] 1.077530418 -0.650803813 -1.561584927 -1.743458603 1.133050862 [56] -1.470899706 -0.591636894 0.079492826 -0.786629695 0.010525589 [61] 0.471513007 -0.255523701 0.758082215 -0.342487053 0.102417333 [66] 0.040633104 -1.304610441 1.729812481 0.517671202 -0.393285045 [71] 1.546487176 0.532252903 -0.014631007 -0.711310891 -0.044864520 [76] -0.684039150 1.339681618 -0.244958571 -0.192498724 -0.378869182 [81] -0.532421978 1.494721133 1.154971858 -0.739444122 1.738273668 [86] -0.688422783 0.007535717 -0.756235034 1.691507895 0.331542633 [91] 0.121561545 -1.160892811 0.259138699 0.066475104 -0.042252648 [96] -0.514629538 0.162765833 -0.427583593 -0.401726436 -1.044466846 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] -0.775966357 -1.388347292 0.253755411 0.618211457 -0.581105184 [6] -2.316715849 -0.256759577 1.593211009 -1.430122274 -0.054554905 [11] -0.500709916 1.084562306 1.200608610 -0.402333223 -0.046424497 [16] 0.129292538 -0.005345555 0.382983285 -0.505536277 -0.466545689 [21] 1.299775774 -0.188776831 -0.794385084 -0.169209319 1.384109286 [26] 0.751149394 -0.058880971 1.222590834 -1.387726495 -0.445696606 [31] -0.244285516 0.765388514 -0.186454480 -0.705104146 0.447937557 [36] -1.311637303 1.396398809 -1.045431743 1.024004752 -0.518274641 [41] 0.242443256 1.505009336 -0.190176100 0.161011750 -0.971328233 [46] -0.355642797 -0.233254122 -1.110247270 1.186517751 -0.350641887 [51] 1.077530418 -0.650803813 -1.561584927 -1.743458603 1.133050862 [56] -1.470899706 -0.591636894 0.079492826 -0.786629695 0.010525589 [61] 0.471513007 -0.255523701 0.758082215 -0.342487053 0.102417333 [66] 0.040633104 -1.304610441 1.729812481 0.517671202 -0.393285045 [71] 1.546487176 0.532252903 -0.014631007 -0.711310891 -0.044864520 [76] -0.684039150 1.339681618 -0.244958571 -0.192498724 -0.378869182 [81] -0.532421978 1.494721133 1.154971858 -0.739444122 1.738273668 [86] -0.688422783 0.007535717 -0.756235034 1.691507895 0.331542633 [91] 0.121561545 -1.160892811 0.259138699 0.066475104 -0.042252648 [96] -0.514629538 0.162765833 -0.427583593 -0.401726436 -1.044466846 > colMin(tmp) [1] -0.775966357 -1.388347292 0.253755411 0.618211457 -0.581105184 [6] -2.316715849 -0.256759577 1.593211009 -1.430122274 -0.054554905 [11] -0.500709916 1.084562306 1.200608610 -0.402333223 -0.046424497 [16] 0.129292538 -0.005345555 0.382983285 -0.505536277 -0.466545689 [21] 1.299775774 -0.188776831 -0.794385084 -0.169209319 1.384109286 [26] 0.751149394 -0.058880971 1.222590834 -1.387726495 -0.445696606 [31] -0.244285516 0.765388514 -0.186454480 -0.705104146 0.447937557 [36] -1.311637303 1.396398809 -1.045431743 1.024004752 -0.518274641 [41] 0.242443256 1.505009336 -0.190176100 0.161011750 -0.971328233 [46] -0.355642797 -0.233254122 -1.110247270 1.186517751 -0.350641887 [51] 1.077530418 -0.650803813 -1.561584927 -1.743458603 1.133050862 [56] -1.470899706 -0.591636894 0.079492826 -0.786629695 0.010525589 [61] 0.471513007 -0.255523701 0.758082215 -0.342487053 0.102417333 [66] 0.040633104 -1.304610441 1.729812481 0.517671202 -0.393285045 [71] 1.546487176 0.532252903 -0.014631007 -0.711310891 -0.044864520 [76] -0.684039150 1.339681618 -0.244958571 -0.192498724 -0.378869182 [81] -0.532421978 1.494721133 1.154971858 -0.739444122 1.738273668 [86] -0.688422783 0.007535717 -0.756235034 1.691507895 0.331542633 [91] 0.121561545 -1.160892811 0.259138699 0.066475104 -0.042252648 [96] -0.514629538 0.162765833 -0.427583593 -0.401726436 -1.044466846 > colMedians(tmp) [1] -0.775966357 -1.388347292 0.253755411 0.618211457 -0.581105184 [6] -2.316715849 -0.256759577 1.593211009 -1.430122274 -0.054554905 [11] -0.500709916 1.084562306 1.200608610 -0.402333223 -0.046424497 [16] 0.129292538 -0.005345555 0.382983285 -0.505536277 -0.466545689 [21] 1.299775774 -0.188776831 -0.794385084 -0.169209319 1.384109286 [26] 0.751149394 -0.058880971 1.222590834 -1.387726495 -0.445696606 [31] -0.244285516 0.765388514 -0.186454480 -0.705104146 0.447937557 [36] -1.311637303 1.396398809 -1.045431743 1.024004752 -0.518274641 [41] 0.242443256 1.505009336 -0.190176100 0.161011750 -0.971328233 [46] -0.355642797 -0.233254122 -1.110247270 1.186517751 -0.350641887 [51] 1.077530418 -0.650803813 -1.561584927 -1.743458603 1.133050862 [56] -1.470899706 -0.591636894 0.079492826 -0.786629695 0.010525589 [61] 0.471513007 -0.255523701 0.758082215 -0.342487053 0.102417333 [66] 0.040633104 -1.304610441 1.729812481 0.517671202 -0.393285045 [71] 1.546487176 0.532252903 -0.014631007 -0.711310891 -0.044864520 [76] -0.684039150 1.339681618 -0.244958571 -0.192498724 -0.378869182 [81] -0.532421978 1.494721133 1.154971858 -0.739444122 1.738273668 [86] -0.688422783 0.007535717 -0.756235034 1.691507895 0.331542633 [91] 0.121561545 -1.160892811 0.259138699 0.066475104 -0.042252648 [96] -0.514629538 0.162765833 -0.427583593 -0.401726436 -1.044466846 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.7759664 -1.388347 0.2537554 0.6182115 -0.5811052 -2.316716 -0.2567596 [2,] -0.7759664 -1.388347 0.2537554 0.6182115 -0.5811052 -2.316716 -0.2567596 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.593211 -1.430122 -0.0545549 -0.5007099 1.084562 1.200609 -0.4023332 [2,] 1.593211 -1.430122 -0.0545549 -0.5007099 1.084562 1.200609 -0.4023332 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.0464245 0.1292925 -0.005345555 0.3829833 -0.5055363 -0.4665457 1.299776 [2,] -0.0464245 0.1292925 -0.005345555 0.3829833 -0.5055363 -0.4665457 1.299776 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.1887768 -0.7943851 -0.1692093 1.384109 0.7511494 -0.05888097 1.222591 [2,] -0.1887768 -0.7943851 -0.1692093 1.384109 0.7511494 -0.05888097 1.222591 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -1.387726 -0.4456966 -0.2442855 0.7653885 -0.1864545 -0.7051041 0.4479376 [2,] -1.387726 -0.4456966 -0.2442855 0.7653885 -0.1864545 -0.7051041 0.4479376 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.311637 1.396399 -1.045432 1.024005 -0.5182746 0.2424433 1.505009 [2,] -1.311637 1.396399 -1.045432 1.024005 -0.5182746 0.2424433 1.505009 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.1901761 0.1610118 -0.9713282 -0.3556428 -0.2332541 -1.110247 1.186518 [2,] -0.1901761 0.1610118 -0.9713282 -0.3556428 -0.2332541 -1.110247 1.186518 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -0.3506419 1.07753 -0.6508038 -1.561585 -1.743459 1.133051 -1.4709 [2,] -0.3506419 1.07753 -0.6508038 -1.561585 -1.743459 1.133051 -1.4709 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.5916369 0.07949283 -0.7866297 0.01052559 0.471513 -0.2555237 0.7580822 [2,] -0.5916369 0.07949283 -0.7866297 0.01052559 0.471513 -0.2555237 0.7580822 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.3424871 0.1024173 0.0406331 -1.30461 1.729812 0.5176712 -0.393285 [2,] -0.3424871 0.1024173 0.0406331 -1.30461 1.729812 0.5176712 -0.393285 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 1.546487 0.5322529 -0.01463101 -0.7113109 -0.04486452 -0.6840392 1.339682 [2,] 1.546487 0.5322529 -0.01463101 -0.7113109 -0.04486452 -0.6840392 1.339682 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.2449586 -0.1924987 -0.3788692 -0.532422 1.494721 1.154972 -0.7394441 [2,] -0.2449586 -0.1924987 -0.3788692 -0.532422 1.494721 1.154972 -0.7394441 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 1.738274 -0.6884228 0.007535717 -0.756235 1.691508 0.3315426 0.1215615 [2,] 1.738274 -0.6884228 0.007535717 -0.756235 1.691508 0.3315426 0.1215615 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.160893 0.2591387 0.0664751 -0.04225265 -0.5146295 0.1627658 -0.4275836 [2,] -1.160893 0.2591387 0.0664751 -0.04225265 -0.5146295 0.1627658 -0.4275836 [,99] [,100] [1,] -0.4017264 -1.044467 [2,] -0.4017264 -1.044467 > > > Max(tmp2) [1] 2.797522 > Min(tmp2) [1] -2.362194 > mean(tmp2) [1] -0.009616649 > Sum(tmp2) [1] -0.9616649 > Var(tmp2) [1] 1.023756 > > rowMeans(tmp2) [1] 1.01366867 0.55972216 0.06961053 0.48654203 -0.40382049 0.28131203 [7] -0.74714531 0.08773186 -1.45332879 0.73757481 0.53146837 -1.76028579 [13] 0.17966055 1.19144173 -0.53808442 -0.10598429 -0.52516545 -1.07725801 [19] -0.09888550 0.21292106 -0.50204706 -0.49737460 0.53159600 -0.29944597 [25] 0.58509071 -1.35571826 0.02472142 -0.33438524 -2.29858207 1.42223466 [31] 0.22554754 1.00911620 0.78905744 -0.67564461 -0.14526911 -0.70553658 [37] 1.37652642 -0.40094469 -0.35206858 -0.59812602 1.32772431 -0.44483284 [43] -0.63643168 -1.57674034 -0.74942165 -0.79886861 -0.64017912 -1.28595168 [49] -0.14448761 1.13998624 0.55864246 1.06521638 2.79752182 1.46706684 [55] 0.62837909 0.54866822 -0.30847927 0.39068341 0.17501070 0.27067493 [61] -0.98257883 -0.54765550 -0.52127899 1.03977282 0.68804687 -0.70785875 [67] 0.78478645 0.83165573 1.13600424 2.02525582 -0.02300867 -2.36219392 [73] -0.46599013 -0.89822375 0.28706225 -2.09451194 -0.77701086 0.11483340 [79] 0.61865134 1.95047383 -1.31793377 -2.00654193 -0.32584988 1.48663903 [85] 1.24608124 -0.42256753 0.05828669 0.75915491 -1.34991472 -1.14011558 [91] -0.38682311 0.42713864 -0.21976770 0.73455077 0.30222264 -0.73050609 [97] 1.48471467 -2.35718421 1.07618628 1.39970835 > rowSums(tmp2) [1] 1.01366867 0.55972216 0.06961053 0.48654203 -0.40382049 0.28131203 [7] -0.74714531 0.08773186 -1.45332879 0.73757481 0.53146837 -1.76028579 [13] 0.17966055 1.19144173 -0.53808442 -0.10598429 -0.52516545 -1.07725801 [19] -0.09888550 0.21292106 -0.50204706 -0.49737460 0.53159600 -0.29944597 [25] 0.58509071 -1.35571826 0.02472142 -0.33438524 -2.29858207 1.42223466 [31] 0.22554754 1.00911620 0.78905744 -0.67564461 -0.14526911 -0.70553658 [37] 1.37652642 -0.40094469 -0.35206858 -0.59812602 1.32772431 -0.44483284 [43] -0.63643168 -1.57674034 -0.74942165 -0.79886861 -0.64017912 -1.28595168 [49] -0.14448761 1.13998624 0.55864246 1.06521638 2.79752182 1.46706684 [55] 0.62837909 0.54866822 -0.30847927 0.39068341 0.17501070 0.27067493 [61] -0.98257883 -0.54765550 -0.52127899 1.03977282 0.68804687 -0.70785875 [67] 0.78478645 0.83165573 1.13600424 2.02525582 -0.02300867 -2.36219392 [73] -0.46599013 -0.89822375 0.28706225 -2.09451194 -0.77701086 0.11483340 [79] 0.61865134 1.95047383 -1.31793377 -2.00654193 -0.32584988 1.48663903 [85] 1.24608124 -0.42256753 0.05828669 0.75915491 -1.34991472 -1.14011558 [91] -0.38682311 0.42713864 -0.21976770 0.73455077 0.30222264 -0.73050609 [97] 1.48471467 -2.35718421 1.07618628 1.39970835 > 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.01366867 0.55972216 0.06961053 0.48654203 -0.40382049 0.28131203 [7] -0.74714531 0.08773186 -1.45332879 0.73757481 0.53146837 -1.76028579 [13] 0.17966055 1.19144173 -0.53808442 -0.10598429 -0.52516545 -1.07725801 [19] -0.09888550 0.21292106 -0.50204706 -0.49737460 0.53159600 -0.29944597 [25] 0.58509071 -1.35571826 0.02472142 -0.33438524 -2.29858207 1.42223466 [31] 0.22554754 1.00911620 0.78905744 -0.67564461 -0.14526911 -0.70553658 [37] 1.37652642 -0.40094469 -0.35206858 -0.59812602 1.32772431 -0.44483284 [43] -0.63643168 -1.57674034 -0.74942165 -0.79886861 -0.64017912 -1.28595168 [49] -0.14448761 1.13998624 0.55864246 1.06521638 2.79752182 1.46706684 [55] 0.62837909 0.54866822 -0.30847927 0.39068341 0.17501070 0.27067493 [61] -0.98257883 -0.54765550 -0.52127899 1.03977282 0.68804687 -0.70785875 [67] 0.78478645 0.83165573 1.13600424 2.02525582 -0.02300867 -2.36219392 [73] -0.46599013 -0.89822375 0.28706225 -2.09451194 -0.77701086 0.11483340 [79] 0.61865134 1.95047383 -1.31793377 -2.00654193 -0.32584988 1.48663903 [85] 1.24608124 -0.42256753 0.05828669 0.75915491 -1.34991472 -1.14011558 [91] -0.38682311 0.42713864 -0.21976770 0.73455077 0.30222264 -0.73050609 [97] 1.48471467 -2.35718421 1.07618628 1.39970835 > rowMin(tmp2) [1] 1.01366867 0.55972216 0.06961053 0.48654203 -0.40382049 0.28131203 [7] -0.74714531 0.08773186 -1.45332879 0.73757481 0.53146837 -1.76028579 [13] 0.17966055 1.19144173 -0.53808442 -0.10598429 -0.52516545 -1.07725801 [19] -0.09888550 0.21292106 -0.50204706 -0.49737460 0.53159600 -0.29944597 [25] 0.58509071 -1.35571826 0.02472142 -0.33438524 -2.29858207 1.42223466 [31] 0.22554754 1.00911620 0.78905744 -0.67564461 -0.14526911 -0.70553658 [37] 1.37652642 -0.40094469 -0.35206858 -0.59812602 1.32772431 -0.44483284 [43] -0.63643168 -1.57674034 -0.74942165 -0.79886861 -0.64017912 -1.28595168 [49] -0.14448761 1.13998624 0.55864246 1.06521638 2.79752182 1.46706684 [55] 0.62837909 0.54866822 -0.30847927 0.39068341 0.17501070 0.27067493 [61] -0.98257883 -0.54765550 -0.52127899 1.03977282 0.68804687 -0.70785875 [67] 0.78478645 0.83165573 1.13600424 2.02525582 -0.02300867 -2.36219392 [73] -0.46599013 -0.89822375 0.28706225 -2.09451194 -0.77701086 0.11483340 [79] 0.61865134 1.95047383 -1.31793377 -2.00654193 -0.32584988 1.48663903 [85] 1.24608124 -0.42256753 0.05828669 0.75915491 -1.34991472 -1.14011558 [91] -0.38682311 0.42713864 -0.21976770 0.73455077 0.30222264 -0.73050609 [97] 1.48471467 -2.35718421 1.07618628 1.39970835 > > colMeans(tmp2) [1] -0.009616649 > colSums(tmp2) [1] -0.9616649 > colVars(tmp2) [1] 1.023756 > colSd(tmp2) [1] 1.011808 > colMax(tmp2) [1] 2.797522 > colMin(tmp2) [1] -2.362194 > colMedians(tmp2) [1] 0.0008563735 > colRanges(tmp2) [,1] [1,] -2.362194 [2,] 2.797522 > > 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] 4.530043 -1.385738 -1.227502 3.398853 -3.128197 -1.926748 -1.818767 [8] -4.238001 -4.148773 -1.450352 > colApply(tmp,quantile)[,1] [,1] [1,] -1.6756225 [2,] -0.7836399 [3,] 0.5420356 [4,] 1.5692285 [5,] 2.2817785 > > rowApply(tmp,sum) [1] -2.7999116 0.1848621 -5.4825334 -2.1915094 -3.3624203 -1.0245071 [7] -1.7432463 1.7978946 3.7083617 -0.4821724 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 10 10 4 9 10 10 1 9 4 1 [2,] 9 7 8 3 3 5 2 6 8 5 [3,] 2 2 6 10 7 6 4 10 2 7 [4,] 8 8 9 2 4 7 7 4 9 8 [5,] 1 3 2 4 6 4 8 2 7 9 [6,] 6 5 10 7 5 9 3 7 1 4 [7,] 5 1 5 5 9 8 6 5 6 2 [8,] 7 6 1 1 2 1 9 3 10 3 [9,] 4 9 3 6 1 2 5 8 5 10 [10,] 3 4 7 8 8 3 10 1 3 6 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -1.90744863 -3.51288356 -0.55300587 2.18099753 -3.32399004 -0.16454732 [7] -5.06258974 0.51008277 1.61328510 0.42300791 -0.13538818 3.61561967 [13] -2.59670327 0.87555176 1.54131412 1.46128834 0.59016112 0.09563801 [19] 1.18172115 -0.93094497 > colApply(tmp,quantile)[,1] [,1] [1,] -1.22675078 [2,] -0.66581655 [3,] -0.47994932 [4,] 0.02418583 [5,] 0.44088219 > > rowApply(tmp,sum) [1] -1.02731595 1.03186613 -1.09511469 -2.97402879 -0.03424079 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 6 6 15 6 10 [2,] 1 18 1 16 5 [3,] 15 9 4 4 16 [4,] 18 19 19 12 1 [5,] 7 3 10 3 2 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.22675078 -2.4090862 1.0237434 1.26419132 -0.4820272 0.2204257 [2,] -0.47994932 1.0191358 0.1291838 1.04438047 -1.0043108 -1.3284424 [3,] 0.44088219 -1.6723926 -1.2764164 1.16337693 0.1399122 0.3814966 [4,] -0.66581655 0.2731559 -0.8743927 0.03576599 -0.9648850 -0.2363568 [5,] 0.02418583 -0.7236965 0.4448759 -1.32671718 -1.0126793 0.7983296 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -2.2279529 1.9560456 1.2420876 -0.1534690 2.4753103 1.0255918 [2,] -1.3901289 0.6011735 0.4123277 -0.6142537 0.7483012 0.2096475 [3,] -0.5864667 -1.3274448 1.3333598 0.4228813 -0.5165916 0.5706497 [4,] -1.1818662 0.2566469 -0.6405877 -0.3247219 -2.1700115 1.6412023 [5,] 0.3238249 -0.9763384 -0.7339022 1.0925712 -0.6723967 0.1685284 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -1.2444421 -1.55162787 0.4791756 -0.3178296 -0.3633786 -0.08337928 [2,] -0.3743740 1.52936503 0.2569562 0.2754776 -0.4442402 -0.56074048 [3,] -1.5742142 0.38434905 1.0199575 0.9127109 0.3490427 -0.46801471 [4,] -0.5516591 0.07584074 0.1679805 -0.8639909 0.7096798 1.52241380 [5,] 1.1479862 0.43762481 -0.3827556 1.4549203 0.3390574 -0.31464132 [,19] [,20] [1,] 0.71222822 -1.3661719 [2,] 0.53762328 0.4647338 [3,] -0.20897634 -0.5832162 [4,] -0.05477126 0.8723447 [5,] 0.19561725 -0.3186353 > > > 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 : 648 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 : 562 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 0.7597414 0.1393264 -0.9638277 0.7994462 0.1446165 0.2318843 0.7865502 col8 col9 col10 col11 col12 col13 col14 row1 -0.4677371 0.7978326 0.3873455 -0.1094814 -0.3981329 -0.6297302 0.8322925 col15 col16 col17 col18 col19 col20 row1 0.5285947 1.177847 1.652937 -0.2637833 -0.8128217 -0.6090107 > tmp[,"col10"] col10 row1 0.3873455 row2 0.1700735 row3 0.9998080 row4 0.2887204 row5 1.1564988 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 0.7597414 0.1393264 -0.9638277 0.7994462 0.1446165 0.2318843 0.7865502 row5 0.9523240 -0.6366556 -1.1684624 0.3331785 0.8173484 1.0687497 -1.1716454 col8 col9 col10 col11 col12 col13 row1 -0.4677371 0.7978326 0.3873455 -0.1094814 -0.3981329 -0.62973023 row5 1.0192600 0.9308953 1.1564988 -1.6215493 -0.5252189 0.05679168 col14 col15 col16 col17 col18 col19 row1 0.8322925 0.5285947 1.1778467 1.652937 -0.2637833 -0.8128217 row5 -0.1139768 -0.5823971 -0.1136326 -1.942890 0.3659233 -0.6626671 col20 row1 -0.6090107 row5 -0.8193650 > tmp[,c("col6","col20")] col6 col20 row1 0.2318843 -0.6090107 row2 0.2359975 -0.5468493 row3 0.1707254 -0.4871283 row4 1.0259742 -2.0533904 row5 1.0687497 -0.8193650 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.2318843 -0.6090107 row5 1.0687497 -0.8193650 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 48.56245 49.31865 51.18813 48.92728 48.15333 103.7815 48.56451 49.18203 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.66471 49.73057 52.06258 49.65598 49.99597 50.28307 50.5502 50.19355 col17 col18 col19 col20 row1 49.37471 48.34698 48.88696 105.2395 > tmp[,"col10"] col10 row1 49.73057 row2 29.19866 row3 31.81912 row4 29.97948 row5 49.57954 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 48.56245 49.31865 51.18813 48.92728 48.15333 103.7815 48.56451 49.18203 row5 50.73338 50.92955 48.77964 50.72792 50.32738 106.7709 50.63836 50.20951 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.66471 49.73057 52.06258 49.65598 49.99597 50.28307 50.55020 50.19355 row5 49.63586 49.57954 48.99967 48.74004 49.61303 49.41619 50.74609 49.83130 col17 col18 col19 col20 row1 49.37471 48.34698 48.88696 105.2395 row5 48.11732 49.52190 49.10756 103.7462 > tmp[,c("col6","col20")] col6 col20 row1 103.78146 105.23953 row2 74.31249 73.95505 row3 73.00032 76.40851 row4 75.12860 74.85117 row5 106.77088 103.74623 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.7815 105.2395 row5 106.7709 103.7462 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.7815 105.2395 row5 106.7709 103.7462 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.04527266 [2,] 2.05104658 [3,] 0.30837362 [4,] -1.53959160 [5,] -1.24292636 > tmp[,c("col17","col7")] col17 col7 [1,] -1.5161867 -0.5240183 [2,] -0.2902871 1.6492741 [3,] -1.2319598 -0.3101774 [4,] 0.5753049 -0.1150400 [5,] 0.2026618 0.9349619 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.0940306 -1.1887261 [2,] -0.2105686 -1.0383295 [3,] -0.9429077 -0.9193878 [4,] 1.3796539 0.6992172 [5,] -0.1884148 -2.0641373 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.0940306 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.0940306 [2,] -0.2105686 > > > > 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 1.509785 -0.1274688 0.6674550 1.6453840 0.5935915 -1.545987 -1.08246474 row1 1.796856 -0.9171036 -0.6417567 0.1813377 -0.5215311 -1.716809 0.04470629 [,8] [,9] [,10] [,11] [,12] [,13] row3 -1.7641574 -1.5363199 -0.03660148 -0.3953512 -1.3875106 -0.8172719 row1 -0.5239669 0.4091144 0.75918628 -0.1249779 -0.3064112 1.9067611 [,14] [,15] [,16] [,17] [,18] [,19] row3 1.6541038 1.39920967 1.4077846 -0.02426766 0.4960423 -0.3992077 row1 0.5632359 0.05430206 -0.4893171 -1.13204452 -0.7333672 -0.2238434 [,20] row3 0.5399657 row1 0.3531512 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 1.52485 -1.65303 -2.07396 -0.005378782 0.8896476 -1.364963 0.4731137 [,8] [,9] [,10] row2 -1.477546 -2.037124 -0.3023541 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 2.715101 1.363049 1.545781 -1.15865 0.5490772 -0.229458 -0.7292944 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.05549953 -0.7154691 -1.67071 0.7004705 -0.3044309 -0.4238127 -0.5210117 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.07856702 0.08706403 -1.336268 0.4532858 -1.060971 -0.6450872 > > > 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: 0x3a71e30> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf669e1d055" [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf63e4111f1" [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf6379cb3bf" [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf61da0e49f" [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf62dab56a2" [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf627b0412d" [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf6fa02bef" [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf62ac00afb" [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf641a60d08" [10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf67c53715f" [11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf64cf423e9" [12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf64250995f" [13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf6317521ac" [14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf64010ce08" [15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1ddf6632db04d" > > > ### 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: 0x5704410> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x5704410> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x5704410> > rowMedians(tmp) [1] -0.187928757 0.172790637 0.228614337 -0.375937018 -0.111728571 [6] 0.132800470 0.119083348 0.448275193 -0.130521764 0.090554730 [11] -0.085120046 0.242721871 0.400698344 0.314470070 0.156523234 [16] -0.416345092 -0.235120477 0.316989567 0.129819645 0.223739579 [21] -1.130469095 0.100125887 0.462133514 0.241141286 0.104499539 [26] 0.009399836 -0.044623533 -0.553076616 0.051425284 0.024283367 [31] 0.062005603 -0.490997354 0.242489458 -0.014237784 -0.217295303 [36] -0.629009126 -0.531926431 0.168072067 0.201794668 0.342405111 [41] 0.205808589 -0.025408815 0.077551858 -0.923256671 -0.250900061 [46] 0.120104550 -0.348355385 0.113986133 -0.105567694 0.519117605 [51] 0.460620772 0.117498110 0.306007625 -0.454196769 0.418755366 [56] -0.539617994 -0.109363655 -0.097732512 -0.304756058 0.023811800 [61] 0.660475808 -0.474122633 0.655638455 -0.467816166 0.034283161 [66] -0.082571453 -0.288874938 -0.246393461 0.101793387 0.061378943 [71] -0.399971534 0.208642071 -0.451924014 0.571291277 -0.082464482 [76] -0.867789879 -0.556946643 -0.352789605 -0.252087327 -0.063328481 [81] -0.169843916 0.116633286 -0.222052159 0.417948347 0.341864357 [86] -0.014044225 0.366874511 -0.051214288 0.240365195 0.046226525 [91] 0.062588803 0.027642837 0.452880078 0.276804155 0.022521843 [96] 0.234300932 -0.021638004 0.086779530 0.081021690 0.299274882 [101] -0.294492571 0.191329805 0.133495385 0.183917531 -0.380327022 [106] -0.020073798 -0.125770426 0.248541064 -0.504564836 -0.125063076 [111] 0.304519898 -0.359245262 0.097930691 -0.349330335 0.080986591 [116] -0.490896728 -0.428469520 0.200935219 0.151695027 0.349207978 [121] 0.111430317 -0.023209110 0.138479229 -0.086432901 -0.175503248 [126] 0.138790633 0.064631264 -0.291259072 0.319824801 -0.279751640 [131] 0.086647508 0.692586434 -0.021326915 -0.595287495 0.527872502 [136] -0.101488474 0.009660687 -0.125800731 0.416354853 -0.275485147 [141] 0.376497783 -0.117680852 0.323532112 -0.086380047 0.273617615 [146] -0.096713482 0.274760670 0.163654811 -0.236210267 0.051133556 [151] -0.568281915 0.117066725 -0.062483979 -0.208950985 -0.036839254 [156] -0.057379292 0.197408862 -0.252716001 -0.103736376 -0.018240191 [161] 0.189258137 -0.292692748 -0.248386269 0.323701106 0.424767380 [166] 0.262403472 -0.060425666 -0.505872006 -0.232177449 -0.071203035 [171] 0.041876925 0.321653407 0.088099001 -0.629674196 0.348436768 [176] -0.663287254 -0.076132817 -0.123562119 -0.079737686 0.154935772 [181] 0.585355647 -0.308058598 0.059540903 0.559262192 0.415878582 [186] 0.198055909 -0.213842032 0.689720123 -0.825350589 0.361765263 [191] 0.045747906 0.052798977 0.161526732 -0.093172367 -0.246232099 [196] -0.460554651 0.071166872 0.086657212 0.165545265 -0.595629026 [201] 0.173793330 0.206435936 -0.120227543 0.305672315 -0.368227597 [206] -0.370454907 -0.253698514 -0.041074687 -0.388452499 0.303894448 [211] 0.359453264 0.095596358 0.031825083 0.110177553 -0.431350080 [216] -0.223944009 0.775278577 0.404045796 -0.421808493 0.060780445 [221] -0.326790080 -0.223021655 0.024109938 0.200358426 0.238999989 [226] 0.396371477 0.355972870 0.342757070 0.127390802 -0.174288532 > > proc.time() user system elapsed 1.981 0.794 2.798
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: aarch64-unknown-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: 0x41ccbff0> > .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: 0x41ccbff0> > .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: 0x41ccbff0> > .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: 0x41ccbff0> > 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: 0x41bd6470> > .Call("R_bm_AddColumn",P) <pointer: 0x41bd6470> > .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: 0x41bd6470> > .Call("R_bm_AddColumn",P) <pointer: 0x41bd6470> > .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: 0x41bd6470> > 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: 0x41bb10e0> > .Call("R_bm_AddColumn",P) <pointer: 0x41bb10e0> > .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: 0x41bb10e0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x41bb10e0> > .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: 0x41bb10e0> > > .Call("R_bm_RowMode",P) <pointer: 0x41bb10e0> > .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: 0x41bb10e0> > > .Call("R_bm_ColMode",P) <pointer: 0x41bb10e0> > .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: 0x41bb10e0> > 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: 0x40b38520> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x40b38520> > .Call("R_bm_AddColumn",P) <pointer: 0x40b38520> > .Call("R_bm_AddColumn",P) <pointer: 0x40b38520> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1de2f2566f84f" "BufferedMatrixFile1de2f35c31b0a" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1de2f2566f84f" "BufferedMatrixFile1de2f35c31b0a" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x42a81030> > .Call("R_bm_AddColumn",P) <pointer: 0x42a81030> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x42a81030> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x42a81030> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x42a81030> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x42a81030> > .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: 0x4144c5c0> > .Call("R_bm_AddColumn",P) <pointer: 0x4144c5c0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x4144c5c0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x4144c5c0> > 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: 0x4252cf30> > .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: 0x4252cf30> > rm(P) > > proc.time() user system elapsed 0.338 0.023 0.347
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: aarch64-unknown-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.331 0.033 0.347