Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2025-04-02 19:35 -0400 (Wed, 02 Apr 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4764 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.3 (2025-02-28 ucrt) -- "Trophy Case" | 4495 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4522 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4449 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4426 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 251/2289 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.70.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino8 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | ![]() | ||||||||
merida1 | macOS 12.7.5 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson1 | macOS 13.6.6 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.70.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.70.0.tar.gz |
StartedAt: 2025-04-01 04:40:52 -0000 (Tue, 01 Apr 2025) |
EndedAt: 2025-04-01 04:41:14 -0000 (Tue, 01 Apr 2025) |
EllapsedTime: 22.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.70.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.4.3 (2025-02-28) * 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.70.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.20-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.4.3/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** 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 -I"/home/biocbuild/R/R-4.4.3/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -c RBufferedMatrix.c -o RBufferedMatrix.o /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -I"/home/biocbuild/R/R-4.4.3/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -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 -I"/home/biocbuild/R/R-4.4.3/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -I"/home/biocbuild/R/R-4.4.3/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -c init_package.c -o init_package.o /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -shared -L/home/biocbuild/R/R-4.4.3/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.4.3/lib -lR installing to /home/biocbuild/R/R-4.4.3/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.4.3 (2025-02-28) -- "Trophy Case" 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.303 0.052 0.342
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.3 (2025-02-28) -- "Trophy Case" 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.20-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 471272 25.2 1024767 54.8 643448 34.4 Vcells 871507 6.7 8388608 64.0 2046282 15.7 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Tue Apr 1 04:41:09 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Tue Apr 1 04:41:09 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: 0x3b0342e0> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Tue Apr 1 04:41:09 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Tue Apr 1 04:41:09 2025" > > ColMode(tmp2) <pointer: 0x3b0342e0> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.5313595 0.33719172 -1.2791183 -0.6483163 [2,] 2.2529528 0.08648942 -2.0499750 0.7801226 [3,] 1.3886546 0.71026816 -1.0754439 2.0033049 [4,] -0.2715572 0.52444907 -0.5606454 -0.1705052 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.5313595 0.33719172 1.2791183 0.6483163 [2,] 2.2529528 0.08648942 2.0499750 0.7801226 [3,] 1.3886546 0.71026816 1.0754439 2.0033049 [4,] 0.2715572 0.52444907 0.5606454 0.1705052 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-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.9765405 0.5806821 1.1309811 0.8051809 [2,] 1.5009839 0.2940908 1.4317734 0.8832455 [3,] 1.1784119 0.8427741 1.0370361 1.4153815 [4,] 0.5211115 0.7241886 0.7487626 0.4129228 > > 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.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.29676 31.14401 37.58893 33.70013 [2,] 42.26279 28.02740 41.36771 34.61258 [3,] 38.17277 34.13801 36.44581 41.15712 [4,] 30.48267 32.76633 33.04827 29.29973 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x3cb09060> > exp(tmp5) <pointer: 0x3cb09060> > log(tmp5,2) <pointer: 0x3cb09060> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.8443 > Min(tmp5) [1] 53.41767 > mean(tmp5) [1] 72.81361 > Sum(tmp5) [1] 14562.72 > Var(tmp5) [1] 854.8701 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 88.48974 74.09827 70.54408 69.74697 68.73629 71.19383 72.95122 71.63486 [9] 72.23770 68.50317 > rowSums(tmp5) [1] 1769.795 1481.965 1410.882 1394.939 1374.726 1423.877 1459.024 1432.697 [9] 1444.754 1370.063 > rowVars(tmp5) [1] 7979.34029 67.73796 50.66119 81.23680 87.16293 100.05761 [7] 58.45172 105.04863 54.53268 52.02589 > rowSd(tmp5) [1] 89.327153 8.230307 7.117667 9.013146 9.336109 10.002880 7.645372 [8] 10.249323 7.384625 7.212897 > rowMax(tmp5) [1] 466.84433 87.96446 85.66315 91.21226 89.37870 88.12340 84.18185 [8] 89.89773 86.56612 83.33908 > rowMin(tmp5) [1] 56.45056 58.33536 55.72132 53.41767 56.85317 54.50249 55.77360 55.89569 [9] 58.30543 59.69242 > > colMeans(tmp5) [1] 114.22363 69.45224 69.51212 69.52316 71.69075 69.05041 70.30979 [8] 73.58810 70.67345 73.45662 67.98689 71.64373 68.34145 69.76832 [15] 68.73102 71.46859 69.81658 72.70166 70.99457 73.33918 > colSums(tmp5) [1] 1142.2363 694.5224 695.1212 695.2316 716.9075 690.5041 703.0979 [8] 735.8810 706.7345 734.5662 679.8689 716.4373 683.4145 697.6832 [15] 687.3102 714.6859 698.1658 727.0166 709.9457 733.3918 > colVars(tmp5) [1] 15430.88771 49.07502 76.55826 87.71529 131.41701 20.35585 [7] 54.36651 103.18881 30.94426 65.15956 121.68099 83.88427 [13] 30.81982 42.90690 92.09212 90.39221 132.51543 78.09423 [19] 76.52141 36.77797 > colSd(tmp5) [1] 124.221124 7.005356 8.749758 9.365644 11.463726 4.511746 [7] 7.373365 10.158189 5.562757 8.072147 11.030911 9.158836 [13] 5.551560 6.550336 9.596464 9.507482 11.511535 8.837094 [19] 8.747652 6.064484 > colMax(tmp5) [1] 466.84433 78.99178 86.10147 85.66315 88.34253 76.89837 82.14407 [8] 86.97004 79.51239 84.33180 83.33908 89.37870 74.51427 77.30922 [15] 82.36729 80.36561 89.89773 91.21226 83.28621 78.22385 > colMin(tmp5) [1] 61.88873 58.33536 60.07095 56.85317 55.77360 63.61677 56.77600 57.96039 [9] 62.53423 61.91630 53.41767 58.04702 59.93063 55.89569 54.50249 56.04728 [17] 55.72132 60.95762 62.05042 60.97350 > > > ### 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] 88.48974 74.09827 70.54408 69.74697 68.73629 71.19383 72.95122 NA [9] 72.23770 68.50317 > rowSums(tmp5) [1] 1769.795 1481.965 1410.882 1394.939 1374.726 1423.877 1459.024 NA [9] 1444.754 1370.063 > rowVars(tmp5) [1] 7979.34029 67.73796 50.66119 81.23680 87.16293 100.05761 [7] 58.45172 108.40590 54.53268 52.02589 > rowSd(tmp5) [1] 89.327153 8.230307 7.117667 9.013146 9.336109 10.002880 7.645372 [8] 10.411815 7.384625 7.212897 > rowMax(tmp5) [1] 466.84433 87.96446 85.66315 91.21226 89.37870 88.12340 84.18185 [8] NA 86.56612 83.33908 > rowMin(tmp5) [1] 56.45056 58.33536 55.72132 53.41767 56.85317 54.50249 55.77360 NA [9] 58.30543 59.69242 > > colMeans(tmp5) [1] NA 69.45224 69.51212 69.52316 71.69075 69.05041 70.30979 73.58810 [9] 70.67345 73.45662 67.98689 71.64373 68.34145 69.76832 68.73102 71.46859 [17] 69.81658 72.70166 70.99457 73.33918 > colSums(tmp5) [1] NA 694.5224 695.1212 695.2316 716.9075 690.5041 703.0979 735.8810 [9] 706.7345 734.5662 679.8689 716.4373 683.4145 697.6832 687.3102 714.6859 [17] 698.1658 727.0166 709.9457 733.3918 > colVars(tmp5) [1] NA 49.07502 76.55826 87.71529 131.41701 20.35585 54.36651 [8] 103.18881 30.94426 65.15956 121.68099 83.88427 30.81982 42.90690 [15] 92.09212 90.39221 132.51543 78.09423 76.52141 36.77797 > colSd(tmp5) [1] NA 7.005356 8.749758 9.365644 11.463726 4.511746 7.373365 [8] 10.158189 5.562757 8.072147 11.030911 9.158836 5.551560 6.550336 [15] 9.596464 9.507482 11.511535 8.837094 8.747652 6.064484 > colMax(tmp5) [1] NA 78.99178 86.10147 85.66315 88.34253 76.89837 82.14407 86.97004 [9] 79.51239 84.33180 83.33908 89.37870 74.51427 77.30922 82.36729 80.36561 [17] 89.89773 91.21226 83.28621 78.22385 > colMin(tmp5) [1] NA 58.33536 60.07095 56.85317 55.77360 63.61677 56.77600 57.96039 [9] 62.53423 61.91630 53.41767 58.04702 59.93063 55.89569 54.50249 56.04728 [17] 55.72132 60.95762 62.05042 60.97350 > > Max(tmp5,na.rm=TRUE) [1] 466.8443 > Min(tmp5,na.rm=TRUE) [1] 53.41767 > mean(tmp5,na.rm=TRUE) [1] 72.85225 > Sum(tmp5,na.rm=TRUE) [1] 14497.6 > Var(tmp5,na.rm=TRUE) [1] 858.8875 > > rowMeans(tmp5,na.rm=TRUE) [1] 88.48974 74.09827 70.54408 69.74697 68.73629 71.19383 72.95122 71.97752 [9] 72.23770 68.50317 > rowSums(tmp5,na.rm=TRUE) [1] 1769.795 1481.965 1410.882 1394.939 1374.726 1423.877 1459.024 1367.573 [9] 1444.754 1370.063 > rowVars(tmp5,na.rm=TRUE) [1] 7979.34029 67.73796 50.66119 81.23680 87.16293 100.05761 [7] 58.45172 108.40590 54.53268 52.02589 > rowSd(tmp5,na.rm=TRUE) [1] 89.327153 8.230307 7.117667 9.013146 9.336109 10.002880 7.645372 [8] 10.411815 7.384625 7.212897 > rowMax(tmp5,na.rm=TRUE) [1] 466.84433 87.96446 85.66315 91.21226 89.37870 88.12340 84.18185 [8] 89.89773 86.56612 83.33908 > rowMin(tmp5,na.rm=TRUE) [1] 56.45056 58.33536 55.72132 53.41767 56.85317 54.50249 55.77360 55.89569 [9] 58.30543 59.69242 > > colMeans(tmp5,na.rm=TRUE) [1] 119.67911 69.45224 69.51212 69.52316 71.69075 69.05041 70.30979 [8] 73.58810 70.67345 73.45662 67.98689 71.64373 68.34145 69.76832 [15] 68.73102 71.46859 69.81658 72.70166 70.99457 73.33918 > colSums(tmp5,na.rm=TRUE) [1] 1077.1120 694.5224 695.1212 695.2316 716.9075 690.5041 703.0979 [8] 735.8810 706.7345 734.5662 679.8689 716.4373 683.4145 697.6832 [15] 687.3102 714.6859 698.1658 727.0166 709.9457 733.3918 > colVars(tmp5,na.rm=TRUE) [1] 17024.92375 49.07502 76.55826 87.71529 131.41701 20.35585 [7] 54.36651 103.18881 30.94426 65.15956 121.68099 83.88427 [13] 30.81982 42.90690 92.09212 90.39221 132.51543 78.09423 [19] 76.52141 36.77797 > colSd(tmp5,na.rm=TRUE) [1] 130.479591 7.005356 8.749758 9.365644 11.463726 4.511746 [7] 7.373365 10.158189 5.562757 8.072147 11.030911 9.158836 [13] 5.551560 6.550336 9.596464 9.507482 11.511535 8.837094 [19] 8.747652 6.064484 > colMax(tmp5,na.rm=TRUE) [1] 466.84433 78.99178 86.10147 85.66315 88.34253 76.89837 82.14407 [8] 86.97004 79.51239 84.33180 83.33908 89.37870 74.51427 77.30922 [15] 82.36729 80.36561 89.89773 91.21226 83.28621 78.22385 > colMin(tmp5,na.rm=TRUE) [1] 61.88873 58.33536 60.07095 56.85317 55.77360 63.61677 56.77600 57.96039 [9] 62.53423 61.91630 53.41767 58.04702 59.93063 55.89569 54.50249 56.04728 [17] 55.72132 60.95762 62.05042 60.97350 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 88.48974 74.09827 70.54408 69.74697 68.73629 71.19383 72.95122 NaN [9] 72.23770 68.50317 > rowSums(tmp5,na.rm=TRUE) [1] 1769.795 1481.965 1410.882 1394.939 1374.726 1423.877 1459.024 0.000 [9] 1444.754 1370.063 > rowVars(tmp5,na.rm=TRUE) [1] 7979.34029 67.73796 50.66119 81.23680 87.16293 100.05761 [7] 58.45172 NA 54.53268 52.02589 > rowSd(tmp5,na.rm=TRUE) [1] 89.327153 8.230307 7.117667 9.013146 9.336109 10.002880 7.645372 [8] NA 7.384625 7.212897 > rowMax(tmp5,na.rm=TRUE) [1] 466.84433 87.96446 85.66315 91.21226 89.37870 88.12340 84.18185 [8] NA 86.56612 83.33908 > rowMin(tmp5,na.rm=TRUE) [1] 56.45056 58.33536 55.72132 53.41767 56.85317 54.50249 55.77360 NA [9] 58.30543 59.69242 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] NaN 68.86715 70.56114 68.39196 69.84055 69.65415 70.97802 75.32451 [9] 69.78711 72.72349 67.05680 72.27897 68.43576 71.30972 69.18296 70.48717 [17] 67.58534 74.00655 69.62883 73.11242 > colSums(tmp5,na.rm=TRUE) [1] 0.0000 619.8044 635.0503 615.5276 628.5649 626.8873 638.8022 677.9206 [9] 628.0840 654.5114 603.5112 650.5107 615.9218 641.7875 622.6467 634.3845 [17] 608.2681 666.0590 626.6595 658.0118 > colVars(tmp5,na.rm=TRUE) [1] NA 51.35817 73.74808 84.28394 109.33277 18.79971 56.13887 [8] 82.16723 25.97444 67.25789 127.15916 89.83012 34.57224 21.54113 [15] 101.30582 90.85535 93.07259 68.70013 65.10263 40.79671 > colSd(tmp5,na.rm=TRUE) [1] NA 7.166461 8.587670 9.180628 10.456231 4.335864 7.492587 [8] 9.064614 5.096512 8.201091 11.276487 9.477875 5.879817 4.641242 [15] 10.065079 9.531807 9.647414 8.288554 8.068620 6.387230 > colMax(tmp5,na.rm=TRUE) [1] -Inf 78.99178 86.10147 85.66315 88.12340 76.89837 82.14407 86.97004 [9] 79.51239 84.33180 83.33908 89.37870 74.51427 77.30922 82.36729 80.36561 [17] 85.60189 91.21226 81.43984 78.22385 > colMin(tmp5,na.rm=TRUE) [1] Inf 58.33536 61.21426 56.85317 55.77360 65.42117 56.77600 64.08359 [9] 62.53423 61.91630 53.41767 58.04702 59.93063 62.94539 54.50249 56.04728 [17] 55.72132 64.53372 62.05042 60.97350 > > > > > 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] 277.8775 133.6791 380.7133 200.1044 211.6111 326.2050 239.8145 212.0803 [9] 256.7089 158.1547 > apply(copymatrix,1,var,na.rm=TRUE) [1] 277.8775 133.6791 380.7133 200.1044 211.6111 326.2050 239.8145 212.0803 [9] 256.7089 158.1547 > > > > 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.273737e-13 1.421085e-14 -3.552714e-14 4.263256e-14 0.000000e+00 [6] 8.526513e-14 -1.421085e-14 0.000000e+00 1.705303e-13 0.000000e+00 [11] -5.684342e-14 -1.136868e-13 -2.842171e-14 -1.421085e-14 1.705303e-13 [16] 1.136868e-13 1.136868e-13 -1.705303e-13 -1.136868e-13 5.684342e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 4 12 8 11 1 13 9 16 8 12 2 11 9 14 4 7 6 1 9 5 8 17 10 14 2 18 6 10 7 6 4 19 9 15 7 6 6 17 3 10 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.400462 > Min(tmp) [1] -2.21196 > mean(tmp) [1] -0.05472414 > Sum(tmp) [1] -5.472414 > Var(tmp) [1] 0.9016733 > > rowMeans(tmp) [1] -0.05472414 > rowSums(tmp) [1] -5.472414 > rowVars(tmp) [1] 0.9016733 > rowSd(tmp) [1] 0.9495648 > rowMax(tmp) [1] 2.400462 > rowMin(tmp) [1] -2.21196 > > colMeans(tmp) [1] -0.564962380 1.174230273 0.580051042 -0.337603755 -2.166804939 [6] -1.766332420 0.312916227 -1.488702180 -1.095220715 1.012698387 [11] -0.480683292 -1.315939912 -0.207188768 -0.775946622 -0.496775674 [16] -0.204536875 0.130098043 0.542410657 -0.493355231 0.222832657 [21] -0.491139248 -0.037596450 0.023158180 -0.049031265 0.452722514 [26] -1.118535386 -0.640196317 0.248392145 0.242497127 -0.084290193 [31] 0.048897617 -0.166880843 0.602028514 -0.060269236 1.350650272 [36] -0.158482354 2.343738757 -1.224641285 0.545756043 -0.023726145 [41] -0.518164480 1.828915886 -1.549674145 0.718274476 0.208045452 [46] 0.066987063 0.103424460 0.275713537 -0.852998488 -0.073389552 [51] 0.544526282 -0.702156701 2.400461773 0.471227097 0.409780189 [56] 0.984863763 -2.211960035 1.257919345 1.276610377 -0.831872219 [61] 0.526312446 -1.791256574 -1.079523791 -1.160942936 0.261444666 [66] -0.706853456 0.333899835 0.847498966 -1.374769440 0.384752692 [71] -0.494829710 1.102412570 -1.983241534 -0.617760084 0.128082190 [76] 0.623680291 1.224510702 -0.996117853 1.716827994 0.468972555 [81] -0.150844896 -0.876840224 0.245459474 -0.599966957 -0.250308955 [86] -0.874690742 -1.426044181 0.642036000 1.834116388 -0.186976651 [91] -0.686902953 0.033814442 -0.131905974 0.751735563 0.723860125 [96] 0.019131414 -0.700934832 1.742998223 0.004010976 -1.188031085 > colSums(tmp) [1] -0.564962380 1.174230273 0.580051042 -0.337603755 -2.166804939 [6] -1.766332420 0.312916227 -1.488702180 -1.095220715 1.012698387 [11] -0.480683292 -1.315939912 -0.207188768 -0.775946622 -0.496775674 [16] -0.204536875 0.130098043 0.542410657 -0.493355231 0.222832657 [21] -0.491139248 -0.037596450 0.023158180 -0.049031265 0.452722514 [26] -1.118535386 -0.640196317 0.248392145 0.242497127 -0.084290193 [31] 0.048897617 -0.166880843 0.602028514 -0.060269236 1.350650272 [36] -0.158482354 2.343738757 -1.224641285 0.545756043 -0.023726145 [41] -0.518164480 1.828915886 -1.549674145 0.718274476 0.208045452 [46] 0.066987063 0.103424460 0.275713537 -0.852998488 -0.073389552 [51] 0.544526282 -0.702156701 2.400461773 0.471227097 0.409780189 [56] 0.984863763 -2.211960035 1.257919345 1.276610377 -0.831872219 [61] 0.526312446 -1.791256574 -1.079523791 -1.160942936 0.261444666 [66] -0.706853456 0.333899835 0.847498966 -1.374769440 0.384752692 [71] -0.494829710 1.102412570 -1.983241534 -0.617760084 0.128082190 [76] 0.623680291 1.224510702 -0.996117853 1.716827994 0.468972555 [81] -0.150844896 -0.876840224 0.245459474 -0.599966957 -0.250308955 [86] -0.874690742 -1.426044181 0.642036000 1.834116388 -0.186976651 [91] -0.686902953 0.033814442 -0.131905974 0.751735563 0.723860125 [96] 0.019131414 -0.700934832 1.742998223 0.004010976 -1.188031085 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] -0.564962380 1.174230273 0.580051042 -0.337603755 -2.166804939 [6] -1.766332420 0.312916227 -1.488702180 -1.095220715 1.012698387 [11] -0.480683292 -1.315939912 -0.207188768 -0.775946622 -0.496775674 [16] -0.204536875 0.130098043 0.542410657 -0.493355231 0.222832657 [21] -0.491139248 -0.037596450 0.023158180 -0.049031265 0.452722514 [26] -1.118535386 -0.640196317 0.248392145 0.242497127 -0.084290193 [31] 0.048897617 -0.166880843 0.602028514 -0.060269236 1.350650272 [36] -0.158482354 2.343738757 -1.224641285 0.545756043 -0.023726145 [41] -0.518164480 1.828915886 -1.549674145 0.718274476 0.208045452 [46] 0.066987063 0.103424460 0.275713537 -0.852998488 -0.073389552 [51] 0.544526282 -0.702156701 2.400461773 0.471227097 0.409780189 [56] 0.984863763 -2.211960035 1.257919345 1.276610377 -0.831872219 [61] 0.526312446 -1.791256574 -1.079523791 -1.160942936 0.261444666 [66] -0.706853456 0.333899835 0.847498966 -1.374769440 0.384752692 [71] -0.494829710 1.102412570 -1.983241534 -0.617760084 0.128082190 [76] 0.623680291 1.224510702 -0.996117853 1.716827994 0.468972555 [81] -0.150844896 -0.876840224 0.245459474 -0.599966957 -0.250308955 [86] -0.874690742 -1.426044181 0.642036000 1.834116388 -0.186976651 [91] -0.686902953 0.033814442 -0.131905974 0.751735563 0.723860125 [96] 0.019131414 -0.700934832 1.742998223 0.004010976 -1.188031085 > colMin(tmp) [1] -0.564962380 1.174230273 0.580051042 -0.337603755 -2.166804939 [6] -1.766332420 0.312916227 -1.488702180 -1.095220715 1.012698387 [11] -0.480683292 -1.315939912 -0.207188768 -0.775946622 -0.496775674 [16] -0.204536875 0.130098043 0.542410657 -0.493355231 0.222832657 [21] -0.491139248 -0.037596450 0.023158180 -0.049031265 0.452722514 [26] -1.118535386 -0.640196317 0.248392145 0.242497127 -0.084290193 [31] 0.048897617 -0.166880843 0.602028514 -0.060269236 1.350650272 [36] -0.158482354 2.343738757 -1.224641285 0.545756043 -0.023726145 [41] -0.518164480 1.828915886 -1.549674145 0.718274476 0.208045452 [46] 0.066987063 0.103424460 0.275713537 -0.852998488 -0.073389552 [51] 0.544526282 -0.702156701 2.400461773 0.471227097 0.409780189 [56] 0.984863763 -2.211960035 1.257919345 1.276610377 -0.831872219 [61] 0.526312446 -1.791256574 -1.079523791 -1.160942936 0.261444666 [66] -0.706853456 0.333899835 0.847498966 -1.374769440 0.384752692 [71] -0.494829710 1.102412570 -1.983241534 -0.617760084 0.128082190 [76] 0.623680291 1.224510702 -0.996117853 1.716827994 0.468972555 [81] -0.150844896 -0.876840224 0.245459474 -0.599966957 -0.250308955 [86] -0.874690742 -1.426044181 0.642036000 1.834116388 -0.186976651 [91] -0.686902953 0.033814442 -0.131905974 0.751735563 0.723860125 [96] 0.019131414 -0.700934832 1.742998223 0.004010976 -1.188031085 > colMedians(tmp) [1] -0.564962380 1.174230273 0.580051042 -0.337603755 -2.166804939 [6] -1.766332420 0.312916227 -1.488702180 -1.095220715 1.012698387 [11] -0.480683292 -1.315939912 -0.207188768 -0.775946622 -0.496775674 [16] -0.204536875 0.130098043 0.542410657 -0.493355231 0.222832657 [21] -0.491139248 -0.037596450 0.023158180 -0.049031265 0.452722514 [26] -1.118535386 -0.640196317 0.248392145 0.242497127 -0.084290193 [31] 0.048897617 -0.166880843 0.602028514 -0.060269236 1.350650272 [36] -0.158482354 2.343738757 -1.224641285 0.545756043 -0.023726145 [41] -0.518164480 1.828915886 -1.549674145 0.718274476 0.208045452 [46] 0.066987063 0.103424460 0.275713537 -0.852998488 -0.073389552 [51] 0.544526282 -0.702156701 2.400461773 0.471227097 0.409780189 [56] 0.984863763 -2.211960035 1.257919345 1.276610377 -0.831872219 [61] 0.526312446 -1.791256574 -1.079523791 -1.160942936 0.261444666 [66] -0.706853456 0.333899835 0.847498966 -1.374769440 0.384752692 [71] -0.494829710 1.102412570 -1.983241534 -0.617760084 0.128082190 [76] 0.623680291 1.224510702 -0.996117853 1.716827994 0.468972555 [81] -0.150844896 -0.876840224 0.245459474 -0.599966957 -0.250308955 [86] -0.874690742 -1.426044181 0.642036000 1.834116388 -0.186976651 [91] -0.686902953 0.033814442 -0.131905974 0.751735563 0.723860125 [96] 0.019131414 -0.700934832 1.742998223 0.004010976 -1.188031085 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.5649624 1.17423 0.580051 -0.3376038 -2.166805 -1.766332 0.3129162 [2,] -0.5649624 1.17423 0.580051 -0.3376038 -2.166805 -1.766332 0.3129162 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.488702 -1.095221 1.012698 -0.4806833 -1.31594 -0.2071888 -0.7759466 [2,] -1.488702 -1.095221 1.012698 -0.4806833 -1.31594 -0.2071888 -0.7759466 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.4967757 -0.2045369 0.130098 0.5424107 -0.4933552 0.2228327 -0.4911392 [2,] -0.4967757 -0.2045369 0.130098 0.5424107 -0.4933552 0.2228327 -0.4911392 [,22] [,23] [,24] [,25] [,26] [,27] [1,] -0.03759645 0.02315818 -0.04903127 0.4527225 -1.118535 -0.6401963 [2,] -0.03759645 0.02315818 -0.04903127 0.4527225 -1.118535 -0.6401963 [,28] [,29] [,30] [,31] [,32] [,33] [1,] 0.2483921 0.2424971 -0.08429019 0.04889762 -0.1668808 0.6020285 [2,] 0.2483921 0.2424971 -0.08429019 0.04889762 -0.1668808 0.6020285 [,34] [,35] [,36] [,37] [,38] [,39] [,40] [1,] -0.06026924 1.35065 -0.1584824 2.343739 -1.224641 0.545756 -0.02372614 [2,] -0.06026924 1.35065 -0.1584824 2.343739 -1.224641 0.545756 -0.02372614 [,41] [,42] [,43] [,44] [,45] [,46] [,47] [1,] -0.5181645 1.828916 -1.549674 0.7182745 0.2080455 0.06698706 0.1034245 [2,] -0.5181645 1.828916 -1.549674 0.7182745 0.2080455 0.06698706 0.1034245 [,48] [,49] [,50] [,51] [,52] [,53] [,54] [1,] 0.2757135 -0.8529985 -0.07338955 0.5445263 -0.7021567 2.400462 0.4712271 [2,] 0.2757135 -0.8529985 -0.07338955 0.5445263 -0.7021567 2.400462 0.4712271 [,55] [,56] [,57] [,58] [,59] [,60] [,61] [1,] 0.4097802 0.9848638 -2.21196 1.257919 1.27661 -0.8318722 0.5263124 [2,] 0.4097802 0.9848638 -2.21196 1.257919 1.27661 -0.8318722 0.5263124 [,62] [,63] [,64] [,65] [,66] [,67] [,68] [1,] -1.791257 -1.079524 -1.160943 0.2614447 -0.7068535 0.3338998 0.847499 [2,] -1.791257 -1.079524 -1.160943 0.2614447 -0.7068535 0.3338998 0.847499 [,69] [,70] [,71] [,72] [,73] [,74] [,75] [1,] -1.374769 0.3847527 -0.4948297 1.102413 -1.983242 -0.6177601 0.1280822 [2,] -1.374769 0.3847527 -0.4948297 1.102413 -1.983242 -0.6177601 0.1280822 [,76] [,77] [,78] [,79] [,80] [,81] [,82] [1,] 0.6236803 1.224511 -0.9961179 1.716828 0.4689726 -0.1508449 -0.8768402 [2,] 0.6236803 1.224511 -0.9961179 1.716828 0.4689726 -0.1508449 -0.8768402 [,83] [,84] [,85] [,86] [,87] [,88] [,89] [1,] 0.2454595 -0.599967 -0.250309 -0.8746907 -1.426044 0.642036 1.834116 [2,] 0.2454595 -0.599967 -0.250309 -0.8746907 -1.426044 0.642036 1.834116 [,90] [,91] [,92] [,93] [,94] [,95] [,96] [1,] -0.1869767 -0.686903 0.03381444 -0.131906 0.7517356 0.7238601 0.01913141 [2,] -0.1869767 -0.686903 0.03381444 -0.131906 0.7517356 0.7238601 0.01913141 [,97] [,98] [,99] [,100] [1,] -0.7009348 1.742998 0.004010976 -1.188031 [2,] -0.7009348 1.742998 0.004010976 -1.188031 > > > Max(tmp2) [1] 2.22671 > Min(tmp2) [1] -2.667661 > mean(tmp2) [1] 0.02722699 > Sum(tmp2) [1] 2.722699 > Var(tmp2) [1] 0.8233872 > > rowMeans(tmp2) [1] -0.789447416 -0.821367471 0.467045310 -0.913028780 0.698444772 [6] 0.268968511 1.284651874 2.120809362 0.860133608 -0.470828440 [11] -0.705103014 -0.470078597 -0.026814027 0.432514705 0.488217309 [16] -2.667661194 1.707388559 -1.317063400 -1.288799924 -0.412714914 [21] -1.549987501 0.118963568 -0.798762476 1.012618387 0.447258663 [26] 2.226710027 -0.916980338 -0.978345559 0.071165454 0.953455636 [31] 0.002404769 -0.466728492 0.301532535 -0.732154176 0.586459090 [36] 0.837887909 -0.337825276 -1.140784491 -0.054872248 -0.154798306 [41] 0.084653514 0.468377355 -0.390161877 0.138014014 -0.694083600 [46] 0.092744740 -1.326834409 0.250202590 -0.229754060 -1.658114374 [51] 1.061271792 0.291366891 0.905914218 -1.658704302 -0.258063421 [56] 0.170692262 -0.522954205 1.379568247 0.575876072 1.617752512 [61] -0.332465513 0.430011618 0.637000467 0.660094889 0.356770210 [66] -1.019702408 -0.193655519 -0.936181077 0.294521318 0.508473267 [71] 0.182169790 -0.586754215 1.392221732 -1.445224997 -0.756764315 [76] 0.815366784 -1.378541961 -0.361298634 0.527861796 0.142771024 [81] 0.485747142 0.443860360 1.180888502 -0.757137084 0.450092164 [86] 0.544474888 0.638647942 0.781114123 1.292029911 1.486437208 [91] 0.017124871 -1.039562647 0.598403184 0.218527245 0.861816687 [96] -0.697643367 0.580749207 -0.220310746 0.561058504 -1.810540985 > rowSums(tmp2) [1] -0.789447416 -0.821367471 0.467045310 -0.913028780 0.698444772 [6] 0.268968511 1.284651874 2.120809362 0.860133608 -0.470828440 [11] -0.705103014 -0.470078597 -0.026814027 0.432514705 0.488217309 [16] -2.667661194 1.707388559 -1.317063400 -1.288799924 -0.412714914 [21] -1.549987501 0.118963568 -0.798762476 1.012618387 0.447258663 [26] 2.226710027 -0.916980338 -0.978345559 0.071165454 0.953455636 [31] 0.002404769 -0.466728492 0.301532535 -0.732154176 0.586459090 [36] 0.837887909 -0.337825276 -1.140784491 -0.054872248 -0.154798306 [41] 0.084653514 0.468377355 -0.390161877 0.138014014 -0.694083600 [46] 0.092744740 -1.326834409 0.250202590 -0.229754060 -1.658114374 [51] 1.061271792 0.291366891 0.905914218 -1.658704302 -0.258063421 [56] 0.170692262 -0.522954205 1.379568247 0.575876072 1.617752512 [61] -0.332465513 0.430011618 0.637000467 0.660094889 0.356770210 [66] -1.019702408 -0.193655519 -0.936181077 0.294521318 0.508473267 [71] 0.182169790 -0.586754215 1.392221732 -1.445224997 -0.756764315 [76] 0.815366784 -1.378541961 -0.361298634 0.527861796 0.142771024 [81] 0.485747142 0.443860360 1.180888502 -0.757137084 0.450092164 [86] 0.544474888 0.638647942 0.781114123 1.292029911 1.486437208 [91] 0.017124871 -1.039562647 0.598403184 0.218527245 0.861816687 [96] -0.697643367 0.580749207 -0.220310746 0.561058504 -1.810540985 > 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.789447416 -0.821367471 0.467045310 -0.913028780 0.698444772 [6] 0.268968511 1.284651874 2.120809362 0.860133608 -0.470828440 [11] -0.705103014 -0.470078597 -0.026814027 0.432514705 0.488217309 [16] -2.667661194 1.707388559 -1.317063400 -1.288799924 -0.412714914 [21] -1.549987501 0.118963568 -0.798762476 1.012618387 0.447258663 [26] 2.226710027 -0.916980338 -0.978345559 0.071165454 0.953455636 [31] 0.002404769 -0.466728492 0.301532535 -0.732154176 0.586459090 [36] 0.837887909 -0.337825276 -1.140784491 -0.054872248 -0.154798306 [41] 0.084653514 0.468377355 -0.390161877 0.138014014 -0.694083600 [46] 0.092744740 -1.326834409 0.250202590 -0.229754060 -1.658114374 [51] 1.061271792 0.291366891 0.905914218 -1.658704302 -0.258063421 [56] 0.170692262 -0.522954205 1.379568247 0.575876072 1.617752512 [61] -0.332465513 0.430011618 0.637000467 0.660094889 0.356770210 [66] -1.019702408 -0.193655519 -0.936181077 0.294521318 0.508473267 [71] 0.182169790 -0.586754215 1.392221732 -1.445224997 -0.756764315 [76] 0.815366784 -1.378541961 -0.361298634 0.527861796 0.142771024 [81] 0.485747142 0.443860360 1.180888502 -0.757137084 0.450092164 [86] 0.544474888 0.638647942 0.781114123 1.292029911 1.486437208 [91] 0.017124871 -1.039562647 0.598403184 0.218527245 0.861816687 [96] -0.697643367 0.580749207 -0.220310746 0.561058504 -1.810540985 > rowMin(tmp2) [1] -0.789447416 -0.821367471 0.467045310 -0.913028780 0.698444772 [6] 0.268968511 1.284651874 2.120809362 0.860133608 -0.470828440 [11] -0.705103014 -0.470078597 -0.026814027 0.432514705 0.488217309 [16] -2.667661194 1.707388559 -1.317063400 -1.288799924 -0.412714914 [21] -1.549987501 0.118963568 -0.798762476 1.012618387 0.447258663 [26] 2.226710027 -0.916980338 -0.978345559 0.071165454 0.953455636 [31] 0.002404769 -0.466728492 0.301532535 -0.732154176 0.586459090 [36] 0.837887909 -0.337825276 -1.140784491 -0.054872248 -0.154798306 [41] 0.084653514 0.468377355 -0.390161877 0.138014014 -0.694083600 [46] 0.092744740 -1.326834409 0.250202590 -0.229754060 -1.658114374 [51] 1.061271792 0.291366891 0.905914218 -1.658704302 -0.258063421 [56] 0.170692262 -0.522954205 1.379568247 0.575876072 1.617752512 [61] -0.332465513 0.430011618 0.637000467 0.660094889 0.356770210 [66] -1.019702408 -0.193655519 -0.936181077 0.294521318 0.508473267 [71] 0.182169790 -0.586754215 1.392221732 -1.445224997 -0.756764315 [76] 0.815366784 -1.378541961 -0.361298634 0.527861796 0.142771024 [81] 0.485747142 0.443860360 1.180888502 -0.757137084 0.450092164 [86] 0.544474888 0.638647942 0.781114123 1.292029911 1.486437208 [91] 0.017124871 -1.039562647 0.598403184 0.218527245 0.861816687 [96] -0.697643367 0.580749207 -0.220310746 0.561058504 -1.810540985 > > colMeans(tmp2) [1] 0.02722699 > colSums(tmp2) [1] 2.722699 > colVars(tmp2) [1] 0.8233872 > colSd(tmp2) [1] 0.9074069 > colMax(tmp2) [1] 2.22671 > colMin(tmp2) [1] -2.667661 > colMedians(tmp2) [1] 0.1403925 > colRanges(tmp2) [,1] [1,] -2.667661 [2,] 2.226710 > > 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] -2.1110238 -0.7593586 0.6520367 -3.5859961 0.9268437 1.7333378 [7] 3.0603826 3.2334785 -3.6363403 7.5467623 > colApply(tmp,quantile)[,1] [,1] [1,] -1.8794609 [2,] -0.6071887 [3,] -0.4484914 [4,] 0.4117727 [5,] 1.2518615 > > rowApply(tmp,sum) [1] 3.8564780 -0.3575177 2.2006934 0.5990526 -1.9634306 -0.7540769 [7] 3.8490180 1.4606180 -1.1455290 -0.6851831 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 2 1 4 9 9 1 2 4 5 10 [2,] 1 6 6 5 10 4 7 10 1 2 [3,] 3 5 9 6 3 5 5 8 4 4 [4,] 4 4 1 2 5 6 1 6 3 7 [5,] 7 10 3 1 6 2 9 9 2 9 [6,] 9 7 5 10 1 8 8 5 7 1 [7,] 8 2 7 3 8 9 10 1 9 6 [8,] 5 8 8 8 7 7 6 2 10 5 [9,] 6 3 2 7 2 3 3 7 8 3 [10,] 10 9 10 4 4 10 4 3 6 8 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.89242606 1.04418913 -2.42982819 -0.64555981 -0.23324432 -0.47338536 [7] 1.85105919 -0.23041055 0.79279032 0.12381609 -1.18064498 -1.35291186 [13] -3.32117357 -0.43051128 -1.19590306 -0.13465029 2.07837834 0.06398891 [19] 2.67494423 -2.79273766 > colApply(tmp,quantile)[,1] [,1] [1,] -1.10493130 [2,] -0.07386949 [3,] 0.33164210 [4,] 0.69931797 [5,] 1.04026679 > > rowApply(tmp,sum) [1] -8.8748831 0.8737315 1.7519466 2.3798326 -1.0299962 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 17 9 3 16 18 [2,] 13 17 16 18 4 [3,] 9 4 2 10 12 [4,] 2 13 1 20 15 [5,] 5 15 14 17 9 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.33164210 -0.1296313 -0.59244368 -1.8353980 -1.3859675 0.30912368 [2,] -0.07386949 0.4140637 -0.70199823 0.2539367 0.3980339 0.78917124 [3,] -1.10493130 0.6699974 -1.28601832 -1.3271464 0.4580703 -0.37495168 [4,] 0.69931797 0.8245458 -0.07194485 1.6121707 0.8019559 -1.16826545 [5,] 1.04026679 -0.7347863 0.22257689 0.6508772 -0.5053370 -0.02846315 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.25083166 -0.9201534 0.7919516 -0.4615839 -0.533364181 -1.0058280 [2,] 0.22295439 -0.7949359 -0.4552654 0.1542598 -0.094429115 0.9070562 [3,] 0.35288479 0.3362553 0.5895649 1.5764223 -0.185813864 0.7024884 [4,] 0.03241237 0.6590651 0.4396253 0.3554227 -0.372769785 -0.7376545 [5,] 0.99197598 0.4893583 -0.5730861 -1.5007049 0.005731967 -1.2189739 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -2.13106576 -1.1987540 -1.5325824 -0.3606469 2.1118748 0.73401846 [2,] -0.89279480 -1.0637692 1.6657862 -0.3403364 -0.3699754 0.34488139 [3,] -0.95351260 0.7395430 -0.8482488 0.1425749 -0.1527104 -0.06164303 [4,] -0.08765198 -0.1491319 0.2189141 -0.8645952 1.1365667 -0.33577404 [5,] 0.74385158 1.2416008 -0.6997722 1.2883533 -0.6473774 -0.61749386 [,19] [,20] [1,] 0.1811688 -1.4980752 [2,] 0.3985269 0.1124349 [3,] 2.1331545 0.3459672 [4,] -0.2900697 -0.3223067 [5,] 0.2521637 -1.4307579 > > > 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.20-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.20-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.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 566 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-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.1662263 0.512087 -0.872136 -1.237014 -0.1173298 0.6637949 -0.4237178 col8 col9 col10 col11 col12 col13 col14 row1 -0.8937845 0.3236079 -1.29361 -0.7661045 0.6037748 -0.7195438 -0.463781 col15 col16 col17 col18 col19 col20 row1 0.4014511 0.6971954 0.02662857 0.0742251 1.435972 -2.294124 > tmp[,"col10"] col10 row1 -1.2936102 row2 0.7454815 row3 -1.1998974 row4 -1.3592961 row5 0.2174399 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.1662263 0.512087 -0.8721360 -1.2370145 -0.1173298 0.6637949 row5 -0.3473442 -1.448127 0.4773705 -0.3151681 -0.6474264 -0.1238375 col7 col8 col9 col10 col11 col12 row1 -0.4237178 -0.8937845 0.3236079 -1.2936102 -0.76610454 0.6037748 row5 1.4696629 0.3831876 1.4324731 0.2174399 0.07540159 0.7921628 col13 col14 col15 col16 col17 col18 row1 -0.7195438 -0.4637810 0.4014511 0.6971954 0.026628570 0.0742251 row5 2.1920925 0.4385022 -0.2837380 1.0259221 -0.003982396 -0.6202146 col19 col20 row1 1.435972 -2.2941237 row5 -1.692281 -0.1509295 > tmp[,c("col6","col20")] col6 col20 row1 0.6637949 -2.2941237 row2 -1.2946182 -0.7224554 row3 0.1273553 -0.3456374 row4 0.6907026 0.5358678 row5 -0.1238375 -0.1509295 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.6637949 -2.2941237 row5 -0.1238375 -0.1509295 > > > > > 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 48.55762 49.76824 50.12588 49.4556 49.81097 106.6372 47.95364 49.53283 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.16294 50.41573 50.98731 50.36811 49.5228 49.54826 49.7989 50.00913 col17 col18 col19 col20 row1 49.07574 50.34185 48.52259 105.5574 > tmp[,"col10"] col10 row1 50.41573 row2 31.03008 row3 28.89539 row4 31.23196 row5 48.47268 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 48.55762 49.76824 50.12588 49.45560 49.81097 106.6372 47.95364 49.53283 row5 49.59466 48.91526 49.46354 50.93161 49.32345 106.9887 50.01936 49.43025 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.16294 50.41573 50.98731 50.36811 49.52280 49.54826 49.79890 50.00913 row5 50.67143 48.47268 52.01869 50.45345 49.27733 52.28848 48.02255 51.70483 col17 col18 col19 col20 row1 49.07574 50.34185 48.52259 105.5574 row5 49.09368 51.91911 49.34288 104.6456 > tmp[,c("col6","col20")] col6 col20 row1 106.63719 105.55740 row2 75.61785 74.74485 row3 73.74946 74.87762 row4 74.26114 76.11228 row5 106.98868 104.64563 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 106.6372 105.5574 row5 106.9887 104.6456 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 106.6372 105.5574 row5 106.9887 104.6456 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.54061479 [2,] 0.67050710 [3,] -0.70771242 [4,] -0.39913787 [5,] -0.06250266 > tmp[,c("col17","col7")] col17 col7 [1,] 1.6519816 1.30717711 [2,] 0.3993734 0.31384164 [3,] -0.2227815 0.01875801 [4,] -0.2941767 -0.42451573 [5,] -0.6467912 -0.42180484 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.6991791 1.0089969 [2,] 0.4225303 -0.7676431 [3,] 1.5092157 0.5787608 [4,] 0.3322255 2.1499976 [5,] 1.3346779 0.1940219 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.6991791 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.6991791 [2,] 0.4225303 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 0.3005741 -0.4629472 -0.1288142 0.7257167 0.83761878 0.6585300 row1 0.8445534 -0.2998873 -0.1202830 1.0880981 -0.09928372 -0.8681182 [,7] [,8] [,9] [,10] [,11] [,12] row3 0.7514737 -0.8327395 0.1177443 -0.65691108 -0.9249644 -1.0629452 row1 -0.5660347 0.6707572 0.5701427 -0.03445902 -2.5244159 -0.3496264 [,13] [,14] [,15] [,16] [,17] [,18] row3 0.2972287 -1.4745211 0.04951903 0.04748209 -1.8133758 -0.8259592 row1 0.8354215 0.5423644 0.24690558 -0.96711815 -0.4544037 -0.7700717 [,19] [,20] row3 2.3331990 -1.4729277 row1 -0.5258382 0.7155495 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.6734035 -0.7585868 0.4388568 -1.721578 1.390452 0.7922598 -0.5414526 [,8] [,9] [,10] row2 0.1177691 1.136964 0.7348341 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 1.516618 1.921154 -0.715495 -0.4086455 -0.2509526 -0.7742324 0.9551282 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.5287423 1.712745 -1.216009 0.280448 -1.03442 0.05258269 1.239324 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.482421 -0.3177766 -0.5786523 -0.8858676 -0.2586746 -0.3051762 > > > 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: 0x3c2ec190> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c4748a351" [2] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c3d8dbfd" [3] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c43ce891d" [4] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c38e13aea" [5] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c39f7979d" [6] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c521138e5" [7] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c3dcfc374" [8] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c1945f72c" [9] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c6417ebb3" [10] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c5e854f68" [11] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c6cd11734" [12] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c75ab80ed" [13] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c86d1998" [14] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c3f202b3f" [15] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1f1a2c34245d39" > > > ### 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: 0x3c1db9d0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x3c1db9d0> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x3c1db9d0> > rowMedians(tmp) [1] -0.351428172 -0.320361453 0.550812591 0.392583565 -0.003670225 [6] 0.459680583 0.427674157 -0.024001648 -0.276721047 0.365434682 [11] 0.671795264 -0.310440172 -0.412853398 0.074214756 0.028039950 [16] 0.096262567 0.344435293 0.081816412 -0.076826053 -0.512339442 [21] 0.157372916 -0.424269089 -0.223449199 0.014638168 -0.706596950 [26] 0.339355002 -0.027625905 -0.323530037 0.029359857 -0.392386474 [31] -0.428408492 0.395398015 -0.252420453 -0.194893061 -0.113220836 [36] -0.245165233 -0.128902368 0.316065579 0.290842701 -0.282183381 [41] -0.017397608 -0.206605990 0.094408782 0.474752391 0.320312708 [46] 0.311714742 0.087169270 -0.109322615 -0.421102956 -0.215606208 [51] 0.467422549 0.466056039 0.047782487 0.241221772 0.127787426 [56] 0.405981539 0.138438854 -0.557072151 0.531165430 -0.293996413 [61] -0.113967425 -0.758183790 -0.440765153 -0.231471720 -0.104655573 [66] 0.669525023 -0.498676202 0.147890037 0.042318598 -0.231580391 [71] -0.504339099 -0.060930447 0.094729741 0.503386940 0.077690802 [76] 0.116056138 -0.123918262 0.178022501 0.218705944 -0.107206878 [81] 0.077397168 0.314854401 0.098415947 -0.307186205 -0.173168425 [86] 0.387629823 0.248449557 0.176157595 0.237876836 -0.327192079 [91] -0.200211176 0.008529369 0.110457478 0.723854483 -0.124672124 [96] -0.047450792 -0.026468167 -0.076230419 0.023432562 0.653503190 [101] 0.118522719 -0.520435875 0.098311566 -0.139385497 -0.271276262 [106] 0.278516777 0.620087408 -0.353171597 -0.317695597 0.308443922 [111] -0.069853585 0.159156285 -0.201536748 -0.085122134 -0.078980507 [116] 0.573465212 0.011256962 0.229895984 0.318305912 0.646552731 [121] 0.146661028 0.622498385 -0.435083930 -0.276062155 0.510423411 [126] -0.144589671 -0.092820560 -0.240802887 0.635365121 0.266072338 [131] -0.140873346 0.059072818 -0.209497194 -0.089875867 -0.465367720 [136] -0.195658968 -0.523752288 -0.583799793 0.207594517 0.018994627 [141] 0.319682216 -0.009732344 -0.051478465 0.434084603 -0.655677388 [146] 0.686080781 -0.209520055 -0.318725281 -0.434334477 0.195593789 [151] -0.015707659 0.325612486 -0.064243921 -0.406786531 -0.433072198 [156] -0.760147757 -0.267829773 -0.049534630 -0.018384768 -0.303686654 [161] -0.009812665 -0.242191514 0.164153657 -0.169416667 0.215778130 [166] 0.056900828 0.451484001 -0.455151399 -0.079791937 -0.422447671 [171] 0.674650742 -0.011347066 -0.258082064 0.602432373 0.229771328 [176] 0.345176789 -0.198462356 -0.656673259 0.092573124 -0.414158254 [181] 0.102890768 -0.101908116 0.172803679 -0.297876387 0.301950167 [186] -0.518739694 -0.601925909 0.222807845 -0.457635757 -0.570824625 [191] 0.194562990 0.001855797 -0.359069768 0.019258695 0.026816776 [196] -0.168099632 0.171035389 0.181018252 -0.452878804 -0.051640964 [201] -0.383882896 -0.206028892 -0.583877059 -0.365120150 0.066003809 [206] -0.556565389 -0.170839872 -0.486419776 0.271472325 -0.057032416 [211] -0.465281833 0.055168237 0.145901670 0.058036302 -0.225823274 [216] -0.152206605 -0.013583145 -0.156802823 0.406975450 -0.090430585 [221] 0.085663152 -0.762511590 -0.521032929 0.041527569 -0.276988204 [226] 0.173205926 -0.206859956 0.403790940 -0.322862812 1.071392015 > > proc.time() user system elapsed 1.902 0.817 2.746
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.3 (2025-02-28) -- "Trophy Case" 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: 0xcc482e0> > .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: 0xcc482e0> > .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: 0xcc482e0> > .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: 0xcc482e0> > 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: 0xd5c2ed0> > .Call("R_bm_AddColumn",P) <pointer: 0xd5c2ed0> > .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: 0xd5c2ed0> > .Call("R_bm_AddColumn",P) <pointer: 0xd5c2ed0> > .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: 0xd5c2ed0> > 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: 0xcea2b40> > .Call("R_bm_AddColumn",P) <pointer: 0xcea2b40> > .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: 0xcea2b40> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0xcea2b40> > .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: 0xcea2b40> > > .Call("R_bm_RowMode",P) <pointer: 0xcea2b40> > .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: 0xcea2b40> > > .Call("R_bm_ColMode",P) <pointer: 0xcea2b40> > .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: 0xcea2b40> > 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: 0xd8e0d90> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0xd8e0d90> > .Call("R_bm_AddColumn",P) <pointer: 0xd8e0d90> > .Call("R_bm_AddColumn",P) <pointer: 0xd8e0d90> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1f1d00186b7491" "BufferedMatrixFile1f1d00381ec48" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1f1d00186b7491" "BufferedMatrixFile1f1d00381ec48" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0xf0f69a0> > .Call("R_bm_AddColumn",P) <pointer: 0xf0f69a0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0xf0f69a0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0xf0f69a0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0xf0f69a0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0xf0f69a0> > .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: 0xf0f8fb0> > .Call("R_bm_AddColumn",P) <pointer: 0xf0f8fb0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0xf0f8fb0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0xf0f8fb0> > 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: 0xf3a6670> > .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: 0xf3a6670> > rm(P) > > proc.time() user system elapsed 0.313 0.042 0.339
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.3 (2025-02-28) -- "Trophy Case" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: aarch64-unknown-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.310 0.041 0.338