Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2025-03-24 12:04 -0400 (Mon, 24 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" | 4763 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.3 (2025-02-28 ucrt) -- "Trophy Case" | 4494 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4521 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4448 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4414 |
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. |
Package: BufferedMatrix |
Version: 1.70.0 |
Command: /home/biocbuild/bbs-3.20-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.20-bioc/R/site-library --timings BufferedMatrix_1.70.0.tar.gz |
StartedAt: 2025-03-20 20:22:38 -0400 (Thu, 20 Mar 2025) |
EndedAt: 2025-03-20 20:23:01 -0400 (Thu, 20 Mar 2025) |
EllapsedTime: 23.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.20-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.20-bioc/R/site-library --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: x86_64-pc-linux-gnu * R was compiled by gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 * running under: Ubuntu 24.04.2 LTS * using session charset: UTF-8 * 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: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.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 re-building of vignette outputs ... OK * 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/bbs-3.20-bioc/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/bbs-3.20-bioc/R/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’ gcc -I"/home/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"/home/biocbuild/bbs-3.20-bioc/R/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){ | ^~~~~~~~~~~ gcc -I"/home/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"/home/biocbuild/bbs-3.20-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -c init_package.c -o init_package.o gcc -shared -L/home/biocbuild/bbs-3.20-bioc/R/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/bbs-3.20-bioc/R/lib -lR installing to /home/biocbuild/bbs-3.20-bioc/R/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: x86_64-pc-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.252 0.051 0.288
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: x86_64-pc-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 1024775 54.8 643431 34.4 Vcells 871539 6.7 8388608 64.0 2046620 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] "Thu Mar 20 20:22:53 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] "Thu Mar 20 20:22:53 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: 0x58dafecdc130> > > > > 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] "Thu Mar 20 20:22:53 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] "Thu Mar 20 20:22:53 2025" > > ColMode(tmp2) <pointer: 0x58dafecdc130> > > > > ### 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,] 101.4024249 0.6184046 -0.2456499 1.8721076 [2,] -0.1743345 1.4967166 -0.4767653 -1.1408904 [3,] -0.2661480 -0.9671639 -0.7193364 0.1523474 [4,] 0.1432292 -0.3212688 0.1176398 -1.3590444 > 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,] 101.4024249 0.6184046 0.2456499 1.8721076 [2,] 0.1743345 1.4967166 0.4767653 1.1408904 [3,] 0.2661480 0.9671639 0.7193364 0.1523474 [4,] 0.1432292 0.3212688 0.1176398 1.3590444 > 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.0698771 0.7863871 0.4956309 1.3682498 [2,] 0.4175338 1.2234037 0.6904819 1.0681247 [3,] 0.5158954 0.9834449 0.8481370 0.3903171 [4,] 0.3784563 0.5668057 0.3429865 1.1657806 > > 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,] 227.10120 33.48228 30.20196 40.55461 [2,] 29.34967 38.73075 32.38158 36.82214 [3,] 30.42510 35.80161 34.20071 29.05552 [4,] 28.92779 30.98933 28.54751 38.01685 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x58dafc76a4a0> > exp(tmp5) <pointer: 0x58dafc76a4a0> > log(tmp5,2) <pointer: 0x58dafc76a4a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 472.6814 > Min(tmp5) [1] 54.40001 > mean(tmp5) [1] 73.97977 > Sum(tmp5) [1] 14795.95 > Var(tmp5) [1] 870.2294 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.26535 74.34071 72.07804 71.88159 71.63469 70.54475 72.14410 70.49956 [9] 71.75789 73.65100 > rowSums(tmp5) [1] 1825.307 1486.814 1441.561 1437.632 1432.694 1410.895 1442.882 1409.991 [9] 1435.158 1473.020 > rowVars(tmp5) [1] 8104.42399 70.91302 72.91426 99.31104 59.43555 71.85625 [7] 62.51338 61.19941 55.23459 93.79505 > rowSd(tmp5) [1] 90.024574 8.420987 8.538984 9.965493 7.709445 8.476807 7.906540 [8] 7.823005 7.431998 9.684784 > rowMax(tmp5) [1] 472.68138 86.24783 89.62853 90.52979 88.31350 81.84515 83.70063 [8] 82.62696 84.79093 89.02147 > rowMin(tmp5) [1] 62.55640 59.75091 57.41354 59.41789 57.76558 54.40001 55.69479 54.80519 [9] 59.07916 59.17824 > > colMeans(tmp5) [1] 109.11082 73.05870 67.56155 75.13823 72.41385 73.90150 72.75482 [8] 71.51720 66.21638 72.02633 74.17982 74.80108 70.40075 72.80605 [15] 72.70116 73.84434 74.12493 70.79899 75.08400 67.15488 > colSums(tmp5) [1] 1091.1082 730.5870 675.6155 751.3823 724.1385 739.0150 727.5482 [8] 715.1720 662.1638 720.2633 741.7982 748.0108 704.0075 728.0605 [15] 727.0116 738.4434 741.2493 707.9899 750.8400 671.5488 > colVars(tmp5) [1] 16416.03155 36.24472 43.31029 94.99223 43.89278 126.10525 [7] 94.67395 37.84777 24.55746 47.79259 69.18152 138.93383 [13] 35.70195 60.57976 39.94935 82.62468 35.12840 79.01181 [19] 102.98408 47.55461 > colSd(tmp5) [1] 128.125062 6.020359 6.581056 9.746396 6.625163 11.229659 [7] 9.730054 6.152054 4.955548 6.913218 8.317543 11.787020 [13] 5.975111 7.783300 6.320550 9.089812 5.926921 8.888859 [19] 10.148107 6.895985 > colMax(tmp5) [1] 472.68138 82.19463 80.83525 88.31350 80.81872 89.99449 84.56988 [8] 80.58338 72.82696 89.02147 83.70063 88.87557 79.60110 83.50493 [15] 81.68959 88.70924 82.85661 81.70303 90.52979 80.67522 > colMin(tmp5) [1] 55.76359 64.50022 59.01236 59.63716 59.17824 58.13299 58.39881 61.23397 [9] 58.11158 63.68995 62.14330 54.40001 59.07916 62.35594 64.18650 55.69479 [17] 63.94954 57.41354 57.76558 54.80519 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] 91.26535 NA 72.07804 71.88159 71.63469 70.54475 72.14410 70.49956 [9] 71.75789 73.65100 > rowSums(tmp5) [1] 1825.307 NA 1441.561 1437.632 1432.694 1410.895 1442.882 1409.991 [9] 1435.158 1473.020 > rowVars(tmp5) [1] 8104.42399 69.94135 72.91426 99.31104 59.43555 71.85625 [7] 62.51338 61.19941 55.23459 93.79505 > rowSd(tmp5) [1] 90.024574 8.363094 8.538984 9.965493 7.709445 8.476807 7.906540 [8] 7.823005 7.431998 9.684784 > rowMax(tmp5) [1] 472.68138 NA 89.62853 90.52979 88.31350 81.84515 83.70063 [8] 82.62696 84.79093 89.02147 > rowMin(tmp5) [1] 62.55640 NA 57.41354 59.41789 57.76558 54.40001 55.69479 54.80519 [9] 59.07916 59.17824 > > colMeans(tmp5) [1] 109.11082 73.05870 67.56155 75.13823 72.41385 73.90150 72.75482 [8] 71.51720 66.21638 72.02633 74.17982 74.80108 70.40075 NA [15] 72.70116 73.84434 74.12493 70.79899 75.08400 67.15488 > colSums(tmp5) [1] 1091.1082 730.5870 675.6155 751.3823 724.1385 739.0150 727.5482 [8] 715.1720 662.1638 720.2633 741.7982 748.0108 704.0075 NA [15] 727.0116 738.4434 741.2493 707.9899 750.8400 671.5488 > colVars(tmp5) [1] 16416.03155 36.24472 43.31029 94.99223 43.89278 126.10525 [7] 94.67395 37.84777 24.55746 47.79259 69.18152 138.93383 [13] 35.70195 NA 39.94935 82.62468 35.12840 79.01181 [19] 102.98408 47.55461 > colSd(tmp5) [1] 128.125062 6.020359 6.581056 9.746396 6.625163 11.229659 [7] 9.730054 6.152054 4.955548 6.913218 8.317543 11.787020 [13] 5.975111 NA 6.320550 9.089812 5.926921 8.888859 [19] 10.148107 6.895985 > colMax(tmp5) [1] 472.68138 82.19463 80.83525 88.31350 80.81872 89.99449 84.56988 [8] 80.58338 72.82696 89.02147 83.70063 88.87557 79.60110 NA [15] 81.68959 88.70924 82.85661 81.70303 90.52979 80.67522 > colMin(tmp5) [1] 55.76359 64.50022 59.01236 59.63716 59.17824 58.13299 58.39881 61.23397 [9] 58.11158 63.68995 62.14330 54.40001 59.07916 NA 64.18650 55.69479 [17] 63.94954 57.41354 57.76558 54.80519 > > Max(tmp5,na.rm=TRUE) [1] 472.6814 > Min(tmp5,na.rm=TRUE) [1] 54.40001 > mean(tmp5,na.rm=TRUE) [1] 73.9319 > Sum(tmp5,na.rm=TRUE) [1] 14712.45 > Var(tmp5,na.rm=TRUE) [1] 874.1639 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.26535 73.85838 72.07804 71.88159 71.63469 70.54475 72.14410 70.49956 [9] 71.75789 73.65100 > rowSums(tmp5,na.rm=TRUE) [1] 1825.307 1403.309 1441.561 1437.632 1432.694 1410.895 1442.882 1409.991 [9] 1435.158 1473.020 > rowVars(tmp5,na.rm=TRUE) [1] 8104.42399 69.94135 72.91426 99.31104 59.43555 71.85625 [7] 62.51338 61.19941 55.23459 93.79505 > rowSd(tmp5,na.rm=TRUE) [1] 90.024574 8.363094 8.538984 9.965493 7.709445 8.476807 7.906540 [8] 7.823005 7.431998 9.684784 > rowMax(tmp5,na.rm=TRUE) [1] 472.68138 86.24783 89.62853 90.52979 88.31350 81.84515 83.70063 [8] 82.62696 84.79093 89.02147 > rowMin(tmp5,na.rm=TRUE) [1] 62.55640 59.75091 57.41354 59.41789 57.76558 54.40001 55.69479 54.80519 [9] 59.07916 59.17824 > > colMeans(tmp5,na.rm=TRUE) [1] 109.11082 73.05870 67.56155 75.13823 72.41385 73.90150 72.75482 [8] 71.51720 66.21638 72.02633 74.17982 74.80108 70.40075 71.61728 [15] 72.70116 73.84434 74.12493 70.79899 75.08400 67.15488 > colSums(tmp5,na.rm=TRUE) [1] 1091.1082 730.5870 675.6155 751.3823 724.1385 739.0150 727.5482 [8] 715.1720 662.1638 720.2633 741.7982 748.0108 704.0075 644.5555 [15] 727.0116 738.4434 741.2493 707.9899 750.8400 671.5488 > colVars(tmp5,na.rm=TRUE) [1] 16416.03155 36.24472 43.31029 94.99223 43.89278 126.10525 [7] 94.67395 37.84777 24.55746 47.79259 69.18152 138.93383 [13] 35.70195 52.25415 39.94935 82.62468 35.12840 79.01181 [19] 102.98408 47.55461 > colSd(tmp5,na.rm=TRUE) [1] 128.125062 6.020359 6.581056 9.746396 6.625163 11.229659 [7] 9.730054 6.152054 4.955548 6.913218 8.317543 11.787020 [13] 5.975111 7.228703 6.320550 9.089812 5.926921 8.888859 [19] 10.148107 6.895985 > colMax(tmp5,na.rm=TRUE) [1] 472.68138 82.19463 80.83525 88.31350 80.81872 89.99449 84.56988 [8] 80.58338 72.82696 89.02147 83.70063 88.87557 79.60110 82.62696 [15] 81.68959 88.70924 82.85661 81.70303 90.52979 80.67522 > colMin(tmp5,na.rm=TRUE) [1] 55.76359 64.50022 59.01236 59.63716 59.17824 58.13299 58.39881 61.23397 [9] 58.11158 63.68995 62.14330 54.40001 59.07916 62.35594 64.18650 55.69479 [17] 63.94954 57.41354 57.76558 54.80519 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.26535 NaN 72.07804 71.88159 71.63469 70.54475 72.14410 70.49956 [9] 71.75789 73.65100 > rowSums(tmp5,na.rm=TRUE) [1] 1825.307 0.000 1441.561 1437.632 1432.694 1410.895 1442.882 1409.991 [9] 1435.158 1473.020 > rowVars(tmp5,na.rm=TRUE) [1] 8104.42399 NA 72.91426 99.31104 59.43555 71.85625 [7] 62.51338 61.19941 55.23459 93.79505 > rowSd(tmp5,na.rm=TRUE) [1] 90.024574 NA 8.538984 9.965493 7.709445 8.476807 7.906540 [8] 7.823005 7.431998 9.684784 > rowMax(tmp5,na.rm=TRUE) [1] 472.68138 NA 89.62853 90.52979 88.31350 81.84515 83.70063 [8] 82.62696 84.79093 89.02147 > rowMin(tmp5,na.rm=TRUE) [1] 62.55640 NA 57.41354 59.41789 57.76558 54.40001 55.69479 54.80519 [9] 59.07916 59.17824 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 114.44675 72.21934 67.57972 74.97132 72.07033 75.47379 71.44204 [8] 70.63308 65.72220 71.76175 73.16011 76.44244 71.12662 NaN [15] 72.03784 73.70953 74.03857 69.58743 73.84358 66.90959 > colSums(tmp5,na.rm=TRUE) [1] 1030.0207 649.9741 608.2175 674.7419 648.6329 679.2641 642.9784 [8] 635.6977 591.4998 645.8557 658.4410 687.9820 640.1396 0.0000 [15] 648.3406 663.3858 666.3472 626.2868 664.5922 602.1863 > colVars(tmp5,na.rm=TRUE) [1] 18147.72441 32.84931 48.72037 106.55283 48.05177 114.05742 [7] 87.11992 33.78491 24.87967 52.97913 66.13143 125.99210 [13] 34.23721 NA 39.99317 92.74831 39.43554 72.37465 [19] 98.54722 52.82206 > colSd(tmp5,na.rm=TRUE) [1] 134.713490 5.731432 6.979998 10.322443 6.931938 10.679767 [7] 9.333805 5.812479 4.987952 7.278676 8.132123 11.224620 [13] 5.851257 NA 6.324015 9.630592 6.279773 8.507329 [19] 9.927095 7.267879 > colMax(tmp5,na.rm=TRUE) [1] 472.68138 82.19463 80.83525 88.31350 80.81872 89.99449 83.20044 [8] 80.58338 72.82696 89.02147 83.70063 88.87557 79.60110 -Inf [15] 81.68959 88.70924 82.85661 80.23904 90.52979 80.67522 > colMin(tmp5,na.rm=TRUE) [1] 55.76359 64.50022 59.01236 59.63716 59.17824 58.13299 58.39881 61.23397 [9] 58.11158 63.68995 62.14330 54.40001 59.07916 Inf 64.18650 55.69479 [17] 63.94954 57.41354 57.76558 54.80519 > > > > > 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] 161.1046 131.1795 181.7477 173.3956 207.8080 203.0356 256.8486 140.4261 [9] 144.4033 230.4650 > apply(copymatrix,1,var,na.rm=TRUE) [1] 161.1046 131.1795 181.7477 173.3956 207.8080 203.0356 256.8486 140.4261 [9] 144.4033 230.4650 > > > > 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.557954e-13 8.526513e-14 -5.684342e-14 -1.705303e-13 0.000000e+00 [6] 5.684342e-14 -3.979039e-13 -5.684342e-14 5.684342e-14 1.136868e-13 [11] -1.136868e-13 5.684342e-14 -1.705303e-13 -8.526513e-14 7.105427e-14 [16] 2.842171e-14 -5.684342e-14 -5.684342e-14 -1.136868e-13 1.705303e-13 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 5 10 10 8 1 2 3 2 7 20 4 8 5 12 7 1 5 17 6 7 6 8 3 15 3 17 10 11 6 9 1 1 3 16 1 11 1 12 8 8 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.97955 > Min(tmp) [1] -3.248262 > mean(tmp) [1] -0.03886949 > Sum(tmp) [1] -3.886949 > Var(tmp) [1] 1.103869 > > rowMeans(tmp) [1] -0.03886949 > rowSums(tmp) [1] -3.886949 > rowVars(tmp) [1] 1.103869 > rowSd(tmp) [1] 1.050652 > rowMax(tmp) [1] 2.97955 > rowMin(tmp) [1] -3.248262 > > colMeans(tmp) [1] 1.27646036 -1.52300705 -0.70132396 -1.75915520 0.02274242 1.95777670 [7] -1.38683613 2.61712580 -1.01174867 0.22033817 -1.58828835 -0.39044622 [13] -0.38369504 1.23247555 -1.17965052 0.26734862 -0.70217860 -1.47656869 [19] -0.10730931 -3.24826224 0.19377902 -1.13604273 -0.81065445 -0.78603446 [25] 1.13570582 0.64838421 -0.14189717 1.53765812 -0.59845455 1.14678325 [31] 0.17369103 -2.04616596 0.30061723 1.21886645 0.14779664 -1.28163094 [37] -1.24616955 0.17367234 -0.16968965 -0.50150351 -0.06757385 -0.21347367 [43] 0.92522920 1.81164526 -0.90337034 -0.41610735 -0.12267796 0.84519701 [49] 1.48734491 0.61295980 -0.90068484 0.12029110 0.37928650 0.05218981 [55] -0.64235593 0.19303320 -1.64211589 -1.06995773 0.34982011 0.85103343 [61] 0.93434938 -0.86991107 1.36752801 -0.95322732 -1.23613295 0.71534151 [67] 1.47880989 -0.98954164 -0.56097343 -1.12602708 0.70249247 0.23268277 [73] 0.40712359 0.27832425 0.19846282 -0.07467471 -0.07447632 0.76131583 [79] 0.96741298 1.47552058 -1.28425442 0.91592071 -1.40228499 -0.64145467 [85] -0.34309188 2.97955027 0.24756512 0.17130926 0.39602681 -0.31982701 [91] -0.62699242 -1.41639448 0.85302996 -0.07787338 0.59610751 0.62983344 [97] -0.43724845 0.59661328 -1.16987881 1.06777389 > colSums(tmp) [1] 1.27646036 -1.52300705 -0.70132396 -1.75915520 0.02274242 1.95777670 [7] -1.38683613 2.61712580 -1.01174867 0.22033817 -1.58828835 -0.39044622 [13] -0.38369504 1.23247555 -1.17965052 0.26734862 -0.70217860 -1.47656869 [19] -0.10730931 -3.24826224 0.19377902 -1.13604273 -0.81065445 -0.78603446 [25] 1.13570582 0.64838421 -0.14189717 1.53765812 -0.59845455 1.14678325 [31] 0.17369103 -2.04616596 0.30061723 1.21886645 0.14779664 -1.28163094 [37] -1.24616955 0.17367234 -0.16968965 -0.50150351 -0.06757385 -0.21347367 [43] 0.92522920 1.81164526 -0.90337034 -0.41610735 -0.12267796 0.84519701 [49] 1.48734491 0.61295980 -0.90068484 0.12029110 0.37928650 0.05218981 [55] -0.64235593 0.19303320 -1.64211589 -1.06995773 0.34982011 0.85103343 [61] 0.93434938 -0.86991107 1.36752801 -0.95322732 -1.23613295 0.71534151 [67] 1.47880989 -0.98954164 -0.56097343 -1.12602708 0.70249247 0.23268277 [73] 0.40712359 0.27832425 0.19846282 -0.07467471 -0.07447632 0.76131583 [79] 0.96741298 1.47552058 -1.28425442 0.91592071 -1.40228499 -0.64145467 [85] -0.34309188 2.97955027 0.24756512 0.17130926 0.39602681 -0.31982701 [91] -0.62699242 -1.41639448 0.85302996 -0.07787338 0.59610751 0.62983344 [97] -0.43724845 0.59661328 -1.16987881 1.06777389 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] 1.27646036 -1.52300705 -0.70132396 -1.75915520 0.02274242 1.95777670 [7] -1.38683613 2.61712580 -1.01174867 0.22033817 -1.58828835 -0.39044622 [13] -0.38369504 1.23247555 -1.17965052 0.26734862 -0.70217860 -1.47656869 [19] -0.10730931 -3.24826224 0.19377902 -1.13604273 -0.81065445 -0.78603446 [25] 1.13570582 0.64838421 -0.14189717 1.53765812 -0.59845455 1.14678325 [31] 0.17369103 -2.04616596 0.30061723 1.21886645 0.14779664 -1.28163094 [37] -1.24616955 0.17367234 -0.16968965 -0.50150351 -0.06757385 -0.21347367 [43] 0.92522920 1.81164526 -0.90337034 -0.41610735 -0.12267796 0.84519701 [49] 1.48734491 0.61295980 -0.90068484 0.12029110 0.37928650 0.05218981 [55] -0.64235593 0.19303320 -1.64211589 -1.06995773 0.34982011 0.85103343 [61] 0.93434938 -0.86991107 1.36752801 -0.95322732 -1.23613295 0.71534151 [67] 1.47880989 -0.98954164 -0.56097343 -1.12602708 0.70249247 0.23268277 [73] 0.40712359 0.27832425 0.19846282 -0.07467471 -0.07447632 0.76131583 [79] 0.96741298 1.47552058 -1.28425442 0.91592071 -1.40228499 -0.64145467 [85] -0.34309188 2.97955027 0.24756512 0.17130926 0.39602681 -0.31982701 [91] -0.62699242 -1.41639448 0.85302996 -0.07787338 0.59610751 0.62983344 [97] -0.43724845 0.59661328 -1.16987881 1.06777389 > colMin(tmp) [1] 1.27646036 -1.52300705 -0.70132396 -1.75915520 0.02274242 1.95777670 [7] -1.38683613 2.61712580 -1.01174867 0.22033817 -1.58828835 -0.39044622 [13] -0.38369504 1.23247555 -1.17965052 0.26734862 -0.70217860 -1.47656869 [19] -0.10730931 -3.24826224 0.19377902 -1.13604273 -0.81065445 -0.78603446 [25] 1.13570582 0.64838421 -0.14189717 1.53765812 -0.59845455 1.14678325 [31] 0.17369103 -2.04616596 0.30061723 1.21886645 0.14779664 -1.28163094 [37] -1.24616955 0.17367234 -0.16968965 -0.50150351 -0.06757385 -0.21347367 [43] 0.92522920 1.81164526 -0.90337034 -0.41610735 -0.12267796 0.84519701 [49] 1.48734491 0.61295980 -0.90068484 0.12029110 0.37928650 0.05218981 [55] -0.64235593 0.19303320 -1.64211589 -1.06995773 0.34982011 0.85103343 [61] 0.93434938 -0.86991107 1.36752801 -0.95322732 -1.23613295 0.71534151 [67] 1.47880989 -0.98954164 -0.56097343 -1.12602708 0.70249247 0.23268277 [73] 0.40712359 0.27832425 0.19846282 -0.07467471 -0.07447632 0.76131583 [79] 0.96741298 1.47552058 -1.28425442 0.91592071 -1.40228499 -0.64145467 [85] -0.34309188 2.97955027 0.24756512 0.17130926 0.39602681 -0.31982701 [91] -0.62699242 -1.41639448 0.85302996 -0.07787338 0.59610751 0.62983344 [97] -0.43724845 0.59661328 -1.16987881 1.06777389 > colMedians(tmp) [1] 1.27646036 -1.52300705 -0.70132396 -1.75915520 0.02274242 1.95777670 [7] -1.38683613 2.61712580 -1.01174867 0.22033817 -1.58828835 -0.39044622 [13] -0.38369504 1.23247555 -1.17965052 0.26734862 -0.70217860 -1.47656869 [19] -0.10730931 -3.24826224 0.19377902 -1.13604273 -0.81065445 -0.78603446 [25] 1.13570582 0.64838421 -0.14189717 1.53765812 -0.59845455 1.14678325 [31] 0.17369103 -2.04616596 0.30061723 1.21886645 0.14779664 -1.28163094 [37] -1.24616955 0.17367234 -0.16968965 -0.50150351 -0.06757385 -0.21347367 [43] 0.92522920 1.81164526 -0.90337034 -0.41610735 -0.12267796 0.84519701 [49] 1.48734491 0.61295980 -0.90068484 0.12029110 0.37928650 0.05218981 [55] -0.64235593 0.19303320 -1.64211589 -1.06995773 0.34982011 0.85103343 [61] 0.93434938 -0.86991107 1.36752801 -0.95322732 -1.23613295 0.71534151 [67] 1.47880989 -0.98954164 -0.56097343 -1.12602708 0.70249247 0.23268277 [73] 0.40712359 0.27832425 0.19846282 -0.07467471 -0.07447632 0.76131583 [79] 0.96741298 1.47552058 -1.28425442 0.91592071 -1.40228499 -0.64145467 [85] -0.34309188 2.97955027 0.24756512 0.17130926 0.39602681 -0.31982701 [91] -0.62699242 -1.41639448 0.85302996 -0.07787338 0.59610751 0.62983344 [97] -0.43724845 0.59661328 -1.16987881 1.06777389 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.27646 -1.523007 -0.701324 -1.759155 0.02274242 1.957777 -1.386836 [2,] 1.27646 -1.523007 -0.701324 -1.759155 0.02274242 1.957777 -1.386836 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 2.617126 -1.011749 0.2203382 -1.588288 -0.3904462 -0.383695 1.232476 [2,] 2.617126 -1.011749 0.2203382 -1.588288 -0.3904462 -0.383695 1.232476 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -1.179651 0.2673486 -0.7021786 -1.476569 -0.1073093 -3.248262 0.193779 [2,] -1.179651 0.2673486 -0.7021786 -1.476569 -0.1073093 -3.248262 0.193779 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1.136043 -0.8106544 -0.7860345 1.135706 0.6483842 -0.1418972 1.537658 [2,] -1.136043 -0.8106544 -0.7860345 1.135706 0.6483842 -0.1418972 1.537658 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.5984546 1.146783 0.173691 -2.046166 0.3006172 1.218866 0.1477966 [2,] -0.5984546 1.146783 0.173691 -2.046166 0.3006172 1.218866 0.1477966 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.281631 -1.24617 0.1736723 -0.1696896 -0.5015035 -0.06757385 -0.2134737 [2,] -1.281631 -1.24617 0.1736723 -0.1696896 -0.5015035 -0.06757385 -0.2134737 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.9252292 1.811645 -0.9033703 -0.4161073 -0.122678 0.845197 1.487345 [2,] 0.9252292 1.811645 -0.9033703 -0.4161073 -0.122678 0.845197 1.487345 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.6129598 -0.9006848 0.1202911 0.3792865 0.05218981 -0.6423559 0.1930332 [2,] 0.6129598 -0.9006848 0.1202911 0.3792865 0.05218981 -0.6423559 0.1930332 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.642116 -1.069958 0.3498201 0.8510334 0.9343494 -0.8699111 1.367528 [2,] -1.642116 -1.069958 0.3498201 0.8510334 0.9343494 -0.8699111 1.367528 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.9532273 -1.236133 0.7153415 1.47881 -0.9895416 -0.5609734 -1.126027 [2,] -0.9532273 -1.236133 0.7153415 1.47881 -0.9895416 -0.5609734 -1.126027 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.7024925 0.2326828 0.4071236 0.2783243 0.1984628 -0.07467471 -0.07447632 [2,] 0.7024925 0.2326828 0.4071236 0.2783243 0.1984628 -0.07467471 -0.07447632 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.7613158 0.967413 1.475521 -1.284254 0.9159207 -1.402285 -0.6414547 [2,] 0.7613158 0.967413 1.475521 -1.284254 0.9159207 -1.402285 -0.6414547 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.3430919 2.97955 0.2475651 0.1713093 0.3960268 -0.319827 -0.6269924 [2,] -0.3430919 2.97955 0.2475651 0.1713093 0.3960268 -0.319827 -0.6269924 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.416394 0.85303 -0.07787338 0.5961075 0.6298334 -0.4372484 0.5966133 [2,] -1.416394 0.85303 -0.07787338 0.5961075 0.6298334 -0.4372484 0.5966133 [,99] [,100] [1,] -1.169879 1.067774 [2,] -1.169879 1.067774 > > > Max(tmp2) [1] 2.604603 > Min(tmp2) [1] -2.320413 > mean(tmp2) [1] -0.004080236 > Sum(tmp2) [1] -0.4080236 > Var(tmp2) [1] 1.070242 > > rowMeans(tmp2) [1] -0.50032900 -0.99772416 -0.47534381 -0.79094291 0.63508831 -1.37483282 [7] -0.14077998 -0.35002678 -0.12918034 1.69507615 -0.04126204 0.23029607 [13] 0.89945213 1.06380318 1.32974944 0.92990925 0.74032468 0.16144348 [19] -0.76859680 1.12943405 0.87777691 0.35943777 1.65767939 -0.68750012 [25] -0.04136546 -1.28733571 1.34636853 -2.32041268 -0.40135632 -0.27412554 [31] 0.06617192 0.16587724 0.11256942 0.47228267 0.44817380 -0.13193028 [37] 0.77115916 -0.54071860 1.38900100 1.72767344 0.77093286 -0.43421599 [43] -0.85560488 0.62362963 0.28732073 -0.81263757 0.58857812 -0.95925755 [49] 0.19248710 -0.60412320 1.31871620 2.18387899 -1.18115025 -1.03285826 [55] 0.74603194 -0.65342131 0.72209088 0.53302386 -0.44757669 -1.75079107 [61] -1.10880950 1.22108045 0.34045486 1.33569067 1.40481338 -1.84686423 [67] 0.23135482 -1.57216178 -2.11668867 -0.64233214 -1.16171260 1.29878234 [73] -0.24903040 0.24062794 -1.70549805 1.65108660 -0.16386033 -1.07494311 [79] 0.34083324 0.73378055 -1.99082833 -1.35428231 -0.32581253 -0.57402342 [85] 0.84436628 1.43014043 -0.70706024 -0.49267939 -0.11215225 0.80105998 [91] -0.06764354 -0.59002042 0.41663780 -0.06261114 1.11324240 -1.84776434 [97] -0.42159380 -0.96947453 -1.44876977 2.60460326 > rowSums(tmp2) [1] -0.50032900 -0.99772416 -0.47534381 -0.79094291 0.63508831 -1.37483282 [7] -0.14077998 -0.35002678 -0.12918034 1.69507615 -0.04126204 0.23029607 [13] 0.89945213 1.06380318 1.32974944 0.92990925 0.74032468 0.16144348 [19] -0.76859680 1.12943405 0.87777691 0.35943777 1.65767939 -0.68750012 [25] -0.04136546 -1.28733571 1.34636853 -2.32041268 -0.40135632 -0.27412554 [31] 0.06617192 0.16587724 0.11256942 0.47228267 0.44817380 -0.13193028 [37] 0.77115916 -0.54071860 1.38900100 1.72767344 0.77093286 -0.43421599 [43] -0.85560488 0.62362963 0.28732073 -0.81263757 0.58857812 -0.95925755 [49] 0.19248710 -0.60412320 1.31871620 2.18387899 -1.18115025 -1.03285826 [55] 0.74603194 -0.65342131 0.72209088 0.53302386 -0.44757669 -1.75079107 [61] -1.10880950 1.22108045 0.34045486 1.33569067 1.40481338 -1.84686423 [67] 0.23135482 -1.57216178 -2.11668867 -0.64233214 -1.16171260 1.29878234 [73] -0.24903040 0.24062794 -1.70549805 1.65108660 -0.16386033 -1.07494311 [79] 0.34083324 0.73378055 -1.99082833 -1.35428231 -0.32581253 -0.57402342 [85] 0.84436628 1.43014043 -0.70706024 -0.49267939 -0.11215225 0.80105998 [91] -0.06764354 -0.59002042 0.41663780 -0.06261114 1.11324240 -1.84776434 [97] -0.42159380 -0.96947453 -1.44876977 2.60460326 > 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.50032900 -0.99772416 -0.47534381 -0.79094291 0.63508831 -1.37483282 [7] -0.14077998 -0.35002678 -0.12918034 1.69507615 -0.04126204 0.23029607 [13] 0.89945213 1.06380318 1.32974944 0.92990925 0.74032468 0.16144348 [19] -0.76859680 1.12943405 0.87777691 0.35943777 1.65767939 -0.68750012 [25] -0.04136546 -1.28733571 1.34636853 -2.32041268 -0.40135632 -0.27412554 [31] 0.06617192 0.16587724 0.11256942 0.47228267 0.44817380 -0.13193028 [37] 0.77115916 -0.54071860 1.38900100 1.72767344 0.77093286 -0.43421599 [43] -0.85560488 0.62362963 0.28732073 -0.81263757 0.58857812 -0.95925755 [49] 0.19248710 -0.60412320 1.31871620 2.18387899 -1.18115025 -1.03285826 [55] 0.74603194 -0.65342131 0.72209088 0.53302386 -0.44757669 -1.75079107 [61] -1.10880950 1.22108045 0.34045486 1.33569067 1.40481338 -1.84686423 [67] 0.23135482 -1.57216178 -2.11668867 -0.64233214 -1.16171260 1.29878234 [73] -0.24903040 0.24062794 -1.70549805 1.65108660 -0.16386033 -1.07494311 [79] 0.34083324 0.73378055 -1.99082833 -1.35428231 -0.32581253 -0.57402342 [85] 0.84436628 1.43014043 -0.70706024 -0.49267939 -0.11215225 0.80105998 [91] -0.06764354 -0.59002042 0.41663780 -0.06261114 1.11324240 -1.84776434 [97] -0.42159380 -0.96947453 -1.44876977 2.60460326 > rowMin(tmp2) [1] -0.50032900 -0.99772416 -0.47534381 -0.79094291 0.63508831 -1.37483282 [7] -0.14077998 -0.35002678 -0.12918034 1.69507615 -0.04126204 0.23029607 [13] 0.89945213 1.06380318 1.32974944 0.92990925 0.74032468 0.16144348 [19] -0.76859680 1.12943405 0.87777691 0.35943777 1.65767939 -0.68750012 [25] -0.04136546 -1.28733571 1.34636853 -2.32041268 -0.40135632 -0.27412554 [31] 0.06617192 0.16587724 0.11256942 0.47228267 0.44817380 -0.13193028 [37] 0.77115916 -0.54071860 1.38900100 1.72767344 0.77093286 -0.43421599 [43] -0.85560488 0.62362963 0.28732073 -0.81263757 0.58857812 -0.95925755 [49] 0.19248710 -0.60412320 1.31871620 2.18387899 -1.18115025 -1.03285826 [55] 0.74603194 -0.65342131 0.72209088 0.53302386 -0.44757669 -1.75079107 [61] -1.10880950 1.22108045 0.34045486 1.33569067 1.40481338 -1.84686423 [67] 0.23135482 -1.57216178 -2.11668867 -0.64233214 -1.16171260 1.29878234 [73] -0.24903040 0.24062794 -1.70549805 1.65108660 -0.16386033 -1.07494311 [79] 0.34083324 0.73378055 -1.99082833 -1.35428231 -0.32581253 -0.57402342 [85] 0.84436628 1.43014043 -0.70706024 -0.49267939 -0.11215225 0.80105998 [91] -0.06764354 -0.59002042 0.41663780 -0.06261114 1.11324240 -1.84776434 [97] -0.42159380 -0.96947453 -1.44876977 2.60460326 > > colMeans(tmp2) [1] -0.004080236 > colSums(tmp2) [1] -0.4080236 > colVars(tmp2) [1] 1.070242 > colSd(tmp2) [1] 1.034525 > colMax(tmp2) [1] 2.604603 > colMin(tmp2) [1] -2.320413 > colMedians(tmp2) [1] -0.0519883 > colRanges(tmp2) [,1] [1,] -2.320413 [2,] 2.604603 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] -0.7049915 -3.6104711 -0.9023345 -4.9203907 1.3821670 0.7690596 [7] 4.6965133 0.8312070 2.8183145 -3.2869850 > colApply(tmp,quantile)[,1] [,1] [1,] -1.1095388 [2,] -0.5686627 [3,] -0.2196240 [4,] 0.5548487 [5,] 0.9470987 > > rowApply(tmp,sum) [1] 1.06132710 -2.69164027 4.20225338 -0.86596367 0.48813685 1.28322304 [7] -1.94078386 -3.62954272 -0.80941024 -0.02551109 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 8 5 2 9 4 2 2 4 9 8 [2,] 5 2 4 1 3 8 1 6 10 2 [3,] 10 6 5 7 6 1 3 2 4 3 [4,] 1 7 6 3 1 3 6 1 1 10 [5,] 6 10 1 8 8 4 8 7 8 5 [6,] 3 8 9 6 5 10 5 5 3 7 [7,] 4 9 8 10 10 7 4 3 7 6 [8,] 9 3 3 4 9 9 7 9 2 4 [9,] 7 1 10 5 7 6 10 8 6 9 [10,] 2 4 7 2 2 5 9 10 5 1 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.5518154 -0.7245882 -3.0343544 4.3603304 2.2902335 -2.2127700 [7] -2.1513910 1.9672460 -1.1103008 -2.3036491 0.9639332 3.1519983 [13] 2.2008873 -3.8238538 -0.7261663 -1.7122850 -1.6720756 1.2055909 [19] 0.5989486 -0.3362905 > colApply(tmp,quantile)[,1] [,1] [1,] -1.2325685 [2,] -1.0263392 [3,] -0.3334461 [4,] 0.2117560 [5,] 1.8287823 > > rowApply(tmp,sum) [1] 0.09209071 0.69245198 -7.24254135 -0.48236887 3.31999560 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 7 11 7 5 19 [2,] 3 8 18 17 2 [3,] 1 14 8 15 6 [4,] 14 10 14 20 15 [5,] 15 18 3 18 7 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.3334461 -1.0243650 -3.3142064 0.6377259 0.6587383 1.00747882 [2,] 0.2117560 -0.2737819 0.3671820 0.1652275 1.3115975 0.04524659 [3,] -1.0263392 0.7556601 -0.8293461 0.1317669 -1.5961933 -0.15717267 [4,] -1.2325685 1.3772784 1.2211624 2.2698983 2.1038040 -1.82872141 [5,] 1.8287823 -1.5593798 -0.4791463 1.1557119 -0.1877129 -1.27960135 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.1119995 0.06041819 -2.1026466 2.12913981 0.3569627 0.26624904 [2,] -0.5371770 1.16253972 0.5456939 -2.09316150 1.4528104 -0.34476243 [3,] -1.4755103 -1.08594926 0.2896056 -2.20465887 -0.7497400 0.07669025 [4,] -1.5459749 0.33079325 1.3190138 0.04702008 -0.5000219 2.17112651 [5,] 1.2952716 1.49944413 -1.1619675 -0.18198863 0.4039220 0.98269494 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.58843397 -0.2173725 -0.5738437 0.8550938 -0.6353703 1.4646773 [2,] 0.31992377 -2.1299967 -0.9041760 0.3289849 -0.8386312 1.0259810 [3,] 2.62829843 -0.4007563 0.5035033 -0.3409858 -1.6994412 0.9084100 [4,] -1.38349292 -1.2509988 -1.1925792 -0.4561106 -0.7029195 -0.8331028 [5,] 0.04772405 0.1752703 1.4409293 -2.0992673 2.2042865 -1.3603746 [,19] [,20] [1,] -0.5271673 0.6835912 [2,] 1.6710560 -0.7938607 [3,] -1.4584869 0.4881039 [4,] 0.1357482 -0.5317232 [5,] 0.7777987 -0.1824017 > > > 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 : 653 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.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.7604268 -0.5254149 0.1193668 -0.3335275 -0.328818 -0.3343943 -0.7720888 col8 col9 col10 col11 col12 col13 col14 row1 0.9556274 1.587953 0.9754155 0.1440973 0.7717075 0.343512 -0.3995505 col15 col16 col17 col18 col19 col20 row1 -0.7209909 0.2802835 0.01647382 2.565912 -0.2801393 0.7215198 > tmp[,"col10"] col10 row1 0.97541550 row2 0.37000858 row3 0.80511349 row4 0.06691792 row5 0.76838727 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -0.7604268 -0.5254149 0.1193668 -0.3335275 -0.3288180 -0.3343943 row5 1.3441902 0.5483497 -1.6070640 0.5208896 0.5539493 1.2232528 col7 col8 col9 col10 col11 col12 col13 row1 -0.7720888 0.9556274 1.58795291 0.9754155 0.1440973 0.7717075 0.343512 row5 -1.5944642 -1.7638469 0.09764004 0.7683873 0.8001513 -3.6477834 -2.200601 col14 col15 col16 col17 col18 col19 row1 -0.39955052 -0.7209909 0.2802835 0.01647382 2.565912 -0.2801393 row5 0.09243842 1.4077689 -0.9109119 0.31154971 -2.391653 -0.5741390 col20 row1 0.7215198 row5 -0.5699671 > tmp[,c("col6","col20")] col6 col20 row1 -0.3343943 0.7215198 row2 -1.7902541 -0.5912647 row3 1.1775184 -0.2808172 row4 -0.2005608 0.4341108 row5 1.2232528 -0.5699671 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.3343943 0.7215198 row5 1.2232528 -0.5699671 > > > > > 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 51.88999 52.10267 50.40003 49.50656 50.69742 103.0325 50.16324 48.55863 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.05394 48.63081 50.07561 50.11227 49.6917 49.49714 51.54261 49.19819 col17 col18 col19 col20 row1 48.164 50.27957 48.99027 105.2639 > tmp[,"col10"] col10 row1 48.63081 row2 30.34529 row3 30.83798 row4 29.63217 row5 49.97674 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.88999 52.10267 50.40003 49.50656 50.69742 103.0325 50.16324 48.55863 row5 49.11205 49.87108 50.41707 50.11149 51.96624 105.0737 48.70102 52.30673 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.05394 48.63081 50.07561 50.11227 49.69170 49.49714 51.54261 49.19819 row5 48.79177 49.97674 47.82522 48.61824 49.08154 49.87862 50.19711 51.44983 col17 col18 col19 col20 row1 48.16400 50.27957 48.99027 105.2639 row5 49.16826 50.25476 49.88899 104.3531 > tmp[,c("col6","col20")] col6 col20 row1 103.03249 105.26395 row2 76.94146 73.12509 row3 74.15540 74.58227 row4 74.86703 74.29322 row5 105.07372 104.35305 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.0325 105.2639 row5 105.0737 104.3531 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.0325 105.2639 row5 105.0737 104.3531 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.18294913 [2,] -0.30559707 [3,] -0.08144419 [4,] -1.17405967 [5,] 0.63758713 > tmp[,c("col17","col7")] col17 col7 [1,] -0.08006385 -0.7922900 [2,] 0.17592955 0.9310302 [3,] 0.65605319 -1.0338814 [4,] -0.83254515 -0.4055685 [5,] 0.41742948 -0.1153736 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.84948567 0.85024562 [2,] 0.52483952 -0.44457656 [3,] -0.02930455 0.02600977 [4,] 0.29527489 -0.55309846 [5,] 1.31564544 -2.12699512 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.8494857 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.8494857 [2,] 0.5248395 > > > > 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.14736949 -0.1803818 0.77491392 -0.008087664 -0.5433359 -1.62131258 row1 0.02901329 1.4220664 0.03871897 0.203897346 -0.5577532 -0.05107417 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 0.1369221 -1.477670 -1.862731 0.9495379 -0.7091648 -1.417401 -0.7610865 row1 -0.5545442 1.150809 -1.268756 -0.7812482 0.7224347 -1.005015 1.3191290 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.75670441 -0.9968839 -0.2630297 0.5118839 -0.8416708 -0.1964798 row1 0.01227706 -0.2419746 -1.5145609 -0.1209920 -0.9857119 -0.5803671 [,20] row3 -0.1914954 row1 -0.3533422 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -1.715886 0.7166562 -2.149231 -1.574996 -0.3586995 0.4395004 -1.101098 [,8] [,9] [,10] row2 -2.05912 -0.4365726 -0.5392776 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 1.164516 -1.508749 1.709652 1.211008 0.0402433 -1.137978 0.2397576 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.05725403 0.3743767 0.5221032 -0.9615321 0.8929269 -0.1255475 0.523284 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.8369243 1.398722 0.4669878 0.09533278 0.877196 -0.006241601 > > > 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: 0x58dafe9e4630> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a107217b030b" [2] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a1077ee8da92" [3] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a10735b61c66" [4] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a1076b78534f" [5] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a1072f32443b" [6] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a1071270d2a1" [7] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a1077341592" [8] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a10730474124" [9] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a10735053803" [10] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a10741a404ab" [11] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a1076229cacb" [12] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a1071c5d70fc" [13] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a1077771a249" [14] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a1077783afa8" [15] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM12a1076fcff96" > > > ### 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: 0x58dafe597350> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x58dafe597350> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x58dafe597350> > rowMedians(tmp) [1] -0.076891815 -0.235729084 -0.047935820 -0.448844585 -0.202312014 [6] 0.720785719 -0.387016799 0.211613717 0.298588430 0.125286062 [11] 0.261125631 -0.040132308 0.376344502 0.133676256 0.011339344 [16] -0.154225841 -0.052798350 0.466670927 -0.024242386 0.291217487 [21] -0.308757440 0.070332507 0.206276273 -0.070336025 -0.099360986 [26] -0.063422572 -0.038239893 -0.120539348 0.287373092 0.599280380 [31] 0.032770570 0.459767246 -0.369436687 0.324471857 -0.216424587 [36] -0.080550201 0.337275761 -0.057776090 -0.107911034 -0.287472667 [41] 0.179420929 0.730771958 0.079368097 -0.092932421 0.173866868 [46] -0.373717751 0.533279984 0.186086245 0.366475457 0.279017361 [51] -0.338764409 -0.511979571 -0.159439797 0.047262371 -0.257455672 [56] 0.111497085 -0.157492673 -0.098384348 0.334548043 0.039073775 [61] 0.232813903 -0.327156429 0.038946752 0.801389459 -0.544738573 [66] 0.206553248 0.117562331 -0.475193052 -0.146234538 -0.200015706 [71] 0.386317110 0.286867777 -0.840459928 -0.340792801 -0.028595324 [76] 0.091104721 0.134690872 -0.107269938 0.036888061 -0.155228105 [81] 0.368246545 -0.262391165 0.144171896 -0.407632191 -0.117596987 [86] 0.019997077 0.340624486 0.198132705 0.243843522 -0.023371740 [91] 0.114797958 0.022324848 0.104816269 0.345943814 -0.002200741 [96] 0.210359424 0.239153219 0.523307820 0.042680718 -0.122499000 [101] 0.154100557 -0.144206263 0.062739963 0.247133781 0.035124199 [106] 0.250336478 -0.047167514 0.103085574 0.150204810 -0.647393953 [111] 0.401767798 -0.291197231 -0.106120276 0.430456778 -0.145361198 [116] 0.087177613 0.415606168 0.327788592 0.177229445 0.147506743 [121] -0.048871286 0.149760911 -0.046969493 0.170408954 -0.635139348 [126] 0.211783764 -0.165326044 -0.348835292 0.251300843 0.190351540 [131] -0.176761775 0.046325247 0.299672880 0.256716262 0.145952645 [136] -0.356670766 -0.161773613 0.005786178 -0.558988803 -0.020725236 [141] -0.323093541 -0.155826938 0.069868177 0.405927593 -0.187128592 [146] -0.679582850 -0.595359173 -0.653337812 0.240727003 0.231486036 [151] 0.127047631 -0.452153633 0.156167339 0.230158090 -0.337537425 [156] 0.119454773 -0.800260785 -0.078937441 -0.362474648 0.277461130 [161] -0.305497965 -0.353261208 0.524165160 -0.481928404 -0.612888799 [166] 0.497001037 0.364237522 0.227713688 -0.205935867 0.275033490 [171] 0.261918468 -0.090811687 0.028512961 -0.134543815 0.195215771 [176] 0.937860522 -0.499475861 0.324836114 -0.091006220 0.138092986 [181] 0.117491380 0.341158342 -0.246002681 -0.065918150 -0.432128045 [186] -0.165204524 -0.528882228 0.158109976 -0.440584575 0.217702394 [191] -0.569035698 -0.090182022 0.353796199 -0.150208137 -0.268959029 [196] 0.657725023 -0.406748991 -0.730969844 0.181337568 -0.106677086 [201] -0.040509927 0.064326097 -0.241444190 0.472465815 -0.026989207 [206] 0.059960180 0.167412224 0.163522856 0.329867176 0.273262251 [211] 0.568033698 -0.099243867 -0.042256383 -0.419846721 -0.098979266 [216] 0.005803352 0.247755009 0.176101300 -0.222178884 -0.019456393 [221] 0.744242482 -0.695185110 -0.058391488 -0.206379998 0.201369432 [226] -0.037819335 0.301391790 0.106711911 0.245893245 -0.161848563 > > proc.time() user system elapsed 1.278 0.661 1.927
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: x86_64-pc-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: 0x572514569130> > .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: 0x572514569130> > .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: 0x572514569130> > .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: 0x572514569130> > 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: 0x5725145b44e0> > .Call("R_bm_AddColumn",P) <pointer: 0x5725145b44e0> > .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: 0x5725145b44e0> > .Call("R_bm_AddColumn",P) <pointer: 0x5725145b44e0> > .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: 0x5725145b44e0> > 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: 0x57251292bfd0> > .Call("R_bm_AddColumn",P) <pointer: 0x57251292bfd0> > .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: 0x57251292bfd0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x57251292bfd0> > .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: 0x57251292bfd0> > > .Call("R_bm_RowMode",P) <pointer: 0x57251292bfd0> > .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: 0x57251292bfd0> > > .Call("R_bm_ColMode",P) <pointer: 0x57251292bfd0> > .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: 0x57251292bfd0> > 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: 0x572513f6ac20> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x572513f6ac20> > .Call("R_bm_AddColumn",P) <pointer: 0x572513f6ac20> > .Call("R_bm_AddColumn",P) <pointer: 0x572513f6ac20> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile12a3101ae6bef0" "BufferedMatrixFile12a310b0d963a" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile12a3101ae6bef0" "BufferedMatrixFile12a310b0d963a" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x572511d4cd60> > .Call("R_bm_AddColumn",P) <pointer: 0x572511d4cd60> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x572511d4cd60> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x572511d4cd60> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x572511d4cd60> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x572511d4cd60> > .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: 0x572512e106e0> > .Call("R_bm_AddColumn",P) <pointer: 0x572512e106e0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x572512e106e0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x572512e106e0> > 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: 0x572512ec9160> > .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: 0x572512ec9160> > rm(P) > > proc.time() user system elapsed 0.250 0.044 0.283
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: x86_64-pc-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.236 0.052 0.272