Back to Multiple platform build/check report for BioC 3.22: simplified long |
|
This page was generated on 2025-10-17 12:07 -0400 (Fri, 17 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" | 4887 |
lconway | macOS 12.7.6 Monterey | x86_64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4677 |
kjohnson3 | macOS 13.7.7 Ventura | arm64 | 4.5.1 Patched (2025-09-10 r88807) -- "Great Square Root" | 4622 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.5.0 (2025-04-11) -- "How About a Twenty-Six" | 4632 |
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 256/2353 | 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.6 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-17 06:54:58 -0000 (Fri, 17 Oct 2025) |
EndedAt: 2025-10-17 06:55:21 -0000 (Fri, 17 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.327 0.059 0.371
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 17 06:55:16 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Fri Oct 17 06:55:16 2025" > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > > > RowMode(tmp2) <pointer: 0x21fa0ff0> > > > > 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 17 06:55:16 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 17 06:55:16 2025" > > ColMode(tmp2) <pointer: 0x21fa0ff0> > > > > ### 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.4759742 0.3954931 0.5160265 -1.1268170 [2,] 0.4320040 0.3103868 -0.2792423 -0.2554524 [3,] -0.2747826 -2.0210041 1.3773321 -0.5114320 [4,] 2.9803592 -0.2613994 -0.1960032 0.1106330 > 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.4759742 0.3954931 0.5160265 1.1268170 [2,] 0.4320040 0.3103868 0.2792423 0.2554524 [3,] 0.2747826 2.0210041 1.3773321 0.5114320 [4,] 2.9803592 0.2613994 0.1960032 0.1106330 > 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.9235061 0.6288824 0.7183498 1.0615164 [2,] 0.6572701 0.5571237 0.5284338 0.5054230 [3,] 0.5241971 1.4216202 1.1735979 0.7151447 [4,] 1.7263717 0.5112723 0.4427224 0.3326154 > > 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,] 222.71104 31.68432 32.69952 36.74198 [2,] 32.00471 30.88162 30.56358 30.30968 [3,] 30.51675 41.23721 38.11331 32.66288 [4,] 45.24408 30.37412 29.62323 28.43679 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x231d09a0> > exp(tmp5) <pointer: 0x231d09a0> > log(tmp5,2) <pointer: 0x231d09a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 463.5438 > Min(tmp5) [1] 53.05128 > mean(tmp5) [1] 71.71978 > Sum(tmp5) [1] 14343.96 > Var(tmp5) [1] 841.7188 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.23331 70.22445 70.83301 69.16764 72.89120 66.95389 70.01671 69.34086 [9] 66.90571 69.63104 > rowSums(tmp5) [1] 1824.666 1404.489 1416.660 1383.353 1457.824 1339.078 1400.334 1386.817 [9] 1338.114 1392.621 > rowVars(tmp5) [1] 7754.53399 88.54084 62.28572 114.42576 49.43661 47.75626 [7] 53.02745 41.39451 59.91789 70.36952 > rowSd(tmp5) [1] 88.059832 9.409614 7.892130 10.696998 7.031118 6.910590 7.281995 [8] 6.433857 7.740665 8.388654 > rowMax(tmp5) [1] 463.54384 96.49778 85.82984 94.16962 84.98755 79.87816 81.66885 [8] 81.10716 81.26125 83.47438 > rowMin(tmp5) [1] 56.03407 58.71581 53.05128 55.00856 60.86377 54.45741 57.27758 57.39646 [9] 53.40170 55.54015 > > colMeans(tmp5) [1] 111.42626 71.64059 66.16786 70.86700 68.91257 69.91831 69.30676 [8] 71.93863 66.10298 68.13466 71.15251 67.54937 68.23623 69.15266 [15] 75.06456 71.36867 71.61477 70.86739 65.91074 69.06314 > colSums(tmp5) [1] 1114.2626 716.4059 661.6786 708.6700 689.1257 699.1831 693.0676 [8] 719.3863 661.0298 681.3466 711.5251 675.4937 682.3623 691.5266 [15] 750.6456 713.6867 716.1477 708.6739 659.1074 690.6314 > colVars(tmp5) [1] 15409.84205 44.79531 33.07913 58.24053 32.68940 26.00130 [7] 92.25305 136.96663 40.57119 97.92356 34.81712 114.68926 [13] 45.48544 47.47996 67.08057 92.84681 30.25564 117.73977 [19] 66.67464 67.62803 > colSd(tmp5) [1] 124.136385 6.692930 5.751446 7.631548 5.717465 5.099147 [7] 9.604845 11.703274 6.369552 9.895633 5.900604 10.709307 [13] 6.744290 6.890570 8.190273 9.635705 5.500513 10.850796 [19] 8.165454 8.223626 > colMax(tmp5) [1] 463.54384 85.82984 79.32786 81.11943 76.67109 79.87816 84.98755 [8] 89.44511 76.49814 84.25482 78.44230 83.53068 81.72040 84.59813 [15] 88.38622 85.05623 82.16007 96.49778 80.21499 81.66885 > colMin(tmp5) [1] 57.43320 63.21976 61.22190 59.18745 59.68029 63.30020 58.11643 53.05128 [9] 55.00856 53.40170 58.85925 56.03407 58.38133 58.71581 65.10288 57.27758 [17] 63.45292 56.44600 55.54015 58.02617 > > > ### 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.23331 70.22445 70.83301 69.16764 72.89120 NA 70.01671 69.34086 [9] 66.90571 69.63104 > rowSums(tmp5) [1] 1824.666 1404.489 1416.660 1383.353 1457.824 NA 1400.334 1386.817 [9] 1338.114 1392.621 > rowVars(tmp5) [1] 7754.53399 88.54084 62.28572 114.42576 49.43661 49.28947 [7] 53.02745 41.39451 59.91789 70.36952 > rowSd(tmp5) [1] 88.059832 9.409614 7.892130 10.696998 7.031118 7.020646 7.281995 [8] 6.433857 7.740665 8.388654 > rowMax(tmp5) [1] 463.54384 96.49778 85.82984 94.16962 84.98755 NA 81.66885 [8] 81.10716 81.26125 83.47438 > rowMin(tmp5) [1] 56.03407 58.71581 53.05128 55.00856 60.86377 NA 57.27758 57.39646 [9] 53.40170 55.54015 > > colMeans(tmp5) [1] 111.42626 71.64059 NA 70.86700 68.91257 69.91831 69.30676 [8] 71.93863 66.10298 68.13466 71.15251 67.54937 68.23623 69.15266 [15] 75.06456 71.36867 71.61477 70.86739 65.91074 69.06314 > colSums(tmp5) [1] 1114.2626 716.4059 NA 708.6700 689.1257 699.1831 693.0676 [8] 719.3863 661.0298 681.3466 711.5251 675.4937 682.3623 691.5266 [15] 750.6456 713.6867 716.1477 708.6739 659.1074 690.6314 > colVars(tmp5) [1] 15409.84205 44.79531 NA 58.24053 32.68940 26.00130 [7] 92.25305 136.96663 40.57119 97.92356 34.81712 114.68926 [13] 45.48544 47.47996 67.08057 92.84681 30.25564 117.73977 [19] 66.67464 67.62803 > colSd(tmp5) [1] 124.136385 6.692930 NA 7.631548 5.717465 5.099147 [7] 9.604845 11.703274 6.369552 9.895633 5.900604 10.709307 [13] 6.744290 6.890570 8.190273 9.635705 5.500513 10.850796 [19] 8.165454 8.223626 > colMax(tmp5) [1] 463.54384 85.82984 NA 81.11943 76.67109 79.87816 84.98755 [8] 89.44511 76.49814 84.25482 78.44230 83.53068 81.72040 84.59813 [15] 88.38622 85.05623 82.16007 96.49778 80.21499 81.66885 > colMin(tmp5) [1] 57.43320 63.21976 NA 59.18745 59.68029 63.30020 58.11643 53.05128 [9] 55.00856 53.40170 58.85925 56.03407 58.38133 58.71581 65.10288 57.27758 [17] 63.45292 56.44600 55.54015 58.02617 > > Max(tmp5,na.rm=TRUE) [1] 463.5438 > Min(tmp5,na.rm=TRUE) [1] 53.05128 > mean(tmp5,na.rm=TRUE) [1] 71.76572 > Sum(tmp5,na.rm=TRUE) [1] 14281.38 > Var(tmp5,na.rm=TRUE) [1] 845.5456 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.23331 70.22445 70.83301 69.16764 72.89120 67.18422 70.01671 69.34086 [9] 66.90571 69.63104 > rowSums(tmp5,na.rm=TRUE) [1] 1824.666 1404.489 1416.660 1383.353 1457.824 1276.500 1400.334 1386.817 [9] 1338.114 1392.621 > rowVars(tmp5,na.rm=TRUE) [1] 7754.53399 88.54084 62.28572 114.42576 49.43661 49.28947 [7] 53.02745 41.39451 59.91789 70.36952 > rowSd(tmp5,na.rm=TRUE) [1] 88.059832 9.409614 7.892130 10.696998 7.031118 7.020646 7.281995 [8] 6.433857 7.740665 8.388654 > rowMax(tmp5,na.rm=TRUE) [1] 463.54384 96.49778 85.82984 94.16962 84.98755 79.87816 81.66885 [8] 81.10716 81.26125 83.47438 > rowMin(tmp5,na.rm=TRUE) [1] 56.03407 58.71581 53.05128 55.00856 60.86377 54.45741 57.27758 57.39646 [9] 53.40170 55.54015 > > colMeans(tmp5,na.rm=TRUE) [1] 111.42626 71.64059 66.56676 70.86700 68.91257 69.91831 69.30676 [8] 71.93863 66.10298 68.13466 71.15251 67.54937 68.23623 69.15266 [15] 75.06456 71.36867 71.61477 70.86739 65.91074 69.06314 > colSums(tmp5,na.rm=TRUE) [1] 1114.2626 716.4059 599.1009 708.6700 689.1257 699.1831 693.0676 [8] 719.3863 661.0298 681.3466 711.5251 675.4937 682.3623 691.5266 [15] 750.6456 713.6867 716.1477 708.6739 659.1074 690.6314 > colVars(tmp5,na.rm=TRUE) [1] 15409.84205 44.79531 35.42390 58.24053 32.68940 26.00130 [7] 92.25305 136.96663 40.57119 97.92356 34.81712 114.68926 [13] 45.48544 47.47996 67.08057 92.84681 30.25564 117.73977 [19] 66.67464 67.62803 > colSd(tmp5,na.rm=TRUE) [1] 124.136385 6.692930 5.951798 7.631548 5.717465 5.099147 [7] 9.604845 11.703274 6.369552 9.895633 5.900604 10.709307 [13] 6.744290 6.890570 8.190273 9.635705 5.500513 10.850796 [19] 8.165454 8.223626 > colMax(tmp5,na.rm=TRUE) [1] 463.54384 85.82984 79.32786 81.11943 76.67109 79.87816 84.98755 [8] 89.44511 76.49814 84.25482 78.44230 83.53068 81.72040 84.59813 [15] 88.38622 85.05623 82.16007 96.49778 80.21499 81.66885 > colMin(tmp5,na.rm=TRUE) [1] 57.43320 63.21976 61.22190 59.18745 59.68029 63.30020 58.11643 53.05128 [9] 55.00856 53.40170 58.85925 56.03407 58.38133 58.71581 65.10288 57.27758 [17] 63.45292 56.44600 55.54015 58.02617 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.23331 70.22445 70.83301 69.16764 72.89120 NaN 70.01671 69.34086 [9] 66.90571 69.63104 > rowSums(tmp5,na.rm=TRUE) [1] 1824.666 1404.489 1416.660 1383.353 1457.824 0.000 1400.334 1386.817 [9] 1338.114 1392.621 > rowVars(tmp5,na.rm=TRUE) [1] 7754.53399 88.54084 62.28572 114.42576 49.43661 NA [7] 53.02745 41.39451 59.91789 70.36952 > rowSd(tmp5,na.rm=TRUE) [1] 88.059832 9.409614 7.892130 10.696998 7.031118 NA 7.281995 [8] 6.433857 7.740665 8.388654 > rowMax(tmp5,na.rm=TRUE) [1] 463.54384 96.49778 85.82984 94.16962 84.98755 NA 81.66885 [8] 81.10716 81.26125 83.47438 > rowMin(tmp5,na.rm=TRUE) [1] 56.03407 58.71581 53.05128 55.00856 60.86377 NA 57.27758 57.39646 [9] 53.40170 55.54015 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.75797 71.33099 NaN 71.62896 68.94678 68.81166 70.50027 [8] 71.40071 65.88264 69.65436 71.52953 68.12353 68.06310 68.63469 [15] 75.98221 72.69371 71.22023 71.78543 66.35361 70.11938 > colSums(tmp5,na.rm=TRUE) [1] 1041.8217 641.9789 0.0000 644.6606 620.5210 619.3049 634.5025 [8] 642.6064 592.9438 626.8892 643.7657 613.1118 612.5679 617.7122 [15] 683.8399 654.2434 640.9821 646.0688 597.1825 631.0744 > colVars(tmp5,na.rm=TRUE) [1] 17124.98020 49.31636 NA 58.98919 36.76241 15.47388 [7] 87.75928 150.83220 45.09643 84.18244 37.57017 125.31673 [13] 50.83390 50.39668 65.99204 84.70065 32.28644 122.97588 [19] 72.80246 63.53062 > colSd(tmp5,na.rm=TRUE) [1] 130.862448 7.022560 NA 7.680442 6.063202 3.933685 [7] 9.367992 12.281376 6.715388 9.175099 6.129451 11.194495 [13] 7.129790 7.099062 8.123549 9.203295 5.682116 11.089449 [19] 8.532436 7.970609 > colMax(tmp5,na.rm=TRUE) [1] 463.54384 85.82984 -Inf 81.11943 76.67109 74.08403 84.98755 [8] 89.44511 76.49814 84.25482 78.44230 83.53068 81.72040 84.59813 [15] 88.38622 85.05623 82.16007 96.49778 80.21499 81.66885 > colMin(tmp5,na.rm=TRUE) [1] 57.43320 63.21976 Inf 59.18745 59.68029 63.30020 58.11643 53.05128 [9] 55.00856 53.40170 58.85925 56.03407 58.38133 58.71581 65.10288 57.27758 [17] 63.45292 56.44600 55.54015 58.02617 > > > > > 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] 381.3436 212.9783 190.5154 183.0241 259.2965 319.1024 252.2595 171.8460 [9] 357.2745 255.6519 > apply(copymatrix,1,var,na.rm=TRUE) [1] 381.3436 212.9783 190.5154 183.0241 259.2965 319.1024 252.2595 171.8460 [9] 357.2745 255.6519 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 1.421085e-13 2.842171e-14 -4.263256e-14 -2.842171e-14 -2.842171e-14 [6] 1.136868e-13 -2.842171e-14 0.000000e+00 5.684342e-14 -2.842171e-14 [11] -1.705303e-13 0.000000e+00 1.421085e-13 -8.526513e-14 -4.263256e-14 [16] -2.842171e-14 -1.136868e-13 -2.842171e-14 5.684342e-14 -1.421085e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 10 12 3 3 6 5 2 5 5 18 2 11 10 8 4 20 2 7 10 18 3 14 9 1 2 12 5 19 4 3 1 10 6 3 6 12 8 7 9 13 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.119603 > Min(tmp) [1] -2.481842 > mean(tmp) [1] 0.05185353 > Sum(tmp) [1] 5.185353 > Var(tmp) [1] 0.9930001 > > rowMeans(tmp) [1] 0.05185353 > rowSums(tmp) [1] 5.185353 > rowVars(tmp) [1] 0.9930001 > rowSd(tmp) [1] 0.9964939 > rowMax(tmp) [1] 2.119603 > rowMin(tmp) [1] -2.481842 > > colMeans(tmp) [1] 1.579568467 -0.281900463 0.637407419 0.067775727 -1.571139371 [6] 0.499214673 -0.340905136 0.189009483 0.731744840 -0.099993877 [11] 0.184698520 0.521898109 -0.750068533 -0.940120474 0.646162487 [16] 0.590577308 -1.155389849 -0.582575481 -0.563170238 -0.321180874 [21] 0.339038004 1.391894151 2.006018864 0.545705826 -2.183634580 [26] 2.119602977 -1.298199967 -0.717990723 0.633603187 0.917221422 [31] -1.410244607 1.022238806 -1.127562648 -0.963503525 -0.625122561 [36] -0.136390165 0.507532339 -0.704434115 0.416634539 -0.929703970 [41] 0.465132231 -0.270426359 -0.386020800 -0.249907462 -1.765214391 [46] 1.419194068 1.152736609 -0.042729950 0.591987437 -0.201810430 [51] 0.991672919 1.073782812 -2.010718241 1.493727468 -0.530643769 [56] -0.453564299 -0.494644091 1.122455148 -0.412035770 0.081418964 [61] 0.719425790 -0.261580798 -0.669990569 -0.820816994 -1.271443436 [66] 0.167492250 0.921832399 0.190696619 -1.557305946 1.115016127 [71] 0.466579698 2.113677502 0.472824483 -0.027060117 -0.009168983 [76] 1.492912488 1.612885748 -0.183844676 1.275089568 -0.179282758 [81] 1.520105593 1.889538293 0.288540534 -0.827573799 0.005919578 [86] 0.373288141 -1.667694474 0.226193999 -1.211651910 -0.288645110 [91] -1.111644306 0.345869777 0.192962639 -0.388911598 -0.464820537 [96] 0.356465854 1.898734270 -0.362432300 -2.481842036 0.906304063 > colSums(tmp) [1] 1.579568467 -0.281900463 0.637407419 0.067775727 -1.571139371 [6] 0.499214673 -0.340905136 0.189009483 0.731744840 -0.099993877 [11] 0.184698520 0.521898109 -0.750068533 -0.940120474 0.646162487 [16] 0.590577308 -1.155389849 -0.582575481 -0.563170238 -0.321180874 [21] 0.339038004 1.391894151 2.006018864 0.545705826 -2.183634580 [26] 2.119602977 -1.298199967 -0.717990723 0.633603187 0.917221422 [31] -1.410244607 1.022238806 -1.127562648 -0.963503525 -0.625122561 [36] -0.136390165 0.507532339 -0.704434115 0.416634539 -0.929703970 [41] 0.465132231 -0.270426359 -0.386020800 -0.249907462 -1.765214391 [46] 1.419194068 1.152736609 -0.042729950 0.591987437 -0.201810430 [51] 0.991672919 1.073782812 -2.010718241 1.493727468 -0.530643769 [56] -0.453564299 -0.494644091 1.122455148 -0.412035770 0.081418964 [61] 0.719425790 -0.261580798 -0.669990569 -0.820816994 -1.271443436 [66] 0.167492250 0.921832399 0.190696619 -1.557305946 1.115016127 [71] 0.466579698 2.113677502 0.472824483 -0.027060117 -0.009168983 [76] 1.492912488 1.612885748 -0.183844676 1.275089568 -0.179282758 [81] 1.520105593 1.889538293 0.288540534 -0.827573799 0.005919578 [86] 0.373288141 -1.667694474 0.226193999 -1.211651910 -0.288645110 [91] -1.111644306 0.345869777 0.192962639 -0.388911598 -0.464820537 [96] 0.356465854 1.898734270 -0.362432300 -2.481842036 0.906304063 > 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.579568467 -0.281900463 0.637407419 0.067775727 -1.571139371 [6] 0.499214673 -0.340905136 0.189009483 0.731744840 -0.099993877 [11] 0.184698520 0.521898109 -0.750068533 -0.940120474 0.646162487 [16] 0.590577308 -1.155389849 -0.582575481 -0.563170238 -0.321180874 [21] 0.339038004 1.391894151 2.006018864 0.545705826 -2.183634580 [26] 2.119602977 -1.298199967 -0.717990723 0.633603187 0.917221422 [31] -1.410244607 1.022238806 -1.127562648 -0.963503525 -0.625122561 [36] -0.136390165 0.507532339 -0.704434115 0.416634539 -0.929703970 [41] 0.465132231 -0.270426359 -0.386020800 -0.249907462 -1.765214391 [46] 1.419194068 1.152736609 -0.042729950 0.591987437 -0.201810430 [51] 0.991672919 1.073782812 -2.010718241 1.493727468 -0.530643769 [56] -0.453564299 -0.494644091 1.122455148 -0.412035770 0.081418964 [61] 0.719425790 -0.261580798 -0.669990569 -0.820816994 -1.271443436 [66] 0.167492250 0.921832399 0.190696619 -1.557305946 1.115016127 [71] 0.466579698 2.113677502 0.472824483 -0.027060117 -0.009168983 [76] 1.492912488 1.612885748 -0.183844676 1.275089568 -0.179282758 [81] 1.520105593 1.889538293 0.288540534 -0.827573799 0.005919578 [86] 0.373288141 -1.667694474 0.226193999 -1.211651910 -0.288645110 [91] -1.111644306 0.345869777 0.192962639 -0.388911598 -0.464820537 [96] 0.356465854 1.898734270 -0.362432300 -2.481842036 0.906304063 > colMin(tmp) [1] 1.579568467 -0.281900463 0.637407419 0.067775727 -1.571139371 [6] 0.499214673 -0.340905136 0.189009483 0.731744840 -0.099993877 [11] 0.184698520 0.521898109 -0.750068533 -0.940120474 0.646162487 [16] 0.590577308 -1.155389849 -0.582575481 -0.563170238 -0.321180874 [21] 0.339038004 1.391894151 2.006018864 0.545705826 -2.183634580 [26] 2.119602977 -1.298199967 -0.717990723 0.633603187 0.917221422 [31] -1.410244607 1.022238806 -1.127562648 -0.963503525 -0.625122561 [36] -0.136390165 0.507532339 -0.704434115 0.416634539 -0.929703970 [41] 0.465132231 -0.270426359 -0.386020800 -0.249907462 -1.765214391 [46] 1.419194068 1.152736609 -0.042729950 0.591987437 -0.201810430 [51] 0.991672919 1.073782812 -2.010718241 1.493727468 -0.530643769 [56] -0.453564299 -0.494644091 1.122455148 -0.412035770 0.081418964 [61] 0.719425790 -0.261580798 -0.669990569 -0.820816994 -1.271443436 [66] 0.167492250 0.921832399 0.190696619 -1.557305946 1.115016127 [71] 0.466579698 2.113677502 0.472824483 -0.027060117 -0.009168983 [76] 1.492912488 1.612885748 -0.183844676 1.275089568 -0.179282758 [81] 1.520105593 1.889538293 0.288540534 -0.827573799 0.005919578 [86] 0.373288141 -1.667694474 0.226193999 -1.211651910 -0.288645110 [91] -1.111644306 0.345869777 0.192962639 -0.388911598 -0.464820537 [96] 0.356465854 1.898734270 -0.362432300 -2.481842036 0.906304063 > colMedians(tmp) [1] 1.579568467 -0.281900463 0.637407419 0.067775727 -1.571139371 [6] 0.499214673 -0.340905136 0.189009483 0.731744840 -0.099993877 [11] 0.184698520 0.521898109 -0.750068533 -0.940120474 0.646162487 [16] 0.590577308 -1.155389849 -0.582575481 -0.563170238 -0.321180874 [21] 0.339038004 1.391894151 2.006018864 0.545705826 -2.183634580 [26] 2.119602977 -1.298199967 -0.717990723 0.633603187 0.917221422 [31] -1.410244607 1.022238806 -1.127562648 -0.963503525 -0.625122561 [36] -0.136390165 0.507532339 -0.704434115 0.416634539 -0.929703970 [41] 0.465132231 -0.270426359 -0.386020800 -0.249907462 -1.765214391 [46] 1.419194068 1.152736609 -0.042729950 0.591987437 -0.201810430 [51] 0.991672919 1.073782812 -2.010718241 1.493727468 -0.530643769 [56] -0.453564299 -0.494644091 1.122455148 -0.412035770 0.081418964 [61] 0.719425790 -0.261580798 -0.669990569 -0.820816994 -1.271443436 [66] 0.167492250 0.921832399 0.190696619 -1.557305946 1.115016127 [71] 0.466579698 2.113677502 0.472824483 -0.027060117 -0.009168983 [76] 1.492912488 1.612885748 -0.183844676 1.275089568 -0.179282758 [81] 1.520105593 1.889538293 0.288540534 -0.827573799 0.005919578 [86] 0.373288141 -1.667694474 0.226193999 -1.211651910 -0.288645110 [91] -1.111644306 0.345869777 0.192962639 -0.388911598 -0.464820537 [96] 0.356465854 1.898734270 -0.362432300 -2.481842036 0.906304063 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.579568 -0.2819005 0.6374074 0.06777573 -1.571139 0.4992147 -0.3409051 [2,] 1.579568 -0.2819005 0.6374074 0.06777573 -1.571139 0.4992147 -0.3409051 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.1890095 0.7317448 -0.09999388 0.1846985 0.5218981 -0.7500685 -0.9401205 [2,] 0.1890095 0.7317448 -0.09999388 0.1846985 0.5218981 -0.7500685 -0.9401205 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.6461625 0.5905773 -1.15539 -0.5825755 -0.5631702 -0.3211809 0.339038 [2,] 0.6461625 0.5905773 -1.15539 -0.5825755 -0.5631702 -0.3211809 0.339038 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.391894 2.006019 0.5457058 -2.183635 2.119603 -1.2982 -0.7179907 [2,] 1.391894 2.006019 0.5457058 -2.183635 2.119603 -1.2982 -0.7179907 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.6336032 0.9172214 -1.410245 1.022239 -1.127563 -0.9635035 -0.6251226 [2,] 0.6336032 0.9172214 -1.410245 1.022239 -1.127563 -0.9635035 -0.6251226 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.1363902 0.5075323 -0.7044341 0.4166345 -0.929704 0.4651322 -0.2704264 [2,] -0.1363902 0.5075323 -0.7044341 0.4166345 -0.929704 0.4651322 -0.2704264 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.3860208 -0.2499075 -1.765214 1.419194 1.152737 -0.04272995 0.5919874 [2,] -0.3860208 -0.2499075 -1.765214 1.419194 1.152737 -0.04272995 0.5919874 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -0.2018104 0.9916729 1.073783 -2.010718 1.493727 -0.5306438 -0.4535643 [2,] -0.2018104 0.9916729 1.073783 -2.010718 1.493727 -0.5306438 -0.4535643 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.4946441 1.122455 -0.4120358 0.08141896 0.7194258 -0.2615808 -0.6699906 [2,] -0.4946441 1.122455 -0.4120358 0.08141896 0.7194258 -0.2615808 -0.6699906 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.820817 -1.271443 0.1674923 0.9218324 0.1906966 -1.557306 1.115016 [2,] -0.820817 -1.271443 0.1674923 0.9218324 0.1906966 -1.557306 1.115016 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.4665797 2.113678 0.4728245 -0.02706012 -0.009168983 1.492912 1.612886 [2,] 0.4665797 2.113678 0.4728245 -0.02706012 -0.009168983 1.492912 1.612886 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.1838447 1.27509 -0.1792828 1.520106 1.889538 0.2885405 -0.8275738 [2,] -0.1838447 1.27509 -0.1792828 1.520106 1.889538 0.2885405 -0.8275738 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.005919578 0.3732881 -1.667694 0.226194 -1.211652 -0.2886451 -1.111644 [2,] 0.005919578 0.3732881 -1.667694 0.226194 -1.211652 -0.2886451 -1.111644 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.3458698 0.1929626 -0.3889116 -0.4648205 0.3564659 1.898734 -0.3624323 [2,] 0.3458698 0.1929626 -0.3889116 -0.4648205 0.3564659 1.898734 -0.3624323 [,99] [,100] [1,] -2.481842 0.9063041 [2,] -2.481842 0.9063041 > > > Max(tmp2) [1] 2.448271 > Min(tmp2) [1] -2.752231 > mean(tmp2) [1] -0.09987909 > Sum(tmp2) [1] -9.987909 > Var(tmp2) [1] 0.912045 > > rowMeans(tmp2) [1] 0.64584714 -0.99420572 -0.40561882 -0.51784118 -0.06976204 0.45360097 [7] 0.33013494 1.40509085 -0.78330249 -0.75985042 -0.01316071 -0.54033904 [13] -0.80741808 -1.46138776 -0.51963163 0.39570584 -1.53846161 -1.95544263 [19] -0.36351103 0.49791589 0.24900712 2.44827112 0.25562394 0.83013985 [25] 1.42602118 -0.40499071 -0.36162720 -0.59553882 0.09893312 2.21542376 [31] -1.75657390 0.81873155 0.89736797 -1.36406735 -2.75223082 -1.68613496 [37] -1.40559179 0.73625957 1.03744031 -0.54010883 0.83804358 -0.27666740 [43] -1.16535658 1.63133571 -0.71267018 -1.59504305 -0.06321321 -1.06925167 [49] -1.35874815 -0.07834992 1.30989735 0.15138789 0.59684711 0.14186521 [55] -0.61407302 0.74687411 -0.64621801 1.13496975 -0.20139387 2.31301721 [61] -0.74669480 -0.19954207 -1.01948533 -0.70780263 -1.18406660 0.74575972 [67] -0.31195492 -0.68798192 0.51897796 0.27411288 1.68016857 -0.47348558 [73] 1.03496336 -0.54388095 -0.58386240 -0.69359307 -0.37362156 0.96795564 [79] 0.66429844 -0.70839902 0.16744010 -0.21165680 -0.40795196 -0.61917338 [85] -1.17512541 0.09983685 -0.55188012 0.85120278 -0.10770770 0.35212913 [91] -0.10844172 0.57362881 0.54721504 0.61134297 -0.33081265 -1.01955349 [97] 0.43825312 -0.86105362 0.71974450 -0.83518181 > rowSums(tmp2) [1] 0.64584714 -0.99420572 -0.40561882 -0.51784118 -0.06976204 0.45360097 [7] 0.33013494 1.40509085 -0.78330249 -0.75985042 -0.01316071 -0.54033904 [13] -0.80741808 -1.46138776 -0.51963163 0.39570584 -1.53846161 -1.95544263 [19] -0.36351103 0.49791589 0.24900712 2.44827112 0.25562394 0.83013985 [25] 1.42602118 -0.40499071 -0.36162720 -0.59553882 0.09893312 2.21542376 [31] -1.75657390 0.81873155 0.89736797 -1.36406735 -2.75223082 -1.68613496 [37] -1.40559179 0.73625957 1.03744031 -0.54010883 0.83804358 -0.27666740 [43] -1.16535658 1.63133571 -0.71267018 -1.59504305 -0.06321321 -1.06925167 [49] -1.35874815 -0.07834992 1.30989735 0.15138789 0.59684711 0.14186521 [55] -0.61407302 0.74687411 -0.64621801 1.13496975 -0.20139387 2.31301721 [61] -0.74669480 -0.19954207 -1.01948533 -0.70780263 -1.18406660 0.74575972 [67] -0.31195492 -0.68798192 0.51897796 0.27411288 1.68016857 -0.47348558 [73] 1.03496336 -0.54388095 -0.58386240 -0.69359307 -0.37362156 0.96795564 [79] 0.66429844 -0.70839902 0.16744010 -0.21165680 -0.40795196 -0.61917338 [85] -1.17512541 0.09983685 -0.55188012 0.85120278 -0.10770770 0.35212913 [91] -0.10844172 0.57362881 0.54721504 0.61134297 -0.33081265 -1.01955349 [97] 0.43825312 -0.86105362 0.71974450 -0.83518181 > 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.64584714 -0.99420572 -0.40561882 -0.51784118 -0.06976204 0.45360097 [7] 0.33013494 1.40509085 -0.78330249 -0.75985042 -0.01316071 -0.54033904 [13] -0.80741808 -1.46138776 -0.51963163 0.39570584 -1.53846161 -1.95544263 [19] -0.36351103 0.49791589 0.24900712 2.44827112 0.25562394 0.83013985 [25] 1.42602118 -0.40499071 -0.36162720 -0.59553882 0.09893312 2.21542376 [31] -1.75657390 0.81873155 0.89736797 -1.36406735 -2.75223082 -1.68613496 [37] -1.40559179 0.73625957 1.03744031 -0.54010883 0.83804358 -0.27666740 [43] -1.16535658 1.63133571 -0.71267018 -1.59504305 -0.06321321 -1.06925167 [49] -1.35874815 -0.07834992 1.30989735 0.15138789 0.59684711 0.14186521 [55] -0.61407302 0.74687411 -0.64621801 1.13496975 -0.20139387 2.31301721 [61] -0.74669480 -0.19954207 -1.01948533 -0.70780263 -1.18406660 0.74575972 [67] -0.31195492 -0.68798192 0.51897796 0.27411288 1.68016857 -0.47348558 [73] 1.03496336 -0.54388095 -0.58386240 -0.69359307 -0.37362156 0.96795564 [79] 0.66429844 -0.70839902 0.16744010 -0.21165680 -0.40795196 -0.61917338 [85] -1.17512541 0.09983685 -0.55188012 0.85120278 -0.10770770 0.35212913 [91] -0.10844172 0.57362881 0.54721504 0.61134297 -0.33081265 -1.01955349 [97] 0.43825312 -0.86105362 0.71974450 -0.83518181 > rowMin(tmp2) [1] 0.64584714 -0.99420572 -0.40561882 -0.51784118 -0.06976204 0.45360097 [7] 0.33013494 1.40509085 -0.78330249 -0.75985042 -0.01316071 -0.54033904 [13] -0.80741808 -1.46138776 -0.51963163 0.39570584 -1.53846161 -1.95544263 [19] -0.36351103 0.49791589 0.24900712 2.44827112 0.25562394 0.83013985 [25] 1.42602118 -0.40499071 -0.36162720 -0.59553882 0.09893312 2.21542376 [31] -1.75657390 0.81873155 0.89736797 -1.36406735 -2.75223082 -1.68613496 [37] -1.40559179 0.73625957 1.03744031 -0.54010883 0.83804358 -0.27666740 [43] -1.16535658 1.63133571 -0.71267018 -1.59504305 -0.06321321 -1.06925167 [49] -1.35874815 -0.07834992 1.30989735 0.15138789 0.59684711 0.14186521 [55] -0.61407302 0.74687411 -0.64621801 1.13496975 -0.20139387 2.31301721 [61] -0.74669480 -0.19954207 -1.01948533 -0.70780263 -1.18406660 0.74575972 [67] -0.31195492 -0.68798192 0.51897796 0.27411288 1.68016857 -0.47348558 [73] 1.03496336 -0.54388095 -0.58386240 -0.69359307 -0.37362156 0.96795564 [79] 0.66429844 -0.70839902 0.16744010 -0.21165680 -0.40795196 -0.61917338 [85] -1.17512541 0.09983685 -0.55188012 0.85120278 -0.10770770 0.35212913 [91] -0.10844172 0.57362881 0.54721504 0.61134297 -0.33081265 -1.01955349 [97] 0.43825312 -0.86105362 0.71974450 -0.83518181 > > colMeans(tmp2) [1] -0.09987909 > colSums(tmp2) [1] -9.987909 > colVars(tmp2) [1] 0.912045 > colSd(tmp2) [1] 0.9550104 > colMax(tmp2) [1] 2.448271 > colMin(tmp2) [1] -2.752231 > colMedians(tmp2) [1] -0.2065253 > colRanges(tmp2) [,1] [1,] -2.752231 [2,] 2.448271 > > 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] -0.8263037 1.1532314 -0.7393822 0.1209733 3.7063747 3.2427496 [7] -2.2933615 0.4526866 9.5857378 -8.0487276 > colApply(tmp,quantile)[,1] [,1] [1,] -1.5231326 [2,] -0.3165188 [3,] -0.0950336 [4,] 0.5438072 [5,] 1.2326823 > > rowApply(tmp,sum) [1] -0.06762082 -3.24292524 3.10794285 4.56939103 0.36657161 -1.10269286 [7] -1.43136229 2.88947890 -0.61276821 1.87796334 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 3 9 2 5 5 10 4 10 3 [2,] 3 7 1 4 10 2 8 5 8 5 [3,] 6 2 7 7 8 3 2 8 3 6 [4,] 4 1 8 8 3 10 3 6 5 10 [5,] 9 9 6 5 2 6 7 10 1 7 [6,] 7 10 4 1 6 4 9 9 6 4 [7,] 5 8 3 10 7 1 6 1 2 2 [8,] 8 4 2 6 4 8 4 3 7 8 [9,] 10 6 10 9 9 9 5 7 4 9 [10,] 2 5 5 3 1 7 1 2 9 1 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.2974794 0.2766104 -2.2459887 -5.6648339 0.5855164 -0.5736123 [7] -1.6538292 1.8339227 5.4151797 -2.8189958 -1.2744861 1.6394397 [13] -2.0126681 1.2525226 -1.7882405 1.7104302 -0.7707030 2.3578275 [19] -6.7740387 -1.5506123 > colApply(tmp,quantile)[,1] [,1] [1,] -1.3959868 [2,] -0.7758911 [3,] -0.6410020 [4,] 1.2109326 [5,] 1.8994267 > > rowApply(tmp,sum) [1] -2.5556856 4.8108731 -6.0350329 -0.9875716 -6.9916630 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 20 2 20 3 2 [2,] 13 18 12 7 12 [3,] 14 6 3 9 11 [4,] 2 1 6 11 5 [5,] 8 17 9 14 14 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.8994267 -0.01724126 0.2371969 -1.88111040 -0.199087129 -0.1431297 [2,] -0.6410020 1.23461294 -0.4206080 -1.83289507 1.115096803 -0.3562399 [3,] 1.2109326 -0.26146350 -1.4488705 -0.78351224 -0.508293729 -0.4678402 [4,] -0.7758911 -0.32093443 -0.1356025 -0.01174297 0.171416075 -0.6413027 [5,] -1.3959868 -0.35836332 -0.4781045 -1.15557327 0.006384405 1.0349002 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.5535814 0.3150605 1.2909351 -1.3174173 -0.3605720 -0.11700173 [2,] -0.2128629 0.6053077 0.7070808 -0.1697844 -0.1414145 -0.54275192 [3,] -0.7898593 0.9271365 0.3654996 -0.3051898 0.1602072 1.14103149 [4,] 0.6045853 0.1210349 0.6345733 0.1446454 -0.4426113 1.08910282 [5,] -0.7021109 -0.1346170 2.4170909 -1.1712497 -0.4900955 0.06905907 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.1416566 0.71306962 -0.07568417 -0.8439436 -0.4799833 1.30091332 [2,] 0.5255705 0.72449922 0.44783829 2.3817027 1.5490106 0.85087665 [3,] -2.3575983 -0.75114828 0.50849265 0.5516051 -0.8586437 -0.24193495 [4,] 0.6752789 0.53416751 -0.25248440 -0.9457113 -0.4969096 -0.08812952 [5,] -0.7142625 0.03193457 -2.41640291 0.5667772 -0.4841770 0.53610199 [,19] [,20] [1,] -2.4582044 0.2763254 [2,] -0.5046424 -0.5085221 [3,] -1.6019966 -0.5235870 [4,] -1.2262880 0.3752320 [5,] -0.9829073 -1.1700605 > > > 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 : 653 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.1754128 0.2983404 -2.733688 0.5688678 0.5527035 0.7348922 0.2065248 col8 col9 col10 col11 col12 col13 col14 row1 0.08180786 -1.223741 -1.305438 1.281541 -0.3096059 0.7779417 -1.769167 col15 col16 col17 col18 col19 col20 row1 -1.982057 -0.4241238 -1.516254 -0.1450141 -0.2545004 -0.6760983 > tmp[,"col10"] col10 row1 -1.30543788 row2 -0.77528589 row3 -0.03284085 row4 0.28891346 row5 -1.46528190 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.1754128 0.2983404 -2.7336875 0.5688678 0.5527035 0.7348922 0.2065248 row5 1.2532336 -2.2191568 -0.3141489 0.2465289 1.4696925 0.1491891 -0.3667241 col8 col9 col10 col11 col12 col13 row1 0.08180786 -1.2237408 -1.305438 1.2815415 -0.3096059 0.7779417 row5 0.18777126 -0.1912098 -1.465282 -0.7917955 -0.3449825 0.1314914 col14 col15 col16 col17 col18 col19 row1 -1.76916722 -1.982057102 -0.4241238 -1.516254 -0.1450141 -0.2545004 row5 0.01140966 -0.001822074 0.3703481 1.232672 0.4685908 0.4908294 col20 row1 -0.6760983 row5 1.4103645 > tmp[,c("col6","col20")] col6 col20 row1 0.7348922 -0.6760983 row2 0.4200311 -0.8285636 row3 1.4474297 0.8327134 row4 0.2465034 -0.3487089 row5 0.1491891 1.4103645 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.7348922 -0.6760983 row5 0.1491891 1.4103645 > > > > > 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.64521 50.73236 48.75784 51.17671 50.55126 104.7532 50.49479 49.10156 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.19723 49.67114 49.19779 50.36015 52.57489 50.22371 49.25039 50.77434 col17 col18 col19 col20 row1 49.77314 48.99301 51.90706 104.8508 > tmp[,"col10"] col10 row1 49.67114 row2 31.76259 row3 30.45783 row4 32.10039 row5 48.35628 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.64521 50.73236 48.75784 51.17671 50.55126 104.7532 50.49479 49.10156 row5 48.29718 51.33850 48.76596 50.41084 50.27338 105.5257 50.69294 51.25025 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.19723 49.67114 49.19779 50.36015 52.57489 50.22371 49.25039 50.77434 row5 51.50271 48.35628 49.56432 50.36461 50.25071 48.72912 49.13102 50.67261 col17 col18 col19 col20 row1 49.77314 48.99301 51.90706 104.8508 row5 49.21153 49.41477 48.76308 105.8356 > tmp[,c("col6","col20")] col6 col20 row1 104.75324 104.85078 row2 74.95795 73.52384 row3 75.30536 74.64114 row4 74.60815 74.60174 row5 105.52573 105.83557 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.7532 104.8508 row5 105.5257 105.8356 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.7532 104.8508 row5 105.5257 105.8356 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -1.2497380 [2,] 0.3599149 [3,] -0.1003492 [4,] -0.4603778 [5,] 2.1309126 > tmp[,c("col17","col7")] col17 col7 [1,] 0.2095601 1.4068490 [2,] -1.2984258 0.9043065 [3,] -0.8574906 -0.7203453 [4,] -0.7851298 0.3552116 [5,] -0.3202334 -1.1461539 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.71922484 -0.4200003 [2,] -0.80346640 -0.9061999 [3,] 2.38951372 -0.9793533 [4,] -0.05532489 0.1664842 [5,] -0.74925199 -0.9968423 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.7192248 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.7192248 [2,] -0.8034664 > > > > 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.7384681 -0.8587774 0.3861861 0.2104218 2.5550154 0.1458544 -0.9340781 row1 -0.2645036 -0.8615640 0.2859140 0.1253772 0.6848975 -1.0914005 0.3313212 [,8] [,9] [,10] [,11] [,12] [,13] row3 -1.084301 -0.96451116 1.07525251 -1.6693711 0.4005902 1.1077750 row1 -1.581158 -0.01541611 -0.09134692 -0.7905877 1.4443675 0.2548251 [,14] [,15] [,16] [,17] [,18] [,19] row3 0.57367824 -1.3013933 -1.7891663 1.6342014 -0.3011835 0.1201125 row1 -0.02723767 -0.1254937 0.5186803 -0.7080876 -0.6848936 -0.9854196 [,20] row3 1.1557121 row1 -0.8443065 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.535647 0.8142621 0.1608689 0.04963923 -1.467464 0.3726479 -1.071744 [,8] [,9] [,10] row2 -0.4780626 -0.9480053 1.911621 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 1.347149 -0.566964 -1.588305 -0.5363002 -0.6978741 -0.4949039 0.7448425 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.6132968 -0.7484593 0.06302334 0.9599363 -0.08984077 1.547005 -1.818602 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.2835463 -1.474505 0.652966 -0.09397668 -1.480233 -1.086253 > > > 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: 0x2167ae30> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e43e7e74f" [2] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e3d17e797" [3] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e4ee8a874" [4] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e2ec7ce9" [5] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e7a42f205" [6] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e6b74bb62" [7] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e3d40dae4" [8] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e34cb5178" [9] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e709aa05a" [10] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e3f993df8" [11] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e1b5301e6" [12] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e6db5bb90" [13] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e79b91a8a" [14] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e2c7a92b" [15] "/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests/BM11199e14f34c72" > > > ### 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: 0x23189b80> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x23189b80> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.22-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x23189b80> > rowMedians(tmp) [1] -0.2546356466 -0.1076246664 -0.0814064248 0.1800256281 0.0564536974 [6] 0.0628497227 -0.3889007822 0.0249440715 0.0703155982 0.5041652583 [11] -0.0060699779 -0.1515147896 -0.1385807734 -0.0082673250 0.0363020079 [16] -0.4554271873 -0.1937230154 0.3131258642 -0.2093581999 0.3834679473 [21] 0.2999335868 0.3889482151 -0.5994733632 -0.3765552233 -0.6834656125 [26] -0.0578863977 0.0319403245 -0.1250464002 -0.3537104927 -0.0661280776 [31] 0.0098979913 -0.5402304865 0.0492334436 -0.4406572314 0.7218200488 [36] 0.5256685897 -0.2247054849 0.0238483212 -0.2457312492 -0.2835953271 [41] 0.1735342228 -0.1602854822 -0.1609169995 0.1240065103 -0.0769114428 [46] 0.1910408880 0.5435293919 -0.5143590811 -0.0940898070 -0.3164911835 [51] 0.3776027632 0.2129039164 -0.4647001738 -0.0807425040 -0.1279585972 [56] -0.0026518364 0.3345906440 0.1485070237 0.2398543904 -0.1426452564 [61] 0.0234585959 -0.2811211999 -0.1206310656 -0.1714317700 0.3217737623 [66] -0.4424510024 0.1377818366 0.4511827866 0.2192421021 -0.3093143318 [71] -0.2736111985 -0.1518675323 0.1071266386 0.1289035677 0.2702891022 [76] 0.1687458288 0.1976621511 -0.0996893725 0.0668133090 0.1402076661 [81] 0.5344189418 0.2429750096 0.2106446776 -0.2765320424 0.3146441578 [86] 0.2915371678 0.4127553700 -0.2167199667 0.1815961997 0.4299361423 [91] 0.2237943783 0.4700245704 -0.0031127349 -0.0766837743 -0.0495124950 [96] -0.5661969371 0.0291467716 0.1625568291 -0.1316046089 0.2463702510 [101] 0.0661581533 0.4179273589 0.0630635638 -0.1161863830 0.2456730701 [106] -0.3192431271 0.6029001233 0.3143941949 -0.2115617047 -0.0303507168 [111] -0.5778385359 0.2396677914 -0.0715563874 0.1848779051 -0.1571140688 [116] -0.0251584975 0.4173441224 0.3042478796 0.3178593921 -0.1527445812 [121] -0.0485991644 -0.0499910192 0.2653161136 0.2587160303 -0.1385379430 [126] 0.3393203697 -0.1545452013 0.0969755771 -0.0270901332 0.1930038095 [131] -0.2285923257 0.6289887783 -0.0054206648 -0.2230939955 -0.0514880863 [136] -0.3088729339 0.0268634642 -0.1882276140 -0.1420487618 -0.6638403005 [141] 0.7611215110 0.1647573856 -0.2468467396 -0.3616380498 -0.1265748442 [146] -0.6001240545 -0.6350116824 0.4568019249 0.1565651084 0.2873260278 [151] 0.1245097857 0.2567415602 0.0857844170 0.1825206233 -0.6903984773 [156] -0.3966049199 0.3934627708 0.2945938642 0.4069728132 0.0819730266 [161] 0.1739882468 -0.2130283067 -0.2391118618 -0.2180076841 0.1642324738 [166] -0.1143566888 0.0739208412 -0.0514394191 0.2348390616 0.2582038258 [171] 0.5292498532 -0.0369668824 -0.2837456510 0.0899251774 0.5166281595 [176] 0.2976850757 -0.1484509515 -0.0254470723 -0.0388008195 -0.0360847082 [181] -0.2655307790 -0.7823755411 0.1334889997 -0.1892359999 -0.0600605266 [186] -0.1115780843 -0.5362262605 -0.0580399990 0.0383699522 0.0124134003 [191] -0.0970198579 0.4094462670 0.5428924966 -0.1554734891 0.0468804591 [196] 0.0467729899 0.3349073654 -0.2671766087 -1.0154844302 -0.2571237786 [201] 0.6367830393 0.8934802328 -0.6411864877 0.1019571433 -0.4433767013 [206] 0.0600434508 -0.0542807470 0.0879546950 0.0720160828 0.2149337368 [211] -0.5117261684 0.2265299467 0.2856802619 0.0768245373 -0.0232093583 [216] -0.6134993625 0.1940738997 -0.5458898059 0.0253023077 -0.3563440102 [221] -0.1174403883 0.3032287220 -0.5020926790 -0.3928422558 0.0004505751 [226] -0.2972677233 0.3966308545 -0.2369454264 -0.0593852687 -0.0150330109 > > proc.time() user system elapsed 1.861 0.912 2.799
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: 0xc08bff0> > .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: 0xc08bff0> > .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: 0xc08bff0> > .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: 0xc08bff0> > 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: 0xbf96470> > .Call("R_bm_AddColumn",P) <pointer: 0xbf96470> > .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: 0xbf96470> > .Call("R_bm_AddColumn",P) <pointer: 0xbf96470> > .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: 0xbf96470> > 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: 0xbf710e0> > .Call("R_bm_AddColumn",P) <pointer: 0xbf710e0> > .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: 0xbf710e0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0xbf710e0> > .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: 0xbf710e0> > > .Call("R_bm_RowMode",P) <pointer: 0xbf710e0> > .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: 0xbf710e0> > > .Call("R_bm_ColMode",P) <pointer: 0xbf710e0> > .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: 0xbf710e0> > 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: 0xaef8520> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0xaef8520> > .Call("R_bm_AddColumn",P) <pointer: 0xaef8520> > .Call("R_bm_AddColumn",P) <pointer: 0xaef8520> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1119f22a5ec7f0" "BufferedMatrixFile1119f22acb0dfd" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1119f22a5ec7f0" "BufferedMatrixFile1119f22acb0dfd" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0xce41030> > .Call("R_bm_AddColumn",P) <pointer: 0xce41030> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0xce41030> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0xce41030> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0xce41030> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0xce41030> > .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: 0xb80c5c0> > .Call("R_bm_AddColumn",P) <pointer: 0xb80c5c0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0xb80c5c0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0xb80c5c0> > 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: 0xc8ecf30> > .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: 0xc8ecf30> > rm(P) > > proc.time() user system elapsed 0.318 0.051 0.354
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.350 0.022 0.357