Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-09-25 12:07 -0400 (Thu, 25 Sep 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" | 4831 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4618 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4562 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4560 |
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 253/2334 | 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-09-23 05:29:59 -0000 (Tue, 23 Sep 2025) |
EndedAt: 2025-09-23 05:30:22 -0000 (Tue, 23 Sep 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.330 0.040 0.354
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] "Tue Sep 23 05:30:16 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Tue Sep 23 05:30:16 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: 0x15c60ff0> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Tue Sep 23 05:30:17 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Tue Sep 23 05:30:17 2025" > > ColMode(tmp2) <pointer: 0x15c60ff0> > > > > ### 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.8554762 -0.6839771 -0.7517712 -0.5283252 [2,] 1.1358361 -0.9739353 -2.0271165 -0.2966307 [3,] 0.3582443 0.5248244 1.6823562 -1.0582462 [4,] 0.3878667 -0.1435059 -1.4232871 -0.5774861 > 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,] 99.8554762 0.6839771 0.7517712 0.5283252 [2,] 1.1358361 0.9739353 2.0271165 0.2966307 [3,] 0.3582443 0.5248244 1.6823562 1.0582462 [4,] 0.3878667 0.1435059 1.4232871 0.5774861 > 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,] 9.9927712 0.8270291 0.8670474 0.7268598 [2,] 1.0657561 0.9868816 1.4237684 0.5446382 [3,] 0.5985352 0.7244477 1.2970568 1.0287109 [4,] 0.6227895 0.3788217 1.1930160 0.7599251 > > 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,] 224.78319 33.95427 34.42225 32.79692 [2,] 36.79340 35.84275 41.26480 30.74301 [3,] 31.34360 32.76930 39.65292 36.34536 [4,] 31.61576 28.93172 38.35345 33.17674 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x16e909a0> > exp(tmp5) <pointer: 0x16e909a0> > log(tmp5,2) <pointer: 0x16e909a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 467.8568 > Min(tmp5) [1] 53.93924 > mean(tmp5) [1] 71.97428 > Sum(tmp5) [1] 14394.86 > Var(tmp5) [1] 858.8972 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.29694 66.33020 69.67769 70.40860 66.67146 68.21785 71.21872 70.55221 [9] 71.82609 74.54307 > rowSums(tmp5) [1] 1805.939 1326.604 1393.554 1408.172 1333.429 1364.357 1424.374 1411.044 [9] 1436.522 1490.861 > rowVars(tmp5) [1] 7948.42969 89.21959 51.77612 65.22554 87.02110 50.21330 [7] 68.11803 59.62739 50.36461 76.61641 > rowSd(tmp5) [1] 89.153966 9.445612 7.195562 8.076233 9.328510 7.086134 8.253365 [8] 7.721877 7.096803 8.753080 > rowMax(tmp5) [1] 467.85676 85.88728 87.79741 82.76001 87.35274 78.96091 86.62236 [8] 88.89953 86.34454 94.45589 > rowMin(tmp5) [1] 55.42330 56.55004 61.18405 55.23944 53.93924 55.43507 57.12176 60.24696 [9] 61.80843 62.39046 > > colMeans(tmp5) [1] 110.00808 68.36703 73.18751 70.21066 69.42713 67.72934 69.74265 [8] 71.38863 70.24241 68.29806 74.46634 71.29451 68.77989 67.73941 [15] 66.23870 71.86923 69.39199 66.92938 73.31863 70.85609 > colSums(tmp5) [1] 1100.0808 683.6703 731.8751 702.1066 694.2713 677.2934 697.4265 [8] 713.8863 702.4241 682.9806 744.6634 712.9451 687.7989 677.3941 [15] 662.3870 718.6923 693.9199 669.2938 733.1863 708.5609 > colVars(tmp5) [1] 15891.60772 57.17510 70.06312 66.96802 86.61501 70.27981 [7] 79.90216 58.35457 71.07728 48.85755 93.44976 82.46246 [13] 58.95828 66.43643 43.27694 119.45328 59.82095 62.61906 [19] 42.42014 68.70138 > colSd(tmp5) [1] 126.061920 7.561422 8.370372 8.183399 9.306719 8.383305 [7] 8.938801 7.639016 8.430734 6.989818 9.666942 9.080884 [13] 7.678429 8.150855 6.578521 10.929468 7.734401 7.913220 [19] 6.513074 8.288630 > colMax(tmp5) [1] 467.85676 81.15447 85.88728 84.57115 86.62236 84.03576 87.22192 [8] 83.24157 86.34454 77.95013 94.45589 87.79741 78.96091 87.35274 [15] 79.22448 86.34430 80.96884 78.12058 84.86297 81.82117 > colMin(tmp5) [1] 59.85388 57.12176 59.06187 58.87364 60.65550 56.55004 58.97586 62.38175 [9] 55.23944 59.55194 62.67459 55.43507 53.93924 60.16605 56.52004 55.88140 [17] 56.75331 55.42330 62.30889 59.28062 > > > ### 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.29694 66.33020 69.67769 70.40860 66.67146 68.21785 NA 70.55221 [9] 71.82609 74.54307 > rowSums(tmp5) [1] 1805.939 1326.604 1393.554 1408.172 1333.429 1364.357 NA 1411.044 [9] 1436.522 1490.861 > rowVars(tmp5) [1] 7948.42969 89.21959 51.77612 65.22554 87.02110 50.21330 [7] 71.52879 59.62739 50.36461 76.61641 > rowSd(tmp5) [1] 89.153966 9.445612 7.195562 8.076233 9.328510 7.086134 8.457470 [8] 7.721877 7.096803 8.753080 > rowMax(tmp5) [1] 467.85676 85.88728 87.79741 82.76001 87.35274 78.96091 NA [8] 88.89953 86.34454 94.45589 > rowMin(tmp5) [1] 55.42330 56.55004 61.18405 55.23944 53.93924 55.43507 NA 60.24696 [9] 61.80843 62.39046 > > colMeans(tmp5) [1] 110.00808 68.36703 73.18751 70.21066 69.42713 67.72934 69.74265 [8] 71.38863 70.24241 68.29806 74.46634 NA 68.77989 67.73941 [15] 66.23870 71.86923 69.39199 66.92938 73.31863 70.85609 > colSums(tmp5) [1] 1100.0808 683.6703 731.8751 702.1066 694.2713 677.2934 697.4265 [8] 713.8863 702.4241 682.9806 744.6634 NA 687.7989 677.3941 [15] 662.3870 718.6923 693.9199 669.2938 733.1863 708.5609 > colVars(tmp5) [1] 15891.60772 57.17510 70.06312 66.96802 86.61501 70.27981 [7] 79.90216 58.35457 71.07728 48.85755 93.44976 NA [13] 58.95828 66.43643 43.27694 119.45328 59.82095 62.61906 [19] 42.42014 68.70138 > colSd(tmp5) [1] 126.061920 7.561422 8.370372 8.183399 9.306719 8.383305 [7] 8.938801 7.639016 8.430734 6.989818 9.666942 NA [13] 7.678429 8.150855 6.578521 10.929468 7.734401 7.913220 [19] 6.513074 8.288630 > colMax(tmp5) [1] 467.85676 81.15447 85.88728 84.57115 86.62236 84.03576 87.22192 [8] 83.24157 86.34454 77.95013 94.45589 NA 78.96091 87.35274 [15] 79.22448 86.34430 80.96884 78.12058 84.86297 81.82117 > colMin(tmp5) [1] 59.85388 57.12176 59.06187 58.87364 60.65550 56.55004 58.97586 62.38175 [9] 55.23944 59.55194 62.67459 NA 53.93924 60.16605 56.52004 55.88140 [17] 56.75331 55.42330 62.30889 59.28062 > > Max(tmp5,na.rm=TRUE) [1] 467.8568 > Min(tmp5,na.rm=TRUE) [1] 53.93924 > mean(tmp5,na.rm=TRUE) [1] 71.96538 > Sum(tmp5,na.rm=TRUE) [1] 14321.11 > Var(tmp5,na.rm=TRUE) [1] 863.2191 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.29694 66.33020 69.67769 70.40860 66.67146 68.21785 71.08570 70.55221 [9] 71.82609 74.54307 > rowSums(tmp5,na.rm=TRUE) [1] 1805.939 1326.604 1393.554 1408.172 1333.429 1364.357 1350.628 1411.044 [9] 1436.522 1490.861 > rowVars(tmp5,na.rm=TRUE) [1] 7948.42969 89.21959 51.77612 65.22554 87.02110 50.21330 [7] 71.52879 59.62739 50.36461 76.61641 > rowSd(tmp5,na.rm=TRUE) [1] 89.153966 9.445612 7.195562 8.076233 9.328510 7.086134 8.457470 [8] 7.721877 7.096803 8.753080 > rowMax(tmp5,na.rm=TRUE) [1] 467.85676 85.88728 87.79741 82.76001 87.35274 78.96091 86.62236 [8] 88.89953 86.34454 94.45589 > rowMin(tmp5,na.rm=TRUE) [1] 55.42330 56.55004 61.18405 55.23944 53.93924 55.43507 57.12176 60.24696 [9] 61.80843 62.39046 > > colMeans(tmp5,na.rm=TRUE) [1] 110.00808 68.36703 73.18751 70.21066 69.42713 67.72934 69.74265 [8] 71.38863 70.24241 68.29806 74.46634 71.02210 68.77989 67.73941 [15] 66.23870 71.86923 69.39199 66.92938 73.31863 70.85609 > colSums(tmp5,na.rm=TRUE) [1] 1100.0808 683.6703 731.8751 702.1066 694.2713 677.2934 697.4265 [8] 713.8863 702.4241 682.9806 744.6634 639.1989 687.7989 677.3941 [15] 662.3870 718.6923 693.9199 669.2938 733.1863 708.5609 > colVars(tmp5,na.rm=TRUE) [1] 15891.60772 57.17510 70.06312 66.96802 86.61501 70.27981 [7] 79.90216 58.35457 71.07728 48.85755 93.44976 91.93543 [13] 58.95828 66.43643 43.27694 119.45328 59.82095 62.61906 [19] 42.42014 68.70138 > colSd(tmp5,na.rm=TRUE) [1] 126.061920 7.561422 8.370372 8.183399 9.306719 8.383305 [7] 8.938801 7.639016 8.430734 6.989818 9.666942 9.588296 [13] 7.678429 8.150855 6.578521 10.929468 7.734401 7.913220 [19] 6.513074 8.288630 > colMax(tmp5,na.rm=TRUE) [1] 467.85676 81.15447 85.88728 84.57115 86.62236 84.03576 87.22192 [8] 83.24157 86.34454 77.95013 94.45589 87.79741 78.96091 87.35274 [15] 79.22448 86.34430 80.96884 78.12058 84.86297 81.82117 > colMin(tmp5,na.rm=TRUE) [1] 59.85388 57.12176 59.06187 58.87364 60.65550 56.55004 58.97586 62.38175 [9] 55.23944 59.55194 62.67459 55.43507 53.93924 60.16605 56.52004 55.88140 [17] 56.75331 55.42330 62.30889 59.28062 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.29694 66.33020 69.67769 70.40860 66.67146 68.21785 NaN 70.55221 [9] 71.82609 74.54307 > rowSums(tmp5,na.rm=TRUE) [1] 1805.939 1326.604 1393.554 1408.172 1333.429 1364.357 0.000 1411.044 [9] 1436.522 1490.861 > rowVars(tmp5,na.rm=TRUE) [1] 7948.42969 89.21959 51.77612 65.22554 87.02110 50.21330 [7] NA 59.62739 50.36461 76.61641 > rowSd(tmp5,na.rm=TRUE) [1] 89.153966 9.445612 7.195562 8.076233 9.328510 7.086134 NA [8] 7.721877 7.096803 8.753080 > rowMax(tmp5,na.rm=TRUE) [1] 467.85676 85.88728 87.79741 82.76001 87.35274 78.96091 NA [8] 88.89953 86.34454 94.45589 > rowMin(tmp5,na.rm=TRUE) [1] 55.42330 56.55004 61.18405 55.23944 53.93924 55.43507 NA 60.24696 [9] 61.80843 62.39046 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 113.25975 69.61651 74.17262 70.80869 67.51655 66.75943 70.03951 [8] 70.07164 70.30613 69.20521 73.93252 NaN 68.66836 68.16462 [15] 65.89033 70.72272 69.56724 66.59884 74.54194 70.30001 > colSums(tmp5,na.rm=TRUE) [1] 1019.3377 626.5486 667.5536 637.2782 607.6490 600.8349 630.3556 [8] 630.6448 632.7551 622.8469 665.3927 0.0000 618.0152 613.4816 [15] 593.0130 636.5044 626.1051 599.3895 670.8774 632.7001 > colVars(tmp5,na.rm=TRUE) [1] 17759.10860 46.75864 67.90347 71.31563 56.37579 68.48167 [7] 88.89850 46.13609 79.91627 45.70690 101.92516 NA [13] 66.18813 72.70692 47.32125 119.59678 66.95308 69.21729 [19] 30.88732 73.81029 > colSd(tmp5,na.rm=TRUE) [1] 133.263306 6.838029 8.240356 8.444858 7.508381 8.275365 [7] 9.428600 6.792355 8.939590 6.760688 10.095799 NA [13] 8.135609 8.526835 6.879044 10.936031 8.182486 8.319693 [19] 5.557636 8.591291 > colMax(tmp5,na.rm=TRUE) [1] 467.85676 81.15447 85.88728 84.57115 81.14339 84.03576 87.22192 [8] 82.76001 86.34454 77.95013 94.45589 -Inf 78.96091 87.35274 [15] 79.22448 86.34430 80.96884 78.12058 84.86297 81.82117 > colMin(tmp5,na.rm=TRUE) [1] 59.85388 60.21759 59.06187 58.87364 60.65550 56.55004 58.97586 62.38175 [9] 55.23944 59.55194 62.67459 Inf 53.93924 60.16605 56.52004 55.88140 [17] 56.75331 55.42330 64.77295 59.28062 > > > > > 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] 189.85470 410.69526 97.28717 286.60245 194.98114 342.53550 223.90678 [8] 78.15885 186.55997 190.21016 > apply(copymatrix,1,var,na.rm=TRUE) [1] 189.85470 410.69526 97.28717 286.60245 194.98114 342.53550 223.90678 [8] 78.15885 186.55997 190.21016 > > > > 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.421085e-13 -1.421085e-14 5.684342e-14 1.705303e-13 8.526513e-14 [6] -1.136868e-13 0.000000e+00 8.526513e-14 -5.684342e-14 8.526513e-14 [11] 2.842171e-14 2.842171e-14 -2.842171e-14 -1.421085e-13 5.684342e-14 [16] 5.684342e-14 -5.684342e-14 2.273737e-13 -1.421085e-13 -1.136868e-13 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 1 11 3 1 5 5 7 8 9 11 7 1 2 5 3 7 2 17 7 3 7 5 10 16 10 20 4 5 10 14 4 16 7 19 10 9 8 15 8 20 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 2.259872 > Min(tmp) [1] -3.66149 > mean(tmp) [1] -0.06066031 > Sum(tmp) [1] -6.066031 > Var(tmp) [1] 1.130534 > > rowMeans(tmp) [1] -0.06066031 > rowSums(tmp) [1] -6.066031 > rowVars(tmp) [1] 1.130534 > rowSd(tmp) [1] 1.063266 > rowMax(tmp) [1] 2.259872 > rowMin(tmp) [1] -3.66149 > > colMeans(tmp) [1] 1.21298026 -1.06487491 0.55885698 0.54037835 0.64547056 0.91012973 [7] -0.70762437 -0.51186258 -1.14832983 0.11583493 2.15572433 -0.25827922 [13] -0.94790158 1.12709629 -1.66077167 -1.96172441 -0.29901606 1.57420875 [19] 0.51259656 -0.63934524 1.65607387 1.06838103 -0.87936068 0.87433240 [25] 0.23145454 -0.71184975 -0.01542882 0.93981621 -0.15938278 -0.81965062 [31] 0.32595761 -0.92383056 -0.88703820 -0.06397937 -0.92319517 1.33914860 [37] 0.88415772 -0.70187770 -1.99136975 1.17795950 0.62175861 -1.40905091 [43] -1.50552105 2.25987163 0.81496510 0.25197437 -1.23407506 -0.91592022 [49] -0.01756819 0.64409677 0.14289877 -1.14898400 -0.54344903 -0.85328748 [55] -0.90664244 0.94379715 0.51562422 -0.42597244 0.13409408 -0.32452414 [61] 0.82438089 -1.83650671 -0.20999508 1.49505648 0.87019458 0.28177021 [67] -0.61707990 1.72212864 -0.85576062 0.78494351 0.83445449 -2.84366328 [73] -0.80172506 -0.60125894 0.56143189 -0.16240866 -0.62545146 0.48315330 [79] -1.23358788 0.72861627 -0.21112231 -1.34737698 0.35870951 1.54746280 [85] 1.81834672 -0.19498346 0.45293201 1.33801513 0.15208961 0.37258589 [91] -0.07553366 0.78938276 -0.61060335 -1.37371474 -0.60129986 -0.96031240 [97] -0.55450178 0.29653582 -3.66149050 -0.01779603 > colSums(tmp) [1] 1.21298026 -1.06487491 0.55885698 0.54037835 0.64547056 0.91012973 [7] -0.70762437 -0.51186258 -1.14832983 0.11583493 2.15572433 -0.25827922 [13] -0.94790158 1.12709629 -1.66077167 -1.96172441 -0.29901606 1.57420875 [19] 0.51259656 -0.63934524 1.65607387 1.06838103 -0.87936068 0.87433240 [25] 0.23145454 -0.71184975 -0.01542882 0.93981621 -0.15938278 -0.81965062 [31] 0.32595761 -0.92383056 -0.88703820 -0.06397937 -0.92319517 1.33914860 [37] 0.88415772 -0.70187770 -1.99136975 1.17795950 0.62175861 -1.40905091 [43] -1.50552105 2.25987163 0.81496510 0.25197437 -1.23407506 -0.91592022 [49] -0.01756819 0.64409677 0.14289877 -1.14898400 -0.54344903 -0.85328748 [55] -0.90664244 0.94379715 0.51562422 -0.42597244 0.13409408 -0.32452414 [61] 0.82438089 -1.83650671 -0.20999508 1.49505648 0.87019458 0.28177021 [67] -0.61707990 1.72212864 -0.85576062 0.78494351 0.83445449 -2.84366328 [73] -0.80172506 -0.60125894 0.56143189 -0.16240866 -0.62545146 0.48315330 [79] -1.23358788 0.72861627 -0.21112231 -1.34737698 0.35870951 1.54746280 [85] 1.81834672 -0.19498346 0.45293201 1.33801513 0.15208961 0.37258589 [91] -0.07553366 0.78938276 -0.61060335 -1.37371474 -0.60129986 -0.96031240 [97] -0.55450178 0.29653582 -3.66149050 -0.01779603 > 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.21298026 -1.06487491 0.55885698 0.54037835 0.64547056 0.91012973 [7] -0.70762437 -0.51186258 -1.14832983 0.11583493 2.15572433 -0.25827922 [13] -0.94790158 1.12709629 -1.66077167 -1.96172441 -0.29901606 1.57420875 [19] 0.51259656 -0.63934524 1.65607387 1.06838103 -0.87936068 0.87433240 [25] 0.23145454 -0.71184975 -0.01542882 0.93981621 -0.15938278 -0.81965062 [31] 0.32595761 -0.92383056 -0.88703820 -0.06397937 -0.92319517 1.33914860 [37] 0.88415772 -0.70187770 -1.99136975 1.17795950 0.62175861 -1.40905091 [43] -1.50552105 2.25987163 0.81496510 0.25197437 -1.23407506 -0.91592022 [49] -0.01756819 0.64409677 0.14289877 -1.14898400 -0.54344903 -0.85328748 [55] -0.90664244 0.94379715 0.51562422 -0.42597244 0.13409408 -0.32452414 [61] 0.82438089 -1.83650671 -0.20999508 1.49505648 0.87019458 0.28177021 [67] -0.61707990 1.72212864 -0.85576062 0.78494351 0.83445449 -2.84366328 [73] -0.80172506 -0.60125894 0.56143189 -0.16240866 -0.62545146 0.48315330 [79] -1.23358788 0.72861627 -0.21112231 -1.34737698 0.35870951 1.54746280 [85] 1.81834672 -0.19498346 0.45293201 1.33801513 0.15208961 0.37258589 [91] -0.07553366 0.78938276 -0.61060335 -1.37371474 -0.60129986 -0.96031240 [97] -0.55450178 0.29653582 -3.66149050 -0.01779603 > colMin(tmp) [1] 1.21298026 -1.06487491 0.55885698 0.54037835 0.64547056 0.91012973 [7] -0.70762437 -0.51186258 -1.14832983 0.11583493 2.15572433 -0.25827922 [13] -0.94790158 1.12709629 -1.66077167 -1.96172441 -0.29901606 1.57420875 [19] 0.51259656 -0.63934524 1.65607387 1.06838103 -0.87936068 0.87433240 [25] 0.23145454 -0.71184975 -0.01542882 0.93981621 -0.15938278 -0.81965062 [31] 0.32595761 -0.92383056 -0.88703820 -0.06397937 -0.92319517 1.33914860 [37] 0.88415772 -0.70187770 -1.99136975 1.17795950 0.62175861 -1.40905091 [43] -1.50552105 2.25987163 0.81496510 0.25197437 -1.23407506 -0.91592022 [49] -0.01756819 0.64409677 0.14289877 -1.14898400 -0.54344903 -0.85328748 [55] -0.90664244 0.94379715 0.51562422 -0.42597244 0.13409408 -0.32452414 [61] 0.82438089 -1.83650671 -0.20999508 1.49505648 0.87019458 0.28177021 [67] -0.61707990 1.72212864 -0.85576062 0.78494351 0.83445449 -2.84366328 [73] -0.80172506 -0.60125894 0.56143189 -0.16240866 -0.62545146 0.48315330 [79] -1.23358788 0.72861627 -0.21112231 -1.34737698 0.35870951 1.54746280 [85] 1.81834672 -0.19498346 0.45293201 1.33801513 0.15208961 0.37258589 [91] -0.07553366 0.78938276 -0.61060335 -1.37371474 -0.60129986 -0.96031240 [97] -0.55450178 0.29653582 -3.66149050 -0.01779603 > colMedians(tmp) [1] 1.21298026 -1.06487491 0.55885698 0.54037835 0.64547056 0.91012973 [7] -0.70762437 -0.51186258 -1.14832983 0.11583493 2.15572433 -0.25827922 [13] -0.94790158 1.12709629 -1.66077167 -1.96172441 -0.29901606 1.57420875 [19] 0.51259656 -0.63934524 1.65607387 1.06838103 -0.87936068 0.87433240 [25] 0.23145454 -0.71184975 -0.01542882 0.93981621 -0.15938278 -0.81965062 [31] 0.32595761 -0.92383056 -0.88703820 -0.06397937 -0.92319517 1.33914860 [37] 0.88415772 -0.70187770 -1.99136975 1.17795950 0.62175861 -1.40905091 [43] -1.50552105 2.25987163 0.81496510 0.25197437 -1.23407506 -0.91592022 [49] -0.01756819 0.64409677 0.14289877 -1.14898400 -0.54344903 -0.85328748 [55] -0.90664244 0.94379715 0.51562422 -0.42597244 0.13409408 -0.32452414 [61] 0.82438089 -1.83650671 -0.20999508 1.49505648 0.87019458 0.28177021 [67] -0.61707990 1.72212864 -0.85576062 0.78494351 0.83445449 -2.84366328 [73] -0.80172506 -0.60125894 0.56143189 -0.16240866 -0.62545146 0.48315330 [79] -1.23358788 0.72861627 -0.21112231 -1.34737698 0.35870951 1.54746280 [85] 1.81834672 -0.19498346 0.45293201 1.33801513 0.15208961 0.37258589 [91] -0.07553366 0.78938276 -0.61060335 -1.37371474 -0.60129986 -0.96031240 [97] -0.55450178 0.29653582 -3.66149050 -0.01779603 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.21298 -1.064875 0.558857 0.5403783 0.6454706 0.9101297 -0.7076244 [2,] 1.21298 -1.064875 0.558857 0.5403783 0.6454706 0.9101297 -0.7076244 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.5118626 -1.14833 0.1158349 2.155724 -0.2582792 -0.9479016 1.127096 [2,] -0.5118626 -1.14833 0.1158349 2.155724 -0.2582792 -0.9479016 1.127096 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -1.660772 -1.961724 -0.2990161 1.574209 0.5125966 -0.6393452 1.656074 [2,] -1.660772 -1.961724 -0.2990161 1.574209 0.5125966 -0.6393452 1.656074 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.068381 -0.8793607 0.8743324 0.2314545 -0.7118498 -0.01542882 0.9398162 [2,] 1.068381 -0.8793607 0.8743324 0.2314545 -0.7118498 -0.01542882 0.9398162 [,29] [,30] [,31] [,32] [,33] [,34] [1,] -0.1593828 -0.8196506 0.3259576 -0.9238306 -0.8870382 -0.06397937 [2,] -0.1593828 -0.8196506 0.3259576 -0.9238306 -0.8870382 -0.06397937 [,35] [,36] [,37] [,38] [,39] [,40] [,41] [1,] -0.9231952 1.339149 0.8841577 -0.7018777 -1.99137 1.17796 0.6217586 [2,] -0.9231952 1.339149 0.8841577 -0.7018777 -1.99137 1.17796 0.6217586 [,42] [,43] [,44] [,45] [,46] [,47] [,48] [1,] -1.409051 -1.505521 2.259872 0.8149651 0.2519744 -1.234075 -0.9159202 [2,] -1.409051 -1.505521 2.259872 0.8149651 0.2519744 -1.234075 -0.9159202 [,49] [,50] [,51] [,52] [,53] [,54] [,55] [1,] -0.01756819 0.6440968 0.1428988 -1.148984 -0.543449 -0.8532875 -0.9066424 [2,] -0.01756819 0.6440968 0.1428988 -1.148984 -0.543449 -0.8532875 -0.9066424 [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] 0.9437971 0.5156242 -0.4259724 0.1340941 -0.3245241 0.8243809 -1.836507 [2,] 0.9437971 0.5156242 -0.4259724 0.1340941 -0.3245241 0.8243809 -1.836507 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [1,] -0.2099951 1.495056 0.8701946 0.2817702 -0.6170799 1.722129 -0.8557606 [2,] -0.2099951 1.495056 0.8701946 0.2817702 -0.6170799 1.722129 -0.8557606 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] 0.7849435 0.8344545 -2.843663 -0.8017251 -0.6012589 0.5614319 -0.1624087 [2,] 0.7849435 0.8344545 -2.843663 -0.8017251 -0.6012589 0.5614319 -0.1624087 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] -0.6254515 0.4831533 -1.233588 0.7286163 -0.2111223 -1.347377 0.3587095 [2,] -0.6254515 0.4831533 -1.233588 0.7286163 -0.2111223 -1.347377 0.3587095 [,84] [,85] [,86] [,87] [,88] [,89] [,90] [1,] 1.547463 1.818347 -0.1949835 0.452932 1.338015 0.1520896 0.3725859 [2,] 1.547463 1.818347 -0.1949835 0.452932 1.338015 0.1520896 0.3725859 [,91] [,92] [,93] [,94] [,95] [,96] [1,] -0.07553366 0.7893828 -0.6106033 -1.373715 -0.6012999 -0.9603124 [2,] -0.07553366 0.7893828 -0.6106033 -1.373715 -0.6012999 -0.9603124 [,97] [,98] [,99] [,100] [1,] -0.5545018 0.2965358 -3.66149 -0.01779603 [2,] -0.5545018 0.2965358 -3.66149 -0.01779603 > > > Max(tmp2) [1] 2.508304 > Min(tmp2) [1] -3.728995 > mean(tmp2) [1] 0.01384221 > Sum(tmp2) [1] 1.384221 > Var(tmp2) [1] 1.390482 > > rowMeans(tmp2) [1] 0.88251052 1.97561780 1.23346229 -1.05904101 -0.16621501 -0.24059217 [7] 0.77554031 0.86618052 0.22909696 -3.72899519 0.04308879 -1.62149947 [13] -1.04467760 0.76740543 -1.75232920 0.50109527 0.26456180 -0.42850813 [19] 0.96236085 -1.56110591 -1.19491513 0.82016311 0.49064366 -0.72313529 [25] -1.49907582 -2.15638251 -0.27233363 0.32775510 -1.09559736 0.81113135 [31] 0.02031785 -1.41610143 0.49222865 -0.80234856 1.75000168 1.77368205 [37] -0.99142285 -0.02420836 -0.52157286 0.23205677 -0.80628203 0.92982749 [43] -0.88734685 0.87968364 -1.50489431 -2.76513739 -0.52762508 -1.11586955 [49] -1.76078892 -1.86601217 0.14462274 0.67694302 0.30005000 -0.85856700 [55] 0.13598919 0.83336762 -0.18070207 0.18080059 -0.69905342 0.55110522 [61] 0.79531143 1.97189844 0.22706433 1.28533897 1.49758420 1.41278668 [67] 0.92768471 0.65050039 1.93040555 0.25845134 0.43945480 0.44272876 [73] 0.93471123 0.31448552 -0.22692419 -1.07154744 1.00708349 -0.35007877 [79] 0.95690915 0.99736873 -1.07229987 1.37570139 0.03447897 0.55146628 [85] -0.55921863 -0.81407160 -1.41140880 1.53904961 0.97738851 2.48849130 [91] -0.98392282 -2.39747026 0.30434570 -0.73608680 2.50830357 2.14778189 [97] -0.27362849 0.16137962 0.04297363 -1.47920330 > rowSums(tmp2) [1] 0.88251052 1.97561780 1.23346229 -1.05904101 -0.16621501 -0.24059217 [7] 0.77554031 0.86618052 0.22909696 -3.72899519 0.04308879 -1.62149947 [13] -1.04467760 0.76740543 -1.75232920 0.50109527 0.26456180 -0.42850813 [19] 0.96236085 -1.56110591 -1.19491513 0.82016311 0.49064366 -0.72313529 [25] -1.49907582 -2.15638251 -0.27233363 0.32775510 -1.09559736 0.81113135 [31] 0.02031785 -1.41610143 0.49222865 -0.80234856 1.75000168 1.77368205 [37] -0.99142285 -0.02420836 -0.52157286 0.23205677 -0.80628203 0.92982749 [43] -0.88734685 0.87968364 -1.50489431 -2.76513739 -0.52762508 -1.11586955 [49] -1.76078892 -1.86601217 0.14462274 0.67694302 0.30005000 -0.85856700 [55] 0.13598919 0.83336762 -0.18070207 0.18080059 -0.69905342 0.55110522 [61] 0.79531143 1.97189844 0.22706433 1.28533897 1.49758420 1.41278668 [67] 0.92768471 0.65050039 1.93040555 0.25845134 0.43945480 0.44272876 [73] 0.93471123 0.31448552 -0.22692419 -1.07154744 1.00708349 -0.35007877 [79] 0.95690915 0.99736873 -1.07229987 1.37570139 0.03447897 0.55146628 [85] -0.55921863 -0.81407160 -1.41140880 1.53904961 0.97738851 2.48849130 [91] -0.98392282 -2.39747026 0.30434570 -0.73608680 2.50830357 2.14778189 [97] -0.27362849 0.16137962 0.04297363 -1.47920330 > 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] 0.88251052 1.97561780 1.23346229 -1.05904101 -0.16621501 -0.24059217 [7] 0.77554031 0.86618052 0.22909696 -3.72899519 0.04308879 -1.62149947 [13] -1.04467760 0.76740543 -1.75232920 0.50109527 0.26456180 -0.42850813 [19] 0.96236085 -1.56110591 -1.19491513 0.82016311 0.49064366 -0.72313529 [25] -1.49907582 -2.15638251 -0.27233363 0.32775510 -1.09559736 0.81113135 [31] 0.02031785 -1.41610143 0.49222865 -0.80234856 1.75000168 1.77368205 [37] -0.99142285 -0.02420836 -0.52157286 0.23205677 -0.80628203 0.92982749 [43] -0.88734685 0.87968364 -1.50489431 -2.76513739 -0.52762508 -1.11586955 [49] -1.76078892 -1.86601217 0.14462274 0.67694302 0.30005000 -0.85856700 [55] 0.13598919 0.83336762 -0.18070207 0.18080059 -0.69905342 0.55110522 [61] 0.79531143 1.97189844 0.22706433 1.28533897 1.49758420 1.41278668 [67] 0.92768471 0.65050039 1.93040555 0.25845134 0.43945480 0.44272876 [73] 0.93471123 0.31448552 -0.22692419 -1.07154744 1.00708349 -0.35007877 [79] 0.95690915 0.99736873 -1.07229987 1.37570139 0.03447897 0.55146628 [85] -0.55921863 -0.81407160 -1.41140880 1.53904961 0.97738851 2.48849130 [91] -0.98392282 -2.39747026 0.30434570 -0.73608680 2.50830357 2.14778189 [97] -0.27362849 0.16137962 0.04297363 -1.47920330 > rowMin(tmp2) [1] 0.88251052 1.97561780 1.23346229 -1.05904101 -0.16621501 -0.24059217 [7] 0.77554031 0.86618052 0.22909696 -3.72899519 0.04308879 -1.62149947 [13] -1.04467760 0.76740543 -1.75232920 0.50109527 0.26456180 -0.42850813 [19] 0.96236085 -1.56110591 -1.19491513 0.82016311 0.49064366 -0.72313529 [25] -1.49907582 -2.15638251 -0.27233363 0.32775510 -1.09559736 0.81113135 [31] 0.02031785 -1.41610143 0.49222865 -0.80234856 1.75000168 1.77368205 [37] -0.99142285 -0.02420836 -0.52157286 0.23205677 -0.80628203 0.92982749 [43] -0.88734685 0.87968364 -1.50489431 -2.76513739 -0.52762508 -1.11586955 [49] -1.76078892 -1.86601217 0.14462274 0.67694302 0.30005000 -0.85856700 [55] 0.13598919 0.83336762 -0.18070207 0.18080059 -0.69905342 0.55110522 [61] 0.79531143 1.97189844 0.22706433 1.28533897 1.49758420 1.41278668 [67] 0.92768471 0.65050039 1.93040555 0.25845134 0.43945480 0.44272876 [73] 0.93471123 0.31448552 -0.22692419 -1.07154744 1.00708349 -0.35007877 [79] 0.95690915 0.99736873 -1.07229987 1.37570139 0.03447897 0.55146628 [85] -0.55921863 -0.81407160 -1.41140880 1.53904961 0.97738851 2.48849130 [91] -0.98392282 -2.39747026 0.30434570 -0.73608680 2.50830357 2.14778189 [97] -0.27362849 0.16137962 0.04297363 -1.47920330 > > colMeans(tmp2) [1] 0.01384221 > colSums(tmp2) [1] 1.384221 > colVars(tmp2) [1] 1.390482 > colSd(tmp2) [1] 1.179187 > colMax(tmp2) [1] 2.508304 > colMin(tmp2) [1] -3.728995 > colMedians(tmp2) [1] 0.1710901 > colRanges(tmp2) [,1] [1,] -3.728995 [2,] 2.508304 > > 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] 5.6222034 0.7786130 -0.5301262 -2.5145372 -3.7625533 1.8914488 [7] 0.5195893 -1.4322193 -2.1316068 5.0792820 > colApply(tmp,quantile)[,1] [,1] [1,] -1.1067806 [2,] -0.4506783 [3,] 0.2945648 [4,] 1.2850040 [5,] 3.2570855 > > rowApply(tmp,sum) [1] 2.2722055 2.4805102 -3.3696953 -0.6412647 -1.4991897 -0.9772473 [7] -0.7909531 -1.3266099 3.4337908 3.9385473 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 10 2 10 6 2 5 10 9 1 4 [2,] 1 3 7 9 7 8 7 7 4 3 [3,] 3 1 4 4 10 3 3 8 10 10 [4,] 5 7 6 7 5 6 1 2 8 1 [5,] 9 4 3 3 4 1 4 3 3 7 [6,] 8 8 8 2 8 4 9 4 5 2 [7,] 6 9 5 1 3 2 5 10 9 8 [8,] 2 5 2 8 1 9 6 5 6 5 [9,] 7 6 1 5 9 10 2 1 2 9 [10,] 4 10 9 10 6 7 8 6 7 6 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.85079044 -0.26245945 1.09895950 0.72297278 -1.49334816 0.99110593 [7] 2.62023613 1.89352582 -3.35642848 3.03767807 0.92462631 1.87194855 [13] 1.12717612 -1.44701253 1.43430807 3.81495443 -0.55338193 0.98402531 [19] -0.08571373 0.64668027 > colApply(tmp,quantile)[,1] [,1] [1,] -0.68640501 [2,] -0.12459938 [3,] 0.06165721 [4,] 0.77811378 [5,] 0.82202384 > > rowApply(tmp,sum) [1] 1.028914 -2.772571 8.147334 7.168338 1.248629 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 5 16 13 8 12 [2,] 7 11 11 10 6 [3,] 4 7 20 17 4 [4,] 20 4 12 5 7 [5,] 8 12 3 3 13 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.68640501 -0.2359567 -0.8468333 1.6387481 -0.18805426 0.47017785 [2,] 0.82202384 -0.3020788 -0.6461575 -0.7222323 -0.13007308 -0.89738690 [3,] 0.77811378 0.5515654 2.2277507 0.5806817 -0.43517330 -0.09773566 [4,] -0.12459938 0.2859184 1.1032834 -0.3734411 -0.80712590 -0.38829122 [5,] 0.06165721 -0.5619077 -0.7390839 -0.4007836 0.06707838 1.90434186 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.1327138 -0.8645669 0.02532136 0.9027289 -0.4258756 0.7928794 [2,] -0.3550261 -0.1202054 -0.42840494 -0.4273174 -0.7148107 -1.4830504 [3,] 0.9478804 0.4773764 -0.06315481 1.7376155 -1.3269593 0.3544061 [4,] 2.0363024 1.6441806 -1.17602588 0.6638173 1.7476883 0.8948740 [5,] -0.1416344 0.7567411 -1.71416421 0.1608337 1.6445837 1.3128393 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.51224301 -0.05632222 0.04486477 -0.07161813 0.3853558 1.01526800 [2,] -0.09839684 0.88436991 1.19392087 0.17248462 -0.7135902 -1.67117803 [3,] 0.77931804 -0.37115404 -0.31147911 0.85460654 0.2783983 1.86826303 [4,] -0.33850337 -1.07584002 0.84219142 1.06805866 0.7283952 -0.13980139 [5,] -0.72748472 -0.82806617 -0.33518989 1.79142273 -1.2319410 -0.08852629 [,19] [,20] [1,] -1.5214118 -0.99434354 [2,] 1.8675529 0.99698573 [3,] -1.6577047 0.97471949 [4,] 0.6526843 -0.07542837 [5,] 0.5731655 -0.25525304 > > > 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 : 652 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 0.433352 0.1855657 1.074135 1.819978 -0.8276315 1.551064 0.5737053 col8 col9 col10 col11 col12 col13 col14 row1 -1.696254 -0.6643834 0.3297671 -0.2618808 -0.194473 -0.2350516 -1.589557 col15 col16 col17 col18 col19 col20 row1 -1.50505 0.1538304 -0.4345694 0.6174616 0.6904533 0.8641084 > tmp[,"col10"] col10 row1 0.3297671 row2 -1.2387408 row3 0.6171204 row4 0.1907035 row5 0.3696589 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 0.433352 0.1855657 1.0741347 1.819978 -0.8276315 1.5510641 0.5737053 row5 -1.377249 -0.5601914 0.2673272 -1.017338 1.0085829 -0.5491831 1.4134164 col8 col9 col10 col11 col12 col13 col14 row1 -1.696254 -0.66438340 0.3297671 -0.2618808 -0.194473 -0.2350516 -1.5895571 row5 0.527401 -0.02575075 0.3696589 -0.3445014 -1.691503 0.2066458 -0.2032097 col15 col16 col17 col18 col19 col20 row1 -1.5050502 0.1538304 -0.4345694 0.6174616 0.6904533 0.8641084 row5 0.2333988 0.4386404 -0.6231076 0.1880711 -0.8415682 -0.1127091 > tmp[,c("col6","col20")] col6 col20 row1 1.5510641 0.8641084 row2 -0.4265516 0.4601021 row3 -0.3939630 0.6207865 row4 -0.6956795 1.4146377 row5 -0.5491831 -0.1127091 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 1.5510641 0.8641084 row5 -0.5491831 -0.1127091 > > > > > 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 51.38515 50.8274 49.89285 49.79588 49.29773 105.4194 50.78044 49.22415 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.99556 49.05721 49.09018 51.57201 50.66985 50.24104 48.22016 49.55752 col17 col18 col19 col20 row1 49.35349 49.98812 48.52575 105.6124 > tmp[,"col10"] col10 row1 49.05721 row2 28.45913 row3 29.98197 row4 30.55017 row5 49.16295 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.38515 50.82740 49.89285 49.79588 49.29773 105.4194 50.78044 49.22415 row5 50.94414 51.71346 51.71055 51.25379 52.98667 105.7202 49.44136 49.62841 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.99556 49.05721 49.09018 51.57201 50.66985 50.24104 48.22016 49.55752 row5 50.48767 49.16295 49.74120 50.37666 49.29266 51.48628 49.93031 50.94945 col17 col18 col19 col20 row1 49.35349 49.98812 48.52575 105.6124 row5 49.73406 51.10129 52.00017 106.8513 > tmp[,c("col6","col20")] col6 col20 row1 105.41941 105.61238 row2 76.30172 75.86689 row3 74.00397 75.73353 row4 75.64372 76.08095 row5 105.72018 106.85128 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.4194 105.6124 row5 105.7202 106.8513 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.4194 105.6124 row5 105.7202 106.8513 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.8937532 [2,] -0.3280207 [3,] -0.8962074 [4,] -0.9028310 [5,] 1.9083779 > tmp[,c("col17","col7")] col17 col7 [1,] -0.6848181858 1.53801961 [2,] 0.7620464984 -2.21525092 [3,] -1.1672348874 -0.13214103 [4,] -0.0009895758 0.04894891 [5,] -0.0571676478 0.23416713 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.00549626 -1.1163624 [2,] 0.13770500 -1.4192453 [3,] -0.68455269 -0.8785516 [4,] -0.95229151 1.0144402 [5,] 0.09277141 1.2716748 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.005496 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.005496 [2,] 0.137705 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 1.1486061 -0.3649351 -1.1658123 -0.5063600 -0.5369896 -0.9397835 row1 0.7982294 -0.7277730 -0.0510896 -0.1054752 0.2115700 -0.5078646 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 0.8705524 -1.2863002 -0.2476823 2.0072333 -0.624456 -0.222516 0.3355408 row1 -0.5956231 0.1248177 1.6768729 -0.3657412 0.675533 -1.324405 0.2823613 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.2896464 -0.5682000 -0.5767084 0.61146324 0.95227223 0.0234980 row1 1.7935343 0.6299986 1.4464663 0.06186298 -0.03997096 -0.0983708 [,20] row3 0.7356601 row1 0.9003116 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 1.277942 0.5340231 0.8548809 -0.8022929 0.8289646 -0.724849 -0.6510643 [,8] [,9] [,10] row2 0.1289073 1.071445 0.4246807 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -1.027132 -0.300519 -2.016992 1.209231 -0.7573943 -0.8448306 -1.85815 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.6031742 -0.1116559 1.205352 1.369352 -0.759664 -0.5630611 0.4214047 [,15] [,16] [,17] [,18] [,19] [,20] row5 -1.554025 -2.04066 1.95949 0.7436977 0.3639667 -0.6001394 > > > 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: 0x16b3edb0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf640807d1" [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf4e89d955" [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf6d070e40" [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf36b3c6f4" [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf6f5c98c" [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf2812e723" [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf485defe7" [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf76da43b3" [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bfe5355f4" [10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf7056e045" [11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf44f1d128" [12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bfb78fc9f" [13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf2a8cfaf2" [14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf6012522e" [15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM1b66bf5ab3f0ca" > > > ### 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: 0x15363470> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x15363470> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x15363470> > rowMedians(tmp) [1] -0.0538293459 0.3757193168 -0.3846768483 -0.0264157819 0.0577033738 [6] 0.1277265866 0.2796927131 -0.4138429420 -0.1647064535 0.3784165975 [11] -0.1438366671 -0.1476184104 -0.1680867846 0.1417670266 -0.1576005384 [16] -0.4796508270 -0.2931502490 0.4048234002 -0.3848852330 0.0546939651 [21] 0.2597927712 -0.4051981654 -0.0985424689 0.0979358503 0.4126924440 [26] -0.7278306221 -0.5275240907 0.2154114460 -0.3374501852 -0.6490660488 [31] -0.2265652705 -0.0198271570 -0.5801383652 -0.1262922314 -0.5785025893 [36] 0.4343966923 0.5197651775 0.5750665247 0.2607736097 0.2269919958 [41] -0.0975530842 -0.0787680657 0.0544530693 -0.0856185746 -0.1776830525 [46] 0.1396681393 -0.0168189842 -0.0990845956 0.3338281346 -0.0464876010 [51] -0.1159656674 0.1184484078 -0.5504519643 -0.1006593306 -0.4684637818 [56] 0.6791591700 0.1094217714 -0.1672938497 0.1493603373 0.5233948937 [61] 0.3496663836 0.2045340395 0.4157787949 0.1411801704 0.2442496994 [66] 0.6730887413 0.1383944341 0.2128320279 -0.3330333792 0.1007273623 [71] -0.3994980722 0.0488638068 -0.1573014360 -0.0263534275 -0.1100444388 [76] -0.5652301527 -0.0325650740 0.5710402241 0.0833439740 0.3263445334 [81] -0.0461898234 0.1997319511 0.1525628704 0.2597865554 -0.1606533981 [86] -0.2429962906 0.3391773065 0.4410938583 0.0151463857 -0.0934320146 [91] 0.2963103157 0.4365493953 0.0685402117 -0.3004172073 0.1465139895 [96] -0.1514364447 0.2162891262 -0.2185789766 0.4214120077 -0.1195805019 [101] 0.1049613164 -0.0791777149 -0.1640598635 -0.1281490377 0.2849064543 [106] 0.1194829891 0.0989754090 -0.3200098826 -0.0483428486 -0.1123314050 [111] 0.4581598609 0.1367916795 0.0640280191 -0.1881434572 0.5268937185 [116] -0.9424629723 -0.3198510819 -0.4990601384 -0.0048517173 0.1582285958 [121] 0.0151077207 0.2763834424 0.0456061830 0.0136241541 0.2582277661 [126] -0.0859794542 0.0845030321 -0.0024648087 -0.0044680708 -0.1751635669 [131] 0.0584680542 0.2622834401 -0.0429916780 0.1682163360 0.0079840829 [136] 0.0354942767 -0.1664686222 -0.1776367589 -0.3339404917 -0.0902909608 [141] 0.1407577385 -0.0141708815 0.2803472933 0.0394561898 -0.8563225206 [146] 0.2957979824 -0.0403266567 -0.2583806777 -0.3668382453 0.2878802171 [151] -0.4711887443 0.1592040349 -0.4401285757 0.8404248618 0.0650189559 [156] -0.2453826155 -0.0010535748 -0.2675239521 -0.4262015343 -0.2434031250 [161] -0.2944031009 -0.0759219112 -0.1860146808 -0.0723943754 0.1295165462 [166] 0.2487237347 0.0576416829 -0.1196905026 0.1474210507 -0.5291794148 [171] 0.1736001909 0.4708200678 -0.2021078902 -0.3196976952 -0.1623128284 [176] -0.3588781969 -0.2361668046 -0.1236541953 0.3175987041 0.2726620328 [181] -0.1997296409 0.2252898047 0.0908603397 -0.2779749391 0.7349456016 [186] -0.6025921125 0.3644407130 -0.1688046149 0.0690651847 0.4448622613 [191] -0.1253083867 0.1717801359 0.2099420001 0.1347186795 -0.1632266844 [196] 0.1069673059 -0.7707418771 0.3328795075 0.5719157230 -0.2098084973 [201] -0.2662525730 -0.1602857670 -0.0028254479 -0.0578490081 -0.0044388175 [206] 0.4619210562 -0.2159099422 0.0398790542 0.0332599076 -0.5143576967 [211] 0.4671208895 0.6177074847 -0.2344053177 0.5454987704 0.3969070320 [216] 0.0531798903 -0.1395299666 0.5395899454 -0.2264280908 0.3718720496 [221] -0.2992973986 0.1528820551 -0.0438610191 -0.2259919451 -0.0001485432 [226] 0.2047827545 0.6366806136 -0.4325970092 0.0280879899 0.6265053570 > > proc.time() user system elapsed 1.903 0.845 2.773
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: 0x24dafff0> > .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: 0x24dafff0> > .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: 0x24dafff0> > .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: 0x24dafff0> > 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: 0x24cba470> > .Call("R_bm_AddColumn",P) <pointer: 0x24cba470> > .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: 0x24cba470> > .Call("R_bm_AddColumn",P) <pointer: 0x24cba470> > .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: 0x24cba470> > 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: 0x24c950e0> > .Call("R_bm_AddColumn",P) <pointer: 0x24c950e0> > .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: 0x24c950e0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x24c950e0> > .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: 0x24c950e0> > > .Call("R_bm_RowMode",P) <pointer: 0x24c950e0> > .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: 0x24c950e0> > > .Call("R_bm_ColMode",P) <pointer: 0x24c950e0> > .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: 0x24c950e0> > 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: 0x23c1c520> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x23c1c520> > .Call("R_bm_AddColumn",P) <pointer: 0x23c1c520> > .Call("R_bm_AddColumn",P) <pointer: 0x23c1c520> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1b675c24798220" "BufferedMatrixFile1b675c738864c1" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1b675c24798220" "BufferedMatrixFile1b675c738864c1" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x25b65030> > .Call("R_bm_AddColumn",P) <pointer: 0x25b65030> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x25b65030> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x25b65030> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x25b65030> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x25b65030> > .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: 0x245305c0> > .Call("R_bm_AddColumn",P) <pointer: 0x245305c0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x245305c0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x245305c0> > 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: 0x25610f30> > .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: 0x25610f30> > rm(P) > > proc.time() user system elapsed 0.332 0.039 0.357
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.322 0.056 0.364