Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2025-04-02 19:28 -0400 (Wed, 02 Apr 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4764 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.3 (2025-02-28 ucrt) -- "Trophy Case" | 4495 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4522 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4449 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.4.3 (2025-02-28) -- "Trophy Case" | 4426 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 251/2289 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.70.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino8 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | ![]() | ||||||||
merida1 | macOS 12.7.5 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson1 | macOS 13.6.6 Ventura / arm64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
taishan | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
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-31 20:24:39 -0400 (Mon, 31 Mar 2025) |
EndedAt: 2025-03-31 20:25:02 -0400 (Mon, 31 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.233 0.045 0.267
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] "Mon Mar 31 20:24: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] "Mon Mar 31 20:24: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: 0x5d5ec3208130> > > > > 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] "Mon Mar 31 20:24: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] "Mon Mar 31 20:24:54 2025" > > ColMode(tmp2) <pointer: 0x5d5ec3208130> > > > > ### 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.2358143 0.7492067 0.05124771 0.43762469 [2,] 0.9530473 -1.9890511 -1.83049927 0.57716413 [3,] 0.9587295 0.1858494 0.96658070 0.08701684 [4,] -2.0327385 1.3977215 -0.57364237 0.32204399 > 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.2358143 0.7492067 0.05124771 0.43762469 [2,] 0.9530473 1.9890511 1.83049927 0.57716413 [3,] 0.9587295 0.1858494 0.96658070 0.08701684 [4,] 2.0327385 1.3977215 0.57364237 0.32204399 > 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.0616010 0.8655673 0.2263796 0.6615321 [2,] 0.9762414 1.4103372 1.3529594 0.7597132 [3,] 0.9791473 0.4311026 0.9831484 0.2949862 [4,] 1.4257414 1.1822527 0.7573918 0.5674892 > > 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,] 226.85182 34.40488 27.31504 32.05295 [2,] 35.71546 41.09242 40.36009 33.17430 [3,] 35.75020 29.49688 35.79806 28.03688 [4,] 41.29015 38.22025 33.14756 30.99694 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x5d5ec0c964a0> > exp(tmp5) <pointer: 0x5d5ec0c964a0> > log(tmp5,2) <pointer: 0x5d5ec0c964a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 472.1624 > Min(tmp5) [1] 53.96317 > mean(tmp5) [1] 72.58862 > Sum(tmp5) [1] 14517.72 > Var(tmp5) [1] 875.1146 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 88.22743 72.53346 69.80205 74.09749 71.05041 69.32748 68.68928 67.50056 [9] 70.19013 74.46791 > rowSums(tmp5) [1] 1764.549 1450.669 1396.041 1481.950 1421.008 1386.550 1373.786 1350.011 [9] 1403.803 1489.358 > rowVars(tmp5) [1] 8231.61340 108.63191 51.51562 53.33970 42.69210 57.79352 [7] 59.44458 70.95394 61.56807 93.38814 > rowSd(tmp5) [1] 90.728239 10.422663 7.177438 7.303403 6.533919 7.602205 7.710031 [8] 8.423416 7.846532 9.663754 > rowMax(tmp5) [1] 472.16235 89.37829 85.45749 85.94004 82.22408 82.26711 82.23638 [8] 81.69189 84.68703 90.23048 > rowMin(tmp5) [1] 55.01584 53.96317 58.35509 63.38664 56.76340 57.48577 56.06595 54.67777 [9] 55.34151 55.73016 > > colMeans(tmp5) [1] 113.19557 74.71445 69.77174 69.93321 64.18226 65.90696 65.77985 [8] 69.03403 69.13687 67.85739 74.62250 74.90525 75.01845 69.30038 [15] 67.63454 78.04259 66.65160 73.90442 69.39065 72.78972 > colSums(tmp5) [1] 1131.9557 747.1445 697.7174 699.3321 641.8226 659.0696 657.7985 [8] 690.3403 691.3687 678.5739 746.2250 749.0525 750.1845 693.0038 [15] 676.3454 780.4259 666.5160 739.0442 693.9065 727.8972 > colVars(tmp5) [1] 15955.17264 67.88567 87.59498 63.60680 46.45682 88.46364 [7] 40.92990 59.45016 65.44835 69.98044 52.26102 31.04477 [13] 28.26843 69.92934 89.80440 71.50791 75.08700 55.56526 [19] 40.25391 63.49867 > colSd(tmp5) [1] 126.313786 8.239276 9.359219 7.975387 6.815924 9.405511 [7] 6.397648 7.710393 8.090016 8.365431 7.229179 5.571784 [13] 5.316807 8.362377 9.476519 8.456235 8.665276 7.454211 [19] 6.344597 7.968605 > colMax(tmp5) [1] 472.16235 85.52849 84.00425 83.72386 72.24746 80.48867 77.73975 [8] 82.22408 83.77722 80.58957 90.23048 83.19081 81.38901 80.24618 [15] 89.30326 88.97444 81.45629 89.37829 77.18357 82.41044 > colMin(tmp5) [1] 63.41306 61.39388 56.85268 58.35509 53.96317 55.24090 58.95915 57.48577 [9] 56.06595 54.67777 65.00753 65.35850 65.88429 58.71329 55.22158 65.78140 [17] 55.34151 65.06926 55.73016 61.67367 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] 88.22743 72.53346 NA 74.09749 71.05041 69.32748 68.68928 67.50056 [9] 70.19013 74.46791 > rowSums(tmp5) [1] 1764.549 1450.669 NA 1481.950 1421.008 1386.550 1373.786 1350.011 [9] 1403.803 1489.358 > rowVars(tmp5) [1] 8231.61340 108.63191 53.99507 53.33970 42.69210 57.79352 [7] 59.44458 70.95394 61.56807 93.38814 > rowSd(tmp5) [1] 90.728239 10.422663 7.348134 7.303403 6.533919 7.602205 7.710031 [8] 8.423416 7.846532 9.663754 > rowMax(tmp5) [1] 472.16235 89.37829 NA 85.94004 82.22408 82.26711 82.23638 [8] 81.69189 84.68703 90.23048 > rowMin(tmp5) [1] 55.01584 53.96317 NA 63.38664 56.76340 57.48577 56.06595 54.67777 [9] 55.34151 55.73016 > > colMeans(tmp5) [1] 113.19557 74.71445 69.77174 69.93321 64.18226 65.90696 65.77985 [8] 69.03403 69.13687 67.85739 74.62250 74.90525 NA 69.30038 [15] 67.63454 78.04259 66.65160 73.90442 69.39065 72.78972 > colSums(tmp5) [1] 1131.9557 747.1445 697.7174 699.3321 641.8226 659.0696 657.7985 [8] 690.3403 691.3687 678.5739 746.2250 749.0525 NA 693.0038 [15] 676.3454 780.4259 666.5160 739.0442 693.9065 727.8972 > colVars(tmp5) [1] 15955.17264 67.88567 87.59498 63.60680 46.45682 88.46364 [7] 40.92990 59.45016 65.44835 69.98044 52.26102 31.04477 [13] NA 69.92934 89.80440 71.50791 75.08700 55.56526 [19] 40.25391 63.49867 > colSd(tmp5) [1] 126.313786 8.239276 9.359219 7.975387 6.815924 9.405511 [7] 6.397648 7.710393 8.090016 8.365431 7.229179 5.571784 [13] NA 8.362377 9.476519 8.456235 8.665276 7.454211 [19] 6.344597 7.968605 > colMax(tmp5) [1] 472.16235 85.52849 84.00425 83.72386 72.24746 80.48867 77.73975 [8] 82.22408 83.77722 80.58957 90.23048 83.19081 NA 80.24618 [15] 89.30326 88.97444 81.45629 89.37829 77.18357 82.41044 > colMin(tmp5) [1] 63.41306 61.39388 56.85268 58.35509 53.96317 55.24090 58.95915 57.48577 [9] 56.06595 54.67777 65.00753 65.35850 NA 58.71329 55.22158 65.78140 [17] 55.34151 65.06926 55.73016 61.67367 > > Max(tmp5,na.rm=TRUE) [1] 472.1624 > Min(tmp5,na.rm=TRUE) [1] 53.96317 > mean(tmp5,na.rm=TRUE) [1] 72.61548 > Sum(tmp5,na.rm=TRUE) [1] 14450.48 > Var(tmp5,na.rm=TRUE) [1] 879.3894 > > rowMeans(tmp5,na.rm=TRUE) [1] 88.22743 72.53346 69.93666 74.09749 71.05041 69.32748 68.68928 67.50056 [9] 70.19013 74.46791 > rowSums(tmp5,na.rm=TRUE) [1] 1764.549 1450.669 1328.797 1481.950 1421.008 1386.550 1373.786 1350.011 [9] 1403.803 1489.358 > rowVars(tmp5,na.rm=TRUE) [1] 8231.61340 108.63191 53.99507 53.33970 42.69210 57.79352 [7] 59.44458 70.95394 61.56807 93.38814 > rowSd(tmp5,na.rm=TRUE) [1] 90.728239 10.422663 7.348134 7.303403 6.533919 7.602205 7.710031 [8] 8.423416 7.846532 9.663754 > rowMax(tmp5,na.rm=TRUE) [1] 472.16235 89.37829 85.45749 85.94004 82.22408 82.26711 82.23638 [8] 81.69189 84.68703 90.23048 > rowMin(tmp5,na.rm=TRUE) [1] 55.01584 53.96317 58.35509 63.38664 56.76340 57.48577 56.06595 54.67777 [9] 55.34151 55.73016 > > colMeans(tmp5,na.rm=TRUE) [1] 113.19557 74.71445 69.77174 69.93321 64.18226 65.90696 65.77985 [8] 69.03403 69.13687 67.85739 74.62250 74.90525 75.88223 69.30038 [15] 67.63454 78.04259 66.65160 73.90442 69.39065 72.78972 > colSums(tmp5,na.rm=TRUE) [1] 1131.9557 747.1445 697.7174 699.3321 641.8226 659.0696 657.7985 [8] 690.3403 691.3687 678.5739 746.2250 749.0525 682.9400 693.0038 [15] 676.3454 780.4259 666.5160 739.0442 693.9065 727.8972 > colVars(tmp5,na.rm=TRUE) [1] 15955.17264 67.88567 87.59498 63.60680 46.45682 88.46364 [7] 40.92990 59.45016 65.44835 69.98044 52.26102 31.04477 [13] 23.40832 69.92934 89.80440 71.50791 75.08700 55.56526 [19] 40.25391 63.49867 > colSd(tmp5,na.rm=TRUE) [1] 126.313786 8.239276 9.359219 7.975387 6.815924 9.405511 [7] 6.397648 7.710393 8.090016 8.365431 7.229179 5.571784 [13] 4.838215 8.362377 9.476519 8.456235 8.665276 7.454211 [19] 6.344597 7.968605 > colMax(tmp5,na.rm=TRUE) [1] 472.16235 85.52849 84.00425 83.72386 72.24746 80.48867 77.73975 [8] 82.22408 83.77722 80.58957 90.23048 83.19081 81.38901 80.24618 [15] 89.30326 88.97444 81.45629 89.37829 77.18357 82.41044 > colMin(tmp5,na.rm=TRUE) [1] 63.41306 61.39388 56.85268 58.35509 53.96317 55.24090 58.95915 57.48577 [9] 56.06595 54.67777 65.00753 65.35850 65.88429 58.71329 55.22158 65.78140 [17] 55.34151 65.06926 55.73016 61.67367 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 88.22743 72.53346 NaN 74.09749 71.05041 69.32748 68.68928 67.50056 [9] 70.19013 74.46791 > rowSums(tmp5,na.rm=TRUE) [1] 1764.549 1450.669 0.000 1481.950 1421.008 1386.550 1373.786 1350.011 [9] 1403.803 1489.358 > rowVars(tmp5,na.rm=TRUE) [1] 8231.61340 108.63191 NA 53.33970 42.69210 57.79352 [7] 59.44458 70.95394 61.56807 93.38814 > rowSd(tmp5,na.rm=TRUE) [1] 90.728239 10.422663 NA 7.303403 6.533919 7.602205 7.710031 [8] 8.423416 7.846532 9.663754 > rowMax(tmp5,na.rm=TRUE) [1] 472.16235 89.37829 NA 85.94004 82.22408 82.26711 82.23638 [8] 81.69189 84.68703 90.23048 > rowMin(tmp5,na.rm=TRUE) [1] 55.01584 53.96317 NA 63.38664 56.76340 57.48577 56.06595 54.67777 [9] 55.34151 55.73016 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 117.50515 76.19451 69.24538 71.21967 63.78873 64.71889 66.53771 [8] 69.00118 69.83842 66.44270 75.26440 75.96600 NaN 68.74313 [15] 67.60871 77.21871 67.05619 74.18580 68.52477 73.02252 > colSums(tmp5,na.rm=TRUE) [1] 1057.5464 685.7506 623.2084 640.9770 574.0986 582.4700 598.8394 [8] 621.0106 628.5458 597.9843 677.3796 683.6940 0.0000 618.6881 [15] 608.4784 694.9684 603.5057 667.6722 616.7230 657.2027 > colVars(tmp5,na.rm=TRUE) [1] 17740.62892 51.72729 95.42748 52.93919 50.52170 83.64186 [7] 39.58474 66.86929 68.09242 56.21294 54.15830 22.26696 [13] NA 75.17709 101.02245 72.81017 82.63129 61.62015 [19] 36.85100 70.82627 > colSd(tmp5,na.rm=TRUE) [1] 133.193952 7.192168 9.768699 7.275932 7.107862 9.145592 [7] 6.291641 8.177365 8.251813 7.497529 7.359232 4.718788 [13] NA 8.670472 10.050992 8.532888 9.090176 7.849850 [19] 6.070502 8.415835 > colMax(tmp5,na.rm=TRUE) [1] 472.16235 85.52849 84.00425 83.72386 72.24746 80.48867 77.73975 [8] 82.22408 83.77722 75.50320 90.23048 83.19081 -Inf 80.24618 [15] 89.30326 88.97444 81.45629 89.37829 75.47900 82.41044 > colMin(tmp5,na.rm=TRUE) [1] 63.41306 64.41167 56.85268 64.18112 53.96317 55.24090 60.32759 57.48577 [9] 56.06595 54.67777 65.00753 69.97376 Inf 58.71329 55.22158 65.78140 [17] 55.34151 65.06926 55.73016 61.67367 > > > > > 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] 199.7702 173.5811 361.1231 278.1518 253.6545 252.8704 280.0903 210.3315 [9] 253.5152 286.1991 > apply(copymatrix,1,var,na.rm=TRUE) [1] 199.7702 173.5811 361.1231 278.1518 253.6545 252.8704 280.0903 210.3315 [9] 253.5152 286.1991 > > > > 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] -7.105427e-15 8.526513e-14 1.705303e-13 8.526513e-14 0.000000e+00 [6] 1.989520e-13 -1.989520e-13 -5.684342e-14 5.684342e-14 -5.684342e-14 [11] 8.526513e-14 5.684342e-14 1.421085e-13 1.136868e-13 -1.421085e-14 [16] 8.526513e-14 2.842171e-14 -2.842171e-14 8.526513e-14 0.000000e+00 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 3 17 9 5 2 14 4 14 6 15 5 16 2 9 6 20 6 8 1 6 8 18 2 2 7 18 1 14 4 3 10 5 7 13 7 19 5 8 10 11 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.02321 > Min(tmp) [1] -2.499934 > mean(tmp) [1] -0.02312869 > Sum(tmp) [1] -2.312869 > Var(tmp) [1] 0.8279875 > > rowMeans(tmp) [1] -0.02312869 > rowSums(tmp) [1] -2.312869 > rowVars(tmp) [1] 0.8279875 > rowSd(tmp) [1] 0.9099382 > rowMax(tmp) [1] 2.02321 > rowMin(tmp) [1] -2.499934 > > colMeans(tmp) [1] -0.708336246 0.394752729 1.597452830 0.008937740 0.011790457 [6] 0.161703796 0.223108059 -0.223645774 -1.093287088 1.184849728 [11] -0.123915557 -0.807568073 -0.550876463 -0.010499616 -2.499933523 [16] -1.245188885 -1.549622325 0.472002839 1.139726550 -0.404545008 [21] 1.125606420 -0.599233422 -0.270591863 0.688073049 -1.394934482 [26] -0.592973384 -0.452555106 -0.802712596 -0.501429684 0.571090437 [31] 0.127926349 -0.328170215 0.499910379 0.287112234 0.846103983 [36] -0.893195586 0.467093198 0.820240149 -0.091873053 0.055921355 [41] -0.954955629 -1.768632798 0.726356734 -0.670506504 -1.035554408 [46] -1.304448576 0.828127295 1.699161308 -0.478184031 0.086335522 [51] -1.089136763 -0.351484853 -1.041614577 -1.082375519 0.017761168 [56] 0.405428690 -1.806846847 1.404586513 -1.519536805 -0.237212191 [61] 1.285088210 0.786598760 0.207026495 -0.145793819 -0.219073388 [66] -0.467007032 0.527874673 0.807658065 0.953622400 0.090213018 [71] -1.250317436 0.769264236 1.066772416 1.019112583 -1.362000872 [76] 0.006075855 0.872269325 1.413025721 0.664747450 2.023209899 [81] 0.897790758 0.435283226 0.938551658 0.001340159 -0.571717210 [86] 0.058809841 0.142872948 -1.569764088 0.817458698 -0.710357460 [91] -0.956678716 0.113583700 -0.317170637 1.000196445 0.704052282 [96] 0.771063071 -0.599460939 -0.753256491 -0.851259143 1.721844621 > colSums(tmp) [1] -0.708336246 0.394752729 1.597452830 0.008937740 0.011790457 [6] 0.161703796 0.223108059 -0.223645774 -1.093287088 1.184849728 [11] -0.123915557 -0.807568073 -0.550876463 -0.010499616 -2.499933523 [16] -1.245188885 -1.549622325 0.472002839 1.139726550 -0.404545008 [21] 1.125606420 -0.599233422 -0.270591863 0.688073049 -1.394934482 [26] -0.592973384 -0.452555106 -0.802712596 -0.501429684 0.571090437 [31] 0.127926349 -0.328170215 0.499910379 0.287112234 0.846103983 [36] -0.893195586 0.467093198 0.820240149 -0.091873053 0.055921355 [41] -0.954955629 -1.768632798 0.726356734 -0.670506504 -1.035554408 [46] -1.304448576 0.828127295 1.699161308 -0.478184031 0.086335522 [51] -1.089136763 -0.351484853 -1.041614577 -1.082375519 0.017761168 [56] 0.405428690 -1.806846847 1.404586513 -1.519536805 -0.237212191 [61] 1.285088210 0.786598760 0.207026495 -0.145793819 -0.219073388 [66] -0.467007032 0.527874673 0.807658065 0.953622400 0.090213018 [71] -1.250317436 0.769264236 1.066772416 1.019112583 -1.362000872 [76] 0.006075855 0.872269325 1.413025721 0.664747450 2.023209899 [81] 0.897790758 0.435283226 0.938551658 0.001340159 -0.571717210 [86] 0.058809841 0.142872948 -1.569764088 0.817458698 -0.710357460 [91] -0.956678716 0.113583700 -0.317170637 1.000196445 0.704052282 [96] 0.771063071 -0.599460939 -0.753256491 -0.851259143 1.721844621 > 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.708336246 0.394752729 1.597452830 0.008937740 0.011790457 [6] 0.161703796 0.223108059 -0.223645774 -1.093287088 1.184849728 [11] -0.123915557 -0.807568073 -0.550876463 -0.010499616 -2.499933523 [16] -1.245188885 -1.549622325 0.472002839 1.139726550 -0.404545008 [21] 1.125606420 -0.599233422 -0.270591863 0.688073049 -1.394934482 [26] -0.592973384 -0.452555106 -0.802712596 -0.501429684 0.571090437 [31] 0.127926349 -0.328170215 0.499910379 0.287112234 0.846103983 [36] -0.893195586 0.467093198 0.820240149 -0.091873053 0.055921355 [41] -0.954955629 -1.768632798 0.726356734 -0.670506504 -1.035554408 [46] -1.304448576 0.828127295 1.699161308 -0.478184031 0.086335522 [51] -1.089136763 -0.351484853 -1.041614577 -1.082375519 0.017761168 [56] 0.405428690 -1.806846847 1.404586513 -1.519536805 -0.237212191 [61] 1.285088210 0.786598760 0.207026495 -0.145793819 -0.219073388 [66] -0.467007032 0.527874673 0.807658065 0.953622400 0.090213018 [71] -1.250317436 0.769264236 1.066772416 1.019112583 -1.362000872 [76] 0.006075855 0.872269325 1.413025721 0.664747450 2.023209899 [81] 0.897790758 0.435283226 0.938551658 0.001340159 -0.571717210 [86] 0.058809841 0.142872948 -1.569764088 0.817458698 -0.710357460 [91] -0.956678716 0.113583700 -0.317170637 1.000196445 0.704052282 [96] 0.771063071 -0.599460939 -0.753256491 -0.851259143 1.721844621 > colMin(tmp) [1] -0.708336246 0.394752729 1.597452830 0.008937740 0.011790457 [6] 0.161703796 0.223108059 -0.223645774 -1.093287088 1.184849728 [11] -0.123915557 -0.807568073 -0.550876463 -0.010499616 -2.499933523 [16] -1.245188885 -1.549622325 0.472002839 1.139726550 -0.404545008 [21] 1.125606420 -0.599233422 -0.270591863 0.688073049 -1.394934482 [26] -0.592973384 -0.452555106 -0.802712596 -0.501429684 0.571090437 [31] 0.127926349 -0.328170215 0.499910379 0.287112234 0.846103983 [36] -0.893195586 0.467093198 0.820240149 -0.091873053 0.055921355 [41] -0.954955629 -1.768632798 0.726356734 -0.670506504 -1.035554408 [46] -1.304448576 0.828127295 1.699161308 -0.478184031 0.086335522 [51] -1.089136763 -0.351484853 -1.041614577 -1.082375519 0.017761168 [56] 0.405428690 -1.806846847 1.404586513 -1.519536805 -0.237212191 [61] 1.285088210 0.786598760 0.207026495 -0.145793819 -0.219073388 [66] -0.467007032 0.527874673 0.807658065 0.953622400 0.090213018 [71] -1.250317436 0.769264236 1.066772416 1.019112583 -1.362000872 [76] 0.006075855 0.872269325 1.413025721 0.664747450 2.023209899 [81] 0.897790758 0.435283226 0.938551658 0.001340159 -0.571717210 [86] 0.058809841 0.142872948 -1.569764088 0.817458698 -0.710357460 [91] -0.956678716 0.113583700 -0.317170637 1.000196445 0.704052282 [96] 0.771063071 -0.599460939 -0.753256491 -0.851259143 1.721844621 > colMedians(tmp) [1] -0.708336246 0.394752729 1.597452830 0.008937740 0.011790457 [6] 0.161703796 0.223108059 -0.223645774 -1.093287088 1.184849728 [11] -0.123915557 -0.807568073 -0.550876463 -0.010499616 -2.499933523 [16] -1.245188885 -1.549622325 0.472002839 1.139726550 -0.404545008 [21] 1.125606420 -0.599233422 -0.270591863 0.688073049 -1.394934482 [26] -0.592973384 -0.452555106 -0.802712596 -0.501429684 0.571090437 [31] 0.127926349 -0.328170215 0.499910379 0.287112234 0.846103983 [36] -0.893195586 0.467093198 0.820240149 -0.091873053 0.055921355 [41] -0.954955629 -1.768632798 0.726356734 -0.670506504 -1.035554408 [46] -1.304448576 0.828127295 1.699161308 -0.478184031 0.086335522 [51] -1.089136763 -0.351484853 -1.041614577 -1.082375519 0.017761168 [56] 0.405428690 -1.806846847 1.404586513 -1.519536805 -0.237212191 [61] 1.285088210 0.786598760 0.207026495 -0.145793819 -0.219073388 [66] -0.467007032 0.527874673 0.807658065 0.953622400 0.090213018 [71] -1.250317436 0.769264236 1.066772416 1.019112583 -1.362000872 [76] 0.006075855 0.872269325 1.413025721 0.664747450 2.023209899 [81] 0.897790758 0.435283226 0.938551658 0.001340159 -0.571717210 [86] 0.058809841 0.142872948 -1.569764088 0.817458698 -0.710357460 [91] -0.956678716 0.113583700 -0.317170637 1.000196445 0.704052282 [96] 0.771063071 -0.599460939 -0.753256491 -0.851259143 1.721844621 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.7083362 0.3947527 1.597453 0.00893774 0.01179046 0.1617038 0.2231081 [2,] -0.7083362 0.3947527 1.597453 0.00893774 0.01179046 0.1617038 0.2231081 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.2236458 -1.093287 1.18485 -0.1239156 -0.8075681 -0.5508765 -0.01049962 [2,] -0.2236458 -1.093287 1.18485 -0.1239156 -0.8075681 -0.5508765 -0.01049962 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -2.499934 -1.245189 -1.549622 0.4720028 1.139727 -0.404545 1.125606 [2,] -2.499934 -1.245189 -1.549622 0.4720028 1.139727 -0.404545 1.125606 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.5992334 -0.2705919 0.688073 -1.394934 -0.5929734 -0.4525551 -0.8027126 [2,] -0.5992334 -0.2705919 0.688073 -1.394934 -0.5929734 -0.4525551 -0.8027126 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.5014297 0.5710904 0.1279263 -0.3281702 0.4999104 0.2871122 0.846104 [2,] -0.5014297 0.5710904 0.1279263 -0.3281702 0.4999104 0.2871122 0.846104 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.8931956 0.4670932 0.8202401 -0.09187305 0.05592135 -0.9549556 -1.768633 [2,] -0.8931956 0.4670932 0.8202401 -0.09187305 0.05592135 -0.9549556 -1.768633 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.7263567 -0.6705065 -1.035554 -1.304449 0.8281273 1.699161 -0.478184 [2,] 0.7263567 -0.6705065 -1.035554 -1.304449 0.8281273 1.699161 -0.478184 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.08633552 -1.089137 -0.3514849 -1.041615 -1.082376 0.01776117 0.4054287 [2,] 0.08633552 -1.089137 -0.3514849 -1.041615 -1.082376 0.01776117 0.4054287 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.806847 1.404587 -1.519537 -0.2372122 1.285088 0.7865988 0.2070265 [2,] -1.806847 1.404587 -1.519537 -0.2372122 1.285088 0.7865988 0.2070265 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.1457938 -0.2190734 -0.467007 0.5278747 0.8076581 0.9536224 0.09021302 [2,] -0.1457938 -0.2190734 -0.467007 0.5278747 0.8076581 0.9536224 0.09021302 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -1.250317 0.7692642 1.066772 1.019113 -1.362001 0.006075855 0.8722693 [2,] -1.250317 0.7692642 1.066772 1.019113 -1.362001 0.006075855 0.8722693 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 1.413026 0.6647474 2.02321 0.8977908 0.4352832 0.9385517 0.001340159 [2,] 1.413026 0.6647474 2.02321 0.8977908 0.4352832 0.9385517 0.001340159 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.5717172 0.05880984 0.1428729 -1.569764 0.8174587 -0.7103575 -0.9566787 [2,] -0.5717172 0.05880984 0.1428729 -1.569764 0.8174587 -0.7103575 -0.9566787 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.1135837 -0.3171706 1.000196 0.7040523 0.7710631 -0.5994609 -0.7532565 [2,] 0.1135837 -0.3171706 1.000196 0.7040523 0.7710631 -0.5994609 -0.7532565 [,99] [,100] [1,] -0.8512591 1.721845 [2,] -0.8512591 1.721845 > > > Max(tmp2) [1] 3.107481 > Min(tmp2) [1] -2.415011 > mean(tmp2) [1] 0.06141178 > Sum(tmp2) [1] 6.141178 > Var(tmp2) [1] 1.203214 > > rowMeans(tmp2) [1] -0.36224897 0.51378523 0.34030414 -1.51786241 -0.05043710 -1.50609153 [7] 0.56483084 -1.10343077 0.98211396 2.29611752 0.62298786 -0.58251153 [13] -1.84664517 0.94399142 0.28443690 0.10960212 -0.95103811 0.04570680 [19] -0.42921455 -2.40498624 -0.22453736 -0.82021620 0.39369638 0.83350734 [25] -1.06470581 0.15386756 -0.29913841 -0.49910991 0.83757000 -0.28851851 [31] 1.14056962 0.62030836 -0.71568657 0.73802441 1.24572752 1.79078841 [37] 0.55255366 0.47141716 0.93208105 3.10748060 0.56194437 0.26669030 [43] -0.31860153 1.71688401 -0.84683996 -0.36613776 -0.21740878 0.34547821 [49] 0.40184873 1.09355230 -1.73052010 -0.86149877 2.14790372 0.04624134 [55] -0.56619761 2.05097438 0.50095182 -2.41501060 1.20144797 -0.76840709 [61] 0.31487021 0.03181357 1.64540698 -2.24272432 0.77476212 -0.21402492 [67] 0.98396914 -0.50360071 -0.81756524 -0.97980211 0.01279042 -0.50969051 [73] 1.62503859 -0.09700657 -0.16401785 0.62172458 -0.21609092 0.22538289 [79] -1.62549752 -0.85779365 0.07172406 -1.33738294 0.98066540 1.06942055 [85] -0.65625534 2.19491775 -1.46261713 -2.03451126 1.21582973 -1.29836094 [91] -0.16597325 0.35419172 -1.29321562 0.19900292 0.30390183 0.22635143 [97] 0.02727852 -0.82234212 1.83745125 1.62477281 > rowSums(tmp2) [1] -0.36224897 0.51378523 0.34030414 -1.51786241 -0.05043710 -1.50609153 [7] 0.56483084 -1.10343077 0.98211396 2.29611752 0.62298786 -0.58251153 [13] -1.84664517 0.94399142 0.28443690 0.10960212 -0.95103811 0.04570680 [19] -0.42921455 -2.40498624 -0.22453736 -0.82021620 0.39369638 0.83350734 [25] -1.06470581 0.15386756 -0.29913841 -0.49910991 0.83757000 -0.28851851 [31] 1.14056962 0.62030836 -0.71568657 0.73802441 1.24572752 1.79078841 [37] 0.55255366 0.47141716 0.93208105 3.10748060 0.56194437 0.26669030 [43] -0.31860153 1.71688401 -0.84683996 -0.36613776 -0.21740878 0.34547821 [49] 0.40184873 1.09355230 -1.73052010 -0.86149877 2.14790372 0.04624134 [55] -0.56619761 2.05097438 0.50095182 -2.41501060 1.20144797 -0.76840709 [61] 0.31487021 0.03181357 1.64540698 -2.24272432 0.77476212 -0.21402492 [67] 0.98396914 -0.50360071 -0.81756524 -0.97980211 0.01279042 -0.50969051 [73] 1.62503859 -0.09700657 -0.16401785 0.62172458 -0.21609092 0.22538289 [79] -1.62549752 -0.85779365 0.07172406 -1.33738294 0.98066540 1.06942055 [85] -0.65625534 2.19491775 -1.46261713 -2.03451126 1.21582973 -1.29836094 [91] -0.16597325 0.35419172 -1.29321562 0.19900292 0.30390183 0.22635143 [97] 0.02727852 -0.82234212 1.83745125 1.62477281 > 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.36224897 0.51378523 0.34030414 -1.51786241 -0.05043710 -1.50609153 [7] 0.56483084 -1.10343077 0.98211396 2.29611752 0.62298786 -0.58251153 [13] -1.84664517 0.94399142 0.28443690 0.10960212 -0.95103811 0.04570680 [19] -0.42921455 -2.40498624 -0.22453736 -0.82021620 0.39369638 0.83350734 [25] -1.06470581 0.15386756 -0.29913841 -0.49910991 0.83757000 -0.28851851 [31] 1.14056962 0.62030836 -0.71568657 0.73802441 1.24572752 1.79078841 [37] 0.55255366 0.47141716 0.93208105 3.10748060 0.56194437 0.26669030 [43] -0.31860153 1.71688401 -0.84683996 -0.36613776 -0.21740878 0.34547821 [49] 0.40184873 1.09355230 -1.73052010 -0.86149877 2.14790372 0.04624134 [55] -0.56619761 2.05097438 0.50095182 -2.41501060 1.20144797 -0.76840709 [61] 0.31487021 0.03181357 1.64540698 -2.24272432 0.77476212 -0.21402492 [67] 0.98396914 -0.50360071 -0.81756524 -0.97980211 0.01279042 -0.50969051 [73] 1.62503859 -0.09700657 -0.16401785 0.62172458 -0.21609092 0.22538289 [79] -1.62549752 -0.85779365 0.07172406 -1.33738294 0.98066540 1.06942055 [85] -0.65625534 2.19491775 -1.46261713 -2.03451126 1.21582973 -1.29836094 [91] -0.16597325 0.35419172 -1.29321562 0.19900292 0.30390183 0.22635143 [97] 0.02727852 -0.82234212 1.83745125 1.62477281 > rowMin(tmp2) [1] -0.36224897 0.51378523 0.34030414 -1.51786241 -0.05043710 -1.50609153 [7] 0.56483084 -1.10343077 0.98211396 2.29611752 0.62298786 -0.58251153 [13] -1.84664517 0.94399142 0.28443690 0.10960212 -0.95103811 0.04570680 [19] -0.42921455 -2.40498624 -0.22453736 -0.82021620 0.39369638 0.83350734 [25] -1.06470581 0.15386756 -0.29913841 -0.49910991 0.83757000 -0.28851851 [31] 1.14056962 0.62030836 -0.71568657 0.73802441 1.24572752 1.79078841 [37] 0.55255366 0.47141716 0.93208105 3.10748060 0.56194437 0.26669030 [43] -0.31860153 1.71688401 -0.84683996 -0.36613776 -0.21740878 0.34547821 [49] 0.40184873 1.09355230 -1.73052010 -0.86149877 2.14790372 0.04624134 [55] -0.56619761 2.05097438 0.50095182 -2.41501060 1.20144797 -0.76840709 [61] 0.31487021 0.03181357 1.64540698 -2.24272432 0.77476212 -0.21402492 [67] 0.98396914 -0.50360071 -0.81756524 -0.97980211 0.01279042 -0.50969051 [73] 1.62503859 -0.09700657 -0.16401785 0.62172458 -0.21609092 0.22538289 [79] -1.62549752 -0.85779365 0.07172406 -1.33738294 0.98066540 1.06942055 [85] -0.65625534 2.19491775 -1.46261713 -2.03451126 1.21582973 -1.29836094 [91] -0.16597325 0.35419172 -1.29321562 0.19900292 0.30390183 0.22635143 [97] 0.02727852 -0.82234212 1.83745125 1.62477281 > > colMeans(tmp2) [1] 0.06141178 > colSums(tmp2) [1] 6.141178 > colVars(tmp2) [1] 1.203214 > colSd(tmp2) [1] 1.096911 > colMax(tmp2) [1] 3.107481 > colMin(tmp2) [1] -2.415011 > colMedians(tmp2) [1] 0.0589827 > colRanges(tmp2) [,1] [1,] -2.415011 [2,] 3.107481 > > 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] -3.02339071 2.52612052 0.48384241 3.84410378 -4.12147498 2.51955483 [7] 0.36625860 3.51581575 2.85386628 0.07391468 > colApply(tmp,quantile)[,1] [,1] [1,] -1.4003272 [2,] -1.0289191 [3,] -0.1300170 [4,] 0.1371913 [5,] 1.1265231 > > rowApply(tmp,sum) [1] 1.5629562 5.1370871 4.3925205 -2.7999580 -5.2412228 3.0130592 [7] 3.7255532 1.9890649 -0.9468868 -1.7935623 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 4 6 1 4 7 5 9 5 1 2 [2,] 2 1 10 10 1 4 10 7 4 5 [3,] 10 8 5 3 10 10 1 1 8 1 [4,] 6 10 9 9 4 2 2 3 10 9 [5,] 5 7 2 2 3 3 8 2 6 3 [6,] 7 2 7 1 9 8 7 8 7 6 [7,] 9 5 3 6 8 6 4 4 3 4 [8,] 8 4 8 7 6 9 6 9 5 7 [9,] 1 3 4 5 5 7 3 10 9 8 [10,] 3 9 6 8 2 1 5 6 2 10 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 3.04918928 -2.48957645 2.31470620 0.04378726 -0.03404640 -3.02856134 [7] 1.87984646 1.35348129 -0.16893324 -1.37253392 -1.24436352 2.45093626 [13] 0.92672496 -1.47707871 0.56682633 -1.70305681 -3.04084357 4.13506521 [19] -1.38451588 0.54181923 > colApply(tmp,quantile)[,1] [,1] [1,] 0.3191131 [2,] 0.4166736 [3,] 0.6001565 [4,] 0.6339384 [5,] 1.0793077 > > rowApply(tmp,sum) [1] -5.5947748 0.2601861 -1.5558882 6.5576699 1.6516797 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 16 17 15 12 16 [2,] 9 6 6 13 2 [3,] 1 18 19 14 18 [4,] 4 3 13 16 14 [5,] 12 16 4 15 10 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.3191131 -0.3590507 -1.9992236 -1.1048607 -0.22761430 -0.5642831 [2,] 0.6001565 -0.4003945 0.6809639 -0.9203606 0.40259452 -0.6250996 [3,] 0.4166736 -0.6813511 1.5023581 0.3142980 -1.03814046 -1.6199179 [4,] 0.6339384 0.6397820 0.6499784 0.9519672 0.82546726 0.3477626 [5,] 1.0793077 -1.6885622 1.4806294 0.8027433 0.00364657 -0.5670234 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.1444734 -0.61613804 -0.3926672 -1.8535216 -0.4865987 0.04757932 [2,] 0.3706164 0.28237773 -0.3613289 -1.0658457 -0.3717784 -0.27783075 [3,] 1.3229788 0.41471426 -0.8260935 0.1427160 0.6589193 1.69709409 [4,] -0.4462589 1.32878710 -0.2739782 1.2912155 0.3660150 0.11855450 [5,] -0.5119632 -0.05625976 1.6851344 0.1129018 -1.4109207 0.86553910 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.8112505 -0.29775037 0.09353876 -0.2352686 -1.95802957 1.48283918 [2,] 0.2235993 0.18790654 2.34022050 0.9216582 -0.94893048 -0.07990842 [3,] -1.5502874 -1.81281244 0.44261178 0.1511692 0.16151662 -0.11724373 [4,] 1.0631810 0.40604270 -0.13109441 -1.2652889 -0.09448154 0.95587944 [5,] 0.3789817 0.03953485 -2.17845030 -1.2753268 -0.20091859 1.89349875 [,19] [,20] [1,] 0.2742278 0.3272095 [2,] -0.5810918 -0.1173384 [3,] -0.5342772 -0.6008143 [4,] -0.3051092 -0.5046902 [5,] -0.2382655 1.4374527 > > > 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 : 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.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.8756045 0.7530689 1.004273 0.955766 0.7949254 -0.5561189 -1.388445 col8 col9 col10 col11 col12 col13 col14 row1 0.4009625 0.3209922 0.1988664 -0.5114388 0.2705597 0.7119961 -0.2210819 col15 col16 col17 col18 col19 col20 row1 0.2200104 0.6127659 0.0176746 -0.02533031 -0.8338459 -0.5588344 > tmp[,"col10"] col10 row1 0.1988664 row2 -0.7982170 row3 0.3375803 row4 -0.6672908 row5 0.3878439 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.8756045 0.7530689 1.0042735 0.955766 0.79492544 -0.5561189 -1.3884445 row5 1.1160476 -1.1259480 0.6584017 1.278245 -0.04193009 -1.5837428 0.4941203 col8 col9 col10 col11 col12 col13 row1 0.4009625 0.3209922 0.1988664 -0.5114388 0.2705597 0.711996102 row5 0.1135958 -1.1517924 0.3878439 -2.8174987 -0.3584463 -0.006046278 col14 col15 col16 col17 col18 col19 row1 -0.2210819 0.2200104 0.6127659 0.0176746 -0.02533031 -0.8338459 row5 -1.6783968 -0.3594893 0.7716740 -1.2153680 2.66729965 0.1776801 col20 row1 -0.55883444 row5 -0.01618682 > tmp[,c("col6","col20")] col6 col20 row1 -0.5561189 -0.55883444 row2 -0.1639550 1.36301698 row3 0.3490667 1.66860041 row4 0.3924656 -0.97888950 row5 -1.5837428 -0.01618682 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.5561189 -0.55883444 row5 -1.5837428 -0.01618682 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.78911 50.44492 50.69014 49.48236 50.57722 103.5683 50.992 51.17415 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.0757 48.4772 49.52317 49.04378 51.24734 49.57205 48.96454 48.40298 col17 col18 col19 col20 row1 49.32744 48.35496 50.01789 104.7076 > tmp[,"col10"] col10 row1 48.47720 row2 30.22221 row3 27.91739 row4 30.47765 row5 52.26086 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.78911 50.44492 50.69014 49.48236 50.57722 103.5683 50.99200 51.17415 row5 51.48872 49.96583 50.27883 49.60530 50.95243 103.3005 51.31731 49.75935 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.07570 48.47720 49.52317 49.04378 51.24734 49.57205 48.96454 48.40298 row5 49.78323 52.26086 50.12495 48.29657 50.59907 50.53762 50.18277 48.73088 col17 col18 col19 col20 row1 49.32744 48.35496 50.01789 104.7076 row5 50.36430 50.57093 50.18296 106.1461 > tmp[,c("col6","col20")] col6 col20 row1 103.56832 104.70757 row2 75.48257 76.36265 row3 77.14861 74.54892 row4 74.63881 73.95790 row5 103.30049 106.14615 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.5683 104.7076 row5 103.3005 106.1461 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.5683 104.7076 row5 103.3005 106.1461 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.89176053 [2,] 0.02223051 [3,] -0.99300891 [4,] -0.40895089 [5,] 0.05478379 > tmp[,c("col17","col7")] col17 col7 [1,] -0.5163000 -0.6617101 [2,] -0.3379845 0.8208798 [3,] 1.4228371 -2.2691854 [4,] 1.8128832 -0.5392365 [5,] -1.0027623 -0.1019240 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.04538169 -0.2219007 [2,] 0.91887868 0.7045047 [3,] -0.26087353 -0.2930676 [4,] -1.00738708 -0.1637065 [5,] -0.15198536 1.4730527 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.04538169 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.04538169 [2,] 0.91887868 > > > > 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.43571068 1.23534473 0.2833858 -1.2272624 0.5494649 0.6587792 row1 0.07506221 0.03835171 -0.3677845 0.8434385 -1.6160020 -0.6164605 [,7] [,8] [,9] [,10] [,11] [,12] row3 1.880744 0.03170318 -0.6045435 -0.009878405 0.3164664 0.1585600 row1 -1.071669 1.28600206 0.9365374 0.670768806 -0.6490300 -0.4469924 [,13] [,14] [,15] [,16] [,17] [,18] [,19] row3 1.1390579 -0.3745752 1.3534945 1.559918 0.4895284 0.8147939 1.3214732 row1 0.7316416 -1.7847743 -0.3649464 1.445804 0.5820335 0.4732817 -0.2468821 [,20] row3 0.948231 row1 -2.463888 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] row2 1.997645 1.224278 -1.119938 0.88007 -0.9667798 1.743131 -0.5369 0.8230322 [,9] [,10] row2 0.08262818 0.6335058 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.08124687 -1.002381 -0.5410322 0.4722769 1.067682 2.115163 0.02608441 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.8402338 0.1458937 -1.435353 -0.5899406 -0.2532765 -0.02511653 1.046487 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.2343986 1.076928 -1.078721 -0.592244 -0.1569466 -0.51247 > > > 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: 0x5d5ec0a31ab0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM207317580933bb" [2] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2073174c7bcc2f" [3] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM207317390d730d" [4] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM207317d42e4c1" [5] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM207317331a30a6" [6] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2073176f5ea194" [7] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2073177353fa13" [8] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM20731741a019f9" [9] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM20731722abb170" [10] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM20731736511062" [11] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2073171504ec9" [12] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2073176207d026" [13] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2073171f7b5351" [14] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM207317fec73a3" [15] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2073176dc52cb3" > > > ### 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: 0x5d5ec2aa6b00> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x5d5ec2aa6b00> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x5d5ec2aa6b00> > rowMedians(tmp) [1] 0.5050560243 -0.1149095217 -0.3306637565 -0.1099351846 0.1727226195 [6] 0.0892449827 -0.2534144519 -0.1767127107 0.2280980625 0.2322263392 [11] -0.2195923120 0.4588244254 -0.0114824385 -0.9542716629 0.2071987703 [16] -0.6225125296 0.1555808335 0.3503300953 0.1280548781 0.0051254529 [21] 0.0969783868 -0.2243026945 -0.0248780880 -0.2585351610 -0.2669284488 [26] 0.0897615964 0.2576129072 -0.3485673155 0.2201822880 0.4583883179 [31] 0.5942039670 -0.1729015519 0.1730925013 -0.4389348136 -0.0617757765 [36] -0.0183534439 -0.6379079535 0.1717587599 -0.9821681622 0.1151405701 [41] 0.1535075770 0.0717543414 -0.0802657380 0.3861235575 -0.0823524079 [46] -0.2895797481 -0.0515673221 -0.1967090431 -0.0971328335 -0.2841350481 [51] -0.0993056477 0.1067916988 -0.1085977679 0.1467486303 0.0852034974 [56] -0.2382603691 0.1097276338 -0.8493401707 -0.5080911867 0.2916128697 [61] -0.4049761771 0.0623694817 -0.0994621956 0.2344516205 -0.0591918398 [66] -0.2407579055 -0.0658244429 -0.0213627691 -0.1321235731 0.1004934443 [71] 0.0462473752 -0.0545719092 0.9263785882 -0.7079399733 0.0653255880 [76] -0.2703272981 -0.2128513921 0.1005797142 -0.2443148473 0.0397769376 [81] -0.4192906725 0.0403865738 0.1386233917 0.1914819314 -0.3058612664 [86] 0.4172316158 0.1121750067 -0.2691651381 0.1882377889 -0.1027299175 [91] 0.0419608788 0.0139214345 0.2326137118 -0.0001199198 0.2817794810 [96] 0.0229457274 0.6678010804 0.3266011480 0.1041553831 -0.3414110767 [101] 0.2678100078 0.7179173722 -0.1956602436 -0.0915348318 -0.4361706282 [106] 0.2541675080 -0.1564577724 0.4337191740 -0.2281208003 -0.6111937017 [111] 0.0532458748 0.2990800102 0.3317692235 0.2553152038 -0.2494065980 [116] -0.0132065292 0.0789266116 0.2934503772 -0.2610435063 0.3751043946 [121] -0.3770205796 -0.0512175931 0.1440775020 -0.2466493028 0.6214905011 [126] 0.5532046270 0.2473148735 0.2940019743 0.3640115515 -0.2253743801 [131] 0.1828621240 1.0871216958 0.5328784370 -0.3322278152 -0.2484014999 [136] 0.1139770146 -0.4319798988 -0.6543210818 -0.2094255254 0.0354413066 [141] 0.4213686334 0.0141247783 -0.2404306765 -0.4124426487 0.3104533233 [146] 0.3255757414 0.3933105176 -0.2283312485 -0.1029755487 0.1659685249 [151] 0.1079488812 0.0639965724 0.3848286192 0.3680622001 -0.2487560603 [156] 0.1952351751 0.4121561477 0.8823591780 -0.1734282176 -0.1230750844 [161] 0.2893405715 0.1009248520 -0.1500305295 -0.3825744960 -0.1417918623 [166] 0.1013532543 0.6318008289 -0.3097990526 0.3013010000 -0.1033320759 [171] 0.2927754537 0.0456961429 0.2146753629 -0.3792425649 0.1241532361 [176] -0.3059125734 -0.5964682805 0.3034568388 -0.5444558856 -0.1646205288 [181] 0.7775459007 -0.4303992100 -0.3505480242 0.6727938559 0.1971840266 [186] 0.0025551399 -0.1412188327 0.2895044279 -0.2431194119 -0.1569987052 [191] -0.2211983164 0.3232200232 -0.0923584142 0.1898609516 0.3944117078 [196] 0.3048387681 0.1319438287 -0.0502659733 0.1238681419 -0.2035241478 [201] -0.1404638395 0.0202733109 0.2243906874 -0.2181727694 -0.5985898897 [206] -0.0287636693 0.4280562678 -0.3024749454 0.2229096591 -0.5633897115 [211] -0.2661576127 -0.7879199690 0.2694544451 0.1848565819 -0.3484806460 [216] -0.0375796646 -0.2735925681 -0.1840508011 0.1917171920 0.3035105779 [221] 0.6744741629 0.3707925167 -0.1430310076 0.0138609726 0.1863957683 [226] -0.0582106297 0.2768149483 0.5824074492 -0.0515790478 0.4281705015 > > proc.time() user system elapsed 1.223 0.674 1.886
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: 0x5ef1a742d130> > .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: 0x5ef1a742d130> > .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: 0x5ef1a742d130> > .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: 0x5ef1a742d130> > 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: 0x5ef1a74784e0> > .Call("R_bm_AddColumn",P) <pointer: 0x5ef1a74784e0> > .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: 0x5ef1a74784e0> > .Call("R_bm_AddColumn",P) <pointer: 0x5ef1a74784e0> > .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: 0x5ef1a74784e0> > 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: 0x5ef1a57effd0> > .Call("R_bm_AddColumn",P) <pointer: 0x5ef1a57effd0> > .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: 0x5ef1a57effd0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5ef1a57effd0> > .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: 0x5ef1a57effd0> > > .Call("R_bm_RowMode",P) <pointer: 0x5ef1a57effd0> > .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: 0x5ef1a57effd0> > > .Call("R_bm_ColMode",P) <pointer: 0x5ef1a57effd0> > .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: 0x5ef1a57effd0> > 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: 0x5ef1a6e2ec20> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x5ef1a6e2ec20> > .Call("R_bm_AddColumn",P) <pointer: 0x5ef1a6e2ec20> > .Call("R_bm_AddColumn",P) <pointer: 0x5ef1a6e2ec20> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile2074c914c52f0f" "BufferedMatrixFile2074c9a041213" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile2074c914c52f0f" "BufferedMatrixFile2074c9a041213" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x5ef1a4c10d60> > .Call("R_bm_AddColumn",P) <pointer: 0x5ef1a4c10d60> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5ef1a4c10d60> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5ef1a4c10d60> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x5ef1a4c10d60> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x5ef1a4c10d60> > .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: 0x5ef1a5cd46e0> > .Call("R_bm_AddColumn",P) <pointer: 0x5ef1a5cd46e0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5ef1a5cd46e0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x5ef1a5cd46e0> > 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: 0x5ef1a5d8d160> > .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: 0x5ef1a5d8d160> > rm(P) > > proc.time() user system elapsed 0.218 0.052 0.258
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.258 0.039 0.284