Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2025-01-09 12:11 -0500 (Thu, 09 Jan 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4744 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.2 (2024-10-31 ucrt) -- "Pile of Leaves" | 4487 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4515 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4467 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4358 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 251/2289 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.70.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino8 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.7.5 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson1 | macOS 13.6.6 Ventura / arm64 | OK | OK | WARNINGS | OK | |||||||||
taishan | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. - 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-08 23:40:20 -0000 (Wed, 08 Jan 2025) |
EndedAt: 2025-01-08 23:40:42 -0000 (Wed, 08 Jan 2025) |
EllapsedTime: 22.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.293 0.052 0.333
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] "Wed Jan 8 23:40:36 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] "Wed Jan 8 23:40:36 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: 0x33ac43c0> > > > > 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] "Wed Jan 8 23:40:36 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] "Wed Jan 8 23:40:37 2025" > > ColMode(tmp2) <pointer: 0x33ac43c0> > > > > ### 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.2884476 0.8922569 -2.1319260 -1.1179819 [2,] 0.5245423 0.3707515 -0.4189245 -0.2163692 [3,] 1.4254829 0.7707392 -0.9401766 -0.4316666 [4,] -0.8901840 1.4648013 0.4768243 0.2383889 > 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.2884476 0.8922569 2.1319260 1.1179819 [2,] 0.5245423 0.3707515 0.4189245 0.2163692 [3,] 1.4254829 0.7707392 0.9401766 0.4316666 [4,] 0.8901840 1.4648013 0.4768243 0.2383889 > 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.9643589 0.9445935 1.4601116 1.0573466 [2,] 0.7242529 0.6088936 0.6472438 0.4651551 [3,] 1.1939359 0.8779175 0.9696270 0.6570134 [4,] 0.9434956 1.2102897 0.6905246 0.4882509 > > 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.93204 35.33819 41.73304 36.69145 [2,] 32.76707 31.45969 31.89136 29.86792 [3,] 38.36484 34.54991 35.63645 32.00180 [4,] 35.32514 38.56770 32.38207 30.12090 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x354abad0> > exp(tmp5) <pointer: 0x354abad0> > log(tmp5,2) <pointer: 0x354abad0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.0852 > Min(tmp5) [1] 54.62572 > mean(tmp5) [1] 72.9979 > Sum(tmp5) [1] 14599.58 > Var(tmp5) [1] 852.2053 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.25741 70.78394 71.03571 70.39577 69.28230 72.61657 73.91357 69.39421 [9] 70.59622 70.70329 > rowSums(tmp5) [1] 1825.148 1415.679 1420.714 1407.915 1385.646 1452.331 1478.271 1387.884 [9] 1411.924 1414.066 > rowVars(tmp5) [1] 7884.66869 54.02998 105.93976 79.63941 79.58605 64.14657 [7] 64.74693 81.60011 29.89054 73.33201 > rowSd(tmp5) [1] 88.795657 7.350509 10.292704 8.924091 8.921101 8.009155 8.046548 [8] 9.033278 5.467224 8.563411 > rowMax(tmp5) [1] 466.08519 87.06315 93.74059 85.72621 82.16165 90.53347 85.46080 [8] 88.68906 83.28497 85.67048 > rowMin(tmp5) [1] 55.55091 58.82840 55.60123 55.67154 54.62572 59.36587 55.51819 56.57228 [9] 59.23244 54.73636 > > colMeans(tmp5) [1] 114.15366 72.08178 67.83244 69.63027 71.13438 73.29284 72.50655 [8] 71.88841 70.48355 72.40431 67.13431 70.10661 72.90615 70.34935 [15] 72.63179 68.88174 73.01215 70.01439 71.57392 67.93936 > colSums(tmp5) [1] 1141.5366 720.8178 678.3244 696.3027 711.3438 732.9284 725.0655 [8] 718.8841 704.8355 724.0431 671.3431 701.0661 729.0615 703.4935 [15] 726.3179 688.8174 730.1215 700.1439 715.7392 679.3936 > colVars(tmp5) [1] 15339.12536 40.13163 70.71576 66.18931 58.62425 94.17275 [7] 116.90390 52.77707 29.11512 48.31284 81.93269 100.22027 [13] 107.61215 93.25646 113.66282 66.34025 74.69496 125.39012 [19] 47.85297 63.14850 > colSd(tmp5) [1] 123.851223 6.334953 8.409266 8.135681 7.656648 9.704264 [7] 10.812211 7.264783 5.395843 6.950744 9.051668 10.011008 [13] 10.373628 9.656938 10.661277 8.144953 8.642625 11.197773 [19] 6.917584 7.946603 > colMax(tmp5) [1] 466.08519 80.27361 86.86186 80.50229 84.57124 87.06315 88.68906 [8] 81.73952 81.34039 80.84417 85.67048 84.66105 93.74059 85.37683 [15] 90.53347 77.94198 85.46080 84.14618 81.75860 84.45526 > colMin(tmp5) [1] 63.18705 60.54836 57.54198 55.67751 58.27073 61.75068 55.60123 59.19427 [9] 65.54039 61.02884 54.62572 57.18408 55.51819 55.67154 54.73636 55.91714 [17] 57.52271 55.55091 57.89662 58.82840 > > > ### 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.25741 70.78394 71.03571 70.39577 69.28230 72.61657 NA 69.39421 [9] 70.59622 70.70329 > rowSums(tmp5) [1] 1825.148 1415.679 1420.714 1407.915 1385.646 1452.331 NA 1387.884 [9] 1411.924 1414.066 > rowVars(tmp5) [1] 7884.66869 54.02998 105.93976 79.63941 79.58605 64.14657 [7] 68.04848 81.60011 29.89054 73.33201 > rowSd(tmp5) [1] 88.795657 7.350509 10.292704 8.924091 8.921101 8.009155 8.249150 [8] 9.033278 5.467224 8.563411 > rowMax(tmp5) [1] 466.08519 87.06315 93.74059 85.72621 82.16165 90.53347 NA [8] 88.68906 83.28497 85.67048 > rowMin(tmp5) [1] 55.55091 58.82840 55.60123 55.67154 54.62572 59.36587 NA 56.57228 [9] 59.23244 54.73636 > > colMeans(tmp5) [1] 114.15366 72.08178 67.83244 69.63027 71.13438 73.29284 72.50655 [8] 71.88841 70.48355 72.40431 67.13431 70.10661 72.90615 70.34935 [15] 72.63179 68.88174 73.01215 NA 71.57392 67.93936 > colSums(tmp5) [1] 1141.5366 720.8178 678.3244 696.3027 711.3438 732.9284 725.0655 [8] 718.8841 704.8355 724.0431 671.3431 701.0661 729.0615 703.4935 [15] 726.3179 688.8174 730.1215 NA 715.7392 679.3936 > colVars(tmp5) [1] 15339.12536 40.13163 70.71576 66.18931 58.62425 94.17275 [7] 116.90390 52.77707 29.11512 48.31284 81.93269 100.22027 [13] 107.61215 93.25646 113.66282 66.34025 74.69496 NA [19] 47.85297 63.14850 > colSd(tmp5) [1] 123.851223 6.334953 8.409266 8.135681 7.656648 9.704264 [7] 10.812211 7.264783 5.395843 6.950744 9.051668 10.011008 [13] 10.373628 9.656938 10.661277 8.144953 8.642625 NA [19] 6.917584 7.946603 > colMax(tmp5) [1] 466.08519 80.27361 86.86186 80.50229 84.57124 87.06315 88.68906 [8] 81.73952 81.34039 80.84417 85.67048 84.66105 93.74059 85.37683 [15] 90.53347 77.94198 85.46080 NA 81.75860 84.45526 > colMin(tmp5) [1] 63.18705 60.54836 57.54198 55.67751 58.27073 61.75068 55.60123 59.19427 [9] 65.54039 61.02884 54.62572 57.18408 55.51819 55.67154 54.73636 55.91714 [17] 57.52271 NA 57.89662 58.82840 > > Max(tmp5,na.rm=TRUE) [1] 466.0852 > Min(tmp5,na.rm=TRUE) [1] 54.62572 > mean(tmp5,na.rm=TRUE) [1] 73.00459 > Sum(tmp5,na.rm=TRUE) [1] 14527.91 > Var(tmp5,na.rm=TRUE) [1] 856.5004 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.25741 70.78394 71.03571 70.39577 69.28230 72.61657 74.03188 69.39421 [9] 70.59622 70.70329 > rowSums(tmp5,na.rm=TRUE) [1] 1825.148 1415.679 1420.714 1407.915 1385.646 1452.331 1406.606 1387.884 [9] 1411.924 1414.066 > rowVars(tmp5,na.rm=TRUE) [1] 7884.66869 54.02998 105.93976 79.63941 79.58605 64.14657 [7] 68.04848 81.60011 29.89054 73.33201 > rowSd(tmp5,na.rm=TRUE) [1] 88.795657 7.350509 10.292704 8.924091 8.921101 8.009155 8.249150 [8] 9.033278 5.467224 8.563411 > rowMax(tmp5,na.rm=TRUE) [1] 466.08519 87.06315 93.74059 85.72621 82.16165 90.53347 85.46080 [8] 88.68906 83.28497 85.67048 > rowMin(tmp5,na.rm=TRUE) [1] 55.55091 58.82840 55.60123 55.67154 54.62572 59.36587 55.51819 56.57228 [9] 59.23244 54.73636 > > colMeans(tmp5,na.rm=TRUE) [1] 114.15366 72.08178 67.83244 69.63027 71.13438 73.29284 72.50655 [8] 71.88841 70.48355 72.40431 67.13431 70.10661 72.90615 70.34935 [15] 72.63179 68.88174 73.01215 69.83091 71.57392 67.93936 > colSums(tmp5,na.rm=TRUE) [1] 1141.5366 720.8178 678.3244 696.3027 711.3438 732.9284 725.0655 [8] 718.8841 704.8355 724.0431 671.3431 701.0661 729.0615 703.4935 [15] 726.3179 688.8174 730.1215 628.4782 715.7392 679.3936 > colVars(tmp5,na.rm=TRUE) [1] 15339.12536 40.13163 70.71576 66.18931 58.62425 94.17275 [7] 116.90390 52.77707 29.11512 48.31284 81.93269 100.22027 [13] 107.61215 93.25646 113.66282 66.34025 74.69496 140.68517 [19] 47.85297 63.14850 > colSd(tmp5,na.rm=TRUE) [1] 123.851223 6.334953 8.409266 8.135681 7.656648 9.704264 [7] 10.812211 7.264783 5.395843 6.950744 9.051668 10.011008 [13] 10.373628 9.656938 10.661277 8.144953 8.642625 11.861078 [19] 6.917584 7.946603 > colMax(tmp5,na.rm=TRUE) [1] 466.08519 80.27361 86.86186 80.50229 84.57124 87.06315 88.68906 [8] 81.73952 81.34039 80.84417 85.67048 84.66105 93.74059 85.37683 [15] 90.53347 77.94198 85.46080 84.14618 81.75860 84.45526 > colMin(tmp5,na.rm=TRUE) [1] 63.18705 60.54836 57.54198 55.67751 58.27073 61.75068 55.60123 59.19427 [9] 65.54039 61.02884 54.62572 57.18408 55.51819 55.67154 54.73636 55.91714 [17] 57.52271 55.55091 57.89662 58.82840 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.25741 70.78394 71.03571 70.39577 69.28230 72.61657 NaN 69.39421 [9] 70.59622 70.70329 > rowSums(tmp5,na.rm=TRUE) [1] 1825.148 1415.679 1420.714 1407.915 1385.646 1452.331 0.000 1387.884 [9] 1411.924 1414.066 > rowVars(tmp5,na.rm=TRUE) [1] 7884.66869 54.02998 105.93976 79.63941 79.58605 64.14657 [7] NA 81.60011 29.89054 73.33201 > rowSd(tmp5,na.rm=TRUE) [1] 88.795657 7.350509 10.292704 8.924091 8.921101 8.009155 NA [8] 9.033278 5.467224 8.563411 > rowMax(tmp5,na.rm=TRUE) [1] 466.08519 87.06315 93.74059 85.72621 82.16165 90.53347 NA [8] 88.68906 83.28497 85.67048 > rowMin(tmp5,na.rm=TRUE) [1] 55.55091 58.82840 55.60123 55.67154 54.62572 59.36587 NA 56.57228 [9] 59.23244 54.73636 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 119.26614 71.30892 68.37761 68.75722 70.69570 72.88615 71.89871 [8] 72.63768 69.27723 73.23862 67.07346 68.48945 74.83814 69.93414 [15] 72.97516 67.87505 71.62897 NaN 70.82962 66.10426 > colSums(tmp5,na.rm=TRUE) [1] 1073.3953 641.7803 615.3985 618.8150 636.2613 655.9753 647.0884 [8] 653.7391 623.4951 659.1476 603.6612 616.4050 673.5433 629.4072 [15] 656.7764 610.8755 644.6607 0.0000 637.4666 594.9383 > colVars(tmp5,na.rm=TRUE) [1] 16962.47010 38.42823 76.21157 65.88814 63.78730 104.08357 [7] 127.36036 53.05844 16.38351 46.52104 92.13263 83.32674 [13] 79.07185 102.97397 126.54424 63.23170 62.50839 NA [19] 47.60224 33.15665 > colSd(tmp5,na.rm=TRUE) [1] 130.240048 6.199051 8.729924 8.117151 7.986695 10.202135 [7] 11.285405 7.284122 4.047655 6.820633 9.598574 9.128348 [13] 8.892236 10.147609 11.249188 7.951836 7.906225 NA [19] 6.899437 5.758181 > colMax(tmp5,na.rm=TRUE) [1] 466.08519 80.27361 86.86186 80.50229 84.57124 87.06315 88.68906 [8] 81.73952 78.61613 80.84417 85.67048 80.17293 93.74059 85.37683 [15] 90.53347 77.13161 80.99348 -Inf 81.75860 77.32272 > colMin(tmp5,na.rm=TRUE) [1] 63.18705 60.54836 57.54198 55.67751 58.27073 61.75068 55.60123 59.19427 [9] 65.54039 61.02884 54.62572 57.18408 60.07217 55.67154 54.73636 55.91714 [17] 57.52271 Inf 57.89662 58.82840 > > > > > 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] 191.2175 177.8611 339.6359 138.3562 202.7896 285.3647 196.9780 233.2046 [9] 160.4149 221.9953 > apply(copymatrix,1,var,na.rm=TRUE) [1] 191.2175 177.8611 339.6359 138.3562 202.7896 285.3647 196.9780 233.2046 [9] 160.4149 221.9953 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 8.526513e-14 -5.684342e-14 -1.136868e-13 -4.263256e-14 1.136868e-13 [6] -2.842171e-14 -5.684342e-14 -1.136868e-13 0.000000e+00 -8.526513e-14 [11] -5.684342e-14 -2.842171e-14 5.684342e-14 -1.421085e-14 1.989520e-13 [16] -1.136868e-13 -2.842171e-13 1.136868e-13 -5.684342e-14 -1.136868e-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) + } 4 4 3 10 2 1 6 2 1 5 5 20 4 8 2 4 5 2 5 18 1 18 7 11 5 16 1 17 8 1 6 2 6 3 1 6 9 6 6 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.953606 > Min(tmp) [1] -1.927963 > mean(tmp) [1] 0.1909894 > Sum(tmp) [1] 19.09894 > Var(tmp) [1] 0.7059465 > > rowMeans(tmp) [1] 0.1909894 > rowSums(tmp) [1] 19.09894 > rowVars(tmp) [1] 0.7059465 > rowSd(tmp) [1] 0.8402062 > rowMax(tmp) [1] 2.953606 > rowMin(tmp) [1] -1.927963 > > colMeans(tmp) [1] -0.263073535 -1.167740911 -0.290531574 -0.266747958 -0.402038109 [6] 0.310984944 -0.259220840 -0.382931784 -0.370894200 0.719138556 [11] 1.314645955 0.796976956 0.989852457 -1.216130773 0.349063757 [16] -1.103933263 -0.083704770 -0.357559364 -0.801768427 1.512174573 [21] 0.619178649 0.379138556 0.733826149 -1.927962774 -0.356942436 [26] -0.031984768 0.944884428 0.469242475 -0.287474246 0.387631137 [31] 0.206706032 1.968929907 1.227406033 -0.086420997 0.906000461 [36] 0.001829710 -0.921140367 0.538541001 -0.646577795 0.531975625 [41] 0.423517742 -0.231657811 0.274130220 1.237972093 -0.239984364 [46] 1.705434426 0.149334607 0.487711123 0.031405717 0.760639067 [51] 0.790176061 1.544085218 0.870608231 -1.273367522 0.130913449 [56] 0.677260058 0.342483272 -0.685126729 0.667521961 0.330392347 [61] 0.046827204 0.730226391 -1.185933061 0.726723265 0.061333976 [66] -0.236575602 0.493026965 -0.510298680 0.548777716 -1.274023864 [71] 0.680354604 -0.382740459 0.105077387 0.692112582 2.953606356 [76] 0.380978935 0.326388211 -1.043916717 1.106046871 0.361848715 [81] 0.037970338 1.732078931 -0.468213912 0.113701720 -0.656096668 [86] -1.646599318 0.755454553 1.123018499 1.097821046 1.400584152 [91] -0.178534864 -0.501331568 -0.003468204 -1.272963133 -0.087972917 [96] 0.641421608 0.519619428 -0.301128202 -0.938400916 1.475342087 > colSums(tmp) [1] -0.263073535 -1.167740911 -0.290531574 -0.266747958 -0.402038109 [6] 0.310984944 -0.259220840 -0.382931784 -0.370894200 0.719138556 [11] 1.314645955 0.796976956 0.989852457 -1.216130773 0.349063757 [16] -1.103933263 -0.083704770 -0.357559364 -0.801768427 1.512174573 [21] 0.619178649 0.379138556 0.733826149 -1.927962774 -0.356942436 [26] -0.031984768 0.944884428 0.469242475 -0.287474246 0.387631137 [31] 0.206706032 1.968929907 1.227406033 -0.086420997 0.906000461 [36] 0.001829710 -0.921140367 0.538541001 -0.646577795 0.531975625 [41] 0.423517742 -0.231657811 0.274130220 1.237972093 -0.239984364 [46] 1.705434426 0.149334607 0.487711123 0.031405717 0.760639067 [51] 0.790176061 1.544085218 0.870608231 -1.273367522 0.130913449 [56] 0.677260058 0.342483272 -0.685126729 0.667521961 0.330392347 [61] 0.046827204 0.730226391 -1.185933061 0.726723265 0.061333976 [66] -0.236575602 0.493026965 -0.510298680 0.548777716 -1.274023864 [71] 0.680354604 -0.382740459 0.105077387 0.692112582 2.953606356 [76] 0.380978935 0.326388211 -1.043916717 1.106046871 0.361848715 [81] 0.037970338 1.732078931 -0.468213912 0.113701720 -0.656096668 [86] -1.646599318 0.755454553 1.123018499 1.097821046 1.400584152 [91] -0.178534864 -0.501331568 -0.003468204 -1.272963133 -0.087972917 [96] 0.641421608 0.519619428 -0.301128202 -0.938400916 1.475342087 > 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.263073535 -1.167740911 -0.290531574 -0.266747958 -0.402038109 [6] 0.310984944 -0.259220840 -0.382931784 -0.370894200 0.719138556 [11] 1.314645955 0.796976956 0.989852457 -1.216130773 0.349063757 [16] -1.103933263 -0.083704770 -0.357559364 -0.801768427 1.512174573 [21] 0.619178649 0.379138556 0.733826149 -1.927962774 -0.356942436 [26] -0.031984768 0.944884428 0.469242475 -0.287474246 0.387631137 [31] 0.206706032 1.968929907 1.227406033 -0.086420997 0.906000461 [36] 0.001829710 -0.921140367 0.538541001 -0.646577795 0.531975625 [41] 0.423517742 -0.231657811 0.274130220 1.237972093 -0.239984364 [46] 1.705434426 0.149334607 0.487711123 0.031405717 0.760639067 [51] 0.790176061 1.544085218 0.870608231 -1.273367522 0.130913449 [56] 0.677260058 0.342483272 -0.685126729 0.667521961 0.330392347 [61] 0.046827204 0.730226391 -1.185933061 0.726723265 0.061333976 [66] -0.236575602 0.493026965 -0.510298680 0.548777716 -1.274023864 [71] 0.680354604 -0.382740459 0.105077387 0.692112582 2.953606356 [76] 0.380978935 0.326388211 -1.043916717 1.106046871 0.361848715 [81] 0.037970338 1.732078931 -0.468213912 0.113701720 -0.656096668 [86] -1.646599318 0.755454553 1.123018499 1.097821046 1.400584152 [91] -0.178534864 -0.501331568 -0.003468204 -1.272963133 -0.087972917 [96] 0.641421608 0.519619428 -0.301128202 -0.938400916 1.475342087 > colMin(tmp) [1] -0.263073535 -1.167740911 -0.290531574 -0.266747958 -0.402038109 [6] 0.310984944 -0.259220840 -0.382931784 -0.370894200 0.719138556 [11] 1.314645955 0.796976956 0.989852457 -1.216130773 0.349063757 [16] -1.103933263 -0.083704770 -0.357559364 -0.801768427 1.512174573 [21] 0.619178649 0.379138556 0.733826149 -1.927962774 -0.356942436 [26] -0.031984768 0.944884428 0.469242475 -0.287474246 0.387631137 [31] 0.206706032 1.968929907 1.227406033 -0.086420997 0.906000461 [36] 0.001829710 -0.921140367 0.538541001 -0.646577795 0.531975625 [41] 0.423517742 -0.231657811 0.274130220 1.237972093 -0.239984364 [46] 1.705434426 0.149334607 0.487711123 0.031405717 0.760639067 [51] 0.790176061 1.544085218 0.870608231 -1.273367522 0.130913449 [56] 0.677260058 0.342483272 -0.685126729 0.667521961 0.330392347 [61] 0.046827204 0.730226391 -1.185933061 0.726723265 0.061333976 [66] -0.236575602 0.493026965 -0.510298680 0.548777716 -1.274023864 [71] 0.680354604 -0.382740459 0.105077387 0.692112582 2.953606356 [76] 0.380978935 0.326388211 -1.043916717 1.106046871 0.361848715 [81] 0.037970338 1.732078931 -0.468213912 0.113701720 -0.656096668 [86] -1.646599318 0.755454553 1.123018499 1.097821046 1.400584152 [91] -0.178534864 -0.501331568 -0.003468204 -1.272963133 -0.087972917 [96] 0.641421608 0.519619428 -0.301128202 -0.938400916 1.475342087 > colMedians(tmp) [1] -0.263073535 -1.167740911 -0.290531574 -0.266747958 -0.402038109 [6] 0.310984944 -0.259220840 -0.382931784 -0.370894200 0.719138556 [11] 1.314645955 0.796976956 0.989852457 -1.216130773 0.349063757 [16] -1.103933263 -0.083704770 -0.357559364 -0.801768427 1.512174573 [21] 0.619178649 0.379138556 0.733826149 -1.927962774 -0.356942436 [26] -0.031984768 0.944884428 0.469242475 -0.287474246 0.387631137 [31] 0.206706032 1.968929907 1.227406033 -0.086420997 0.906000461 [36] 0.001829710 -0.921140367 0.538541001 -0.646577795 0.531975625 [41] 0.423517742 -0.231657811 0.274130220 1.237972093 -0.239984364 [46] 1.705434426 0.149334607 0.487711123 0.031405717 0.760639067 [51] 0.790176061 1.544085218 0.870608231 -1.273367522 0.130913449 [56] 0.677260058 0.342483272 -0.685126729 0.667521961 0.330392347 [61] 0.046827204 0.730226391 -1.185933061 0.726723265 0.061333976 [66] -0.236575602 0.493026965 -0.510298680 0.548777716 -1.274023864 [71] 0.680354604 -0.382740459 0.105077387 0.692112582 2.953606356 [76] 0.380978935 0.326388211 -1.043916717 1.106046871 0.361848715 [81] 0.037970338 1.732078931 -0.468213912 0.113701720 -0.656096668 [86] -1.646599318 0.755454553 1.123018499 1.097821046 1.400584152 [91] -0.178534864 -0.501331568 -0.003468204 -1.272963133 -0.087972917 [96] 0.641421608 0.519619428 -0.301128202 -0.938400916 1.475342087 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.2630735 -1.167741 -0.2905316 -0.266748 -0.4020381 0.3109849 -0.2592208 [2,] -0.2630735 -1.167741 -0.2905316 -0.266748 -0.4020381 0.3109849 -0.2592208 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.3829318 -0.3708942 0.7191386 1.314646 0.796977 0.9898525 -1.216131 [2,] -0.3829318 -0.3708942 0.7191386 1.314646 0.796977 0.9898525 -1.216131 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.3490638 -1.103933 -0.08370477 -0.3575594 -0.8017684 1.512175 0.6191786 [2,] 0.3490638 -1.103933 -0.08370477 -0.3575594 -0.8017684 1.512175 0.6191786 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.3791386 0.7338261 -1.927963 -0.3569424 -0.03198477 0.9448844 0.4692425 [2,] 0.3791386 0.7338261 -1.927963 -0.3569424 -0.03198477 0.9448844 0.4692425 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.2874742 0.3876311 0.206706 1.96893 1.227406 -0.086421 0.9060005 [2,] -0.2874742 0.3876311 0.206706 1.96893 1.227406 -0.086421 0.9060005 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.00182971 -0.9211404 0.538541 -0.6465778 0.5319756 0.4235177 -0.2316578 [2,] 0.00182971 -0.9211404 0.538541 -0.6465778 0.5319756 0.4235177 -0.2316578 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.2741302 1.237972 -0.2399844 1.705434 0.1493346 0.4877111 0.03140572 [2,] 0.2741302 1.237972 -0.2399844 1.705434 0.1493346 0.4877111 0.03140572 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.7606391 0.7901761 1.544085 0.8706082 -1.273368 0.1309134 0.6772601 [2,] 0.7606391 0.7901761 1.544085 0.8706082 -1.273368 0.1309134 0.6772601 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.3424833 -0.6851267 0.667522 0.3303923 0.0468272 0.7302264 -1.185933 [2,] 0.3424833 -0.6851267 0.667522 0.3303923 0.0468272 0.7302264 -1.185933 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.7267233 0.06133398 -0.2365756 0.493027 -0.5102987 0.5487777 -1.274024 [2,] 0.7267233 0.06133398 -0.2365756 0.493027 -0.5102987 0.5487777 -1.274024 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.6803546 -0.3827405 0.1050774 0.6921126 2.953606 0.3809789 0.3263882 [2,] 0.6803546 -0.3827405 0.1050774 0.6921126 2.953606 0.3809789 0.3263882 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -1.043917 1.106047 0.3618487 0.03797034 1.732079 -0.4682139 0.1137017 [2,] -1.043917 1.106047 0.3618487 0.03797034 1.732079 -0.4682139 0.1137017 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.6560967 -1.646599 0.7554546 1.123018 1.097821 1.400584 -0.1785349 [2,] -0.6560967 -1.646599 0.7554546 1.123018 1.097821 1.400584 -0.1785349 [,92] [,93] [,94] [,95] [,96] [,97] [1,] -0.5013316 -0.003468204 -1.272963 -0.08797292 0.6414216 0.5196194 [2,] -0.5013316 -0.003468204 -1.272963 -0.08797292 0.6414216 0.5196194 [,98] [,99] [,100] [1,] -0.3011282 -0.9384009 1.475342 [2,] -0.3011282 -0.9384009 1.475342 > > > Max(tmp2) [1] 2.286236 > Min(tmp2) [1] -3.095518 > mean(tmp2) [1] -0.2272912 > Sum(tmp2) [1] -22.72912 > Var(tmp2) [1] 1.019967 > > rowMeans(tmp2) [1] -0.988741428 -1.665200671 -0.812316212 0.444320126 0.282790422 [6] -0.735019290 -0.106510213 -0.374226599 -0.284186402 -0.219343777 [11] -0.946141160 -1.112618303 0.195945844 -1.506708805 -1.111698103 [16] 1.361311187 0.132735566 0.062460208 -0.137128636 -1.320901283 [21] -1.413070806 0.386111839 -2.415899407 -0.565893138 -0.404644662 [26] 0.335135874 -0.907726123 -1.137903412 -0.584175898 -0.243503819 [31] 0.646619957 -3.095517685 -0.514358273 -0.422689724 1.364192412 [36] 1.504862883 -0.005443792 -1.801615055 0.765525004 1.090131985 [41] 0.493577068 -2.341610632 -0.772132012 -0.884775270 1.109220698 [46] 0.978020542 -1.497593996 0.904197294 -1.692046529 -0.301930734 [51] 0.664899657 2.286236370 -1.696025649 -0.952719240 -0.272294520 [56] -0.421943964 0.707967163 -0.702734374 0.516901218 -0.552463546 [61] -0.271895683 1.301367604 -0.902989124 -0.705649438 0.954419815 [66] -0.185261772 0.962376012 -0.533853646 1.042633118 -0.582880784 [71] 0.406138296 -0.683570283 1.184815811 1.257243793 -0.501817566 [76] -0.005367063 -0.567201825 -1.558450367 0.686625973 -0.769914777 [81] -0.554414662 0.791181462 0.400291676 1.288947233 -1.602185174 [86] -0.364994078 0.788820281 -0.018299272 -0.262674279 -1.651746957 [91] -0.100375706 -1.800789312 -0.854981347 -1.326793908 -0.768418934 [96] 1.159897322 0.704615332 1.624258536 -0.093510363 0.073571551 > rowSums(tmp2) [1] -0.988741428 -1.665200671 -0.812316212 0.444320126 0.282790422 [6] -0.735019290 -0.106510213 -0.374226599 -0.284186402 -0.219343777 [11] -0.946141160 -1.112618303 0.195945844 -1.506708805 -1.111698103 [16] 1.361311187 0.132735566 0.062460208 -0.137128636 -1.320901283 [21] -1.413070806 0.386111839 -2.415899407 -0.565893138 -0.404644662 [26] 0.335135874 -0.907726123 -1.137903412 -0.584175898 -0.243503819 [31] 0.646619957 -3.095517685 -0.514358273 -0.422689724 1.364192412 [36] 1.504862883 -0.005443792 -1.801615055 0.765525004 1.090131985 [41] 0.493577068 -2.341610632 -0.772132012 -0.884775270 1.109220698 [46] 0.978020542 -1.497593996 0.904197294 -1.692046529 -0.301930734 [51] 0.664899657 2.286236370 -1.696025649 -0.952719240 -0.272294520 [56] -0.421943964 0.707967163 -0.702734374 0.516901218 -0.552463546 [61] -0.271895683 1.301367604 -0.902989124 -0.705649438 0.954419815 [66] -0.185261772 0.962376012 -0.533853646 1.042633118 -0.582880784 [71] 0.406138296 -0.683570283 1.184815811 1.257243793 -0.501817566 [76] -0.005367063 -0.567201825 -1.558450367 0.686625973 -0.769914777 [81] -0.554414662 0.791181462 0.400291676 1.288947233 -1.602185174 [86] -0.364994078 0.788820281 -0.018299272 -0.262674279 -1.651746957 [91] -0.100375706 -1.800789312 -0.854981347 -1.326793908 -0.768418934 [96] 1.159897322 0.704615332 1.624258536 -0.093510363 0.073571551 > 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.988741428 -1.665200671 -0.812316212 0.444320126 0.282790422 [6] -0.735019290 -0.106510213 -0.374226599 -0.284186402 -0.219343777 [11] -0.946141160 -1.112618303 0.195945844 -1.506708805 -1.111698103 [16] 1.361311187 0.132735566 0.062460208 -0.137128636 -1.320901283 [21] -1.413070806 0.386111839 -2.415899407 -0.565893138 -0.404644662 [26] 0.335135874 -0.907726123 -1.137903412 -0.584175898 -0.243503819 [31] 0.646619957 -3.095517685 -0.514358273 -0.422689724 1.364192412 [36] 1.504862883 -0.005443792 -1.801615055 0.765525004 1.090131985 [41] 0.493577068 -2.341610632 -0.772132012 -0.884775270 1.109220698 [46] 0.978020542 -1.497593996 0.904197294 -1.692046529 -0.301930734 [51] 0.664899657 2.286236370 -1.696025649 -0.952719240 -0.272294520 [56] -0.421943964 0.707967163 -0.702734374 0.516901218 -0.552463546 [61] -0.271895683 1.301367604 -0.902989124 -0.705649438 0.954419815 [66] -0.185261772 0.962376012 -0.533853646 1.042633118 -0.582880784 [71] 0.406138296 -0.683570283 1.184815811 1.257243793 -0.501817566 [76] -0.005367063 -0.567201825 -1.558450367 0.686625973 -0.769914777 [81] -0.554414662 0.791181462 0.400291676 1.288947233 -1.602185174 [86] -0.364994078 0.788820281 -0.018299272 -0.262674279 -1.651746957 [91] -0.100375706 -1.800789312 -0.854981347 -1.326793908 -0.768418934 [96] 1.159897322 0.704615332 1.624258536 -0.093510363 0.073571551 > rowMin(tmp2) [1] -0.988741428 -1.665200671 -0.812316212 0.444320126 0.282790422 [6] -0.735019290 -0.106510213 -0.374226599 -0.284186402 -0.219343777 [11] -0.946141160 -1.112618303 0.195945844 -1.506708805 -1.111698103 [16] 1.361311187 0.132735566 0.062460208 -0.137128636 -1.320901283 [21] -1.413070806 0.386111839 -2.415899407 -0.565893138 -0.404644662 [26] 0.335135874 -0.907726123 -1.137903412 -0.584175898 -0.243503819 [31] 0.646619957 -3.095517685 -0.514358273 -0.422689724 1.364192412 [36] 1.504862883 -0.005443792 -1.801615055 0.765525004 1.090131985 [41] 0.493577068 -2.341610632 -0.772132012 -0.884775270 1.109220698 [46] 0.978020542 -1.497593996 0.904197294 -1.692046529 -0.301930734 [51] 0.664899657 2.286236370 -1.696025649 -0.952719240 -0.272294520 [56] -0.421943964 0.707967163 -0.702734374 0.516901218 -0.552463546 [61] -0.271895683 1.301367604 -0.902989124 -0.705649438 0.954419815 [66] -0.185261772 0.962376012 -0.533853646 1.042633118 -0.582880784 [71] 0.406138296 -0.683570283 1.184815811 1.257243793 -0.501817566 [76] -0.005367063 -0.567201825 -1.558450367 0.686625973 -0.769914777 [81] -0.554414662 0.791181462 0.400291676 1.288947233 -1.602185174 [86] -0.364994078 0.788820281 -0.018299272 -0.262674279 -1.651746957 [91] -0.100375706 -1.800789312 -0.854981347 -1.326793908 -0.768418934 [96] 1.159897322 0.704615332 1.624258536 -0.093510363 0.073571551 > > colMeans(tmp2) [1] -0.2272912 > colSums(tmp2) [1] -22.72912 > colVars(tmp2) [1] 1.019967 > colSd(tmp2) [1] 1.009934 > colMax(tmp2) [1] 2.286236 > colMin(tmp2) [1] -3.095518 > colMedians(tmp2) [1] -0.2782405 > colRanges(tmp2) [,1] [1,] -3.095518 [2,] 2.286236 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 1.0914480 2.6159785 -2.3216296 -2.1716128 0.4558714 2.6121538 [7] -0.6416361 7.3098894 -0.2097927 2.2934943 > colApply(tmp,quantile)[,1] [,1] [1,] -1.0694462 [2,] -0.6423565 [3,] 0.1327313 [4,] 0.3782288 [5,] 1.6152454 > > rowApply(tmp,sum) [1] 0.67768690 -0.47480027 1.70354763 3.94004859 -2.19034966 0.07321549 [7] 9.39400562 3.13797170 -3.62544801 -1.60171376 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 7 10 5 7 7 2 3 10 4 4 [2,] 4 3 10 8 6 3 6 7 6 9 [3,] 8 5 2 1 9 1 9 8 3 1 [4,] 1 1 6 2 10 7 4 1 2 7 [5,] 6 2 8 10 4 4 1 9 8 2 [6,] 9 6 7 4 5 9 2 5 7 6 [7,] 5 8 3 3 3 6 10 2 1 3 [8,] 2 7 9 9 8 10 8 3 9 10 [9,] 3 9 1 5 2 8 7 4 5 5 [10,] 10 4 4 6 1 5 5 6 10 8 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.3968205 2.3303738 -1.5573549 1.8080783 -2.0696668 -0.2589019 [7] 1.4555705 0.5774203 -2.2281213 -3.4380021 2.3108581 2.2411339 [13] 2.7187659 -4.1445574 2.1231183 -3.9742512 -2.7920673 0.2314863 [19] -0.8392316 0.1591932 > colApply(tmp,quantile)[,1] [,1] [1,] -0.9064242 [2,] -0.8320739 [3,] 0.2769845 [4,] 1.3171935 [5,] 1.5411406 > > rowApply(tmp,sum) [1] 3.261873 -5.433981 1.143875 2.605301 -5.526403 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 3 12 19 3 18 [2,] 16 19 16 4 12 [3,] 10 9 8 15 6 [4,] 6 10 20 16 7 [5,] 15 7 13 2 10 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.8320739 0.9258282 -0.1343463 -0.6604871 0.7348584 0.5795287 [2,] 0.2769845 1.2115737 -0.3096617 -0.1987748 -0.9563914 -2.3589000 [3,] 1.5411406 0.7882967 -0.6169788 3.0878014 0.1130396 -0.3337032 [4,] -0.9064242 -0.8479218 0.7168877 0.7377026 -1.4444432 1.4054889 [5,] 1.3171935 0.2525969 -1.2132557 -1.1581638 -0.5167302 0.4486837 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.3148263 2.8881235 0.3373987 -1.3998540 -0.7279209 1.4198750 [2,] -2.0796882 0.9511759 -1.4567022 -0.3382759 0.4406955 1.3224785 [3,] -0.7054635 -1.0450527 0.3997911 -0.1892745 1.2922975 -0.3322470 [4,] 1.5948475 0.2387654 -0.1331982 -0.5295511 0.5430063 -0.2764078 [5,] 1.3310484 -2.4555919 -1.3754106 -0.9810466 0.7627797 0.1074352 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.6355712 -0.6751762 -0.22579253 -0.1846701 -1.7873478 1.4103620 [2,] 0.5507326 0.4052627 0.11960426 -1.7490000 -1.8507875 0.9855819 [3,] -0.8225444 -1.1657143 0.06374171 -0.7870501 1.4554458 -0.7383911 [4,] 0.5719888 0.6139561 1.58993821 -0.2953727 0.9161525 -0.1305478 [5,] 3.0541602 -3.3228857 0.57562665 -0.9581584 -1.5255302 -1.2955187 [,19] [,20] [1,] 0.4388941 0.47541800 [2,] 1.0094457 -1.40933484 [3,] -1.1352934 0.27403342 [4,] -1.7175226 -0.04204372 [5,] 0.5652446 0.86112031 > > > 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 : 566 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 0.6983482 0.5217003 0.4730876 -0.5239498 -1.70653 -1.25344 0.2340841 col8 col9 col10 col11 col12 col13 col14 row1 1.098058 0.8428923 -0.8900854 0.6892093 -0.6680448 -0.7552029 1.795321 col15 col16 col17 col18 col19 col20 row1 0.1621512 -1.820155 1.225715 -0.2710288 1.302506 -0.7111409 > tmp[,"col10"] col10 row1 -0.8900854 row2 -0.3129924 row3 -1.0991509 row4 0.7989160 row5 0.6640575 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 0.6983482 0.5217003 0.4730876 -0.5239498 -1.706530 -1.253440 0.2340841 row5 1.0375472 1.0145907 0.2564382 -1.5591860 -1.320777 1.146756 -0.3956427 col8 col9 col10 col11 col12 col13 col14 row1 1.098058 0.8428923 -0.8900854 0.6892093 -0.6680448 -0.7552029 1.7953215 row5 -1.156706 0.3232202 0.6640575 0.6753017 -0.3821938 -0.1568835 -0.6131431 col15 col16 col17 col18 col19 col20 row1 0.1621512 -1.8201550 1.2257149 -0.2710288 1.30250568 -0.7111409 row5 0.7955745 -0.8065403 0.2008076 1.6020118 -0.03455526 0.1802661 > tmp[,c("col6","col20")] col6 col20 row1 -1.2534401 -0.7111409 row2 -0.7925907 1.6444159 row3 0.6890571 0.9524493 row4 -2.2830709 0.6682799 row5 1.1467557 0.1802661 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.253440 -0.7111409 row5 1.146756 0.1802661 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.82416 49.59483 49.32506 48.51966 50.91265 104.8466 51.17028 50.20204 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.33939 51.25635 49.84009 50.36559 51.17228 49.52418 51.68566 48.66661 col17 col18 col19 col20 row1 50.98786 49.99447 49.68847 105.724 > tmp[,"col10"] col10 row1 51.25635 row2 29.80500 row3 28.92226 row4 30.07631 row5 49.06666 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.82416 49.59483 49.32506 48.51966 50.91265 104.8466 51.17028 50.20204 row5 49.33383 50.43504 50.62217 50.82776 50.62671 107.6314 48.86756 50.04972 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.33939 51.25635 49.84009 50.36559 51.17228 49.52418 51.68566 48.66661 row5 50.16893 49.06666 50.52131 49.69517 51.49068 50.34136 50.00113 51.22186 col17 col18 col19 col20 row1 50.98786 49.99447 49.68847 105.724 row5 51.52350 50.70704 51.02216 105.089 > tmp[,c("col6","col20")] col6 col20 row1 104.84661 105.72404 row2 75.84149 76.13021 row3 75.81837 75.39250 row4 75.05084 72.74381 row5 107.63143 105.08895 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.8466 105.724 row5 107.6314 105.089 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.8466 105.724 row5 107.6314 105.089 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.46156158 [2,] 0.46281789 [3,] -0.08185354 [4,] 1.34312098 [5,] -0.17651365 > tmp[,c("col17","col7")] col17 col7 [1,] -1.8553679 0.8330776 [2,] -0.7221232 -0.2571414 [3,] 0.2749199 -1.7082472 [4,] -0.2174280 0.7743741 [5,] 0.9677749 -0.7821872 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -1.7339651 -0.6233058 [2,] 0.5169970 2.1801139 [3,] -0.2280284 -0.9910297 [4,] 0.1433957 0.4362243 [5,] -0.6281931 -0.5846199 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -1.733965 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -1.733965 [2,] 0.516997 > > > > 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.7118841 -0.3976291 1.2744958 0.5794965 -0.1641739 1.2177402 0.3035123 row1 -0.8426092 1.3948270 0.1835293 -0.5423965 0.6385827 0.2420573 0.1031255 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 -0.5195695 -0.3174814 1.7371186 -0.48822454 1.391844 -1.529248 -1.35972540 row1 -0.9017023 0.4913406 0.5746989 0.01372223 1.494558 -1.134566 0.04870579 [,15] [,16] [,17] [,18] [,19] [,20] row3 0.1755330 -1.9676085 -1.372482 -0.03561996 0.9066108 1.7055831 row1 -0.3785533 -0.2103763 1.454614 -0.78606343 0.7282984 -0.9815765 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.07169097 0.9884933 0.6511383 0.4507858 -0.3399051 -0.5799594 -1.919895 [,8] [,9] [,10] row2 -0.849077 0.393388 -1.411318 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.2957247 0.313331 -3.935155 0.7717615 -0.6255077 0.05501731 -1.692204 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.4382028 -0.8988569 0.6498874 -0.7144257 1.773254 1.142178 -0.7693585 [,15] [,16] [,17] [,18] [,19] [,20] row5 -2.706311 1.471198 -0.7200731 1.379842 -0.1830551 0.01987293 > > > 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: 0x356aac20> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM385264407e2c53" [2] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3852645b7e50fc" [3] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM385264614e89ec" [4] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM38526482bc337" [5] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM38526413076b55" [6] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM385264211e812b" [7] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM38526435ee9996" [8] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM385264271552a2" [9] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM385264284f34ca" [10] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM385264462176e5" [11] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM38526441eb8184" [12] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3852643284d1a5" [13] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM38526428860594" [14] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM385264538e1de0" [15] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3852647e7794f4" > > > ### 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: 0x3445b020> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x3445b020> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x3445b020> > rowMedians(tmp) [1] -0.301568512 0.169375908 -0.034468022 0.230781622 0.193082561 [6] -0.928363180 0.508702687 -0.444512784 0.154967716 0.038544886 [11] -0.176154726 0.217771424 0.103158077 -0.436483101 -0.409975059 [16] 0.128301854 -0.157004803 -0.002516227 0.400330335 0.352786690 [21] 0.031772288 0.695969186 0.170823162 -0.136544551 -0.051857321 [26] 0.248336721 0.433634317 -0.220350857 0.118037730 0.406283244 [31] -0.214731954 -0.011995049 -0.607016429 0.016961469 -0.506470360 [36] -0.373499084 0.817004006 0.484470142 0.099471800 -0.115804126 [41] 0.586700145 0.738487015 0.046566562 0.372242752 -0.151656708 [46] 0.566733239 0.549641769 -0.162336742 0.558938129 0.030540796 [51] -0.040554607 0.163424285 -0.009346763 0.481445044 -0.012501682 [56] 0.181345722 -0.236794316 0.279855886 -0.015976837 -0.049956893 [61] -0.551211201 0.379922456 -0.276446077 0.419414889 -0.075620975 [66] 0.253327522 0.859129171 0.252322729 0.032551982 0.404145108 [71] -0.117680815 0.283060381 -0.162029103 0.495732067 -0.474910173 [76] 0.252287860 -0.025678721 0.038223313 0.236521820 -0.160116022 [81] 0.142203447 -0.259450862 -0.112265821 -0.576651094 -0.085588877 [86] 0.350540180 0.035678285 0.131283847 0.098028799 0.469797258 [91] 0.074575006 -0.095550990 0.112716008 0.474552052 -0.716549292 [96] 0.111681009 -0.059591997 0.010416892 -0.091994512 -0.086852922 [101] 0.006409757 -0.226934702 -0.043581771 -0.593890644 0.246208617 [106] 0.160211216 -0.409269531 -0.047456833 0.672641428 -0.251817547 [111] -0.185697145 0.151026461 0.216260365 0.010178956 0.048820740 [116] 0.104112013 -0.784848791 -0.278886211 -0.253922391 -0.279253439 [121] 0.376873936 -0.097650658 -0.221911128 -0.356407374 0.416085215 [126] 0.207298265 -0.643055361 -0.018286792 0.628697027 -0.145779153 [131] -0.152385083 -0.314923261 0.322445106 -0.175606910 0.524632206 [136] 0.284284891 0.662808105 0.062471821 -0.061191280 -0.474375800 [141] 0.135760840 0.494596906 0.076336408 0.095155522 0.153611871 [146] -0.055969817 0.368442766 -0.530669766 0.658932913 0.095629905 [151] -0.160534725 0.139554604 0.745114681 -0.334484605 -0.420937886 [156] 0.101701542 -0.014225467 0.105955488 -0.351369416 0.023405742 [161] 0.650737245 0.623689645 -0.161868323 0.224422336 -0.358141715 [166] -0.102793615 -0.606409886 0.016226987 0.001830118 -0.118601391 [171] -0.101875920 0.397293512 -0.073174453 -0.335379510 0.064380326 [176] -0.047488021 -0.301620419 0.364100916 -0.380827414 -0.107958932 [181] 0.177588614 -0.159962203 0.089694752 0.235766551 0.191163328 [186] 0.362513298 -0.364529193 0.218790003 -0.518562114 -0.160988920 [191] 0.336492168 0.205085935 -0.520789643 0.306501065 -0.075600571 [196] 0.061195037 -0.101283738 0.129316422 0.070547304 -0.178559031 [201] 0.236218211 0.289058609 -0.346879495 0.235323588 -0.082675384 [206] 0.566857277 -0.081242937 0.483578760 -0.117404523 0.478552534 [211] -0.385271088 -0.366867528 0.270840541 0.129917317 0.222572003 [216] -0.046186625 -0.334848457 -0.116884147 -0.068379849 -0.302151245 [221] 0.233462395 0.129985437 0.309289585 0.350921365 0.223420614 [226] 0.342057065 -0.371147420 0.341017604 0.073861767 -0.451512761 > > proc.time() user system elapsed 1.717 0.944 2.686
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: 0xc94b3c0> > .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: 0xc94b3c0> > .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: 0xc94b3c0> > .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: 0xc94b3c0> > 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: 0xc42dd60> > .Call("R_bm_AddColumn",P) <pointer: 0xc42dd60> > .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: 0xc42dd60> > .Call("R_bm_AddColumn",P) <pointer: 0xc42dd60> > .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: 0xc42dd60> > 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: 0xca5f7e0> > .Call("R_bm_AddColumn",P) <pointer: 0xca5f7e0> > .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: 0xca5f7e0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0xca5f7e0> > .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: 0xca5f7e0> > > .Call("R_bm_RowMode",P) <pointer: 0xca5f7e0> > .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: 0xca5f7e0> > > .Call("R_bm_ColMode",P) <pointer: 0xca5f7e0> > .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: 0xca5f7e0> > 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: 0xd354fd0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0xd354fd0> > .Call("R_bm_AddColumn",P) <pointer: 0xd354fd0> > .Call("R_bm_AddColumn",P) <pointer: 0xd354fd0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3854c3600e65c4" "BufferedMatrixFile3854c366abb954" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3854c3600e65c4" "BufferedMatrixFile3854c366abb954" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0xcbd1da0> > .Call("R_bm_AddColumn",P) <pointer: 0xcbd1da0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0xcbd1da0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0xcbd1da0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0xcbd1da0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0xcbd1da0> > .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: 0xec40990> > .Call("R_bm_AddColumn",P) <pointer: 0xec40990> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0xec40990> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0xec40990> > 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: 0xec8dcc0> > .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: 0xec8dcc0> > rm(P) > > proc.time() user system elapsed 0.313 0.040 0.338
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.299 0.035 0.320