Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-08-16 12:07 -0400 (Sat, 16 Aug 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4818 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 (2025-06-13) -- "Great Square Root" | 4596 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-06-14 r88325) -- "Great Square Root" | 4538 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4535 |
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 251/2317 | 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-08-15 04:51:41 -0000 (Fri, 15 Aug 2025) |
EndedAt: 2025-08-15 04:52:05 -0000 (Fri, 15 Aug 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.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.304 0.055 0.346
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-unknown-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 478398 25.6 1047041 56 639620 34.2 Vcells 885166 6.8 8388608 64 2080985 15.9 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Aug 15 04:51:59 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Aug 15 04:51:59 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: 0xd79eff0> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Aug 15 04:51:59 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Aug 15 04:52:00 2025" > > ColMode(tmp2) <pointer: 0xd79eff0> > > > > ### 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.3339256 -0.3604287 -0.9779247 -0.7595957 [2,] 0.2244391 2.4037116 0.1507635 -0.5891609 [3,] 0.7900022 2.1262478 -0.7989273 0.2606904 [4,] 0.1635362 -0.1274223 1.8641637 -0.3218138 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.3339256 0.3604287 0.9779247 0.7595957 [2,] 0.2244391 2.4037116 0.1507635 0.5891609 [3,] 0.7900022 2.1262478 0.7989273 0.2606904 [4,] 0.1635362 0.1274223 1.8641637 0.3218138 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9666406 0.6003572 0.9889008 0.8715479 [2,] 0.4737501 1.5503908 0.3882828 0.7675682 [3,] 0.8888207 1.4581659 0.8938273 0.5105785 [4,] 0.4043961 0.3569626 1.3653438 0.5672864 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.00033 31.36400 35.86693 34.47507 [2,] 29.96194 42.90762 29.03359 33.26484 [3,] 34.67821 41.70791 34.73720 30.36648 [4,] 29.20750 28.69705 40.51760 30.99468 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0xe9ce9a0> > exp(tmp5) <pointer: 0xe9ce9a0> > log(tmp5,2) <pointer: 0xe9ce9a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.2273 > Min(tmp5) [1] 53.98601 > mean(tmp5) [1] 72.14753 > Sum(tmp5) [1] 14429.51 > Var(tmp5) [1] 846.032 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.80419 71.63587 71.90167 67.81167 69.75404 68.54786 68.70819 68.98522 [9] 70.57015 71.75639 > rowSums(tmp5) [1] 1836.084 1432.717 1438.033 1356.233 1395.081 1370.957 1374.164 1379.704 [9] 1411.403 1435.128 > rowVars(tmp5) [1] 7801.71536 80.95785 89.32358 58.11026 41.06752 55.56765 [7] 36.07133 75.03691 69.23222 81.71242 > rowSd(tmp5) [1] 88.327319 8.997658 9.451115 7.623009 6.408394 7.454371 6.005942 [8] 8.662385 8.320590 9.039492 > rowMax(tmp5) [1] 466.22734 89.30659 90.06995 84.33208 80.17688 84.83563 78.82791 [8] 84.54035 85.22183 87.96915 > rowMin(tmp5) [1] 63.37824 57.38481 57.68906 54.41198 58.01143 54.82592 58.50533 53.98601 [9] 58.75782 59.96519 > > colMeans(tmp5) [1] 106.72903 71.38738 75.40188 71.87138 64.75218 65.09329 68.98513 [8] 75.60666 69.06251 68.89906 73.96363 70.41217 71.48626 71.93664 [15] 70.95969 67.41917 72.63084 67.22313 72.58456 66.54593 > colSums(tmp5) [1] 1067.2903 713.8738 754.0188 718.7138 647.5218 650.9329 689.8513 [8] 756.0666 690.6251 688.9906 739.6363 704.1217 714.8626 719.3664 [15] 709.5969 674.1917 726.3084 672.2313 725.8456 665.4593 > colVars(tmp5) [1] 15978.74687 111.38425 49.66842 73.61762 13.78641 37.62889 [7] 30.88467 61.40493 31.13569 67.40268 78.65425 28.92647 [13] 58.68839 35.82316 85.55737 68.19366 129.52765 69.99121 [19] 27.12556 68.30755 > colSd(tmp5) [1] 126.407068 10.553874 7.047582 8.580071 3.713006 6.134239 [7] 5.557398 7.836130 5.579936 8.209914 8.868723 5.378333 [13] 7.660835 5.985245 9.249723 8.257945 11.381021 8.366075 [19] 5.208220 8.264838 > colMax(tmp5) [1] 466.22734 89.30659 84.33208 87.96915 68.76517 74.38524 77.07121 [8] 83.98693 76.88609 79.94174 85.23441 81.10832 81.97131 81.66480 [15] 85.22183 78.82791 90.06995 78.42761 79.74071 78.81470 > colMin(tmp5) [1] 60.79158 59.72915 60.42962 63.20384 58.50533 54.41198 56.99974 58.76607 [9] 61.60735 57.21941 61.95259 60.75667 59.26338 63.07485 56.36874 54.82592 [17] 57.38481 53.98601 67.39229 56.75228 > > > ### 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.80419 71.63587 71.90167 67.81167 69.75404 NA 68.70819 68.98522 [9] 70.57015 71.75639 > rowSums(tmp5) [1] 1836.084 1432.717 1438.033 1356.233 1395.081 NA 1374.164 1379.704 [9] 1411.403 1435.128 > rowVars(tmp5) [1] 7801.71536 80.95785 89.32358 58.11026 41.06752 57.87148 [7] 36.07133 75.03691 69.23222 81.71242 > rowSd(tmp5) [1] 88.327319 8.997658 9.451115 7.623009 6.408394 7.607331 6.005942 [8] 8.662385 8.320590 9.039492 > rowMax(tmp5) [1] 466.22734 89.30659 90.06995 84.33208 80.17688 NA 78.82791 [8] 84.54035 85.22183 87.96915 > rowMin(tmp5) [1] 63.37824 57.38481 57.68906 54.41198 58.01143 NA 58.50533 53.98601 [9] 58.75782 59.96519 > > colMeans(tmp5) [1] 106.72903 71.38738 75.40188 71.87138 NA 65.09329 68.98513 [8] 75.60666 69.06251 68.89906 73.96363 70.41217 71.48626 71.93664 [15] 70.95969 67.41917 72.63084 67.22313 72.58456 66.54593 > colSums(tmp5) [1] 1067.2903 713.8738 754.0188 718.7138 NA 650.9329 689.8513 [8] 756.0666 690.6251 688.9906 739.6363 704.1217 714.8626 719.3664 [15] 709.5969 674.1917 726.3084 672.2313 725.8456 665.4593 > colVars(tmp5) [1] 15978.74687 111.38425 49.66842 73.61762 NA 37.62889 [7] 30.88467 61.40493 31.13569 67.40268 78.65425 28.92647 [13] 58.68839 35.82316 85.55737 68.19366 129.52765 69.99121 [19] 27.12556 68.30755 > colSd(tmp5) [1] 126.407068 10.553874 7.047582 8.580071 NA 6.134239 [7] 5.557398 7.836130 5.579936 8.209914 8.868723 5.378333 [13] 7.660835 5.985245 9.249723 8.257945 11.381021 8.366075 [19] 5.208220 8.264838 > colMax(tmp5) [1] 466.22734 89.30659 84.33208 87.96915 NA 74.38524 77.07121 [8] 83.98693 76.88609 79.94174 85.23441 81.10832 81.97131 81.66480 [15] 85.22183 78.82791 90.06995 78.42761 79.74071 78.81470 > colMin(tmp5) [1] 60.79158 59.72915 60.42962 63.20384 NA 54.41198 56.99974 58.76607 [9] 61.60735 57.21941 61.95259 60.75667 59.26338 63.07485 56.36874 54.82592 [17] 57.38481 53.98601 67.39229 56.75228 > > Max(tmp5,na.rm=TRUE) [1] 466.2273 > Min(tmp5,na.rm=TRUE) [1] 53.98601 > mean(tmp5,na.rm=TRUE) [1] 72.184 > Sum(tmp5,na.rm=TRUE) [1] 14364.62 > Var(tmp5,na.rm=TRUE) [1] 850.0374 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.80419 71.63587 71.90167 67.81167 69.75404 68.74048 68.70819 68.98522 [9] 70.57015 71.75639 > rowSums(tmp5,na.rm=TRUE) [1] 1836.084 1432.717 1438.033 1356.233 1395.081 1306.069 1374.164 1379.704 [9] 1411.403 1435.128 > rowVars(tmp5,na.rm=TRUE) [1] 7801.71536 80.95785 89.32358 58.11026 41.06752 57.87148 [7] 36.07133 75.03691 69.23222 81.71242 > rowSd(tmp5,na.rm=TRUE) [1] 88.327319 8.997658 9.451115 7.623009 6.408394 7.607331 6.005942 [8] 8.662385 8.320590 9.039492 > rowMax(tmp5,na.rm=TRUE) [1] 466.22734 89.30659 90.06995 84.33208 80.17688 84.83563 78.82791 [8] 84.54035 85.22183 87.96915 > rowMin(tmp5,na.rm=TRUE) [1] 63.37824 57.38481 57.68906 54.41198 58.01143 54.82592 58.50533 53.98601 [9] 58.75782 59.96519 > > colMeans(tmp5,na.rm=TRUE) [1] 106.72903 71.38738 75.40188 71.87138 64.73708 65.09329 68.98513 [8] 75.60666 69.06251 68.89906 73.96363 70.41217 71.48626 71.93664 [15] 70.95969 67.41917 72.63084 67.22313 72.58456 66.54593 > colSums(tmp5,na.rm=TRUE) [1] 1067.2903 713.8738 754.0188 718.7138 582.6337 650.9329 689.8513 [8] 756.0666 690.6251 688.9906 739.6363 704.1217 714.8626 719.3664 [15] 709.5969 674.1917 726.3084 672.2313 725.8456 665.4593 > colVars(tmp5,na.rm=TRUE) [1] 15978.74687 111.38425 49.66842 73.61762 15.50715 37.62889 [7] 30.88467 61.40493 31.13569 67.40268 78.65425 28.92647 [13] 58.68839 35.82316 85.55737 68.19366 129.52765 69.99121 [19] 27.12556 68.30755 > colSd(tmp5,na.rm=TRUE) [1] 126.407068 10.553874 7.047582 8.580071 3.937912 6.134239 [7] 5.557398 7.836130 5.579936 8.209914 8.868723 5.378333 [13] 7.660835 5.985245 9.249723 8.257945 11.381021 8.366075 [19] 5.208220 8.264838 > colMax(tmp5,na.rm=TRUE) [1] 466.22734 89.30659 84.33208 87.96915 68.76517 74.38524 77.07121 [8] 83.98693 76.88609 79.94174 85.23441 81.10832 81.97131 81.66480 [15] 85.22183 78.82791 90.06995 78.42761 79.74071 78.81470 > colMin(tmp5,na.rm=TRUE) [1] 60.79158 59.72915 60.42962 63.20384 58.50533 54.41198 56.99974 58.76607 [9] 61.60735 57.21941 61.95259 60.75667 59.26338 63.07485 56.36874 54.82592 [17] 57.38481 53.98601 67.39229 56.75228 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.80419 71.63587 71.90167 67.81167 69.75404 NaN 68.70819 68.98522 [9] 70.57015 71.75639 > rowSums(tmp5,na.rm=TRUE) [1] 1836.084 1432.717 1438.033 1356.233 1395.081 0.000 1374.164 1379.704 [9] 1411.403 1435.128 > rowVars(tmp5,na.rm=TRUE) [1] 7801.71536 80.95785 89.32358 58.11026 41.06752 NA [7] 36.07133 75.03691 69.23222 81.71242 > rowSd(tmp5,na.rm=TRUE) [1] 88.327319 8.997658 9.451115 7.623009 6.408394 NA 6.005942 [8] 8.662385 8.320590 9.039492 > rowMax(tmp5,na.rm=TRUE) [1] 466.22734 89.30659 90.06995 84.33208 80.17688 NA 78.82791 [8] 84.54035 85.22183 87.96915 > rowMin(tmp5,na.rm=TRUE) [1] 63.37824 57.38481 57.68906 54.41198 58.01143 NA 58.50533 53.98601 [9] 58.75782 59.96519 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 111.05542 72.08323 74.91561 72.76652 NaN 65.23755 68.83083 [8] 74.87909 69.05365 69.59890 74.14983 70.64225 71.70838 72.39353 [15] 69.41791 68.81843 72.61745 67.40713 73.00287 67.63411 > colSums(tmp5,na.rm=TRUE) [1] 999.4988 648.7490 674.2405 654.8987 0.0000 587.1379 619.4775 673.9118 [9] 621.4829 626.3901 667.3484 635.7803 645.3754 651.5418 624.7612 619.3658 [17] 653.5570 606.6642 657.0258 608.7070 > colVars(tmp5,na.rm=TRUE) [1] 17765.51648 119.85995 53.21685 73.80549 NA 42.09840 [7] 34.47742 63.12516 35.02676 70.31803 88.09602 31.94669 [13] 65.46937 37.95259 69.51012 54.69148 145.71659 78.35922 [19] 28.54772 63.52441 > colSd(tmp5,na.rm=TRUE) [1] 133.287346 10.948057 7.294988 8.591012 NA 6.488328 [7] 5.871747 7.945134 5.918341 8.385585 9.385948 5.652141 [13] 8.091314 6.160567 8.337273 7.395369 12.071313 8.852074 [19] 5.343007 7.970220 > colMax(tmp5,na.rm=TRUE) [1] 466.22734 89.30659 84.33208 87.96915 -Inf 74.38524 77.07121 [8] 83.98693 76.88609 79.94174 85.23441 81.10832 81.97131 81.66480 [15] 85.22183 78.82791 90.06995 78.42761 79.74071 78.81470 > colMin(tmp5,na.rm=TRUE) [1] 60.79158 59.72915 60.42962 63.20384 Inf 54.41198 56.99974 58.76607 [9] 61.60735 57.21941 61.95259 60.75667 59.26338 63.07485 56.36874 58.50628 [17] 57.38481 53.98601 67.39229 57.68906 > > > > > 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] 351.3923 163.3202 283.3785 377.1184 235.5010 314.8031 288.3624 308.2269 [9] 134.5847 265.3269 > apply(copymatrix,1,var,na.rm=TRUE) [1] 351.3923 163.3202 283.3785 377.1184 235.5010 314.8031 288.3624 308.2269 [9] 134.5847 265.3269 > > > > 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.136868e-13 -8.526513e-14 -2.842171e-14 0.000000e+00 -1.136868e-13 [6] 0.000000e+00 1.421085e-13 -2.273737e-13 5.684342e-14 -7.389644e-13 [11] 0.000000e+00 1.705303e-13 1.136868e-13 2.415845e-13 -1.136868e-13 [16] -1.136868e-13 -2.842171e-13 -8.526513e-14 5.684342e-14 0.000000e+00 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 1 3 5 9 1 19 5 20 10 8 5 5 4 10 7 1 2 9 9 7 6 20 8 10 4 1 2 7 10 8 9 7 1 19 6 2 2 3 1 6 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.616754 > Min(tmp) [1] -3.034603 > mean(tmp) [1] -0.1811261 > Sum(tmp) [1] -18.11261 > Var(tmp) [1] 1.19435 > > rowMeans(tmp) [1] -0.1811261 > rowSums(tmp) [1] -18.11261 > rowVars(tmp) [1] 1.19435 > rowSd(tmp) [1] 1.092863 > rowMax(tmp) [1] 2.616754 > rowMin(tmp) [1] -3.034603 > > colMeans(tmp) [1] 0.971178895 -1.107854137 -0.526860230 -0.236770526 0.481337829 [6] -1.255743512 -0.393801805 0.416670228 -0.264141186 0.784634544 [11] 0.422292873 0.969348684 0.118193851 0.518494021 -2.289606667 [16] 0.067428070 0.049246047 0.059622381 0.064445715 -0.729052642 [21] 1.175169770 -0.575744364 -0.337475764 -0.676616457 1.273864116 [26] -3.034602998 -1.232775023 1.001946168 -1.026150040 2.266712061 [31] -0.863103592 1.410029133 -0.615960424 -0.457597601 -0.579855326 [36] 0.780036252 1.108545588 -1.269636109 -1.061696218 0.418517399 [41] -0.880593679 -0.008820905 -0.939363829 -2.266429268 2.616753512 [46] -1.468101932 -0.261354964 -1.174071488 -0.129157727 -2.124082636 [51] -0.387761695 0.407176765 -1.861114174 0.065152929 0.708314178 [56] -1.569768050 0.089070161 0.365312908 -0.266558633 -0.068081525 [61] 0.927823217 -1.335708836 -0.962984908 -1.416228771 -0.024581856 [66] -0.492780295 1.416201397 0.320402270 0.271259105 -2.386805295 [71] -0.651878810 -2.365692443 1.847014544 -0.024258577 0.615687823 [76] 0.041443351 0.744128078 0.495677168 -0.882707564 0.158257088 [81] 0.901663177 1.244587653 -0.762665301 -1.801463891 0.802329090 [86] -0.552302584 1.038646528 -0.234993586 -0.776195730 0.709739227 [91] 1.234844190 0.320698030 0.321452044 -0.597114873 0.271702990 [96] -2.553807517 -1.409328469 1.915104257 -0.058615846 -1.090340420 > colSums(tmp) [1] 0.971178895 -1.107854137 -0.526860230 -0.236770526 0.481337829 [6] -1.255743512 -0.393801805 0.416670228 -0.264141186 0.784634544 [11] 0.422292873 0.969348684 0.118193851 0.518494021 -2.289606667 [16] 0.067428070 0.049246047 0.059622381 0.064445715 -0.729052642 [21] 1.175169770 -0.575744364 -0.337475764 -0.676616457 1.273864116 [26] -3.034602998 -1.232775023 1.001946168 -1.026150040 2.266712061 [31] -0.863103592 1.410029133 -0.615960424 -0.457597601 -0.579855326 [36] 0.780036252 1.108545588 -1.269636109 -1.061696218 0.418517399 [41] -0.880593679 -0.008820905 -0.939363829 -2.266429268 2.616753512 [46] -1.468101932 -0.261354964 -1.174071488 -0.129157727 -2.124082636 [51] -0.387761695 0.407176765 -1.861114174 0.065152929 0.708314178 [56] -1.569768050 0.089070161 0.365312908 -0.266558633 -0.068081525 [61] 0.927823217 -1.335708836 -0.962984908 -1.416228771 -0.024581856 [66] -0.492780295 1.416201397 0.320402270 0.271259105 -2.386805295 [71] -0.651878810 -2.365692443 1.847014544 -0.024258577 0.615687823 [76] 0.041443351 0.744128078 0.495677168 -0.882707564 0.158257088 [81] 0.901663177 1.244587653 -0.762665301 -1.801463891 0.802329090 [86] -0.552302584 1.038646528 -0.234993586 -0.776195730 0.709739227 [91] 1.234844190 0.320698030 0.321452044 -0.597114873 0.271702990 [96] -2.553807517 -1.409328469 1.915104257 -0.058615846 -1.090340420 > 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.971178895 -1.107854137 -0.526860230 -0.236770526 0.481337829 [6] -1.255743512 -0.393801805 0.416670228 -0.264141186 0.784634544 [11] 0.422292873 0.969348684 0.118193851 0.518494021 -2.289606667 [16] 0.067428070 0.049246047 0.059622381 0.064445715 -0.729052642 [21] 1.175169770 -0.575744364 -0.337475764 -0.676616457 1.273864116 [26] -3.034602998 -1.232775023 1.001946168 -1.026150040 2.266712061 [31] -0.863103592 1.410029133 -0.615960424 -0.457597601 -0.579855326 [36] 0.780036252 1.108545588 -1.269636109 -1.061696218 0.418517399 [41] -0.880593679 -0.008820905 -0.939363829 -2.266429268 2.616753512 [46] -1.468101932 -0.261354964 -1.174071488 -0.129157727 -2.124082636 [51] -0.387761695 0.407176765 -1.861114174 0.065152929 0.708314178 [56] -1.569768050 0.089070161 0.365312908 -0.266558633 -0.068081525 [61] 0.927823217 -1.335708836 -0.962984908 -1.416228771 -0.024581856 [66] -0.492780295 1.416201397 0.320402270 0.271259105 -2.386805295 [71] -0.651878810 -2.365692443 1.847014544 -0.024258577 0.615687823 [76] 0.041443351 0.744128078 0.495677168 -0.882707564 0.158257088 [81] 0.901663177 1.244587653 -0.762665301 -1.801463891 0.802329090 [86] -0.552302584 1.038646528 -0.234993586 -0.776195730 0.709739227 [91] 1.234844190 0.320698030 0.321452044 -0.597114873 0.271702990 [96] -2.553807517 -1.409328469 1.915104257 -0.058615846 -1.090340420 > colMin(tmp) [1] 0.971178895 -1.107854137 -0.526860230 -0.236770526 0.481337829 [6] -1.255743512 -0.393801805 0.416670228 -0.264141186 0.784634544 [11] 0.422292873 0.969348684 0.118193851 0.518494021 -2.289606667 [16] 0.067428070 0.049246047 0.059622381 0.064445715 -0.729052642 [21] 1.175169770 -0.575744364 -0.337475764 -0.676616457 1.273864116 [26] -3.034602998 -1.232775023 1.001946168 -1.026150040 2.266712061 [31] -0.863103592 1.410029133 -0.615960424 -0.457597601 -0.579855326 [36] 0.780036252 1.108545588 -1.269636109 -1.061696218 0.418517399 [41] -0.880593679 -0.008820905 -0.939363829 -2.266429268 2.616753512 [46] -1.468101932 -0.261354964 -1.174071488 -0.129157727 -2.124082636 [51] -0.387761695 0.407176765 -1.861114174 0.065152929 0.708314178 [56] -1.569768050 0.089070161 0.365312908 -0.266558633 -0.068081525 [61] 0.927823217 -1.335708836 -0.962984908 -1.416228771 -0.024581856 [66] -0.492780295 1.416201397 0.320402270 0.271259105 -2.386805295 [71] -0.651878810 -2.365692443 1.847014544 -0.024258577 0.615687823 [76] 0.041443351 0.744128078 0.495677168 -0.882707564 0.158257088 [81] 0.901663177 1.244587653 -0.762665301 -1.801463891 0.802329090 [86] -0.552302584 1.038646528 -0.234993586 -0.776195730 0.709739227 [91] 1.234844190 0.320698030 0.321452044 -0.597114873 0.271702990 [96] -2.553807517 -1.409328469 1.915104257 -0.058615846 -1.090340420 > colMedians(tmp) [1] 0.971178895 -1.107854137 -0.526860230 -0.236770526 0.481337829 [6] -1.255743512 -0.393801805 0.416670228 -0.264141186 0.784634544 [11] 0.422292873 0.969348684 0.118193851 0.518494021 -2.289606667 [16] 0.067428070 0.049246047 0.059622381 0.064445715 -0.729052642 [21] 1.175169770 -0.575744364 -0.337475764 -0.676616457 1.273864116 [26] -3.034602998 -1.232775023 1.001946168 -1.026150040 2.266712061 [31] -0.863103592 1.410029133 -0.615960424 -0.457597601 -0.579855326 [36] 0.780036252 1.108545588 -1.269636109 -1.061696218 0.418517399 [41] -0.880593679 -0.008820905 -0.939363829 -2.266429268 2.616753512 [46] -1.468101932 -0.261354964 -1.174071488 -0.129157727 -2.124082636 [51] -0.387761695 0.407176765 -1.861114174 0.065152929 0.708314178 [56] -1.569768050 0.089070161 0.365312908 -0.266558633 -0.068081525 [61] 0.927823217 -1.335708836 -0.962984908 -1.416228771 -0.024581856 [66] -0.492780295 1.416201397 0.320402270 0.271259105 -2.386805295 [71] -0.651878810 -2.365692443 1.847014544 -0.024258577 0.615687823 [76] 0.041443351 0.744128078 0.495677168 -0.882707564 0.158257088 [81] 0.901663177 1.244587653 -0.762665301 -1.801463891 0.802329090 [86] -0.552302584 1.038646528 -0.234993586 -0.776195730 0.709739227 [91] 1.234844190 0.320698030 0.321452044 -0.597114873 0.271702990 [96] -2.553807517 -1.409328469 1.915104257 -0.058615846 -1.090340420 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.9711789 -1.107854 -0.5268602 -0.2367705 0.4813378 -1.255744 -0.3938018 [2,] 0.9711789 -1.107854 -0.5268602 -0.2367705 0.4813378 -1.255744 -0.3938018 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.4166702 -0.2641412 0.7846345 0.4222929 0.9693487 0.1181939 0.518494 [2,] 0.4166702 -0.2641412 0.7846345 0.4222929 0.9693487 0.1181939 0.518494 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -2.289607 0.06742807 0.04924605 0.05962238 0.06444572 -0.7290526 1.17517 [2,] -2.289607 0.06742807 0.04924605 0.05962238 0.06444572 -0.7290526 1.17517 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.5757444 -0.3374758 -0.6766165 1.273864 -3.034603 -1.232775 1.001946 [2,] -0.5757444 -0.3374758 -0.6766165 1.273864 -3.034603 -1.232775 1.001946 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -1.02615 2.266712 -0.8631036 1.410029 -0.6159604 -0.4575976 -0.5798553 [2,] -1.02615 2.266712 -0.8631036 1.410029 -0.6159604 -0.4575976 -0.5798553 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.7800363 1.108546 -1.269636 -1.061696 0.4185174 -0.8805937 -0.008820905 [2,] 0.7800363 1.108546 -1.269636 -1.061696 0.4185174 -0.8805937 -0.008820905 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.9393638 -2.266429 2.616754 -1.468102 -0.261355 -1.174071 -0.1291577 [2,] -0.9393638 -2.266429 2.616754 -1.468102 -0.261355 -1.174071 -0.1291577 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -2.124083 -0.3877617 0.4071768 -1.861114 0.06515293 0.7083142 -1.569768 [2,] -2.124083 -0.3877617 0.4071768 -1.861114 0.06515293 0.7083142 -1.569768 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.08907016 0.3653129 -0.2665586 -0.06808153 0.9278232 -1.335709 -0.9629849 [2,] 0.08907016 0.3653129 -0.2665586 -0.06808153 0.9278232 -1.335709 -0.9629849 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -1.416229 -0.02458186 -0.4927803 1.416201 0.3204023 0.2712591 -2.386805 [2,] -1.416229 -0.02458186 -0.4927803 1.416201 0.3204023 0.2712591 -2.386805 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.6518788 -2.365692 1.847015 -0.02425858 0.6156878 0.04144335 0.7441281 [2,] -0.6518788 -2.365692 1.847015 -0.02425858 0.6156878 0.04144335 0.7441281 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.4956772 -0.8827076 0.1582571 0.9016632 1.244588 -0.7626653 -1.801464 [2,] 0.4956772 -0.8827076 0.1582571 0.9016632 1.244588 -0.7626653 -1.801464 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.8023291 -0.5523026 1.038647 -0.2349936 -0.7761957 0.7097392 1.234844 [2,] 0.8023291 -0.5523026 1.038647 -0.2349936 -0.7761957 0.7097392 1.234844 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.320698 0.321452 -0.5971149 0.271703 -2.553808 -1.409328 1.915104 [2,] 0.320698 0.321452 -0.5971149 0.271703 -2.553808 -1.409328 1.915104 [,99] [,100] [1,] -0.05861585 -1.09034 [2,] -0.05861585 -1.09034 > > > Max(tmp2) [1] 2.219592 > Min(tmp2) [1] -2.22139 > mean(tmp2) [1] 0.09948486 > Sum(tmp2) [1] 9.948486 > Var(tmp2) [1] 0.9248557 > > rowMeans(tmp2) [1] -0.38181403 -0.33176811 -0.54658390 0.23585573 -0.88173609 -1.36122634 [7] 0.70091838 -0.17433838 1.04492492 -2.22139044 -0.94502805 0.40072071 [13] 1.43410494 0.30882698 -0.49288981 1.37686104 0.29694909 0.05626353 [19] -1.02289202 2.21959181 1.97148837 -1.33021693 -0.35331345 0.28757797 [25] 0.79531488 -0.28785988 0.02408833 -1.29749279 1.04512706 0.36659779 [31] 1.49367821 -1.18010857 -0.32737771 0.57795349 -2.01671432 1.62840289 [37] 0.01552185 -0.25647106 -0.25080077 0.01991115 0.76446342 -0.55197088 [43] -0.03778808 -0.29633131 -0.11624328 -0.64536662 -0.24286515 -0.54368427 [49] 0.79848176 1.60158001 -0.06887945 -1.39938079 0.53343983 0.65325898 [55] 0.30277488 0.24074619 -0.27345132 -0.14033141 0.82706793 -0.32925688 [61] 0.15558448 0.26025445 -1.22875354 -1.10698884 -1.03229615 0.02236143 [67] -1.84503643 -0.20726298 -0.74973943 0.77104789 2.02597899 0.84453374 [73] -0.41578972 0.37548897 -1.19067175 -0.28966062 0.11401432 1.64423380 [79] 0.11158253 1.04135963 -0.25489845 1.51023118 -0.80397045 0.06695181 [85] 1.46655949 1.86252971 0.21371046 0.34270610 -0.59543159 1.95989451 [91] 0.35888024 -0.08083838 -0.18963003 -1.71419991 1.39229170 1.29531255 [97] 0.71897416 1.71883453 0.05596817 -0.39255102 > rowSums(tmp2) [1] -0.38181403 -0.33176811 -0.54658390 0.23585573 -0.88173609 -1.36122634 [7] 0.70091838 -0.17433838 1.04492492 -2.22139044 -0.94502805 0.40072071 [13] 1.43410494 0.30882698 -0.49288981 1.37686104 0.29694909 0.05626353 [19] -1.02289202 2.21959181 1.97148837 -1.33021693 -0.35331345 0.28757797 [25] 0.79531488 -0.28785988 0.02408833 -1.29749279 1.04512706 0.36659779 [31] 1.49367821 -1.18010857 -0.32737771 0.57795349 -2.01671432 1.62840289 [37] 0.01552185 -0.25647106 -0.25080077 0.01991115 0.76446342 -0.55197088 [43] -0.03778808 -0.29633131 -0.11624328 -0.64536662 -0.24286515 -0.54368427 [49] 0.79848176 1.60158001 -0.06887945 -1.39938079 0.53343983 0.65325898 [55] 0.30277488 0.24074619 -0.27345132 -0.14033141 0.82706793 -0.32925688 [61] 0.15558448 0.26025445 -1.22875354 -1.10698884 -1.03229615 0.02236143 [67] -1.84503643 -0.20726298 -0.74973943 0.77104789 2.02597899 0.84453374 [73] -0.41578972 0.37548897 -1.19067175 -0.28966062 0.11401432 1.64423380 [79] 0.11158253 1.04135963 -0.25489845 1.51023118 -0.80397045 0.06695181 [85] 1.46655949 1.86252971 0.21371046 0.34270610 -0.59543159 1.95989451 [91] 0.35888024 -0.08083838 -0.18963003 -1.71419991 1.39229170 1.29531255 [97] 0.71897416 1.71883453 0.05596817 -0.39255102 > 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.38181403 -0.33176811 -0.54658390 0.23585573 -0.88173609 -1.36122634 [7] 0.70091838 -0.17433838 1.04492492 -2.22139044 -0.94502805 0.40072071 [13] 1.43410494 0.30882698 -0.49288981 1.37686104 0.29694909 0.05626353 [19] -1.02289202 2.21959181 1.97148837 -1.33021693 -0.35331345 0.28757797 [25] 0.79531488 -0.28785988 0.02408833 -1.29749279 1.04512706 0.36659779 [31] 1.49367821 -1.18010857 -0.32737771 0.57795349 -2.01671432 1.62840289 [37] 0.01552185 -0.25647106 -0.25080077 0.01991115 0.76446342 -0.55197088 [43] -0.03778808 -0.29633131 -0.11624328 -0.64536662 -0.24286515 -0.54368427 [49] 0.79848176 1.60158001 -0.06887945 -1.39938079 0.53343983 0.65325898 [55] 0.30277488 0.24074619 -0.27345132 -0.14033141 0.82706793 -0.32925688 [61] 0.15558448 0.26025445 -1.22875354 -1.10698884 -1.03229615 0.02236143 [67] -1.84503643 -0.20726298 -0.74973943 0.77104789 2.02597899 0.84453374 [73] -0.41578972 0.37548897 -1.19067175 -0.28966062 0.11401432 1.64423380 [79] 0.11158253 1.04135963 -0.25489845 1.51023118 -0.80397045 0.06695181 [85] 1.46655949 1.86252971 0.21371046 0.34270610 -0.59543159 1.95989451 [91] 0.35888024 -0.08083838 -0.18963003 -1.71419991 1.39229170 1.29531255 [97] 0.71897416 1.71883453 0.05596817 -0.39255102 > rowMin(tmp2) [1] -0.38181403 -0.33176811 -0.54658390 0.23585573 -0.88173609 -1.36122634 [7] 0.70091838 -0.17433838 1.04492492 -2.22139044 -0.94502805 0.40072071 [13] 1.43410494 0.30882698 -0.49288981 1.37686104 0.29694909 0.05626353 [19] -1.02289202 2.21959181 1.97148837 -1.33021693 -0.35331345 0.28757797 [25] 0.79531488 -0.28785988 0.02408833 -1.29749279 1.04512706 0.36659779 [31] 1.49367821 -1.18010857 -0.32737771 0.57795349 -2.01671432 1.62840289 [37] 0.01552185 -0.25647106 -0.25080077 0.01991115 0.76446342 -0.55197088 [43] -0.03778808 -0.29633131 -0.11624328 -0.64536662 -0.24286515 -0.54368427 [49] 0.79848176 1.60158001 -0.06887945 -1.39938079 0.53343983 0.65325898 [55] 0.30277488 0.24074619 -0.27345132 -0.14033141 0.82706793 -0.32925688 [61] 0.15558448 0.26025445 -1.22875354 -1.10698884 -1.03229615 0.02236143 [67] -1.84503643 -0.20726298 -0.74973943 0.77104789 2.02597899 0.84453374 [73] -0.41578972 0.37548897 -1.19067175 -0.28966062 0.11401432 1.64423380 [79] 0.11158253 1.04135963 -0.25489845 1.51023118 -0.80397045 0.06695181 [85] 1.46655949 1.86252971 0.21371046 0.34270610 -0.59543159 1.95989451 [91] 0.35888024 -0.08083838 -0.18963003 -1.71419991 1.39229170 1.29531255 [97] 0.71897416 1.71883453 0.05596817 -0.39255102 > > colMeans(tmp2) [1] 0.09948486 > colSums(tmp2) [1] 9.948486 > colVars(tmp2) [1] 0.9248557 > colSd(tmp2) [1] 0.9616942 > colMax(tmp2) [1] 2.219592 > colMin(tmp2) [1] -2.22139 > colMedians(tmp2) [1] 0.02322488 > colRanges(tmp2) [,1] [1,] -2.221390 [2,] 2.219592 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] -1.8451635 1.7034532 0.7639052 -4.1816162 4.4644492 0.7179540 [7] -0.7423804 1.7322987 5.1007692 2.6265786 > colApply(tmp,quantile)[,1] [,1] [1,] -1.49061547 [2,] -0.91213812 [3,] -0.08540336 [4,] 0.34102584 [5,] 1.29706155 > > rowApply(tmp,sum) [1] 4.9042931 4.4604792 3.2233677 -3.6275906 -5.3149245 0.3232495 [7] -1.4410843 6.6189483 -1.7381074 2.9316171 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 3 1 8 10 6 2 9 6 6 [2,] 5 6 10 10 5 1 1 6 5 3 [3,] 10 1 2 5 6 9 7 4 2 7 [4,] 2 5 9 1 3 3 4 1 4 4 [5,] 6 7 8 2 8 5 9 5 7 9 [6,] 8 2 7 3 7 7 3 3 8 5 [7,] 3 8 3 4 2 2 6 2 9 10 [8,] 4 4 4 7 1 8 8 8 10 8 [9,] 7 10 5 9 4 10 10 7 3 2 [10,] 9 9 6 6 9 4 5 10 1 1 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.0308139 2.3406637 1.1029327 2.6107612 0.4726882 0.3803727 [7] 2.7327228 1.2571780 0.1283227 -1.7789604 -0.1233228 -1.8874794 [13] -0.5346372 2.1325827 3.6207584 -0.6387900 -1.6361010 1.4894025 [19] 0.2866816 -2.8374581 > colApply(tmp,quantile)[,1] [,1] [1,] -0.14397347 [2,] -0.05764425 [3,] 0.26083883 [4,] 0.28340296 [5,] 0.68818981 > > rowApply(tmp,sum) [1] -1.054150 12.634738 -6.848180 3.086668 2.330056 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 8 10 13 12 14 [2,] 15 13 17 1 20 [3,] 4 14 11 9 16 [4,] 20 9 8 11 9 [5,] 3 4 9 18 13 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.14397347 0.07590114 -0.68497786 2.4611903 -0.9518750 0.03005524 [2,] 0.68818981 0.94342209 1.03615152 0.6369103 -0.3893682 0.14624022 [3,] -0.05764425 0.30771027 -0.18639473 -0.4146032 -0.2233685 -0.65512983 [4,] 0.26083883 -1.62489830 -0.09147505 0.1150175 1.8280593 0.67453827 [5,] 0.28340296 2.63852854 1.02962883 -0.1877537 0.2092407 0.18466879 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.00121422 0.05885382 -0.04336194 0.11745676 0.03041134 -0.1986141 [2,] 1.40819712 -0.55367148 0.53625209 -0.51247531 0.88904643 0.8392904 [3,] -0.62125140 -0.18504127 0.90092159 0.24701842 -1.29788136 -0.2154925 [4,] 1.17780759 0.41946093 -0.55863832 0.02688202 0.79130672 -1.4102264 [5,] 0.76918371 1.51757600 -0.70685071 -1.65784229 -0.53620590 -0.9024368 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -1.5405879 -0.5074302 -0.2518404 0.3655742 -0.07337301 0.8782403 [2,] 1.1739351 1.3442805 1.2651865 0.4428486 -0.33831339 2.1696216 [3,] -1.1981847 -2.0267174 1.3339832 0.3644723 0.08302567 -1.4092489 [4,] -0.2630843 2.0139494 1.8450332 -0.7962804 -1.38583661 0.8396039 [5,] 1.2932846 1.3085005 -0.5716041 -1.0154046 0.07839631 -0.9888145 [,19] [,20] [1,] 0.8355293 -1.51011416 [2,] 1.6789741 -0.76997956 [3,] -1.5458757 -0.04847774 [4,] -0.4998304 -0.27555975 [5,] -0.1821157 -0.23332690 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 648 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 562 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -1.120865 0.2359197 -0.2388173 0.7028626 -1.663551 -1.430739 -0.7102183 col8 col9 col10 col11 col12 col13 col14 row1 1.833852 0.680822 -0.7946629 -1.212248 -1.28616 0.7334803 -1.992323 col15 col16 col17 col18 col19 col20 row1 0.2733092 -0.5263464 1.493628 -0.1128584 0.06122622 0.1291897 > tmp[,"col10"] col10 row1 -0.7946629 row2 0.1956467 row3 1.4526845 row4 -1.6067246 row5 -0.8752936 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -1.120865 0.2359197 -0.2388173 0.7028626 -1.663551 -1.4307395 -0.7102183 row5 1.723309 -0.9990269 0.7688712 -0.2016218 -1.550551 -0.6626822 1.3749523 col8 col9 col10 col11 col12 col13 col14 row1 1.8338524 0.680822 -0.7946629 -1.2122476 -1.2861601 0.7334803 -1.9923226 row5 0.7715327 -0.446039 -0.8752936 0.6733542 -0.7505087 -0.3990093 -0.8912037 col15 col16 col17 col18 col19 col20 row1 0.2733092 -0.5263464 1.493628 -0.1128584 0.06122622 0.1291897 row5 1.3853098 0.2204993 1.344080 -1.5259647 1.72214608 1.3106433 > tmp[,c("col6","col20")] col6 col20 row1 -1.4307395 0.1291897 row2 -0.7635729 1.0674570 row3 0.5086561 -0.5933696 row4 0.7452354 0.8495367 row5 -0.6626822 1.3106433 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.4307395 0.1291897 row5 -0.6626822 1.3106433 > > > > > 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.90414 50.1007 50.97087 49.30007 50.58966 106.2712 49.29647 49.83705 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.63654 49.63955 49.2401 50.48075 50.60673 49.26976 50.31812 48.34643 col17 col18 col19 col20 row1 49.34909 48.34967 51.43621 104.7764 > tmp[,"col10"] col10 row1 49.63955 row2 27.30305 row3 29.78223 row4 30.35973 row5 49.35351 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.90414 50.10070 50.97087 49.30007 50.58966 106.2712 49.29647 49.83705 row5 49.78571 48.21762 50.42207 51.14709 49.48433 104.7167 49.89694 51.34925 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.63654 49.63955 49.24010 50.48075 50.60673 49.26976 50.31812 48.34643 row5 50.94129 49.35351 49.22275 49.64652 50.71555 49.34477 49.04229 49.90388 col17 col18 col19 col20 row1 49.34909 48.34967 51.43621 104.7764 row5 52.28769 50.53659 51.90604 104.2234 > tmp[,c("col6","col20")] col6 col20 row1 106.27119 104.77640 row2 74.48743 77.52708 row3 74.20449 75.86386 row4 76.39296 73.04386 row5 104.71670 104.22335 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 106.2712 104.7764 row5 104.7167 104.2234 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 106.2712 104.7764 row5 104.7167 104.2234 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.7726093 [2,] -0.9490549 [3,] -0.3764924 [4,] 0.4924362 [5,] 0.5689813 > tmp[,c("col17","col7")] col17 col7 [1,] -1.2668766 1.1165704 [2,] 0.1156765 -1.0348162 [3,] 1.1711410 0.5214219 [4,] 1.1853337 -0.4656799 [5,] 0.3092356 0.1795706 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -1.0453368 -1.0787838 [2,] 0.2821023 -0.3027882 [3,] 0.2264927 -0.1219606 [4,] 0.3910909 0.1911075 [5,] 0.3889296 -1.7401846 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -1.045337 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -1.0453368 [2,] 0.2821023 > > > > 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.1423917 0.4502682 1.162238 0.632165 1.018064 -0.1437252 -1.832445 row1 0.3780673 0.8519466 1.577834 1.884488 1.048417 0.6274545 1.116713 [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.9453248 0.02741784 1.12157780 -0.2359911 0.3268270 -1.8046977 row1 -1.6865013 -1.21507775 -0.06258293 -0.4932030 0.5044156 -0.6319562 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.55676910 -0.5816724 -1.2392085 -0.9220731 -1.2434504 0.4142153 row1 -0.02180282 -0.1667568 0.3782692 0.3154519 0.7050331 1.4053769 [,20] row3 -0.4370549 row1 0.3927298 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.9173226 -0.238536 -0.8054917 1.401849 1.002357 0.7851956 -1.093742 [,8] [,9] [,10] row2 -0.5302361 1.237745 -0.4206301 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -1.36102 -1.078057 -0.7850914 -0.7729198 -1.002201 -0.684603 -1.013076 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.7797687 0.2626446 -0.8658282 -0.01344664 0.745921 -0.07647443 0.3162365 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.3489063 0.7611672 0.1357488 -0.9197532 -1.226779 0.3561497 > > > 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: 0xd037290> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a53bdfd04" [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a59f31a1" [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a2d84802b" [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a1b1a5029" [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a5eccd9b6" [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a471f9e4a" [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a5ff8e911" [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a775702da" [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a2b6c219" [10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a25f4d6f0" [11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a6d6ee33e" [12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a7c884824" [13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a11d2d07" [14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a1590d22f" [15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BMacd2a5998051c" > > > ### 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: 0xcea1490> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0xcea1490> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0xcea1490> > rowMedians(tmp) [1] 0.171324590 0.565710584 0.257176809 0.188876860 -0.062188770 [6] -0.283236496 -0.089970853 0.026708459 -0.185776563 0.229608360 [11] -0.235795330 -0.312334595 0.297201100 -0.225854162 0.109554647 [16] -0.232841083 0.312318453 0.074306877 -0.239682725 -0.083977593 [21] -0.142121012 0.232304577 0.327800363 0.362500861 -0.310627302 [26] 0.078529682 -0.308480494 -0.071363365 -0.140731614 -0.454360752 [31] -0.025391799 -0.062556101 -0.245388465 -0.247334687 -0.647723131 [36] -0.530626709 -0.607852597 0.125029649 0.668850115 0.568416503 [41] 0.110602144 0.059453306 0.344784366 0.533496982 0.430004141 [46] -0.070724921 0.500101784 -0.014435419 -0.303532597 0.015611130 [51] 0.286494740 0.321265828 0.384739843 -0.436665003 0.336659159 [56] -0.341373205 -0.407412550 -0.125453189 -0.552493933 -0.619903181 [61] -0.072078470 -0.088241164 -0.152528481 0.066928528 0.430562109 [66] 0.217104649 -0.118416835 0.078102564 0.641250147 -0.119007910 [71] -0.173493754 0.433880858 -0.226232929 -0.371361837 0.317126985 [76] 0.110535194 -0.171140827 -0.447019316 0.249591592 -0.447916455 [81] 0.187371814 0.003157805 -0.332906252 -0.475845425 -0.005892648 [86] -0.278463880 0.103506208 0.181960796 0.597715473 0.141127317 [91] 0.537854405 -0.080018069 0.058027044 -0.441722080 0.371287296 [96] 0.251516239 0.030025092 0.268596288 0.059304723 -0.235502887 [101] -0.208514906 -0.153073004 -0.111401886 0.074339414 0.200510275 [106] -0.276644107 0.359447639 -0.274067465 0.927447335 0.299152975 [111] 0.574737151 -0.240004289 0.445835392 -0.568117102 0.515922192 [116] 0.146748629 -0.607908465 0.578000405 -0.095961895 -0.014059810 [121] -0.037228989 0.372932501 -0.285903023 -0.149427708 0.580712457 [126] 0.052797622 0.366208170 -0.409779229 0.088235084 -0.568692316 [131] -0.573418824 0.115828105 -0.431851834 -0.167783443 0.259310881 [136] 0.201167596 0.080423370 0.233321329 -0.144230940 0.131839149 [141] 0.045251693 0.126119842 0.030928539 -0.384654603 -0.317994100 [146] 0.020491121 0.344984273 -0.094732083 0.623983539 -0.258106296 [151] -0.037670573 -0.232906973 0.330269764 0.760129410 0.022595695 [156] 0.318257475 0.302941952 0.395287810 -0.211722319 -0.093176094 [161] 0.078359972 0.268921930 0.089426552 0.200776120 0.571713418 [166] 0.032404497 0.465771030 -0.247623015 0.385504347 -0.203592459 [171] -0.038201852 0.538565498 0.497779703 -0.553776748 -0.363580223 [176] -0.403212135 0.037148282 0.285848209 0.063038940 0.301636360 [181] -0.069149685 0.392596038 -0.308855490 0.773659852 0.420273709 [186] -0.246866277 -0.259391153 0.033227101 0.075745130 -0.299566068 [191] 0.369973194 -0.515577320 0.049437694 -0.174222698 -0.088437591 [196] -0.203709830 -0.342542322 0.093545923 -0.589590590 0.448276652 [201] 0.102317532 0.295670314 -0.011504788 0.293805308 0.069050053 [206] 0.321914184 -0.525019212 -0.027938760 0.089871964 -0.047124219 [211] -0.495717172 0.332915284 0.109617204 -0.425568932 0.480111419 [216] -0.152305416 0.048413569 0.047748565 0.067832399 -0.676995877 [221] 0.363672942 0.226470397 0.261330835 0.432293109 -0.420045245 [226] -0.015972864 -0.049785531 -0.063341161 -0.693348582 0.369268351 > > proc.time() user system elapsed 1.910 0.851 2.786
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: 0x144f6ff0> > .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: 0x144f6ff0> > .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: 0x144f6ff0> > .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: 0x144f6ff0> > 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: 0x14401470> > .Call("R_bm_AddColumn",P) <pointer: 0x14401470> > .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: 0x14401470> > .Call("R_bm_AddColumn",P) <pointer: 0x14401470> > .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: 0x14401470> > 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: 0x143dc0e0> > .Call("R_bm_AddColumn",P) <pointer: 0x143dc0e0> > .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: 0x143dc0e0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x143dc0e0> > .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: 0x143dc0e0> > > .Call("R_bm_RowMode",P) <pointer: 0x143dc0e0> > .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: 0x143dc0e0> > > .Call("R_bm_ColMode",P) <pointer: 0x143dc0e0> > .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: 0x143dc0e0> > 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: 0x13363520> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x13363520> > .Call("R_bm_AddColumn",P) <pointer: 0x13363520> > .Call("R_bm_AddColumn",P) <pointer: 0x13363520> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFileacea842713cfb" "BufferedMatrixFileacea87bc7268f" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFileacea842713cfb" "BufferedMatrixFileacea87bc7268f" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x152ac030> > .Call("R_bm_AddColumn",P) <pointer: 0x152ac030> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x152ac030> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x152ac030> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x152ac030> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x152ac030> > .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: 0x13c775c0> > .Call("R_bm_AddColumn",P) <pointer: 0x13c775c0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x13c775c0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x13c775c0> > 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: 0x14d57f30> > .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: 0x14d57f30> > rm(P) > > proc.time() user system elapsed 0.326 0.038 0.351
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.310 0.055 0.350