Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-03-21 11:40 -0400 (Fri, 21 Mar 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | R Under development (unstable) (2025-03-13 r87965) -- "Unsuffered Consequences" | 4777 |
palomino7 | Windows Server 2022 Datacenter | x64 | R Under development (unstable) (2025-03-01 r87860 ucrt) -- "Unsuffered Consequences" | 4545 |
lconway | macOS 12.7.1 Monterey | x86_64 | R Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" | 4576 |
kjohnson3 | macOS 13.7.1 Ventura | arm64 | R Under development (unstable) (2025-03-02 r87868) -- "Unsuffered Consequences" | 4528 |
kunpeng2 | Linux (openEuler 24.03 LTS) | aarch64 | R Under development (unstable) (2025-02-19 r87757) -- "Unsuffered Consequences" | 4458 |
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 249/2313 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.71.1 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino7 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.7.1 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kunpeng2 | 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.71.1 |
Command: /home/biocbuild/bbs-3.21-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.21-bioc/R/site-library --timings BufferedMatrix_1.71.1.tar.gz |
StartedAt: 2025-03-20 20:27:50 -0400 (Thu, 20 Mar 2025) |
EndedAt: 2025-03-20 20:28:15 -0400 (Thu, 20 Mar 2025) |
EllapsedTime: 25.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.21-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.21-bioc/R/site-library --timings BufferedMatrix_1.71.1.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck’ * using R Under development (unstable) (2025-03-13 r87965) * 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.71.1’ * 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.21-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.21-bioc/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/bbs-3.21-bioc/R/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** this is package ‘BufferedMatrix’ version ‘1.71.1’ ** using staged installation ** libs using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’ gcc -std=gnu2x -I"/home/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -std=gnu2x -I"/home/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function ‘dbm_ReadOnlyMode’: doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ doubleBufferedMatrix.c: At top level: doubleBufferedMatrix.c:3327:12: warning: ‘sort_double’ defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ gcc -std=gnu2x -I"/home/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -std=gnu2x -I"/home/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -Werror=format-security -c init_package.c -o init_package.o gcc -std=gnu2x -shared -L/home/biocbuild/bbs-3.21-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.21-bioc/R/lib -lR installing to /home/biocbuild/bbs-3.21-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 Under development (unstable) (2025-03-13 r87965) -- "Unsuffered Consequences" 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.235 0.054 0.275
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2025-03-13 r87965) -- "Unsuffered Consequences" 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.21-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 477857 25.6 1045514 55.9 639582 34.2 Vcells 884348 6.8 8388608 64.0 2081263 15.9 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Thu Mar 20 20:28:05 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:28:05 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: 0x5d6906c575e0> > > > > 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:28:06 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:28:06 2025" > > ColMode(tmp2) <pointer: 0x5d6906c575e0> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.8413563 -0.2304007 1.5534375 0.6391734 [2,] 1.9643816 0.1253614 0.2973677 -2.8118881 [3,] -0.3610790 -0.2785768 0.8215645 -1.3620550 [4,] 0.4737786 -0.7378443 1.6408699 0.4250215 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.8413563 0.2304007 1.5534375 0.6391734 [2,] 1.9643816 0.1253614 0.2973677 2.8118881 [3,] 0.3610790 0.2785768 0.8215645 1.3620550 [4,] 0.4737786 0.7378443 1.6408699 0.4250215 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9920647 0.4800007 1.2463697 0.7994832 [2,] 1.4015640 0.3540642 0.5453144 1.6768685 [3,] 0.6008985 0.5278037 0.9064020 1.1670711 [4,] 0.6883158 0.8589787 1.2809644 0.6519368 > > 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.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.76200 30.03041 39.01714 33.63401 [2,] 40.98002 28.66600 30.75051 44.58057 [3,] 31.37006 30.55661 34.88558 38.03277 [4,] 32.35694 34.32763 39.45051 31.94439 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x5d6907e512d0> > exp(tmp5) <pointer: 0x5d6907e512d0> > log(tmp5,2) <pointer: 0x5d6907e512d0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 467.8127 > Min(tmp5) [1] 52.71676 > mean(tmp5) [1] 73.63985 > Sum(tmp5) [1] 14727.97 > Var(tmp5) [1] 860.6487 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 92.63533 72.52104 71.93442 70.26890 73.02065 74.12522 68.06865 70.23292 [9] 70.91811 72.67328 > rowSums(tmp5) [1] 1852.707 1450.421 1438.688 1405.378 1460.413 1482.504 1361.373 1404.658 [9] 1418.362 1453.466 > rowVars(tmp5) [1] 7862.65259 106.07914 65.78322 94.45268 70.83597 81.02505 [7] 60.77506 82.84145 74.34784 64.88732 > rowSd(tmp5) [1] 88.671600 10.299473 8.110685 9.718677 8.416411 9.001392 7.795836 [8] 9.101728 8.622519 8.055267 > rowMax(tmp5) [1] 467.81266 92.78862 88.69813 87.07128 85.54250 90.25277 87.18844 [8] 85.90446 87.54194 92.83434 > rowMin(tmp5) [1] 58.66736 55.64949 58.94349 52.71676 54.98229 57.99338 55.99136 54.50704 [9] 56.03570 59.21383 > > colMeans(tmp5) [1] 111.47082 67.71463 71.43205 73.85700 71.66035 73.45449 75.14724 [8] 69.93527 72.36077 74.10586 71.56342 73.44173 73.00189 73.97869 [15] 69.40526 68.55686 70.38246 69.50360 72.51084 69.31379 > colSums(tmp5) [1] 1114.7082 677.1463 714.3205 738.5700 716.6035 734.5449 751.4724 [8] 699.3527 723.6077 741.0586 715.6342 734.4173 730.0189 739.7869 [15] 694.0526 685.5686 703.8246 695.0360 725.1084 693.1379 > colVars(tmp5) [1] 15715.65779 56.07670 67.24493 89.06954 75.12396 60.09749 [7] 93.35492 55.68473 83.46664 100.56694 88.32237 83.97934 [13] 170.72859 65.18804 43.71927 48.30292 129.48939 116.45691 [19] 51.72939 69.67948 > colSd(tmp5) [1] 125.362107 7.488438 8.200301 9.437666 8.667408 7.752257 [7] 9.662035 7.462220 9.136008 10.028307 9.397998 9.164024 [13] 13.066315 8.073911 6.612055 6.950030 11.379341 10.791520 [19] 7.192315 8.347423 > colMax(tmp5) [1] 467.81266 79.52286 83.73980 92.78862 85.54250 83.29158 88.69813 [8] 80.38318 87.07128 85.88471 87.54194 85.66930 92.83434 86.41628 [15] 77.43317 80.32503 86.76530 90.25277 88.19685 86.42436 > colMin(tmp5) [1] 64.21312 57.99338 60.47612 61.35341 58.94349 63.69612 60.94426 60.16002 [9] 57.20020 56.03570 55.99136 58.78441 54.98229 61.89623 58.66736 58.32928 [17] 52.71676 55.64949 60.83841 54.50704 > > > ### 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] 92.63533 72.52104 71.93442 70.26890 73.02065 74.12522 68.06865 70.23292 [9] 70.91811 NA > rowSums(tmp5) [1] 1852.707 1450.421 1438.688 1405.378 1460.413 1482.504 1361.373 1404.658 [9] 1418.362 NA > rowVars(tmp5) [1] 7862.65259 106.07914 65.78322 94.45268 70.83597 81.02505 [7] 60.77506 82.84145 74.34784 57.89821 > rowSd(tmp5) [1] 88.671600 10.299473 8.110685 9.718677 8.416411 9.001392 7.795836 [8] 9.101728 8.622519 7.609088 > rowMax(tmp5) [1] 467.81266 92.78862 88.69813 87.07128 85.54250 90.25277 87.18844 [8] 85.90446 87.54194 NA > rowMin(tmp5) [1] 58.66736 55.64949 58.94349 52.71676 54.98229 57.99338 55.99136 54.50704 [9] 56.03570 NA > > colMeans(tmp5) [1] 111.47082 67.71463 71.43205 73.85700 71.66035 73.45449 75.14724 [8] 69.93527 72.36077 74.10586 71.56342 73.44173 73.00189 73.97869 [15] 69.40526 68.55686 NA 69.50360 72.51084 69.31379 > colSums(tmp5) [1] 1114.7082 677.1463 714.3205 738.5700 716.6035 734.5449 751.4724 [8] 699.3527 723.6077 741.0586 715.6342 734.4173 730.0189 739.7869 [15] 694.0526 685.5686 NA 695.0360 725.1084 693.1379 > colVars(tmp5) [1] 15715.65779 56.07670 67.24493 89.06954 75.12396 60.09749 [7] 93.35492 55.68473 83.46664 100.56694 88.32237 83.97934 [13] 170.72859 65.18804 43.71927 48.30292 NA 116.45691 [19] 51.72939 69.67948 > colSd(tmp5) [1] 125.362107 7.488438 8.200301 9.437666 8.667408 7.752257 [7] 9.662035 7.462220 9.136008 10.028307 9.397998 9.164024 [13] 13.066315 8.073911 6.612055 6.950030 NA 10.791520 [19] 7.192315 8.347423 > colMax(tmp5) [1] 467.81266 79.52286 83.73980 92.78862 85.54250 83.29158 88.69813 [8] 80.38318 87.07128 85.88471 87.54194 85.66930 92.83434 86.41628 [15] 77.43317 80.32503 NA 90.25277 88.19685 86.42436 > colMin(tmp5) [1] 64.21312 57.99338 60.47612 61.35341 58.94349 63.69612 60.94426 60.16002 [9] 57.20020 56.03570 55.99136 58.78441 54.98229 61.89623 58.66736 58.32928 [17] NA 55.64949 60.83841 54.50704 > > Max(tmp5,na.rm=TRUE) [1] 467.8127 > Min(tmp5,na.rm=TRUE) [1] 52.71676 > mean(tmp5,na.rm=TRUE) [1] 73.71234 > Sum(tmp5,na.rm=TRUE) [1] 14668.76 > Var(tmp5,na.rm=TRUE) [1] 863.9391 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.63533 72.52104 71.93442 70.26890 73.02065 74.12522 68.06865 70.23292 [9] 70.91811 73.38167 > rowSums(tmp5,na.rm=TRUE) [1] 1852.707 1450.421 1438.688 1405.378 1460.413 1482.504 1361.373 1404.658 [9] 1418.362 1394.252 > rowVars(tmp5,na.rm=TRUE) [1] 7862.65259 106.07914 65.78322 94.45268 70.83597 81.02505 [7] 60.77506 82.84145 74.34784 57.89821 > rowSd(tmp5,na.rm=TRUE) [1] 88.671600 10.299473 8.110685 9.718677 8.416411 9.001392 7.795836 [8] 9.101728 8.622519 7.609088 > rowMax(tmp5,na.rm=TRUE) [1] 467.81266 92.78862 88.69813 87.07128 85.54250 90.25277 87.18844 [8] 85.90446 87.54194 92.83434 > rowMin(tmp5,na.rm=TRUE) [1] 58.66736 55.64949 58.94349 52.71676 54.98229 57.99338 55.99136 54.50704 [9] 56.03570 61.29735 > > colMeans(tmp5,na.rm=TRUE) [1] 111.47082 67.71463 71.43205 73.85700 71.66035 73.45449 75.14724 [8] 69.93527 72.36077 74.10586 71.56342 73.44173 73.00189 73.97869 [15] 69.40526 68.55686 71.62342 69.50360 72.51084 69.31379 > colSums(tmp5,na.rm=TRUE) [1] 1114.7082 677.1463 714.3205 738.5700 716.6035 734.5449 751.4724 [8] 699.3527 723.6077 741.0586 715.6342 734.4173 730.0189 739.7869 [15] 694.0526 685.5686 644.6108 695.0360 725.1084 693.1379 > colVars(tmp5,na.rm=TRUE) [1] 15715.65779 56.07670 67.24493 89.06954 75.12396 60.09749 [7] 93.35492 55.68473 83.46664 100.56694 88.32237 83.97934 [13] 170.72859 65.18804 43.71927 48.30292 128.35081 116.45691 [19] 51.72939 69.67948 > colSd(tmp5,na.rm=TRUE) [1] 125.362107 7.488438 8.200301 9.437666 8.667408 7.752257 [7] 9.662035 7.462220 9.136008 10.028307 9.397998 9.164024 [13] 13.066315 8.073911 6.612055 6.950030 11.329202 10.791520 [19] 7.192315 8.347423 > colMax(tmp5,na.rm=TRUE) [1] 467.81266 79.52286 83.73980 92.78862 85.54250 83.29158 88.69813 [8] 80.38318 87.07128 85.88471 87.54194 85.66930 92.83434 86.41628 [15] 77.43317 80.32503 86.76530 90.25277 88.19685 86.42436 > colMin(tmp5,na.rm=TRUE) [1] 64.21312 57.99338 60.47612 61.35341 58.94349 63.69612 60.94426 60.16002 [9] 57.20020 56.03570 55.99136 58.78441 54.98229 61.89623 58.66736 58.32928 [17] 52.71676 55.64949 60.83841 54.50704 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 92.63533 72.52104 71.93442 70.26890 73.02065 74.12522 68.06865 70.23292 [9] 70.91811 NaN > rowSums(tmp5,na.rm=TRUE) [1] 1852.707 1450.421 1438.688 1405.378 1460.413 1482.504 1361.373 1404.658 [9] 1418.362 0.000 > rowVars(tmp5,na.rm=TRUE) [1] 7862.65259 106.07914 65.78322 94.45268 70.83597 81.02505 [7] 60.77506 82.84145 74.34784 NA > rowSd(tmp5,na.rm=TRUE) [1] 88.671600 10.299473 8.110685 9.718677 8.416411 9.001392 7.795836 [8] 9.101728 8.622519 NA > rowMax(tmp5,na.rm=TRUE) [1] 467.81266 92.78862 88.69813 87.07128 85.54250 90.25277 87.18844 [8] 85.90446 87.54194 NA > rowMin(tmp5,na.rm=TRUE) [1] 58.66736 55.64949 58.94349 52.71676 54.98229 57.99338 55.99136 54.50704 [9] 56.03570 NA > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.64623 67.04959 71.70157 73.91748 72.64444 72.69888 74.97587 [8] 69.88230 71.26066 73.42074 71.82274 72.78961 70.79828 74.03180 [15] 70.18396 69.36347 NaN 69.46437 72.69744 68.97210 > colSums(tmp5,na.rm=TRUE) [1] 1040.8160 603.4463 645.3142 665.2573 653.8000 654.2899 674.7829 [8] 628.9407 641.3460 660.7867 646.4047 655.1065 637.1846 666.2862 [15] 631.6556 624.2713 0.0000 625.1793 654.2770 620.7489 > colVars(tmp5,na.rm=TRUE) [1] 17483.98185 58.11062 74.83335 100.16208 73.61949 61.18649 [7] 104.69392 62.61376 80.28477 107.85716 98.60614 89.69256 [13] 137.44106 73.30482 42.36246 47.02127 NA 130.99670 [19] 57.80382 77.07596 > colSd(tmp5,na.rm=TRUE) [1] 132.227009 7.623032 8.650627 10.008101 8.580180 7.822179 [7] 10.232005 7.912886 8.960177 10.385430 9.930062 9.470616 [13] 11.723526 8.561823 6.508645 6.857205 NA 11.445379 [19] 7.602883 8.779292 > colMax(tmp5,na.rm=TRUE) [1] 467.81266 79.52286 83.73980 92.78862 85.54250 83.29158 88.69813 [8] 80.38318 87.07128 85.88471 87.54194 85.66930 85.90446 86.41628 [15] 77.43317 80.32503 -Inf 90.25277 88.19685 86.42436 > colMin(tmp5,na.rm=TRUE) [1] 64.21312 57.99338 60.47612 61.35341 58.94349 63.69612 60.94426 60.16002 [9] 57.20020 56.03570 55.99136 58.78441 54.98229 61.89623 58.66736 58.32928 [17] Inf 55.64949 60.83841 54.50704 > > > > > 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] 324.03408 125.69645 96.91127 172.71590 227.12807 169.68404 399.38443 [8] 182.90287 214.50482 183.01609 > apply(copymatrix,1,var,na.rm=TRUE) [1] 324.03408 125.69645 96.91127 172.71590 227.12807 169.68404 399.38443 [8] 182.90287 214.50482 183.01609 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 2.842171e-14 2.842171e-14 0.000000e+00 0.000000e+00 0.000000e+00 [6] 2.842171e-14 1.136868e-13 -5.684342e-14 -1.136868e-13 -2.842171e-14 [11] 0.000000e+00 -3.979039e-13 -5.684342e-14 1.705303e-13 2.842171e-14 [16] -2.842171e-14 -5.684342e-14 5.684342e-14 -5.684342e-14 -5.684342e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 10 1 1 1 7 4 4 7 1 12 6 9 6 14 7 1 3 9 10 16 3 5 6 7 4 15 10 18 6 18 1 11 7 11 8 1 3 16 8 2 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.778638 > Min(tmp) [1] -3.37316 > mean(tmp) [1] -0.1242622 > Sum(tmp) [1] -12.42622 > Var(tmp) [1] 1.290656 > > rowMeans(tmp) [1] -0.1242622 > rowSums(tmp) [1] -12.42622 > rowVars(tmp) [1] 1.290656 > rowSd(tmp) [1] 1.136071 > rowMax(tmp) [1] 2.778638 > rowMin(tmp) [1] -3.37316 > > colMeans(tmp) [1] -0.541672417 -1.951991857 -2.354714488 -0.043649602 1.888177632 [6] 1.173041699 1.701099097 -1.277793989 -2.631906083 0.058411701 [11] 1.345934054 0.776189574 0.640505899 -1.037118895 0.612861078 [16] -1.482721270 0.761004183 -0.829910969 -1.546293169 0.487991825 [21] -0.790386870 0.043075216 0.443460271 0.671355909 0.173647327 [26] -0.240402161 -0.625539903 -1.081306065 -0.267833110 -1.857973798 [31] -0.774350929 -0.883469025 -0.908485146 -0.623479670 0.222455221 [36] -2.183444925 -0.954399074 0.291591734 -0.027729801 0.440877046 [41] -0.551851460 1.841873418 0.405224449 1.312494736 0.085716642 [46] -2.501052830 -1.284319889 -0.210873586 0.061751232 -0.833171611 [51] 0.730768527 1.078995128 -0.151699310 0.090917333 -3.373159761 [56] 2.230386584 1.418083524 -1.026851999 1.799736768 1.152374193 [61] -0.331099182 0.359343676 0.031665432 1.232260308 0.080376965 [66] -0.703695907 -1.134836071 0.318613663 -0.771565961 0.649950835 [71] 2.778637719 0.068696562 -0.554750944 0.859374052 0.148202675 [76] -0.204111263 0.986595163 -1.030691122 -0.759335341 1.913131309 [81] 0.166994340 -0.056503983 -1.451069168 0.320594391 1.021903737 [86] 0.752787448 -0.187797939 -0.288026784 1.272921739 1.129208564 [91] -1.092094318 -1.406828182 -1.863842836 0.301425085 -1.751523414 [96] -0.778329326 -0.009718903 -0.665771728 -0.313030927 -0.554732646 > colSums(tmp) [1] -0.541672417 -1.951991857 -2.354714488 -0.043649602 1.888177632 [6] 1.173041699 1.701099097 -1.277793989 -2.631906083 0.058411701 [11] 1.345934054 0.776189574 0.640505899 -1.037118895 0.612861078 [16] -1.482721270 0.761004183 -0.829910969 -1.546293169 0.487991825 [21] -0.790386870 0.043075216 0.443460271 0.671355909 0.173647327 [26] -0.240402161 -0.625539903 -1.081306065 -0.267833110 -1.857973798 [31] -0.774350929 -0.883469025 -0.908485146 -0.623479670 0.222455221 [36] -2.183444925 -0.954399074 0.291591734 -0.027729801 0.440877046 [41] -0.551851460 1.841873418 0.405224449 1.312494736 0.085716642 [46] -2.501052830 -1.284319889 -0.210873586 0.061751232 -0.833171611 [51] 0.730768527 1.078995128 -0.151699310 0.090917333 -3.373159761 [56] 2.230386584 1.418083524 -1.026851999 1.799736768 1.152374193 [61] -0.331099182 0.359343676 0.031665432 1.232260308 0.080376965 [66] -0.703695907 -1.134836071 0.318613663 -0.771565961 0.649950835 [71] 2.778637719 0.068696562 -0.554750944 0.859374052 0.148202675 [76] -0.204111263 0.986595163 -1.030691122 -0.759335341 1.913131309 [81] 0.166994340 -0.056503983 -1.451069168 0.320594391 1.021903737 [86] 0.752787448 -0.187797939 -0.288026784 1.272921739 1.129208564 [91] -1.092094318 -1.406828182 -1.863842836 0.301425085 -1.751523414 [96] -0.778329326 -0.009718903 -0.665771728 -0.313030927 -0.554732646 > 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.541672417 -1.951991857 -2.354714488 -0.043649602 1.888177632 [6] 1.173041699 1.701099097 -1.277793989 -2.631906083 0.058411701 [11] 1.345934054 0.776189574 0.640505899 -1.037118895 0.612861078 [16] -1.482721270 0.761004183 -0.829910969 -1.546293169 0.487991825 [21] -0.790386870 0.043075216 0.443460271 0.671355909 0.173647327 [26] -0.240402161 -0.625539903 -1.081306065 -0.267833110 -1.857973798 [31] -0.774350929 -0.883469025 -0.908485146 -0.623479670 0.222455221 [36] -2.183444925 -0.954399074 0.291591734 -0.027729801 0.440877046 [41] -0.551851460 1.841873418 0.405224449 1.312494736 0.085716642 [46] -2.501052830 -1.284319889 -0.210873586 0.061751232 -0.833171611 [51] 0.730768527 1.078995128 -0.151699310 0.090917333 -3.373159761 [56] 2.230386584 1.418083524 -1.026851999 1.799736768 1.152374193 [61] -0.331099182 0.359343676 0.031665432 1.232260308 0.080376965 [66] -0.703695907 -1.134836071 0.318613663 -0.771565961 0.649950835 [71] 2.778637719 0.068696562 -0.554750944 0.859374052 0.148202675 [76] -0.204111263 0.986595163 -1.030691122 -0.759335341 1.913131309 [81] 0.166994340 -0.056503983 -1.451069168 0.320594391 1.021903737 [86] 0.752787448 -0.187797939 -0.288026784 1.272921739 1.129208564 [91] -1.092094318 -1.406828182 -1.863842836 0.301425085 -1.751523414 [96] -0.778329326 -0.009718903 -0.665771728 -0.313030927 -0.554732646 > colMin(tmp) [1] -0.541672417 -1.951991857 -2.354714488 -0.043649602 1.888177632 [6] 1.173041699 1.701099097 -1.277793989 -2.631906083 0.058411701 [11] 1.345934054 0.776189574 0.640505899 -1.037118895 0.612861078 [16] -1.482721270 0.761004183 -0.829910969 -1.546293169 0.487991825 [21] -0.790386870 0.043075216 0.443460271 0.671355909 0.173647327 [26] -0.240402161 -0.625539903 -1.081306065 -0.267833110 -1.857973798 [31] -0.774350929 -0.883469025 -0.908485146 -0.623479670 0.222455221 [36] -2.183444925 -0.954399074 0.291591734 -0.027729801 0.440877046 [41] -0.551851460 1.841873418 0.405224449 1.312494736 0.085716642 [46] -2.501052830 -1.284319889 -0.210873586 0.061751232 -0.833171611 [51] 0.730768527 1.078995128 -0.151699310 0.090917333 -3.373159761 [56] 2.230386584 1.418083524 -1.026851999 1.799736768 1.152374193 [61] -0.331099182 0.359343676 0.031665432 1.232260308 0.080376965 [66] -0.703695907 -1.134836071 0.318613663 -0.771565961 0.649950835 [71] 2.778637719 0.068696562 -0.554750944 0.859374052 0.148202675 [76] -0.204111263 0.986595163 -1.030691122 -0.759335341 1.913131309 [81] 0.166994340 -0.056503983 -1.451069168 0.320594391 1.021903737 [86] 0.752787448 -0.187797939 -0.288026784 1.272921739 1.129208564 [91] -1.092094318 -1.406828182 -1.863842836 0.301425085 -1.751523414 [96] -0.778329326 -0.009718903 -0.665771728 -0.313030927 -0.554732646 > colMedians(tmp) [1] -0.541672417 -1.951991857 -2.354714488 -0.043649602 1.888177632 [6] 1.173041699 1.701099097 -1.277793989 -2.631906083 0.058411701 [11] 1.345934054 0.776189574 0.640505899 -1.037118895 0.612861078 [16] -1.482721270 0.761004183 -0.829910969 -1.546293169 0.487991825 [21] -0.790386870 0.043075216 0.443460271 0.671355909 0.173647327 [26] -0.240402161 -0.625539903 -1.081306065 -0.267833110 -1.857973798 [31] -0.774350929 -0.883469025 -0.908485146 -0.623479670 0.222455221 [36] -2.183444925 -0.954399074 0.291591734 -0.027729801 0.440877046 [41] -0.551851460 1.841873418 0.405224449 1.312494736 0.085716642 [46] -2.501052830 -1.284319889 -0.210873586 0.061751232 -0.833171611 [51] 0.730768527 1.078995128 -0.151699310 0.090917333 -3.373159761 [56] 2.230386584 1.418083524 -1.026851999 1.799736768 1.152374193 [61] -0.331099182 0.359343676 0.031665432 1.232260308 0.080376965 [66] -0.703695907 -1.134836071 0.318613663 -0.771565961 0.649950835 [71] 2.778637719 0.068696562 -0.554750944 0.859374052 0.148202675 [76] -0.204111263 0.986595163 -1.030691122 -0.759335341 1.913131309 [81] 0.166994340 -0.056503983 -1.451069168 0.320594391 1.021903737 [86] 0.752787448 -0.187797939 -0.288026784 1.272921739 1.129208564 [91] -1.092094318 -1.406828182 -1.863842836 0.301425085 -1.751523414 [96] -0.778329326 -0.009718903 -0.665771728 -0.313030927 -0.554732646 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.5416724 -1.951992 -2.354714 -0.0436496 1.888178 1.173042 1.701099 [2,] -0.5416724 -1.951992 -2.354714 -0.0436496 1.888178 1.173042 1.701099 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.277794 -2.631906 0.0584117 1.345934 0.7761896 0.6405059 -1.037119 [2,] -1.277794 -2.631906 0.0584117 1.345934 0.7761896 0.6405059 -1.037119 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.6128611 -1.482721 0.7610042 -0.829911 -1.546293 0.4879918 -0.7903869 [2,] 0.6128611 -1.482721 0.7610042 -0.829911 -1.546293 0.4879918 -0.7903869 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.04307522 0.4434603 0.6713559 0.1736473 -0.2404022 -0.6255399 -1.081306 [2,] 0.04307522 0.4434603 0.6713559 0.1736473 -0.2404022 -0.6255399 -1.081306 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.2678331 -1.857974 -0.7743509 -0.883469 -0.9084851 -0.6234797 0.2224552 [2,] -0.2678331 -1.857974 -0.7743509 -0.883469 -0.9084851 -0.6234797 0.2224552 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -2.183445 -0.9543991 0.2915917 -0.0277298 0.440877 -0.5518515 1.841873 [2,] -2.183445 -0.9543991 0.2915917 -0.0277298 0.440877 -0.5518515 1.841873 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.4052244 1.312495 0.08571664 -2.501053 -1.28432 -0.2108736 0.06175123 [2,] 0.4052244 1.312495 0.08571664 -2.501053 -1.28432 -0.2108736 0.06175123 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -0.8331716 0.7307685 1.078995 -0.1516993 0.09091733 -3.37316 2.230387 [2,] -0.8331716 0.7307685 1.078995 -0.1516993 0.09091733 -3.37316 2.230387 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 1.418084 -1.026852 1.799737 1.152374 -0.3310992 0.3593437 0.03166543 [2,] 1.418084 -1.026852 1.799737 1.152374 -0.3310992 0.3593437 0.03166543 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 1.23226 0.08037696 -0.7036959 -1.134836 0.3186137 -0.771566 0.6499508 [2,] 1.23226 0.08037696 -0.7036959 -1.134836 0.3186137 -0.771566 0.6499508 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 2.778638 0.06869656 -0.5547509 0.8593741 0.1482027 -0.2041113 0.9865952 [2,] 2.778638 0.06869656 -0.5547509 0.8593741 0.1482027 -0.2041113 0.9865952 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -1.030691 -0.7593353 1.913131 0.1669943 -0.05650398 -1.451069 0.3205944 [2,] -1.030691 -0.7593353 1.913131 0.1669943 -0.05650398 -1.451069 0.3205944 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 1.021904 0.7527874 -0.1877979 -0.2880268 1.272922 1.129209 -1.092094 [2,] 1.021904 0.7527874 -0.1877979 -0.2880268 1.272922 1.129209 -1.092094 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.406828 -1.863843 0.3014251 -1.751523 -0.7783293 -0.009718903 -0.6657717 [2,] -1.406828 -1.863843 0.3014251 -1.751523 -0.7783293 -0.009718903 -0.6657717 [,99] [,100] [1,] -0.3130309 -0.5547326 [2,] -0.3130309 -0.5547326 > > > Max(tmp2) [1] 2.101961 > Min(tmp2) [1] -2.37081 > mean(tmp2) [1] 0.1529973 > Sum(tmp2) [1] 15.29973 > Var(tmp2) [1] 0.9200389 > > rowMeans(tmp2) [1] -1.410644582 -0.280640757 -0.053247441 -2.000393041 -1.649013143 [6] -2.370810124 0.120217225 0.017786484 0.609908387 0.128187976 [11] 0.814426460 -0.040008233 0.720386598 0.819535426 1.053246046 [16] 0.400158314 0.676988383 1.261169914 0.766494916 1.052604899 [21] 0.379011526 0.415538075 0.179578435 -0.462769975 0.242998302 [26] -0.001161708 -0.260868591 -0.252605269 1.670226479 1.448783270 [31] -1.315754607 -0.246630722 -1.340914590 -1.110923500 0.128499121 [36] -0.709890513 0.312056050 -1.150043504 0.612275137 0.260810840 [41] -0.033729007 0.584115071 -0.334633751 -0.904894758 1.064629930 [46] -0.529192745 -0.638745936 -1.689795715 -0.657699316 1.877514310 [51] 0.130377194 0.977499149 0.709072511 1.075701311 -0.601772831 [56] -0.454462519 1.571381191 0.104222491 0.724954392 -0.052958299 [61] 1.705805251 0.703527545 0.162154959 1.650205077 -1.230778467 [66] 0.277325648 -0.419958487 -0.653167438 -0.298590773 0.541478994 [71] 0.266996828 -0.257807859 0.814618492 0.093843273 1.007996050 [76] 1.038845325 0.545530681 0.880243325 -0.490944284 1.230587904 [81] -0.531889590 1.264052846 2.051936938 1.068848804 -1.289174409 [86] 1.075572139 0.819928795 -0.493619316 0.554360457 0.312941526 [91] -0.455695835 1.842872212 -0.883707551 -2.085116350 2.101961214 [96] -1.195765706 -0.866972962 0.628374439 0.458394438 0.998360754 > rowSums(tmp2) [1] -1.410644582 -0.280640757 -0.053247441 -2.000393041 -1.649013143 [6] -2.370810124 0.120217225 0.017786484 0.609908387 0.128187976 [11] 0.814426460 -0.040008233 0.720386598 0.819535426 1.053246046 [16] 0.400158314 0.676988383 1.261169914 0.766494916 1.052604899 [21] 0.379011526 0.415538075 0.179578435 -0.462769975 0.242998302 [26] -0.001161708 -0.260868591 -0.252605269 1.670226479 1.448783270 [31] -1.315754607 -0.246630722 -1.340914590 -1.110923500 0.128499121 [36] -0.709890513 0.312056050 -1.150043504 0.612275137 0.260810840 [41] -0.033729007 0.584115071 -0.334633751 -0.904894758 1.064629930 [46] -0.529192745 -0.638745936 -1.689795715 -0.657699316 1.877514310 [51] 0.130377194 0.977499149 0.709072511 1.075701311 -0.601772831 [56] -0.454462519 1.571381191 0.104222491 0.724954392 -0.052958299 [61] 1.705805251 0.703527545 0.162154959 1.650205077 -1.230778467 [66] 0.277325648 -0.419958487 -0.653167438 -0.298590773 0.541478994 [71] 0.266996828 -0.257807859 0.814618492 0.093843273 1.007996050 [76] 1.038845325 0.545530681 0.880243325 -0.490944284 1.230587904 [81] -0.531889590 1.264052846 2.051936938 1.068848804 -1.289174409 [86] 1.075572139 0.819928795 -0.493619316 0.554360457 0.312941526 [91] -0.455695835 1.842872212 -0.883707551 -2.085116350 2.101961214 [96] -1.195765706 -0.866972962 0.628374439 0.458394438 0.998360754 > 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] -1.410644582 -0.280640757 -0.053247441 -2.000393041 -1.649013143 [6] -2.370810124 0.120217225 0.017786484 0.609908387 0.128187976 [11] 0.814426460 -0.040008233 0.720386598 0.819535426 1.053246046 [16] 0.400158314 0.676988383 1.261169914 0.766494916 1.052604899 [21] 0.379011526 0.415538075 0.179578435 -0.462769975 0.242998302 [26] -0.001161708 -0.260868591 -0.252605269 1.670226479 1.448783270 [31] -1.315754607 -0.246630722 -1.340914590 -1.110923500 0.128499121 [36] -0.709890513 0.312056050 -1.150043504 0.612275137 0.260810840 [41] -0.033729007 0.584115071 -0.334633751 -0.904894758 1.064629930 [46] -0.529192745 -0.638745936 -1.689795715 -0.657699316 1.877514310 [51] 0.130377194 0.977499149 0.709072511 1.075701311 -0.601772831 [56] -0.454462519 1.571381191 0.104222491 0.724954392 -0.052958299 [61] 1.705805251 0.703527545 0.162154959 1.650205077 -1.230778467 [66] 0.277325648 -0.419958487 -0.653167438 -0.298590773 0.541478994 [71] 0.266996828 -0.257807859 0.814618492 0.093843273 1.007996050 [76] 1.038845325 0.545530681 0.880243325 -0.490944284 1.230587904 [81] -0.531889590 1.264052846 2.051936938 1.068848804 -1.289174409 [86] 1.075572139 0.819928795 -0.493619316 0.554360457 0.312941526 [91] -0.455695835 1.842872212 -0.883707551 -2.085116350 2.101961214 [96] -1.195765706 -0.866972962 0.628374439 0.458394438 0.998360754 > rowMin(tmp2) [1] -1.410644582 -0.280640757 -0.053247441 -2.000393041 -1.649013143 [6] -2.370810124 0.120217225 0.017786484 0.609908387 0.128187976 [11] 0.814426460 -0.040008233 0.720386598 0.819535426 1.053246046 [16] 0.400158314 0.676988383 1.261169914 0.766494916 1.052604899 [21] 0.379011526 0.415538075 0.179578435 -0.462769975 0.242998302 [26] -0.001161708 -0.260868591 -0.252605269 1.670226479 1.448783270 [31] -1.315754607 -0.246630722 -1.340914590 -1.110923500 0.128499121 [36] -0.709890513 0.312056050 -1.150043504 0.612275137 0.260810840 [41] -0.033729007 0.584115071 -0.334633751 -0.904894758 1.064629930 [46] -0.529192745 -0.638745936 -1.689795715 -0.657699316 1.877514310 [51] 0.130377194 0.977499149 0.709072511 1.075701311 -0.601772831 [56] -0.454462519 1.571381191 0.104222491 0.724954392 -0.052958299 [61] 1.705805251 0.703527545 0.162154959 1.650205077 -1.230778467 [66] 0.277325648 -0.419958487 -0.653167438 -0.298590773 0.541478994 [71] 0.266996828 -0.257807859 0.814618492 0.093843273 1.007996050 [76] 1.038845325 0.545530681 0.880243325 -0.490944284 1.230587904 [81] -0.531889590 1.264052846 2.051936938 1.068848804 -1.289174409 [86] 1.075572139 0.819928795 -0.493619316 0.554360457 0.312941526 [91] -0.455695835 1.842872212 -0.883707551 -2.085116350 2.101961214 [96] -1.195765706 -0.866972962 0.628374439 0.458394438 0.998360754 > > colMeans(tmp2) [1] 0.1529973 > colSums(tmp2) [1] 15.29973 > colVars(tmp2) [1] 0.9200389 > colSd(tmp2) [1] 0.9591866 > colMax(tmp2) [1] 2.101961 > colMin(tmp2) [1] -2.37081 > colMedians(tmp2) [1] 0.2112884 > colRanges(tmp2) [,1] [1,] -2.370810 [2,] 2.101961 > > 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] 7.952150 3.393019 2.850362 -6.854887 1.591741 1.408139 2.909620 [8] 2.067920 -4.742940 -1.048176 > colApply(tmp,quantile)[,1] [,1] [1,] -0.7107936 [2,] 0.1516419 [3,] 0.8301905 [4,] 1.2176900 [5,] 2.2477364 > > rowApply(tmp,sum) [1] -1.82202514 -1.63341126 1.66739188 4.18970237 -0.87872893 3.02191539 [7] -1.83459805 0.33922771 6.40380701 0.07366796 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 10 4 8 8 3 6 9 10 4 5 [2,] 9 10 3 4 5 7 7 9 6 2 [3,] 4 3 6 5 4 10 10 8 9 1 [4,] 3 8 1 3 7 1 3 1 3 7 [5,] 5 9 4 2 9 8 5 7 2 10 [6,] 2 7 10 1 8 5 6 3 5 9 [7,] 6 6 5 7 10 2 4 6 10 4 [8,] 7 1 7 10 2 3 8 4 8 8 [9,] 8 2 2 9 1 4 2 5 1 6 [10,] 1 5 9 6 6 9 1 2 7 3 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.34417789 1.48860462 -2.27938769 0.64423969 -0.23999009 -0.27307832 [7] 1.57654228 0.05051829 3.27890486 -1.96805215 -0.60025296 -1.98558109 [13] -0.55264835 -0.96209979 -3.19475627 -1.98985697 -0.82235383 -2.66875164 [19] 1.66280047 4.95628273 > colApply(tmp,quantile)[,1] [,1] [1,] -0.4606870 [2,] -0.1971241 [3,] 0.3745400 [4,] 0.6140756 [5,] 1.0133733 > > rowApply(tmp,sum) [1] -1.9642150 1.6835620 -3.2203689 -0.3800828 1.3463664 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 9 13 8 18 12 [2,] 17 6 7 14 18 [3,] 4 17 2 15 2 [4,] 15 19 13 2 11 [5,] 7 14 14 1 14 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.1971241 0.9220075 -1.0636114 0.52462814 -0.3715211 -2.1708529 [2,] 0.6140756 -0.4352348 0.9394675 1.39021730 0.7247753 0.4636966 [3,] -0.4606870 -0.6634694 -1.2211244 -0.05881941 0.2770948 0.9109654 [4,] 1.0133733 0.3825048 0.4712989 -1.25416963 -1.5026766 1.0158630 [5,] 0.3745400 1.2827967 -1.4054183 0.04238329 0.6323375 -0.4927504 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.09650029 -0.1849935 1.5366199 -2.0549883 1.354641 0.5840951 [2,] 0.95821458 0.3595704 -0.8693079 1.8073191 -1.136028 -1.7670952 [3,] -0.73333445 1.0857950 0.5422107 -1.3242710 -1.173584 -0.3021289 [4,] -0.21332097 0.3753478 0.9724492 -0.2082754 -0.363987 -0.3099046 [5,] 1.66148341 -1.5852015 1.0969330 -0.1878367 0.718706 -0.1905475 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -1.3072481 0.4782653 -0.90128571 -0.7200572 0.1681840 0.1640850 [2,] 0.7878774 0.1889389 -0.01861866 -1.7140718 -0.1164473 -1.4529246 [3,] -0.1311851 -1.1599121 -0.43460107 1.1487501 -0.4411411 -0.7792441 [4,] -0.7131044 -0.9854740 -0.96208190 0.3371315 0.1371339 -0.4851702 [5,] 0.8110119 0.5160821 -0.87816894 -1.0416095 -0.5700835 -0.1154977 [,19] [,20] [1,] -0.2156448 1.5870868 [2,] 0.7351176 0.2240202 [3,] 1.3291853 0.3691321 [4,] 1.1113924 0.8015873 [5,] -1.2972500 1.9744564 > > > 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.21-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.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 652 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-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.21-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.002591972 -0.7129109 -1.701529 0.6273715 0.4703973 0.263337 0.844198 col8 col9 col10 col11 col12 col13 col14 row1 0.6342062 -0.5496641 -0.4514329 0.4853733 -2.044205 -0.05162961 0.2426195 col15 col16 col17 col18 col19 col20 row1 0.849832 -0.5750197 -0.03733175 -1.548848 -0.04151501 0.6079831 > tmp[,"col10"] col10 row1 -0.4514329 row2 0.9561319 row3 -1.9268319 row4 -1.0853000 row5 1.0065790 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.002591972 -0.7129109 -1.701529 0.6273715 0.4703973 0.2633370 row5 -0.451948418 1.4932703 1.206271 -0.2470058 1.0619275 -0.2821934 col7 col8 col9 col10 col11 col12 col13 row1 0.844198 0.6342062 -0.5496641 -0.4514329 0.4853733 -2.0442048 -0.05162961 row5 -1.439877 2.1003582 0.1048450 1.0065790 0.6663351 -0.8544431 0.68636174 col14 col15 col16 col17 col18 col19 row1 0.2426195 0.8498320 -0.5750197 -0.03733175 -1.5488476 -0.04151501 row5 -0.8124577 -0.2217904 -0.8617676 1.75925045 0.1498161 -1.21074111 col20 row1 0.6079831 row5 0.5477947 > tmp[,c("col6","col20")] col6 col20 row1 0.2633370 0.60798308 row2 0.1633409 0.69184443 row3 -0.3532124 0.00720955 row4 1.9061420 0.58049365 row5 -0.2821934 0.54779475 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.2633370 0.6079831 row5 -0.2821934 0.5477947 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.80948 51.96509 49.77516 51.05223 50.5872 105.806 50.45877 49.13018 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.92092 48.55702 49.68141 51.7489 51.08331 48.86214 49.76044 50.64215 col17 col18 col19 col20 row1 50.33124 50.23216 50.14034 103.338 > tmp[,"col10"] col10 row1 48.55702 row2 29.41059 row3 30.71950 row4 30.35112 row5 50.84194 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.80948 51.96509 49.77516 51.05223 50.58720 105.8060 50.45877 49.13018 row5 49.64130 48.83707 50.03846 50.10706 49.86055 106.2283 47.52749 50.27907 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.92092 48.55702 49.68141 51.7489 51.08331 48.86214 49.76044 50.64215 row5 48.81195 50.84194 50.79596 48.8723 51.25065 49.31033 50.48458 52.03513 col17 col18 col19 col20 row1 50.33124 50.23216 50.14034 103.3380 row5 50.37347 49.21336 50.45716 104.3495 > tmp[,c("col6","col20")] col6 col20 row1 105.80601 103.33797 row2 74.28466 74.34211 row3 75.78285 76.44114 row4 73.85340 75.65994 row5 106.22831 104.34948 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.8060 103.3380 row5 106.2283 104.3495 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.8060 103.3380 row5 106.2283 104.3495 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.4195596 [2,] -0.3836244 [3,] 0.2499750 [4,] 1.4699340 [5,] 0.5517978 > tmp[,c("col17","col7")] col17 col7 [1,] 0.3961990 1.4815456 [2,] 1.1718053 1.4999729 [3,] 0.5852968 0.2673885 [4,] -1.0531112 0.9663568 [5,] 0.1970610 0.6920737 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.2162003 -0.0763011 [2,] -1.2781739 -1.2909953 [3,] 2.2681440 -0.5873695 [4,] -1.2171888 0.8043419 [5,] 0.9340886 0.5757348 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.2162 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.216200 [2,] -1.278174 > > > > 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.05478933 0.3544433 0.01755889 -0.8532265 1.362316 0.2306343 1.241615 row1 0.64009624 1.2659457 -1.45979854 0.9624634 -1.225277 -1.9414094 1.175214 [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.3027478 -1.7920357 -1.6667468 0.3886495 0.37363500 -1.057161 row1 -0.7540503 0.1673855 -0.2061666 0.7907027 -0.06925794 -1.206941 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 -0.4027311 2.0935820 -1.302368 1.231687 -1.107853 0.09674646 1.257526 row1 0.8409166 -0.5652306 -0.376127 -1.178152 2.960004 0.23439055 -1.432130 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.4091773 1.110004 0.7144261 -0.04060022 -0.64182 -0.005806379 0.1587706 [,8] [,9] [,10] row2 -0.3079655 -0.2649101 -1.26981 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.4729056 -0.9651063 -0.8023616 -0.1219309 -0.08088321 0.204478 -0.7368638 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.012073 -0.06151029 0.8033118 1.843336 -0.4059915 -0.02815885 -0.3077175 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.7023635 -0.8726626 -1.234933 -0.3320887 -0.3588632 2.206093 > > > 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: 0x5d6907b9cd30> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c978d4b63d" [2] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c9da43cc5" [3] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c92f51fed0" [4] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c9336295e4" [5] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c91f01375f" [6] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c94b47ccc3" [7] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c951fd24d" [8] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c95d5ac70f" [9] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c9498aed77" [10] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c9190a4de9" [11] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c939010ab5" [12] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c97076181b" [13] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c93ec7801" [14] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c952c402b" [15] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM3881c94edb800d" > > > ### 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: 0x5d690779bd70> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x5d690779bd70> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x5d690779bd70> > rowMedians(tmp) [1] 0.203016282 0.044116363 -0.078126195 -0.127845457 -0.074321465 [6] 0.493701616 -0.155991808 0.298901374 0.355448824 0.837647135 [11] -0.578346121 -0.121597743 0.476776582 0.262835297 -0.216918973 [16] -0.295247925 0.240968092 0.061486903 -0.263788261 0.482206662 [21] -0.022550565 0.197560709 -0.516724164 -0.101112509 -0.128434907 [26] 0.302856262 -0.181288886 -0.279093142 0.033495025 -0.214865948 [31] 0.431371295 -0.238817000 0.341818967 -0.214893724 -0.208674244 [36] -0.028564776 -0.372406622 0.137758246 0.100038911 -0.202997461 [41] 0.015691271 -0.199178249 0.428474306 0.047264199 -0.023516777 [46] -0.535701483 0.339256842 -0.236831128 -0.328042955 0.179117665 [51] 0.248105594 -0.230696836 -0.028407663 0.076144575 0.093266095 [56] -0.112059785 0.857091438 -0.433700189 -0.001486357 -0.375065377 [61] -0.904925735 -0.132609258 0.241805676 0.061925081 -0.517436947 [66] -0.055801654 0.159630986 -0.670959596 -0.491031367 -0.117849823 [71] 0.156660643 -0.538966806 -0.041637192 0.075778872 0.416687411 [76] 0.200128372 -0.585031495 -0.057097581 -0.213217468 -0.091326819 [81] 0.018162426 0.637852854 -0.293451489 0.200125040 0.037116420 [86] 0.213813879 -0.067998440 -0.085202626 0.018459753 -0.276663731 [91] 0.165692888 -0.056184302 -0.393242731 0.367303939 -0.221114218 [96] -0.031600199 -0.247942710 0.446731267 -0.291034390 -0.387817834 [101] 1.056690157 0.190218329 -0.087436925 0.599423668 0.398397151 [106] 0.186810134 -0.024198419 -0.155300389 -0.196193726 -0.096117919 [111] 0.263962171 -0.440524482 -0.462906438 0.359979163 -0.619349374 [116] -0.336217350 -0.214380625 -0.184976156 0.237793350 -0.015745052 [121] -0.230891880 0.222042909 0.466670108 0.118254522 -0.176396868 [126] -0.112454080 0.012148464 -0.339619525 0.420082657 0.109807445 [131] -0.133957011 0.490813541 -0.379394660 -0.054130642 -0.040938224 [136] -0.330273371 -0.471712077 0.263557025 -0.281872231 -0.562160809 [141] -0.068572841 0.634268843 -0.435745755 0.303070546 -0.086923395 [146] 0.449899961 0.095306439 -0.131308193 0.014780871 -0.558062515 [151] -0.160204406 -0.205985648 -0.130230185 -0.271875779 -0.518846919 [156] 0.144163739 -0.073206614 -0.004727750 -0.115962893 0.134688871 [161] -0.056743984 0.105887139 0.201149573 -0.144358658 0.399640241 [166] -0.161585229 -0.113854751 0.144580867 -0.002315958 0.104093280 [171] -0.582147233 -0.299370237 -0.826358674 0.116003483 0.362618876 [176] 0.458695039 0.470298974 0.330980696 0.120286774 -0.177150275 [181] -0.508915302 -0.170278609 0.248221790 -0.537847510 -0.111573736 [186] 0.238912585 0.394690726 -0.188607146 -0.373485549 0.327068450 [191] -0.255621108 -0.488274965 0.130764090 0.283535427 0.571309697 [196] 0.067019681 0.057291928 0.163862597 -0.034782245 -0.072654868 [201] 0.261527880 0.025847097 -0.260521124 0.331884201 0.194471874 [206] 0.248894155 -0.016128993 0.311575786 -0.431341592 0.186336212 [211] -0.105964916 0.351021656 -0.100948053 0.011347662 -0.565206356 [216] -0.217534251 -0.017140079 -0.432100877 0.341829122 -0.348131177 [221] -0.228400347 0.121382287 0.211947707 -0.044132326 -0.352465325 [226] 0.114077522 0.788298971 -0.055106672 -0.031964768 -0.158558646 > > proc.time() user system elapsed 1.376 1.435 2.799
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2025-03-13 r87965) -- "Unsuffered Consequences" 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: 0x5b438ab20ac0> > .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: 0x5b438ab20ac0> > .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: 0x5b438ab20ac0> > .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: 0x5b438ab20ac0> > 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: 0x5b438aaed040> > .Call("R_bm_AddColumn",P) <pointer: 0x5b438aaed040> > .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: 0x5b438aaed040> > .Call("R_bm_AddColumn",P) <pointer: 0x5b438aaed040> > .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: 0x5b438aaed040> > 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: 0x5b438aaaf230> > .Call("R_bm_AddColumn",P) <pointer: 0x5b438aaaf230> > .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: 0x5b438aaaf230> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5b438aaaf230> > .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: 0x5b438aaaf230> > > .Call("R_bm_RowMode",P) <pointer: 0x5b438aaaf230> > .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: 0x5b438aaaf230> > > .Call("R_bm_ColMode",P) <pointer: 0x5b438aaaf230> > .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: 0x5b438aaaf230> > 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: 0x5b438aa99b70> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x5b438aa99b70> > .Call("R_bm_AddColumn",P) <pointer: 0x5b438aa99b70> > .Call("R_bm_AddColumn",P) <pointer: 0x5b438aa99b70> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3883d243b36791" "BufferedMatrixFile3883d24447daf6" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3883d243b36791" "BufferedMatrixFile3883d24447daf6" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x5b438be401e0> > .Call("R_bm_AddColumn",P) <pointer: 0x5b438be401e0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5b438be401e0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5b438be401e0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x5b438be401e0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x5b438be401e0> > .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: 0x5b438be8e320> > .Call("R_bm_AddColumn",P) <pointer: 0x5b438be8e320> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5b438be8e320> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x5b438be8e320> > 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: 0x5b4389abeea0> > .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: 0x5b4389abeea0> > rm(P) > > proc.time() user system elapsed 0.244 0.064 0.296
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2025-03-13 r87965) -- "Unsuffered Consequences" 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.238 0.049 0.275