Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2025-03-10 12:12 -0400 (Mon, 10 Mar 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" | 4670 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.3 (2025-02-28 ucrt) -- "Trophy Case" | 4355 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4446 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4439 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4306 |
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-03-07 05:56:23 -0000 (Fri, 07 Mar 2025) |
EndedAt: 2025-03-07 05:56:46 -0000 (Fri, 07 Mar 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.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.302 0.052 0.340
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] "Fri Mar 7 05:56:41 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 Mar 7 05:56:41 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: 0x294e32e0> > > > > 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 Mar 7 05:56:41 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 Mar 7 05:56:41 2025" > > ColMode(tmp2) <pointer: 0x294e32e0> > > > > ### 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,] 100.04958395 -0.78044361 0.5508599 -0.2036448 [2,] 0.07275247 -1.14759022 -0.7940953 -0.5423214 [3,] -0.99202809 1.41718019 1.8993822 0.4435012 [4,] -2.35888410 -0.09340828 -1.2858479 0.2342896 > 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,] 100.04958395 0.78044361 0.5508599 0.2036448 [2,] 0.07275247 1.14759022 0.7940953 0.5423214 [3,] 0.99202809 1.41718019 1.8993822 0.4435012 [4,] 2.35888410 0.09340828 1.2858479 0.2342896 > 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,] 10.0024789 0.8834272 0.7421994 0.4512702 [2,] 0.2697267 1.0712564 0.8911202 0.7364248 [3,] 0.9960061 1.1904538 1.3781808 0.6659589 [4,] 1.5358659 0.3056277 1.1339523 0.4840348 > > 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,] 225.07437 34.61472 32.97285 29.71635 [2,] 27.77002 36.86015 34.70530 32.90657 [3,] 35.95209 38.32172 40.68119 32.10309 [4,] 42.71754 28.14969 37.62537 30.07464 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x2afb8060> > exp(tmp5) <pointer: 0x2afb8060> > log(tmp5,2) <pointer: 0x2afb8060> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 468.4628 > Min(tmp5) [1] 53.64659 > mean(tmp5) [1] 72.95409 > Sum(tmp5) [1] 14590.82 > Var(tmp5) [1] 864.1668 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.32231 68.81933 73.88359 68.82717 73.00436 71.91753 68.94158 68.54536 [9] 70.57339 74.70629 > rowSums(tmp5) [1] 1806.446 1376.387 1477.672 1376.543 1460.087 1438.351 1378.832 1370.907 [9] 1411.468 1494.126 > rowVars(tmp5) [1] 8007.22519 53.94074 43.61648 100.64544 69.67366 65.65865 [7] 84.03693 49.79901 81.82847 92.48196 > rowSd(tmp5) [1] 89.483100 7.344436 6.604277 10.032220 8.347075 8.103003 9.167166 [8] 7.056841 9.045909 9.616754 > rowMax(tmp5) [1] 468.46282 80.84437 88.30770 88.91097 87.82733 87.22074 87.39175 [8] 81.76880 87.48348 89.45871 > rowMin(tmp5) [1] 56.02255 57.79966 61.16906 56.21288 59.39758 60.88213 56.42213 53.86265 [9] 53.64659 58.18221 > > colMeans(tmp5) [1] 108.48897 71.44351 73.06724 71.26451 78.39432 67.04629 74.87303 [8] 70.19532 68.59964 71.55872 71.16205 66.06408 67.43416 69.32511 [15] 71.38013 74.16514 74.34807 69.05685 69.87033 71.34437 > colSums(tmp5) [1] 1084.8897 714.4351 730.6724 712.6451 783.9432 670.4629 748.7303 [8] 701.9532 685.9964 715.5872 711.6205 660.6408 674.3416 693.2511 [15] 713.8013 741.6514 743.4807 690.5685 698.7033 713.4437 > colVars(tmp5) [1] 16100.29139 83.46986 91.55047 37.94515 66.52861 116.91968 [7] 22.80760 87.38084 83.16928 99.42075 34.92727 38.05798 [13] 52.79251 121.90156 82.39113 33.14430 120.64233 68.39231 [19] 47.48175 60.61199 > colSd(tmp5) [1] 126.886924 9.136184 9.568201 6.159964 8.156507 10.812940 [7] 4.775730 9.347772 9.119719 9.970995 5.909930 6.169115 [13] 7.265845 11.040904 9.076956 5.757109 10.983730 8.269964 [19] 6.890700 7.785370 > colMax(tmp5) [1] 468.46282 87.48348 89.45871 80.47340 87.43412 87.22074 83.49786 [8] 85.92943 88.30770 85.81617 82.08555 74.18947 80.30961 84.54430 [15] 87.48225 81.76880 87.82733 86.16281 80.20936 83.88383 > colMin(tmp5) [1] 56.82518 58.58988 60.57104 61.85068 67.53969 56.21288 70.05864 59.26282 [9] 59.46171 53.86265 60.45223 57.08727 53.64659 56.02255 60.16472 63.58237 [17] 57.68112 56.42213 57.39851 59.74622 > > > ### 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] 90.32231 NA 73.88359 68.82717 73.00436 71.91753 68.94158 68.54536 [9] 70.57339 74.70629 > rowSums(tmp5) [1] 1806.446 NA 1477.672 1376.543 1460.087 1438.351 1378.832 1370.907 [9] 1411.468 1494.126 > rowVars(tmp5) [1] 8007.22519 49.95863 43.61648 100.64544 69.67366 65.65865 [7] 84.03693 49.79901 81.82847 92.48196 > rowSd(tmp5) [1] 89.483100 7.068142 6.604277 10.032220 8.347075 8.103003 9.167166 [8] 7.056841 9.045909 9.616754 > rowMax(tmp5) [1] 468.46282 NA 88.30770 88.91097 87.82733 87.22074 87.39175 [8] 81.76880 87.48348 89.45871 > rowMin(tmp5) [1] 56.02255 NA 61.16906 56.21288 59.39758 60.88213 56.42213 53.86265 [9] 53.64659 58.18221 > > colMeans(tmp5) [1] 108.48897 71.44351 73.06724 71.26451 78.39432 NA 74.87303 [8] 70.19532 68.59964 71.55872 71.16205 66.06408 67.43416 69.32511 [15] 71.38013 74.16514 74.34807 69.05685 69.87033 71.34437 > colSums(tmp5) [1] 1084.8897 714.4351 730.6724 712.6451 783.9432 NA 748.7303 [8] 701.9532 685.9964 715.5872 711.6205 660.6408 674.3416 693.2511 [15] 713.8013 741.6514 743.4807 690.5685 698.7033 713.4437 > colVars(tmp5) [1] 16100.29139 83.46986 91.55047 37.94515 66.52861 NA [7] 22.80760 87.38084 83.16928 99.42075 34.92727 38.05798 [13] 52.79251 121.90156 82.39113 33.14430 120.64233 68.39231 [19] 47.48175 60.61199 > colSd(tmp5) [1] 126.886924 9.136184 9.568201 6.159964 8.156507 NA [7] 4.775730 9.347772 9.119719 9.970995 5.909930 6.169115 [13] 7.265845 11.040904 9.076956 5.757109 10.983730 8.269964 [19] 6.890700 7.785370 > colMax(tmp5) [1] 468.46282 87.48348 89.45871 80.47340 87.43412 NA 83.49786 [8] 85.92943 88.30770 85.81617 82.08555 74.18947 80.30961 84.54430 [15] 87.48225 81.76880 87.82733 86.16281 80.20936 83.88383 > colMin(tmp5) [1] 56.82518 58.58988 60.57104 61.85068 67.53969 NA 70.05864 59.26282 [9] 59.46171 53.86265 60.45223 57.08727 53.64659 56.02255 60.16472 63.58237 [17] 57.68112 56.42213 57.39851 59.74622 > > Max(tmp5,na.rm=TRUE) [1] 468.4628 > Min(tmp5,na.rm=TRUE) [1] 53.64659 > mean(tmp5,na.rm=TRUE) [1] 73.02976 > Sum(tmp5,na.rm=TRUE) [1] 14532.92 > Var(tmp5,na.rm=TRUE) [1] 867.3803 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.32231 69.39429 73.88359 68.82717 73.00436 71.91753 68.94158 68.54536 [9] 70.57339 74.70629 > rowSums(tmp5,na.rm=TRUE) [1] 1806.446 1318.492 1477.672 1376.543 1460.087 1438.351 1378.832 1370.907 [9] 1411.468 1494.126 > rowVars(tmp5,na.rm=TRUE) [1] 8007.22519 49.95863 43.61648 100.64544 69.67366 65.65865 [7] 84.03693 49.79901 81.82847 92.48196 > rowSd(tmp5,na.rm=TRUE) [1] 89.483100 7.068142 6.604277 10.032220 8.347075 8.103003 9.167166 [8] 7.056841 9.045909 9.616754 > rowMax(tmp5,na.rm=TRUE) [1] 468.46282 80.84437 88.30770 88.91097 87.82733 87.22074 87.39175 [8] 81.76880 87.48348 89.45871 > rowMin(tmp5,na.rm=TRUE) [1] 56.02255 57.79966 61.16906 56.21288 59.39758 60.88213 56.42213 53.86265 [9] 53.64659 58.18221 > > colMeans(tmp5,na.rm=TRUE) [1] 108.48897 71.44351 73.06724 71.26451 78.39432 68.06309 74.87303 [8] 70.19532 68.59964 71.55872 71.16205 66.06408 67.43416 69.32511 [15] 71.38013 74.16514 74.34807 69.05685 69.87033 71.34437 > colSums(tmp5,na.rm=TRUE) [1] 1084.8897 714.4351 730.6724 712.6451 783.9432 612.5678 748.7303 [8] 701.9532 685.9964 715.5872 711.6205 660.6408 674.3416 693.2511 [15] 713.8013 741.6514 743.4807 690.5685 698.7033 713.4437 > colVars(tmp5,na.rm=TRUE) [1] 16100.29139 83.46986 91.55047 37.94515 66.52861 119.90361 [7] 22.80760 87.38084 83.16928 99.42075 34.92727 38.05798 [13] 52.79251 121.90156 82.39113 33.14430 120.64233 68.39231 [19] 47.48175 60.61199 > colSd(tmp5,na.rm=TRUE) [1] 126.886924 9.136184 9.568201 6.159964 8.156507 10.950051 [7] 4.775730 9.347772 9.119719 9.970995 5.909930 6.169115 [13] 7.265845 11.040904 9.076956 5.757109 10.983730 8.269964 [19] 6.890700 7.785370 > colMax(tmp5,na.rm=TRUE) [1] 468.46282 87.48348 89.45871 80.47340 87.43412 87.22074 83.49786 [8] 85.92943 88.30770 85.81617 82.08555 74.18947 80.30961 84.54430 [15] 87.48225 81.76880 87.82733 86.16281 80.20936 83.88383 > colMin(tmp5,na.rm=TRUE) [1] 56.82518 58.58988 60.57104 61.85068 67.53969 56.21288 70.05864 59.26282 [9] 59.46171 53.86265 60.45223 57.08727 53.64659 56.02255 60.16472 63.58237 [17] 57.68112 56.42213 57.39851 59.74622 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.32231 NaN 73.88359 68.82717 73.00436 71.91753 68.94158 68.54536 [9] 70.57339 74.70629 > rowSums(tmp5,na.rm=TRUE) [1] 1806.446 0.000 1477.672 1376.543 1460.087 1438.351 1378.832 1370.907 [9] 1411.468 1494.126 > rowVars(tmp5,na.rm=TRUE) [1] 8007.22519 NA 43.61648 100.64544 69.67366 65.65865 [7] 84.03693 49.79901 81.82847 92.48196 > rowSd(tmp5,na.rm=TRUE) [1] 89.483100 NA 6.604277 10.032220 8.347075 8.103003 9.167166 [8] 7.056841 9.045909 9.616754 > rowMax(tmp5,na.rm=TRUE) [1] 468.46282 NA 88.30770 88.91097 87.82733 87.22074 87.39175 [8] 81.76880 87.48348 89.45871 > rowMin(tmp5,na.rm=TRUE) [1] 56.02255 NA 61.16906 56.21288 59.39758 60.88213 56.42213 53.86265 [9] 53.64659 58.18221 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 114.12112 70.85728 73.15977 71.57271 79.11333 NaN 75.22434 [8] 70.81868 69.61497 72.48441 71.02864 66.64388 67.24659 68.07680 [15] 71.93131 73.42300 73.93855 68.64537 69.67331 72.63305 > colSums(tmp5,na.rm=TRUE) [1] 1027.0901 637.7155 658.4379 644.1544 712.0200 0.0000 677.0191 [8] 637.3681 626.5347 652.3596 639.2578 599.7949 605.2193 612.6912 [15] 647.3818 660.8070 665.4469 617.8084 627.0598 653.6975 > colVars(tmp5,na.rm=TRUE) [1] 17755.96574 90.03734 102.89797 41.61969 69.02860 NA [7] 24.27010 93.93197 81.96796 102.20828 39.09295 39.03331 [13] 58.99577 119.60846 89.27228 31.09121 133.83594 75.03661 [19] 52.98029 49.50557 > colSd(tmp5,na.rm=TRUE) [1] 133.251513 9.488801 10.143864 6.451333 8.308345 NA [7] 4.926469 9.691851 9.053616 10.109811 6.252436 6.247665 [13] 7.680870 10.936565 9.448401 5.575949 11.568748 8.662367 [19] 7.278756 7.036019 > colMax(tmp5,na.rm=TRUE) [1] 468.46282 87.48348 89.45871 80.47340 87.43412 -Inf 83.49786 [8] 85.92943 88.30770 85.81617 82.08555 74.18947 80.30961 84.54430 [15] 87.48225 81.76880 87.82733 86.16281 80.20936 83.88383 > colMin(tmp5,na.rm=TRUE) [1] 56.82518 58.58988 60.57104 61.85068 67.53969 Inf 70.05864 59.26282 [9] 62.11598 53.86265 60.45223 57.08727 53.64659 56.02255 60.16472 63.58237 [17] 57.68112 56.42213 57.39851 62.36652 > > > > > 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] 356.30950 228.42120 119.38967 128.00636 378.65410 318.62608 380.90879 [8] 339.34782 274.20099 90.01644 > apply(copymatrix,1,var,na.rm=TRUE) [1] 356.30950 228.42120 119.38967 128.00636 378.65410 318.62608 380.90879 [8] 339.34782 274.20099 90.01644 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] -1.136868e-13 1.421085e-13 5.684342e-14 1.421085e-14 -5.684342e-14 [6] 0.000000e+00 2.842171e-14 2.842171e-13 -5.684342e-14 0.000000e+00 [11] 1.705303e-13 -2.842171e-14 1.278977e-13 -1.350031e-13 -7.105427e-15 [16] 1.705303e-13 2.842171e-14 2.842171e-14 0.000000e+00 0.000000e+00 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 6 17 9 15 8 4 7 19 8 11 5 15 4 4 8 18 5 2 3 14 9 4 5 8 2 8 10 7 3 11 6 16 3 8 6 20 4 16 2 17 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] 3.074035 > Min(tmp) [1] -2.611405 > mean(tmp) [1] -0.0225493 > Sum(tmp) [1] -2.25493 > Var(tmp) [1] 1.087833 > > rowMeans(tmp) [1] -0.0225493 > rowSums(tmp) [1] -2.25493 > rowVars(tmp) [1] 1.087833 > rowSd(tmp) [1] 1.042992 > rowMax(tmp) [1] 3.074035 > rowMin(tmp) [1] -2.611405 > > colMeans(tmp) [1] 0.31985092 2.16205635 1.20804847 0.92235040 1.45120560 1.36542806 [7] -0.66570899 0.87533363 -0.24725137 0.22213542 1.28532613 1.68327470 [13] -0.52505434 -1.51610200 -0.75751990 0.56028970 -0.22642010 -0.27526902 [19] -0.85428994 1.51751392 0.12206232 -1.54892049 0.39547513 1.46670318 [25] 0.46959094 -0.45488965 -1.20492351 -1.16252263 -1.19632448 0.94640881 [31] 0.58664073 0.03086065 1.29199868 0.63333031 1.77610578 0.05557407 [37] 0.60913963 0.69380658 1.71757927 -0.60218431 -0.35678441 -1.40942780 [43] -1.16632445 0.02408831 -1.08983545 3.07403543 0.47783486 -1.20755899 [49] -1.27905000 -0.30431034 -1.36483932 0.26452530 0.20363526 1.31101955 [55] 1.19469802 0.24264266 -1.65157054 -0.90529933 -1.11734905 0.36289678 [61] -0.56200459 0.61432272 -0.67179247 0.73979909 -0.18708125 0.14084599 [67] -0.40570632 0.90632814 0.09321032 0.31388889 -0.51360034 -0.73805837 [73] -1.43522689 -0.22626884 0.36589354 0.94600400 0.82159375 -1.31811316 [79] 0.24381234 -1.02934055 -1.18558141 -1.33922582 -1.08496577 0.76735391 [85] -1.66504666 -0.11327141 1.22384806 0.80344145 -1.16674590 1.56428230 [91] -0.92530361 -1.45664946 -1.07568738 -0.39489377 0.75678884 -0.03962772 [97] -0.91888158 0.20609261 -2.61140496 -0.13169277 > colSums(tmp) [1] 0.31985092 2.16205635 1.20804847 0.92235040 1.45120560 1.36542806 [7] -0.66570899 0.87533363 -0.24725137 0.22213542 1.28532613 1.68327470 [13] -0.52505434 -1.51610200 -0.75751990 0.56028970 -0.22642010 -0.27526902 [19] -0.85428994 1.51751392 0.12206232 -1.54892049 0.39547513 1.46670318 [25] 0.46959094 -0.45488965 -1.20492351 -1.16252263 -1.19632448 0.94640881 [31] 0.58664073 0.03086065 1.29199868 0.63333031 1.77610578 0.05557407 [37] 0.60913963 0.69380658 1.71757927 -0.60218431 -0.35678441 -1.40942780 [43] -1.16632445 0.02408831 -1.08983545 3.07403543 0.47783486 -1.20755899 [49] -1.27905000 -0.30431034 -1.36483932 0.26452530 0.20363526 1.31101955 [55] 1.19469802 0.24264266 -1.65157054 -0.90529933 -1.11734905 0.36289678 [61] -0.56200459 0.61432272 -0.67179247 0.73979909 -0.18708125 0.14084599 [67] -0.40570632 0.90632814 0.09321032 0.31388889 -0.51360034 -0.73805837 [73] -1.43522689 -0.22626884 0.36589354 0.94600400 0.82159375 -1.31811316 [79] 0.24381234 -1.02934055 -1.18558141 -1.33922582 -1.08496577 0.76735391 [85] -1.66504666 -0.11327141 1.22384806 0.80344145 -1.16674590 1.56428230 [91] -0.92530361 -1.45664946 -1.07568738 -0.39489377 0.75678884 -0.03962772 [97] -0.91888158 0.20609261 -2.61140496 -0.13169277 > 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.31985092 2.16205635 1.20804847 0.92235040 1.45120560 1.36542806 [7] -0.66570899 0.87533363 -0.24725137 0.22213542 1.28532613 1.68327470 [13] -0.52505434 -1.51610200 -0.75751990 0.56028970 -0.22642010 -0.27526902 [19] -0.85428994 1.51751392 0.12206232 -1.54892049 0.39547513 1.46670318 [25] 0.46959094 -0.45488965 -1.20492351 -1.16252263 -1.19632448 0.94640881 [31] 0.58664073 0.03086065 1.29199868 0.63333031 1.77610578 0.05557407 [37] 0.60913963 0.69380658 1.71757927 -0.60218431 -0.35678441 -1.40942780 [43] -1.16632445 0.02408831 -1.08983545 3.07403543 0.47783486 -1.20755899 [49] -1.27905000 -0.30431034 -1.36483932 0.26452530 0.20363526 1.31101955 [55] 1.19469802 0.24264266 -1.65157054 -0.90529933 -1.11734905 0.36289678 [61] -0.56200459 0.61432272 -0.67179247 0.73979909 -0.18708125 0.14084599 [67] -0.40570632 0.90632814 0.09321032 0.31388889 -0.51360034 -0.73805837 [73] -1.43522689 -0.22626884 0.36589354 0.94600400 0.82159375 -1.31811316 [79] 0.24381234 -1.02934055 -1.18558141 -1.33922582 -1.08496577 0.76735391 [85] -1.66504666 -0.11327141 1.22384806 0.80344145 -1.16674590 1.56428230 [91] -0.92530361 -1.45664946 -1.07568738 -0.39489377 0.75678884 -0.03962772 [97] -0.91888158 0.20609261 -2.61140496 -0.13169277 > colMin(tmp) [1] 0.31985092 2.16205635 1.20804847 0.92235040 1.45120560 1.36542806 [7] -0.66570899 0.87533363 -0.24725137 0.22213542 1.28532613 1.68327470 [13] -0.52505434 -1.51610200 -0.75751990 0.56028970 -0.22642010 -0.27526902 [19] -0.85428994 1.51751392 0.12206232 -1.54892049 0.39547513 1.46670318 [25] 0.46959094 -0.45488965 -1.20492351 -1.16252263 -1.19632448 0.94640881 [31] 0.58664073 0.03086065 1.29199868 0.63333031 1.77610578 0.05557407 [37] 0.60913963 0.69380658 1.71757927 -0.60218431 -0.35678441 -1.40942780 [43] -1.16632445 0.02408831 -1.08983545 3.07403543 0.47783486 -1.20755899 [49] -1.27905000 -0.30431034 -1.36483932 0.26452530 0.20363526 1.31101955 [55] 1.19469802 0.24264266 -1.65157054 -0.90529933 -1.11734905 0.36289678 [61] -0.56200459 0.61432272 -0.67179247 0.73979909 -0.18708125 0.14084599 [67] -0.40570632 0.90632814 0.09321032 0.31388889 -0.51360034 -0.73805837 [73] -1.43522689 -0.22626884 0.36589354 0.94600400 0.82159375 -1.31811316 [79] 0.24381234 -1.02934055 -1.18558141 -1.33922582 -1.08496577 0.76735391 [85] -1.66504666 -0.11327141 1.22384806 0.80344145 -1.16674590 1.56428230 [91] -0.92530361 -1.45664946 -1.07568738 -0.39489377 0.75678884 -0.03962772 [97] -0.91888158 0.20609261 -2.61140496 -0.13169277 > colMedians(tmp) [1] 0.31985092 2.16205635 1.20804847 0.92235040 1.45120560 1.36542806 [7] -0.66570899 0.87533363 -0.24725137 0.22213542 1.28532613 1.68327470 [13] -0.52505434 -1.51610200 -0.75751990 0.56028970 -0.22642010 -0.27526902 [19] -0.85428994 1.51751392 0.12206232 -1.54892049 0.39547513 1.46670318 [25] 0.46959094 -0.45488965 -1.20492351 -1.16252263 -1.19632448 0.94640881 [31] 0.58664073 0.03086065 1.29199868 0.63333031 1.77610578 0.05557407 [37] 0.60913963 0.69380658 1.71757927 -0.60218431 -0.35678441 -1.40942780 [43] -1.16632445 0.02408831 -1.08983545 3.07403543 0.47783486 -1.20755899 [49] -1.27905000 -0.30431034 -1.36483932 0.26452530 0.20363526 1.31101955 [55] 1.19469802 0.24264266 -1.65157054 -0.90529933 -1.11734905 0.36289678 [61] -0.56200459 0.61432272 -0.67179247 0.73979909 -0.18708125 0.14084599 [67] -0.40570632 0.90632814 0.09321032 0.31388889 -0.51360034 -0.73805837 [73] -1.43522689 -0.22626884 0.36589354 0.94600400 0.82159375 -1.31811316 [79] 0.24381234 -1.02934055 -1.18558141 -1.33922582 -1.08496577 0.76735391 [85] -1.66504666 -0.11327141 1.22384806 0.80344145 -1.16674590 1.56428230 [91] -0.92530361 -1.45664946 -1.07568738 -0.39489377 0.75678884 -0.03962772 [97] -0.91888158 0.20609261 -2.61140496 -0.13169277 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.3198509 2.162056 1.208048 0.9223504 1.451206 1.365428 -0.665709 [2,] 0.3198509 2.162056 1.208048 0.9223504 1.451206 1.365428 -0.665709 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.8753336 -0.2472514 0.2221354 1.285326 1.683275 -0.5250543 -1.516102 [2,] 0.8753336 -0.2472514 0.2221354 1.285326 1.683275 -0.5250543 -1.516102 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.7575199 0.5602897 -0.2264201 -0.275269 -0.8542899 1.517514 0.1220623 [2,] -0.7575199 0.5602897 -0.2264201 -0.275269 -0.8542899 1.517514 0.1220623 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1.54892 0.3954751 1.466703 0.4695909 -0.4548897 -1.204924 -1.162523 [2,] -1.54892 0.3954751 1.466703 0.4695909 -0.4548897 -1.204924 -1.162523 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -1.196324 0.9464088 0.5866407 0.03086065 1.291999 0.6333303 1.776106 [2,] -1.196324 0.9464088 0.5866407 0.03086065 1.291999 0.6333303 1.776106 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.05557407 0.6091396 0.6938066 1.717579 -0.6021843 -0.3567844 -1.409428 [2,] 0.05557407 0.6091396 0.6938066 1.717579 -0.6021843 -0.3567844 -1.409428 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -1.166324 0.02408831 -1.089835 3.074035 0.4778349 -1.207559 -1.27905 [2,] -1.166324 0.02408831 -1.089835 3.074035 0.4778349 -1.207559 -1.27905 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -0.3043103 -1.364839 0.2645253 0.2036353 1.31102 1.194698 0.2426427 [2,] -0.3043103 -1.364839 0.2645253 0.2036353 1.31102 1.194698 0.2426427 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.651571 -0.9052993 -1.117349 0.3628968 -0.5620046 0.6143227 -0.6717925 [2,] -1.651571 -0.9052993 -1.117349 0.3628968 -0.5620046 0.6143227 -0.6717925 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.7397991 -0.1870812 0.140846 -0.4057063 0.9063281 0.09321032 0.3138889 [2,] 0.7397991 -0.1870812 0.140846 -0.4057063 0.9063281 0.09321032 0.3138889 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.5136003 -0.7380584 -1.435227 -0.2262688 0.3658935 0.946004 0.8215937 [2,] -0.5136003 -0.7380584 -1.435227 -0.2262688 0.3658935 0.946004 0.8215937 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -1.318113 0.2438123 -1.029341 -1.185581 -1.339226 -1.084966 0.7673539 [2,] -1.318113 0.2438123 -1.029341 -1.185581 -1.339226 -1.084966 0.7673539 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -1.665047 -0.1132714 1.223848 0.8034414 -1.166746 1.564282 -0.9253036 [2,] -1.665047 -0.1132714 1.223848 0.8034414 -1.166746 1.564282 -0.9253036 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.456649 -1.075687 -0.3948938 0.7567888 -0.03962772 -0.9188816 0.2060926 [2,] -1.456649 -1.075687 -0.3948938 0.7567888 -0.03962772 -0.9188816 0.2060926 [,99] [,100] [1,] -2.611405 -0.1316928 [2,] -2.611405 -0.1316928 > > > Max(tmp2) [1] 1.754796 > Min(tmp2) [1] -2.446545 > mean(tmp2) [1] 0.04859267 > Sum(tmp2) [1] 4.859267 > Var(tmp2) [1] 0.8229828 > > rowMeans(tmp2) [1] 0.023431997 0.469311650 0.586561871 -0.232595480 -1.309153740 [6] 1.316556825 -0.215698940 -1.904108481 0.319666688 1.001247091 [11] -0.751326082 -0.196099572 -1.011746748 -0.845851294 0.331902180 [16] -0.348386923 0.446213181 -0.341147539 0.662851133 -0.844275999 [21] -0.905277081 0.480434081 -0.128450675 -0.658716320 -0.912141766 [26] 1.622832994 1.636330918 1.342697784 1.149580240 0.896513017 [31] 0.452266390 -0.310211415 -2.040961746 0.453927838 1.303172657 [36] 0.591040500 1.418876908 -1.190243226 0.255994414 -0.830661940 [41] -0.014126442 0.968312202 -0.560459268 1.080949979 -1.606943657 [46] 0.480239115 0.800129152 0.953372810 -2.446545227 1.700076325 [51] 0.477132867 0.212745841 -0.332688303 0.628131105 0.650396199 [56] -0.889210657 -0.769373733 0.551146074 0.453960559 -0.740576612 [61] 0.845507181 0.623695929 1.313143410 0.894634865 -0.554096190 [66] -1.193817749 -1.187709690 0.693476303 -0.080377681 -0.270220600 [71] -1.083022897 0.504070370 0.222261834 0.664860178 0.457911589 [76] 0.909055120 -0.430922420 0.129367171 0.004805704 -0.695995494 [81] -2.040049041 0.480874557 1.047198415 0.172043320 0.917407656 [86] 0.375614350 0.479226546 -0.505903166 0.140348005 -0.698220117 [91] -1.505284093 0.412021896 1.754795713 -0.005284014 0.624819755 [96] -0.350283397 0.139538115 0.086851253 -0.243412387 -1.570687339 > rowSums(tmp2) [1] 0.023431997 0.469311650 0.586561871 -0.232595480 -1.309153740 [6] 1.316556825 -0.215698940 -1.904108481 0.319666688 1.001247091 [11] -0.751326082 -0.196099572 -1.011746748 -0.845851294 0.331902180 [16] -0.348386923 0.446213181 -0.341147539 0.662851133 -0.844275999 [21] -0.905277081 0.480434081 -0.128450675 -0.658716320 -0.912141766 [26] 1.622832994 1.636330918 1.342697784 1.149580240 0.896513017 [31] 0.452266390 -0.310211415 -2.040961746 0.453927838 1.303172657 [36] 0.591040500 1.418876908 -1.190243226 0.255994414 -0.830661940 [41] -0.014126442 0.968312202 -0.560459268 1.080949979 -1.606943657 [46] 0.480239115 0.800129152 0.953372810 -2.446545227 1.700076325 [51] 0.477132867 0.212745841 -0.332688303 0.628131105 0.650396199 [56] -0.889210657 -0.769373733 0.551146074 0.453960559 -0.740576612 [61] 0.845507181 0.623695929 1.313143410 0.894634865 -0.554096190 [66] -1.193817749 -1.187709690 0.693476303 -0.080377681 -0.270220600 [71] -1.083022897 0.504070370 0.222261834 0.664860178 0.457911589 [76] 0.909055120 -0.430922420 0.129367171 0.004805704 -0.695995494 [81] -2.040049041 0.480874557 1.047198415 0.172043320 0.917407656 [86] 0.375614350 0.479226546 -0.505903166 0.140348005 -0.698220117 [91] -1.505284093 0.412021896 1.754795713 -0.005284014 0.624819755 [96] -0.350283397 0.139538115 0.086851253 -0.243412387 -1.570687339 > 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.023431997 0.469311650 0.586561871 -0.232595480 -1.309153740 [6] 1.316556825 -0.215698940 -1.904108481 0.319666688 1.001247091 [11] -0.751326082 -0.196099572 -1.011746748 -0.845851294 0.331902180 [16] -0.348386923 0.446213181 -0.341147539 0.662851133 -0.844275999 [21] -0.905277081 0.480434081 -0.128450675 -0.658716320 -0.912141766 [26] 1.622832994 1.636330918 1.342697784 1.149580240 0.896513017 [31] 0.452266390 -0.310211415 -2.040961746 0.453927838 1.303172657 [36] 0.591040500 1.418876908 -1.190243226 0.255994414 -0.830661940 [41] -0.014126442 0.968312202 -0.560459268 1.080949979 -1.606943657 [46] 0.480239115 0.800129152 0.953372810 -2.446545227 1.700076325 [51] 0.477132867 0.212745841 -0.332688303 0.628131105 0.650396199 [56] -0.889210657 -0.769373733 0.551146074 0.453960559 -0.740576612 [61] 0.845507181 0.623695929 1.313143410 0.894634865 -0.554096190 [66] -1.193817749 -1.187709690 0.693476303 -0.080377681 -0.270220600 [71] -1.083022897 0.504070370 0.222261834 0.664860178 0.457911589 [76] 0.909055120 -0.430922420 0.129367171 0.004805704 -0.695995494 [81] -2.040049041 0.480874557 1.047198415 0.172043320 0.917407656 [86] 0.375614350 0.479226546 -0.505903166 0.140348005 -0.698220117 [91] -1.505284093 0.412021896 1.754795713 -0.005284014 0.624819755 [96] -0.350283397 0.139538115 0.086851253 -0.243412387 -1.570687339 > rowMin(tmp2) [1] 0.023431997 0.469311650 0.586561871 -0.232595480 -1.309153740 [6] 1.316556825 -0.215698940 -1.904108481 0.319666688 1.001247091 [11] -0.751326082 -0.196099572 -1.011746748 -0.845851294 0.331902180 [16] -0.348386923 0.446213181 -0.341147539 0.662851133 -0.844275999 [21] -0.905277081 0.480434081 -0.128450675 -0.658716320 -0.912141766 [26] 1.622832994 1.636330918 1.342697784 1.149580240 0.896513017 [31] 0.452266390 -0.310211415 -2.040961746 0.453927838 1.303172657 [36] 0.591040500 1.418876908 -1.190243226 0.255994414 -0.830661940 [41] -0.014126442 0.968312202 -0.560459268 1.080949979 -1.606943657 [46] 0.480239115 0.800129152 0.953372810 -2.446545227 1.700076325 [51] 0.477132867 0.212745841 -0.332688303 0.628131105 0.650396199 [56] -0.889210657 -0.769373733 0.551146074 0.453960559 -0.740576612 [61] 0.845507181 0.623695929 1.313143410 0.894634865 -0.554096190 [66] -1.193817749 -1.187709690 0.693476303 -0.080377681 -0.270220600 [71] -1.083022897 0.504070370 0.222261834 0.664860178 0.457911589 [76] 0.909055120 -0.430922420 0.129367171 0.004805704 -0.695995494 [81] -2.040049041 0.480874557 1.047198415 0.172043320 0.917407656 [86] 0.375614350 0.479226546 -0.505903166 0.140348005 -0.698220117 [91] -1.505284093 0.412021896 1.754795713 -0.005284014 0.624819755 [96] -0.350283397 0.139538115 0.086851253 -0.243412387 -1.570687339 > > colMeans(tmp2) [1] 0.04859267 > colSums(tmp2) [1] 4.859267 > colVars(tmp2) [1] 0.8229828 > colSd(tmp2) [1] 0.907184 > colMax(tmp2) [1] 1.754796 > colMin(tmp2) [1] -2.446545 > colMedians(tmp2) [1] 0.1923946 > colRanges(tmp2) [,1] [1,] -2.446545 [2,] 1.754796 > > 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.977252 -2.068071 1.052290 -1.862232 3.593524 -3.246734 -2.557307 [8] 1.604058 -1.818511 4.501408 > colApply(tmp,quantile)[,1] [,1] [1,] -3.5981730 [2,] -1.1181695 [3,] -0.2957826 [4,] 1.1065785 [5,] 1.2946834 > > rowApply(tmp,sum) [1] 0.8727184 1.0776338 -2.6297955 0.3087124 3.0655643 -0.3032001 [7] -3.0458067 5.8646908 -3.9430593 -5.0462860 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 3 8 1 4 8 3 9 3 9 2 [2,] 1 3 10 8 5 1 10 2 8 6 [3,] 9 7 2 7 2 2 6 5 10 8 [4,] 8 2 7 1 7 5 4 8 2 10 [5,] 10 4 3 9 6 10 7 7 1 7 [6,] 5 1 6 5 9 8 2 4 3 1 [7,] 2 9 9 2 1 6 5 6 4 3 [8,] 4 6 4 10 10 7 3 1 6 5 [9,] 7 5 5 3 4 4 1 9 7 9 [10,] 6 10 8 6 3 9 8 10 5 4 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.1788768 4.4059270 -1.2618305 -0.9600456 -1.9013870 0.7432005 [7] -7.4957085 2.3470794 2.8745746 -1.1310058 0.8927122 -2.1214429 [13] 1.8522352 1.2670746 4.7974438 3.9382981 1.3902774 1.5569531 [19] 3.3898323 -2.1511739 > colApply(tmp,quantile)[,1] [,1] [1,] -1.1749692 [2,] -0.4628139 [3,] -0.3207831 [4,] 0.2077640 [5,] 1.5719254 > > rowApply(tmp,sum) [1] 7.9077749 0.7993888 3.9563671 4.2133477 -4.6227415 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 8 7 4 3 19 [2,] 16 13 13 17 16 [3,] 4 4 19 5 13 [4,] 5 9 6 15 7 [5,] 9 2 7 6 11 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.2077640 1.0244068 -0.64777341 -0.5669298 0.3456119 -1.4178271 [2,] -0.3207831 0.5201077 -1.15701682 -0.1428709 -1.2600333 1.0152395 [3,] -0.4628139 0.5561154 1.22804553 -0.4322502 -0.3430172 0.7308821 [4,] -1.1749692 1.1356549 -0.71159795 0.9979337 -0.2568232 -0.7854177 [5,] 1.5719254 1.1696422 0.02651213 -0.8159284 -0.3871253 1.2003237 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.761889 0.4122071 0.5592598 0.15326890 0.54706796 -1.0236388 [2,] -1.213122 -1.9960433 0.8404162 -0.04468638 -0.09410123 -0.8021486 [3,] -1.820926 0.9272692 -0.3351296 -1.69895208 0.23497687 0.8689246 [4,] -1.593155 1.3762292 0.9036120 0.33754992 0.51732099 0.1974242 [5,] -1.106617 1.6274171 0.9064161 0.12181387 -0.31255234 -1.3620043 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.4821247 1.9620618 0.7701790 3.4673352 1.2739592 0.47518861 [2,] 1.7304405 0.5903583 1.9915380 -0.1888058 -0.1344206 1.10770621 [3,] -0.5295351 0.5550249 -0.4556608 1.1151558 0.2176400 0.97859335 [4,] -0.1578556 -1.2637868 1.0794762 1.2505447 1.8171879 0.08943052 [5,] -0.6729393 -0.5765836 1.4119113 -1.7059318 -1.7840891 -1.09396556 [,19] [,20] [1,] 0.1761015 0.46929636 [2,] 0.8324063 -0.47479204 [3,] 2.6791461 -0.05712237 [4,] 0.3351238 0.11946531 [5,] -0.6329454 -2.20802112 > > > 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 : 564 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.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.388404 0.2763686 -1.278123 0.1287667 1.217624 -0.4321261 0.910368 col8 col9 col10 col11 col12 col13 col14 row1 0.08135961 0.004375409 0.2036532 -0.7321349 0.2825104 -0.3527626 -1.784664 col15 col16 col17 col18 col19 col20 row1 1.283165 1.128499 0.2603322 -1.180394 -1.038742 1.781276 > tmp[,"col10"] col10 row1 0.2036532 row2 0.6077220 row3 0.3068620 row4 -1.9435150 row5 -0.4461250 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.388404 0.2763686 -1.2781226 0.12876673 1.217624 -0.4321261 0.910368 row5 -1.249005 1.7607734 -0.1865432 -0.05670666 -0.643881 1.0208669 -1.426843 col8 col9 col10 col11 col12 col13 row1 0.08135961 0.004375409 0.2036532 -0.7321349 0.2825104 -0.3527626 row5 -0.81747740 1.772719974 -0.4461250 -0.2195536 1.7525949 -0.9670679 col14 col15 col16 col17 col18 col19 col20 row1 -1.784664 1.2831652 1.1284987 0.2603322 -1.180394 -1.038742 1.7812759 row5 -1.084905 -0.8661024 0.3688208 -0.4721242 1.871891 1.937942 0.5023783 > tmp[,c("col6","col20")] col6 col20 row1 -0.4321261 1.78127585 row2 1.1079100 -0.02729598 row3 0.8457424 0.91502087 row4 -0.6457624 1.43778924 row5 1.0208669 0.50237832 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.4321261 1.7812759 row5 1.0208669 0.5023783 > > > > > 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.08691 50.50877 48.98862 50.62208 48.25138 104.7142 47.91869 49.29067 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.83367 49.83599 51.0895 50.94434 49.78575 50.6222 48.48731 49.61552 col17 col18 col19 col20 row1 48.82497 49.51269 50.34616 104.7387 > tmp[,"col10"] col10 row1 49.83599 row2 30.85044 row3 29.89376 row4 28.39330 row5 47.74019 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.08691 50.50877 48.98862 50.62208 48.25138 104.7142 47.91869 49.29067 row5 51.30614 49.74859 49.34946 50.49902 49.10676 106.3405 49.90199 48.97493 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.83367 49.83599 51.08950 50.94434 49.78575 50.62220 48.48731 49.61552 row5 51.57485 47.74019 50.70413 49.97258 50.31972 50.24833 50.18461 49.73942 col17 col18 col19 col20 row1 48.82497 49.51269 50.34616 104.7387 row5 49.44197 50.04563 49.13219 105.3623 > tmp[,c("col6","col20")] col6 col20 row1 104.71421 104.73875 row2 75.43753 74.13651 row3 74.75513 75.68115 row4 74.08829 74.98927 row5 106.34052 105.36233 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.7142 104.7387 row5 106.3405 105.3623 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.7142 104.7387 row5 106.3405 105.3623 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.3559829 [2,] -0.2105255 [3,] -1.1842620 [4,] -0.6878517 [5,] 1.0584365 > tmp[,c("col17","col7")] col17 col7 [1,] 1.5144747 -0.3572982 [2,] -0.4027928 -0.3922814 [3,] 0.6462130 0.5348674 [4,] -0.4347805 2.1950799 [5,] 2.3798951 -0.7232884 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -1.1148002 2.81436111 [2,] 1.4846986 -1.27954619 [3,] 1.4300630 -0.01657014 [4,] 0.5751171 0.48900545 [5,] 0.5957811 -2.22732579 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -1.1148 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -1.114800 [2,] 1.484699 > > > > 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.7105055 -0.7407201 -1.156271 0.9320333 0.9714378 0.450581 0.14203206 row1 1.0765675 -0.7433616 -1.157299 -0.5962134 -0.3138192 -1.022392 0.07724698 [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.2816581 0.1643019 0.2887525 0.4793590 -0.1875278 -0.003177991 row1 0.9279722 -0.5952803 1.1027899 0.2809305 -1.7134539 -0.048535466 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 -1.5949792 -0.1182517 0.02523529 1.6157356 0.6558531 -0.7235517 1.6923240 row1 0.4656267 0.6113939 0.91628731 0.8922558 1.3254446 -0.7658252 0.9428104 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 1.45607 -0.392412 0.8948298 -0.01213743 0.4726196 0.5071052 -0.06157858 [,8] [,9] [,10] row2 -1.191681 -0.1317292 -2.417661 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.1391963 0.7708621 0.9382006 -1.021585 1.147595 0.627992 -0.3490162 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.8027836 0.7119887 -0.05761635 -0.6374494 1.271112 0.9104676 0.19382 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.01493296 -1.174938 -0.1949544 -0.6757222 -0.6549378 -0.3733915 > > > 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: 0x29d6e970> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2673645cb3a89c" [2] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM267364473749a3" [3] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2673641e8a4551" [4] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2673646a708033" [5] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2673645334bc11" [6] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2673646579dd40" [7] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2673647dc34edd" [8] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM26736420922d24" [9] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM26736446978f2" [10] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2673642f35e06" [11] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2673644b15d827" [12] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM26736446720bc4" [13] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM26736418e78e6c" [14] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM26736443583fad" [15] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM26736431827daf" > > > ### 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: 0x2bc728b0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x2bc728b0> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x2bc728b0> > rowMedians(tmp) [1] -0.152775595 -0.344066427 0.061268845 0.337488122 0.126611676 [6] 0.062441782 -0.222576296 0.216456682 -0.288749377 -0.349598500 [11] 0.701452722 0.059305603 -0.914931171 0.528769860 -0.041720084 [16] 0.281068353 0.079557284 -0.080791133 -0.013676783 0.195822242 [21] -0.005986501 -0.554751936 -0.079181232 -0.071659094 0.180832682 [26] 0.333773496 -0.390650489 -0.482225990 0.033660362 0.147027748 [31] -0.227550744 -0.335683704 0.066982446 -0.382601395 0.852054825 [36] 0.332798663 0.246474420 -0.733279233 0.034466842 -0.299233327 [41] -0.052598578 0.090873685 0.202711929 -0.110290886 -0.027177146 [46] -0.626174957 0.104446656 0.677653358 -0.258130323 -0.671238157 [51] 0.080026940 0.143429336 -0.327143994 0.121309948 -0.506175738 [56] 0.035474167 -0.063228652 -0.139793446 -0.027505271 -0.666321837 [61] 0.117197432 0.446471331 0.022986471 0.147075790 -0.074948527 [66] -0.107504609 -0.076864598 -0.461441639 0.422199445 -0.185029090 [71] -0.341659262 0.451930247 0.061149357 0.016008471 -0.343390076 [76] -0.258536372 -0.458236015 -0.090923290 0.417710006 -0.491602751 [81] -0.049930464 -0.408998455 -0.433255686 0.335290122 -0.476359394 [86] 0.161356275 -0.351329564 0.280013612 -0.420894295 0.793684575 [91] 0.100834299 0.207852978 -0.129906844 -0.097065311 -0.129178864 [96] -0.112220160 -0.254848018 0.108031470 -0.310843444 -0.518603271 [101] 0.377647447 0.051580706 0.195540993 0.132757805 0.385576951 [106] -0.117324975 -0.654241458 0.440495168 -0.156517871 -0.269559874 [111] -0.086137813 -0.205108199 -0.623413123 0.151286538 0.461942560 [116] 0.310166498 0.311555087 0.352018137 -0.497730523 0.366331199 [121] -0.465926159 0.263590319 0.609760181 0.163264283 -0.250725126 [126] -0.192325246 0.745819128 -0.032284173 0.277213368 -0.076308616 [131] 0.343955320 0.042032760 0.188329180 0.195137599 0.638838012 [136] -0.060998862 0.005481243 -0.548921066 0.129533313 -0.161068913 [141] 0.241958657 0.158923995 -0.448754660 -0.209967612 0.131685402 [146] 0.322942821 -0.038298533 0.118049601 0.390896424 0.313804724 [151] -0.165897910 0.177933041 0.282321656 0.221062507 -0.111665845 [156] -0.142509750 0.126814331 0.011502011 -0.238816395 -0.048336996 [161] -0.356738706 0.159555670 -0.233327312 -0.552809253 -0.119963039 [166] -0.211715332 0.812463033 -0.025813434 -0.085631455 0.511905288 [171] 0.098433791 -0.323051673 0.790508859 0.086121101 0.533875192 [176] -0.032950296 0.644167786 0.192052686 -0.145666348 -0.490984092 [181] -0.631955086 0.624177615 -0.332122977 -0.121573842 0.260367824 [186] -0.505874552 -0.326926763 -0.437289141 0.054264529 0.518245142 [191] -0.302694063 0.273893912 -0.097056849 0.359443209 -0.220456419 [196] 0.387928380 0.233362183 0.634375145 -0.113569747 0.608463408 [201] -0.032865287 0.543735610 -0.030099987 -0.002240240 0.352737582 [206] 0.183269228 -0.206711198 -0.244270843 0.029933851 0.159446097 [211] 0.230456031 0.021336828 0.227236810 0.527936729 0.023480423 [216] -0.255381123 -0.046392589 -0.103932077 0.198077410 0.476924587 [221] -0.023247100 -0.459060069 0.139348696 0.143223372 0.276516548 [226] 0.212168047 -0.069897872 0.556313094 -0.535934258 0.253217992 > > proc.time() user system elapsed 1.814 0.840 2.675
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: 0x288632e0> > .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: 0x288632e0> > .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: 0x288632e0> > .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: 0x288632e0> > 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: 0x291dded0> > .Call("R_bm_AddColumn",P) <pointer: 0x291dded0> > .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: 0x291dded0> > .Call("R_bm_AddColumn",P) <pointer: 0x291dded0> > .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: 0x291dded0> > 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: 0x28abdb40> > .Call("R_bm_AddColumn",P) <pointer: 0x28abdb40> > .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: 0x28abdb40> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x28abdb40> > .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: 0x28abdb40> > > .Call("R_bm_RowMode",P) <pointer: 0x28abdb40> > .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: 0x28abdb40> > > .Call("R_bm_ColMode",P) <pointer: 0x28abdb40> > .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: 0x28abdb40> > 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: 0x294fbd90> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x294fbd90> > .Call("R_bm_AddColumn",P) <pointer: 0x294fbd90> > .Call("R_bm_AddColumn",P) <pointer: 0x294fbd90> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile2673e6416095e8" "BufferedMatrixFile2673e666f829e6" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile2673e6416095e8" "BufferedMatrixFile2673e666f829e6" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x2ad119a0> > .Call("R_bm_AddColumn",P) <pointer: 0x2ad119a0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x2ad119a0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x2ad119a0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x2ad119a0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x2ad119a0> > .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: 0x2ad13fb0> > .Call("R_bm_AddColumn",P) <pointer: 0x2ad13fb0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x2ad13fb0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x2ad13fb0> > 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: 0x2afc1670> > .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: 0x2afc1670> > rm(P) > > proc.time() user system elapsed 0.305 0.045 0.336
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.309 0.035 0.331