Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-10-16 11:41 -0400 (Thu, 16 Oct 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4833 |
merida1 | macOS 12.7.6 Monterey | x86_64 | 4.5.1 RC (2025-06-05 r88288) -- "Great Square Root" | 4614 |
kjohnson1 | macOS 13.7.5 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4555 |
kunpeng2 | Linux (openEuler 24.03 LTS) | aarch64 | R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" | 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 252/2341 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.72.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 24.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
merida1 | macOS 12.7.6 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson1 | macOS 13.7.5 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kunpeng2 | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. - See Martin Grigorov's blog post for how to debug Linux ARM64 related issues on a x86_64 host. |
Package: BufferedMatrix |
Version: 1.72.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.72.0.tar.gz |
StartedAt: 2025-10-14 07:04:25 -0000 (Tue, 14 Oct 2025) |
EndedAt: 2025-10-14 07:04:49 -0000 (Tue, 14 Oct 2025) |
EllapsedTime: 24.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.72.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck’ * using R Under development (unstable) (2025-02-19 r87757) * 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-SP1) * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.72.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.21-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-devel_2025-02-19/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.72.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/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/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/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/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/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/R/R/lib -lR installing to /home/biocbuild/R/R-devel_2025-02-19/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 Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" 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.314 0.052 0.354
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" 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.21-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 477833 25.6 1045337 55.9 639800 34.2 Vcells 884297 6.8 8388608 64.0 2080696 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 Oct 14 07:04:43 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 Oct 14 07:04:43 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: 0x3dd266e0> > > > > 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 Oct 14 07:04:43 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 Oct 14 07:04:44 2025" > > ColMode(tmp2) <pointer: 0x3dd266e0> > > > > ### 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,] 98.7840614 1.0138241 1.3303247 0.7369187 [2,] 1.3689442 2.4047002 -0.6562191 0.5091760 [3,] -0.8991596 -0.6630285 -1.4155801 1.4019586 [4,] 0.9381081 -1.4415394 0.5411536 -0.5368774 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 98.7840614 1.0138241 1.3303247 0.7369187 [2,] 1.3689442 2.4047002 0.6562191 0.5091760 [3,] 0.8991596 0.6630285 1.4155801 1.4019586 [4,] 0.9381081 1.4415394 0.5411536 0.5368774 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9390171 1.0068883 1.1533970 0.8584397 [2,] 1.1700189 1.5507096 0.8100735 0.7135657 [3,] 0.9482403 0.8142656 1.1897815 1.1840433 [4,] 0.9685598 1.2006412 0.7356314 0.7327192 > > 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.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 223.17423 36.08271 37.86430 34.32132 [2,] 38.06913 42.91180 33.75695 32.64483 [3,] 35.38156 33.80569 38.31340 38.24239 [4,] 35.62371 38.44795 32.89747 32.86407 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x3c2fe520> > exp(tmp5) <pointer: 0x3c2fe520> > log(tmp5,2) <pointer: 0x3c2fe520> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 464.5079 > Min(tmp5) [1] 55.08247 > mean(tmp5) [1] 73.70697 > Sum(tmp5) [1] 14741.39 > Var(tmp5) [1] 840.6429 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.17990 72.49509 71.29210 71.42901 69.72819 70.55549 73.23184 73.11027 [9] 70.95320 73.09457 > rowSums(tmp5) [1] 1823.598 1449.902 1425.842 1428.580 1394.564 1411.110 1464.637 1462.205 [9] 1419.064 1461.891 > rowVars(tmp5) [1] 7759.54588 120.44620 69.49057 82.19523 47.30429 58.06506 [7] 58.47710 87.24271 87.88238 63.35254 > rowSd(tmp5) [1] 88.088285 10.974798 8.336100 9.066158 6.877811 7.620044 7.647032 [8] 9.340381 9.374560 7.959431 > rowMax(tmp5) [1] 464.50793 90.64805 84.10309 92.02502 85.13525 85.20028 92.38020 [8] 89.25094 90.20810 86.36952 > rowMin(tmp5) [1] 60.04697 56.07614 59.24045 56.31754 55.08247 60.04511 59.80193 55.13788 [9] 57.91098 58.90190 > > colMeans(tmp5) [1] 111.46960 74.59222 72.29614 73.90422 68.95091 74.77255 72.40154 [8] 69.57619 74.34960 69.63011 72.19103 70.83017 70.26728 67.72726 [15] 74.16246 69.14745 72.23360 72.27305 67.92047 75.44349 > colSums(tmp5) [1] 1114.6960 745.9222 722.9614 739.0422 689.5091 747.7255 724.0154 [8] 695.7619 743.4960 696.3011 721.9103 708.3017 702.6728 677.2726 [15] 741.6246 691.4745 722.3360 722.7305 679.2047 754.4349 > colVars(tmp5) [1] 15427.83239 102.91947 59.91533 69.69128 56.92693 144.96614 [7] 65.57378 42.38683 82.23027 46.86977 61.11462 71.44037 [13] 65.36193 82.64358 62.23281 93.44371 143.32491 48.20505 [19] 29.63528 43.86710 > colSd(tmp5) [1] 124.208826 10.144923 7.740499 8.348130 7.544994 12.040189 [7] 8.097764 6.510517 9.068091 6.846150 7.817584 8.452240 [13] 8.084673 9.090852 7.888777 9.666629 11.971838 6.942986 [19] 5.443830 6.623224 > colMax(tmp5) [1] 464.50793 89.31528 81.37512 87.16910 82.16295 92.38020 90.20810 [8] 77.47269 86.19033 80.27256 83.52066 92.02502 82.45599 80.60058 [15] 85.49890 86.24132 90.64805 82.38934 74.44665 85.89570 > colMin(tmp5) [1] 59.00756 55.08247 61.91195 60.13663 59.21603 59.28792 62.08235 59.73160 [9] 60.04697 57.96178 60.54210 61.40706 60.78278 56.07614 60.92714 58.90190 [17] 55.13788 63.45885 58.74675 67.74220 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] 91.17990 72.49509 71.29210 71.42901 69.72819 70.55549 73.23184 73.11027 [9] NA 73.09457 > rowSums(tmp5) [1] 1823.598 1449.902 1425.842 1428.580 1394.564 1411.110 1464.637 1462.205 [9] NA 1461.891 > rowVars(tmp5) [1] 7759.54588 120.44620 69.49057 82.19523 47.30429 58.06506 [7] 58.47710 87.24271 86.88626 63.35254 > rowSd(tmp5) [1] 88.088285 10.974798 8.336100 9.066158 6.877811 7.620044 7.647032 [8] 9.340381 9.321280 7.959431 > rowMax(tmp5) [1] 464.50793 90.64805 84.10309 92.02502 85.13525 85.20028 92.38020 [8] 89.25094 NA 86.36952 > rowMin(tmp5) [1] 60.04697 56.07614 59.24045 56.31754 55.08247 60.04511 59.80193 55.13788 [9] NA 58.90190 > > colMeans(tmp5) [1] 111.46960 74.59222 72.29614 73.90422 68.95091 74.77255 72.40154 [8] 69.57619 74.34960 69.63011 72.19103 70.83017 70.26728 67.72726 [15] NA 69.14745 72.23360 72.27305 67.92047 75.44349 > colSums(tmp5) [1] 1114.6960 745.9222 722.9614 739.0422 689.5091 747.7255 724.0154 [8] 695.7619 743.4960 696.3011 721.9103 708.3017 702.6728 677.2726 [15] NA 691.4745 722.3360 722.7305 679.2047 754.4349 > colVars(tmp5) [1] 15427.83239 102.91947 59.91533 69.69128 56.92693 144.96614 [7] 65.57378 42.38683 82.23027 46.86977 61.11462 71.44037 [13] 65.36193 82.64358 NA 93.44371 143.32491 48.20505 [19] 29.63528 43.86710 > colSd(tmp5) [1] 124.208826 10.144923 7.740499 8.348130 7.544994 12.040189 [7] 8.097764 6.510517 9.068091 6.846150 7.817584 8.452240 [13] 8.084673 9.090852 NA 9.666629 11.971838 6.942986 [19] 5.443830 6.623224 > colMax(tmp5) [1] 464.50793 89.31528 81.37512 87.16910 82.16295 92.38020 90.20810 [8] 77.47269 86.19033 80.27256 83.52066 92.02502 82.45599 80.60058 [15] NA 86.24132 90.64805 82.38934 74.44665 85.89570 > colMin(tmp5) [1] 59.00756 55.08247 61.91195 60.13663 59.21603 59.28792 62.08235 59.73160 [9] 60.04697 57.96178 60.54210 61.40706 60.78278 56.07614 NA 58.90190 [17] 55.13788 63.45885 58.74675 67.74220 > > Max(tmp5,na.rm=TRUE) [1] 464.5079 > Min(tmp5,na.rm=TRUE) [1] 55.08247 > mean(tmp5,na.rm=TRUE) [1] 73.77119 > Sum(tmp5,na.rm=TRUE) [1] 14680.47 > Var(tmp5,na.rm=TRUE) [1] 844.0596 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.17990 72.49509 71.29210 71.42901 69.72819 70.55549 73.23184 73.11027 [9] 71.48089 73.09457 > rowSums(tmp5,na.rm=TRUE) [1] 1823.598 1449.902 1425.842 1428.580 1394.564 1411.110 1464.637 1462.205 [9] 1358.137 1461.891 > rowVars(tmp5,na.rm=TRUE) [1] 7759.54588 120.44620 69.49057 82.19523 47.30429 58.06506 [7] 58.47710 87.24271 86.88626 63.35254 > rowSd(tmp5,na.rm=TRUE) [1] 88.088285 10.974798 8.336100 9.066158 6.877811 7.620044 7.647032 [8] 9.340381 9.321280 7.959431 > rowMax(tmp5,na.rm=TRUE) [1] 464.50793 90.64805 84.10309 92.02502 85.13525 85.20028 92.38020 [8] 89.25094 90.20810 86.36952 > rowMin(tmp5,na.rm=TRUE) [1] 60.04697 56.07614 59.24045 56.31754 55.08247 60.04511 59.80193 55.13788 [9] 57.91098 58.90190 > > colMeans(tmp5,na.rm=TRUE) [1] 111.46960 74.59222 72.29614 73.90422 68.95091 74.77255 72.40154 [8] 69.57619 74.34960 69.63011 72.19103 70.83017 70.26728 67.72726 [15] 75.63305 69.14745 72.23360 72.27305 67.92047 75.44349 > colSums(tmp5,na.rm=TRUE) [1] 1114.6960 745.9222 722.9614 739.0422 689.5091 747.7255 724.0154 [8] 695.7619 743.4960 696.3011 721.9103 708.3017 702.6728 677.2726 [15] 680.6974 691.4745 722.3360 722.7305 679.2047 754.4349 > colVars(tmp5,na.rm=TRUE) [1] 15427.83239 102.91947 59.91533 69.69128 56.92693 144.96614 [7] 65.57378 42.38683 82.23027 46.86977 61.11462 71.44037 [13] 65.36193 82.64358 45.68223 93.44371 143.32491 48.20505 [19] 29.63528 43.86710 > colSd(tmp5,na.rm=TRUE) [1] 124.208826 10.144923 7.740499 8.348130 7.544994 12.040189 [7] 8.097764 6.510517 9.068091 6.846150 7.817584 8.452240 [13] 8.084673 9.090852 6.758863 9.666629 11.971838 6.942986 [19] 5.443830 6.623224 > colMax(tmp5,na.rm=TRUE) [1] 464.50793 89.31528 81.37512 87.16910 82.16295 92.38020 90.20810 [8] 77.47269 86.19033 80.27256 83.52066 92.02502 82.45599 80.60058 [15] 85.49890 86.24132 90.64805 82.38934 74.44665 85.89570 > colMin(tmp5,na.rm=TRUE) [1] 59.00756 55.08247 61.91195 60.13663 59.21603 59.28792 62.08235 59.73160 [9] 60.04697 57.96178 60.54210 61.40706 60.78278 56.07614 66.91357 58.90190 [17] 55.13788 63.45885 58.74675 67.74220 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.17990 72.49509 71.29210 71.42901 69.72819 70.55549 73.23184 73.11027 [9] NaN 73.09457 > rowSums(tmp5,na.rm=TRUE) [1] 1823.598 1449.902 1425.842 1428.580 1394.564 1411.110 1464.637 1462.205 [9] 0.000 1461.891 > rowVars(tmp5,na.rm=TRUE) [1] 7759.54588 120.44620 69.49057 82.19523 47.30429 58.06506 [7] 58.47710 87.24271 NA 63.35254 > rowSd(tmp5,na.rm=TRUE) [1] 88.088285 10.974798 8.336100 9.066158 6.877811 7.620044 7.647032 [8] 9.340381 NA 7.959431 > rowMax(tmp5,na.rm=TRUE) [1] 464.50793 90.64805 84.10309 92.02502 85.13525 85.20028 92.38020 [8] 89.25094 NA 86.36952 > rowMin(tmp5,na.rm=TRUE) [1] 60.04697 56.07614 59.24045 56.31754 55.08247 60.04511 59.80193 55.13788 [9] NA 58.90190 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.13480 74.96995 71.28737 75.43395 68.41351 76.49306 70.42303 [8] 70.67003 73.25004 69.04009 71.72030 70.91297 70.96815 66.29689 [15] NaN 68.94793 73.82501 72.28130 68.73779 75.81959 > colSums(tmp5,na.rm=TRUE) [1] 1036.2132 674.7295 641.5863 678.9056 615.7216 688.4376 633.8073 [8] 636.0303 659.2503 621.3608 645.4827 638.2167 638.7133 596.6720 [15] 0.0000 620.5314 664.4251 650.5317 618.6401 682.3763 > colVars(tmp5,na.rm=TRUE) [1] 17205.18218 114.17926 55.95644 52.07677 60.79384 129.78501 [7] 29.73249 34.22464 78.90740 48.81216 66.26117 80.29330 [13] 68.00603 69.95703 NA 104.67634 132.74922 54.22992 [19] 25.82443 47.75916 > colSd(tmp5,na.rm=TRUE) [1] 131.168526 10.685470 7.480404 7.216423 7.797041 11.392322 [7] 5.452750 5.850183 8.882984 6.986570 8.140096 8.960653 [13] 8.246577 8.364032 NA 10.231146 11.521685 7.364096 [19] 5.081775 6.910800 > colMax(tmp5,na.rm=TRUE) [1] 464.50793 89.31528 80.67263 87.16910 82.16295 92.38020 80.16331 [8] 77.47269 86.19033 80.27256 83.52066 92.02502 82.45599 78.60421 [15] -Inf 86.24132 90.64805 82.38934 74.44665 85.89570 > colMin(tmp5,na.rm=TRUE) [1] 59.00756 55.08247 61.91195 67.94594 59.21603 60.53667 62.08235 60.89621 [9] 60.04697 57.96178 60.54210 61.40706 60.78278 56.07614 Inf 58.90190 [17] 55.13788 63.45885 58.74675 67.74220 > > > > > 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] 175.66596 91.21333 244.75324 226.98626 272.69139 154.03101 245.68513 [8] 252.38926 206.76368 192.38269 > apply(copymatrix,1,var,na.rm=TRUE) [1] 175.66596 91.21333 244.75324 226.98626 272.69139 154.03101 245.68513 [8] 252.38926 206.76368 192.38269 > > > > 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] 0.000000e+00 2.273737e-13 -8.526513e-14 -2.273737e-13 -1.136868e-13 [6] -8.526513e-14 2.842171e-14 -5.684342e-14 -1.136868e-13 2.842171e-14 [11] -1.421085e-13 0.000000e+00 -8.526513e-14 0.000000e+00 1.136868e-13 [16] -8.526513e-14 -4.263256e-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) + } 10 3 2 3 9 18 5 14 1 5 3 4 9 3 3 5 2 12 1 4 5 6 2 17 9 16 8 16 2 8 4 9 1 7 8 11 6 6 7 14 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.315559 > Min(tmp) [1] -2.080585 > mean(tmp) [1] 0.08510012 > Sum(tmp) [1] 8.510012 > Var(tmp) [1] 0.7803537 > > rowMeans(tmp) [1] 0.08510012 > rowSums(tmp) [1] 8.510012 > rowVars(tmp) [1] 0.7803537 > rowSd(tmp) [1] 0.8833763 > rowMax(tmp) [1] 2.315559 > rowMin(tmp) [1] -2.080585 > > colMeans(tmp) [1] 0.730640870 -0.027210595 -0.161999390 0.548453163 0.789314780 [6] -0.867416881 -2.080584663 -0.241786007 -1.709047528 -1.267345724 [11] -0.965572841 -0.289876135 0.386721400 -0.918707226 2.232335083 [16] -0.360110023 0.378655534 -0.495399576 -0.457640735 1.263122633 [21] -0.353019103 1.189572355 2.160114327 0.511790484 -0.082381543 [26] -0.784823688 -0.770955950 -0.758828365 0.634190367 -0.003516318 [31] 0.892905601 0.493236326 -0.862361576 0.756068070 -0.014746938 [36] -0.787544922 -0.157824269 0.238474960 0.630532385 1.296012481 [41] 0.903155400 -1.315273358 -0.675882948 -0.781174076 0.531692994 [46] 0.191154901 -1.491624639 -1.204222563 0.611511475 0.739545746 [51] 2.315559478 -0.537104179 -0.326158073 0.656733316 -0.355906080 [56] -0.364161310 1.156330416 1.082123739 0.740773470 0.977121485 [61] -0.812879251 -0.009998409 0.686985357 1.476056719 0.711481140 [66] -0.708611783 0.478156082 -0.345635886 -0.066585450 0.379381847 [71] -0.491217548 1.339147826 -0.243784792 -1.195159296 1.342824832 [76] 1.129786281 -0.243064224 -1.029201586 0.078595939 0.025554280 [81] -0.812257656 -1.002208294 0.540979210 -0.345115116 0.334187034 [86] 1.418095047 1.256944324 -0.009624418 -0.197558098 1.237069484 [91] 0.827779871 -0.076072340 -1.152911612 0.015702897 -0.326134407 [96] 0.170333415 -0.534552520 1.470179485 -0.471453768 0.097161105 > colSums(tmp) [1] 0.730640870 -0.027210595 -0.161999390 0.548453163 0.789314780 [6] -0.867416881 -2.080584663 -0.241786007 -1.709047528 -1.267345724 [11] -0.965572841 -0.289876135 0.386721400 -0.918707226 2.232335083 [16] -0.360110023 0.378655534 -0.495399576 -0.457640735 1.263122633 [21] -0.353019103 1.189572355 2.160114327 0.511790484 -0.082381543 [26] -0.784823688 -0.770955950 -0.758828365 0.634190367 -0.003516318 [31] 0.892905601 0.493236326 -0.862361576 0.756068070 -0.014746938 [36] -0.787544922 -0.157824269 0.238474960 0.630532385 1.296012481 [41] 0.903155400 -1.315273358 -0.675882948 -0.781174076 0.531692994 [46] 0.191154901 -1.491624639 -1.204222563 0.611511475 0.739545746 [51] 2.315559478 -0.537104179 -0.326158073 0.656733316 -0.355906080 [56] -0.364161310 1.156330416 1.082123739 0.740773470 0.977121485 [61] -0.812879251 -0.009998409 0.686985357 1.476056719 0.711481140 [66] -0.708611783 0.478156082 -0.345635886 -0.066585450 0.379381847 [71] -0.491217548 1.339147826 -0.243784792 -1.195159296 1.342824832 [76] 1.129786281 -0.243064224 -1.029201586 0.078595939 0.025554280 [81] -0.812257656 -1.002208294 0.540979210 -0.345115116 0.334187034 [86] 1.418095047 1.256944324 -0.009624418 -0.197558098 1.237069484 [91] 0.827779871 -0.076072340 -1.152911612 0.015702897 -0.326134407 [96] 0.170333415 -0.534552520 1.470179485 -0.471453768 0.097161105 > 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.730640870 -0.027210595 -0.161999390 0.548453163 0.789314780 [6] -0.867416881 -2.080584663 -0.241786007 -1.709047528 -1.267345724 [11] -0.965572841 -0.289876135 0.386721400 -0.918707226 2.232335083 [16] -0.360110023 0.378655534 -0.495399576 -0.457640735 1.263122633 [21] -0.353019103 1.189572355 2.160114327 0.511790484 -0.082381543 [26] -0.784823688 -0.770955950 -0.758828365 0.634190367 -0.003516318 [31] 0.892905601 0.493236326 -0.862361576 0.756068070 -0.014746938 [36] -0.787544922 -0.157824269 0.238474960 0.630532385 1.296012481 [41] 0.903155400 -1.315273358 -0.675882948 -0.781174076 0.531692994 [46] 0.191154901 -1.491624639 -1.204222563 0.611511475 0.739545746 [51] 2.315559478 -0.537104179 -0.326158073 0.656733316 -0.355906080 [56] -0.364161310 1.156330416 1.082123739 0.740773470 0.977121485 [61] -0.812879251 -0.009998409 0.686985357 1.476056719 0.711481140 [66] -0.708611783 0.478156082 -0.345635886 -0.066585450 0.379381847 [71] -0.491217548 1.339147826 -0.243784792 -1.195159296 1.342824832 [76] 1.129786281 -0.243064224 -1.029201586 0.078595939 0.025554280 [81] -0.812257656 -1.002208294 0.540979210 -0.345115116 0.334187034 [86] 1.418095047 1.256944324 -0.009624418 -0.197558098 1.237069484 [91] 0.827779871 -0.076072340 -1.152911612 0.015702897 -0.326134407 [96] 0.170333415 -0.534552520 1.470179485 -0.471453768 0.097161105 > colMin(tmp) [1] 0.730640870 -0.027210595 -0.161999390 0.548453163 0.789314780 [6] -0.867416881 -2.080584663 -0.241786007 -1.709047528 -1.267345724 [11] -0.965572841 -0.289876135 0.386721400 -0.918707226 2.232335083 [16] -0.360110023 0.378655534 -0.495399576 -0.457640735 1.263122633 [21] -0.353019103 1.189572355 2.160114327 0.511790484 -0.082381543 [26] -0.784823688 -0.770955950 -0.758828365 0.634190367 -0.003516318 [31] 0.892905601 0.493236326 -0.862361576 0.756068070 -0.014746938 [36] -0.787544922 -0.157824269 0.238474960 0.630532385 1.296012481 [41] 0.903155400 -1.315273358 -0.675882948 -0.781174076 0.531692994 [46] 0.191154901 -1.491624639 -1.204222563 0.611511475 0.739545746 [51] 2.315559478 -0.537104179 -0.326158073 0.656733316 -0.355906080 [56] -0.364161310 1.156330416 1.082123739 0.740773470 0.977121485 [61] -0.812879251 -0.009998409 0.686985357 1.476056719 0.711481140 [66] -0.708611783 0.478156082 -0.345635886 -0.066585450 0.379381847 [71] -0.491217548 1.339147826 -0.243784792 -1.195159296 1.342824832 [76] 1.129786281 -0.243064224 -1.029201586 0.078595939 0.025554280 [81] -0.812257656 -1.002208294 0.540979210 -0.345115116 0.334187034 [86] 1.418095047 1.256944324 -0.009624418 -0.197558098 1.237069484 [91] 0.827779871 -0.076072340 -1.152911612 0.015702897 -0.326134407 [96] 0.170333415 -0.534552520 1.470179485 -0.471453768 0.097161105 > colMedians(tmp) [1] 0.730640870 -0.027210595 -0.161999390 0.548453163 0.789314780 [6] -0.867416881 -2.080584663 -0.241786007 -1.709047528 -1.267345724 [11] -0.965572841 -0.289876135 0.386721400 -0.918707226 2.232335083 [16] -0.360110023 0.378655534 -0.495399576 -0.457640735 1.263122633 [21] -0.353019103 1.189572355 2.160114327 0.511790484 -0.082381543 [26] -0.784823688 -0.770955950 -0.758828365 0.634190367 -0.003516318 [31] 0.892905601 0.493236326 -0.862361576 0.756068070 -0.014746938 [36] -0.787544922 -0.157824269 0.238474960 0.630532385 1.296012481 [41] 0.903155400 -1.315273358 -0.675882948 -0.781174076 0.531692994 [46] 0.191154901 -1.491624639 -1.204222563 0.611511475 0.739545746 [51] 2.315559478 -0.537104179 -0.326158073 0.656733316 -0.355906080 [56] -0.364161310 1.156330416 1.082123739 0.740773470 0.977121485 [61] -0.812879251 -0.009998409 0.686985357 1.476056719 0.711481140 [66] -0.708611783 0.478156082 -0.345635886 -0.066585450 0.379381847 [71] -0.491217548 1.339147826 -0.243784792 -1.195159296 1.342824832 [76] 1.129786281 -0.243064224 -1.029201586 0.078595939 0.025554280 [81] -0.812257656 -1.002208294 0.540979210 -0.345115116 0.334187034 [86] 1.418095047 1.256944324 -0.009624418 -0.197558098 1.237069484 [91] 0.827779871 -0.076072340 -1.152911612 0.015702897 -0.326134407 [96] 0.170333415 -0.534552520 1.470179485 -0.471453768 0.097161105 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.7306409 -0.0272106 -0.1619994 0.5484532 0.7893148 -0.8674169 -2.080585 [2,] 0.7306409 -0.0272106 -0.1619994 0.5484532 0.7893148 -0.8674169 -2.080585 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.241786 -1.709048 -1.267346 -0.9655728 -0.2898761 0.3867214 -0.9187072 [2,] -0.241786 -1.709048 -1.267346 -0.9655728 -0.2898761 0.3867214 -0.9187072 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 2.232335 -0.36011 0.3786555 -0.4953996 -0.4576407 1.263123 -0.3530191 [2,] 2.232335 -0.36011 0.3786555 -0.4953996 -0.4576407 1.263123 -0.3530191 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.189572 2.160114 0.5117905 -0.08238154 -0.7848237 -0.7709559 -0.7588284 [2,] 1.189572 2.160114 0.5117905 -0.08238154 -0.7848237 -0.7709559 -0.7588284 [,29] [,30] [,31] [,32] [,33] [,34] [1,] 0.6341904 -0.003516318 0.8929056 0.4932363 -0.8623616 0.7560681 [2,] 0.6341904 -0.003516318 0.8929056 0.4932363 -0.8623616 0.7560681 [,35] [,36] [,37] [,38] [,39] [,40] [,41] [1,] -0.01474694 -0.7875449 -0.1578243 0.238475 0.6305324 1.296012 0.9031554 [2,] -0.01474694 -0.7875449 -0.1578243 0.238475 0.6305324 1.296012 0.9031554 [,42] [,43] [,44] [,45] [,46] [,47] [,48] [1,] -1.315273 -0.6758829 -0.7811741 0.531693 0.1911549 -1.491625 -1.204223 [2,] -1.315273 -0.6758829 -0.7811741 0.531693 0.1911549 -1.491625 -1.204223 [,49] [,50] [,51] [,52] [,53] [,54] [,55] [1,] 0.6115115 0.7395457 2.315559 -0.5371042 -0.3261581 0.6567333 -0.3559061 [2,] 0.6115115 0.7395457 2.315559 -0.5371042 -0.3261581 0.6567333 -0.3559061 [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] -0.3641613 1.15633 1.082124 0.7407735 0.9771215 -0.8128793 -0.009998409 [2,] -0.3641613 1.15633 1.082124 0.7407735 0.9771215 -0.8128793 -0.009998409 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [1,] 0.6869854 1.476057 0.7114811 -0.7086118 0.4781561 -0.3456359 -0.06658545 [2,] 0.6869854 1.476057 0.7114811 -0.7086118 0.4781561 -0.3456359 -0.06658545 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] 0.3793818 -0.4912175 1.339148 -0.2437848 -1.195159 1.342825 1.129786 [2,] 0.3793818 -0.4912175 1.339148 -0.2437848 -1.195159 1.342825 1.129786 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] -0.2430642 -1.029202 0.07859594 0.02555428 -0.8122577 -1.002208 0.5409792 [2,] -0.2430642 -1.029202 0.07859594 0.02555428 -0.8122577 -1.002208 0.5409792 [,84] [,85] [,86] [,87] [,88] [,89] [,90] [1,] -0.3451151 0.334187 1.418095 1.256944 -0.009624418 -0.1975581 1.237069 [2,] -0.3451151 0.334187 1.418095 1.256944 -0.009624418 -0.1975581 1.237069 [,91] [,92] [,93] [,94] [,95] [,96] [,97] [1,] 0.8277799 -0.07607234 -1.152912 0.0157029 -0.3261344 0.1703334 -0.5345525 [2,] 0.8277799 -0.07607234 -1.152912 0.0157029 -0.3261344 0.1703334 -0.5345525 [,98] [,99] [,100] [1,] 1.470179 -0.4714538 0.09716111 [2,] 1.470179 -0.4714538 0.09716111 > > > Max(tmp2) [1] 2.711204 > Min(tmp2) [1] -2.637896 > mean(tmp2) [1] -0.005948545 > Sum(tmp2) [1] -0.5948545 > Var(tmp2) [1] 1.113505 > > rowMeans(tmp2) [1] 0.798218343 1.178034884 -1.510301871 2.177237145 -0.649519565 [6] -0.580243492 -1.284956571 0.348521482 0.192877253 0.087846088 [11] -0.681266472 0.066030098 0.004676343 0.355307370 -0.219363284 [16] -0.247796849 0.248551257 0.396236276 2.277113235 -0.374949005 [21] 1.583281737 0.888153155 -1.466363161 -0.246647722 0.750403856 [26] 0.732008126 0.295236998 -0.422766945 -1.216135262 0.297943848 [31] 0.027946715 0.664308532 -0.135988654 0.337119340 -0.705438641 [36] -0.766780586 -0.513754903 0.020528732 -1.794419472 -1.007584402 [41] -0.760095661 0.895022482 -0.011316956 -0.267590661 1.836097174 [46] -2.104153113 -0.560249733 0.243904685 0.150703314 -1.178317937 [51] -2.627858631 1.453274701 2.711204480 1.197716465 0.245673665 [56] -0.451134987 1.388378750 1.346830145 -1.115346117 0.676579822 [61] 0.193431588 -0.873542669 -0.318482962 0.391054290 1.104334727 [66] -0.095375923 0.278540492 0.836846010 -0.132405925 0.693839637 [71] -1.096460348 -1.295394766 -2.229489041 0.409554126 1.026639494 [76] -1.481405964 -1.120424974 -0.724123431 0.059477280 1.697624835 [81] 1.120611910 -0.465466264 0.835732257 1.753034197 -0.723672151 [86] 0.474632966 -0.328335933 -0.701201082 1.018893732 -0.001987302 [91] -0.704650816 -2.637896390 -1.398066616 0.580749633 0.479611951 [96] -2.021483262 0.739888134 1.168295611 -0.289930977 0.209523624 > rowSums(tmp2) [1] 0.798218343 1.178034884 -1.510301871 2.177237145 -0.649519565 [6] -0.580243492 -1.284956571 0.348521482 0.192877253 0.087846088 [11] -0.681266472 0.066030098 0.004676343 0.355307370 -0.219363284 [16] -0.247796849 0.248551257 0.396236276 2.277113235 -0.374949005 [21] 1.583281737 0.888153155 -1.466363161 -0.246647722 0.750403856 [26] 0.732008126 0.295236998 -0.422766945 -1.216135262 0.297943848 [31] 0.027946715 0.664308532 -0.135988654 0.337119340 -0.705438641 [36] -0.766780586 -0.513754903 0.020528732 -1.794419472 -1.007584402 [41] -0.760095661 0.895022482 -0.011316956 -0.267590661 1.836097174 [46] -2.104153113 -0.560249733 0.243904685 0.150703314 -1.178317937 [51] -2.627858631 1.453274701 2.711204480 1.197716465 0.245673665 [56] -0.451134987 1.388378750 1.346830145 -1.115346117 0.676579822 [61] 0.193431588 -0.873542669 -0.318482962 0.391054290 1.104334727 [66] -0.095375923 0.278540492 0.836846010 -0.132405925 0.693839637 [71] -1.096460348 -1.295394766 -2.229489041 0.409554126 1.026639494 [76] -1.481405964 -1.120424974 -0.724123431 0.059477280 1.697624835 [81] 1.120611910 -0.465466264 0.835732257 1.753034197 -0.723672151 [86] 0.474632966 -0.328335933 -0.701201082 1.018893732 -0.001987302 [91] -0.704650816 -2.637896390 -1.398066616 0.580749633 0.479611951 [96] -2.021483262 0.739888134 1.168295611 -0.289930977 0.209523624 > 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.798218343 1.178034884 -1.510301871 2.177237145 -0.649519565 [6] -0.580243492 -1.284956571 0.348521482 0.192877253 0.087846088 [11] -0.681266472 0.066030098 0.004676343 0.355307370 -0.219363284 [16] -0.247796849 0.248551257 0.396236276 2.277113235 -0.374949005 [21] 1.583281737 0.888153155 -1.466363161 -0.246647722 0.750403856 [26] 0.732008126 0.295236998 -0.422766945 -1.216135262 0.297943848 [31] 0.027946715 0.664308532 -0.135988654 0.337119340 -0.705438641 [36] -0.766780586 -0.513754903 0.020528732 -1.794419472 -1.007584402 [41] -0.760095661 0.895022482 -0.011316956 -0.267590661 1.836097174 [46] -2.104153113 -0.560249733 0.243904685 0.150703314 -1.178317937 [51] -2.627858631 1.453274701 2.711204480 1.197716465 0.245673665 [56] -0.451134987 1.388378750 1.346830145 -1.115346117 0.676579822 [61] 0.193431588 -0.873542669 -0.318482962 0.391054290 1.104334727 [66] -0.095375923 0.278540492 0.836846010 -0.132405925 0.693839637 [71] -1.096460348 -1.295394766 -2.229489041 0.409554126 1.026639494 [76] -1.481405964 -1.120424974 -0.724123431 0.059477280 1.697624835 [81] 1.120611910 -0.465466264 0.835732257 1.753034197 -0.723672151 [86] 0.474632966 -0.328335933 -0.701201082 1.018893732 -0.001987302 [91] -0.704650816 -2.637896390 -1.398066616 0.580749633 0.479611951 [96] -2.021483262 0.739888134 1.168295611 -0.289930977 0.209523624 > rowMin(tmp2) [1] 0.798218343 1.178034884 -1.510301871 2.177237145 -0.649519565 [6] -0.580243492 -1.284956571 0.348521482 0.192877253 0.087846088 [11] -0.681266472 0.066030098 0.004676343 0.355307370 -0.219363284 [16] -0.247796849 0.248551257 0.396236276 2.277113235 -0.374949005 [21] 1.583281737 0.888153155 -1.466363161 -0.246647722 0.750403856 [26] 0.732008126 0.295236998 -0.422766945 -1.216135262 0.297943848 [31] 0.027946715 0.664308532 -0.135988654 0.337119340 -0.705438641 [36] -0.766780586 -0.513754903 0.020528732 -1.794419472 -1.007584402 [41] -0.760095661 0.895022482 -0.011316956 -0.267590661 1.836097174 [46] -2.104153113 -0.560249733 0.243904685 0.150703314 -1.178317937 [51] -2.627858631 1.453274701 2.711204480 1.197716465 0.245673665 [56] -0.451134987 1.388378750 1.346830145 -1.115346117 0.676579822 [61] 0.193431588 -0.873542669 -0.318482962 0.391054290 1.104334727 [66] -0.095375923 0.278540492 0.836846010 -0.132405925 0.693839637 [71] -1.096460348 -1.295394766 -2.229489041 0.409554126 1.026639494 [76] -1.481405964 -1.120424974 -0.724123431 0.059477280 1.697624835 [81] 1.120611910 -0.465466264 0.835732257 1.753034197 -0.723672151 [86] 0.474632966 -0.328335933 -0.701201082 1.018893732 -0.001987302 [91] -0.704650816 -2.637896390 -1.398066616 0.580749633 0.479611951 [96] -2.021483262 0.739888134 1.168295611 -0.289930977 0.209523624 > > colMeans(tmp2) [1] -0.005948545 > colSums(tmp2) [1] -0.5948545 > colVars(tmp2) [1] 1.113505 > colSd(tmp2) [1] 1.055227 > colMax(tmp2) [1] 2.711204 > colMin(tmp2) [1] -2.637896 > colMedians(tmp2) [1] 0.043712 > colRanges(tmp2) [,1] [1,] -2.637896 [2,] 2.711204 > > 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.05458343 2.72279720 0.05727026 -4.02439768 3.84971580 -0.46028022 [7] 1.16890970 -2.86588947 0.81646408 2.39320039 > colApply(tmp,quantile)[,1] [,1] [1,] -0.545403256 [2,] 0.009971654 [3,] 0.333748213 [4,] 0.812957935 [5,] 1.541491283 > > rowApply(tmp,sum) [1] 4.3297373 -5.1315107 6.0185695 4.5459181 -3.4089576 -0.8809391 [7] -1.1666920 2.3993990 -0.5135889 1.5204379 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 4 9 2 8 6 9 9 6 7 9 [2,] 7 8 9 3 7 10 7 10 2 4 [3,] 6 4 5 7 1 6 2 1 10 5 [4,] 2 2 6 1 10 3 6 5 1 3 [5,] 10 5 10 4 3 8 5 2 4 7 [6,] 8 3 1 10 8 7 1 7 9 2 [7,] 5 1 8 6 5 5 8 3 3 10 [8,] 1 10 4 2 4 1 10 9 8 1 [9,] 9 6 3 5 2 2 4 8 5 8 [10,] 3 7 7 9 9 4 3 4 6 6 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -3.76715403 -3.21957366 -0.10227314 -0.39676938 -0.74337932 -3.63850972 [7] -1.59217697 -2.04938451 -1.98753938 4.13172213 -0.55473070 -0.86248210 [13] -1.93214430 0.41137128 1.96942905 -0.74147534 0.02485420 -0.75563538 [19] -0.07734177 -0.65948772 > colApply(tmp,quantile)[,1] [,1] [1,] -1.6130258 [2,] -0.8236137 [3,] -0.7339265 [4,] -0.4599054 [5,] -0.1366826 > > rowApply(tmp,sum) [1] 0.7218558 0.4436865 -9.4102894 -1.4086832 -6.8892505 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 3 4 2 10 9 [2,] 12 5 3 15 2 [3,] 15 10 6 14 13 [4,] 18 12 11 6 8 [5,] 13 17 17 5 4 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.8236137 0.1466885 0.34123756 0.9092088 0.17607641 0.5348706 [2,] -0.7339265 -0.6570728 -0.17156159 0.1038648 0.90183399 -0.5270154 [3,] -1.6130258 -1.3515732 -0.59848333 -0.2442868 0.09018814 -0.3477795 [4,] -0.1366826 0.5823503 0.35750248 -0.5718142 -0.65431044 -1.3217496 [5,] -0.4599054 -1.9399663 -0.03096826 -0.5937420 -1.25716743 -1.9768358 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.055255995 -1.6167266 0.07869324 0.3703576 -0.751867932 -0.37078167 [2,] -1.089107356 1.3043887 0.23086888 1.1438742 -0.251266079 -0.58237509 [3,] -0.123966494 -0.1331971 0.29070317 -0.1178658 -0.006580851 0.05965607 [4,] 0.006324602 -0.4116842 -1.05172779 1.1604599 -0.195585622 0.75537692 [5,] -0.330171726 -1.1921654 -1.53607688 1.5748963 0.650569782 -0.72435834 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.9594545 -0.04223986 1.656116358 0.18893780 1.4296162 0.02844185 [2,] -0.8216439 0.41885369 -0.177511255 0.09849919 1.1846550 0.65325244 [3,] 0.1266289 -0.44403178 -0.540331719 -2.10042550 -1.3503134 -0.50613662 [4,] -1.0059407 0.65936118 1.029814670 0.12000496 -0.3285957 -1.34631211 [5,] 0.7282657 -0.18057195 0.001340995 0.95150820 -0.9105079 0.41511907 [,19] [,20] [1,] -0.23655485 -0.281894154 [2,] 0.26037653 -0.845300932 [3,] -1.06480785 0.565340118 [4,] 1.05099278 -0.106467958 [5,] -0.08734838 0.008835207 > > > 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.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 654 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 564 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -1.219561 2.197386 -0.9570696 0.959818 0.3504202 0.4939241 1.864077 col8 col9 col10 col11 col12 col13 col14 row1 -0.629847 -0.421837 1.760787 0.3802684 1.536054 0.5970647 -0.6002082 col15 col16 col17 col18 col19 col20 row1 -0.05938557 -0.5168217 1.349859 -0.4348758 1.315887 1.262878 > tmp[,"col10"] col10 row1 1.7607869 row2 0.3642087 row3 -0.9106733 row4 1.9485130 row5 -1.2068936 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -1.2195611 2.1973860 -0.9570696 0.959818 0.3504202 0.4939241 1.8640774 row5 0.9452037 0.7873131 0.2363762 -1.267520 -0.7079306 -1.6040387 -0.6544125 col8 col9 col10 col11 col12 col13 row1 -0.6298470 -0.42183696 1.760787 0.3802684 1.5360536 0.5970647 row5 -0.1424289 -0.03237832 -1.206894 0.1254324 -0.3170435 -0.2302474 col14 col15 col16 col17 col18 col19 row1 -0.6002082 -0.05938557 -0.5168217 1.3498589 -0.43487576 1.315887 row5 -0.4514715 -0.90930480 -1.1589729 0.6058323 0.03850408 0.423482 col20 row1 1.2628778 row5 -0.7232916 > tmp[,c("col6","col20")] col6 col20 row1 0.4939241 1.2628778 row2 -1.5073369 0.2673589 row3 0.2781822 1.2124853 row4 1.8056748 0.7055998 row5 -1.6040387 -0.7232916 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.4939241 1.2628778 row5 -1.6040387 -0.7232916 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.06216 50.31942 50.69885 51.03256 49.7269 104.8315 50.69012 48.98254 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.6771 51.21519 50.77237 50.0551 48.17943 48.4911 51.24114 50.04773 col17 col18 col19 col20 row1 50.41518 49.71035 51.99562 105.4305 > tmp[,"col10"] col10 row1 51.21519 row2 29.68537 row3 31.08960 row4 31.29156 row5 48.97988 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.06216 50.31942 50.69885 51.03256 49.72690 104.8315 50.69012 48.98254 row5 49.06538 50.88935 49.39536 49.54529 48.69567 104.8842 50.52748 52.58157 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.67710 51.21519 50.77237 50.05510 48.17943 48.49110 51.24114 50.04773 row5 50.87971 48.97988 50.62586 49.15997 49.82582 50.69561 50.42191 50.67506 col17 col18 col19 col20 row1 50.41518 49.71035 51.99562 105.4305 row5 50.69335 49.15060 51.10387 105.4037 > tmp[,c("col6","col20")] col6 col20 row1 104.83149 105.43053 row2 76.07727 72.93917 row3 75.58007 74.95636 row4 74.52991 75.25765 row5 104.88424 105.40373 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.8315 105.4305 row5 104.8842 105.4037 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.8315 105.4305 row5 104.8842 105.4037 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 2.3454783 [2,] -0.6059656 [3,] -1.2866343 [4,] -1.0117108 [5,] -1.5525300 > tmp[,c("col17","col7")] col17 col7 [1,] -0.03101408 -1.2279599 [2,] 0.06576014 -0.7976892 [3,] -0.57572315 0.7363450 [4,] 1.78830796 0.8846273 [5,] -0.74326393 0.6993440 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.3428547 1.8271064 [2,] -0.4984849 -0.8005841 [3,] -1.5757552 0.1378563 [4,] 0.8648482 2.2449410 [5,] 0.4230110 0.6626293 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.3428547 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.3428547 [2,] -0.4984849 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 0.04388629 1.2555797 -2.471858 -0.9961082 -1.678227 1.1317000 0.00260013 row1 0.27138395 0.9309554 -1.063819 2.2318537 1.960791 -0.2176079 -0.02989329 [,8] [,9] [,10] [,11] [,12] [,13] row3 0.13815384 -1.262530 1.37946194 -0.1287910 -1.1661287 -0.56945047 row1 -0.02847237 1.843675 0.01303365 -0.4002745 0.4561228 -0.04153447 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.4467830 0.5948427 -0.8513370 -0.3601686 -0.3544864 -1.0113103 row1 0.1108854 -1.3513214 0.4884776 -0.4103992 0.5448804 -0.5547058 [,20] row3 -0.2447256 row1 0.3266590 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.6523693 0.2127372 1.630356 1.306546 0.5905621 -0.3767898 0.5809949 [,8] [,9] [,10] row2 -0.3858166 -0.4779554 -0.09684128 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.4507484 -0.7345377 0.2033508 0.7822247 1.114722 -0.1807285 0.7833023 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.2006208 0.3199987 -1.659662 0.8503631 0.605542 0.7957191 -0.3393755 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.03776456 -0.354345 0.04920616 -1.113123 -1.358947 0.1523402 > > > 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: 0x3ef656d0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c7a86d97b" [2] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c193f33a2" [3] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c798ca622" [4] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765ccc0e99a" [5] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c40498fd1" [6] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c5ad2d7bb" [7] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c7e2bcca7" [8] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c5814655e" [9] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c7440cf85" [10] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c8d2e8f6" [11] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c252d30f" [12] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c6ba6b47a" [13] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c7dd71ee" [14] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c2b6b199b" [15] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3e765c4f8e1773" > > > ### 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: 0x3e9f3510> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x3e9f3510> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x3e9f3510> > rowMedians(tmp) [1] 0.181772380 0.103878978 -0.364510047 0.023102005 -0.405946148 [6] -0.324598126 -0.488611788 0.455537772 -0.165781768 0.190706386 [11] -0.094167417 -0.243330633 -0.072355928 -0.230790196 -0.262022709 [16] 0.060280595 0.803232858 -0.764183073 0.119562894 -0.102954771 [21] -0.240931800 0.017380608 -0.534188231 0.283920015 -0.061356776 [26] -0.270584487 -0.133171759 -0.156809485 0.503424935 -0.322498637 [31] -0.136572525 -0.233846086 0.275057790 -0.455510432 -0.381547124 [36] -0.397018003 0.118769781 -0.011159740 -0.184708982 0.059511871 [41] 0.160756615 0.223397444 -0.381988454 -0.351958623 0.279775731 [46] 0.195708375 -0.116498134 -0.351311179 0.104088505 0.161969291 [51] -0.195828576 0.011476035 -0.210258612 0.432516232 0.238022631 [56] 0.347652918 -0.470128656 0.407219758 -0.176190397 -0.030597140 [61] 0.561639328 -0.069119649 -0.353011773 0.772046920 -0.387292972 [66] -0.305340332 -0.345699694 -0.246714647 -0.556746583 -0.096072827 [71] -0.188074285 -0.170792847 0.795060800 -0.139455273 -0.202082438 [76] 0.119016267 0.190540154 0.188407334 0.501531454 0.232636997 [81] -0.237397963 -0.359827729 0.466371282 0.189470900 0.204263562 [86] -0.230646620 -0.325694243 0.256418725 0.478825524 -0.388891114 [91] -0.178168220 0.216604363 0.486377479 0.285815238 0.102158895 [96] -0.663176345 0.925912806 0.036399952 -0.303492445 -0.175471363 [101] 0.084088527 0.087890309 0.170675438 -0.211927142 -0.215501478 [106] 0.447349021 -0.404651513 0.086162880 0.603782230 -0.690459947 [111] 0.148460311 0.125807830 -0.086329819 -0.000171926 -0.112294442 [116] -0.192158714 0.418039025 0.123095522 0.037717762 -0.415123165 [121] 0.120694726 -0.248378066 0.393045124 0.016332887 0.212868483 [126] -0.220926092 -0.226841690 0.554695548 -0.049093471 0.494543626 [131] 0.069572866 -0.051811376 -0.448175726 -0.193696790 0.444190824 [136] -0.332302790 0.163943548 0.264594467 -0.027291081 -0.114064390 [141] -0.205165396 0.013412507 0.207259474 -0.368571999 -0.354900396 [146] -0.126963773 -0.379125496 0.014465770 0.576446667 -0.041049994 [151] -0.043421698 0.139244744 0.275805056 -0.400136601 0.722448161 [156] -0.289274454 -0.387513941 -0.089794386 -0.294037024 0.427083716 [161] -0.129480401 -0.127523379 -0.248305611 -0.168084127 -0.227457232 [166] -0.106322595 -0.069941374 -0.131168173 -0.551266348 0.298104801 [171] -0.219762404 0.301451912 0.394830705 0.033564124 0.192503570 [176] -0.329892491 -0.248854454 -0.085741992 0.362644902 -0.379944012 [181] 0.465553988 0.515280786 0.018688022 -0.184867706 -0.412171494 [186] 0.795355693 -0.189628504 -0.100775405 0.034652812 0.165671631 [191] -0.133828204 0.262462583 -0.372897774 -0.061258258 0.447743765 [196] -0.108658906 0.435852401 0.222437122 0.034148269 0.440888222 [201] -0.196303828 -0.006477737 -0.282599501 0.447026170 -0.803783845 [206] 0.161265637 -0.335979694 0.093635863 -0.117425619 0.489287806 [211] 0.168136536 -0.047767608 -0.036145670 -0.206876812 0.222085633 [216] 0.485537376 0.054059141 -0.543374231 -0.416211244 -0.320852828 [221] -0.154650872 -0.145086163 -0.523338648 -0.332264518 0.641386869 [226] 0.489267892 -0.322895363 0.265787760 0.311389593 -0.020704988 > > proc.time() user system elapsed 1.912 0.862 2.801
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" 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: 0x2e63f6e0> > .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: 0x2e63f6e0> > .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: 0x2e63f6e0> > .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: 0x2e63f6e0> > 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: 0x2e6876a0> > .Call("R_bm_AddColumn",P) <pointer: 0x2e6876a0> > .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: 0x2e6876a0> > .Call("R_bm_AddColumn",P) <pointer: 0x2e6876a0> > .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: 0x2e6876a0> > 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: 0x2d8437d0> > .Call("R_bm_AddColumn",P) <pointer: 0x2d8437d0> > .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: 0x2d8437d0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x2d8437d0> > .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: 0x2d8437d0> > > .Call("R_bm_RowMode",P) <pointer: 0x2d8437d0> > .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: 0x2d8437d0> > > .Call("R_bm_ColMode",P) <pointer: 0x2d8437d0> > .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: 0x2d8437d0> > 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: 0x2e3a2d70> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x2e3a2d70> > .Call("R_bm_AddColumn",P) <pointer: 0x2e3a2d70> > .Call("R_bm_AddColumn",P) <pointer: 0x2e3a2d70> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3e78772fdfb770" "BufferedMatrixFile3e7877586ea3a3" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3e78772fdfb770" "BufferedMatrixFile3e7877586ea3a3" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x2df45cd0> > .Call("R_bm_AddColumn",P) <pointer: 0x2df45cd0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x2df45cd0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x2df45cd0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x2df45cd0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x2df45cd0> > .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: 0x2ceb4a10> > .Call("R_bm_AddColumn",P) <pointer: 0x2ceb4a10> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x2ceb4a10> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x2ceb4a10> > 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: 0x2edcecc0> > .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: 0x2edcecc0> > rm(P) > > proc.time() user system elapsed 0.343 0.042 0.372
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" 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.352 0.035 0.374