Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2025-01-16 12:11 -0500 (Thu, 16 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" | 4489 |
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" | 4387 |
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-14 00:00:54 -0000 (Tue, 14 Jan 2025) |
EndedAt: 2025-01-14 00:01:27 -0000 (Tue, 14 Jan 2025) |
EllapsedTime: 33.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.333 0.022 0.342
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 14 00:01:21 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 14 00:01:21 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: 0x12c743c0> > > > > 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 14 00:01:21 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 14 00:01:22 2025" > > ColMode(tmp2) <pointer: 0x12c743c0> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.1240863 -0.2472884 0.7192046 -1.0576842 [2,] 0.3685395 1.0023480 -0.9135842 -0.3141800 [3,] -0.8856814 -0.9752359 -0.5259637 -0.7473976 [4,] -0.1614202 1.7322043 1.0283185 -0.6122335 > 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,] 99.1240863 0.2472884 0.7192046 1.0576842 [2,] 0.3685395 1.0023480 0.9135842 0.3141800 [3,] 0.8856814 0.9752359 0.5259637 0.7473976 [4,] 0.1614202 1.7322043 1.0283185 0.6122335 > 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.9561080 0.4972810 0.8480593 1.0284378 [2,] 0.6070745 1.0011733 0.9558160 0.5605176 [3,] 0.9411065 0.9875403 0.7252335 0.8645216 [4,] 0.4017714 1.3161323 1.0140604 0.7824535 > > 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,] 223.68517 30.22010 34.19980 36.34206 [2,] 31.43928 36.01408 35.47174 30.91936 [3,] 35.29675 35.85064 32.77830 34.39261 [4,] 29.17913 39.89353 36.16892 33.43677 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x1465bad0> > exp(tmp5) <pointer: 0x1465bad0> > log(tmp5,2) <pointer: 0x1465bad0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 465.5714 > Min(tmp5) [1] 53.66887 > mean(tmp5) [1] 73.01529 > Sum(tmp5) [1] 14603.06 > Var(tmp5) [1] 846.3151 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.93006 70.46732 71.04455 71.26988 68.97810 70.27219 70.72783 73.93901 [9] 70.22062 71.30338 > rowSums(tmp5) [1] 1838.601 1409.346 1420.891 1425.398 1379.562 1405.444 1414.557 1478.780 [9] 1404.412 1426.068 > rowVars(tmp5) [1] 7802.25887 62.78623 76.26615 63.01961 57.37400 83.82541 [7] 48.97341 105.86929 29.36776 100.77943 > rowSd(tmp5) [1] 88.330396 7.923776 8.733049 7.938489 7.574563 9.155622 6.998100 [8] 10.289280 5.419203 10.038896 > rowMax(tmp5) [1] 465.57137 87.25878 93.68687 83.05793 79.05719 85.17567 82.09491 [8] 93.47179 81.84893 96.16667 > rowMin(tmp5) [1] 56.43348 56.03872 54.02975 53.69523 53.66887 55.38332 59.00681 60.30463 [9] 59.06620 55.06886 > > colMeans(tmp5) [1] 113.94824 75.36930 74.00998 72.38249 70.20732 72.17482 71.73693 [8] 70.50498 70.61272 64.16021 70.04527 69.02469 71.55541 71.66135 [15] 71.41963 67.09778 70.21487 70.65030 73.10384 70.42577 > colSums(tmp5) [1] 1139.4824 753.6930 740.0998 723.8249 702.0732 721.7482 717.3693 [8] 705.0498 706.1272 641.6021 700.4527 690.2469 715.5541 716.6135 [15] 714.1963 670.9778 702.1487 706.5030 731.0384 704.2577 > colVars(tmp5) [1] 15328.36142 33.08032 125.15141 78.71949 63.68948 60.32506 [7] 33.89362 106.99237 64.17740 58.44547 133.62690 24.76071 [13] 33.01919 83.22677 113.69878 22.80071 60.18860 53.34343 [19] 70.43276 87.73081 > colSd(tmp5) [1] 123.807760 5.751549 11.187109 8.872401 7.980569 7.766921 [7] 5.821822 10.343712 8.011080 7.644964 11.559710 4.976013 [13] 5.746232 9.122871 10.662963 4.775009 7.758132 7.303659 [19] 8.392423 9.366473 > colMax(tmp5) [1] 465.57137 83.03315 96.16667 93.47179 85.78619 83.05793 77.73047 [8] 86.22106 79.79952 77.52669 89.80845 73.56665 82.62669 82.24273 [15] 87.87786 77.37135 80.27532 85.17567 87.25878 93.68687 > colMin(tmp5) [1] 60.73254 62.89918 55.38332 59.51703 58.26424 60.25039 59.06620 54.02975 [9] 59.00681 53.66887 55.06886 56.43348 65.31539 56.57929 58.08363 62.08273 [17] 58.64767 62.20615 60.96120 59.79797 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] 91.93006 70.46732 NA 71.26988 68.97810 70.27219 70.72783 73.93901 [9] 70.22062 71.30338 > rowSums(tmp5) [1] 1838.601 1409.346 NA 1425.398 1379.562 1405.444 1414.557 1478.780 [9] 1404.412 1426.068 > rowVars(tmp5) [1] 7802.25887 62.78623 75.52028 63.01961 57.37400 83.82541 [7] 48.97341 105.86929 29.36776 100.77943 > rowSd(tmp5) [1] 88.330396 7.923776 8.690241 7.938489 7.574563 9.155622 6.998100 [8] 10.289280 5.419203 10.038896 > rowMax(tmp5) [1] 465.57137 87.25878 NA 83.05793 79.05719 85.17567 82.09491 [8] 93.47179 81.84893 96.16667 > rowMin(tmp5) [1] 56.43348 56.03872 NA 53.69523 53.66887 55.38332 59.00681 60.30463 [9] 59.06620 55.06886 > > colMeans(tmp5) [1] 113.94824 75.36930 74.00998 72.38249 70.20732 72.17482 71.73693 [8] 70.50498 70.61272 64.16021 70.04527 69.02469 71.55541 71.66135 [15] 71.41963 67.09778 NA 70.65030 73.10384 70.42577 > colSums(tmp5) [1] 1139.4824 753.6930 740.0998 723.8249 702.0732 721.7482 717.3693 [8] 705.0498 706.1272 641.6021 700.4527 690.2469 715.5541 716.6135 [15] 714.1963 670.9778 NA 706.5030 731.0384 704.2577 > colVars(tmp5) [1] 15328.36142 33.08032 125.15141 78.71949 63.68948 60.32506 [7] 33.89362 106.99237 64.17740 58.44547 133.62690 24.76071 [13] 33.01919 83.22677 113.69878 22.80071 NA 53.34343 [19] 70.43276 87.73081 > colSd(tmp5) [1] 123.807760 5.751549 11.187109 8.872401 7.980569 7.766921 [7] 5.821822 10.343712 8.011080 7.644964 11.559710 4.976013 [13] 5.746232 9.122871 10.662963 4.775009 NA 7.303659 [19] 8.392423 9.366473 > colMax(tmp5) [1] 465.57137 83.03315 96.16667 93.47179 85.78619 83.05793 77.73047 [8] 86.22106 79.79952 77.52669 89.80845 73.56665 82.62669 82.24273 [15] 87.87786 77.37135 NA 85.17567 87.25878 93.68687 > colMin(tmp5) [1] 60.73254 62.89918 55.38332 59.51703 58.26424 60.25039 59.06620 54.02975 [9] 59.00681 53.66887 55.06886 56.43348 65.31539 56.57929 58.08363 62.08273 [17] NA 62.20615 60.96120 59.79797 > > Max(tmp5,na.rm=TRUE) [1] 465.5714 > Min(tmp5,na.rm=TRUE) [1] 53.66887 > mean(tmp5,na.rm=TRUE) [1] 72.97881 > Sum(tmp5,na.rm=TRUE) [1] 14522.78 > Var(tmp5,na.rm=TRUE) [1] 850.3219 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.93006 70.46732 70.55872 71.26988 68.97810 70.27219 70.72783 73.93901 [9] 70.22062 71.30338 > rowSums(tmp5,na.rm=TRUE) [1] 1838.601 1409.346 1340.616 1425.398 1379.562 1405.444 1414.557 1478.780 [9] 1404.412 1426.068 > rowVars(tmp5,na.rm=TRUE) [1] 7802.25887 62.78623 75.52028 63.01961 57.37400 83.82541 [7] 48.97341 105.86929 29.36776 100.77943 > rowSd(tmp5,na.rm=TRUE) [1] 88.330396 7.923776 8.690241 7.938489 7.574563 9.155622 6.998100 [8] 10.289280 5.419203 10.038896 > rowMax(tmp5,na.rm=TRUE) [1] 465.57137 87.25878 93.68687 83.05793 79.05719 85.17567 82.09491 [8] 93.47179 81.84893 96.16667 > rowMin(tmp5,na.rm=TRUE) [1] 56.43348 56.03872 54.02975 53.69523 53.66887 55.38332 59.00681 60.30463 [9] 59.06620 55.06886 > > colMeans(tmp5,na.rm=TRUE) [1] 113.94824 75.36930 74.00998 72.38249 70.20732 72.17482 71.73693 [8] 70.50498 70.61272 64.16021 70.04527 69.02469 71.55541 71.66135 [15] 71.41963 67.09778 69.09705 70.65030 73.10384 70.42577 > colSums(tmp5,na.rm=TRUE) [1] 1139.4824 753.6930 740.0998 723.8249 702.0732 721.7482 717.3693 [8] 705.0498 706.1272 641.6021 700.4527 690.2469 715.5541 716.6135 [15] 714.1963 670.9778 621.8734 706.5030 731.0384 704.2577 > colVars(tmp5,na.rm=TRUE) [1] 15328.36142 33.08032 125.15141 78.71949 63.68948 60.32506 [7] 33.89362 106.99237 64.17740 58.44547 133.62690 24.76071 [13] 33.01919 83.22677 113.69878 22.80071 53.65486 53.34343 [19] 70.43276 87.73081 > colSd(tmp5,na.rm=TRUE) [1] 123.807760 5.751549 11.187109 8.872401 7.980569 7.766921 [7] 5.821822 10.343712 8.011080 7.644964 11.559710 4.976013 [13] 5.746232 9.122871 10.662963 4.775009 7.324948 7.303659 [19] 8.392423 9.366473 > colMax(tmp5,na.rm=TRUE) [1] 465.57137 83.03315 96.16667 93.47179 85.78619 83.05793 77.73047 [8] 86.22106 79.79952 77.52669 89.80845 73.56665 82.62669 82.24273 [15] 87.87786 77.37135 77.42782 85.17567 87.25878 93.68687 > colMin(tmp5,na.rm=TRUE) [1] 60.73254 62.89918 55.38332 59.51703 58.26424 60.25039 59.06620 54.02975 [9] 59.00681 53.66887 55.06886 56.43348 65.31539 56.57929 58.08363 62.08273 [17] 58.64767 62.20615 60.96120 59.79797 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.93006 70.46732 NaN 71.26988 68.97810 70.27219 70.72783 73.93901 [9] 70.22062 71.30338 > rowSums(tmp5,na.rm=TRUE) [1] 1838.601 1409.346 0.000 1425.398 1379.562 1405.444 1414.557 1478.780 [9] 1404.412 1426.068 > rowVars(tmp5,na.rm=TRUE) [1] 7802.25887 62.78623 NA 63.01961 57.37400 83.82541 [7] 48.97341 105.86929 29.36776 100.77943 > rowSd(tmp5,na.rm=TRUE) [1] 88.330396 7.923776 NA 7.938489 7.574563 9.155622 6.998100 [8] 10.289280 5.419203 10.038896 > rowMax(tmp5,na.rm=TRUE) [1] 465.57137 87.25878 NA 83.05793 79.05719 85.17567 82.09491 [8] 93.47179 81.84893 96.16667 > rowMin(tmp5,na.rm=TRUE) [1] 56.43348 56.03872 NA 53.69523 53.66887 55.38332 59.00681 60.30463 [9] 59.06620 55.06886 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 118.44632 75.45273 74.65289 72.47124 69.45350 72.32683 71.78303 [8] 72.33556 69.82932 64.21322 71.42148 68.95032 72.24874 71.40158 [15] 72.57459 66.91613 NaN 70.85361 72.41596 67.84120 > colSums(tmp5,na.rm=TRUE) [1] 1066.0168 679.0746 671.8760 652.2412 625.0815 650.9415 646.0473 [8] 651.0200 628.4639 577.9190 642.7933 620.5529 650.2387 642.6142 [15] 653.1713 602.2451 0.0000 637.6825 651.7437 610.5708 > colVars(tmp5,na.rm=TRUE) [1] 17016.78883 37.13705 136.14526 88.47081 65.25789 67.60573 [7] 38.10640 82.66736 65.29531 65.71954 129.02331 27.79358 [13] 31.73856 92.87096 112.90431 25.27958 NA 59.54637 [19] 73.91366 23.54730 > colSd(tmp5,na.rm=TRUE) [1] 130.448414 6.094018 11.668130 9.405892 8.078236 8.222270 [7] 6.173039 9.092160 8.080551 8.106759 11.358843 5.271962 [13] 5.633699 9.636958 10.625644 5.027880 NA 7.716629 [19] 8.597305 4.852556 > colMax(tmp5,na.rm=TRUE) [1] 465.57137 83.03315 96.16667 93.47179 85.78619 83.05793 77.73047 [8] 86.22106 79.79952 77.52669 89.80845 73.56665 82.62669 82.24273 [15] 87.87786 77.37135 -Inf 85.17567 87.25878 73.89848 > colMin(tmp5,na.rm=TRUE) [1] 60.73254 62.89918 55.38332 59.51703 58.26424 60.25039 59.06620 56.03872 [9] 59.00681 53.66887 55.06886 56.43348 65.62148 56.57929 58.08363 62.08273 [17] Inf 62.20615 60.96120 59.79797 > > > > > 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] 308.7757 127.8056 281.6650 215.8393 219.1684 179.2763 156.4638 247.3980 [9] 167.8664 393.6445 > apply(copymatrix,1,var,na.rm=TRUE) [1] 308.7757 127.8056 281.6650 215.8393 219.1684 179.2763 156.4638 247.3980 [9] 167.8664 393.6445 > > > > 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] 0.000000e+00 -5.684342e-14 -5.684342e-14 0.000000e+00 8.526513e-14 [6] -5.684342e-14 0.000000e+00 -1.136868e-13 5.684342e-14 -5.684342e-14 [11] -6.394885e-14 1.421085e-13 5.684342e-14 -5.684342e-14 -1.705303e-13 [16] -1.989520e-13 5.684342e-14 -8.526513e-14 8.526513e-14 -2.273737e-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) + } 1 8 1 16 9 8 10 1 6 16 5 1 5 5 2 18 4 5 1 16 3 15 1 19 9 19 3 5 6 20 3 20 4 7 7 1 6 19 7 19 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.431803 > Min(tmp) [1] -2.776937 > mean(tmp) [1] -0.2938623 > Sum(tmp) [1] -29.38623 > Var(tmp) [1] 0.8623697 > > rowMeans(tmp) [1] -0.2938623 > rowSums(tmp) [1] -29.38623 > rowVars(tmp) [1] 0.8623697 > rowSd(tmp) [1] 0.9286386 > rowMax(tmp) [1] 2.431803 > rowMin(tmp) [1] -2.776937 > > colMeans(tmp) [1] 0.44326686 -0.01199108 -0.32446853 -1.17648444 -1.91143684 0.18100674 [7] -0.26272091 -0.70894324 -0.26619955 -0.88130934 -1.07355685 -1.70830011 [13] 1.51106679 0.55626121 0.67174157 0.99083485 -1.01942067 -1.55745964 [19] 1.10322909 -0.32762104 0.06803452 0.95018920 0.35620334 -0.49539420 [25] -1.39843302 1.20363544 0.73923899 -0.17836664 0.25864865 -1.00316301 [31] -1.08566022 0.27365251 0.26250887 -1.19682340 -0.16029993 -0.54233077 [37] -0.39122183 -1.37103783 0.48920865 -2.77693700 0.02896025 -1.10073868 [43] -0.61348394 -0.68330743 0.20650603 0.56607289 1.14070736 -0.74015667 [49] -0.44760242 -0.83907943 -1.20046105 -0.51929658 -0.01535613 -0.80475173 [55] -0.66801922 0.83703496 -1.85471479 -0.13571337 -0.08783336 -1.35743270 [61] -0.48746449 -0.78730932 -0.36687861 0.40853812 1.08050401 -0.14718199 [67] 0.11676848 0.49701018 0.03611548 0.30161781 -0.92817655 -0.67439606 [73] 0.40032143 0.44017841 0.15847445 0.05275660 -0.66425183 2.43180348 [79] -2.00292319 -1.18245637 -0.34239176 1.20319466 -0.21355085 0.75024555 [85] -0.98298474 0.12054500 -0.90518129 -0.41333158 -0.20164260 0.04062076 [91] -0.38039975 -0.72902076 -0.69467950 0.34637243 -2.05062656 -1.50138318 [97] -1.73362220 -2.36435763 -0.02333128 2.06576748 > colSums(tmp) [1] 0.44326686 -0.01199108 -0.32446853 -1.17648444 -1.91143684 0.18100674 [7] -0.26272091 -0.70894324 -0.26619955 -0.88130934 -1.07355685 -1.70830011 [13] 1.51106679 0.55626121 0.67174157 0.99083485 -1.01942067 -1.55745964 [19] 1.10322909 -0.32762104 0.06803452 0.95018920 0.35620334 -0.49539420 [25] -1.39843302 1.20363544 0.73923899 -0.17836664 0.25864865 -1.00316301 [31] -1.08566022 0.27365251 0.26250887 -1.19682340 -0.16029993 -0.54233077 [37] -0.39122183 -1.37103783 0.48920865 -2.77693700 0.02896025 -1.10073868 [43] -0.61348394 -0.68330743 0.20650603 0.56607289 1.14070736 -0.74015667 [49] -0.44760242 -0.83907943 -1.20046105 -0.51929658 -0.01535613 -0.80475173 [55] -0.66801922 0.83703496 -1.85471479 -0.13571337 -0.08783336 -1.35743270 [61] -0.48746449 -0.78730932 -0.36687861 0.40853812 1.08050401 -0.14718199 [67] 0.11676848 0.49701018 0.03611548 0.30161781 -0.92817655 -0.67439606 [73] 0.40032143 0.44017841 0.15847445 0.05275660 -0.66425183 2.43180348 [79] -2.00292319 -1.18245637 -0.34239176 1.20319466 -0.21355085 0.75024555 [85] -0.98298474 0.12054500 -0.90518129 -0.41333158 -0.20164260 0.04062076 [91] -0.38039975 -0.72902076 -0.69467950 0.34637243 -2.05062656 -1.50138318 [97] -1.73362220 -2.36435763 -0.02333128 2.06576748 > 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.44326686 -0.01199108 -0.32446853 -1.17648444 -1.91143684 0.18100674 [7] -0.26272091 -0.70894324 -0.26619955 -0.88130934 -1.07355685 -1.70830011 [13] 1.51106679 0.55626121 0.67174157 0.99083485 -1.01942067 -1.55745964 [19] 1.10322909 -0.32762104 0.06803452 0.95018920 0.35620334 -0.49539420 [25] -1.39843302 1.20363544 0.73923899 -0.17836664 0.25864865 -1.00316301 [31] -1.08566022 0.27365251 0.26250887 -1.19682340 -0.16029993 -0.54233077 [37] -0.39122183 -1.37103783 0.48920865 -2.77693700 0.02896025 -1.10073868 [43] -0.61348394 -0.68330743 0.20650603 0.56607289 1.14070736 -0.74015667 [49] -0.44760242 -0.83907943 -1.20046105 -0.51929658 -0.01535613 -0.80475173 [55] -0.66801922 0.83703496 -1.85471479 -0.13571337 -0.08783336 -1.35743270 [61] -0.48746449 -0.78730932 -0.36687861 0.40853812 1.08050401 -0.14718199 [67] 0.11676848 0.49701018 0.03611548 0.30161781 -0.92817655 -0.67439606 [73] 0.40032143 0.44017841 0.15847445 0.05275660 -0.66425183 2.43180348 [79] -2.00292319 -1.18245637 -0.34239176 1.20319466 -0.21355085 0.75024555 [85] -0.98298474 0.12054500 -0.90518129 -0.41333158 -0.20164260 0.04062076 [91] -0.38039975 -0.72902076 -0.69467950 0.34637243 -2.05062656 -1.50138318 [97] -1.73362220 -2.36435763 -0.02333128 2.06576748 > colMin(tmp) [1] 0.44326686 -0.01199108 -0.32446853 -1.17648444 -1.91143684 0.18100674 [7] -0.26272091 -0.70894324 -0.26619955 -0.88130934 -1.07355685 -1.70830011 [13] 1.51106679 0.55626121 0.67174157 0.99083485 -1.01942067 -1.55745964 [19] 1.10322909 -0.32762104 0.06803452 0.95018920 0.35620334 -0.49539420 [25] -1.39843302 1.20363544 0.73923899 -0.17836664 0.25864865 -1.00316301 [31] -1.08566022 0.27365251 0.26250887 -1.19682340 -0.16029993 -0.54233077 [37] -0.39122183 -1.37103783 0.48920865 -2.77693700 0.02896025 -1.10073868 [43] -0.61348394 -0.68330743 0.20650603 0.56607289 1.14070736 -0.74015667 [49] -0.44760242 -0.83907943 -1.20046105 -0.51929658 -0.01535613 -0.80475173 [55] -0.66801922 0.83703496 -1.85471479 -0.13571337 -0.08783336 -1.35743270 [61] -0.48746449 -0.78730932 -0.36687861 0.40853812 1.08050401 -0.14718199 [67] 0.11676848 0.49701018 0.03611548 0.30161781 -0.92817655 -0.67439606 [73] 0.40032143 0.44017841 0.15847445 0.05275660 -0.66425183 2.43180348 [79] -2.00292319 -1.18245637 -0.34239176 1.20319466 -0.21355085 0.75024555 [85] -0.98298474 0.12054500 -0.90518129 -0.41333158 -0.20164260 0.04062076 [91] -0.38039975 -0.72902076 -0.69467950 0.34637243 -2.05062656 -1.50138318 [97] -1.73362220 -2.36435763 -0.02333128 2.06576748 > colMedians(tmp) [1] 0.44326686 -0.01199108 -0.32446853 -1.17648444 -1.91143684 0.18100674 [7] -0.26272091 -0.70894324 -0.26619955 -0.88130934 -1.07355685 -1.70830011 [13] 1.51106679 0.55626121 0.67174157 0.99083485 -1.01942067 -1.55745964 [19] 1.10322909 -0.32762104 0.06803452 0.95018920 0.35620334 -0.49539420 [25] -1.39843302 1.20363544 0.73923899 -0.17836664 0.25864865 -1.00316301 [31] -1.08566022 0.27365251 0.26250887 -1.19682340 -0.16029993 -0.54233077 [37] -0.39122183 -1.37103783 0.48920865 -2.77693700 0.02896025 -1.10073868 [43] -0.61348394 -0.68330743 0.20650603 0.56607289 1.14070736 -0.74015667 [49] -0.44760242 -0.83907943 -1.20046105 -0.51929658 -0.01535613 -0.80475173 [55] -0.66801922 0.83703496 -1.85471479 -0.13571337 -0.08783336 -1.35743270 [61] -0.48746449 -0.78730932 -0.36687861 0.40853812 1.08050401 -0.14718199 [67] 0.11676848 0.49701018 0.03611548 0.30161781 -0.92817655 -0.67439606 [73] 0.40032143 0.44017841 0.15847445 0.05275660 -0.66425183 2.43180348 [79] -2.00292319 -1.18245637 -0.34239176 1.20319466 -0.21355085 0.75024555 [85] -0.98298474 0.12054500 -0.90518129 -0.41333158 -0.20164260 0.04062076 [91] -0.38039975 -0.72902076 -0.69467950 0.34637243 -2.05062656 -1.50138318 [97] -1.73362220 -2.36435763 -0.02333128 2.06576748 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.4432669 -0.01199108 -0.3244685 -1.176484 -1.911437 0.1810067 -0.2627209 [2,] 0.4432669 -0.01199108 -0.3244685 -1.176484 -1.911437 0.1810067 -0.2627209 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.7089432 -0.2661996 -0.8813093 -1.073557 -1.7083 1.511067 0.5562612 [2,] -0.7089432 -0.2661996 -0.8813093 -1.073557 -1.7083 1.511067 0.5562612 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.6717416 0.9908349 -1.019421 -1.55746 1.103229 -0.327621 0.06803452 [2,] 0.6717416 0.9908349 -1.019421 -1.55746 1.103229 -0.327621 0.06803452 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.9501892 0.3562033 -0.4953942 -1.398433 1.203635 0.739239 -0.1783666 [2,] 0.9501892 0.3562033 -0.4953942 -1.398433 1.203635 0.739239 -0.1783666 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.2586487 -1.003163 -1.08566 0.2736525 0.2625089 -1.196823 -0.1602999 [2,] 0.2586487 -1.003163 -1.08566 0.2736525 0.2625089 -1.196823 -0.1602999 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.5423308 -0.3912218 -1.371038 0.4892087 -2.776937 0.02896025 -1.100739 [2,] -0.5423308 -0.3912218 -1.371038 0.4892087 -2.776937 0.02896025 -1.100739 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.6134839 -0.6833074 0.206506 0.5660729 1.140707 -0.7401567 -0.4476024 [2,] -0.6134839 -0.6833074 0.206506 0.5660729 1.140707 -0.7401567 -0.4476024 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -0.8390794 -1.200461 -0.5192966 -0.01535613 -0.8047517 -0.6680192 0.837035 [2,] -0.8390794 -1.200461 -0.5192966 -0.01535613 -0.8047517 -0.6680192 0.837035 [,57] [,58] [,59] [,60] [,61] [,62] [1,] -1.854715 -0.1357134 -0.08783336 -1.357433 -0.4874645 -0.7873093 [2,] -1.854715 -0.1357134 -0.08783336 -1.357433 -0.4874645 -0.7873093 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [1,] -0.3668786 0.4085381 1.080504 -0.147182 0.1167685 0.4970102 0.03611548 [2,] -0.3668786 0.4085381 1.080504 -0.147182 0.1167685 0.4970102 0.03611548 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] 0.3016178 -0.9281765 -0.6743961 0.4003214 0.4401784 0.1584744 0.0527566 [2,] 0.3016178 -0.9281765 -0.6743961 0.4003214 0.4401784 0.1584744 0.0527566 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] -0.6642518 2.431803 -2.002923 -1.182456 -0.3423918 1.203195 -0.2135509 [2,] -0.6642518 2.431803 -2.002923 -1.182456 -0.3423918 1.203195 -0.2135509 [,84] [,85] [,86] [,87] [,88] [,89] [,90] [1,] 0.7502455 -0.9829847 0.120545 -0.9051813 -0.4133316 -0.2016426 0.04062076 [2,] 0.7502455 -0.9829847 0.120545 -0.9051813 -0.4133316 -0.2016426 0.04062076 [,91] [,92] [,93] [,94] [,95] [,96] [,97] [1,] -0.3803998 -0.7290208 -0.6946795 0.3463724 -2.050627 -1.501383 -1.733622 [2,] -0.3803998 -0.7290208 -0.6946795 0.3463724 -2.050627 -1.501383 -1.733622 [,98] [,99] [,100] [1,] -2.364358 -0.02333128 2.065767 [2,] -2.364358 -0.02333128 2.065767 > > > Max(tmp2) [1] 2.444046 > Min(tmp2) [1] -2.241992 > mean(tmp2) [1] 0.135654 > Sum(tmp2) [1] 13.5654 > Var(tmp2) [1] 1.081694 > > rowMeans(tmp2) [1] 0.28729135 -0.28565776 -0.17774349 1.72308043 0.65199066 -1.88782684 [7] 0.91711402 -0.87271087 -0.52159872 0.94019366 0.14609594 1.46669761 [13] -0.46376534 -1.13304241 -0.91210481 0.38860899 0.54503045 1.87158267 [19] 0.16317114 0.51662225 0.89905517 -1.46867705 -0.04003283 0.30822276 [25] 1.27014977 -1.68362498 -2.24199157 1.38711040 1.19573063 0.07212103 [31] -2.03384598 -0.55829831 -0.82812423 1.57721918 0.12912973 1.41245621 [37] 0.35942187 -1.00096652 0.68602927 0.24386683 -0.01855512 -1.62456883 [43] -0.64995850 0.28209392 -1.65423274 1.07144564 0.90037634 1.46500556 [49] -1.17051596 0.17616559 -0.88614390 2.44404630 -1.85104753 1.45569712 [55] 0.40878285 -0.96108772 -1.88097932 -0.76286907 0.55659145 -1.15254771 [61] 0.12516882 0.28340718 -0.99203841 0.36445187 0.99605380 0.39855798 [67] -0.34081664 -0.37754406 1.01768303 1.26182803 0.13350867 1.10959050 [73] 0.13109733 -0.69287791 1.44611006 -0.11132746 0.77497118 0.23456407 [79] 0.00554051 1.10534667 0.31169678 0.65485442 -0.87387719 0.57775332 [85] 1.53120257 1.00642667 1.45370156 0.99672906 -1.13899133 1.42703447 [91] 0.35827003 0.17515590 0.98652817 -0.69560258 1.09018756 -0.97398967 [97] -1.22520297 2.19028374 -0.06310054 -0.29261747 > rowSums(tmp2) [1] 0.28729135 -0.28565776 -0.17774349 1.72308043 0.65199066 -1.88782684 [7] 0.91711402 -0.87271087 -0.52159872 0.94019366 0.14609594 1.46669761 [13] -0.46376534 -1.13304241 -0.91210481 0.38860899 0.54503045 1.87158267 [19] 0.16317114 0.51662225 0.89905517 -1.46867705 -0.04003283 0.30822276 [25] 1.27014977 -1.68362498 -2.24199157 1.38711040 1.19573063 0.07212103 [31] -2.03384598 -0.55829831 -0.82812423 1.57721918 0.12912973 1.41245621 [37] 0.35942187 -1.00096652 0.68602927 0.24386683 -0.01855512 -1.62456883 [43] -0.64995850 0.28209392 -1.65423274 1.07144564 0.90037634 1.46500556 [49] -1.17051596 0.17616559 -0.88614390 2.44404630 -1.85104753 1.45569712 [55] 0.40878285 -0.96108772 -1.88097932 -0.76286907 0.55659145 -1.15254771 [61] 0.12516882 0.28340718 -0.99203841 0.36445187 0.99605380 0.39855798 [67] -0.34081664 -0.37754406 1.01768303 1.26182803 0.13350867 1.10959050 [73] 0.13109733 -0.69287791 1.44611006 -0.11132746 0.77497118 0.23456407 [79] 0.00554051 1.10534667 0.31169678 0.65485442 -0.87387719 0.57775332 [85] 1.53120257 1.00642667 1.45370156 0.99672906 -1.13899133 1.42703447 [91] 0.35827003 0.17515590 0.98652817 -0.69560258 1.09018756 -0.97398967 [97] -1.22520297 2.19028374 -0.06310054 -0.29261747 > 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.28729135 -0.28565776 -0.17774349 1.72308043 0.65199066 -1.88782684 [7] 0.91711402 -0.87271087 -0.52159872 0.94019366 0.14609594 1.46669761 [13] -0.46376534 -1.13304241 -0.91210481 0.38860899 0.54503045 1.87158267 [19] 0.16317114 0.51662225 0.89905517 -1.46867705 -0.04003283 0.30822276 [25] 1.27014977 -1.68362498 -2.24199157 1.38711040 1.19573063 0.07212103 [31] -2.03384598 -0.55829831 -0.82812423 1.57721918 0.12912973 1.41245621 [37] 0.35942187 -1.00096652 0.68602927 0.24386683 -0.01855512 -1.62456883 [43] -0.64995850 0.28209392 -1.65423274 1.07144564 0.90037634 1.46500556 [49] -1.17051596 0.17616559 -0.88614390 2.44404630 -1.85104753 1.45569712 [55] 0.40878285 -0.96108772 -1.88097932 -0.76286907 0.55659145 -1.15254771 [61] 0.12516882 0.28340718 -0.99203841 0.36445187 0.99605380 0.39855798 [67] -0.34081664 -0.37754406 1.01768303 1.26182803 0.13350867 1.10959050 [73] 0.13109733 -0.69287791 1.44611006 -0.11132746 0.77497118 0.23456407 [79] 0.00554051 1.10534667 0.31169678 0.65485442 -0.87387719 0.57775332 [85] 1.53120257 1.00642667 1.45370156 0.99672906 -1.13899133 1.42703447 [91] 0.35827003 0.17515590 0.98652817 -0.69560258 1.09018756 -0.97398967 [97] -1.22520297 2.19028374 -0.06310054 -0.29261747 > rowMin(tmp2) [1] 0.28729135 -0.28565776 -0.17774349 1.72308043 0.65199066 -1.88782684 [7] 0.91711402 -0.87271087 -0.52159872 0.94019366 0.14609594 1.46669761 [13] -0.46376534 -1.13304241 -0.91210481 0.38860899 0.54503045 1.87158267 [19] 0.16317114 0.51662225 0.89905517 -1.46867705 -0.04003283 0.30822276 [25] 1.27014977 -1.68362498 -2.24199157 1.38711040 1.19573063 0.07212103 [31] -2.03384598 -0.55829831 -0.82812423 1.57721918 0.12912973 1.41245621 [37] 0.35942187 -1.00096652 0.68602927 0.24386683 -0.01855512 -1.62456883 [43] -0.64995850 0.28209392 -1.65423274 1.07144564 0.90037634 1.46500556 [49] -1.17051596 0.17616559 -0.88614390 2.44404630 -1.85104753 1.45569712 [55] 0.40878285 -0.96108772 -1.88097932 -0.76286907 0.55659145 -1.15254771 [61] 0.12516882 0.28340718 -0.99203841 0.36445187 0.99605380 0.39855798 [67] -0.34081664 -0.37754406 1.01768303 1.26182803 0.13350867 1.10959050 [73] 0.13109733 -0.69287791 1.44611006 -0.11132746 0.77497118 0.23456407 [79] 0.00554051 1.10534667 0.31169678 0.65485442 -0.87387719 0.57775332 [85] 1.53120257 1.00642667 1.45370156 0.99672906 -1.13899133 1.42703447 [91] 0.35827003 0.17515590 0.98652817 -0.69560258 1.09018756 -0.97398967 [97] -1.22520297 2.19028374 -0.06310054 -0.29261747 > > colMeans(tmp2) [1] 0.135654 > colSums(tmp2) [1] 13.5654 > colVars(tmp2) [1] 1.081694 > colSd(tmp2) [1] 1.040045 > colMax(tmp2) [1] 2.444046 > colMin(tmp2) [1] -2.241992 > colMedians(tmp2) [1] 0.2392155 > colRanges(tmp2) [,1] [1,] -2.241992 [2,] 2.444046 > > 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] 5.7700675 4.7094301 -0.4212609 -2.4178161 5.3621539 4.5856850 [7] 0.7454011 -3.9482691 -2.0819674 -0.6541939 > colApply(tmp,quantile)[,1] [,1] [1,] -1.3250559 [2,] 0.4111361 [3,] 0.6464445 [4,] 1.0722813 [5,] 1.8393814 > > rowApply(tmp,sum) [1] 1.1073691 4.5210029 5.8660426 0.8076534 1.0278369 -1.9987303 [7] 1.4428389 -0.6541444 2.3436966 -2.8143355 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 3 1 9 8 9 7 8 7 10 8 [2,] 4 6 2 3 10 5 7 10 8 9 [3,] 8 2 8 4 6 8 4 3 3 3 [4,] 9 3 1 2 1 6 3 5 6 4 [5,] 2 10 7 9 4 10 10 4 7 6 [6,] 5 8 6 7 3 9 5 8 9 7 [7,] 6 9 3 5 8 2 2 6 2 5 [8,] 1 7 4 6 7 1 6 2 5 2 [9,] 7 5 5 1 2 4 9 9 4 1 [10,] 10 4 10 10 5 3 1 1 1 10 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -1.3509236 2.6822208 -2.2634590 0.5161446 -1.4659833 0.1192591 [7] 2.2244465 2.0944623 -1.4743960 -0.3100116 -2.2492753 -0.3085073 [13] 2.2994649 2.5185084 6.5386453 -0.8709857 -4.7264438 2.6785779 [19] 5.6270341 -1.0161869 > colApply(tmp,quantile)[,1] [,1] [1,] -2.2484923 [2,] -0.8335988 [3,] -0.3581790 [4,] 0.3951015 [5,] 1.6942450 > > rowApply(tmp,sum) [1] -3.8649468 0.3277194 10.1464811 1.6851938 2.9681440 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 12 14 17 1 6 [2,] 3 5 18 19 17 [3,] 2 3 4 6 18 [4,] 4 6 8 13 19 [5,] 1 8 2 18 14 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.3581790 -1.2885808 -1.5273267 -1.2168795 -1.8706199 0.6926071 [2,] 0.3951015 -0.7782255 -0.8638776 -0.7680422 -0.1696266 0.1321978 [3,] 1.6942450 1.8371378 -0.3200291 0.1891581 -1.5609522 -0.2006803 [4,] -2.2484923 1.6043420 -0.9103091 0.6309621 1.3939479 -0.8438117 [5,] -0.8335988 1.3075474 1.3580836 1.6809460 0.7412674 0.3389463 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.9289618 -0.7921515 -0.37719875 -0.4534660 -0.8167439 0.3977737 [2,] -0.8598181 0.1866246 -1.11355875 -0.6239060 1.4222356 -0.1475735 [3,] 1.9121771 1.4922105 0.60103239 -0.2980879 0.3855180 -0.1299057 [4,] 1.1816820 0.7790823 -0.09595695 -0.2124928 -0.9222933 -0.9762730 [5,] -0.9385564 0.4286964 -0.48871399 1.2779411 -2.3179917 0.5474713 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.05572384 -0.8812717 0.7308948 0.1595106779 -0.54051354 -0.39710944 [2,] 0.92246308 0.8053576 1.4275545 0.4265751779 -0.01738375 -0.05881427 [3,] 3.12100135 1.3118086 1.0469857 -0.5814768947 -2.07177779 1.26431465 [4,] -0.91268981 0.5903254 1.1930781 -0.8761519839 -1.17133435 0.92578396 [5,] -0.88703353 0.6922885 2.1401321 0.0005573704 -0.92543434 0.94440299 [,19] [,20] [1,] 1.22738671 2.46223532 [2,] 1.57871493 -1.56827917 [3,] 0.23521265 0.21858926 [4,] 2.65556936 -0.09977408 [5,] -0.06984958 -2.02895825 > > > 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 1.318213 -1.316093 1.22069 -1.608475 -2.151482 -0.1194791 0.4051061 col8 col9 col10 col11 col12 col13 col14 row1 -0.6090691 -1.017209 -1.303575 -0.9320063 -0.415433 -0.1889047 0.1684534 col15 col16 col17 col18 col19 col20 row1 0.5191103 -1.264965 -0.04810791 1.437825 -2.026735 -0.4844194 > tmp[,"col10"] col10 row1 -1.3035754 row2 0.5062889 row3 0.1370021 row4 0.2900750 row5 2.1517564 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 1.318213 -1.3160933 1.220690 -1.6084752 -2.1514818 -0.1194791 0.4051061 row5 0.219878 -0.6381233 0.103936 0.8616868 0.8719518 -1.2150016 1.1564096 col8 col9 col10 col11 col12 col13 row1 -0.60906910 -1.0172095 -1.303575 -0.9320063 -0.4154330 -0.1889047 row5 -0.03259184 0.9634202 2.151756 1.5560688 -0.8562663 -1.8287589 col14 col15 col16 col17 col18 col19 row1 0.1684534 0.5191103 -1.2649655 -0.04810791 1.4378247 -2.02673518 row5 0.8186743 -0.7836050 -0.2582385 -1.96147757 0.3426525 -0.09875422 col20 row1 -0.4844194 row5 -2.3025099 > tmp[,c("col6","col20")] col6 col20 row1 -0.1194791 -0.4844194 row2 1.2806466 0.2355002 row3 0.8405654 -1.1108689 row4 -0.6237085 0.5161133 row5 -1.2150016 -2.3025099 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.1194791 -0.4844194 row5 -1.2150016 -2.3025099 > > > > > 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.18207 50.08245 49.42921 49.87676 49.01554 105.3096 48.00026 49.38695 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.24239 48.55257 49.28158 49.06196 50.31725 49.27506 50.58642 50.7089 col17 col18 col19 col20 row1 49.44923 49.27211 49.17543 104.9122 > tmp[,"col10"] col10 row1 48.55257 row2 30.28605 row3 31.22159 row4 30.27718 row5 50.22506 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.18207 50.08245 49.42921 49.87676 49.01554 105.3096 48.00026 49.38695 row5 50.54462 50.31279 52.32635 48.64773 49.99120 106.4418 49.14328 49.51840 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.24239 48.55257 49.28158 49.06196 50.31725 49.27506 50.58642 50.70890 row5 50.27444 50.22506 51.57542 50.22145 48.49342 49.93236 52.70241 49.68013 col17 col18 col19 col20 row1 49.44923 49.27211 49.17543 104.9122 row5 49.14941 50.50804 50.59937 105.1505 > tmp[,c("col6","col20")] col6 col20 row1 105.30959 104.91222 row2 74.31500 72.78186 row3 74.50812 73.85187 row4 74.72174 74.72598 row5 106.44180 105.15046 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.3096 104.9122 row5 106.4418 105.1505 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.3096 104.9122 row5 106.4418 105.1505 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 1.9934795 [2,] -1.0178410 [3,] -0.3945919 [4,] 0.6487822 [5,] -1.0356778 > tmp[,c("col17","col7")] col17 col7 [1,] 0.1417007 -0.62891078 [2,] 0.5963025 1.41175463 [3,] -1.0365516 -0.66420237 [4,] -1.6331719 -0.03270596 [5,] 1.9439234 -0.55500984 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.7638926 1.3344390 [2,] 1.5469159 0.1255218 [3,] 0.1210725 -1.3789843 [4,] -0.7879220 -0.2287840 [5,] -0.9431103 1.7018146 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.7638926 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.7638926 [2,] 1.5469159 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 -0.5911863 0.2920707 2.209970 0.3396759 0.4657359 -1.0379455 -1.518521 row1 2.6253588 0.8142510 -0.647401 -1.6894034 1.2916688 0.9260653 1.190489 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 0.1137239 0.6759522 -0.1520461 -1.032617 -0.4934080 0.8856994 -1.298781 row1 0.5832359 1.3370458 -0.2805661 1.104204 0.5655899 -0.3745166 -1.081918 [,15] [,16] [,17] [,18] [,19] [,20] row3 0.8963183 0.6104536 0.1420716 0.03382889 0.13340647 0.05851161 row1 -1.0505545 -0.2129729 -2.5116387 -0.73518813 -0.08494575 1.66418013 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.1623706 -1.153341 -0.9560108 1.707031 0.4437547 -0.05849584 1.384921 [,8] [,9] [,10] row2 -0.2549338 -0.3955759 1.282165 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.4322601 0.1696025 0.1869292 0.2387992 -0.2863121 0.4557267 0.5653749 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.7807422 -0.4589891 -0.8384934 -1.105126 -0.1250932 -0.8688203 0.3307741 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.4067458 0.7909234 0.40775 -2.386778 -0.5640037 -0.206692 > > > 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: 0x145b7fb0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a87023fccf" [2] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a825438427" [3] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a843d67406" [4] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a8616f9581" [5] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a8371ac49" [6] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a873ab5176" [7] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a8587e535c" [8] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a8648f8371" [9] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a87c974fca" [10] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a829e88821" [11] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a864746ae4" [12] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a81119c1bd" [13] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a8171dda1d" [14] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a8b33d215" [15] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM2534a875ea6dbe" > > > ### 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: 0x13680910> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x13680910> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x13680910> > rowMedians(tmp) [1] -1.275960428 0.505237605 -0.278447544 0.824498051 0.319763855 [6] 0.714073776 0.205610594 -0.034196867 -0.399080264 -0.103129922 [11] 0.399180882 0.042883088 -0.175924915 0.326564387 -0.054603220 [16] 0.391342697 -0.253153283 -0.466083933 -0.088195530 0.242660972 [21] 0.197265334 0.644421423 0.264774119 -0.028456754 0.438393705 [26] -0.229780839 0.528915790 -0.067761906 0.156956427 -0.219166600 [31] -0.138415718 0.723092056 0.083557505 -0.067401330 -0.014783356 [36] -0.140238836 -0.458703183 0.143719080 0.276637812 -0.050601568 [41] 0.043306361 0.356532506 0.285204972 0.499169296 0.159081587 [46] -0.183316950 0.123946989 -0.051244755 -0.342483271 0.420972128 [51] 0.312792247 -0.301964236 0.065514513 -0.211299542 -0.215276050 [56] -0.173050428 -0.227088296 0.266418404 -0.177678783 0.308451312 [61] 0.212946242 0.368541389 0.347303362 -0.122061565 0.236786752 [66] -0.568081778 -0.534424825 0.050201533 0.427904927 0.022706860 [71] -0.008497996 0.362145828 0.219585954 -0.173927509 0.508839513 [76] -0.264389411 0.514343589 -0.137242144 -0.217745260 -0.073013416 [81] -0.084874707 -0.210438640 0.368170512 -0.129902012 0.042376688 [86] 0.020967321 0.276637594 -0.274541945 0.065591183 0.008620077 [91] 0.448745793 -0.171519505 -0.423464511 0.298829174 0.706812255 [96] 0.016352071 0.396243690 -0.145964582 -0.165965110 -0.033982002 [101] 0.135333670 0.286505145 -0.029000342 0.260066591 -0.010087393 [106] 0.145646010 -0.042132129 -0.179931917 0.559190174 -0.103962379 [111] 0.338641277 0.345503844 -0.683451652 0.217731394 0.128370095 [116] 0.309263569 0.434567042 -0.002792583 0.010764722 -0.363765096 [121] 0.833147741 0.194762256 0.244377564 -0.154491928 -0.038853885 [126] 0.492084260 0.237323789 0.075180430 0.077860122 -0.104657445 [131] 0.053305584 0.044605298 0.116257295 0.391317120 -0.233404639 [136] 0.233813143 0.269862042 0.269715844 -0.197141112 -0.502305247 [141] -0.214105327 0.051556233 -0.152982918 0.259640475 0.213761973 [146] 0.145492654 0.118510977 0.298639715 0.181052098 0.299019762 [151] -0.117179947 0.315575519 0.353022037 -0.025923322 0.179493339 [156] -0.476519053 0.611324094 0.265569202 -0.006786512 0.013346217 [161] -0.114169251 -0.236991804 0.648276674 0.104001463 -0.012406222 [166] 0.231034137 -0.086667487 -0.229167007 -0.287281979 -0.097240716 [171] 0.296141399 0.060035767 -0.149838765 -0.040248127 -0.267498661 [176] -0.262727577 -0.325876235 -0.366902109 0.343560281 -0.607021793 [181] 0.498434829 0.246763737 -0.036688945 -0.195744843 -0.263174322 [186] 0.227604103 0.192901196 0.225391365 -0.299488243 -0.036127520 [191] 0.134286180 0.819053367 -0.233377915 -0.495825711 0.043488218 [196] -0.215800628 0.116632908 0.060033205 0.411684798 0.293981157 [201] -0.021666063 -0.408408046 -0.126670938 -0.157885034 0.306302001 [206] 0.155214473 0.154557781 -0.275492380 -0.280638646 -0.032695007 [211] 0.506694846 -0.639973752 0.322694858 0.058864506 -0.532214688 [216] 0.172243299 0.136034727 0.347385861 -0.053541123 -0.344347459 [221] 0.293122400 0.556944825 -0.087926621 0.170468257 0.025606394 [226] 0.375438129 -0.103487511 0.360325664 -0.438866542 0.093363799 > > proc.time() user system elapsed 1.737 0.914 2.683
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: 0x270e3c0> > .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: 0x270e3c0> > .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: 0x270e3c0> > .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: 0x270e3c0> > 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: 0x21f0d60> > .Call("R_bm_AddColumn",P) <pointer: 0x21f0d60> > .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: 0x21f0d60> > .Call("R_bm_AddColumn",P) <pointer: 0x21f0d60> > .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: 0x21f0d60> > 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: 0x28227e0> > .Call("R_bm_AddColumn",P) <pointer: 0x28227e0> > .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: 0x28227e0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x28227e0> > .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: 0x28227e0> > > .Call("R_bm_RowMode",P) <pointer: 0x28227e0> > .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: 0x28227e0> > > .Call("R_bm_ColMode",P) <pointer: 0x28227e0> > .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: 0x28227e0> > 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: 0x3117fd0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x3117fd0> > .Call("R_bm_AddColumn",P) <pointer: 0x3117fd0> > .Call("R_bm_AddColumn",P) <pointer: 0x3117fd0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile2534fa5d5db310" "BufferedMatrixFile2534fa725b8a63" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile2534fa5d5db310" "BufferedMatrixFile2534fa725b8a63" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x2994da0> > .Call("R_bm_AddColumn",P) <pointer: 0x2994da0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x2994da0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x2994da0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x2994da0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x2994da0> > .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: 0x4a03990> > .Call("R_bm_AddColumn",P) <pointer: 0x4a03990> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x4a03990> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x4a03990> > 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: 0x4a50cc0> > .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: 0x4a50cc0> > rm(P) > > proc.time() user system elapsed 0.309 0.040 0.339
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.315 0.036 0.337