Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2025-01-09 12:04 -0500 (Thu, 09 Jan 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4744 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.2 (2024-10-31 ucrt) -- "Pile of Leaves" | 4487 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4515 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4467 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4358 |
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-01-02 20:28:19 -0500 (Thu, 02 Jan 2025) |
EndedAt: 2025-01-02 20:28:42 -0500 (Thu, 02 Jan 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.2 (2024-10-31) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 GNU Fortran (Ubuntu 13.2.0-23ubuntu4) 13.2.0 * running under: Ubuntu 24.04.1 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.2 (2024-10-31) -- "Pile of Leaves" Copyright (C) 2024 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.050 0.273
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.2 (2024-10-31) -- "Pile of Leaves" Copyright (C) 2024 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 471792 25.2 1026261 54.9 643431 34.4 Vcells 871947 6.7 8388608 64.0 2046621 15.7 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Thu Jan 2 20:28:34 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 Jan 2 20:28:34 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: 0x5ba02f9672a0> > > > > 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 Jan 2 20:28:34 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 Jan 2 20:28:34 2025" > > ColMode(tmp2) <pointer: 0x5ba02f9672a0> > > > > ### 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,] 98.2343317 0.05270518 0.355764975 0.5648359 [2,] 0.8598121 1.55563853 0.661862368 -0.9884364 [3,] 1.2354303 -0.87905449 -1.714955000 -1.0326256 [4,] 0.2525230 0.02921777 -0.007779454 -0.7137423 > 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,] 98.2343317 0.05270518 0.355764975 0.5648359 [2,] 0.8598121 1.55563853 0.661862368 0.9884364 [3,] 1.2354303 0.87905449 1.714955000 1.0326256 [4,] 0.2525230 0.02921777 0.007779454 0.7137423 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9113234 0.2295761 0.59646037 0.7515556 [2,] 0.9272605 1.2472524 0.81354924 0.9942014 [3,] 1.1114991 0.9375791 1.30956290 1.0161819 [4,] 0.5025166 0.1709321 0.08820121 0.8448327 > > 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,] 222.34757 27.34847 31.32037 33.08039 [2,] 35.13242 39.02816 33.79735 35.93045 [3,] 37.35042 35.25485 39.81058 36.19444 [4,] 30.27769 26.73854 25.88979 34.16207 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x5ba02f97f510> > exp(tmp5) <pointer: 0x5ba02f97f510> > log(tmp5,2) <pointer: 0x5ba02f97f510> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 462.7873 > Min(tmp5) [1] 53.88621 > mean(tmp5) [1] 72.45576 > Sum(tmp5) [1] 14491.15 > Var(tmp5) [1] 834.3136 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 88.60703 71.07740 72.99749 68.10647 68.89227 68.72571 72.24811 72.41608 [9] 69.70766 71.77940 > rowSums(tmp5) [1] 1772.141 1421.548 1459.950 1362.129 1377.845 1374.514 1444.962 1448.322 [9] 1394.153 1435.588 > rowVars(tmp5) [1] 7823.41254 51.53787 40.47958 79.77519 54.55537 75.33549 [7] 67.95325 85.96726 67.92178 58.09400 > rowSd(tmp5) [1] 88.450057 7.178988 6.362357 8.931696 7.386161 8.679602 8.243376 [8] 9.271853 8.241467 7.621942 > rowMax(tmp5) [1] 462.78733 81.24670 83.41698 84.17032 81.95400 84.36099 86.75527 [8] 89.73012 85.35878 86.36205 > rowMin(tmp5) [1] 55.40426 55.57858 57.85857 53.88621 57.18616 55.19586 59.42873 57.46288 [9] 60.32684 57.06416 > > colMeans(tmp5) [1] 112.96203 65.09319 68.18878 68.38085 71.73691 68.67088 75.42791 [8] 74.52377 71.96010 68.17840 69.66798 69.71697 72.68818 66.95671 [15] 68.09644 69.37338 72.72552 73.45579 72.13182 69.17959 > colSums(tmp5) [1] 1129.6203 650.9319 681.8878 683.8085 717.3691 686.7088 754.2791 [8] 745.2377 719.6010 681.7840 696.6798 697.1697 726.8818 669.5671 [15] 680.9644 693.7338 727.2552 734.5579 721.3182 691.7959 > colVars(tmp5) [1] 15134.87285 72.45543 88.55952 30.42360 85.68485 56.19511 [7] 132.92374 81.74520 42.38317 57.93545 80.32564 52.24486 [13] 32.10635 59.91509 57.43576 51.98654 77.39002 76.26823 [19] 56.19246 51.38613 > colSd(tmp5) [1] 123.023871 8.512075 9.410607 5.515759 9.256611 7.496340 [7] 11.529256 9.041305 6.510236 7.611534 8.962457 7.228061 [13] 5.666247 7.740484 7.578639 7.210169 8.797160 8.733168 [19] 7.496163 7.168412 > colMax(tmp5) [1] 462.78733 81.23201 84.99894 75.33399 86.75527 82.22512 89.73012 [8] 86.36205 79.00639 78.37090 85.66667 83.41698 80.85878 78.77099 [15] 76.66537 83.17828 85.35878 85.83938 84.36099 81.17251 > colMin(tmp5) [1] 63.01904 55.65276 53.88621 59.43771 55.40426 57.18616 55.19586 62.82960 [9] 59.15116 57.01026 58.11594 57.86128 62.40433 55.57858 57.06416 60.50761 [17] 59.42873 58.70368 61.61869 57.85857 > > > ### 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.60703 71.07740 72.99749 68.10647 68.89227 68.72571 72.24811 72.41608 [9] NA 71.77940 > rowSums(tmp5) [1] 1772.141 1421.548 1459.950 1362.129 1377.845 1374.514 1444.962 1448.322 [9] NA 1435.588 > rowVars(tmp5) [1] 7823.41254 51.53787 40.47958 79.77519 54.55537 75.33549 [7] 67.95325 85.96726 71.62458 58.09400 > rowSd(tmp5) [1] 88.450057 7.178988 6.362357 8.931696 7.386161 8.679602 8.243376 [8] 9.271853 8.463131 7.621942 > rowMax(tmp5) [1] 462.78733 81.24670 83.41698 84.17032 81.95400 84.36099 86.75527 [8] 89.73012 NA 86.36205 > rowMin(tmp5) [1] 55.40426 55.57858 57.85857 53.88621 57.18616 55.19586 59.42873 57.46288 [9] NA 57.06416 > > colMeans(tmp5) [1] 112.96203 65.09319 68.18878 68.38085 71.73691 68.67088 75.42791 [8] 74.52377 71.96010 NA 69.66798 69.71697 72.68818 66.95671 [15] 68.09644 69.37338 72.72552 73.45579 72.13182 69.17959 > colSums(tmp5) [1] 1129.6203 650.9319 681.8878 683.8085 717.3691 686.7088 754.2791 [8] 745.2377 719.6010 NA 696.6798 697.1697 726.8818 669.5671 [15] 680.9644 693.7338 727.2552 734.5579 721.3182 691.7959 > colVars(tmp5) [1] 15134.87285 72.45543 88.55952 30.42360 85.68485 56.19511 [7] 132.92374 81.74520 42.38317 NA 80.32564 52.24486 [13] 32.10635 59.91509 57.43576 51.98654 77.39002 76.26823 [19] 56.19246 51.38613 > colSd(tmp5) [1] 123.023871 8.512075 9.410607 5.515759 9.256611 7.496340 [7] 11.529256 9.041305 6.510236 NA 8.962457 7.228061 [13] 5.666247 7.740484 7.578639 7.210169 8.797160 8.733168 [19] 7.496163 7.168412 > colMax(tmp5) [1] 462.78733 81.23201 84.99894 75.33399 86.75527 82.22512 89.73012 [8] 86.36205 79.00639 NA 85.66667 83.41698 80.85878 78.77099 [15] 76.66537 83.17828 85.35878 85.83938 84.36099 81.17251 > colMin(tmp5) [1] 63.01904 55.65276 53.88621 59.43771 55.40426 57.18616 55.19586 62.82960 [9] 59.15116 NA 58.11594 57.86128 62.40433 55.57858 57.06416 60.50761 [17] 59.42873 58.70368 61.61869 57.85857 > > Max(tmp5,na.rm=TRUE) [1] 462.7873 > Min(tmp5,na.rm=TRUE) [1] 53.88621 > mean(tmp5,na.rm=TRUE) [1] 72.47509 > Sum(tmp5,na.rm=TRUE) [1] 14422.54 > Var(tmp5,na.rm=TRUE) [1] 838.4521 > > rowMeans(tmp5,na.rm=TRUE) [1] 88.60703 71.07740 72.99749 68.10647 68.89227 68.72571 72.24811 72.41608 [9] 69.76550 71.77940 > rowSums(tmp5,na.rm=TRUE) [1] 1772.141 1421.548 1459.950 1362.129 1377.845 1374.514 1444.962 1448.322 [9] 1325.544 1435.588 > rowVars(tmp5,na.rm=TRUE) [1] 7823.41254 51.53787 40.47958 79.77519 54.55537 75.33549 [7] 67.95325 85.96726 71.62458 58.09400 > rowSd(tmp5,na.rm=TRUE) [1] 88.450057 7.178988 6.362357 8.931696 7.386161 8.679602 8.243376 [8] 9.271853 8.463131 7.621942 > rowMax(tmp5,na.rm=TRUE) [1] 462.78733 81.24670 83.41698 84.17032 81.95400 84.36099 86.75527 [8] 89.73012 85.35878 86.36205 > rowMin(tmp5,na.rm=TRUE) [1] 55.40426 55.57858 57.85857 53.88621 57.18616 55.19586 59.42873 57.46288 [9] 60.32684 57.06416 > > colMeans(tmp5,na.rm=TRUE) [1] 112.96203 65.09319 68.18878 68.38085 71.73691 68.67088 75.42791 [8] 74.52377 71.96010 68.13059 69.66798 69.71697 72.68818 66.95671 [15] 68.09644 69.37338 72.72552 73.45579 72.13182 69.17959 > colSums(tmp5,na.rm=TRUE) [1] 1129.6203 650.9319 681.8878 683.8085 717.3691 686.7088 754.2791 [8] 745.2377 719.6010 613.1753 696.6798 697.1697 726.8818 669.5671 [15] 680.9644 693.7338 727.2552 734.5579 721.3182 691.7959 > colVars(tmp5,na.rm=TRUE) [1] 15134.87285 72.45543 88.55952 30.42360 85.68485 56.19511 [7] 132.92374 81.74520 42.38317 65.15166 80.32564 52.24486 [13] 32.10635 59.91509 57.43576 51.98654 77.39002 76.26823 [19] 56.19246 51.38613 > colSd(tmp5,na.rm=TRUE) [1] 123.023871 8.512075 9.410607 5.515759 9.256611 7.496340 [7] 11.529256 9.041305 6.510236 8.071658 8.962457 7.228061 [13] 5.666247 7.740484 7.578639 7.210169 8.797160 8.733168 [19] 7.496163 7.168412 > colMax(tmp5,na.rm=TRUE) [1] 462.78733 81.23201 84.99894 75.33399 86.75527 82.22512 89.73012 [8] 86.36205 79.00639 78.37090 85.66667 83.41698 80.85878 78.77099 [15] 76.66537 83.17828 85.35878 85.83938 84.36099 81.17251 > colMin(tmp5,na.rm=TRUE) [1] 63.01904 55.65276 53.88621 59.43771 55.40426 57.18616 55.19586 62.82960 [9] 59.15116 57.01026 58.11594 57.86128 62.40433 55.57858 57.06416 60.50761 [17] 59.42873 58.70368 61.61869 57.85857 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 88.60703 71.07740 72.99749 68.10647 68.89227 68.72571 72.24811 72.41608 [9] NaN 71.77940 > rowSums(tmp5,na.rm=TRUE) [1] 1772.141 1421.548 1459.950 1362.129 1377.845 1374.514 1444.962 1448.322 [9] 0.000 1435.588 > rowVars(tmp5,na.rm=TRUE) [1] 7823.41254 51.53787 40.47958 79.77519 54.55537 75.33549 [7] 67.95325 85.96726 NA 58.09400 > rowSd(tmp5,na.rm=TRUE) [1] 88.450057 7.178988 6.362357 8.931696 7.386161 8.679602 8.243376 [8] 9.271853 NA 7.621942 > rowMax(tmp5,na.rm=TRUE) [1] 462.78733 81.24670 83.41698 84.17032 81.95400 84.36099 86.75527 [8] 89.73012 NA 86.36205 > rowMin(tmp5,na.rm=TRUE) [1] 55.40426 55.57858 57.85857 53.88621 57.18616 55.19586 59.42873 57.46288 [9] NA 57.06416 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 117.96869 65.45811 68.15724 69.07349 72.21609 69.59800 74.81469 [8] 75.56368 72.97740 NaN 70.62958 70.21934 72.92104 67.67857 [15] 67.16598 67.83950 71.32183 73.94072 70.78310 68.76450 > colSums(tmp5,na.rm=TRUE) [1] 1061.7182 589.1230 613.4152 621.6615 649.9448 626.3820 673.3322 [8] 680.0732 656.7966 0.0000 635.6662 631.9740 656.2893 609.1071 [15] 604.4938 610.5555 641.8965 665.4665 637.0479 618.8805 > colVars(tmp5,na.rm=TRUE) [1] 16744.73196 80.01423 99.61827 28.82936 93.81233 53.54963 [7] 145.30872 79.79742 36.03846 NA 79.96383 55.93631 [13] 35.50965 61.54242 54.87559 32.01607 64.89721 83.15629 [19] 42.75210 55.87096 > colSd(tmp5,na.rm=TRUE) [1] 129.401437 8.945067 9.980895 5.369298 9.685677 7.317761 [7] 12.054407 8.932940 6.003204 NA 8.942250 7.479058 [13] 5.958997 7.844898 7.407806 5.658275 8.055881 9.119007 [19] 6.538509 7.474688 > colMax(tmp5,na.rm=TRUE) [1] 462.78733 81.23201 84.99894 75.33399 86.75527 82.22512 89.73012 [8] 86.36205 79.00639 -Inf 85.66667 83.41698 80.85878 78.77099 [15] 76.66537 76.63141 83.65683 85.83938 84.36099 81.17251 > colMin(tmp5,na.rm=TRUE) [1] 63.01904 55.65276 53.88621 59.43771 55.40426 57.18616 55.19586 62.82960 [9] 59.15116 Inf 58.11594 57.86128 62.40433 55.57858 57.06416 60.50761 [17] 59.42873 58.70368 61.61869 57.85857 > > > > > 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] 196.7450 168.1291 166.7786 216.5723 187.6105 206.0328 237.5851 234.9929 [9] 223.1086 194.7980 > apply(copymatrix,1,var,na.rm=TRUE) [1] 196.7450 168.1291 166.7786 216.5723 187.6105 206.0328 237.5851 234.9929 [9] 223.1086 194.7980 > > > > 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] -8.526513e-14 -1.136868e-13 1.136868e-13 1.136868e-13 2.842171e-14 [6] 1.136868e-13 -1.705303e-13 -1.563194e-13 -2.842171e-14 -5.684342e-14 [11] 5.684342e-14 1.136868e-13 5.684342e-14 1.136868e-13 -2.273737e-13 [16] 2.842171e-13 2.273737e-13 2.842171e-13 3.694822e-13 1.563194e-13 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 5 12 9 5 6 18 9 20 6 8 3 1 7 12 9 5 8 17 4 16 6 7 6 16 7 6 1 18 8 13 7 8 10 20 5 3 9 6 10 12 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.273439 > Min(tmp) [1] -2.844432 > mean(tmp) [1] 0.03635851 > Sum(tmp) [1] 3.635851 > Var(tmp) [1] 1.094351 > > rowMeans(tmp) [1] 0.03635851 > rowSums(tmp) [1] 3.635851 > rowVars(tmp) [1] 1.094351 > rowSd(tmp) [1] 1.046112 > rowMax(tmp) [1] 2.273439 > rowMin(tmp) [1] -2.844432 > > colMeans(tmp) [1] -0.530900098 -0.401340444 0.920680501 -1.261051597 -0.492946245 [6] 1.593223146 0.604010316 0.902346204 1.877231668 0.291766533 [11] -0.916996916 1.657923788 -0.970384692 0.570031650 1.617061554 [16] 0.369966583 0.460491665 0.223227732 -0.263668003 -0.590055923 [21] 0.697181893 -0.294350719 0.497949369 -0.397178995 0.310225523 [26] -2.070585325 1.368098872 0.550523944 -0.956486878 -2.083170224 [31] 0.168655310 0.197451220 0.433023903 -0.389454648 -0.070871861 [36] 0.023398243 -0.535566973 0.609949807 -0.089977730 -0.094467259 [41] 0.262208110 -0.515208393 -0.389641480 1.026526322 -1.590020547 [46] -1.128901217 0.680887362 1.553961278 -1.018618618 1.825233556 [51] -2.844431735 -0.001686586 -1.693547677 0.755553286 -0.924634255 [56] 0.533306176 0.935857164 0.502406096 -0.174763468 -0.786322423 [61] 0.582367349 1.154141633 -0.423985756 -1.372679327 0.541154717 [66] -0.428920219 -1.691260257 0.862797815 -1.564587734 0.858528861 [71] -1.337396363 0.515807409 -1.322330808 0.223169487 0.769790037 [76] 0.512390566 -0.174602178 -0.640717088 1.571738905 0.679297814 [81] 1.881355440 -0.218952830 2.273439481 1.058069090 -1.982183691 [86] 1.188103805 -0.920276320 0.403875191 -0.043092790 -0.455546513 [91] 0.288407217 1.082501519 0.129137154 0.802107762 0.470303921 [96] -0.021493695 0.008316929 -1.740396588 -2.218452941 1.792796489 > colSums(tmp) [1] -0.530900098 -0.401340444 0.920680501 -1.261051597 -0.492946245 [6] 1.593223146 0.604010316 0.902346204 1.877231668 0.291766533 [11] -0.916996916 1.657923788 -0.970384692 0.570031650 1.617061554 [16] 0.369966583 0.460491665 0.223227732 -0.263668003 -0.590055923 [21] 0.697181893 -0.294350719 0.497949369 -0.397178995 0.310225523 [26] -2.070585325 1.368098872 0.550523944 -0.956486878 -2.083170224 [31] 0.168655310 0.197451220 0.433023903 -0.389454648 -0.070871861 [36] 0.023398243 -0.535566973 0.609949807 -0.089977730 -0.094467259 [41] 0.262208110 -0.515208393 -0.389641480 1.026526322 -1.590020547 [46] -1.128901217 0.680887362 1.553961278 -1.018618618 1.825233556 [51] -2.844431735 -0.001686586 -1.693547677 0.755553286 -0.924634255 [56] 0.533306176 0.935857164 0.502406096 -0.174763468 -0.786322423 [61] 0.582367349 1.154141633 -0.423985756 -1.372679327 0.541154717 [66] -0.428920219 -1.691260257 0.862797815 -1.564587734 0.858528861 [71] -1.337396363 0.515807409 -1.322330808 0.223169487 0.769790037 [76] 0.512390566 -0.174602178 -0.640717088 1.571738905 0.679297814 [81] 1.881355440 -0.218952830 2.273439481 1.058069090 -1.982183691 [86] 1.188103805 -0.920276320 0.403875191 -0.043092790 -0.455546513 [91] 0.288407217 1.082501519 0.129137154 0.802107762 0.470303921 [96] -0.021493695 0.008316929 -1.740396588 -2.218452941 1.792796489 > 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.530900098 -0.401340444 0.920680501 -1.261051597 -0.492946245 [6] 1.593223146 0.604010316 0.902346204 1.877231668 0.291766533 [11] -0.916996916 1.657923788 -0.970384692 0.570031650 1.617061554 [16] 0.369966583 0.460491665 0.223227732 -0.263668003 -0.590055923 [21] 0.697181893 -0.294350719 0.497949369 -0.397178995 0.310225523 [26] -2.070585325 1.368098872 0.550523944 -0.956486878 -2.083170224 [31] 0.168655310 0.197451220 0.433023903 -0.389454648 -0.070871861 [36] 0.023398243 -0.535566973 0.609949807 -0.089977730 -0.094467259 [41] 0.262208110 -0.515208393 -0.389641480 1.026526322 -1.590020547 [46] -1.128901217 0.680887362 1.553961278 -1.018618618 1.825233556 [51] -2.844431735 -0.001686586 -1.693547677 0.755553286 -0.924634255 [56] 0.533306176 0.935857164 0.502406096 -0.174763468 -0.786322423 [61] 0.582367349 1.154141633 -0.423985756 -1.372679327 0.541154717 [66] -0.428920219 -1.691260257 0.862797815 -1.564587734 0.858528861 [71] -1.337396363 0.515807409 -1.322330808 0.223169487 0.769790037 [76] 0.512390566 -0.174602178 -0.640717088 1.571738905 0.679297814 [81] 1.881355440 -0.218952830 2.273439481 1.058069090 -1.982183691 [86] 1.188103805 -0.920276320 0.403875191 -0.043092790 -0.455546513 [91] 0.288407217 1.082501519 0.129137154 0.802107762 0.470303921 [96] -0.021493695 0.008316929 -1.740396588 -2.218452941 1.792796489 > colMin(tmp) [1] -0.530900098 -0.401340444 0.920680501 -1.261051597 -0.492946245 [6] 1.593223146 0.604010316 0.902346204 1.877231668 0.291766533 [11] -0.916996916 1.657923788 -0.970384692 0.570031650 1.617061554 [16] 0.369966583 0.460491665 0.223227732 -0.263668003 -0.590055923 [21] 0.697181893 -0.294350719 0.497949369 -0.397178995 0.310225523 [26] -2.070585325 1.368098872 0.550523944 -0.956486878 -2.083170224 [31] 0.168655310 0.197451220 0.433023903 -0.389454648 -0.070871861 [36] 0.023398243 -0.535566973 0.609949807 -0.089977730 -0.094467259 [41] 0.262208110 -0.515208393 -0.389641480 1.026526322 -1.590020547 [46] -1.128901217 0.680887362 1.553961278 -1.018618618 1.825233556 [51] -2.844431735 -0.001686586 -1.693547677 0.755553286 -0.924634255 [56] 0.533306176 0.935857164 0.502406096 -0.174763468 -0.786322423 [61] 0.582367349 1.154141633 -0.423985756 -1.372679327 0.541154717 [66] -0.428920219 -1.691260257 0.862797815 -1.564587734 0.858528861 [71] -1.337396363 0.515807409 -1.322330808 0.223169487 0.769790037 [76] 0.512390566 -0.174602178 -0.640717088 1.571738905 0.679297814 [81] 1.881355440 -0.218952830 2.273439481 1.058069090 -1.982183691 [86] 1.188103805 -0.920276320 0.403875191 -0.043092790 -0.455546513 [91] 0.288407217 1.082501519 0.129137154 0.802107762 0.470303921 [96] -0.021493695 0.008316929 -1.740396588 -2.218452941 1.792796489 > colMedians(tmp) [1] -0.530900098 -0.401340444 0.920680501 -1.261051597 -0.492946245 [6] 1.593223146 0.604010316 0.902346204 1.877231668 0.291766533 [11] -0.916996916 1.657923788 -0.970384692 0.570031650 1.617061554 [16] 0.369966583 0.460491665 0.223227732 -0.263668003 -0.590055923 [21] 0.697181893 -0.294350719 0.497949369 -0.397178995 0.310225523 [26] -2.070585325 1.368098872 0.550523944 -0.956486878 -2.083170224 [31] 0.168655310 0.197451220 0.433023903 -0.389454648 -0.070871861 [36] 0.023398243 -0.535566973 0.609949807 -0.089977730 -0.094467259 [41] 0.262208110 -0.515208393 -0.389641480 1.026526322 -1.590020547 [46] -1.128901217 0.680887362 1.553961278 -1.018618618 1.825233556 [51] -2.844431735 -0.001686586 -1.693547677 0.755553286 -0.924634255 [56] 0.533306176 0.935857164 0.502406096 -0.174763468 -0.786322423 [61] 0.582367349 1.154141633 -0.423985756 -1.372679327 0.541154717 [66] -0.428920219 -1.691260257 0.862797815 -1.564587734 0.858528861 [71] -1.337396363 0.515807409 -1.322330808 0.223169487 0.769790037 [76] 0.512390566 -0.174602178 -0.640717088 1.571738905 0.679297814 [81] 1.881355440 -0.218952830 2.273439481 1.058069090 -1.982183691 [86] 1.188103805 -0.920276320 0.403875191 -0.043092790 -0.455546513 [91] 0.288407217 1.082501519 0.129137154 0.802107762 0.470303921 [96] -0.021493695 0.008316929 -1.740396588 -2.218452941 1.792796489 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.5309001 -0.4013404 0.9206805 -1.261052 -0.4929462 1.593223 0.6040103 [2,] -0.5309001 -0.4013404 0.9206805 -1.261052 -0.4929462 1.593223 0.6040103 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.9023462 1.877232 0.2917665 -0.9169969 1.657924 -0.9703847 0.5700316 [2,] 0.9023462 1.877232 0.2917665 -0.9169969 1.657924 -0.9703847 0.5700316 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 1.617062 0.3699666 0.4604917 0.2232277 -0.263668 -0.5900559 0.6971819 [2,] 1.617062 0.3699666 0.4604917 0.2232277 -0.263668 -0.5900559 0.6971819 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.2943507 0.4979494 -0.397179 0.3102255 -2.070585 1.368099 0.5505239 [2,] -0.2943507 0.4979494 -0.397179 0.3102255 -2.070585 1.368099 0.5505239 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.9564869 -2.08317 0.1686553 0.1974512 0.4330239 -0.3894546 -0.07087186 [2,] -0.9564869 -2.08317 0.1686553 0.1974512 0.4330239 -0.3894546 -0.07087186 [,36] [,37] [,38] [,39] [,40] [,41] [1,] 0.02339824 -0.535567 0.6099498 -0.08997773 -0.09446726 0.2622081 [2,] 0.02339824 -0.535567 0.6099498 -0.08997773 -0.09446726 0.2622081 [,42] [,43] [,44] [,45] [,46] [,47] [,48] [1,] -0.5152084 -0.3896415 1.026526 -1.590021 -1.128901 0.6808874 1.553961 [2,] -0.5152084 -0.3896415 1.026526 -1.590021 -1.128901 0.6808874 1.553961 [,49] [,50] [,51] [,52] [,53] [,54] [,55] [1,] -1.018619 1.825234 -2.844432 -0.001686586 -1.693548 0.7555533 -0.9246343 [2,] -1.018619 1.825234 -2.844432 -0.001686586 -1.693548 0.7555533 -0.9246343 [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] 0.5333062 0.9358572 0.5024061 -0.1747635 -0.7863224 0.5823673 1.154142 [2,] 0.5333062 0.9358572 0.5024061 -0.1747635 -0.7863224 0.5823673 1.154142 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [1,] -0.4239858 -1.372679 0.5411547 -0.4289202 -1.69126 0.8627978 -1.564588 [2,] -0.4239858 -1.372679 0.5411547 -0.4289202 -1.69126 0.8627978 -1.564588 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] 0.8585289 -1.337396 0.5158074 -1.322331 0.2231695 0.76979 0.5123906 [2,] 0.8585289 -1.337396 0.5158074 -1.322331 0.2231695 0.76979 0.5123906 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] -0.1746022 -0.6407171 1.571739 0.6792978 1.881355 -0.2189528 2.273439 [2,] -0.1746022 -0.6407171 1.571739 0.6792978 1.881355 -0.2189528 2.273439 [,84] [,85] [,86] [,87] [,88] [,89] [,90] [1,] 1.058069 -1.982184 1.188104 -0.9202763 0.4038752 -0.04309279 -0.4555465 [2,] 1.058069 -1.982184 1.188104 -0.9202763 0.4038752 -0.04309279 -0.4555465 [,91] [,92] [,93] [,94] [,95] [,96] [,97] [1,] 0.2884072 1.082502 0.1291372 0.8021078 0.4703039 -0.0214937 0.008316929 [2,] 0.2884072 1.082502 0.1291372 0.8021078 0.4703039 -0.0214937 0.008316929 [,98] [,99] [,100] [1,] -1.740397 -2.218453 1.792796 [2,] -1.740397 -2.218453 1.792796 > > > Max(tmp2) [1] 2.125535 > Min(tmp2) [1] -1.799624 > mean(tmp2) [1] 0.192176 > Sum(tmp2) [1] 19.2176 > Var(tmp2) [1] 0.9431555 > > rowMeans(tmp2) [1] 1.04779926 1.88942641 1.81703795 -0.40255131 0.87393453 0.32651649 [7] 0.78242764 -0.72821457 -0.96974545 0.71720504 0.06610143 1.40819191 [13] 0.68795699 -0.21641737 0.67168204 0.59100798 -0.01346101 1.47851945 [19] 0.54414100 0.55571620 -1.23834218 0.29158499 1.08756936 -0.95637088 [25] 1.65035620 1.10747285 1.74452315 -1.31767117 1.26286277 -1.49881128 [31] 0.11412442 0.03673089 -0.13488219 0.15602600 0.29312506 -1.18969204 [37] -0.37941752 0.39332041 1.52108791 -0.95864818 0.49112503 -0.27504111 [43] 0.67196589 0.23560553 0.81336973 1.59324506 1.61258455 0.61172628 [49] 1.37934413 -1.09594426 0.63359848 -1.15992422 -0.46866679 -0.12551703 [55] 1.20375414 2.12553533 -1.36340067 -0.05406860 1.90590748 1.33428509 [61] -0.60769195 -0.83706902 -0.22030483 -0.02900826 0.29055211 1.48827027 [67] -0.49793517 0.11237363 0.35788697 -0.60826921 0.92835699 -0.24036781 [73] -0.16561913 0.74050751 1.50288744 0.36658931 0.68824890 1.81721984 [79] -0.78105300 0.63564875 -1.41485600 -1.79962351 -1.03848380 -1.00057433 [85] 0.62456233 1.68897789 -0.97101366 -0.41856260 -1.51383238 -0.30219883 [91] 0.01668166 0.04910345 -0.68192545 -0.78507992 -0.95015381 -0.82704538 [97] -0.95207871 0.49789188 1.31360914 -0.44072667 > rowSums(tmp2) [1] 1.04779926 1.88942641 1.81703795 -0.40255131 0.87393453 0.32651649 [7] 0.78242764 -0.72821457 -0.96974545 0.71720504 0.06610143 1.40819191 [13] 0.68795699 -0.21641737 0.67168204 0.59100798 -0.01346101 1.47851945 [19] 0.54414100 0.55571620 -1.23834218 0.29158499 1.08756936 -0.95637088 [25] 1.65035620 1.10747285 1.74452315 -1.31767117 1.26286277 -1.49881128 [31] 0.11412442 0.03673089 -0.13488219 0.15602600 0.29312506 -1.18969204 [37] -0.37941752 0.39332041 1.52108791 -0.95864818 0.49112503 -0.27504111 [43] 0.67196589 0.23560553 0.81336973 1.59324506 1.61258455 0.61172628 [49] 1.37934413 -1.09594426 0.63359848 -1.15992422 -0.46866679 -0.12551703 [55] 1.20375414 2.12553533 -1.36340067 -0.05406860 1.90590748 1.33428509 [61] -0.60769195 -0.83706902 -0.22030483 -0.02900826 0.29055211 1.48827027 [67] -0.49793517 0.11237363 0.35788697 -0.60826921 0.92835699 -0.24036781 [73] -0.16561913 0.74050751 1.50288744 0.36658931 0.68824890 1.81721984 [79] -0.78105300 0.63564875 -1.41485600 -1.79962351 -1.03848380 -1.00057433 [85] 0.62456233 1.68897789 -0.97101366 -0.41856260 -1.51383238 -0.30219883 [91] 0.01668166 0.04910345 -0.68192545 -0.78507992 -0.95015381 -0.82704538 [97] -0.95207871 0.49789188 1.31360914 -0.44072667 > 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.04779926 1.88942641 1.81703795 -0.40255131 0.87393453 0.32651649 [7] 0.78242764 -0.72821457 -0.96974545 0.71720504 0.06610143 1.40819191 [13] 0.68795699 -0.21641737 0.67168204 0.59100798 -0.01346101 1.47851945 [19] 0.54414100 0.55571620 -1.23834218 0.29158499 1.08756936 -0.95637088 [25] 1.65035620 1.10747285 1.74452315 -1.31767117 1.26286277 -1.49881128 [31] 0.11412442 0.03673089 -0.13488219 0.15602600 0.29312506 -1.18969204 [37] -0.37941752 0.39332041 1.52108791 -0.95864818 0.49112503 -0.27504111 [43] 0.67196589 0.23560553 0.81336973 1.59324506 1.61258455 0.61172628 [49] 1.37934413 -1.09594426 0.63359848 -1.15992422 -0.46866679 -0.12551703 [55] 1.20375414 2.12553533 -1.36340067 -0.05406860 1.90590748 1.33428509 [61] -0.60769195 -0.83706902 -0.22030483 -0.02900826 0.29055211 1.48827027 [67] -0.49793517 0.11237363 0.35788697 -0.60826921 0.92835699 -0.24036781 [73] -0.16561913 0.74050751 1.50288744 0.36658931 0.68824890 1.81721984 [79] -0.78105300 0.63564875 -1.41485600 -1.79962351 -1.03848380 -1.00057433 [85] 0.62456233 1.68897789 -0.97101366 -0.41856260 -1.51383238 -0.30219883 [91] 0.01668166 0.04910345 -0.68192545 -0.78507992 -0.95015381 -0.82704538 [97] -0.95207871 0.49789188 1.31360914 -0.44072667 > rowMin(tmp2) [1] 1.04779926 1.88942641 1.81703795 -0.40255131 0.87393453 0.32651649 [7] 0.78242764 -0.72821457 -0.96974545 0.71720504 0.06610143 1.40819191 [13] 0.68795699 -0.21641737 0.67168204 0.59100798 -0.01346101 1.47851945 [19] 0.54414100 0.55571620 -1.23834218 0.29158499 1.08756936 -0.95637088 [25] 1.65035620 1.10747285 1.74452315 -1.31767117 1.26286277 -1.49881128 [31] 0.11412442 0.03673089 -0.13488219 0.15602600 0.29312506 -1.18969204 [37] -0.37941752 0.39332041 1.52108791 -0.95864818 0.49112503 -0.27504111 [43] 0.67196589 0.23560553 0.81336973 1.59324506 1.61258455 0.61172628 [49] 1.37934413 -1.09594426 0.63359848 -1.15992422 -0.46866679 -0.12551703 [55] 1.20375414 2.12553533 -1.36340067 -0.05406860 1.90590748 1.33428509 [61] -0.60769195 -0.83706902 -0.22030483 -0.02900826 0.29055211 1.48827027 [67] -0.49793517 0.11237363 0.35788697 -0.60826921 0.92835699 -0.24036781 [73] -0.16561913 0.74050751 1.50288744 0.36658931 0.68824890 1.81721984 [79] -0.78105300 0.63564875 -1.41485600 -1.79962351 -1.03848380 -1.00057433 [85] 0.62456233 1.68897789 -0.97101366 -0.41856260 -1.51383238 -0.30219883 [91] 0.01668166 0.04910345 -0.68192545 -0.78507992 -0.95015381 -0.82704538 [97] -0.95207871 0.49789188 1.31360914 -0.44072667 > > colMeans(tmp2) [1] 0.192176 > colSums(tmp2) [1] 19.2176 > colVars(tmp2) [1] 0.9431555 > colSd(tmp2) [1] 0.9711619 > colMax(tmp2) [1] 2.125535 > colMin(tmp2) [1] -1.799624 > colMedians(tmp2) [1] 0.1958158 > colRanges(tmp2) [,1] [1,] -1.799624 [2,] 2.125535 > > 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] -1.2180127 -2.9957409 -4.4560374 4.4127787 3.9168085 0.2501834 [7] -5.9229683 2.6240426 -1.4032817 -1.8629558 > colApply(tmp,quantile)[,1] [,1] [1,] -1.1733986 [2,] -0.7890903 [3,] -0.5199472 [4,] 0.6400756 [5,] 1.3391089 > > rowApply(tmp,sum) [1] 1.8475458 -3.3240981 -2.3576379 -3.5304355 1.4569988 1.7553518 [7] 3.0200161 0.8462353 -1.3870658 -4.9820940 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 2 5 10 4 2 9 8 2 4 3 [2,] 3 6 5 3 10 3 3 6 7 2 [3,] 1 2 2 10 4 4 1 8 8 5 [4,] 7 1 7 9 3 8 10 9 9 10 [5,] 10 10 8 8 9 1 7 3 5 7 [6,] 6 8 1 6 6 7 5 10 1 4 [7,] 4 3 3 2 5 2 6 5 10 1 [8,] 5 9 6 5 7 10 9 1 2 8 [9,] 8 7 4 7 1 5 2 7 6 9 [10,] 9 4 9 1 8 6 4 4 3 6 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.2570914 4.2601614 0.2156977 -2.4735076 -1.3938588 -1.1042636 [7] 0.7544839 0.7658290 -2.4774184 0.7743180 0.4632108 -1.1636708 [13] 3.2863867 -1.6029048 2.0171981 2.3678193 3.0331511 -2.9544163 [19] 2.9908228 2.3199509 > colApply(tmp,quantile)[,1] [,1] [1,] -0.6928275 [2,] -0.3982823 [3,] 0.3471110 [4,] 0.5661805 [5,] 1.4349096 > > rowApply(tmp,sum) [1] -0.21697453 -0.04502105 1.74167716 6.42743150 3.42896763 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 15 20 7 4 12 [2,] 16 8 19 15 19 [3,] 14 4 1 7 18 [4,] 2 12 12 5 3 [5,] 8 3 17 14 1 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.5661805 0.7359674 0.4657883 -1.0795863 -0.4881129 -0.9748585 [2,] 1.4349096 -0.2132182 -0.5605487 0.2434804 -0.8965235 0.2926646 [3,] -0.3982823 1.0957314 -1.0224086 0.1873364 0.7501666 -0.6702970 [4,] -0.6928275 1.1166867 -0.1160013 -0.6095481 0.8651003 1.5227161 [5,] 0.3471110 1.5249941 1.4488680 -1.2151900 -1.6244893 -1.2744889 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.08210622 -0.18777945 -1.3216571 -0.3956626 1.32209780 -0.54409741 [2,] -1.30089607 0.04835851 0.2916363 1.0112693 0.50497174 0.26782436 [3,] 0.60378421 -0.40408698 -0.9339797 -0.7320712 0.03007936 0.53794343 [4,] 0.55660052 0.51595930 0.2483281 0.1440279 -0.74381944 -1.40798528 [5,] 0.81288906 0.79337764 -0.7617460 0.7467546 -0.65011870 -0.01735586 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.3659759 -0.99270064 -0.50102851 1.1211340 1.02912448 0.1713239 [2,] 0.2389427 -0.48288121 0.01592722 -0.5004089 0.25008590 -1.4701128 [3,] 0.6110976 -0.20387994 0.59010445 -0.5135963 0.02195671 -0.1036762 [4,] -0.5696432 0.10367554 1.83106302 1.8098677 1.42062858 -1.3596398 [5,] 1.6400137 -0.02711856 0.08113189 0.4508228 0.31135540 -0.1923114 [,19] [,20] [1,] -0.5154859 -0.07570385 [2,] 1.0816762 -0.30217841 [3,] 1.3598300 0.93592517 [4,] 1.3986225 0.39361998 [5,] -0.3338200 1.36828806 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 654 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 566 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -2.353404 -1.82331 0.2508006 2.202809 0.7368962 0.008458188 -0.9918238 col8 col9 col10 col11 col12 col13 col14 row1 0.1983467 0.6857525 0.07324546 -0.6747363 -0.585628 -1.339798 0.5479835 col15 col16 col17 col18 col19 col20 row1 1.25418 1.720199 -1.513667 -0.7420892 -1.154898 -2.130837 > tmp[,"col10"] col10 row1 0.07324546 row2 0.98130645 row3 0.87788907 row4 -0.73643558 row5 0.36259889 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -2.3534043 -1.823310 0.2508006 2.2028090 0.7368962 0.008458188 row5 -0.3078248 -1.450125 1.3137096 -0.5686056 -0.5709660 0.228840439 col7 col8 col9 col10 col11 col12 col13 row1 -0.9918238 0.1983467 0.6857525 0.07324546 -0.6747363 -0.585628 -1.339798 row5 -1.5571885 -0.5900407 0.7445305 0.36259889 -0.1650843 2.056451 1.413493 col14 col15 col16 col17 col18 col19 col20 row1 0.5479835 1.2541796 1.7201989 -1.5136666 -0.7420892 -1.154898 -2.130837 row5 -1.8182306 -0.1939792 0.4826774 -0.8362033 -0.1963107 -1.108250 1.120881 > tmp[,c("col6","col20")] col6 col20 row1 0.008458188 -2.1308372 row2 -1.813334225 1.0777545 row3 2.355961679 -0.3618547 row4 0.102385796 -0.5304866 row5 0.228840439 1.1208805 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.008458188 -2.130837 row5 0.228840439 1.120881 > > > > > 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.49813 50.31002 50.20267 49.07131 50.99408 105.9404 48.44028 49.73265 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.87472 51.20367 51.39439 49.89932 47.10843 51.25947 49.03597 51.75161 col17 col18 col19 col20 row1 48.86095 48.43287 49.8706 105.0144 > tmp[,"col10"] col10 row1 51.20367 row2 29.66615 row3 29.43978 row4 29.10080 row5 49.64477 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.49813 50.31002 50.20267 49.07131 50.99408 105.9404 48.44028 49.73265 row5 50.29794 49.78225 50.14627 50.16558 51.88868 106.5777 50.68965 49.04340 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.87472 51.20367 51.39439 49.89932 47.10843 51.25947 49.03597 51.75161 row5 51.11383 49.64477 51.12352 50.90707 49.98792 49.02057 49.96438 49.02896 col17 col18 col19 col20 row1 48.86095 48.43287 49.87060 105.0144 row5 49.22917 51.34127 49.47734 104.8942 > tmp[,c("col6","col20")] col6 col20 row1 105.94043 105.01441 row2 73.61324 75.40149 row3 74.30704 74.15401 row4 74.52427 75.25452 row5 106.57775 104.89423 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.9404 105.0144 row5 106.5777 104.8942 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.9404 105.0144 row5 106.5777 104.8942 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.7812490 [2,] 0.3190659 [3,] -0.1772951 [4,] 1.5102209 [5,] 0.6907734 > tmp[,c("col17","col7")] col17 col7 [1,] -0.14664205 0.6333895 [2,] -0.67023443 -0.7356087 [3,] -0.04909495 -0.2253773 [4,] -0.53914530 2.2286172 [5,] -0.30344264 -1.6335697 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.557173331 0.1365640 [2,] -0.001678105 1.2839397 [3,] 0.446376675 -1.1622699 [4,] 0.702761912 1.1540115 [5,] 1.036989947 -0.2771241 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.5571733 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.557173331 [2,] -0.001678105 > > > > 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.1264682 0.5149791 0.09527298 0.4814576 -0.6056521 0.6874392 row1 -1.5289064 -0.3778877 0.07168573 -0.8725541 -1.2164252 -0.6114874 [,7] [,8] [,9] [,10] [,11] [,12] row3 0.2226336 -1.502585 0.09192304 -1.4850117 0.09469666 -0.2116631 row1 0.3920322 1.408482 -1.62213915 -0.5839762 -0.83568720 1.2886554 [,13] [,14] [,15] [,16] [,17] [,18] row3 -0.4448311 -1.6984140 -0.5759888 0.6813380 -2.045372 -1.1106622 row1 0.3919849 -0.7068253 0.5724275 -0.7804407 -1.640878 -0.6387934 [,19] [,20] row3 0.6338645 0.2735494 row1 -0.8009008 -0.5587402 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.8274336 -0.4497596 -0.8997527 1.474177 -0.9535813 -0.9181589 -0.1230423 [,8] [,9] [,10] row2 -0.982159 2.217258 -0.427009 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.115715 -0.6800147 0.5867727 -0.6499899 -1.208664 -0.4035469 -0.8876135 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 1.394575 -1.759267 -1.548343 -0.6851341 1.300493 0.1929532 0.9161434 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.6948259 -0.8264766 -0.3611695 1.168548 -0.3980507 0.4467748 > > > 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: 0x5ba02da9f970> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f16559e0721" [2] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f1667ebb7f6" [3] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f16659f6529" [4] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f161e1860bd" [5] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f161ec226a5" [6] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f1624412182" [7] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f1610063064" [8] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f164b6a29a9" [9] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f16100cb340" [10] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f161bbb10cc" [11] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f1621469bc2" [12] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f164c9c5d24" [13] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f1656937cc0" [14] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f163ca88d40" [15] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM220f166b63a300" > > > ### 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: 0x5ba02ea19a50> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x5ba02ea19a50> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x5ba02ea19a50> > rowMedians(tmp) [1] -0.037883444 0.001316529 -0.019392367 0.272268767 -0.221133492 [6] -0.500030978 -0.066583069 0.886872006 -0.008704576 -0.105068561 [11] -0.068262593 -0.557267639 -0.178039036 0.069463192 0.079341319 [16] 0.107738213 -0.215924748 -0.053818109 0.124582261 -0.208692681 [21] -0.327583003 -0.134385025 -0.570649228 0.122643434 -0.106304166 [26] -0.054188970 0.433918613 0.158160689 0.140417359 -0.086366125 [31] 0.148905150 0.293658851 -0.054797619 0.329220003 0.149041726 [36] -0.227237301 -0.035505227 -0.341359936 -0.564293417 0.191332570 [41] 0.585311355 0.119921517 -0.361980950 0.219034321 0.296675691 [46] -0.151696393 -0.026011124 -0.084151503 0.677733999 -0.784881424 [51] 0.063173866 0.208974675 0.252325616 -0.058399292 0.053034614 [56] -0.245904904 0.400893368 -0.213584023 -0.368958473 0.540249547 [61] 0.331625484 0.169530520 0.283939092 0.296475165 0.356367777 [66] -0.064378538 -0.335115450 0.221314563 -0.248575381 0.038319482 [71] 0.033795760 -0.017488408 0.018106592 0.033341836 -0.038890452 [76] -0.529905146 -0.234234212 -0.687896834 0.135988868 0.182313931 [81] -0.230185354 -0.480733786 0.173826743 0.017328561 0.774055162 [86] -0.175942033 -0.244466896 -0.232995720 -0.097711816 -0.396593911 [91] 0.491482182 0.025271366 0.299170639 -0.126827030 0.354899289 [96] 0.575552980 -0.464069852 0.368596116 -0.324269368 0.092326084 [101] -0.107628857 -0.224119297 0.041028169 0.558416386 -0.075609641 [106] 0.134637567 0.350515237 -0.059525967 -0.201812611 0.143933740 [111] 0.093801046 0.003793444 -0.571427639 -0.615541112 -0.256937463 [116] -0.226611895 -0.650427791 -0.769554333 0.135075997 -0.257447092 [121] 0.049309526 0.205214447 -0.005528252 0.164359930 -0.287312742 [126] 0.377467943 -0.005325588 -0.199633151 -0.228727746 -0.302390557 [131] -0.106044719 -0.343486075 -0.446110892 -0.353943521 -0.358022789 [136] 0.085213396 0.414679323 0.051402338 -0.129081514 0.363354519 [141] -0.451422456 0.447271670 -0.939544700 -0.101864597 0.054793960 [146] -0.012666961 -0.023240195 -0.344800194 0.145328897 -0.308808078 [151] 0.411306024 -0.039014736 0.038123493 -0.509331951 -0.100155454 [156] -0.511764618 -0.154833597 -0.143401264 0.233821166 -0.586670289 [161] 0.080268448 -0.298525332 0.093689030 0.518292590 0.091443291 [166] 0.091706622 -0.264745831 0.412756058 0.029908511 0.741633578 [171] -0.134592658 -0.183330169 -0.137391464 -0.108114250 -0.237077333 [176] -0.531634507 -0.529333062 0.068117273 -0.552255363 -0.033390593 [181] -0.252072873 0.237388520 0.194641702 0.554071169 0.228152915 [186] 0.364498789 -0.728302670 -0.023442623 -0.557563639 -0.393028265 [191] 0.474870665 0.230832445 0.634740943 0.008245096 0.310751907 [196] 0.421247435 0.360680505 -0.821589738 -0.190980701 -0.188082964 [201] -0.215544274 -0.175921186 -0.176168713 0.087872486 0.550106093 [206] -0.488043163 -0.017159498 -0.118349752 0.206167723 -0.227336443 [211] 0.816679264 0.150576477 0.291558082 0.289973447 -0.056599591 [216] -0.127464859 0.319141973 0.134477619 0.618380834 -0.155794582 [221] 0.020291587 -0.202981343 0.173788487 0.094056222 0.247641255 [226] -0.224698749 0.584522987 0.462562929 0.137091786 -0.469349542 > > proc.time() user system elapsed 1.302 0.672 1.964
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.2 (2024-10-31) -- "Pile of Leaves" Copyright (C) 2024 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: 0x5e45ff71c2a0> > .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: 0x5e45ff71c2a0> > .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: 0x5e45ff71c2a0> > .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: 0x5e45ff71c2a0> > 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: 0x5e45fed93920> > .Call("R_bm_AddColumn",P) <pointer: 0x5e45fed93920> > .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: 0x5e45fed93920> > .Call("R_bm_AddColumn",P) <pointer: 0x5e45fed93920> > .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: 0x5e45fed93920> > 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: 0x5e45ff721d80> > .Call("R_bm_AddColumn",P) <pointer: 0x5e45ff721d80> > .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: 0x5e45ff721d80> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5e45ff721d80> > .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: 0x5e45ff721d80> > > .Call("R_bm_RowMode",P) <pointer: 0x5e45ff721d80> > .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: 0x5e45ff721d80> > > .Call("R_bm_ColMode",P) <pointer: 0x5e45ff721d80> > .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: 0x5e45ff721d80> > 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: 0x5e45ff7250b0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x5e45ff7250b0> > .Call("R_bm_AddColumn",P) <pointer: 0x5e45ff7250b0> > .Call("R_bm_AddColumn",P) <pointer: 0x5e45ff7250b0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile220f9917642530" "BufferedMatrixFile220f993e78c16d" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile220f9917642530" "BufferedMatrixFile220f993e78c16d" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x5e45ff87d1d0> > .Call("R_bm_AddColumn",P) <pointer: 0x5e45ff87d1d0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5e45ff87d1d0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x5e45ff87d1d0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x5e45ff87d1d0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x5e45ff87d1d0> > .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: 0x5e45fe49aba0> > .Call("R_bm_AddColumn",P) <pointer: 0x5e45fe49aba0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x5e45fe49aba0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x5e45fe49aba0> > 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: 0x5e45fe560180> > .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: 0x5e45fe560180> > rm(P) > > proc.time() user system elapsed 0.234 0.043 0.266
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.2 (2024-10-31) -- "Pile of Leaves" Copyright (C) 2024 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.224 0.048 0.259