Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2024-12-24 11:46 -0500 (Tue, 24 Dec 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | R Under development (unstable) (2024-10-21 r87258) -- "Unsuffered Consequences" | 4754 |
palomino7 | Windows Server 2022 Datacenter | x64 | R Under development (unstable) (2024-10-26 r87273 ucrt) -- "Unsuffered Consequences" | 4472 |
lconway | macOS 12.7.1 Monterey | x86_64 | R Under development (unstable) (2024-11-20 r87352) -- "Unsuffered Consequences" | 4426 |
kjohnson3 | macOS 13.7.1 Ventura | arm64 | R Under development (unstable) (2024-11-20 r87352) -- "Unsuffered Consequences" | 4381 |
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) | aarch64 | R Under development (unstable) (2024-11-24 r87369) -- "Unsuffered Consequences" | 4373 |
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 245/2274 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.71.1 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino7 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson3 | macOS 13.7.1 Ventura / arm64 | OK | OK | WARNINGS | OK | |||||||||
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) / 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.71.1 |
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.71.1.tar.gz |
StartedAt: 2024-12-24 04:59:14 -0000 (Tue, 24 Dec 2024) |
EndedAt: 2024-12-24 04:59:37 -0000 (Tue, 24 Dec 2024) |
EllapsedTime: 23.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.71.1.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck’ * using R Under development (unstable) (2024-11-24 r87369) * using platform: aarch64-unknown-linux-gnu * R was compiled by aarch64-unknown-linux-gnu-gcc (GCC) 14.2.0 GNU Fortran (GCC) 14.2.0 * 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.71.1’ * 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.21-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.5.0-devel_2024-11-24/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.5.0-devel_2024-11-24/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 Under development (unstable) (2024-11-24 r87369) -- "Unsuffered Consequences" 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.327 0.044 0.355
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2024-11-24 r87369) -- "Unsuffered Consequences" 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.21-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 478192 25.6 1046321 55.9 639882 34.2 Vcells 884352 6.8 8388608 64.0 2080652 15.9 > > > > > ## > ## 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 Dec 24 04:59:31 2024" > 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 Dec 24 04:59:31 2024" > > > 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: 0x3db93460> > > > > 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 Dec 24 04:59:32 2024" > 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 Dec 24 04:59:32 2024" > > ColMode(tmp2) <pointer: 0x3db93460> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.5350675 -1.7982371 -0.9758848 0.8687395 [2,] 0.2386293 0.7897031 0.7660186 1.0229768 [3,] 0.4172136 0.9925550 -0.1000993 -1.1543401 [4,] 0.5101493 -0.2889108 1.8040051 1.4647381 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.5350675 1.7982371 0.9758848 0.8687395 [2,] 0.2386293 0.7897031 0.7660186 1.0229768 [3,] 0.4172136 0.9925550 0.1000993 1.1543401 [4,] 0.5101493 0.2889108 1.8040051 1.4647381 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 10.0267177 1.3409836 0.9878688 0.932062 [2,] 0.4884970 0.8886524 0.8752249 1.011423 [3,] 0.6459208 0.9962705 0.3163848 1.074402 [4,] 0.7142474 0.5375042 1.3431326 1.210264 > > 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.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 225.80224 40.20807 35.85457 35.18936 [2,] 30.12360 34.67623 34.51827 36.13721 [3,] 31.87642 35.95526 28.26395 36.89836 [4,] 32.65262 30.66395 40.23533 38.56737 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x3d9d8410> > exp(tmp5) <pointer: 0x3d9d8410> > log(tmp5,2) <pointer: 0x3d9d8410> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 469.9778 > Min(tmp5) [1] 54.63143 > mean(tmp5) [1] 73.94591 > Sum(tmp5) [1] 14789.18 > Var(tmp5) [1] 870.5918 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 92.56890 72.16409 70.40047 75.00187 70.96006 69.33061 73.79445 71.59359 [9] 71.18769 72.45732 > rowSums(tmp5) [1] 1851.378 1443.282 1408.009 1500.037 1419.201 1386.612 1475.889 1431.872 [9] 1423.754 1449.146 > rowVars(tmp5) [1] 7990.29798 95.40883 56.99047 82.79335 58.83587 99.89269 [7] 67.40866 77.19126 68.27736 90.39476 > rowSd(tmp5) [1] 89.388467 9.767745 7.549203 9.099085 7.670454 9.994633 8.210278 [8] 8.785856 8.263012 9.507616 > rowMax(tmp5) [1] 469.97779 94.25659 85.52266 88.45871 80.76655 91.28757 94.13688 [8] 89.06968 85.48777 88.33580 > rowMin(tmp5) [1] 59.90059 57.40237 57.28991 61.38177 57.48738 54.63143 59.39941 57.37182 [9] 55.10393 55.18215 > > colMeans(tmp5) [1] 107.93350 71.54923 71.07687 72.84982 72.87728 73.52133 72.53448 [8] 72.91265 69.21889 76.11209 74.85864 67.71988 73.22557 69.32904 [15] 74.41323 71.31509 75.11379 72.81418 68.90959 70.63296 > colSums(tmp5) [1] 1079.3350 715.4923 710.7687 728.4982 728.7728 735.2133 725.3448 [8] 729.1265 692.1889 761.1209 748.5864 677.1988 732.2557 693.2904 [15] 744.1323 713.1509 751.1379 728.1418 689.0959 706.3296 > colVars(tmp5) [1] 16214.70196 60.10706 72.17399 47.01654 63.09654 68.72396 [7] 101.21268 81.04407 106.90815 55.61081 111.28446 77.40291 [13] 106.56406 73.82220 79.92868 109.35439 71.33898 200.46592 [19] 34.30624 59.90292 > colSd(tmp5) [1] 127.336962 7.752874 8.495528 6.856861 7.943333 8.289991 [7] 10.060451 9.002448 10.339640 7.457265 10.549145 8.797892 [13] 10.322987 8.591985 8.940284 10.457265 8.446240 14.158599 [19] 5.857153 7.739698 > colMax(tmp5) [1] 469.97779 83.68784 83.74457 85.54868 89.06968 91.52783 82.96946 [8] 88.19814 87.75527 89.19318 91.28757 80.71479 94.11347 85.73530 [15] 88.30569 87.88063 85.27865 94.25659 80.76655 79.22383 > colMin(tmp5) [1] 59.39941 57.37182 54.63143 63.29207 61.09977 62.53478 55.21402 60.45370 [9] 55.27678 61.28540 60.68268 56.16243 63.15316 58.55559 60.45045 59.07085 [17] 57.28991 55.10393 60.24671 57.48738 > > > ### 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] 92.56890 72.16409 NA 75.00187 70.96006 69.33061 73.79445 71.59359 [9] 71.18769 72.45732 > rowSums(tmp5) [1] 1851.378 1443.282 NA 1500.037 1419.201 1386.612 1475.889 1431.872 [9] 1423.754 1449.146 > rowVars(tmp5) [1] 7990.29798 95.40883 56.56605 82.79335 58.83587 99.89269 [7] 67.40866 77.19126 68.27736 90.39476 > rowSd(tmp5) [1] 89.388467 9.767745 7.521040 9.099085 7.670454 9.994633 8.210278 [8] 8.785856 8.263012 9.507616 > rowMax(tmp5) [1] 469.97779 94.25659 NA 88.45871 80.76655 91.28757 94.13688 [8] 89.06968 85.48777 88.33580 > rowMin(tmp5) [1] 59.90059 57.40237 NA 61.38177 57.48738 54.63143 59.39941 57.37182 [9] 55.10393 55.18215 > > colMeans(tmp5) [1] 107.93350 71.54923 71.07687 72.84982 72.87728 73.52133 72.53448 [8] 72.91265 69.21889 76.11209 74.85864 67.71988 73.22557 69.32904 [15] 74.41323 71.31509 75.11379 NA 68.90959 70.63296 > colSums(tmp5) [1] 1079.3350 715.4923 710.7687 728.4982 728.7728 735.2133 725.3448 [8] 729.1265 692.1889 761.1209 748.5864 677.1988 732.2557 693.2904 [15] 744.1323 713.1509 751.1379 NA 689.0959 706.3296 > colVars(tmp5) [1] 16214.70196 60.10706 72.17399 47.01654 63.09654 68.72396 [7] 101.21268 81.04407 106.90815 55.61081 111.28446 77.40291 [13] 106.56406 73.82220 79.92868 109.35439 71.33898 NA [19] 34.30624 59.90292 > colSd(tmp5) [1] 127.336962 7.752874 8.495528 6.856861 7.943333 8.289991 [7] 10.060451 9.002448 10.339640 7.457265 10.549145 8.797892 [13] 10.322987 8.591985 8.940284 10.457265 8.446240 NA [19] 5.857153 7.739698 > colMax(tmp5) [1] 469.97779 83.68784 83.74457 85.54868 89.06968 91.52783 82.96946 [8] 88.19814 87.75527 89.19318 91.28757 80.71479 94.11347 85.73530 [15] 88.30569 87.88063 85.27865 NA 80.76655 79.22383 > colMin(tmp5) [1] 59.39941 57.37182 54.63143 63.29207 61.09977 62.53478 55.21402 60.45370 [9] 55.27678 61.28540 60.68268 56.16243 63.15316 58.55559 60.45045 59.07085 [17] 57.28991 NA 60.24671 57.48738 > > Max(tmp5,na.rm=TRUE) [1] 469.9778 > Min(tmp5,na.rm=TRUE) [1] 54.63143 > mean(tmp5,na.rm=TRUE) [1] 73.92435 > Sum(tmp5,na.rm=TRUE) [1] 14710.94 > Var(tmp5,na.rm=TRUE) [1] 874.8953 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.56890 72.16409 69.98806 75.00187 70.96006 69.33061 73.79445 71.59359 [9] 71.18769 72.45732 > rowSums(tmp5,na.rm=TRUE) [1] 1851.378 1443.282 1329.773 1500.037 1419.201 1386.612 1475.889 1431.872 [9] 1423.754 1449.146 > rowVars(tmp5,na.rm=TRUE) [1] 7990.29798 95.40883 56.56605 82.79335 58.83587 99.89269 [7] 67.40866 77.19126 68.27736 90.39476 > rowSd(tmp5,na.rm=TRUE) [1] 89.388467 9.767745 7.521040 9.099085 7.670454 9.994633 8.210278 [8] 8.785856 8.263012 9.507616 > rowMax(tmp5,na.rm=TRUE) [1] 469.97779 94.25659 85.52266 88.45871 80.76655 91.28757 94.13688 [8] 89.06968 85.48777 88.33580 > rowMin(tmp5,na.rm=TRUE) [1] 59.90059 57.40237 57.28991 61.38177 57.48738 54.63143 59.39941 57.37182 [9] 55.10393 55.18215 > > colMeans(tmp5,na.rm=TRUE) [1] 107.93350 71.54923 71.07687 72.84982 72.87728 73.52133 72.53448 [8] 72.91265 69.21889 76.11209 74.85864 67.71988 73.22557 69.32904 [15] 74.41323 71.31509 75.11379 72.21173 68.90959 70.63296 > colSums(tmp5,na.rm=TRUE) [1] 1079.3350 715.4923 710.7687 728.4982 728.7728 735.2133 725.3448 [8] 729.1265 692.1889 761.1209 748.5864 677.1988 732.2557 693.2904 [15] 744.1323 713.1509 751.1379 649.9056 689.0959 706.3296 > colVars(tmp5,na.rm=TRUE) [1] 16214.70196 60.10706 72.17399 47.01654 63.09654 68.72396 [7] 101.21268 81.04407 106.90815 55.61081 111.28446 77.40291 [13] 106.56406 73.82220 79.92868 109.35439 71.33898 221.44106 [19] 34.30624 59.90292 > colSd(tmp5,na.rm=TRUE) [1] 127.336962 7.752874 8.495528 6.856861 7.943333 8.289991 [7] 10.060451 9.002448 10.339640 7.457265 10.549145 8.797892 [13] 10.322987 8.591985 8.940284 10.457265 8.446240 14.880896 [19] 5.857153 7.739698 > colMax(tmp5,na.rm=TRUE) [1] 469.97779 83.68784 83.74457 85.54868 89.06968 91.52783 82.96946 [8] 88.19814 87.75527 89.19318 91.28757 80.71479 94.11347 85.73530 [15] 88.30569 87.88063 85.27865 94.25659 80.76655 79.22383 > colMin(tmp5,na.rm=TRUE) [1] 59.39941 57.37182 54.63143 63.29207 61.09977 62.53478 55.21402 60.45370 [9] 55.27678 61.28540 60.68268 56.16243 63.15316 58.55559 60.45045 59.07085 [17] 57.28991 55.10393 60.24671 57.48738 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 92.56890 72.16409 NaN 75.00187 70.96006 69.33061 73.79445 71.59359 [9] 71.18769 72.45732 > rowSums(tmp5,na.rm=TRUE) [1] 1851.378 1443.282 0.000 1500.037 1419.201 1386.612 1475.889 1431.872 [9] 1423.754 1449.146 > rowVars(tmp5,na.rm=TRUE) [1] 7990.29798 95.40883 NA 82.79335 58.83587 99.89269 [7] 67.40866 77.19126 68.27736 90.39476 > rowSd(tmp5,na.rm=TRUE) [1] 89.388467 9.767745 NA 9.099085 7.670454 9.994633 8.210278 [8] 8.785856 8.263012 9.507616 > rowMax(tmp5,na.rm=TRUE) [1] 469.97779 94.25659 NA 88.45871 80.76655 91.28757 94.13688 [8] 89.06968 85.48777 88.33580 > rowMin(tmp5,na.rm=TRUE) [1] 59.90059 57.40237 NA 61.38177 57.48738 54.63143 59.39941 57.37182 [9] 55.10393 55.18215 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 112.55427 71.18401 72.43789 72.41101 72.73246 73.51046 72.81844 [8] 72.75070 68.48223 77.75950 74.65875 68.74291 73.73860 68.89848 [15] 75.10293 69.73647 77.09422 NaN 69.56734 70.40445 > colSums(tmp5,na.rm=TRUE) [1] 1012.9884 640.6561 651.9410 651.6990 654.5922 661.5942 655.3660 [8] 654.7563 616.3401 699.8355 671.9288 618.6862 663.6474 620.0863 [15] 675.9263 627.6282 693.8480 0.0000 626.1060 633.6401 > colVars(tmp5,na.rm=TRUE) [1] 18001.33544 66.11990 60.35655 50.72737 70.74769 77.31313 [7] 112.95716 90.87950 114.16671 32.03008 124.74550 75.30412 [13] 116.92355 80.96448 84.56842 94.98825 36.13262 NA [19] 33.72750 66.80337 > colSd(tmp5,na.rm=TRUE) [1] 134.169055 8.131414 7.768948 7.122315 8.411165 8.792788 [7] 10.628131 9.533074 10.684882 5.659513 11.168953 8.677795 [13] 10.813119 8.998026 9.196109 9.746192 6.011041 NA [19] 5.807538 8.173333 > colMax(tmp5,na.rm=TRUE) [1] 469.97779 83.68784 83.74457 85.54868 89.06968 91.52783 82.96946 [8] 88.19814 87.75527 89.19318 91.28757 80.71479 94.11347 85.73530 [15] 88.30569 87.88063 85.27865 -Inf 80.76655 79.22383 > colMin(tmp5,na.rm=TRUE) [1] 59.39941 57.37182 54.63143 63.29207 61.09977 62.53478 55.21402 60.45370 [9] 55.27678 67.83834 60.68268 56.16243 63.15316 58.55559 60.45045 59.07085 [17] 67.27867 Inf 60.24671 57.48738 > > > > > 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] 347.4427 198.9343 149.8771 229.2580 308.9698 164.7311 170.8852 164.4380 [9] 201.3702 202.0140 > apply(copymatrix,1,var,na.rm=TRUE) [1] 347.4427 198.9343 149.8771 229.2580 308.9698 164.7311 170.8852 164.4380 [9] 201.3702 202.0140 > > > > 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] 5.684342e-14 0.000000e+00 -1.421085e-13 0.000000e+00 -8.526513e-14 [6] 5.684342e-14 -1.421085e-13 -2.842171e-14 -2.273737e-13 -1.705303e-13 [11] 5.684342e-14 5.684342e-14 9.947598e-14 1.136868e-13 7.105427e-14 [16] 0.000000e+00 -2.273737e-13 0.000000e+00 0.000000e+00 2.842171e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 10 12 10 7 8 15 2 13 10 14 6 14 8 11 5 3 9 15 2 6 6 6 7 9 2 16 9 1 8 20 7 3 7 16 8 10 5 2 7 2 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] 1.984475 > Min(tmp) [1] -2.174878 > mean(tmp) [1] -0.01827448 > Sum(tmp) [1] -1.827448 > Var(tmp) [1] 0.7646035 > > rowMeans(tmp) [1] -0.01827448 > rowSums(tmp) [1] -1.827448 > rowVars(tmp) [1] 0.7646035 > rowSd(tmp) [1] 0.8744161 > rowMax(tmp) [1] 1.984475 > rowMin(tmp) [1] -2.174878 > > colMeans(tmp) [1] -0.91334769 1.54313581 0.03682403 1.53167145 1.01759580 1.47616839 [7] -0.02644543 0.11446140 -0.04086321 -0.02502901 -0.07598935 1.13900013 [13] -0.28449811 1.29109862 0.07551402 -0.19611133 0.35137468 0.38067982 [19] 0.48861331 0.63417247 -2.17487772 -0.19257559 0.83670037 -0.10625524 [25] 0.40517715 0.51800584 0.20020842 -0.50579122 0.10274452 -1.86504762 [31] -1.72269224 -0.57745869 -0.68255630 1.63591611 0.29615240 -0.37951571 [37] 0.49783108 0.21539734 0.58332289 -0.51142160 -0.36770817 -0.95790050 [43] -0.15767903 0.72976838 -2.04683480 -0.20760041 0.32883713 0.27856228 [49] 0.51124483 0.31589049 -1.04406299 -0.49429814 0.12752157 0.63376948 [55] -0.46086382 -0.08554652 0.13063820 0.42077941 -0.81276119 -1.28152029 [61] -0.47981770 -0.91458112 1.98447508 -0.78698685 -0.21247203 0.48977188 [67] -0.24078617 1.05906462 0.11248784 0.67080270 0.03450268 -0.73429743 [73] -1.99557100 0.17172361 1.08655596 0.21994864 -0.17457147 0.18195690 [79] -0.19907178 -0.49464398 1.26627097 -0.05263479 -1.17785250 -0.41523599 [85] 0.06395410 -0.06515462 -0.73250889 -0.72622321 1.04875236 -1.88457154 [91] -1.20284210 0.47446666 1.65732509 0.39396294 -1.53488623 -0.18599267 [97] 1.34824412 0.95375053 -1.59137890 0.10509087 > colSums(tmp) [1] -0.91334769 1.54313581 0.03682403 1.53167145 1.01759580 1.47616839 [7] -0.02644543 0.11446140 -0.04086321 -0.02502901 -0.07598935 1.13900013 [13] -0.28449811 1.29109862 0.07551402 -0.19611133 0.35137468 0.38067982 [19] 0.48861331 0.63417247 -2.17487772 -0.19257559 0.83670037 -0.10625524 [25] 0.40517715 0.51800584 0.20020842 -0.50579122 0.10274452 -1.86504762 [31] -1.72269224 -0.57745869 -0.68255630 1.63591611 0.29615240 -0.37951571 [37] 0.49783108 0.21539734 0.58332289 -0.51142160 -0.36770817 -0.95790050 [43] -0.15767903 0.72976838 -2.04683480 -0.20760041 0.32883713 0.27856228 [49] 0.51124483 0.31589049 -1.04406299 -0.49429814 0.12752157 0.63376948 [55] -0.46086382 -0.08554652 0.13063820 0.42077941 -0.81276119 -1.28152029 [61] -0.47981770 -0.91458112 1.98447508 -0.78698685 -0.21247203 0.48977188 [67] -0.24078617 1.05906462 0.11248784 0.67080270 0.03450268 -0.73429743 [73] -1.99557100 0.17172361 1.08655596 0.21994864 -0.17457147 0.18195690 [79] -0.19907178 -0.49464398 1.26627097 -0.05263479 -1.17785250 -0.41523599 [85] 0.06395410 -0.06515462 -0.73250889 -0.72622321 1.04875236 -1.88457154 [91] -1.20284210 0.47446666 1.65732509 0.39396294 -1.53488623 -0.18599267 [97] 1.34824412 0.95375053 -1.59137890 0.10509087 > 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.91334769 1.54313581 0.03682403 1.53167145 1.01759580 1.47616839 [7] -0.02644543 0.11446140 -0.04086321 -0.02502901 -0.07598935 1.13900013 [13] -0.28449811 1.29109862 0.07551402 -0.19611133 0.35137468 0.38067982 [19] 0.48861331 0.63417247 -2.17487772 -0.19257559 0.83670037 -0.10625524 [25] 0.40517715 0.51800584 0.20020842 -0.50579122 0.10274452 -1.86504762 [31] -1.72269224 -0.57745869 -0.68255630 1.63591611 0.29615240 -0.37951571 [37] 0.49783108 0.21539734 0.58332289 -0.51142160 -0.36770817 -0.95790050 [43] -0.15767903 0.72976838 -2.04683480 -0.20760041 0.32883713 0.27856228 [49] 0.51124483 0.31589049 -1.04406299 -0.49429814 0.12752157 0.63376948 [55] -0.46086382 -0.08554652 0.13063820 0.42077941 -0.81276119 -1.28152029 [61] -0.47981770 -0.91458112 1.98447508 -0.78698685 -0.21247203 0.48977188 [67] -0.24078617 1.05906462 0.11248784 0.67080270 0.03450268 -0.73429743 [73] -1.99557100 0.17172361 1.08655596 0.21994864 -0.17457147 0.18195690 [79] -0.19907178 -0.49464398 1.26627097 -0.05263479 -1.17785250 -0.41523599 [85] 0.06395410 -0.06515462 -0.73250889 -0.72622321 1.04875236 -1.88457154 [91] -1.20284210 0.47446666 1.65732509 0.39396294 -1.53488623 -0.18599267 [97] 1.34824412 0.95375053 -1.59137890 0.10509087 > colMin(tmp) [1] -0.91334769 1.54313581 0.03682403 1.53167145 1.01759580 1.47616839 [7] -0.02644543 0.11446140 -0.04086321 -0.02502901 -0.07598935 1.13900013 [13] -0.28449811 1.29109862 0.07551402 -0.19611133 0.35137468 0.38067982 [19] 0.48861331 0.63417247 -2.17487772 -0.19257559 0.83670037 -0.10625524 [25] 0.40517715 0.51800584 0.20020842 -0.50579122 0.10274452 -1.86504762 [31] -1.72269224 -0.57745869 -0.68255630 1.63591611 0.29615240 -0.37951571 [37] 0.49783108 0.21539734 0.58332289 -0.51142160 -0.36770817 -0.95790050 [43] -0.15767903 0.72976838 -2.04683480 -0.20760041 0.32883713 0.27856228 [49] 0.51124483 0.31589049 -1.04406299 -0.49429814 0.12752157 0.63376948 [55] -0.46086382 -0.08554652 0.13063820 0.42077941 -0.81276119 -1.28152029 [61] -0.47981770 -0.91458112 1.98447508 -0.78698685 -0.21247203 0.48977188 [67] -0.24078617 1.05906462 0.11248784 0.67080270 0.03450268 -0.73429743 [73] -1.99557100 0.17172361 1.08655596 0.21994864 -0.17457147 0.18195690 [79] -0.19907178 -0.49464398 1.26627097 -0.05263479 -1.17785250 -0.41523599 [85] 0.06395410 -0.06515462 -0.73250889 -0.72622321 1.04875236 -1.88457154 [91] -1.20284210 0.47446666 1.65732509 0.39396294 -1.53488623 -0.18599267 [97] 1.34824412 0.95375053 -1.59137890 0.10509087 > colMedians(tmp) [1] -0.91334769 1.54313581 0.03682403 1.53167145 1.01759580 1.47616839 [7] -0.02644543 0.11446140 -0.04086321 -0.02502901 -0.07598935 1.13900013 [13] -0.28449811 1.29109862 0.07551402 -0.19611133 0.35137468 0.38067982 [19] 0.48861331 0.63417247 -2.17487772 -0.19257559 0.83670037 -0.10625524 [25] 0.40517715 0.51800584 0.20020842 -0.50579122 0.10274452 -1.86504762 [31] -1.72269224 -0.57745869 -0.68255630 1.63591611 0.29615240 -0.37951571 [37] 0.49783108 0.21539734 0.58332289 -0.51142160 -0.36770817 -0.95790050 [43] -0.15767903 0.72976838 -2.04683480 -0.20760041 0.32883713 0.27856228 [49] 0.51124483 0.31589049 -1.04406299 -0.49429814 0.12752157 0.63376948 [55] -0.46086382 -0.08554652 0.13063820 0.42077941 -0.81276119 -1.28152029 [61] -0.47981770 -0.91458112 1.98447508 -0.78698685 -0.21247203 0.48977188 [67] -0.24078617 1.05906462 0.11248784 0.67080270 0.03450268 -0.73429743 [73] -1.99557100 0.17172361 1.08655596 0.21994864 -0.17457147 0.18195690 [79] -0.19907178 -0.49464398 1.26627097 -0.05263479 -1.17785250 -0.41523599 [85] 0.06395410 -0.06515462 -0.73250889 -0.72622321 1.04875236 -1.88457154 [91] -1.20284210 0.47446666 1.65732509 0.39396294 -1.53488623 -0.18599267 [97] 1.34824412 0.95375053 -1.59137890 0.10509087 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.9133477 1.543136 0.03682403 1.531671 1.017596 1.476168 -0.02644543 [2,] -0.9133477 1.543136 0.03682403 1.531671 1.017596 1.476168 -0.02644543 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.1144614 -0.04086321 -0.02502901 -0.07598935 1.139 -0.2844981 1.291099 [2,] 0.1144614 -0.04086321 -0.02502901 -0.07598935 1.139 -0.2844981 1.291099 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.07551402 -0.1961113 0.3513747 0.3806798 0.4886133 0.6341725 -2.174878 [2,] 0.07551402 -0.1961113 0.3513747 0.3806798 0.4886133 0.6341725 -2.174878 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.1925756 0.8367004 -0.1062552 0.4051771 0.5180058 0.2002084 -0.5057912 [2,] -0.1925756 0.8367004 -0.1062552 0.4051771 0.5180058 0.2002084 -0.5057912 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.1027445 -1.865048 -1.722692 -0.5774587 -0.6825563 1.635916 0.2961524 [2,] 0.1027445 -1.865048 -1.722692 -0.5774587 -0.6825563 1.635916 0.2961524 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.3795157 0.4978311 0.2153973 0.5833229 -0.5114216 -0.3677082 -0.9579005 [2,] -0.3795157 0.4978311 0.2153973 0.5833229 -0.5114216 -0.3677082 -0.9579005 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.157679 0.7297684 -2.046835 -0.2076004 0.3288371 0.2785623 0.5112448 [2,] -0.157679 0.7297684 -2.046835 -0.2076004 0.3288371 0.2785623 0.5112448 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.3158905 -1.044063 -0.4942981 0.1275216 0.6337695 -0.4608638 -0.08554652 [2,] 0.3158905 -1.044063 -0.4942981 0.1275216 0.6337695 -0.4608638 -0.08554652 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.1306382 0.4207794 -0.8127612 -1.28152 -0.4798177 -0.9145811 1.984475 [2,] 0.1306382 0.4207794 -0.8127612 -1.28152 -0.4798177 -0.9145811 1.984475 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.7869869 -0.212472 0.4897719 -0.2407862 1.059065 0.1124878 0.6708027 [2,] -0.7869869 -0.212472 0.4897719 -0.2407862 1.059065 0.1124878 0.6708027 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.03450268 -0.7342974 -1.995571 0.1717236 1.086556 0.2199486 -0.1745715 [2,] 0.03450268 -0.7342974 -1.995571 0.1717236 1.086556 0.2199486 -0.1745715 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.1819569 -0.1990718 -0.494644 1.266271 -0.05263479 -1.177853 -0.415236 [2,] 0.1819569 -0.1990718 -0.494644 1.266271 -0.05263479 -1.177853 -0.415236 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.0639541 -0.06515462 -0.7325089 -0.7262232 1.048752 -1.884572 -1.202842 [2,] 0.0639541 -0.06515462 -0.7325089 -0.7262232 1.048752 -1.884572 -1.202842 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.4744667 1.657325 0.3939629 -1.534886 -0.1859927 1.348244 0.9537505 [2,] 0.4744667 1.657325 0.3939629 -1.534886 -0.1859927 1.348244 0.9537505 [,99] [,100] [1,] -1.591379 0.1050909 [2,] -1.591379 0.1050909 > > > Max(tmp2) [1] 2.441447 > Min(tmp2) [1] -2.887542 > mean(tmp2) [1] 0.02700643 > Sum(tmp2) [1] 2.700643 > Var(tmp2) [1] 1.091268 > > rowMeans(tmp2) [1] 0.44795154 -1.01401226 0.03104677 0.92500512 -0.04498879 0.16717945 [7] 0.24739073 0.21437481 0.18556515 0.82357838 -0.22425527 -0.70959487 [13] 0.02637858 0.34532609 -1.00311759 -0.07169367 1.01620700 1.03679147 [19] -1.66028030 -1.06374330 0.84681260 0.59461706 1.47003248 0.05869409 [25] -0.67311509 1.03625223 -0.31687606 -0.94071355 -0.26301352 -2.37527001 [31] -0.74363044 -0.41540953 0.69293315 1.14280791 0.40018719 0.94831415 [37] -0.53207783 -1.32874897 -0.63215173 -0.25015177 1.67804576 2.44144687 [43] 2.35328724 0.84568638 0.28397145 -1.40161724 -1.99405162 0.50444057 [49] -0.42936337 0.05515716 -0.73309822 0.27179875 0.95630099 -0.58549769 [55] -1.12876946 0.39707994 -0.07884614 0.44145081 -1.04587598 -0.22986195 [61] -0.98078085 -0.91497973 0.29882683 -0.17186124 -0.73242597 0.83582157 [67] 0.35696493 0.32009262 1.34970112 -0.22811405 0.54988808 0.43157375 [73] -0.34608998 0.85554851 1.25982429 0.87017268 -0.83604397 -2.51547291 [79] 0.38120308 0.47681628 -1.74108466 0.25906934 0.70175434 1.78976975 [85] 0.77815994 0.40476864 -0.62263590 0.02986080 1.68883771 -0.46756940 [91] 1.81338449 -2.06493401 1.53275792 -1.53667007 -2.88754184 1.13922975 [97] 0.45789661 1.30620503 -0.65169159 -1.48587408 > rowSums(tmp2) [1] 0.44795154 -1.01401226 0.03104677 0.92500512 -0.04498879 0.16717945 [7] 0.24739073 0.21437481 0.18556515 0.82357838 -0.22425527 -0.70959487 [13] 0.02637858 0.34532609 -1.00311759 -0.07169367 1.01620700 1.03679147 [19] -1.66028030 -1.06374330 0.84681260 0.59461706 1.47003248 0.05869409 [25] -0.67311509 1.03625223 -0.31687606 -0.94071355 -0.26301352 -2.37527001 [31] -0.74363044 -0.41540953 0.69293315 1.14280791 0.40018719 0.94831415 [37] -0.53207783 -1.32874897 -0.63215173 -0.25015177 1.67804576 2.44144687 [43] 2.35328724 0.84568638 0.28397145 -1.40161724 -1.99405162 0.50444057 [49] -0.42936337 0.05515716 -0.73309822 0.27179875 0.95630099 -0.58549769 [55] -1.12876946 0.39707994 -0.07884614 0.44145081 -1.04587598 -0.22986195 [61] -0.98078085 -0.91497973 0.29882683 -0.17186124 -0.73242597 0.83582157 [67] 0.35696493 0.32009262 1.34970112 -0.22811405 0.54988808 0.43157375 [73] -0.34608998 0.85554851 1.25982429 0.87017268 -0.83604397 -2.51547291 [79] 0.38120308 0.47681628 -1.74108466 0.25906934 0.70175434 1.78976975 [85] 0.77815994 0.40476864 -0.62263590 0.02986080 1.68883771 -0.46756940 [91] 1.81338449 -2.06493401 1.53275792 -1.53667007 -2.88754184 1.13922975 [97] 0.45789661 1.30620503 -0.65169159 -1.48587408 > 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.44795154 -1.01401226 0.03104677 0.92500512 -0.04498879 0.16717945 [7] 0.24739073 0.21437481 0.18556515 0.82357838 -0.22425527 -0.70959487 [13] 0.02637858 0.34532609 -1.00311759 -0.07169367 1.01620700 1.03679147 [19] -1.66028030 -1.06374330 0.84681260 0.59461706 1.47003248 0.05869409 [25] -0.67311509 1.03625223 -0.31687606 -0.94071355 -0.26301352 -2.37527001 [31] -0.74363044 -0.41540953 0.69293315 1.14280791 0.40018719 0.94831415 [37] -0.53207783 -1.32874897 -0.63215173 -0.25015177 1.67804576 2.44144687 [43] 2.35328724 0.84568638 0.28397145 -1.40161724 -1.99405162 0.50444057 [49] -0.42936337 0.05515716 -0.73309822 0.27179875 0.95630099 -0.58549769 [55] -1.12876946 0.39707994 -0.07884614 0.44145081 -1.04587598 -0.22986195 [61] -0.98078085 -0.91497973 0.29882683 -0.17186124 -0.73242597 0.83582157 [67] 0.35696493 0.32009262 1.34970112 -0.22811405 0.54988808 0.43157375 [73] -0.34608998 0.85554851 1.25982429 0.87017268 -0.83604397 -2.51547291 [79] 0.38120308 0.47681628 -1.74108466 0.25906934 0.70175434 1.78976975 [85] 0.77815994 0.40476864 -0.62263590 0.02986080 1.68883771 -0.46756940 [91] 1.81338449 -2.06493401 1.53275792 -1.53667007 -2.88754184 1.13922975 [97] 0.45789661 1.30620503 -0.65169159 -1.48587408 > rowMin(tmp2) [1] 0.44795154 -1.01401226 0.03104677 0.92500512 -0.04498879 0.16717945 [7] 0.24739073 0.21437481 0.18556515 0.82357838 -0.22425527 -0.70959487 [13] 0.02637858 0.34532609 -1.00311759 -0.07169367 1.01620700 1.03679147 [19] -1.66028030 -1.06374330 0.84681260 0.59461706 1.47003248 0.05869409 [25] -0.67311509 1.03625223 -0.31687606 -0.94071355 -0.26301352 -2.37527001 [31] -0.74363044 -0.41540953 0.69293315 1.14280791 0.40018719 0.94831415 [37] -0.53207783 -1.32874897 -0.63215173 -0.25015177 1.67804576 2.44144687 [43] 2.35328724 0.84568638 0.28397145 -1.40161724 -1.99405162 0.50444057 [49] -0.42936337 0.05515716 -0.73309822 0.27179875 0.95630099 -0.58549769 [55] -1.12876946 0.39707994 -0.07884614 0.44145081 -1.04587598 -0.22986195 [61] -0.98078085 -0.91497973 0.29882683 -0.17186124 -0.73242597 0.83582157 [67] 0.35696493 0.32009262 1.34970112 -0.22811405 0.54988808 0.43157375 [73] -0.34608998 0.85554851 1.25982429 0.87017268 -0.83604397 -2.51547291 [79] 0.38120308 0.47681628 -1.74108466 0.25906934 0.70175434 1.78976975 [85] 0.77815994 0.40476864 -0.62263590 0.02986080 1.68883771 -0.46756940 [91] 1.81338449 -2.06493401 1.53275792 -1.53667007 -2.88754184 1.13922975 [97] 0.45789661 1.30620503 -0.65169159 -1.48587408 > > colMeans(tmp2) [1] 0.02700643 > colSums(tmp2) [1] 2.700643 > colVars(tmp2) [1] 1.091268 > colSd(tmp2) [1] 1.044638 > colMax(tmp2) [1] 2.441447 > colMin(tmp2) [1] -2.887542 > colMedians(tmp2) [1] 0.1763723 > colRanges(tmp2) [,1] [1,] -2.887542 [2,] 2.441447 > > 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] 0.10491476 -3.17121650 -4.52066362 6.07217000 -1.63815714 -0.33403498 [7] -3.68075250 -8.13624690 2.71104947 0.09240305 > colApply(tmp,quantile)[,1] [,1] [1,] -1.9323707 [2,] -1.0381550 [3,] -0.4504646 [4,] 0.9378082 [5,] 2.4748809 > > rowApply(tmp,sum) [1] -3.3494976 5.1120919 0.1833353 -2.7600343 -0.6874066 1.8552277 [7] 0.4389865 -6.7061167 -5.9175368 -0.6695836 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 5 8 2 3 10 8 4 1 7 10 [2,] 4 4 8 2 9 3 1 10 3 1 [3,] 8 3 3 5 8 2 6 9 2 6 [4,] 9 10 5 10 1 6 8 4 8 9 [5,] 10 5 4 4 5 9 9 6 1 2 [6,] 3 1 9 8 6 5 7 3 10 4 [7,] 7 2 10 6 3 1 3 7 4 7 [8,] 2 6 1 1 2 4 5 8 5 3 [9,] 1 7 7 7 7 7 10 2 9 8 [10,] 6 9 6 9 4 10 2 5 6 5 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.28839100 2.50352790 -4.36123306 -1.34706858 0.72911738 -2.45182737 [7] -0.91106773 0.28397894 4.27927883 4.32301423 0.23589289 0.27367571 [13] -1.57736152 -0.24273665 -0.05708077 -2.39301558 -3.85391909 -3.76094256 [19] 1.19659156 -0.96266921 > colApply(tmp,quantile)[,1] [,1] [1,] -1.629776862 [2,] -1.051763427 [3,] -0.002770704 [4,] 1.119873691 [5,] 1.852828300 > > rowApply(tmp,sum) [1] -2.5000184 4.1750568 -3.2200242 -5.6833085 -0.5771594 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 17 19 3 5 10 [2,] 15 16 16 14 8 [3,] 4 9 10 3 2 [4,] 14 1 13 20 3 [5,] 5 6 20 9 15 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.119873691 0.5765662 -1.1020081 0.17152763 -0.8749343 -1.3810846 [2,] 1.852828300 1.3015118 0.2950009 -2.49064294 -0.2732184 -0.9528277 [3,] -1.051763427 0.6258049 -0.2557344 0.02943735 1.7307005 -1.3382487 [4,] -1.629776862 0.2792748 -1.9551944 2.27413651 -0.3371125 0.9245242 [5,] -0.002770704 -0.2796298 -1.3432969 -1.33152713 0.4836821 0.2958094 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.4249903 2.2187558 -0.8645712 1.5960043 -1.8763546 -0.6772093 [2,] -1.1491144 -1.2272796 0.7859616 1.9219802 1.6266801 1.0122379 [3,] -0.1297129 -0.2283608 1.0441092 0.3437967 -0.5442064 0.7769458 [4,] -1.5798502 -0.1352486 1.8226966 0.2961789 -0.2871252 -2.0405462 [5,] 0.5226195 -0.3438878 1.4910826 0.1650541 1.3168990 1.2022475 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.03611766 0.8109847 -0.2348582 -0.415436328 -0.3806258 -0.84662132 [2,] 0.29961626 -0.1589636 1.3271702 0.254203183 -2.0183878 0.29539692 [3,] -0.50297542 -0.8026585 0.8161174 -1.051014766 -0.9333872 -1.37956930 [4,] 0.02875015 -0.5141340 -2.7974672 -0.009054661 0.6951895 -1.75104498 [5,] -1.36663485 0.4220348 0.8319570 -1.171713008 -1.2167078 -0.07910388 [,19] [,20] [1,] 0.1685066 -1.8974061 [2,] 1.0419490 0.4309549 [3,] 0.1503285 -0.5196328 [4,] -0.5290934 1.5615889 [5,] 0.3649008 -0.5381742 > > > 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.21-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.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 642 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 557 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.21-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.4808504 -2.307581 -0.1192709 0.7503933 -0.7913159 0.07240687 0.5557779 col8 col9 col10 col11 col12 col13 col14 row1 -0.7286116 -1.465923 0.4889326 -0.6998811 -1.413469 1.432853 0.437835 col15 col16 col17 col18 col19 col20 row1 -0.3166311 1.340681 -1.366706 0.7614685 0.7714342 0.371263 > tmp[,"col10"] col10 row1 0.4889326 row2 -1.0488608 row3 -0.7358426 row4 1.5013799 row5 2.0204626 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.4808504 -2.307581 -0.1192709 0.7503933 -0.7913159 0.07240687 0.5557779 row5 -0.1553795 -1.283899 1.2971419 -0.2467032 3.7465791 0.69264240 0.4688482 col8 col9 col10 col11 col12 col13 row1 -0.7286116 -1.4659227 0.4889326 -0.6998811 -1.4134694 1.432853 row5 1.4950499 0.2463705 2.0204626 -1.3183101 0.6181784 -1.119562 col14 col15 col16 col17 col18 col19 col20 row1 0.43783503 -0.3166311 1.340681 -1.3667064 0.76146848 0.7714342 0.3712630 row5 -0.08103479 -0.2406802 1.103993 0.7462396 0.03629838 0.8346927 -0.4938863 > tmp[,c("col6","col20")] col6 col20 row1 0.07240687 0.3712630 row2 0.19248522 -2.2538981 row3 -0.67886024 0.8775025 row4 -0.99424969 0.2095481 row5 0.69264240 -0.4938863 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.07240687 0.3712630 row5 0.69264240 -0.4938863 > > > > > 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.05768 48.59394 49.1916 51.89644 49.4801 106.2613 49.94767 48.69724 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.25569 47.75985 49.56437 49.3603 49.48003 49.02069 49.09366 50.22339 col17 col18 col19 col20 row1 50.34844 49.07317 50.18358 105.062 > tmp[,"col10"] col10 row1 47.75985 row2 30.29802 row3 30.65222 row4 29.20287 row5 49.59085 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.05768 48.59394 49.19160 51.89644 49.48010 106.2613 49.94767 48.69724 row5 49.91548 51.01503 49.13079 48.38447 50.82589 104.9724 50.05093 49.17855 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.25569 47.75985 49.56437 49.36030 49.48003 49.02069 49.09366 50.22339 row5 50.54826 49.59085 50.13814 49.74646 50.80825 51.89383 50.19249 51.81760 col17 col18 col19 col20 row1 50.34844 49.07317 50.18358 105.0620 row5 49.78656 50.33484 50.06251 104.3687 > tmp[,c("col6","col20")] col6 col20 row1 106.26127 105.06200 row2 76.13298 74.66333 row3 76.25277 75.07388 row4 74.17633 74.61174 row5 104.97235 104.36874 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 106.2613 105.0620 row5 104.9724 104.3687 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 106.2613 105.0620 row5 104.9724 104.3687 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -1.15474779 [2,] -0.45273408 [3,] 0.05417581 [4,] 0.09332780 [5,] -0.21754562 > tmp[,c("col17","col7")] col17 col7 [1,] 1.2212251 -0.97412970 [2,] -1.2564805 0.15663606 [3,] 1.0139835 0.14069317 [4,] -1.2669739 1.56928807 [5,] 0.2812232 0.06233927 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.7077421 1.2021418 [2,] -0.2470061 1.2984794 [3,] -1.3212842 -0.1696371 [4,] 0.9819115 1.1450720 [5,] -0.4149729 -1.1019717 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.7077421 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.7077421 [2,] -0.2470061 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 -1.3837544 2.2831562 -0.4271625 0.7971248 -1.137012 0.7841183 -0.5659561 row1 -0.7335311 0.7654467 -0.1879509 0.8366893 -1.006213 0.4753656 0.4149571 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 0.9802868 -1.099794 0.8658093 0.5197643 0.6794146 1.2814038 -0.4789286 row1 0.4184969 -1.402707 -0.1730258 -2.0259739 -0.9253416 -0.4343476 0.9139917 [,15] [,16] [,17] [,18] [,19] [,20] row3 -1.8422985 1.4187943 1.0376057 -0.245356262 -0.9440572 1.6860646 row1 -0.3132516 0.7783284 0.7092149 -0.002672564 0.5932637 -0.6010428 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.4614494 -2.052865 -0.178287 1.726809 2.31388 -0.2364033 -1.919816 [,8] [,9] [,10] row2 -2.184238 0.09789347 0.3494743 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.7674978 -0.9182592 -1.247603 -1.113598 0.8125006 -0.136689 -0.03823647 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.039189 -0.2497141 -2.87945 -2.351521 -1.261746 0.7074007 -0.3205273 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.1499725 0.2797206 -1.367628 -0.5187362 -0.03396139 0.4905208 > > > 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: 0x3f42ce90> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f01cc49a87" [2] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f026ae8ed8" [3] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f064e6768f" [4] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f063bed309" [5] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f04bf28ebb" [6] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f0efa10e9" [7] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f0afeb63d" [8] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f074bebaa" [9] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f044253e31" [10] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f0703c307d" [11] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f06f66e96" [12] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f05d15b07f" [13] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f0156b3a7f" [14] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f031e1b50f" [15] "/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BMf7f043398a65" > > > ### 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: 0x3ced4aa0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x3ced4aa0> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x3ced4aa0> > rowMedians(tmp) [1] 0.068329606 0.086917293 0.155901880 0.177124775 0.520704206 [6] -0.767075353 0.257746176 -0.207037151 0.336375233 -0.178686259 [11] -0.256818177 -0.062515122 0.035293421 0.099778654 -0.477592072 [16] -0.158578973 0.433714067 0.118285501 0.327042679 0.339477153 [21] -0.309331072 -0.312193671 0.078373782 0.082324836 -0.102587042 [26] -0.012008205 0.003857970 0.270848606 0.067572769 -0.103296545 [31] 0.160777155 -0.035988777 0.300971180 0.347001883 0.060517692 [36] -0.513522932 -0.074852936 -0.111270277 -0.630770651 -0.043868042 [41] 0.384117326 0.059169115 -0.587811691 0.376203805 0.044769680 [46] 0.343019968 0.430472750 -0.075873625 -0.567377280 -0.064381763 [51] 0.507423557 0.032978235 -0.382458224 0.083978650 0.158350509 [56] -0.199652035 -0.564538989 0.010481822 -0.454322535 -0.049677033 [61] 0.428947237 -0.529425239 -0.249358535 0.203766711 0.174112467 [66] 0.275384059 -0.083193631 0.441667906 -0.346406809 -0.086023765 [71] 0.512706332 0.141246679 0.396300815 -0.395420440 0.279786771 [76] -0.732607735 0.306291465 -0.190040483 -0.191606420 0.573132509 [81] -0.593139822 0.026203508 0.553315134 -0.305152827 -0.225347610 [86] 0.073171898 0.066689066 0.208972614 0.117132707 0.067561082 [91] -0.019538046 0.012488535 -0.140224079 -0.332298781 0.227544220 [96] 0.487967380 -0.110055532 -0.526809860 -0.002723869 0.287984758 [101] -0.216219863 0.327522955 0.203649559 0.200709328 0.110298728 [106] 0.318610272 0.196479288 0.041373071 0.518526611 -0.398201894 [111] 0.259308165 -0.129927611 0.064884338 0.386549343 0.055040393 [116] 0.262872870 0.547034382 -0.047677259 0.344780598 -0.121118173 [121] 0.297736230 -0.326782387 -0.290600719 0.242410798 0.120763941 [126] -0.061826887 -0.162471031 0.179112012 0.197384567 -0.107128952 [131] -0.250195591 -0.338443866 -0.436265745 0.138956823 0.288293674 [136] 0.020837937 0.024488779 -0.565582764 0.008674805 -0.238352872 [141] 0.281911215 -0.804286601 -0.208959015 -0.446170927 0.468620040 [146] -0.058652201 -0.113829304 -0.366426953 -0.303595171 0.562760763 [151] -0.284023346 0.319931236 -0.456969859 0.018015993 -0.260630456 [156] -0.272667732 0.238602827 -0.175509574 0.051174233 -0.264374076 [161] -0.055684565 -0.245553239 0.073368042 -0.245871025 0.026281456 [166] -0.012922702 0.151128312 -0.021679622 -0.294432791 0.078289929 [171] -0.237219911 -0.081326347 0.245595466 -0.097077800 0.205452011 [176] 0.226612453 -0.237265151 0.170088170 -0.465205366 0.703682993 [181] 0.342676231 0.023352826 0.021955347 -0.007546683 0.318945862 [186] -0.133363946 0.465272004 -0.611240750 -0.375433030 0.774704419 [191] -0.006382562 0.174950204 -0.277980309 0.450934163 0.021245906 [196] 0.470630349 -0.019630175 0.471001753 0.242688851 0.578793725 [201] -0.148698387 -0.096797366 0.010576312 0.009070905 0.389940883 [206] -0.228078997 -0.268337338 0.590100444 0.043773481 0.266321260 [211] 0.037891236 -0.082527510 -0.057140425 -0.030849513 -0.371995178 [216] 0.583838254 -0.250930453 -0.013553400 0.339053244 0.023048768 [221] -0.164859401 0.414064356 -0.320408758 0.524005944 0.368359697 [226] 0.301439420 -0.059855121 -0.009062322 -0.255403951 0.059110086 > > proc.time() user system elapsed 1.969 0.757 2.748
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2024-11-24 r87369) -- "Unsuffered Consequences" 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: 0x2da3c460> > .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: 0x2da3c460> > .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: 0x2da3c460> > .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: 0x2da3c460> > 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: 0x2d015450> > .Call("R_bm_AddColumn",P) <pointer: 0x2d015450> > .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: 0x2d015450> > .Call("R_bm_AddColumn",P) <pointer: 0x2d015450> > .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: 0x2d015450> > 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: 0x2f443ea0> > .Call("R_bm_AddColumn",P) <pointer: 0x2f443ea0> > .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: 0x2f443ea0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x2f443ea0> > .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: 0x2f443ea0> > > .Call("R_bm_RowMode",P) <pointer: 0x2f443ea0> > .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: 0x2f443ea0> > > .Call("R_bm_ColMode",P) <pointer: 0x2f443ea0> > .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: 0x2f443ea0> > 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: 0x2ce8ae50> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x2ce8ae50> > .Call("R_bm_AddColumn",P) <pointer: 0x2ce8ae50> > .Call("R_bm_AddColumn",P) <pointer: 0x2ce8ae50> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilef995224dd1c6" "BufferedMatrixFilef995719b304a" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilef995224dd1c6" "BufferedMatrixFilef995719b304a" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x2f3d2670> > .Call("R_bm_AddColumn",P) <pointer: 0x2f3d2670> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x2f3d2670> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x2f3d2670> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x2f3d2670> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x2f3d2670> > .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: 0x2f420820> > .Call("R_bm_AddColumn",P) <pointer: 0x2f420820> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x2f420820> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x2f420820> > 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: 0x2d4086e0> > .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: 0x2d4086e0> > rm(P) > > proc.time() user system elapsed 0.344 0.038 0.367
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2024-11-24 r87369) -- "Unsuffered Consequences" 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.339 0.028 0.350