Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-10-04 12:07 -0400 (Sat, 04 Oct 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) | x86_64 | 4.5.1 Patched (2025-08-23 r88802) -- "Great Square Root" | 4853 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4640 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4585 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4576 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 255/2341 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.73.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.7 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
taishan | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. - See Martin Grigorov's blog post for how to debug Linux ARM64 related issues on a x86_64 host. |
Package: BufferedMatrix |
Version: 1.73.0 |
Command: /home/biocbuild/R/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R/site-library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz |
StartedAt: 2025-10-03 05:19:00 -0000 (Fri, 03 Oct 2025) |
EndedAt: 2025-10-03 05:19:23 -0000 (Fri, 03 Oct 2025) |
EllapsedTime: 23.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/R/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R/site-library --no-vignettes --timings BufferedMatrix_1.73.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.5.0 (2025-04-11) * using platform: aarch64-unknown-linux-gnu * R was compiled by aarch64-unknown-linux-gnu-gcc (GCC) 14.2.0 GNU Fortran (GCC) 14.2.0 * running under: openEuler 24.03 (LTS) * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.73.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... OK * used C compiler: ‘aarch64-unknown-linux-gnu-gcc (GCC) 14.2.0’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 2 NOTEs See ‘/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/R/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/R/R-4.5.0/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.73.0’ ** using staged installation ** libs using C compiler: ‘aarch64-unknown-linux-gnu-gcc (GCC) 14.2.0’ /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -I"/home/biocbuild/R/R-4.5.0/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -Werror=format-security -c RBufferedMatrix.c -o RBufferedMatrix.o /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -I"/home/biocbuild/R/R-4.5.0/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -Werror=format-security -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function ‘dbm_ReadOnlyMode’: doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ doubleBufferedMatrix.c: At top level: doubleBufferedMatrix.c:3327:12: warning: ‘sort_double’ defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -I"/home/biocbuild/R/R-4.5.0/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -Werror=format-security -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -I"/home/biocbuild/R/R-4.5.0/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -Werror=format-security -c init_package.c -o init_package.o /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -std=gnu23 -shared -L/home/biocbuild/R/R-4.5.0/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/R/R-4.5.0/lib -lR installing to /home/biocbuild/R/R-4.5.0/site-library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-unknown-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.323 0.033 0.342
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-unknown-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 478398 25.6 1047041 56 639620 34.2 Vcells 885166 6.8 8388608 64 2080985 15.9 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Oct 3 05:19:17 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Oct 3 05:19:17 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: 0x3c369ff0> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Fri Oct 3 05:19:17 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Oct 3 05:19:17 2025" > > ColMode(tmp2) <pointer: 0x3c369ff0> > > > > ### 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.8115348 1.545187 0.4217956 -0.2834666 [2,] 0.0814870 -1.056158 0.2161111 0.6989407 [3,] 0.2791984 -1.577468 -0.4618993 0.1369405 [4,] 0.2528207 -1.804622 -1.0034789 0.5726093 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 98.8115348 1.545187 0.4217956 0.2834666 [2,] 0.0814870 1.056158 0.2161111 0.6989407 [3,] 0.2791984 1.577468 0.4618993 0.1369405 [4,] 0.2528207 1.804622 1.0034789 0.5726093 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9403991 1.243055 0.6494579 0.5324158 [2,] 0.2854593 1.027695 0.4648775 0.8360267 [3,] 0.5283923 1.255973 0.6796317 0.3700547 [4,] 0.5028128 1.343362 1.0017380 0.7567095 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 223.21553 38.97574 31.91637 30.60762 [2,] 27.93608 36.33311 29.86489 34.05921 [3,] 30.56312 39.13720 32.25822 28.83749 [4,] 30.28095 40.23824 36.02086 33.13970 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x3d5999a0> > exp(tmp5) <pointer: 0x3d5999a0> > log(tmp5,2) <pointer: 0x3d5999a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 464.5939 > Min(tmp5) [1] 53.06563 > mean(tmp5) [1] 73.45434 > Sum(tmp5) [1] 14690.87 > Var(tmp5) [1] 840.7461 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.51082 72.43030 70.39671 74.17658 67.60953 69.86537 72.29554 71.05909 [9] 71.54068 73.65874 > rowSums(tmp5) [1] 1830.216 1448.606 1407.934 1483.532 1352.191 1397.307 1445.911 1421.182 [9] 1430.814 1473.175 > rowVars(tmp5) [1] 7757.48113 94.46093 74.51504 112.45528 64.44284 67.98068 [7] 51.58030 88.83564 34.36539 44.03170 > rowSd(tmp5) [1] 88.076564 9.719101 8.632209 10.604493 8.027630 8.245039 7.181943 [8] 9.425266 5.862200 6.635638 > rowMax(tmp5) [1] 464.59387 92.12449 83.94633 91.92669 86.47377 88.58751 88.30183 [8] 84.18698 80.74170 87.19828 > rowMin(tmp5) [1] 57.58816 58.14529 53.06563 58.89554 54.83160 53.16133 57.95740 54.99733 [9] 62.29891 61.16992 > > colMeans(tmp5) [1] 109.98685 73.89880 67.54017 67.66954 71.73248 70.03280 71.48502 [8] 72.28722 71.71097 70.01418 69.79949 70.02122 75.90322 71.32708 [15] 77.30983 71.35023 73.64143 73.72833 70.74476 68.90312 > colSums(tmp5) [1] 1099.8685 738.9880 675.4017 676.6954 717.3248 700.3280 714.8502 [8] 722.8722 717.1097 700.1418 697.9949 700.2122 759.0322 713.2708 [15] 773.0983 713.5023 736.4143 737.2833 707.4476 689.0312 > colVars(tmp5) [1] 15586.49185 48.01413 41.67701 26.56549 97.37452 78.32763 [7] 48.26715 76.52610 86.50680 41.37387 89.28058 79.95005 [13] 76.53916 86.38453 75.02906 90.46446 76.81757 35.79984 [19] 89.93969 68.30788 > colSd(tmp5) [1] 124.845872 6.929223 6.455773 5.154172 9.867853 8.850290 [7] 6.947456 8.747920 9.300903 6.432252 9.448840 8.941479 [13] 8.748666 9.294328 8.661932 9.511280 8.764563 5.983296 [19] 9.483654 8.264858 > colMax(tmp5) [1] 464.59387 83.75063 78.07437 77.60727 92.12449 83.94633 79.74608 [8] 82.73011 84.45668 78.39058 85.25464 90.34337 88.58751 88.30183 [15] 91.92669 86.47377 89.97154 83.09396 84.18698 80.30177 > colMin(tmp5) [1] 58.14529 63.50353 54.99733 60.02145 53.16133 59.16780 55.93590 53.06563 [9] 56.68941 56.79364 54.83160 61.41057 62.02299 58.89554 65.94819 58.71779 [17] 57.58816 63.77141 55.76389 55.68174 > > > ### 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.51082 72.43030 70.39671 74.17658 NA 69.86537 72.29554 71.05909 [9] 71.54068 73.65874 > rowSums(tmp5) [1] 1830.216 1448.606 1407.934 1483.532 NA 1397.307 1445.911 1421.182 [9] 1430.814 1473.175 > rowVars(tmp5) [1] 7757.48113 94.46093 74.51504 112.45528 67.96747 67.98068 [7] 51.58030 88.83564 34.36539 44.03170 > rowSd(tmp5) [1] 88.076564 9.719101 8.632209 10.604493 8.244239 8.245039 7.181943 [8] 9.425266 5.862200 6.635638 > rowMax(tmp5) [1] 464.59387 92.12449 83.94633 91.92669 NA 88.58751 88.30183 [8] 84.18698 80.74170 87.19828 > rowMin(tmp5) [1] 57.58816 58.14529 53.06563 58.89554 NA 53.16133 57.95740 54.99733 [9] 62.29891 61.16992 > > colMeans(tmp5) [1] 109.98685 73.89880 67.54017 67.66954 71.73248 70.03280 71.48502 [8] 72.28722 71.71097 NA 69.79949 70.02122 75.90322 71.32708 [15] 77.30983 71.35023 73.64143 73.72833 70.74476 68.90312 > colSums(tmp5) [1] 1099.8685 738.9880 675.4017 676.6954 717.3248 700.3280 714.8502 [8] 722.8722 717.1097 NA 697.9949 700.2122 759.0322 713.2708 [15] 773.0983 713.5023 736.4143 737.2833 707.4476 689.0312 > colVars(tmp5) [1] 15586.49185 48.01413 41.67701 26.56549 97.37452 78.32763 [7] 48.26715 76.52610 86.50680 NA 89.28058 79.95005 [13] 76.53916 86.38453 75.02906 90.46446 76.81757 35.79984 [19] 89.93969 68.30788 > colSd(tmp5) [1] 124.845872 6.929223 6.455773 5.154172 9.867853 8.850290 [7] 6.947456 8.747920 9.300903 NA 9.448840 8.941479 [13] 8.748666 9.294328 8.661932 9.511280 8.764563 5.983296 [19] 9.483654 8.264858 > colMax(tmp5) [1] 464.59387 83.75063 78.07437 77.60727 92.12449 83.94633 79.74608 [8] 82.73011 84.45668 NA 85.25464 90.34337 88.58751 88.30183 [15] 91.92669 86.47377 89.97154 83.09396 84.18698 80.30177 > colMin(tmp5) [1] 58.14529 63.50353 54.99733 60.02145 53.16133 59.16780 55.93590 53.06563 [9] 56.68941 NA 54.83160 61.41057 62.02299 58.89554 65.94819 58.71779 [17] 57.58816 63.77141 55.76389 55.68174 > > Max(tmp5,na.rm=TRUE) [1] 464.5939 > Min(tmp5,na.rm=TRUE) [1] 53.06563 > mean(tmp5,na.rm=TRUE) [1] 73.4886 > Sum(tmp5,na.rm=TRUE) [1] 14624.23 > Var(tmp5,na.rm=TRUE) [1] 844.7562 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.51082 72.43030 70.39671 74.17658 67.66081 69.86537 72.29554 71.05909 [9] 71.54068 73.65874 > rowSums(tmp5,na.rm=TRUE) [1] 1830.216 1448.606 1407.934 1483.532 1285.555 1397.307 1445.911 1421.182 [9] 1430.814 1473.175 > rowVars(tmp5,na.rm=TRUE) [1] 7757.48113 94.46093 74.51504 112.45528 67.96747 67.98068 [7] 51.58030 88.83564 34.36539 44.03170 > rowSd(tmp5,na.rm=TRUE) [1] 88.076564 9.719101 8.632209 10.604493 8.244239 8.245039 7.181943 [8] 9.425266 5.862200 6.635638 > rowMax(tmp5,na.rm=TRUE) [1] 464.59387 92.12449 83.94633 91.92669 86.47377 88.58751 88.30183 [8] 84.18698 80.74170 87.19828 > rowMin(tmp5,na.rm=TRUE) [1] 57.58816 58.14529 53.06563 58.89554 54.83160 53.16133 57.95740 54.99733 [9] 62.29891 61.16992 > > colMeans(tmp5,na.rm=TRUE) [1] 109.98685 73.89880 67.54017 67.66954 71.73248 70.03280 71.48502 [8] 72.28722 71.71097 70.38964 69.79949 70.02122 75.90322 71.32708 [15] 77.30983 71.35023 73.64143 73.72833 70.74476 68.90312 > colSums(tmp5,na.rm=TRUE) [1] 1099.8685 738.9880 675.4017 676.6954 717.3248 700.3280 714.8502 [8] 722.8722 717.1097 633.5067 697.9949 700.2122 759.0322 713.2708 [15] 773.0983 713.5023 736.4143 737.2833 707.4476 689.0312 > colVars(tmp5,na.rm=TRUE) [1] 15586.49185 48.01413 41.67701 26.56549 97.37452 78.32763 [7] 48.26715 76.52610 86.50680 44.95974 89.28058 79.95005 [13] 76.53916 86.38453 75.02906 90.46446 76.81757 35.79984 [19] 89.93969 68.30788 > colSd(tmp5,na.rm=TRUE) [1] 124.845872 6.929223 6.455773 5.154172 9.867853 8.850290 [7] 6.947456 8.747920 9.300903 6.705202 9.448840 8.941479 [13] 8.748666 9.294328 8.661932 9.511280 8.764563 5.983296 [19] 9.483654 8.264858 > colMax(tmp5,na.rm=TRUE) [1] 464.59387 83.75063 78.07437 77.60727 92.12449 83.94633 79.74608 [8] 82.73011 84.45668 78.39058 85.25464 90.34337 88.58751 88.30183 [15] 91.92669 86.47377 89.97154 83.09396 84.18698 80.30177 > colMin(tmp5,na.rm=TRUE) [1] 58.14529 63.50353 54.99733 60.02145 53.16133 59.16780 55.93590 53.06563 [9] 56.68941 56.79364 54.83160 61.41057 62.02299 58.89554 65.94819 58.71779 [17] 57.58816 63.77141 55.76389 55.68174 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.51082 72.43030 70.39671 74.17658 NaN 69.86537 72.29554 71.05909 [9] 71.54068 73.65874 > rowSums(tmp5,na.rm=TRUE) [1] 1830.216 1448.606 1407.934 1483.532 0.000 1397.307 1445.911 1421.182 [9] 1430.814 1473.175 > rowVars(tmp5,na.rm=TRUE) [1] 7757.48113 94.46093 74.51504 112.45528 NA 67.98068 [7] 51.58030 88.83564 34.36539 44.03170 > rowSd(tmp5,na.rm=TRUE) [1] 88.076564 9.719101 8.632209 10.604493 NA 8.245039 7.181943 [8] 9.425266 5.862200 6.635638 > rowMax(tmp5,na.rm=TRUE) [1] 464.59387 92.12449 83.94633 91.92669 NA 88.58751 88.30183 [8] 84.18698 80.74170 87.19828 > rowMin(tmp5,na.rm=TRUE) [1] 57.58816 58.14529 53.06563 58.89554 NA 53.16133 57.95740 54.99733 [9] 62.29891 61.16992 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 114.71159 75.05383 66.36970 67.82021 71.75022 71.24002 71.24433 [8] 72.76885 73.38004 NaN 71.46259 70.46118 77.10020 72.16663 [15] 77.44530 69.66984 73.24854 74.17759 72.40930 69.20559 > colSums(tmp5,na.rm=TRUE) [1] 1032.4044 675.4845 597.3273 610.3819 645.7520 641.1602 641.1990 [8] 654.9197 660.4203 0.0000 643.1633 634.1506 693.9018 649.4997 [15] 697.0077 627.0285 659.2369 667.5983 651.6837 622.8503 > colVars(tmp5,na.rm=TRUE) [1] 17283.66728 39.00734 31.47421 29.63076 109.54279 71.72301 [7] 53.64881 83.48221 65.98024 NA 69.32430 87.76612 [13] 69.98809 89.25310 84.20124 70.00563 84.68317 38.00418 [19] 70.01182 75.81709 > colSd(tmp5,na.rm=TRUE) [1] 131.467362 6.245585 5.610188 5.443415 10.466269 8.468944 [7] 7.324535 9.136860 8.122822 NA 8.326122 9.368358 [13] 8.365889 9.447386 9.176123 8.366936 9.202346 6.164753 [19] 8.367307 8.707301 > colMax(tmp5,na.rm=TRUE) [1] 464.59387 83.75063 74.97270 77.60727 92.12449 83.94633 79.74608 [8] 82.73011 84.45668 -Inf 85.25464 90.34337 88.58751 88.30183 [15] 91.92669 83.68641 89.97154 83.09396 84.18698 80.30177 > colMin(tmp5,na.rm=TRUE) [1] 58.14529 64.01608 54.99733 60.02145 53.16133 59.70416 55.93590 53.06563 [9] 58.81830 Inf 59.39497 61.41057 62.02299 58.89554 65.94819 58.71779 [17] 57.58816 63.77141 60.67819 55.68174 > > > > > 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] 262.49589 94.34943 355.16708 289.13234 157.12454 208.45486 240.26324 [8] 261.51328 209.61331 146.47271 > apply(copymatrix,1,var,na.rm=TRUE) [1] 262.49589 94.34943 355.16708 289.13234 157.12454 208.45486 240.26324 [8] 261.51328 209.61331 146.47271 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 2.842171e-14 -8.526513e-14 1.705303e-13 1.136868e-13 -9.947598e-14 [6] 5.684342e-14 1.421085e-14 0.000000e+00 2.842171e-14 -8.526513e-14 [11] -1.705303e-13 1.136868e-13 -3.410605e-13 -7.105427e-14 0.000000e+00 [16] -1.136868e-13 0.000000e+00 -5.684342e-14 2.842171e-14 -8.526513e-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) + } 5 2 10 15 10 11 6 3 3 3 4 10 5 15 7 12 6 12 7 6 6 7 5 10 8 18 4 7 10 16 4 13 5 4 2 2 5 7 7 12 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.719118 > Min(tmp) [1] -2.20238 > mean(tmp) [1] -0.1838529 > Sum(tmp) [1] -18.38529 > Var(tmp) [1] 0.937967 > > rowMeans(tmp) [1] -0.1838529 > rowSums(tmp) [1] -18.38529 > rowVars(tmp) [1] 0.937967 > rowSd(tmp) [1] 0.968487 > rowMax(tmp) [1] 2.719118 > rowMin(tmp) [1] -2.20238 > > colMeans(tmp) [1] -1.11062818 -0.55380955 -0.16740333 1.23202836 2.71911755 1.34312831 [7] -0.76942860 1.59071086 -0.15113878 0.58614977 0.41412152 -1.10759572 [13] -0.17585376 0.93383675 -0.78418892 -0.53541160 0.67730428 -1.25749438 [19] 0.30054576 0.08039024 0.10659753 -0.80239408 -1.14412931 1.42824023 [25] -0.69261068 0.67970640 0.12981373 -1.40745945 -1.40734463 -0.74698698 [31] 1.01527176 -0.13737389 -1.20028838 -0.00786328 -0.77875607 0.26621973 [37] 0.52233203 -1.59360878 0.19806197 -1.03735077 0.16168711 0.43885387 [43] 0.68037539 -0.04700262 1.00581947 -1.69828593 -0.42167987 -1.41663648 [49] -1.93638506 -0.08760729 0.15407936 -0.72331768 -1.59208704 -0.59982023 [55] -2.20238017 1.00224352 1.08541334 -1.08504059 -0.95667145 -1.50359280 [61] -0.28757758 0.15362809 -0.43067022 0.18774665 -1.04116711 0.34920874 [67] 0.14418976 1.49093144 -1.41972330 0.70892989 0.14672104 -0.87960337 [73] 0.06160228 -1.86434888 0.31964832 0.43552935 -0.47972540 0.74464156 [79] 0.83462823 -0.96702951 -0.42747956 -0.66419795 -1.17056941 -1.53383955 [85] 0.34538266 0.12928708 1.07772120 1.01876524 1.50353238 1.92460650 [91] 0.38706389 -0.81039695 -0.73154320 -0.89348144 -0.03325765 -1.83370677 [97] -0.56076163 -0.11550021 0.08169962 -1.19859702 > colSums(tmp) [1] -1.11062818 -0.55380955 -0.16740333 1.23202836 2.71911755 1.34312831 [7] -0.76942860 1.59071086 -0.15113878 0.58614977 0.41412152 -1.10759572 [13] -0.17585376 0.93383675 -0.78418892 -0.53541160 0.67730428 -1.25749438 [19] 0.30054576 0.08039024 0.10659753 -0.80239408 -1.14412931 1.42824023 [25] -0.69261068 0.67970640 0.12981373 -1.40745945 -1.40734463 -0.74698698 [31] 1.01527176 -0.13737389 -1.20028838 -0.00786328 -0.77875607 0.26621973 [37] 0.52233203 -1.59360878 0.19806197 -1.03735077 0.16168711 0.43885387 [43] 0.68037539 -0.04700262 1.00581947 -1.69828593 -0.42167987 -1.41663648 [49] -1.93638506 -0.08760729 0.15407936 -0.72331768 -1.59208704 -0.59982023 [55] -2.20238017 1.00224352 1.08541334 -1.08504059 -0.95667145 -1.50359280 [61] -0.28757758 0.15362809 -0.43067022 0.18774665 -1.04116711 0.34920874 [67] 0.14418976 1.49093144 -1.41972330 0.70892989 0.14672104 -0.87960337 [73] 0.06160228 -1.86434888 0.31964832 0.43552935 -0.47972540 0.74464156 [79] 0.83462823 -0.96702951 -0.42747956 -0.66419795 -1.17056941 -1.53383955 [85] 0.34538266 0.12928708 1.07772120 1.01876524 1.50353238 1.92460650 [91] 0.38706389 -0.81039695 -0.73154320 -0.89348144 -0.03325765 -1.83370677 [97] -0.56076163 -0.11550021 0.08169962 -1.19859702 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] -1.11062818 -0.55380955 -0.16740333 1.23202836 2.71911755 1.34312831 [7] -0.76942860 1.59071086 -0.15113878 0.58614977 0.41412152 -1.10759572 [13] -0.17585376 0.93383675 -0.78418892 -0.53541160 0.67730428 -1.25749438 [19] 0.30054576 0.08039024 0.10659753 -0.80239408 -1.14412931 1.42824023 [25] -0.69261068 0.67970640 0.12981373 -1.40745945 -1.40734463 -0.74698698 [31] 1.01527176 -0.13737389 -1.20028838 -0.00786328 -0.77875607 0.26621973 [37] 0.52233203 -1.59360878 0.19806197 -1.03735077 0.16168711 0.43885387 [43] 0.68037539 -0.04700262 1.00581947 -1.69828593 -0.42167987 -1.41663648 [49] -1.93638506 -0.08760729 0.15407936 -0.72331768 -1.59208704 -0.59982023 [55] -2.20238017 1.00224352 1.08541334 -1.08504059 -0.95667145 -1.50359280 [61] -0.28757758 0.15362809 -0.43067022 0.18774665 -1.04116711 0.34920874 [67] 0.14418976 1.49093144 -1.41972330 0.70892989 0.14672104 -0.87960337 [73] 0.06160228 -1.86434888 0.31964832 0.43552935 -0.47972540 0.74464156 [79] 0.83462823 -0.96702951 -0.42747956 -0.66419795 -1.17056941 -1.53383955 [85] 0.34538266 0.12928708 1.07772120 1.01876524 1.50353238 1.92460650 [91] 0.38706389 -0.81039695 -0.73154320 -0.89348144 -0.03325765 -1.83370677 [97] -0.56076163 -0.11550021 0.08169962 -1.19859702 > colMin(tmp) [1] -1.11062818 -0.55380955 -0.16740333 1.23202836 2.71911755 1.34312831 [7] -0.76942860 1.59071086 -0.15113878 0.58614977 0.41412152 -1.10759572 [13] -0.17585376 0.93383675 -0.78418892 -0.53541160 0.67730428 -1.25749438 [19] 0.30054576 0.08039024 0.10659753 -0.80239408 -1.14412931 1.42824023 [25] -0.69261068 0.67970640 0.12981373 -1.40745945 -1.40734463 -0.74698698 [31] 1.01527176 -0.13737389 -1.20028838 -0.00786328 -0.77875607 0.26621973 [37] 0.52233203 -1.59360878 0.19806197 -1.03735077 0.16168711 0.43885387 [43] 0.68037539 -0.04700262 1.00581947 -1.69828593 -0.42167987 -1.41663648 [49] -1.93638506 -0.08760729 0.15407936 -0.72331768 -1.59208704 -0.59982023 [55] -2.20238017 1.00224352 1.08541334 -1.08504059 -0.95667145 -1.50359280 [61] -0.28757758 0.15362809 -0.43067022 0.18774665 -1.04116711 0.34920874 [67] 0.14418976 1.49093144 -1.41972330 0.70892989 0.14672104 -0.87960337 [73] 0.06160228 -1.86434888 0.31964832 0.43552935 -0.47972540 0.74464156 [79] 0.83462823 -0.96702951 -0.42747956 -0.66419795 -1.17056941 -1.53383955 [85] 0.34538266 0.12928708 1.07772120 1.01876524 1.50353238 1.92460650 [91] 0.38706389 -0.81039695 -0.73154320 -0.89348144 -0.03325765 -1.83370677 [97] -0.56076163 -0.11550021 0.08169962 -1.19859702 > colMedians(tmp) [1] -1.11062818 -0.55380955 -0.16740333 1.23202836 2.71911755 1.34312831 [7] -0.76942860 1.59071086 -0.15113878 0.58614977 0.41412152 -1.10759572 [13] -0.17585376 0.93383675 -0.78418892 -0.53541160 0.67730428 -1.25749438 [19] 0.30054576 0.08039024 0.10659753 -0.80239408 -1.14412931 1.42824023 [25] -0.69261068 0.67970640 0.12981373 -1.40745945 -1.40734463 -0.74698698 [31] 1.01527176 -0.13737389 -1.20028838 -0.00786328 -0.77875607 0.26621973 [37] 0.52233203 -1.59360878 0.19806197 -1.03735077 0.16168711 0.43885387 [43] 0.68037539 -0.04700262 1.00581947 -1.69828593 -0.42167987 -1.41663648 [49] -1.93638506 -0.08760729 0.15407936 -0.72331768 -1.59208704 -0.59982023 [55] -2.20238017 1.00224352 1.08541334 -1.08504059 -0.95667145 -1.50359280 [61] -0.28757758 0.15362809 -0.43067022 0.18774665 -1.04116711 0.34920874 [67] 0.14418976 1.49093144 -1.41972330 0.70892989 0.14672104 -0.87960337 [73] 0.06160228 -1.86434888 0.31964832 0.43552935 -0.47972540 0.74464156 [79] 0.83462823 -0.96702951 -0.42747956 -0.66419795 -1.17056941 -1.53383955 [85] 0.34538266 0.12928708 1.07772120 1.01876524 1.50353238 1.92460650 [91] 0.38706389 -0.81039695 -0.73154320 -0.89348144 -0.03325765 -1.83370677 [97] -0.56076163 -0.11550021 0.08169962 -1.19859702 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.110628 -0.5538095 -0.1674033 1.232028 2.719118 1.343128 -0.7694286 [2,] -1.110628 -0.5538095 -0.1674033 1.232028 2.719118 1.343128 -0.7694286 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.590711 -0.1511388 0.5861498 0.4141215 -1.107596 -0.1758538 0.9338368 [2,] 1.590711 -0.1511388 0.5861498 0.4141215 -1.107596 -0.1758538 0.9338368 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.7841889 -0.5354116 0.6773043 -1.257494 0.3005458 0.08039024 0.1065975 [2,] -0.7841889 -0.5354116 0.6773043 -1.257494 0.3005458 0.08039024 0.1065975 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.8023941 -1.144129 1.42824 -0.6926107 0.6797064 0.1298137 -1.407459 [2,] -0.8023941 -1.144129 1.42824 -0.6926107 0.6797064 0.1298137 -1.407459 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -1.407345 -0.746987 1.015272 -0.1373739 -1.200288 -0.00786328 -0.7787561 [2,] -1.407345 -0.746987 1.015272 -0.1373739 -1.200288 -0.00786328 -0.7787561 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.2662197 0.522332 -1.593609 0.198062 -1.037351 0.1616871 0.4388539 [2,] 0.2662197 0.522332 -1.593609 0.198062 -1.037351 0.1616871 0.4388539 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.6803754 -0.04700262 1.005819 -1.698286 -0.4216799 -1.416636 -1.936385 [2,] 0.6803754 -0.04700262 1.005819 -1.698286 -0.4216799 -1.416636 -1.936385 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -0.08760729 0.1540794 -0.7233177 -1.592087 -0.5998202 -2.20238 1.002244 [2,] -0.08760729 0.1540794 -0.7233177 -1.592087 -0.5998202 -2.20238 1.002244 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 1.085413 -1.085041 -0.9566714 -1.503593 -0.2875776 0.1536281 -0.4306702 [2,] 1.085413 -1.085041 -0.9566714 -1.503593 -0.2875776 0.1536281 -0.4306702 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.1877466 -1.041167 0.3492087 0.1441898 1.490931 -1.419723 0.7089299 [2,] 0.1877466 -1.041167 0.3492087 0.1441898 1.490931 -1.419723 0.7089299 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.146721 -0.8796034 0.06160228 -1.864349 0.3196483 0.4355293 -0.4797254 [2,] 0.146721 -0.8796034 0.06160228 -1.864349 0.3196483 0.4355293 -0.4797254 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.7446416 0.8346282 -0.9670295 -0.4274796 -0.664198 -1.170569 -1.53384 [2,] 0.7446416 0.8346282 -0.9670295 -0.4274796 -0.664198 -1.170569 -1.53384 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.3453827 0.1292871 1.077721 1.018765 1.503532 1.924606 0.3870639 [2,] 0.3453827 0.1292871 1.077721 1.018765 1.503532 1.924606 0.3870639 [,92] [,93] [,94] [,95] [,96] [,97] [1,] -0.810397 -0.7315432 -0.8934814 -0.03325765 -1.833707 -0.5607616 [2,] -0.810397 -0.7315432 -0.8934814 -0.03325765 -1.833707 -0.5607616 [,98] [,99] [,100] [1,] -0.1155002 0.08169962 -1.198597 [2,] -0.1155002 0.08169962 -1.198597 > > > Max(tmp2) [1] 2.404106 > Min(tmp2) [1] -2.468663 > mean(tmp2) [1] -0.1450512 > Sum(tmp2) [1] -14.50512 > Var(tmp2) [1] 0.9713436 > > rowMeans(tmp2) [1] 0.70937323 0.78877384 -0.95867117 0.42388863 -0.27880312 -0.02054905 [7] -1.07452324 -0.15995629 0.49645497 0.77183440 -0.32534770 0.79908836 [13] -0.82600084 2.32459226 -1.40181793 0.48729189 0.70719565 -1.16644760 [19] -0.56063604 -1.40783705 -0.28650233 -0.98592853 -0.61603320 -2.19003736 [25] -0.80830962 -2.13649978 -0.45764152 1.53597033 0.78067277 -0.95986165 [31] 0.77383557 -1.02939737 0.80868839 0.02338671 -0.23654851 0.82435712 [37] 0.29868331 0.82141781 0.93879190 -0.10185801 -1.43590191 0.12347949 [43] 2.16463443 2.40410587 1.47398645 -0.68858281 -1.90701916 -1.35222173 [49] 0.63196137 -0.52330611 -1.64837424 0.46732185 -0.29434582 -0.28928087 [55] -2.46866312 0.30936961 -0.54879753 -1.29182670 -0.62007597 -0.21108964 [61] 0.08670299 -1.06971187 1.17241163 -0.41543167 -1.12764267 0.46369031 [67] -0.77833589 1.99453826 1.19924634 0.51088587 -1.56972524 -1.15920361 [73] -0.20188273 0.19794844 0.34989639 -0.40939042 -1.61830246 0.12838405 [79] -0.92642000 -0.47732645 -0.75012202 0.05082066 1.00689964 -0.39764397 [85] 0.17010571 -1.18451300 0.70428799 -0.74506458 0.16168118 -0.97759586 [91] 0.65044558 -0.09197701 -0.79394240 0.22980863 -0.54082503 0.44927976 [97] 0.86854394 -1.08945540 0.53424008 0.26911260 > rowSums(tmp2) [1] 0.70937323 0.78877384 -0.95867117 0.42388863 -0.27880312 -0.02054905 [7] -1.07452324 -0.15995629 0.49645497 0.77183440 -0.32534770 0.79908836 [13] -0.82600084 2.32459226 -1.40181793 0.48729189 0.70719565 -1.16644760 [19] -0.56063604 -1.40783705 -0.28650233 -0.98592853 -0.61603320 -2.19003736 [25] -0.80830962 -2.13649978 -0.45764152 1.53597033 0.78067277 -0.95986165 [31] 0.77383557 -1.02939737 0.80868839 0.02338671 -0.23654851 0.82435712 [37] 0.29868331 0.82141781 0.93879190 -0.10185801 -1.43590191 0.12347949 [43] 2.16463443 2.40410587 1.47398645 -0.68858281 -1.90701916 -1.35222173 [49] 0.63196137 -0.52330611 -1.64837424 0.46732185 -0.29434582 -0.28928087 [55] -2.46866312 0.30936961 -0.54879753 -1.29182670 -0.62007597 -0.21108964 [61] 0.08670299 -1.06971187 1.17241163 -0.41543167 -1.12764267 0.46369031 [67] -0.77833589 1.99453826 1.19924634 0.51088587 -1.56972524 -1.15920361 [73] -0.20188273 0.19794844 0.34989639 -0.40939042 -1.61830246 0.12838405 [79] -0.92642000 -0.47732645 -0.75012202 0.05082066 1.00689964 -0.39764397 [85] 0.17010571 -1.18451300 0.70428799 -0.74506458 0.16168118 -0.97759586 [91] 0.65044558 -0.09197701 -0.79394240 0.22980863 -0.54082503 0.44927976 [97] 0.86854394 -1.08945540 0.53424008 0.26911260 > 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.70937323 0.78877384 -0.95867117 0.42388863 -0.27880312 -0.02054905 [7] -1.07452324 -0.15995629 0.49645497 0.77183440 -0.32534770 0.79908836 [13] -0.82600084 2.32459226 -1.40181793 0.48729189 0.70719565 -1.16644760 [19] -0.56063604 -1.40783705 -0.28650233 -0.98592853 -0.61603320 -2.19003736 [25] -0.80830962 -2.13649978 -0.45764152 1.53597033 0.78067277 -0.95986165 [31] 0.77383557 -1.02939737 0.80868839 0.02338671 -0.23654851 0.82435712 [37] 0.29868331 0.82141781 0.93879190 -0.10185801 -1.43590191 0.12347949 [43] 2.16463443 2.40410587 1.47398645 -0.68858281 -1.90701916 -1.35222173 [49] 0.63196137 -0.52330611 -1.64837424 0.46732185 -0.29434582 -0.28928087 [55] -2.46866312 0.30936961 -0.54879753 -1.29182670 -0.62007597 -0.21108964 [61] 0.08670299 -1.06971187 1.17241163 -0.41543167 -1.12764267 0.46369031 [67] -0.77833589 1.99453826 1.19924634 0.51088587 -1.56972524 -1.15920361 [73] -0.20188273 0.19794844 0.34989639 -0.40939042 -1.61830246 0.12838405 [79] -0.92642000 -0.47732645 -0.75012202 0.05082066 1.00689964 -0.39764397 [85] 0.17010571 -1.18451300 0.70428799 -0.74506458 0.16168118 -0.97759586 [91] 0.65044558 -0.09197701 -0.79394240 0.22980863 -0.54082503 0.44927976 [97] 0.86854394 -1.08945540 0.53424008 0.26911260 > rowMin(tmp2) [1] 0.70937323 0.78877384 -0.95867117 0.42388863 -0.27880312 -0.02054905 [7] -1.07452324 -0.15995629 0.49645497 0.77183440 -0.32534770 0.79908836 [13] -0.82600084 2.32459226 -1.40181793 0.48729189 0.70719565 -1.16644760 [19] -0.56063604 -1.40783705 -0.28650233 -0.98592853 -0.61603320 -2.19003736 [25] -0.80830962 -2.13649978 -0.45764152 1.53597033 0.78067277 -0.95986165 [31] 0.77383557 -1.02939737 0.80868839 0.02338671 -0.23654851 0.82435712 [37] 0.29868331 0.82141781 0.93879190 -0.10185801 -1.43590191 0.12347949 [43] 2.16463443 2.40410587 1.47398645 -0.68858281 -1.90701916 -1.35222173 [49] 0.63196137 -0.52330611 -1.64837424 0.46732185 -0.29434582 -0.28928087 [55] -2.46866312 0.30936961 -0.54879753 -1.29182670 -0.62007597 -0.21108964 [61] 0.08670299 -1.06971187 1.17241163 -0.41543167 -1.12764267 0.46369031 [67] -0.77833589 1.99453826 1.19924634 0.51088587 -1.56972524 -1.15920361 [73] -0.20188273 0.19794844 0.34989639 -0.40939042 -1.61830246 0.12838405 [79] -0.92642000 -0.47732645 -0.75012202 0.05082066 1.00689964 -0.39764397 [85] 0.17010571 -1.18451300 0.70428799 -0.74506458 0.16168118 -0.97759586 [91] 0.65044558 -0.09197701 -0.79394240 0.22980863 -0.54082503 0.44927976 [97] 0.86854394 -1.08945540 0.53424008 0.26911260 > > colMeans(tmp2) [1] -0.1450512 > colSums(tmp2) [1] -14.50512 > colVars(tmp2) [1] 0.9713436 > colSd(tmp2) [1] 0.9855677 > colMax(tmp2) [1] 2.404106 > colMin(tmp2) [1] -2.468663 > colMedians(tmp2) [1] -0.2064862 > colRanges(tmp2) [,1] [1,] -2.468663 [2,] 2.404106 > > 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] -3.6376793 -1.7917037 1.8248489 7.0967126 4.2426981 -4.2508826 [7] 0.9264707 -3.6477079 1.1927989 9.7661562 > colApply(tmp,quantile)[,1] [,1] [1,] -1.90804475 [2,] -1.35369703 [3,] -0.07653534 [4,] 0.42044430 [5,] 0.94060024 > > rowApply(tmp,sum) [1] 0.9130042 3.6685986 -0.6202261 -2.1556601 0.3497492 0.4218803 [7] 1.7625975 1.7715677 4.0161070 1.5940934 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 6 5 9 1 8 5 1 6 3 [2,] 7 10 2 2 8 9 2 7 1 1 [3,] 5 1 7 4 9 6 6 9 7 2 [4,] 9 8 6 5 10 5 4 10 4 6 [5,] 3 9 9 7 3 4 10 5 9 7 [6,] 8 5 10 8 2 1 1 6 3 4 [7,] 10 3 1 6 4 7 9 3 2 8 [8,] 4 2 4 3 5 2 7 2 5 5 [9,] 2 4 8 1 6 3 3 8 8 10 [10,] 6 7 3 10 7 10 8 4 10 9 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.61883525 -3.19583799 1.28554458 0.30788117 0.34802002 0.44699355 [7] 1.87758984 -0.13157227 -0.08949002 1.06425024 -1.36286518 -1.91977814 [13] 2.06180067 -2.22813124 -1.89184666 0.89596710 0.76882883 2.16579738 [19] -1.20260739 -2.19011380 > colApply(tmp,quantile)[,1] [,1] [1,] -0.73186767 [2,] -0.56013188 [3,] -0.02957857 [4,] 0.30406679 [5,] 0.39867608 > > rowApply(tmp,sum) [1] -0.3916947 -2.0727629 -4.2762506 1.9765609 1.1557427 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 14 11 8 3 13 [2,] 15 2 1 8 8 [3,] 8 10 10 19 15 [4,] 6 20 2 15 18 [5,] 2 13 16 16 5 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.39867608 0.61492424 -0.2546395 -0.7374621 -1.2017539 0.7544993 [2,] -0.02957857 -1.24151385 -0.1540008 0.9434615 0.3705044 -0.8919609 [3,] -0.56013188 -2.00359985 -0.4065193 -1.4809544 0.6933505 -0.3056889 [4,] -0.73186767 -0.51578699 1.5344795 0.7276526 0.9218294 0.3461456 [5,] 0.30406679 -0.04986154 0.5662246 0.8551836 -0.4359105 0.5439984 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.822422e-05 0.3703778 0.9429444 -0.8661971 -0.01764039 -0.41250688 [2,] 7.049267e-01 -0.3808066 -1.0349747 0.7458419 -0.36155142 -0.58894357 [3,] -1.721144e-02 0.2210834 -0.9450300 0.8286657 -0.66433026 -0.21178150 [4,] 1.152513e+00 -0.5365239 -0.2980869 1.4648542 0.08472049 -0.67699629 [5,] 3.734383e-02 0.1942971 1.2456571 -1.1089145 -0.40406360 -0.02954991 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.0940938 -1.3350421 1.015887525 0.909094252 0.07379517 -0.8164750 [2,] 0.7783209 0.5867470 -2.076554615 -0.005230094 0.50298027 -0.3212686 [3,] 1.3476889 -1.2471697 -0.956022934 -0.529866524 -1.24714848 1.5121595 [4,] -0.6283173 -1.0458969 0.129617009 -0.246809245 1.93384174 0.4895303 [5,] -0.5299855 0.8132305 -0.004773646 0.768778708 -0.49463986 1.3018513 [,19] [,20] [1,] -0.8469945 -0.07729396 [2,] -0.4415911 0.82242921 [3,] 1.7923924 -0.09613583 [4,] -1.4876854 -0.64065184 [5,] -0.2187288 -2.19846139 > > > 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 : 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.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 565 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 0.7516365 -0.3328332 1.114574 -0.4120943 0.6231471 -0.223058 -0.8347921 col8 col9 col10 col11 col12 col13 col14 row1 -1.453929 -1.330476 1.487476 -0.9897163 -1.464733 -1.140286 -0.4169248 col15 col16 col17 col18 col19 col20 row1 -0.2083236 0.7087617 -0.7323523 -0.4518222 0.1322066 -0.1651631 > tmp[,"col10"] col10 row1 1.48747562 row2 -0.22286283 row3 1.76117597 row4 -0.50035253 row5 0.04544701 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 0.7516365 -0.3328332 1.1145738 -0.4120943 0.6231471 -0.2230580 -0.8347921 row5 0.6804216 -0.3794794 -0.0066799 -1.2703249 0.3894358 -0.7513242 0.2850173 col8 col9 col10 col11 col12 col13 col14 row1 -1.4539291 -1.330476 1.48747562 -0.9897163 -1.464733 -1.140286 -0.4169248 row5 -0.4615764 -1.006005 0.04544701 -3.3294712 1.057934 -1.243307 0.8128940 col15 col16 col17 col18 col19 col20 row1 -0.2083236 0.7087617 -0.7323523 -0.4518222 0.1322066 -0.1651631 row5 -0.5235682 0.8724635 -0.2727476 -0.7310934 0.4687591 -0.8238953 > tmp[,c("col6","col20")] col6 col20 row1 -0.2230580 -0.1651631 row2 1.9614491 -0.4251708 row3 -1.2300407 -1.5524088 row4 0.4670269 2.2139029 row5 -0.7513242 -0.8238953 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.2230580 -0.1651631 row5 -0.7513242 -0.8238953 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.81929 51.2065 50.02093 50.58153 48.87755 105.0774 49.51778 50.83344 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.23084 49.75449 49.07477 49.86708 50.58883 47.85737 49.26392 49.82564 col17 col18 col19 col20 row1 47.61458 48.58573 48.89433 105.4042 > tmp[,"col10"] col10 row1 49.75449 row2 29.23912 row3 28.62393 row4 30.20503 row5 50.95883 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.81929 51.20650 50.02093 50.58153 48.87755 105.0774 49.51778 50.83344 row5 49.42222 49.13429 51.40731 50.26066 52.01225 104.3226 50.15408 49.46776 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.23084 49.75449 49.07477 49.86708 50.58883 47.85737 49.26392 49.82564 row5 50.68587 50.95883 50.89627 50.10647 50.20597 49.22206 49.48248 50.79370 col17 col18 col19 col20 row1 47.61458 48.58573 48.89433 105.4042 row5 50.00256 49.25528 48.74749 104.4063 > tmp[,c("col6","col20")] col6 col20 row1 105.07739 105.40421 row2 73.73640 75.47342 row3 74.86953 75.77648 row4 74.25543 74.66232 row5 104.32260 104.40633 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.0774 105.4042 row5 104.3226 104.4063 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.0774 105.4042 row5 104.3226 104.4063 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.1851878 [2,] -0.2392891 [3,] 0.1861298 [4,] 0.5937599 [5,] -0.4646226 > tmp[,c("col17","col7")] col17 col7 [1,] 0.68365990 0.6071130 [2,] 0.34888645 0.9047413 [3,] -0.01769432 0.9870892 [4,] 0.17553365 0.3095963 [5,] 0.83881108 -0.1144205 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -1.1145761 1.2070852 [2,] -0.2973197 -0.2034636 [3,] -0.7788505 -1.1892704 [4,] -0.3014794 1.9888102 [5,] 0.7611089 -1.1272240 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -1.114576 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -1.1145761 [2,] -0.2973197 > > > > 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.21756095 1.8448995 0.7060898 -1.8226631 2.297733 -0.2274579 -1.1400636 row1 0.02993392 0.5546907 -0.4936491 0.7717458 -1.594210 1.2459881 -0.4126237 [,8] [,9] [,10] [,11] [,12] [,13] row3 1.6752854 -0.4004324 -0.9174292 0.4058021 -0.8545198 -0.9914375 row1 -0.2739185 0.2343797 -0.1043151 -1.4981828 -0.1814158 3.2196127 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.581571257 -1.767879 -0.02698257 0.6182002 0.6895681 0.5400687 row1 0.001781211 1.324075 -1.75860913 -2.1732261 -1.5232068 1.4795223 [,20] row3 0.79346367 row1 0.05178449 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -1.200114 -0.4369673 -0.8589746 0.3807387 -0.102982 1.175635 0.7323183 [,8] [,9] [,10] row2 -0.3745721 2.413074 -1.38587 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.1820159 -0.1946656 0.4695355 0.2063823 -1.263536 0.0273505 -1.031483 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 1.105441 -1.239791 0.1639617 0.6750962 0.1578637 -0.9068428 0.5123527 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.8792777 1.149817 0.5285393 -0.5902699 -0.3998291 -0.8253741 > > > 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: 0x3ce60860> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e043cadd26" [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e012acefac" [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e043c81fcb" [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e03b4e18dc" [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e0128cdd93" [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e01e82fdbf" [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e013ff191f" [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e067549d24" [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e03d70f55c" [10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e01fcb0621" [11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e06bcc3663" [12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e0671550f5" [13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e0433b9883" [14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e07f4eb6b9" [15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM31d2e07f288398" > > > ### 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: 0x3b215b50> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x3b215b50> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x3b215b50> > rowMedians(tmp) [1] 0.249428121 0.226150377 0.569158648 -0.046903451 0.977055241 [6] 0.151262731 0.149535200 -0.523521939 -0.316771157 -0.544546653 [11] 0.054323161 0.361318884 -1.065872914 -0.196126464 -0.368524353 [16] 0.126783645 0.041529233 -0.118591607 -0.073326948 -0.332235540 [21] -0.633850730 0.111979918 0.603244749 0.482639762 0.085655491 [26] -0.203567516 0.301099901 -0.106723486 0.148424497 0.670558180 [31] 0.375571099 0.157698500 0.194591713 -0.066760824 -0.207025531 [36] 0.424904461 -0.162156416 -0.174538987 -0.024987091 -0.093201036 [41] 0.336190900 -0.282755435 -0.078669142 -0.182942090 0.263958412 [46] 0.219566919 -0.005264029 0.229138176 0.348195939 -0.171023965 [51] 0.148369960 0.174947379 -0.319401326 0.222643665 0.245243461 [56] -0.364792350 -0.139737491 -0.106984568 -0.262502216 -0.401130063 [61] -0.288164011 0.072730944 -0.371063635 0.287604307 -0.190070751 [66] -0.023816213 0.102271067 0.308509757 0.141857247 0.482459628 [71] 0.233658829 0.538862868 0.393428467 0.046912427 -0.044816976 [76] -0.322953722 0.243537118 0.160389100 -0.797654282 -0.059796248 [81] 0.494466825 -0.575730606 0.089749568 -0.281844911 -0.292532511 [86] -0.276939975 -0.169260787 -0.446285217 -0.299814073 0.053164025 [91] -0.226987840 -0.053632453 -0.069588934 0.606125393 -0.103029406 [96] -0.080450624 -0.773158449 -0.289012611 0.467303135 -0.237118120 [101] -0.225129188 -0.017425179 0.189772977 0.240437479 -0.229310214 [106] -0.123631877 -0.137294540 -0.378346229 0.127074666 0.060880243 [111] -0.128065241 -0.270962746 -0.030124819 0.408756521 -0.036863789 [116] 0.303319192 -0.257659197 0.212416914 -0.021349891 0.047395343 [121] 0.361248241 0.361529153 0.250214215 -0.622144969 0.127033496 [126] 0.005504853 -0.295071848 0.125542593 -0.112153350 0.047945994 [131] -0.172055412 -0.110814996 -0.206663128 -0.258368992 -0.046112161 [136] 0.171187020 0.153791948 -0.083196686 -0.020182353 1.071460832 [141] -0.240717981 -0.267162024 0.454707725 0.233927179 -0.107885412 [146] 0.347927351 -0.376663570 -0.107696604 0.248289945 0.459545374 [151] 0.072147832 -0.037320451 0.152186265 0.262196086 -0.449857888 [156] 0.035670791 0.313720503 0.338747958 -0.024420701 0.017736204 [161] 0.533921757 0.074326346 0.088762504 0.336880168 0.062999184 [166] 0.259715046 0.043450047 -0.535507972 0.059888555 -0.381738312 [171] -0.494249948 -0.333750860 -0.319280638 -0.088285927 0.013313254 [176] -0.457402736 -0.230238315 0.062728149 -0.234232759 0.299557827 [181] -0.024095319 -0.045019950 0.081267689 0.315724360 0.167767180 [186] 0.253669728 -0.060410414 -0.271707944 0.088741724 0.192583226 [191] -0.170132786 -0.272895603 -0.218689737 -0.168841048 -0.162742256 [196] -0.256712390 -0.055188187 -0.233655283 0.385703431 -0.090413493 [201] 0.335188861 -0.870576804 -0.159430881 0.473604719 0.299365033 [206] 0.053767976 -0.283270556 0.065874653 -0.113255932 -0.276363832 [211] -0.124473855 -0.302891129 -0.094946704 -0.092166811 0.701570961 [216] 0.281301716 0.311558757 0.244055156 0.593381622 0.256635133 [221] 0.212979539 0.693760199 -0.580061166 0.158914441 -0.439866407 [226] -0.334388533 -0.162235536 0.165630113 0.164728937 0.046587146 > > proc.time() user system elapsed 1.775 0.983 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: 0x2cc17ff0> > .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: 0x2cc17ff0> > .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: 0x2cc17ff0> > .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: 0x2cc17ff0> > 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: 0x2cb22470> > .Call("R_bm_AddColumn",P) <pointer: 0x2cb22470> > .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: 0x2cb22470> > .Call("R_bm_AddColumn",P) <pointer: 0x2cb22470> > .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: 0x2cb22470> > 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: 0x2cafd0e0> > .Call("R_bm_AddColumn",P) <pointer: 0x2cafd0e0> > .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: 0x2cafd0e0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x2cafd0e0> > .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: 0x2cafd0e0> > > .Call("R_bm_RowMode",P) <pointer: 0x2cafd0e0> > .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: 0x2cafd0e0> > > .Call("R_bm_ColMode",P) <pointer: 0x2cafd0e0> > .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: 0x2cafd0e0> > 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: 0x2ba84520> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x2ba84520> > .Call("R_bm_AddColumn",P) <pointer: 0x2ba84520> > .Call("R_bm_AddColumn",P) <pointer: 0x2ba84520> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile31d312201633c6" "BufferedMatrixFile31d31258d51a41" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile31d312201633c6" "BufferedMatrixFile31d31258d51a41" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x2d9cd030> > .Call("R_bm_AddColumn",P) <pointer: 0x2d9cd030> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x2d9cd030> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x2d9cd030> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x2d9cd030> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x2d9cd030> > .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: 0x2c3985c0> > .Call("R_bm_AddColumn",P) <pointer: 0x2c3985c0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x2c3985c0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x2c3985c0> > 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: 0x2d478f30> > .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: 0x2d478f30> > rm(P) > > proc.time() user system elapsed 0.325 0.033 0.345
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.321 0.039 0.347