Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2025-01-23 12:11 -0500 (Thu, 23 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" | 4746 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.2 (2024-10-31 ucrt) -- "Pile of Leaves" | 4493 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4517 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4469 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4394 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 251/2289 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.70.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino8 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.7.5 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson1 | macOS 13.6.6 Ventura / arm64 | OK | OK | WARNINGS | OK | |||||||||
taishan | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. - See Martin Grigorov's blog post for how to debug Linux ARM64 related issues on a x86_64 host. |
Package: BufferedMatrix |
Version: 1.70.0 |
Command: /home/biocbuild/R/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R/site-library --no-vignettes --timings BufferedMatrix_1.70.0.tar.gz |
StartedAt: 2025-01-21 05:15:10 -0000 (Tue, 21 Jan 2025) |
EndedAt: 2025-01-21 05:15:34 -0000 (Tue, 21 Jan 2025) |
EllapsedTime: 24.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/R/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R/site-library --no-vignettes --timings BufferedMatrix_1.70.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.4.2 (2024-10-31) * using platform: aarch64-unknown-linux-gnu * R was compiled by aarch64-unknown-linux-gnu-gcc (GCC) 14.2.0 GNU Fortran (GCC) 12.3.1 (openEuler 12.3.1-36.oe2403) * running under: openEuler 24.03 (LTS) * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.70.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... OK * used C compiler: ‘aarch64-unknown-linux-gnu-gcc (GCC) 14.2.0’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 2 NOTEs See ‘/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/R/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/R/R-4.4.2/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘aarch64-unknown-linux-gnu-gcc (GCC) 14.2.0’ /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -I"/home/biocbuild/R/R/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -Werror=format-security -c RBufferedMatrix.c -o RBufferedMatrix.o /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -I"/home/biocbuild/R/R/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -Werror=format-security -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function ‘dbm_ReadOnlyMode’: doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ doubleBufferedMatrix.c: At top level: doubleBufferedMatrix.c:3327:12: warning: ‘sort_double’ defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -I"/home/biocbuild/R/R/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -Werror=format-security -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -I"/home/biocbuild/R/R/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -Werror=format-security -c init_package.c -o init_package.o /opt/ohpc/pub/compiler/gcc/14.2.0/bin/aarch64-unknown-linux-gnu-gcc -shared -L/home/biocbuild/R/R/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/R/R/lib -lR installing to /home/biocbuild/R/R-4.4.2/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: aarch64-unknown-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.289 0.053 0.329
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: aarch64-unknown-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 471793 25.2 1026264 54.9 643431 34.4 Vcells 871915 6.7 8388608 64.0 2046348 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] "Tue Jan 21 05:15:29 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] "Tue Jan 21 05:15:29 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: 0x19e3d3c0> > > > > 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] "Tue Jan 21 05:15:29 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] "Tue Jan 21 05:15:29 2025" > > ColMode(tmp2) <pointer: 0x19e3d3c0> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.9753905 0.27204204 0.5972355 -2.2011033 [2,] -0.6895838 1.27221340 -0.8612513 -1.1803596 [3,] 1.2395924 0.04594203 0.6617278 -1.1662420 [4,] 0.5201743 0.65545562 -1.7707429 -0.8478749 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.9753905 0.27204204 0.5972355 2.2011033 [2,] 0.6895838 1.27221340 0.8612513 1.1803596 [3,] 1.2395924 0.04594203 0.6617278 1.1662420 [4,] 0.5201743 0.65545562 1.7707429 0.8478749 > 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.0486512 0.5215765 0.7728101 1.4836116 [2,] 0.8304118 1.1279244 0.9280362 1.0864436 [3,] 1.1133698 0.2143409 0.8134665 1.0799269 [4,] 0.7212311 0.8096021 1.3306926 0.9208012 > > 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.46190 30.48781 33.32534 42.03722 [2,] 33.99370 37.55146 35.14161 37.04480 [3,] 37.37329 27.18935 33.79639 36.96551 [4,] 32.73249 33.75148 40.07767 35.05589 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x1b824ad0> > exp(tmp5) <pointer: 0x1b824ad0> > log(tmp5,2) <pointer: 0x1b824ad0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 471.3508 > Min(tmp5) [1] 53.50409 > mean(tmp5) [1] 72.64347 > Sum(tmp5) [1] 14528.69 > Var(tmp5) [1] 876.925 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 88.53736 69.74596 75.07056 71.24753 69.51669 73.86677 68.53004 69.45539 [9] 70.26689 70.19752 > rowSums(tmp5) [1] 1770.747 1394.919 1501.411 1424.951 1390.334 1477.335 1370.601 1389.108 [9] 1405.338 1403.950 > rowVars(tmp5) [1] 8191.24831 46.68035 76.86148 57.59045 38.39869 80.03065 [7] 79.86914 94.46540 65.95279 117.91881 > rowSd(tmp5) [1] 90.505515 6.832302 8.767068 7.588837 6.196668 8.945985 8.936954 [8] 9.719331 8.121133 10.859043 > rowMax(tmp5) [1] 471.35078 80.17951 94.48896 83.41642 79.00728 94.25199 84.33974 [8] 83.78385 79.91971 93.04746 > rowMin(tmp5) [1] 54.16568 58.50280 56.59107 58.53726 56.50778 56.64663 55.55374 53.50409 [9] 55.37881 54.46596 > > colMeans(tmp5) [1] 110.90482 71.21438 67.76238 75.45453 71.29823 68.04552 71.06979 [8] 65.35961 71.77008 74.24342 72.06550 65.76039 68.10683 71.02281 [15] 72.25023 74.71901 72.10393 72.82773 70.29134 66.59892 > colSums(tmp5) [1] 1109.0482 712.1438 677.6238 754.5453 712.9823 680.4552 710.6979 [8] 653.5961 717.7008 742.4342 720.6550 657.6039 681.0683 710.2281 [15] 722.5023 747.1901 721.0393 728.2773 702.9134 665.9892 > colVars(tmp5) [1] 16087.47104 53.63341 71.59701 32.97502 39.03306 63.87992 [7] 143.86097 43.83725 93.81909 104.64735 43.51659 75.10557 [13] 40.34676 70.80019 55.14949 27.88825 64.45578 120.96490 [19] 132.81227 138.12663 > colSd(tmp5) [1] 126.836395 7.323484 8.461502 5.742388 6.247645 7.992491 [7] 11.994206 6.620971 9.686026 10.229729 6.596711 8.666347 [13] 6.351910 8.414285 7.426270 5.280932 8.028436 10.998404 [19] 11.524421 11.752728 > colMax(tmp5) [1] 471.35078 79.89046 83.41642 87.49496 80.76854 82.25479 93.04746 [8] 77.20992 91.51712 88.43947 81.95071 83.30089 75.68142 84.33974 [15] 83.80890 83.88707 83.78385 94.48896 94.25199 91.53439 > colMin(tmp5) [1] 55.37881 56.59107 56.50778 67.52384 63.07601 54.46596 57.73671 56.64663 [9] 58.80662 54.95641 58.18060 54.16568 59.18443 58.38822 60.49514 67.08338 [17] 58.27061 58.53726 53.50409 54.75955 > > > ### 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.53736 69.74596 75.07056 71.24753 69.51669 73.86677 68.53004 NA [9] 70.26689 70.19752 > rowSums(tmp5) [1] 1770.747 1394.919 1501.411 1424.951 1390.334 1477.335 1370.601 NA [9] 1405.338 1403.950 > rowVars(tmp5) [1] 8191.24831 46.68035 76.86148 57.59045 38.39869 80.03065 [7] 79.86914 99.56935 65.95279 117.91881 > rowSd(tmp5) [1] 90.505515 6.832302 8.767068 7.588837 6.196668 8.945985 8.936954 [8] 9.978444 8.121133 10.859043 > rowMax(tmp5) [1] 471.35078 80.17951 94.48896 83.41642 79.00728 94.25199 84.33974 [8] NA 79.91971 93.04746 > rowMin(tmp5) [1] 54.16568 58.50280 56.59107 58.53726 56.50778 56.64663 55.55374 NA [9] 55.37881 54.46596 > > colMeans(tmp5) [1] 110.90482 71.21438 67.76238 75.45453 71.29823 NA 71.06979 [8] 65.35961 71.77008 74.24342 72.06550 65.76039 68.10683 71.02281 [15] 72.25023 74.71901 72.10393 72.82773 70.29134 66.59892 > colSums(tmp5) [1] 1109.0482 712.1438 677.6238 754.5453 712.9823 NA 710.6979 [8] 653.5961 717.7008 742.4342 720.6550 657.6039 681.0683 710.2281 [15] 722.5023 747.1901 721.0393 728.2773 702.9134 665.9892 > colVars(tmp5) [1] 16087.47104 53.63341 71.59701 32.97502 39.03306 NA [7] 143.86097 43.83725 93.81909 104.64735 43.51659 75.10557 [13] 40.34676 70.80019 55.14949 27.88825 64.45578 120.96490 [19] 132.81227 138.12663 > colSd(tmp5) [1] 126.836395 7.323484 8.461502 5.742388 6.247645 NA [7] 11.994206 6.620971 9.686026 10.229729 6.596711 8.666347 [13] 6.351910 8.414285 7.426270 5.280932 8.028436 10.998404 [19] 11.524421 11.752728 > colMax(tmp5) [1] 471.35078 79.89046 83.41642 87.49496 80.76854 NA 93.04746 [8] 77.20992 91.51712 88.43947 81.95071 83.30089 75.68142 84.33974 [15] 83.80890 83.88707 83.78385 94.48896 94.25199 91.53439 > colMin(tmp5) [1] 55.37881 56.59107 56.50778 67.52384 63.07601 NA 57.73671 56.64663 [9] 58.80662 54.95641 58.18060 54.16568 59.18443 58.38822 60.49514 67.08338 [17] 58.27061 58.53726 53.50409 54.75955 > > Max(tmp5,na.rm=TRUE) [1] 471.3508 > Min(tmp5,na.rm=TRUE) [1] 53.50409 > mean(tmp5,na.rm=TRUE) [1] 72.6516 > Sum(tmp5,na.rm=TRUE) [1] 14457.67 > Var(tmp5,na.rm=TRUE) [1] 881.3407 > > rowMeans(tmp5,na.rm=TRUE) [1] 88.53736 69.74596 75.07056 71.24753 69.51669 73.86677 68.53004 69.37276 [9] 70.26689 70.19752 > rowSums(tmp5,na.rm=TRUE) [1] 1770.747 1394.919 1501.411 1424.951 1390.334 1477.335 1370.601 1318.082 [9] 1405.338 1403.950 > rowVars(tmp5,na.rm=TRUE) [1] 8191.24831 46.68035 76.86148 57.59045 38.39869 80.03065 [7] 79.86914 99.56935 65.95279 117.91881 > rowSd(tmp5,na.rm=TRUE) [1] 90.505515 6.832302 8.767068 7.588837 6.196668 8.945985 8.936954 [8] 9.978444 8.121133 10.859043 > rowMax(tmp5,na.rm=TRUE) [1] 471.35078 80.17951 94.48896 83.41642 79.00728 94.25199 84.33974 [8] 83.78385 79.91971 93.04746 > rowMin(tmp5,na.rm=TRUE) [1] 54.16568 58.50280 56.59107 58.53726 56.50778 56.64663 55.55374 53.50409 [9] 55.37881 54.46596 > > colMeans(tmp5,na.rm=TRUE) [1] 110.90482 71.21438 67.76238 75.45453 71.29823 67.71444 71.06979 [8] 65.35961 71.77008 74.24342 72.06550 65.76039 68.10683 71.02281 [15] 72.25023 74.71901 72.10393 72.82773 70.29134 66.59892 > colSums(tmp5,na.rm=TRUE) [1] 1109.0482 712.1438 677.6238 754.5453 712.9823 609.4299 710.6979 [8] 653.5961 717.7008 742.4342 720.6550 657.6039 681.0683 710.2281 [15] 722.5023 747.1901 721.0393 728.2773 702.9134 665.9892 > colVars(tmp5,na.rm=TRUE) [1] 16087.47104 53.63341 71.59701 32.97502 39.03306 70.63173 [7] 143.86097 43.83725 93.81909 104.64735 43.51659 75.10557 [13] 40.34676 70.80019 55.14949 27.88825 64.45578 120.96490 [19] 132.81227 138.12663 > colSd(tmp5,na.rm=TRUE) [1] 126.836395 7.323484 8.461502 5.742388 6.247645 8.404268 [7] 11.994206 6.620971 9.686026 10.229729 6.596711 8.666347 [13] 6.351910 8.414285 7.426270 5.280932 8.028436 10.998404 [19] 11.524421 11.752728 > colMax(tmp5,na.rm=TRUE) [1] 471.35078 79.89046 83.41642 87.49496 80.76854 82.25479 93.04746 [8] 77.20992 91.51712 88.43947 81.95071 83.30089 75.68142 84.33974 [15] 83.80890 83.88707 83.78385 94.48896 94.25199 91.53439 > colMin(tmp5,na.rm=TRUE) [1] 55.37881 56.59107 56.50778 67.52384 63.07601 54.46596 57.73671 56.64663 [9] 58.80662 54.95641 58.18060 54.16568 59.18443 58.38822 60.49514 67.08338 [17] 58.27061 58.53726 53.50409 54.75955 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 88.53736 69.74596 75.07056 71.24753 69.51669 73.86677 68.53004 NaN [9] 70.26689 70.19752 > rowSums(tmp5,na.rm=TRUE) [1] 1770.747 1394.919 1501.411 1424.951 1390.334 1477.335 1370.601 0.000 [9] 1405.338 1403.950 > rowVars(tmp5,na.rm=TRUE) [1] 8191.24831 46.68035 76.86148 57.59045 38.39869 80.03065 [7] 79.86914 NA 65.95279 117.91881 > rowSd(tmp5,na.rm=TRUE) [1] 90.505515 6.832302 8.767068 7.588837 6.196668 8.945985 8.936954 [8] NA 8.121133 10.859043 > rowMax(tmp5,na.rm=TRUE) [1] 471.35078 80.17951 94.48896 83.41642 79.00728 94.25199 84.33974 [8] NA 79.91971 93.04746 > rowMin(tmp5,na.rm=TRUE) [1] 54.16568 58.50280 56.59107 58.53726 56.50778 56.64663 55.55374 NA [9] 55.37881 54.46596 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.62169 71.53843 68.49670 75.35289 71.84018 NaN 72.55124 [8] 64.04290 71.54560 73.69862 72.53794 63.81145 69.07461 71.73588 [15] 73.55635 74.34231 70.80616 71.61569 72.15659 67.91441 > colSums(tmp5,na.rm=TRUE) [1] 1040.5952 643.8459 616.4703 678.1760 646.5616 0.0000 652.9612 [8] 576.3861 643.9104 663.2876 652.8415 574.3030 621.6715 645.6229 [15] 662.0071 669.0807 637.2555 644.5412 649.4093 611.2296 > colVars(tmp5,na.rm=TRUE) [1] 17848.10522 59.15620 74.48022 36.98066 40.60791 NA [7] 137.15318 29.81274 104.97958 114.38921 46.44513 41.76193 [13] 34.85327 73.93008 42.85123 29.77783 53.56546 119.55877 [19] 110.27330 135.92430 > colSd(tmp5,na.rm=TRUE) [1] 133.596801 7.691307 8.630193 6.081173 6.372433 NA [7] 11.711242 5.460105 10.245955 10.695289 6.815066 6.462347 [13] 5.903666 8.598260 6.546085 5.456906 7.318843 10.934293 [19] 10.501110 11.658658 > colMax(tmp5,na.rm=TRUE) [1] 471.35078 79.89046 83.41642 87.49496 80.76854 -Inf 93.04746 [8] 72.84952 91.51712 88.43947 81.95071 76.43573 75.68142 84.33974 [15] 83.80890 83.88707 82.04092 94.48896 94.25199 91.53439 > colMin(tmp5,na.rm=TRUE) [1] 55.37881 56.59107 56.50778 67.52384 63.07601 Inf 59.25462 56.64663 [9] 58.80662 54.95641 58.18060 54.16568 59.18443 58.38822 63.46050 67.08338 [17] 58.27061 58.53726 57.20635 55.55374 > > > > > 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] 171.7357 111.6508 263.1557 246.8694 149.2811 248.8656 300.6988 276.3730 [9] 104.4528 129.5581 > apply(copymatrix,1,var,na.rm=TRUE) [1] 171.7357 111.6508 263.1557 246.8694 149.2811 248.8656 300.6988 276.3730 [9] 104.4528 129.5581 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] -2.842171e-14 5.684342e-14 -3.410605e-13 5.684342e-14 0.000000e+00 [6] -8.526513e-14 4.263256e-14 -5.684342e-14 2.842171e-14 1.705303e-13 [11] 5.684342e-14 -1.278977e-13 -1.136868e-13 2.273737e-13 0.000000e+00 [16] 0.000000e+00 -1.136868e-13 -1.705303e-13 -2.557954e-13 -2.842171e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 5 13 3 13 1 12 6 2 7 16 9 19 10 5 2 11 9 4 9 14 2 11 4 4 10 11 7 7 9 15 7 1 10 15 9 3 9 13 5 14 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.039394 > Min(tmp) [1] -2.323733 > mean(tmp) [1] -0.06837967 > Sum(tmp) [1] -6.837967 > Var(tmp) [1] 0.9423034 > > rowMeans(tmp) [1] -0.06837967 > rowSums(tmp) [1] -6.837967 > rowVars(tmp) [1] 0.9423034 > rowSd(tmp) [1] 0.9707231 > rowMax(tmp) [1] 2.039394 > rowMin(tmp) [1] -2.323733 > > colMeans(tmp) [1] -0.719710778 0.280877711 -0.124562700 1.014494456 -0.047061796 [6] -1.318527740 0.581060251 -0.565824854 1.326691023 -0.421324832 [11] -0.332214754 -0.609074898 1.550272697 -1.537342244 -1.402062935 [16] 0.159294286 -0.697824291 -0.680573225 0.173945630 0.348485630 [21] -0.437662817 0.945666874 1.344685336 0.435081814 0.733235156 [26] 1.216651633 0.151625728 0.020726562 -0.528236858 1.596290485 [31] -0.060683696 -0.679311751 0.934895173 -0.528473262 1.356344905 [36] -0.873649748 -0.628149696 0.711410200 2.010610841 -1.406226435 [41] -0.774223218 -0.559296288 1.639440174 -0.924594088 -0.645391062 [46] 0.486734258 0.321982174 -0.689000054 -0.594880489 0.586837404 [51] 0.115037308 -0.260462714 -1.851838527 1.315437338 1.585611656 [56] -0.556726763 -0.595431410 0.839483250 0.415992419 0.996816280 [61] -1.338393701 0.093775195 -1.052276877 -0.144789846 0.128214147 [66] -0.886328245 0.636658767 -1.422072338 -2.222244407 0.519990333 [71] 0.096756133 0.227740423 0.879660793 1.993406389 0.365116980 [76] -2.323733349 -0.557810243 -0.583840976 -0.604114654 0.260491069 [81] 0.572443425 -0.004973134 1.249961521 0.842653009 -0.244391564 [86] -0.140433983 -1.338838168 -0.591964475 2.039393631 -0.830079762 [91] -2.068807666 -1.502463084 0.220712298 -1.293624952 -0.435538650 [96] -0.675999538 1.037047161 -0.512205307 -0.593322863 -0.779115080 > colSums(tmp) [1] -0.719710778 0.280877711 -0.124562700 1.014494456 -0.047061796 [6] -1.318527740 0.581060251 -0.565824854 1.326691023 -0.421324832 [11] -0.332214754 -0.609074898 1.550272697 -1.537342244 -1.402062935 [16] 0.159294286 -0.697824291 -0.680573225 0.173945630 0.348485630 [21] -0.437662817 0.945666874 1.344685336 0.435081814 0.733235156 [26] 1.216651633 0.151625728 0.020726562 -0.528236858 1.596290485 [31] -0.060683696 -0.679311751 0.934895173 -0.528473262 1.356344905 [36] -0.873649748 -0.628149696 0.711410200 2.010610841 -1.406226435 [41] -0.774223218 -0.559296288 1.639440174 -0.924594088 -0.645391062 [46] 0.486734258 0.321982174 -0.689000054 -0.594880489 0.586837404 [51] 0.115037308 -0.260462714 -1.851838527 1.315437338 1.585611656 [56] -0.556726763 -0.595431410 0.839483250 0.415992419 0.996816280 [61] -1.338393701 0.093775195 -1.052276877 -0.144789846 0.128214147 [66] -0.886328245 0.636658767 -1.422072338 -2.222244407 0.519990333 [71] 0.096756133 0.227740423 0.879660793 1.993406389 0.365116980 [76] -2.323733349 -0.557810243 -0.583840976 -0.604114654 0.260491069 [81] 0.572443425 -0.004973134 1.249961521 0.842653009 -0.244391564 [86] -0.140433983 -1.338838168 -0.591964475 2.039393631 -0.830079762 [91] -2.068807666 -1.502463084 0.220712298 -1.293624952 -0.435538650 [96] -0.675999538 1.037047161 -0.512205307 -0.593322863 -0.779115080 > 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.719710778 0.280877711 -0.124562700 1.014494456 -0.047061796 [6] -1.318527740 0.581060251 -0.565824854 1.326691023 -0.421324832 [11] -0.332214754 -0.609074898 1.550272697 -1.537342244 -1.402062935 [16] 0.159294286 -0.697824291 -0.680573225 0.173945630 0.348485630 [21] -0.437662817 0.945666874 1.344685336 0.435081814 0.733235156 [26] 1.216651633 0.151625728 0.020726562 -0.528236858 1.596290485 [31] -0.060683696 -0.679311751 0.934895173 -0.528473262 1.356344905 [36] -0.873649748 -0.628149696 0.711410200 2.010610841 -1.406226435 [41] -0.774223218 -0.559296288 1.639440174 -0.924594088 -0.645391062 [46] 0.486734258 0.321982174 -0.689000054 -0.594880489 0.586837404 [51] 0.115037308 -0.260462714 -1.851838527 1.315437338 1.585611656 [56] -0.556726763 -0.595431410 0.839483250 0.415992419 0.996816280 [61] -1.338393701 0.093775195 -1.052276877 -0.144789846 0.128214147 [66] -0.886328245 0.636658767 -1.422072338 -2.222244407 0.519990333 [71] 0.096756133 0.227740423 0.879660793 1.993406389 0.365116980 [76] -2.323733349 -0.557810243 -0.583840976 -0.604114654 0.260491069 [81] 0.572443425 -0.004973134 1.249961521 0.842653009 -0.244391564 [86] -0.140433983 -1.338838168 -0.591964475 2.039393631 -0.830079762 [91] -2.068807666 -1.502463084 0.220712298 -1.293624952 -0.435538650 [96] -0.675999538 1.037047161 -0.512205307 -0.593322863 -0.779115080 > colMin(tmp) [1] -0.719710778 0.280877711 -0.124562700 1.014494456 -0.047061796 [6] -1.318527740 0.581060251 -0.565824854 1.326691023 -0.421324832 [11] -0.332214754 -0.609074898 1.550272697 -1.537342244 -1.402062935 [16] 0.159294286 -0.697824291 -0.680573225 0.173945630 0.348485630 [21] -0.437662817 0.945666874 1.344685336 0.435081814 0.733235156 [26] 1.216651633 0.151625728 0.020726562 -0.528236858 1.596290485 [31] -0.060683696 -0.679311751 0.934895173 -0.528473262 1.356344905 [36] -0.873649748 -0.628149696 0.711410200 2.010610841 -1.406226435 [41] -0.774223218 -0.559296288 1.639440174 -0.924594088 -0.645391062 [46] 0.486734258 0.321982174 -0.689000054 -0.594880489 0.586837404 [51] 0.115037308 -0.260462714 -1.851838527 1.315437338 1.585611656 [56] -0.556726763 -0.595431410 0.839483250 0.415992419 0.996816280 [61] -1.338393701 0.093775195 -1.052276877 -0.144789846 0.128214147 [66] -0.886328245 0.636658767 -1.422072338 -2.222244407 0.519990333 [71] 0.096756133 0.227740423 0.879660793 1.993406389 0.365116980 [76] -2.323733349 -0.557810243 -0.583840976 -0.604114654 0.260491069 [81] 0.572443425 -0.004973134 1.249961521 0.842653009 -0.244391564 [86] -0.140433983 -1.338838168 -0.591964475 2.039393631 -0.830079762 [91] -2.068807666 -1.502463084 0.220712298 -1.293624952 -0.435538650 [96] -0.675999538 1.037047161 -0.512205307 -0.593322863 -0.779115080 > colMedians(tmp) [1] -0.719710778 0.280877711 -0.124562700 1.014494456 -0.047061796 [6] -1.318527740 0.581060251 -0.565824854 1.326691023 -0.421324832 [11] -0.332214754 -0.609074898 1.550272697 -1.537342244 -1.402062935 [16] 0.159294286 -0.697824291 -0.680573225 0.173945630 0.348485630 [21] -0.437662817 0.945666874 1.344685336 0.435081814 0.733235156 [26] 1.216651633 0.151625728 0.020726562 -0.528236858 1.596290485 [31] -0.060683696 -0.679311751 0.934895173 -0.528473262 1.356344905 [36] -0.873649748 -0.628149696 0.711410200 2.010610841 -1.406226435 [41] -0.774223218 -0.559296288 1.639440174 -0.924594088 -0.645391062 [46] 0.486734258 0.321982174 -0.689000054 -0.594880489 0.586837404 [51] 0.115037308 -0.260462714 -1.851838527 1.315437338 1.585611656 [56] -0.556726763 -0.595431410 0.839483250 0.415992419 0.996816280 [61] -1.338393701 0.093775195 -1.052276877 -0.144789846 0.128214147 [66] -0.886328245 0.636658767 -1.422072338 -2.222244407 0.519990333 [71] 0.096756133 0.227740423 0.879660793 1.993406389 0.365116980 [76] -2.323733349 -0.557810243 -0.583840976 -0.604114654 0.260491069 [81] 0.572443425 -0.004973134 1.249961521 0.842653009 -0.244391564 [86] -0.140433983 -1.338838168 -0.591964475 2.039393631 -0.830079762 [91] -2.068807666 -1.502463084 0.220712298 -1.293624952 -0.435538650 [96] -0.675999538 1.037047161 -0.512205307 -0.593322863 -0.779115080 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.7197108 0.2808777 -0.1245627 1.014494 -0.0470618 -1.318528 0.5810603 [2,] -0.7197108 0.2808777 -0.1245627 1.014494 -0.0470618 -1.318528 0.5810603 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.5658249 1.326691 -0.4213248 -0.3322148 -0.6090749 1.550273 -1.537342 [2,] -0.5658249 1.326691 -0.4213248 -0.3322148 -0.6090749 1.550273 -1.537342 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -1.402063 0.1592943 -0.6978243 -0.6805732 0.1739456 0.3484856 -0.4376628 [2,] -1.402063 0.1592943 -0.6978243 -0.6805732 0.1739456 0.3484856 -0.4376628 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.9456669 1.344685 0.4350818 0.7332352 1.216652 0.1516257 0.02072656 [2,] 0.9456669 1.344685 0.4350818 0.7332352 1.216652 0.1516257 0.02072656 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.5282369 1.59629 -0.0606837 -0.6793118 0.9348952 -0.5284733 1.356345 [2,] -0.5282369 1.59629 -0.0606837 -0.6793118 0.9348952 -0.5284733 1.356345 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.8736497 -0.6281497 0.7114102 2.010611 -1.406226 -0.7742232 -0.5592963 [2,] -0.8736497 -0.6281497 0.7114102 2.010611 -1.406226 -0.7742232 -0.5592963 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 1.63944 -0.9245941 -0.6453911 0.4867343 0.3219822 -0.6890001 -0.5948805 [2,] 1.63944 -0.9245941 -0.6453911 0.4867343 0.3219822 -0.6890001 -0.5948805 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.5868374 0.1150373 -0.2604627 -1.851839 1.315437 1.585612 -0.5567268 [2,] 0.5868374 0.1150373 -0.2604627 -1.851839 1.315437 1.585612 -0.5567268 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.5954314 0.8394832 0.4159924 0.9968163 -1.338394 0.0937752 -1.052277 [2,] -0.5954314 0.8394832 0.4159924 0.9968163 -1.338394 0.0937752 -1.052277 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.1447898 0.1282141 -0.8863282 0.6366588 -1.422072 -2.222244 0.5199903 [2,] -0.1447898 0.1282141 -0.8863282 0.6366588 -1.422072 -2.222244 0.5199903 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.09675613 0.2277404 0.8796608 1.993406 0.365117 -2.323733 -0.5578102 [2,] 0.09675613 0.2277404 0.8796608 1.993406 0.365117 -2.323733 -0.5578102 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.583841 -0.6041147 0.2604911 0.5724434 -0.004973134 1.249962 0.842653 [2,] -0.583841 -0.6041147 0.2604911 0.5724434 -0.004973134 1.249962 0.842653 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.2443916 -0.140434 -1.338838 -0.5919645 2.039394 -0.8300798 -2.068808 [2,] -0.2443916 -0.140434 -1.338838 -0.5919645 2.039394 -0.8300798 -2.068808 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.502463 0.2207123 -1.293625 -0.4355386 -0.6759995 1.037047 -0.5122053 [2,] -1.502463 0.2207123 -1.293625 -0.4355386 -0.6759995 1.037047 -0.5122053 [,99] [,100] [1,] -0.5933229 -0.7791151 [2,] -0.5933229 -0.7791151 > > > Max(tmp2) [1] 2.188264 > Min(tmp2) [1] -2.663283 > mean(tmp2) [1] -0.08995752 > Sum(tmp2) [1] -8.995752 > Var(tmp2) [1] 0.8951449 > > rowMeans(tmp2) [1] -0.365983533 0.544000775 -0.100943487 -0.159552894 -2.663283116 [6] 0.225792124 1.439804731 -0.941106657 -1.845894235 -0.501233028 [11] -0.008881142 -0.673976583 0.706468610 -1.494865386 -0.502032986 [16] 1.261675448 -0.072813909 0.230446132 1.144625932 -0.762472026 [21] -1.646913011 0.184620844 0.310573115 0.648001440 0.631408716 [26] -1.155631268 1.659011653 -0.637423993 -1.752669179 -0.387101892 [31] 1.572537652 -1.858789963 -1.137326421 -0.109540830 1.068505865 [36] 0.201149028 0.827144858 -0.573829115 -0.865848587 0.497129324 [41] 0.758657250 -0.554058961 0.200195712 0.054936951 -0.866338464 [46] -0.239842088 -0.669350278 -0.966561483 -0.427108978 -0.808237506 [51] -0.674271742 -1.900523586 0.061063979 -0.365134406 -0.949707612 [56] -1.185383407 -0.329145627 -0.853938479 -0.392630807 0.952288556 [61] -0.944259159 -0.764391202 0.447920419 0.454891784 0.459792165 [66] -0.008429853 -0.031248618 0.905054082 -0.018633534 -0.732406925 [71] 0.861363298 0.651196890 -0.757093843 -1.231026096 0.287175524 [76] -0.342128565 -1.089765982 0.677866520 0.068356363 0.405277789 [81] 1.577346839 -0.774934639 0.713924482 1.657431672 -1.042704725 [86] 1.393595715 0.583163379 2.188264472 0.887203039 -0.375333387 [91] 1.098718474 -1.228979428 0.448472651 -0.024290752 -1.042193013 [96] -1.236387442 0.465920978 0.093546051 0.596251994 1.946028866 > rowSums(tmp2) [1] -0.365983533 0.544000775 -0.100943487 -0.159552894 -2.663283116 [6] 0.225792124 1.439804731 -0.941106657 -1.845894235 -0.501233028 [11] -0.008881142 -0.673976583 0.706468610 -1.494865386 -0.502032986 [16] 1.261675448 -0.072813909 0.230446132 1.144625932 -0.762472026 [21] -1.646913011 0.184620844 0.310573115 0.648001440 0.631408716 [26] -1.155631268 1.659011653 -0.637423993 -1.752669179 -0.387101892 [31] 1.572537652 -1.858789963 -1.137326421 -0.109540830 1.068505865 [36] 0.201149028 0.827144858 -0.573829115 -0.865848587 0.497129324 [41] 0.758657250 -0.554058961 0.200195712 0.054936951 -0.866338464 [46] -0.239842088 -0.669350278 -0.966561483 -0.427108978 -0.808237506 [51] -0.674271742 -1.900523586 0.061063979 -0.365134406 -0.949707612 [56] -1.185383407 -0.329145627 -0.853938479 -0.392630807 0.952288556 [61] -0.944259159 -0.764391202 0.447920419 0.454891784 0.459792165 [66] -0.008429853 -0.031248618 0.905054082 -0.018633534 -0.732406925 [71] 0.861363298 0.651196890 -0.757093843 -1.231026096 0.287175524 [76] -0.342128565 -1.089765982 0.677866520 0.068356363 0.405277789 [81] 1.577346839 -0.774934639 0.713924482 1.657431672 -1.042704725 [86] 1.393595715 0.583163379 2.188264472 0.887203039 -0.375333387 [91] 1.098718474 -1.228979428 0.448472651 -0.024290752 -1.042193013 [96] -1.236387442 0.465920978 0.093546051 0.596251994 1.946028866 > 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.365983533 0.544000775 -0.100943487 -0.159552894 -2.663283116 [6] 0.225792124 1.439804731 -0.941106657 -1.845894235 -0.501233028 [11] -0.008881142 -0.673976583 0.706468610 -1.494865386 -0.502032986 [16] 1.261675448 -0.072813909 0.230446132 1.144625932 -0.762472026 [21] -1.646913011 0.184620844 0.310573115 0.648001440 0.631408716 [26] -1.155631268 1.659011653 -0.637423993 -1.752669179 -0.387101892 [31] 1.572537652 -1.858789963 -1.137326421 -0.109540830 1.068505865 [36] 0.201149028 0.827144858 -0.573829115 -0.865848587 0.497129324 [41] 0.758657250 -0.554058961 0.200195712 0.054936951 -0.866338464 [46] -0.239842088 -0.669350278 -0.966561483 -0.427108978 -0.808237506 [51] -0.674271742 -1.900523586 0.061063979 -0.365134406 -0.949707612 [56] -1.185383407 -0.329145627 -0.853938479 -0.392630807 0.952288556 [61] -0.944259159 -0.764391202 0.447920419 0.454891784 0.459792165 [66] -0.008429853 -0.031248618 0.905054082 -0.018633534 -0.732406925 [71] 0.861363298 0.651196890 -0.757093843 -1.231026096 0.287175524 [76] -0.342128565 -1.089765982 0.677866520 0.068356363 0.405277789 [81] 1.577346839 -0.774934639 0.713924482 1.657431672 -1.042704725 [86] 1.393595715 0.583163379 2.188264472 0.887203039 -0.375333387 [91] 1.098718474 -1.228979428 0.448472651 -0.024290752 -1.042193013 [96] -1.236387442 0.465920978 0.093546051 0.596251994 1.946028866 > rowMin(tmp2) [1] -0.365983533 0.544000775 -0.100943487 -0.159552894 -2.663283116 [6] 0.225792124 1.439804731 -0.941106657 -1.845894235 -0.501233028 [11] -0.008881142 -0.673976583 0.706468610 -1.494865386 -0.502032986 [16] 1.261675448 -0.072813909 0.230446132 1.144625932 -0.762472026 [21] -1.646913011 0.184620844 0.310573115 0.648001440 0.631408716 [26] -1.155631268 1.659011653 -0.637423993 -1.752669179 -0.387101892 [31] 1.572537652 -1.858789963 -1.137326421 -0.109540830 1.068505865 [36] 0.201149028 0.827144858 -0.573829115 -0.865848587 0.497129324 [41] 0.758657250 -0.554058961 0.200195712 0.054936951 -0.866338464 [46] -0.239842088 -0.669350278 -0.966561483 -0.427108978 -0.808237506 [51] -0.674271742 -1.900523586 0.061063979 -0.365134406 -0.949707612 [56] -1.185383407 -0.329145627 -0.853938479 -0.392630807 0.952288556 [61] -0.944259159 -0.764391202 0.447920419 0.454891784 0.459792165 [66] -0.008429853 -0.031248618 0.905054082 -0.018633534 -0.732406925 [71] 0.861363298 0.651196890 -0.757093843 -1.231026096 0.287175524 [76] -0.342128565 -1.089765982 0.677866520 0.068356363 0.405277789 [81] 1.577346839 -0.774934639 0.713924482 1.657431672 -1.042704725 [86] 1.393595715 0.583163379 2.188264472 0.887203039 -0.375333387 [91] 1.098718474 -1.228979428 0.448472651 -0.024290752 -1.042193013 [96] -1.236387442 0.465920978 0.093546051 0.596251994 1.946028866 > > colMeans(tmp2) [1] -0.08995752 > colSums(tmp2) [1] -8.995752 > colVars(tmp2) [1] 0.8951449 > colSd(tmp2) [1] 0.946121 > colMax(tmp2) [1] 2.188264 > colMin(tmp2) [1] -2.663283 > colMedians(tmp2) [1] -0.05203126 > colRanges(tmp2) [,1] [1,] -2.663283 [2,] 2.188264 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] -2.226058 3.748955 -4.326899 -4.577070 -2.549400 1.365792 -1.315953 [8] -3.704732 -1.523636 2.865128 > colApply(tmp,quantile)[,1] [,1] [1,] -1.69681266 [2,] -1.22668605 [3,] -0.07872777 [4,] 0.59244182 [5,] 1.32098473 > > rowApply(tmp,sum) [1] -5.0210944 -2.0042752 -0.2033098 -1.1907470 0.6254096 -5.4282069 [7] -1.4411767 3.3451699 -1.7787002 0.8530593 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 3 2 4 9 8 4 8 7 3 5 [2,] 7 10 9 8 9 8 2 8 4 2 [3,] 1 5 5 4 4 6 6 1 10 4 [4,] 4 1 7 5 7 3 4 9 5 1 [5,] 5 4 1 7 1 2 10 10 2 7 [6,] 8 6 10 6 5 7 7 5 7 3 [7,] 6 7 3 3 3 9 3 3 8 8 [8,] 9 3 6 1 6 1 9 4 1 10 [9,] 10 9 2 2 2 5 1 6 9 6 [10,] 2 8 8 10 10 10 5 2 6 9 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.4325690 -0.2787208 2.5708123 -1.2990317 -0.2396956 -2.0042275 [7] -3.4496649 0.9995493 2.1851079 1.5906259 1.3792614 2.1967883 [13] 0.2983261 1.2940205 -2.4906245 1.8200166 0.1118684 1.9835345 [19] 0.8073111 0.2836058 > colApply(tmp,quantile)[,1] [,1] [1,] -2.7301718 [2,] -0.6610485 [3,] 0.3355271 [4,] 1.1333984 [5,] 2.3548638 > > rowApply(tmp,sum) [1] 3.690572 1.236781 3.240909 1.217509 -1.194339 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 20 1 13 4 17 [2,] 15 6 14 1 16 [3,] 11 11 7 3 20 [4,] 4 19 3 5 12 [5,] 17 9 11 11 1 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2.3548638 0.8307413 0.4541072 -1.3845694 1.10074719 -1.6700614 [2,] -2.7301718 -0.5672120 0.2171623 1.5654101 0.18328990 0.6687790 [3,] 0.3355271 0.4777063 -0.1432792 -1.0967603 0.26022994 -0.1125068 [4,] -0.6610485 -1.5206168 -0.7682159 -0.5888876 -0.03871952 -0.1437475 [5,] 1.1333984 0.5006604 2.8110378 0.2057755 -1.74524312 -0.7466907 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.5725721 0.6471953 2.2468322 -1.6783157 -0.01321228 -0.06643231 [2,] -1.1427923 0.4847640 0.5450222 0.1908001 -0.83363901 -0.72185587 [3,] -1.6423126 -0.2287797 -0.8042298 2.0429145 2.13035308 1.32815402 [4,] -0.2955391 -0.2371283 0.6170926 0.5797356 0.66962126 -0.31005064 [5,] -0.9415931 0.3334980 -0.4196093 0.4554914 -0.57386164 1.96697306 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.4638008 1.60889965 -1.9266361 0.9729091 -0.4957925 0.32903477 [2,] 1.1603687 -0.27714908 -0.2451390 2.0647439 0.4620832 0.53278971 [3,] 0.9206480 -0.08827506 0.2685893 1.0192821 0.6390698 0.02956921 [4,] 0.1830462 -0.09717954 0.3782107 -0.9384875 0.7006581 0.75187284 [5,] -1.5019360 0.14772456 -0.9656494 -1.2984310 -1.1941501 0.34026794 [,19] [,20] [1,] -0.5233846 0.7948744 [2,] -1.0517040 0.7312311 [3,] -1.2058478 -0.8891431 [4,] 2.3801143 0.5567784 [5,] 1.2081333 -0.9101350 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 653 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 563 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.3714974 -1.538403 0.001296519 -0.7762137 0.5766963 0.75942 1.487437 col8 col9 col10 col11 col12 col13 col14 row1 0.2241055 -0.2760419 0.8217185 1.423517 0.3766912 1.803283 1.848628 col15 col16 col17 col18 col19 col20 row1 -0.01859528 -0.6665473 0.7545961 0.2315692 0.08733021 0.6047146 > tmp[,"col10"] col10 row1 0.8217185 row2 -0.5578860 row3 0.2760957 row4 -1.8718288 row5 1.7587829 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 0.3714974 -1.538403 0.001296519 -0.7762137 0.5766963 0.759420 1.487437 row5 -0.5280606 -0.472257 -1.192747034 -1.4089409 -0.2187792 1.762344 2.483715 col8 col9 col10 col11 col12 col13 col14 row1 0.2241055 -0.2760419 0.8217185 1.4235173 0.3766912 1.803283 1.8486280 row5 0.3349393 -0.4198395 1.7587829 0.1604735 1.4855985 1.006002 0.0186166 col15 col16 col17 col18 col19 col20 row1 -0.01859528 -0.6665473 0.7545961 0.2315692 0.08733021 0.6047146 row5 2.31007325 1.2849738 0.2217623 -0.7127674 -0.33167141 -0.5450588 > tmp[,c("col6","col20")] col6 col20 row1 0.7594200 0.6047146 row2 0.1313886 -1.3949566 row3 1.1922650 0.4582971 row4 -0.2580233 -0.3666059 row5 1.7623444 -0.5450588 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.759420 0.6047146 row5 1.762344 -0.5450588 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.05291 49.44413 47.68159 51.62793 49.23959 106.5632 50.50388 48.66528 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.63795 49.98166 50.12966 51.32547 48.2577 51.01758 50.3477 50.35821 col17 col18 col19 col20 row1 50.48132 50.50014 47.79129 106.5303 > tmp[,"col10"] col10 row1 49.98166 row2 28.62269 row3 31.55631 row4 30.14299 row5 49.98676 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.05291 49.44413 47.68159 51.62793 49.23959 106.5632 50.50388 48.66528 row5 50.08695 50.32855 48.77503 49.02289 48.57294 106.3467 50.58960 50.69637 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.63795 49.98166 50.12966 51.32547 48.25770 51.01758 50.34770 50.35821 row5 50.39636 49.98676 49.66380 50.56105 49.95073 52.21423 52.22451 49.12455 col17 col18 col19 col20 row1 50.48132 50.50014 47.79129 106.5303 row5 50.56543 50.78578 49.36226 104.9597 > tmp[,c("col6","col20")] col6 col20 row1 106.56318 106.53025 row2 74.33799 75.13634 row3 74.14662 74.07542 row4 73.84500 74.38686 row5 106.34674 104.95975 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 106.5632 106.5303 row5 106.3467 104.9597 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 106.5632 106.5303 row5 106.3467 104.9597 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.2667782 [2,] 0.5113045 [3,] -1.0298155 [4,] -0.1473915 [5,] 2.1186199 > tmp[,c("col17","col7")] col17 col7 [1,] 0.74352756 -0.68667832 [2,] -0.76202314 0.03022178 [3,] -0.02423162 -0.31303998 [4,] -0.46975916 -2.25143702 [5,] -0.87528378 -0.97773311 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.58799291 -1.3639496 [2,] -0.05153751 0.8464610 [3,] 2.34848593 -0.9758374 [4,] 0.03173402 -0.5809308 [5,] 0.34051613 -1.1733064 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.5879929 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.58799291 [2,] -0.05153751 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 1.363096 0.6480276 1.2230197 -0.24407554 1.063914 0.02962988 -0.06881790 row1 1.230029 -0.2476715 -0.4786362 -0.06012371 2.012316 1.48172788 -0.02475956 [,8] [,9] [,10] [,11] [,12] [,13] row3 2.04635198 0.09993672 0.4451755 -0.2367405 -0.5051946 0.5689572 row1 -0.07606058 -1.28754966 1.5370563 0.2918308 -0.7194403 -0.8399142 [,14] [,15] [,16] [,17] [,18] [,19] row3 0.3513967 -0.2313235 -1.416918 0.01463043 1.9205007 -0.9326170 row1 0.4594455 -0.9251448 -1.854505 -0.28408712 -0.2642984 0.7484451 [,20] row3 0.2971422 row1 -1.3442802 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.4991018 0.03458185 0.7424984 0.2844701 0.9088421 -2.081238 -1.027301 [,8] [,9] [,10] row2 -0.666204 -1.36125 0.1322825 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 1.101761 0.4531887 0.6478315 0.4696141 -1.42763 0.5989167 -0.9643655 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.004857 -0.5134288 0.1577627 1.059483 0.1224469 1.746944 -0.9094766 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.980731 -0.08825218 1.250115 -1.421595 0.3339854 -0.9061336 > > > 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: 0x1bdf0820> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f4568410fc" [2] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f451d219623" [3] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f4540e55dc0" [4] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f4512daf3b5" [5] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f4577e02a44" [6] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f45608f3cc6" [7] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f454aad1e6b" [8] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f452996a90c" [9] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f457b79413b" [10] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f451ce94e5e" [11] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f45291e7eb" [12] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f452f148ef5" [13] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f452b6b60a8" [14] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f4552607dd2" [15] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM185f45f254cb1" > > > ### 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: 0x1ba41280> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x1ba41280> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x1ba41280> > rowMedians(tmp) [1] 0.263393928 -0.399468907 0.135573047 -0.036906141 0.403441855 [6] 0.406218918 0.017242621 0.684758256 -0.211912070 0.408070611 [11] -0.083471716 -0.706298130 0.541441213 0.058724879 -0.163920382 [16] -0.008384880 0.066183823 -0.183865566 -0.067412777 0.410620964 [21] 0.282660750 -0.114588187 -0.131998320 -0.337920876 -0.032271447 [26] -0.888244877 0.432079119 -0.431596184 -0.322230531 0.205151818 [31] -0.168014258 0.539027534 -0.338866107 0.012038339 -0.367165809 [36] -0.054148419 0.140955933 0.016889418 -0.007286896 -0.200673173 [41] 0.624015796 0.209212201 -0.246203136 0.027524269 -0.167209577 [46] -0.010519117 -0.064792825 0.626191613 0.248732332 -0.480282013 [51] -0.135945489 -0.374349771 0.081730077 0.160836720 0.189973347 [56] 0.271819838 -0.459107991 0.051942871 -0.088579082 0.033432743 [61] 0.314590923 0.387328016 0.379100314 -0.708685475 -0.175700018 [66] 0.194537238 0.012000893 -0.249560288 0.197656742 0.394987318 [71] 0.389723171 0.068337462 0.222723777 0.392314117 -0.242464926 [76] -0.202335374 -0.077989660 0.212903169 0.062384699 0.029353517 [81] 0.142272549 0.251320853 -0.077768547 0.434860952 -0.273746940 [86] -0.231046520 -0.047249818 0.043439144 0.057369448 0.108141376 [91] -0.317934398 0.281296748 0.105352328 -0.389838393 0.348130688 [96] 0.463462146 -0.465297159 0.070490694 -0.109749899 0.462101966 [101] 0.158227251 -0.191557392 -0.398797804 0.067929113 0.438825512 [106] -0.330936946 0.172873889 0.032297451 -0.184234431 0.312614652 [111] -0.007805747 -0.012774403 0.908721321 0.124385866 -0.747791133 [116] 0.140398951 0.047879372 -0.413906487 -0.409462545 0.294560617 [121] 0.018032520 0.808430797 0.193624215 -0.030363310 -0.054773065 [126] -0.002302370 -0.318778255 -0.252987803 -0.029862195 -0.566432558 [131] -0.148267093 0.055434609 0.163805381 -0.267762727 0.341190021 [136] 0.117200411 0.195164047 -0.056204173 0.324920564 -0.356967662 [141] -0.004148999 0.245791602 0.018780521 -0.404200872 -0.639714747 [146] -0.050332552 -0.306388650 0.326995404 -0.026873674 0.392875236 [151] -0.161872477 -0.104040115 -0.190038097 0.278435006 0.207502018 [156] -0.156147859 0.606244307 -0.310838240 -0.234959121 0.418957351 [161] -0.327365635 -0.770360680 -0.379113014 -0.181183065 -0.053501237 [166] -0.245530453 -0.053448059 0.454146832 -0.333271518 -0.020430453 [171] -0.066974872 0.093694362 -0.380033516 -0.463356507 -0.711722035 [176] -0.238940896 -0.410299800 0.264695899 0.012936454 0.062403281 [181] 0.064625770 -0.276884900 0.289017277 -0.251476614 -0.141099142 [186] 0.017216037 -0.240843331 -0.038422960 -0.170029861 -0.207843675 [191] -0.025640078 -0.293660559 -0.004847099 -0.123081114 -0.154190470 [196] 0.046641444 0.005339716 -0.060075125 0.097733196 -0.267488351 [201] -0.181634076 -0.162715583 0.156019614 -0.392599859 -0.090799368 [206] 0.205633043 -0.148540153 -0.022506036 0.154025053 0.008680672 [211] -0.077978456 0.105352757 -0.368087989 0.030691996 -0.257429284 [216] -0.050581922 -0.069468834 0.139844721 -0.260338045 -0.383034436 [221] -0.367042113 -0.156227411 0.362230664 -0.228165411 0.083348932 [226] -0.211061423 0.223701021 0.066292195 -0.334827361 -0.401055726 > > proc.time() user system elapsed 1.798 0.865 2.692
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: aarch64-unknown-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x283713c0> > .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: 0x283713c0> > .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: 0x283713c0> > .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: 0x283713c0> > 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: 0x27e53d60> > .Call("R_bm_AddColumn",P) <pointer: 0x27e53d60> > .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: 0x27e53d60> > .Call("R_bm_AddColumn",P) <pointer: 0x27e53d60> > .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: 0x27e53d60> > 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: 0x284857e0> > .Call("R_bm_AddColumn",P) <pointer: 0x284857e0> > .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: 0x284857e0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x284857e0> > .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: 0x284857e0> > > .Call("R_bm_RowMode",P) <pointer: 0x284857e0> > .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: 0x284857e0> > > .Call("R_bm_ColMode",P) <pointer: 0x284857e0> > .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: 0x284857e0> > 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: 0x28d7afd0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x28d7afd0> > .Call("R_bm_AddColumn",P) <pointer: 0x28d7afd0> > .Call("R_bm_AddColumn",P) <pointer: 0x28d7afd0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile185f9c3d0e5b0" "BufferedMatrixFile185f9c79e7b7fc" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile185f9c3d0e5b0" "BufferedMatrixFile185f9c79e7b7fc" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x285f7da0> > .Call("R_bm_AddColumn",P) <pointer: 0x285f7da0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x285f7da0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x285f7da0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x285f7da0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x285f7da0> > .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: 0x2a666990> > .Call("R_bm_AddColumn",P) <pointer: 0x2a666990> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x2a666990> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x2a666990> > 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: 0x2a6b3cc0> > .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: 0x2a6b3cc0> > rm(P) > > proc.time() user system elapsed 0.334 0.029 0.349
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: aarch64-unknown-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.304 0.044 0.337