Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2024-11-05 12:08 -0500 (Tue, 05 Nov 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
teran2 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4503 |
nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4763 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" | 4506 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4539 |
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) | aarch64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4493 |
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
| teran2 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | |||||||||
nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | ||||||||||
palomino8 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | 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.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: 2024-11-05 06:04:26 -0000 (Tue, 05 Nov 2024) |
EndedAt: 2024-11-05 06:04:49 -0000 (Tue, 05 Nov 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.70.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.4.1 (2024-06-14) * using platform: aarch64-unknown-linux-gnu * R was compiled by gcc (GCC) 12.2.1 20220819 (openEuler 12.2.1-14) GNU Fortran (GCC) 10.3.1 * running under: openEuler 22.03 (LTS-SP1) * 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: ‘gcc (conda-forge gcc 14.2.0-1) 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.1/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘gcc (conda-forge gcc 14.2.0-1) 14.2.0’ gcc -I"/home/biocbuild/R/R-4.4.1/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"/home/biocbuild/R/R-4.4.1/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function 'dbm_ReadOnlyMode': doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ doubleBufferedMatrix.c: At top level: doubleBufferedMatrix.c:3327:12: warning: 'sort_double' defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ gcc -I"/home/biocbuild/R/R-4.4.1/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"/home/biocbuild/R/R-4.4.1/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -c init_package.c -o init_package.o gcc -shared -L/home/biocbuild/R/R-4.4.1/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/R/R-4.4.1/lib -lR installing to /home/biocbuild/R/R-4.4.1/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.1 (2024-06-14) -- "Race for Your Life" 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.418 0.040 0.359
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.1 (2024-06-14) -- "Race for Your Life" 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 471778 25.2 1026214 54.9 643445 34.4 Vcells 871880 6.7 8388608 64.0 2044632 15.6 > > > > > ## > ## 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 Nov 5 06:04:44 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 Nov 5 06:04:44 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: 0x16da99f0> > > > > 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 Nov 5 06:04:45 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 Nov 5 06:04:45 2024" > > ColMode(tmp2) <pointer: 0x16da99f0> > > > > ### 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,] 102.1314934 0.1479207 0.4908281 0.1595382 [2,] -1.8957257 0.1252149 -0.7898532 0.3537390 [3,] 0.3233442 0.5705497 -1.4181239 1.0007274 [4,] 1.4278630 0.6959076 0.1065398 -1.9358807 > 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 : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 102.1314934 0.1479207 0.4908281 0.1595382 [2,] 1.8957257 0.1252149 0.7898532 0.3537390 [3,] 0.3233442 0.5705497 1.4181239 1.0007274 [4,] 1.4278630 0.6959076 0.1065398 1.9358807 > 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 : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 10.1060127 0.3846046 0.7005913 0.3994223 [2,] 1.3768536 0.3538572 0.8887369 0.5947596 [3,] 0.5686336 0.7553474 1.1908501 1.0003636 [4,] 1.1949322 0.8342108 0.3264043 1.3913593 > > 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 : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 228.19162 28.99397 32.49674 29.15376 [2,] 40.66426 28.66379 34.67722 31.30134 [3,] 31.00968 33.12402 38.32662 36.00436 [4,] 38.37719 34.03802 28.37058 40.84947 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x157313e0> > exp(tmp5) <pointer: 0x157313e0> > log(tmp5,2) <pointer: 0x157313e0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 474.951 > Min(tmp5) [1] 54.7175 > mean(tmp5) [1] 72.70898 > Sum(tmp5) [1] 14541.8 > Var(tmp5) [1] 880.694 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 87.84373 70.94019 71.91604 70.62413 71.97443 68.96708 71.88134 70.50062 [9] 69.93501 72.50723 > rowSums(tmp5) [1] 1756.875 1418.804 1438.321 1412.483 1439.489 1379.342 1437.627 1410.012 [9] 1398.700 1450.145 > rowVars(tmp5) [1] 8351.55713 75.29878 69.48411 64.27954 60.41081 36.66098 [7] 63.97679 90.93911 85.98549 46.56715 > rowSd(tmp5) [1] 91.386854 8.677487 8.335713 8.017452 7.772439 6.054831 7.998549 [8] 9.536200 9.272836 6.824013 > rowMax(tmp5) [1] 474.95096 95.16366 87.24899 85.02283 85.42818 80.12835 90.62702 [8] 91.74809 85.83068 85.32141 > rowMin(tmp5) [1] 57.38315 59.65992 55.70728 54.71750 56.33413 57.64859 56.77028 57.09860 [9] 57.97685 63.40971 > > colMeans(tmp5) [1] 109.22161 67.80037 72.23258 73.65077 69.55555 73.74425 70.16477 [8] 67.44335 72.20919 68.49919 68.52334 67.41282 71.60363 72.73648 [15] 67.03183 70.46443 77.35061 71.27700 71.72816 71.52967 > colSums(tmp5) [1] 1092.2161 678.0037 722.3258 736.5077 695.5555 737.4425 701.6477 [8] 674.4335 722.0919 684.9919 685.2334 674.1282 716.0363 727.3648 [15] 670.3183 704.6443 773.5061 712.7700 717.2816 715.2967 > colVars(tmp5) [1] 16625.93819 56.86632 53.79055 60.04007 29.54129 22.78023 [7] 23.36169 45.55493 74.07551 62.97109 69.34209 61.10633 [13] 59.69428 155.28340 54.97454 62.05737 88.59884 19.68853 [19] 69.19689 76.50940 > colSd(tmp5) [1] 128.941608 7.540976 7.334204 7.748553 5.435190 4.772864 [7] 4.833393 6.749439 8.606713 7.935433 8.327190 7.817054 [13] 7.726207 12.461276 7.414481 7.877650 9.412696 4.437176 [19] 8.318467 8.746965 > colMax(tmp5) [1] 474.95096 80.12835 85.83068 85.02283 79.87294 79.99618 77.29833 [8] 78.00129 91.74809 80.56903 82.12700 81.98268 82.02657 95.16366 [15] 78.37691 85.42818 91.64951 78.83349 82.54395 85.32141 > colMin(tmp5) [1] 56.77028 59.65992 59.04965 60.67973 61.66671 66.70903 61.45562 59.15247 [9] 63.66475 57.38315 55.70728 54.71750 56.33413 57.97685 57.54976 58.92603 [17] 61.96342 62.07374 61.21916 58.18393 > > > ### 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] NA 70.94019 71.91604 70.62413 71.97443 68.96708 71.88134 70.50062 [9] 69.93501 72.50723 > rowSums(tmp5) [1] NA 1418.804 1438.321 1412.483 1439.489 1379.342 1437.627 1410.012 [9] 1398.700 1450.145 > rowVars(tmp5) [1] 8795.45058 75.29878 69.48411 64.27954 60.41081 36.66098 [7] 63.97679 90.93911 85.98549 46.56715 > rowSd(tmp5) [1] 93.784064 8.677487 8.335713 8.017452 7.772439 6.054831 7.998549 [8] 9.536200 9.272836 6.824013 > rowMax(tmp5) [1] NA 95.16366 87.24899 85.02283 85.42818 80.12835 90.62702 91.74809 [9] 85.83068 85.32141 > rowMin(tmp5) [1] NA 59.65992 55.70728 54.71750 56.33413 57.64859 56.77028 57.09860 [9] 57.97685 63.40971 > > colMeans(tmp5) [1] 109.22161 67.80037 72.23258 73.65077 69.55555 73.74425 70.16477 [8] 67.44335 NA 68.49919 68.52334 67.41282 71.60363 72.73648 [15] 67.03183 70.46443 77.35061 71.27700 71.72816 71.52967 > colSums(tmp5) [1] 1092.2161 678.0037 722.3258 736.5077 695.5555 737.4425 701.6477 [8] 674.4335 NA 684.9919 685.2334 674.1282 716.0363 727.3648 [15] 670.3183 704.6443 773.5061 712.7700 717.2816 715.2967 > colVars(tmp5) [1] 16625.93819 56.86632 53.79055 60.04007 29.54129 22.78023 [7] 23.36169 45.55493 NA 62.97109 69.34209 61.10633 [13] 59.69428 155.28340 54.97454 62.05737 88.59884 19.68853 [19] 69.19689 76.50940 > colSd(tmp5) [1] 128.941608 7.540976 7.334204 7.748553 5.435190 4.772864 [7] 4.833393 6.749439 NA 7.935433 8.327190 7.817054 [13] 7.726207 12.461276 7.414481 7.877650 9.412696 4.437176 [19] 8.318467 8.746965 > colMax(tmp5) [1] 474.95096 80.12835 85.83068 85.02283 79.87294 79.99618 77.29833 [8] 78.00129 NA 80.56903 82.12700 81.98268 82.02657 95.16366 [15] 78.37691 85.42818 91.64951 78.83349 82.54395 85.32141 > colMin(tmp5) [1] 56.77028 59.65992 59.04965 60.67973 61.66671 66.70903 61.45562 59.15247 [9] NA 57.38315 55.70728 54.71750 56.33413 57.97685 57.54976 58.92603 [17] 61.96342 62.07374 61.21916 58.18393 > > Max(tmp5,na.rm=TRUE) [1] 474.951 > Min(tmp5,na.rm=TRUE) [1] 54.7175 > mean(tmp5,na.rm=TRUE) [1] 72.72605 > Sum(tmp5,na.rm=TRUE) [1] 14472.48 > Var(tmp5,na.rm=TRUE) [1] 885.0834 > > rowMeans(tmp5,na.rm=TRUE) [1] 88.81905 70.94019 71.91604 70.62413 71.97443 68.96708 71.88134 70.50062 [9] 69.93501 72.50723 > rowSums(tmp5,na.rm=TRUE) [1] 1687.562 1418.804 1438.321 1412.483 1439.489 1379.342 1437.627 1410.012 [9] 1398.700 1450.145 > rowVars(tmp5,na.rm=TRUE) [1] 8795.45058 75.29878 69.48411 64.27954 60.41081 36.66098 [7] 63.97679 90.93911 85.98549 46.56715 > rowSd(tmp5,na.rm=TRUE) [1] 93.784064 8.677487 8.335713 8.017452 7.772439 6.054831 7.998549 [8] 9.536200 9.272836 6.824013 > rowMax(tmp5,na.rm=TRUE) [1] 474.95096 95.16366 87.24899 85.02283 85.42818 80.12835 90.62702 [8] 91.74809 85.83068 85.32141 > rowMin(tmp5,na.rm=TRUE) [1] 57.38315 59.65992 55.70728 54.71750 56.33413 57.64859 56.77028 57.09860 [9] 57.97685 63.40971 > > colMeans(tmp5,na.rm=TRUE) [1] 109.22161 67.80037 72.23258 73.65077 69.55555 73.74425 70.16477 [8] 67.44335 72.53103 68.49919 68.52334 67.41282 71.60363 72.73648 [15] 67.03183 70.46443 77.35061 71.27700 71.72816 71.52967 > colSums(tmp5,na.rm=TRUE) [1] 1092.2161 678.0037 722.3258 736.5077 695.5555 737.4425 701.6477 [8] 674.4335 652.7793 684.9919 685.2334 674.1282 716.0363 727.3648 [15] 670.3183 704.6443 773.5061 712.7700 717.2816 715.2967 > colVars(tmp5,na.rm=TRUE) [1] 16625.93819 56.86632 53.79055 60.04007 29.54129 22.78023 [7] 23.36169 45.55493 82.16966 62.97109 69.34209 61.10633 [13] 59.69428 155.28340 54.97454 62.05737 88.59884 19.68853 [19] 69.19689 76.50940 > colSd(tmp5,na.rm=TRUE) [1] 128.941608 7.540976 7.334204 7.748553 5.435190 4.772864 [7] 4.833393 6.749439 9.064748 7.935433 8.327190 7.817054 [13] 7.726207 12.461276 7.414481 7.877650 9.412696 4.437176 [19] 8.318467 8.746965 > colMax(tmp5,na.rm=TRUE) [1] 474.95096 80.12835 85.83068 85.02283 79.87294 79.99618 77.29833 [8] 78.00129 91.74809 80.56903 82.12700 81.98268 82.02657 95.16366 [15] 78.37691 85.42818 91.64951 78.83349 82.54395 85.32141 > colMin(tmp5,na.rm=TRUE) [1] 56.77028 59.65992 59.04965 60.67973 61.66671 66.70903 61.45562 59.15247 [9] 63.66475 57.38315 55.70728 54.71750 56.33413 57.97685 57.54976 58.92603 [17] 61.96342 62.07374 61.21916 58.18393 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] NaN 70.94019 71.91604 70.62413 71.97443 68.96708 71.88134 70.50062 [9] 69.93501 72.50723 > rowSums(tmp5,na.rm=TRUE) [1] 0.000 1418.804 1438.321 1412.483 1439.489 1379.342 1437.627 1410.012 [9] 1398.700 1450.145 > rowVars(tmp5,na.rm=TRUE) [1] NA 75.29878 69.48411 64.27954 60.41081 36.66098 63.97679 90.93911 [9] 85.98549 46.56715 > rowSd(tmp5,na.rm=TRUE) [1] NA 8.677487 8.335713 8.017452 7.772439 6.054831 7.998549 9.536200 [9] 9.272836 6.824013 > rowMax(tmp5,na.rm=TRUE) [1] NA 95.16366 87.24899 85.02283 85.42818 80.12835 90.62702 91.74809 [9] 85.83068 85.32141 > rowMin(tmp5,na.rm=TRUE) [1] NA 59.65992 55.70728 54.71750 56.33413 57.64859 56.77028 57.09860 [9] 57.97685 63.40971 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 68.58502 68.62851 72.74312 75.09199 69.77481 74.49803 69.96136 66.34682 [9] NaN 69.73431 67.01182 67.88103 70.82189 72.71082 68.08539 70.85607 [17] 78.06381 72.29959 71.90889 73.01253 > colSums(tmp5,na.rm=TRUE) [1] 617.2652 617.6566 654.6881 675.8280 627.9733 670.4823 629.6522 597.1214 [9] 0.0000 627.6088 603.1064 610.9292 637.3970 654.3974 612.7685 637.7047 [17] 702.5742 650.6963 647.1800 657.1127 > colVars(tmp5,na.rm=TRUE) [1] 126.68658 56.25924 57.58204 44.17734 32.69309 19.23559 25.81640 [8] 37.72251 NA 53.68049 52.30713 66.27841 60.28105 174.68642 [15] 49.35891 68.08902 93.95145 10.38571 77.47904 61.33574 > colSd(tmp5,na.rm=TRUE) [1] 11.255513 7.500616 7.588283 6.646604 5.717787 4.385840 5.080984 [8] 6.141865 NA 7.326697 7.232367 8.141156 7.764087 13.216899 [15] 7.025590 8.251607 9.692856 3.222686 8.802218 7.831714 > colMax(tmp5,na.rm=TRUE) [1] 84.63733 80.12835 85.83068 85.02283 79.87294 79.99618 77.29833 78.00129 [9] -Inf 80.56903 77.58483 81.98268 82.02657 95.16366 78.37691 85.42818 [17] 91.64951 78.83349 82.54395 85.32141 > colMin(tmp5,na.rm=TRUE) [1] 56.77028 59.65992 59.04965 65.14963 61.66671 66.70903 61.45562 59.15247 [9] Inf 58.53250 55.70728 54.71750 56.33413 57.97685 58.18333 58.92603 [17] 61.96342 68.44728 61.21916 61.26625 > > > > > 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] 311.9987 397.8012 302.2186 293.6346 262.9395 132.2443 132.5181 208.7668 [9] 214.0155 330.6431 > apply(copymatrix,1,var,na.rm=TRUE) [1] 311.9987 397.8012 302.2186 293.6346 262.9395 132.2443 132.5181 208.7668 [9] 214.0155 330.6431 > > > > 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 -2.842171e-14 2.842171e-14 -8.526513e-14 2.842171e-13 [6] -2.557954e-13 -1.136868e-13 0.000000e+00 5.684342e-14 0.000000e+00 [11] 0.000000e+00 2.842171e-14 -1.136868e-13 1.705303e-13 2.842171e-14 [16] 5.684342e-14 5.684342e-14 1.989520e-13 -8.526513e-14 -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) + } 8 1 8 4 10 4 10 2 5 13 8 1 4 8 9 18 4 9 1 11 6 15 7 10 7 7 10 13 3 16 2 20 5 3 4 1 1 3 3 7 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.77366 > Min(tmp) [1] -3.13791 > mean(tmp) [1] -0.009354029 > Sum(tmp) [1] -0.9354029 > Var(tmp) [1] 0.9671771 > > rowMeans(tmp) [1] -0.009354029 > rowSums(tmp) [1] -0.9354029 > rowVars(tmp) [1] 0.9671771 > rowSd(tmp) [1] 0.9834516 > rowMax(tmp) [1] 2.77366 > rowMin(tmp) [1] -3.13791 > > colMeans(tmp) [1] -0.92114145 0.36138471 -0.19077160 -0.41738234 1.17439444 0.45047449 [7] 1.08394489 -0.79052848 0.71328162 -1.15994318 1.07020209 0.95599984 [13] 0.77213532 2.11281694 -0.94066763 1.21097687 -1.35813328 0.58465483 [19] 1.82831307 -1.49297041 -0.02133250 -0.93366572 -0.34135908 0.25212658 [25] -0.02377380 -0.22210730 -0.34677343 0.08450328 1.50161595 0.64653841 [31] -0.04308650 1.25350274 0.28654472 -0.17618641 0.31819913 0.86790205 [37] -0.14952094 0.45574442 -0.71510187 0.42535558 0.70199331 -0.88435795 [43] 0.69712010 0.38187674 -0.25354701 1.45349139 -0.08402012 -0.66787672 [49] -0.03744709 0.40370271 -0.79780948 -1.48071975 -0.48376181 -1.01791580 [55] -0.30412752 1.04837282 0.41339050 -1.27592714 -1.42732011 1.94632390 [61] 0.77410866 -1.34939571 -1.00376863 -0.23199089 -0.71518988 -0.71587808 [67] 0.58844968 0.24269472 -1.22430619 -1.40272420 -1.69866554 0.48895278 [73] 0.59346037 -0.81579810 -3.13790990 -1.02783593 -0.49327836 0.81066851 [79] 0.86287433 -0.49210525 0.42646953 0.55012507 -0.82018415 2.77365962 [85] 1.10870992 -0.12260383 -0.16429363 0.32196326 -1.67186032 0.82574724 [91] -0.28876055 -0.24140152 0.66689040 1.65521165 -1.50998060 -0.17264631 [97] -1.00885064 1.02220059 -0.24048663 -0.59528143 > colSums(tmp) [1] -0.92114145 0.36138471 -0.19077160 -0.41738234 1.17439444 0.45047449 [7] 1.08394489 -0.79052848 0.71328162 -1.15994318 1.07020209 0.95599984 [13] 0.77213532 2.11281694 -0.94066763 1.21097687 -1.35813328 0.58465483 [19] 1.82831307 -1.49297041 -0.02133250 -0.93366572 -0.34135908 0.25212658 [25] -0.02377380 -0.22210730 -0.34677343 0.08450328 1.50161595 0.64653841 [31] -0.04308650 1.25350274 0.28654472 -0.17618641 0.31819913 0.86790205 [37] -0.14952094 0.45574442 -0.71510187 0.42535558 0.70199331 -0.88435795 [43] 0.69712010 0.38187674 -0.25354701 1.45349139 -0.08402012 -0.66787672 [49] -0.03744709 0.40370271 -0.79780948 -1.48071975 -0.48376181 -1.01791580 [55] -0.30412752 1.04837282 0.41339050 -1.27592714 -1.42732011 1.94632390 [61] 0.77410866 -1.34939571 -1.00376863 -0.23199089 -0.71518988 -0.71587808 [67] 0.58844968 0.24269472 -1.22430619 -1.40272420 -1.69866554 0.48895278 [73] 0.59346037 -0.81579810 -3.13790990 -1.02783593 -0.49327836 0.81066851 [79] 0.86287433 -0.49210525 0.42646953 0.55012507 -0.82018415 2.77365962 [85] 1.10870992 -0.12260383 -0.16429363 0.32196326 -1.67186032 0.82574724 [91] -0.28876055 -0.24140152 0.66689040 1.65521165 -1.50998060 -0.17264631 [97] -1.00885064 1.02220059 -0.24048663 -0.59528143 > 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.92114145 0.36138471 -0.19077160 -0.41738234 1.17439444 0.45047449 [7] 1.08394489 -0.79052848 0.71328162 -1.15994318 1.07020209 0.95599984 [13] 0.77213532 2.11281694 -0.94066763 1.21097687 -1.35813328 0.58465483 [19] 1.82831307 -1.49297041 -0.02133250 -0.93366572 -0.34135908 0.25212658 [25] -0.02377380 -0.22210730 -0.34677343 0.08450328 1.50161595 0.64653841 [31] -0.04308650 1.25350274 0.28654472 -0.17618641 0.31819913 0.86790205 [37] -0.14952094 0.45574442 -0.71510187 0.42535558 0.70199331 -0.88435795 [43] 0.69712010 0.38187674 -0.25354701 1.45349139 -0.08402012 -0.66787672 [49] -0.03744709 0.40370271 -0.79780948 -1.48071975 -0.48376181 -1.01791580 [55] -0.30412752 1.04837282 0.41339050 -1.27592714 -1.42732011 1.94632390 [61] 0.77410866 -1.34939571 -1.00376863 -0.23199089 -0.71518988 -0.71587808 [67] 0.58844968 0.24269472 -1.22430619 -1.40272420 -1.69866554 0.48895278 [73] 0.59346037 -0.81579810 -3.13790990 -1.02783593 -0.49327836 0.81066851 [79] 0.86287433 -0.49210525 0.42646953 0.55012507 -0.82018415 2.77365962 [85] 1.10870992 -0.12260383 -0.16429363 0.32196326 -1.67186032 0.82574724 [91] -0.28876055 -0.24140152 0.66689040 1.65521165 -1.50998060 -0.17264631 [97] -1.00885064 1.02220059 -0.24048663 -0.59528143 > colMin(tmp) [1] -0.92114145 0.36138471 -0.19077160 -0.41738234 1.17439444 0.45047449 [7] 1.08394489 -0.79052848 0.71328162 -1.15994318 1.07020209 0.95599984 [13] 0.77213532 2.11281694 -0.94066763 1.21097687 -1.35813328 0.58465483 [19] 1.82831307 -1.49297041 -0.02133250 -0.93366572 -0.34135908 0.25212658 [25] -0.02377380 -0.22210730 -0.34677343 0.08450328 1.50161595 0.64653841 [31] -0.04308650 1.25350274 0.28654472 -0.17618641 0.31819913 0.86790205 [37] -0.14952094 0.45574442 -0.71510187 0.42535558 0.70199331 -0.88435795 [43] 0.69712010 0.38187674 -0.25354701 1.45349139 -0.08402012 -0.66787672 [49] -0.03744709 0.40370271 -0.79780948 -1.48071975 -0.48376181 -1.01791580 [55] -0.30412752 1.04837282 0.41339050 -1.27592714 -1.42732011 1.94632390 [61] 0.77410866 -1.34939571 -1.00376863 -0.23199089 -0.71518988 -0.71587808 [67] 0.58844968 0.24269472 -1.22430619 -1.40272420 -1.69866554 0.48895278 [73] 0.59346037 -0.81579810 -3.13790990 -1.02783593 -0.49327836 0.81066851 [79] 0.86287433 -0.49210525 0.42646953 0.55012507 -0.82018415 2.77365962 [85] 1.10870992 -0.12260383 -0.16429363 0.32196326 -1.67186032 0.82574724 [91] -0.28876055 -0.24140152 0.66689040 1.65521165 -1.50998060 -0.17264631 [97] -1.00885064 1.02220059 -0.24048663 -0.59528143 > colMedians(tmp) [1] -0.92114145 0.36138471 -0.19077160 -0.41738234 1.17439444 0.45047449 [7] 1.08394489 -0.79052848 0.71328162 -1.15994318 1.07020209 0.95599984 [13] 0.77213532 2.11281694 -0.94066763 1.21097687 -1.35813328 0.58465483 [19] 1.82831307 -1.49297041 -0.02133250 -0.93366572 -0.34135908 0.25212658 [25] -0.02377380 -0.22210730 -0.34677343 0.08450328 1.50161595 0.64653841 [31] -0.04308650 1.25350274 0.28654472 -0.17618641 0.31819913 0.86790205 [37] -0.14952094 0.45574442 -0.71510187 0.42535558 0.70199331 -0.88435795 [43] 0.69712010 0.38187674 -0.25354701 1.45349139 -0.08402012 -0.66787672 [49] -0.03744709 0.40370271 -0.79780948 -1.48071975 -0.48376181 -1.01791580 [55] -0.30412752 1.04837282 0.41339050 -1.27592714 -1.42732011 1.94632390 [61] 0.77410866 -1.34939571 -1.00376863 -0.23199089 -0.71518988 -0.71587808 [67] 0.58844968 0.24269472 -1.22430619 -1.40272420 -1.69866554 0.48895278 [73] 0.59346037 -0.81579810 -3.13790990 -1.02783593 -0.49327836 0.81066851 [79] 0.86287433 -0.49210525 0.42646953 0.55012507 -0.82018415 2.77365962 [85] 1.10870992 -0.12260383 -0.16429363 0.32196326 -1.67186032 0.82574724 [91] -0.28876055 -0.24140152 0.66689040 1.65521165 -1.50998060 -0.17264631 [97] -1.00885064 1.02220059 -0.24048663 -0.59528143 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.9211415 0.3613847 -0.1907716 -0.4173823 1.174394 0.4504745 1.083945 [2,] -0.9211415 0.3613847 -0.1907716 -0.4173823 1.174394 0.4504745 1.083945 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.7905285 0.7132816 -1.159943 1.070202 0.9559998 0.7721353 2.112817 [2,] -0.7905285 0.7132816 -1.159943 1.070202 0.9559998 0.7721353 2.112817 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.9406676 1.210977 -1.358133 0.5846548 1.828313 -1.49297 -0.0213325 [2,] -0.9406676 1.210977 -1.358133 0.5846548 1.828313 -1.49297 -0.0213325 [,22] [,23] [,24] [,25] [,26] [,27] [1,] -0.9336657 -0.3413591 0.2521266 -0.0237738 -0.2221073 -0.3467734 [2,] -0.9336657 -0.3413591 0.2521266 -0.0237738 -0.2221073 -0.3467734 [,28] [,29] [,30] [,31] [,32] [,33] [,34] [1,] 0.08450328 1.501616 0.6465384 -0.0430865 1.253503 0.2865447 -0.1761864 [2,] 0.08450328 1.501616 0.6465384 -0.0430865 1.253503 0.2865447 -0.1761864 [,35] [,36] [,37] [,38] [,39] [,40] [,41] [1,] 0.3181991 0.8679021 -0.1495209 0.4557444 -0.7151019 0.4253556 0.7019933 [2,] 0.3181991 0.8679021 -0.1495209 0.4557444 -0.7151019 0.4253556 0.7019933 [,42] [,43] [,44] [,45] [,46] [,47] [,48] [1,] -0.8843579 0.6971201 0.3818767 -0.253547 1.453491 -0.08402012 -0.6678767 [2,] -0.8843579 0.6971201 0.3818767 -0.253547 1.453491 -0.08402012 -0.6678767 [,49] [,50] [,51] [,52] [,53] [,54] [,55] [1,] -0.03744709 0.4037027 -0.7978095 -1.48072 -0.4837618 -1.017916 -0.3041275 [2,] -0.03744709 0.4037027 -0.7978095 -1.48072 -0.4837618 -1.017916 -0.3041275 [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] 1.048373 0.4133905 -1.275927 -1.42732 1.946324 0.7741087 -1.349396 [2,] 1.048373 0.4133905 -1.275927 -1.42732 1.946324 0.7741087 -1.349396 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [1,] -1.003769 -0.2319909 -0.7151899 -0.7158781 0.5884497 0.2426947 -1.224306 [2,] -1.003769 -0.2319909 -0.7151899 -0.7158781 0.5884497 0.2426947 -1.224306 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] -1.402724 -1.698666 0.4889528 0.5934604 -0.8157981 -3.13791 -1.027836 [2,] -1.402724 -1.698666 0.4889528 0.5934604 -0.8157981 -3.13791 -1.027836 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] -0.4932784 0.8106685 0.8628743 -0.4921053 0.4264695 0.5501251 -0.8201841 [2,] -0.4932784 0.8106685 0.8628743 -0.4921053 0.4264695 0.5501251 -0.8201841 [,84] [,85] [,86] [,87] [,88] [,89] [,90] [1,] 2.77366 1.10871 -0.1226038 -0.1642936 0.3219633 -1.67186 0.8257472 [2,] 2.77366 1.10871 -0.1226038 -0.1642936 0.3219633 -1.67186 0.8257472 [,91] [,92] [,93] [,94] [,95] [,96] [,97] [1,] -0.2887605 -0.2414015 0.6668904 1.655212 -1.509981 -0.1726463 -1.008851 [2,] -0.2887605 -0.2414015 0.6668904 1.655212 -1.509981 -0.1726463 -1.008851 [,98] [,99] [,100] [1,] 1.022201 -0.2404866 -0.5952814 [2,] 1.022201 -0.2404866 -0.5952814 > > > Max(tmp2) [1] 1.938274 > Min(tmp2) [1] -2.620885 > mean(tmp2) [1] -0.02333188 > Sum(tmp2) [1] -2.333188 > Var(tmp2) [1] 1.076663 > > rowMeans(tmp2) [1] 0.38066999 -1.95474820 -1.93657094 -1.33862254 -0.14099144 -2.62088473 [7] 1.76644812 0.74700288 1.39477808 -0.59345388 -0.33432337 0.91703864 [13] 0.91038215 -0.44400035 1.00895051 1.02754669 -1.57743263 -1.27575559 [19] 0.63659367 0.35454321 1.46556974 -2.14684599 -0.89787060 1.93827370 [25] 1.14978622 -1.39633608 0.31650638 -1.30681140 -0.49604509 1.13977207 [31] -0.37418930 -0.70167521 -1.11389596 0.67861213 -0.64271807 0.59599406 [37] -0.86622449 0.51109033 0.98409732 1.87203099 1.66808946 0.08964315 [43] 0.63126167 -0.69502281 -0.05525410 0.18502160 0.33170856 0.19713975 [49] 1.10252183 -2.16821684 -0.26849467 -1.33034981 0.96609051 0.97729628 [55] 0.38235777 -0.34707585 0.09069866 0.32603101 1.26685116 0.07656590 [61] -0.26170791 0.68488095 0.12067259 -0.32316733 -2.11775370 0.32811949 [67] -0.29781602 -1.52346558 -1.05740937 -0.84376285 0.09097816 -0.06975132 [73] -0.41121671 0.17130834 0.71239294 -1.96877169 0.37898142 -0.11921933 [79] 0.06140685 0.93890515 0.05349666 0.90229156 0.31997406 0.91321669 [85] -1.46989794 1.34383200 0.24684471 0.24721402 0.46551955 1.27730161 [91] -0.60539735 -0.16809400 -1.35397171 0.89062933 -1.09440037 -1.60571312 [97] 0.57072121 0.24679963 -0.78216039 1.71184772 > rowSums(tmp2) [1] 0.38066999 -1.95474820 -1.93657094 -1.33862254 -0.14099144 -2.62088473 [7] 1.76644812 0.74700288 1.39477808 -0.59345388 -0.33432337 0.91703864 [13] 0.91038215 -0.44400035 1.00895051 1.02754669 -1.57743263 -1.27575559 [19] 0.63659367 0.35454321 1.46556974 -2.14684599 -0.89787060 1.93827370 [25] 1.14978622 -1.39633608 0.31650638 -1.30681140 -0.49604509 1.13977207 [31] -0.37418930 -0.70167521 -1.11389596 0.67861213 -0.64271807 0.59599406 [37] -0.86622449 0.51109033 0.98409732 1.87203099 1.66808946 0.08964315 [43] 0.63126167 -0.69502281 -0.05525410 0.18502160 0.33170856 0.19713975 [49] 1.10252183 -2.16821684 -0.26849467 -1.33034981 0.96609051 0.97729628 [55] 0.38235777 -0.34707585 0.09069866 0.32603101 1.26685116 0.07656590 [61] -0.26170791 0.68488095 0.12067259 -0.32316733 -2.11775370 0.32811949 [67] -0.29781602 -1.52346558 -1.05740937 -0.84376285 0.09097816 -0.06975132 [73] -0.41121671 0.17130834 0.71239294 -1.96877169 0.37898142 -0.11921933 [79] 0.06140685 0.93890515 0.05349666 0.90229156 0.31997406 0.91321669 [85] -1.46989794 1.34383200 0.24684471 0.24721402 0.46551955 1.27730161 [91] -0.60539735 -0.16809400 -1.35397171 0.89062933 -1.09440037 -1.60571312 [97] 0.57072121 0.24679963 -0.78216039 1.71184772 > 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.38066999 -1.95474820 -1.93657094 -1.33862254 -0.14099144 -2.62088473 [7] 1.76644812 0.74700288 1.39477808 -0.59345388 -0.33432337 0.91703864 [13] 0.91038215 -0.44400035 1.00895051 1.02754669 -1.57743263 -1.27575559 [19] 0.63659367 0.35454321 1.46556974 -2.14684599 -0.89787060 1.93827370 [25] 1.14978622 -1.39633608 0.31650638 -1.30681140 -0.49604509 1.13977207 [31] -0.37418930 -0.70167521 -1.11389596 0.67861213 -0.64271807 0.59599406 [37] -0.86622449 0.51109033 0.98409732 1.87203099 1.66808946 0.08964315 [43] 0.63126167 -0.69502281 -0.05525410 0.18502160 0.33170856 0.19713975 [49] 1.10252183 -2.16821684 -0.26849467 -1.33034981 0.96609051 0.97729628 [55] 0.38235777 -0.34707585 0.09069866 0.32603101 1.26685116 0.07656590 [61] -0.26170791 0.68488095 0.12067259 -0.32316733 -2.11775370 0.32811949 [67] -0.29781602 -1.52346558 -1.05740937 -0.84376285 0.09097816 -0.06975132 [73] -0.41121671 0.17130834 0.71239294 -1.96877169 0.37898142 -0.11921933 [79] 0.06140685 0.93890515 0.05349666 0.90229156 0.31997406 0.91321669 [85] -1.46989794 1.34383200 0.24684471 0.24721402 0.46551955 1.27730161 [91] -0.60539735 -0.16809400 -1.35397171 0.89062933 -1.09440037 -1.60571312 [97] 0.57072121 0.24679963 -0.78216039 1.71184772 > rowMin(tmp2) [1] 0.38066999 -1.95474820 -1.93657094 -1.33862254 -0.14099144 -2.62088473 [7] 1.76644812 0.74700288 1.39477808 -0.59345388 -0.33432337 0.91703864 [13] 0.91038215 -0.44400035 1.00895051 1.02754669 -1.57743263 -1.27575559 [19] 0.63659367 0.35454321 1.46556974 -2.14684599 -0.89787060 1.93827370 [25] 1.14978622 -1.39633608 0.31650638 -1.30681140 -0.49604509 1.13977207 [31] -0.37418930 -0.70167521 -1.11389596 0.67861213 -0.64271807 0.59599406 [37] -0.86622449 0.51109033 0.98409732 1.87203099 1.66808946 0.08964315 [43] 0.63126167 -0.69502281 -0.05525410 0.18502160 0.33170856 0.19713975 [49] 1.10252183 -2.16821684 -0.26849467 -1.33034981 0.96609051 0.97729628 [55] 0.38235777 -0.34707585 0.09069866 0.32603101 1.26685116 0.07656590 [61] -0.26170791 0.68488095 0.12067259 -0.32316733 -2.11775370 0.32811949 [67] -0.29781602 -1.52346558 -1.05740937 -0.84376285 0.09097816 -0.06975132 [73] -0.41121671 0.17130834 0.71239294 -1.96877169 0.37898142 -0.11921933 [79] 0.06140685 0.93890515 0.05349666 0.90229156 0.31997406 0.91321669 [85] -1.46989794 1.34383200 0.24684471 0.24721402 0.46551955 1.27730161 [91] -0.60539735 -0.16809400 -1.35397171 0.89062933 -1.09440037 -1.60571312 [97] 0.57072121 0.24679963 -0.78216039 1.71184772 > > colMeans(tmp2) [1] -0.02333188 > colSums(tmp2) [1] -2.333188 > colVars(tmp2) [1] 1.076663 > colSd(tmp2) [1] 1.037624 > colMax(tmp2) [1] 1.938274 > colMin(tmp2) [1] -2.620885 > colMedians(tmp2) [1] 0.1058254 > colRanges(tmp2) [,1] [1,] -2.620885 [2,] 1.938274 > > 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.1899439 -0.9087329 0.9919593 -3.0102208 -3.5932420 -1.3716550 [7] -4.7300623 -0.2656433 -0.7962980 3.7246465 > colApply(tmp,quantile)[,1] [,1] [1,] -1.4268285 [2,] -1.0032265 [3,] -0.2918154 [4,] 0.7150805 [5,] 2.8042525 > > rowApply(tmp,sum) [1] -0.2661910 -1.4827327 4.6088981 -0.6629572 -0.7937774 -4.0564466 [7] -2.0157383 -2.6239736 -2.1040225 -0.7522513 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 2 4 10 1 6 6 9 3 9 8 [2,] 6 10 6 7 8 7 1 7 1 2 [3,] 9 7 1 10 7 2 6 5 5 10 [4,] 1 9 4 6 9 5 5 1 8 5 [5,] 8 3 7 2 3 1 4 4 4 7 [6,] 3 8 8 3 1 4 10 8 6 4 [7,] 4 6 5 5 5 9 3 2 2 3 [8,] 10 2 3 8 10 3 7 6 3 1 [9,] 5 1 2 9 2 10 8 9 7 6 [10,] 7 5 9 4 4 8 2 10 10 9 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 2.65009642 -2.97533055 0.81199206 -1.11541881 1.37544471 -0.32222891 [7] 0.02217624 2.29161898 2.51880638 -1.64728669 0.53794984 1.88185052 [13] 0.71822132 -0.29995337 -2.07185810 -2.06577916 -0.53803840 -1.06751533 [19] -0.40005876 -1.48209415 > colApply(tmp,quantile)[,1] [,1] [1,] -0.5267757 [2,] -0.3089268 [3,] 0.1600027 [4,] 0.8725519 [5,] 2.4532443 > > rowApply(tmp,sum) [1] 0.8103789 -6.0880597 6.8622423 -3.5070296 0.7450622 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 11 16 19 8 7 [2,] 19 1 7 15 2 [3,] 18 5 6 7 19 [4,] 2 20 12 3 12 [5,] 5 19 5 20 10 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.1600027 1.6801994 1.4849533 -1.7960716 -0.7505428 -0.6702656 [2,] 0.8725519 -3.4253446 -1.2054086 1.4194491 1.2832096 -0.1727331 [3,] 2.4532443 -0.1588187 -0.2529910 0.1764751 -0.3088066 -0.1319165 [4,] -0.5267757 0.5265781 -0.5831944 -1.0925956 1.0270504 -0.3124591 [5,] -0.3089268 -1.5979448 1.3686328 0.1773241 0.1245342 0.9651455 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.1098072 0.3860640 0.2050731 0.7182214 1.23998218 1.69840537 [2,] -0.3005869 -0.4607706 0.3034629 0.3817050 -0.40922626 0.03702655 [3,] 1.2546434 1.7997555 0.8072096 -0.8556433 -0.33332037 0.29994843 [4,] -0.6061099 0.7043025 -0.7657818 -0.1805659 0.07805780 0.89589439 [5,] -0.4355775 -0.1377324 1.9688426 -1.7110039 -0.03754351 -1.04942422 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.1143714 0.23122636 -0.2561894 -1.8235965 -0.2404357 -0.2571008 [2,] -1.3506686 1.06991222 -0.9399942 -0.4001109 -0.9465943 1.0750834 [3,] 1.3426052 0.09669323 -1.9691672 0.9682582 -0.5390389 -0.1536319 [4,] -1.2906778 -0.46943763 0.6888205 -2.0488240 1.0117660 -0.7607320 [5,] 0.9025911 -1.22834755 0.4046722 1.2384942 0.1762644 -0.9711341 [,19] [,20] [1,] -1.6253437 -0.79838119 [2,] -1.6494919 -1.26953036 [3,] 2.4592537 -0.09250992 [4,] -0.2293329 0.42698748 [5,] 0.6448560 0.25133983 > > > 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 : 648 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 : 561 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.6239786 -0.6214046 -0.07257363 -0.1383937 0.4009964 1.970621 -1.040052 col8 col9 col10 col11 col12 col13 col14 row1 -0.7817683 1.389818 1.290534 -0.7634441 0.03536589 -0.7207538 -0.05205323 col15 col16 col17 col18 col19 col20 row1 0.5401511 -0.337774 1.951649 -1.176557 -0.8972086 -0.1660805 > tmp[,"col10"] col10 row1 1.29053394 row2 -0.86425533 row3 0.78700992 row4 0.36081133 row5 0.02698476 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.6239786 -0.6214046 -0.07257363 -0.1383937 0.4009964 1.9706206 -1.040052 row5 -0.3701587 -1.2198125 -1.00388532 -0.1330810 0.3040782 0.1578437 1.005590 col8 col9 col10 col11 col12 col13 row1 -0.7817683 1.3898175 1.29053394 -0.7634441 0.03536589 -0.7207538 row5 -1.0259376 -0.1906105 0.02698476 0.5748745 -0.28741192 -0.2686860 col14 col15 col16 col17 col18 col19 col20 row1 -0.05205323 0.5401511 -0.337774 1.9516486 -1.176557 -0.8972086 -0.1660805 row5 0.61927947 -1.3904066 1.328955 0.1275907 -2.374177 -1.5301680 1.0708850 > tmp[,c("col6","col20")] col6 col20 row1 1.97062060 -0.1660805 row2 1.31245245 -1.6384879 row3 0.09405209 1.3793504 row4 0.54836805 -0.8749931 row5 0.15784369 1.0708850 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 1.9706206 -0.1660805 row5 0.1578437 1.0708850 > > > > > 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.18326 49.47739 50.17114 50.33017 51.57127 105.983 49.44286 50.39289 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.61172 50.05428 50.16759 49.64305 51.18244 50.92921 48.29832 51.41439 col17 col18 col19 col20 row1 48.30782 49.81103 50.48946 104.8684 > tmp[,"col10"] col10 row1 50.05428 row2 30.36582 row3 29.79674 row4 28.00661 row5 50.85958 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.18326 49.47739 50.17114 50.33017 51.57127 105.9830 49.44286 50.39289 row5 49.78204 48.64203 49.90775 48.64881 49.54576 104.8332 48.74249 50.83703 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.61172 50.05428 50.16759 49.64305 51.18244 50.92921 48.29832 51.41439 row5 50.25252 50.85958 48.15290 52.05939 51.33359 50.80917 50.41160 49.48696 col17 col18 col19 col20 row1 48.30782 49.81103 50.48946 104.8684 row5 51.10337 48.83905 48.91691 105.6907 > tmp[,c("col6","col20")] col6 col20 row1 105.98302 104.86842 row2 75.74149 76.06222 row3 75.09875 76.02597 row4 74.63940 75.30362 row5 104.83320 105.69073 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.9830 104.8684 row5 104.8332 105.6907 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.9830 104.8684 row5 104.8332 105.6907 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.6791324 [2,] 1.7335538 [3,] -0.2223798 [4,] 0.7248886 [5,] -0.6617873 > tmp[,c("col17","col7")] col17 col7 [1,] -1.2619141 -1.22416828 [2,] -0.1285925 0.73907471 [3,] 0.6171386 -0.09390498 [4,] -1.2457072 -0.45904504 [5,] -0.9249009 -1.43406807 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.5261712 -1.0107197 [2,] 0.6658933 0.2232846 [3,] 0.8237389 -1.2800828 [4,] -1.6981545 0.0448108 [5,] -1.1407813 0.3432418 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.526171 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.5261712 [2,] 0.6658933 > > > > 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.000170 -0.5062321 -0.4034218 -1.2277974 0.2558648 -1.8841190 0.9131022 row1 -1.977145 -0.6967300 -1.1993212 0.6628813 0.8961636 0.4392359 1.0427184 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 0.1141719 1.372443 -0.4856677 -0.9757864 0.2748075 -1.20320864 -0.6208528 row1 1.1166681 1.652794 0.1094602 0.6676244 -0.0109453 -0.04473655 0.6118486 [,15] [,16] [,17] [,18] [,19] [,20] row3 0.3739491 0.4379625 -0.6932305 0.2584848 0.2199855 0.6904297 row1 -1.1808591 0.4122218 -0.4530718 -0.6338624 -1.4829314 -2.5563392 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.3474596 -1.478382 0.5240682 -0.502532 -1.478707 -0.134884 1.648732 [,8] [,9] [,10] row2 -0.4903966 -1.28884 0.9757376 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -1.450432 0.9240191 0.2099492 0.164139 -0.9880902 -0.1749655 -1.281585 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.3505996 0.6831447 -0.8982873 0.6071888 -0.8983083 -0.8846998 0.9553026 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.524266 1.363057 0.7045409 -0.4270809 -1.681951 -1.071188 > > > 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: 0x1681cce0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb2313ac7341" [2] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb234bc0eff5" [3] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb2317ef4a75" [4] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb235d2cdbbd" [5] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb2365c64e1e" [6] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb23454a220b" [7] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb2342725ef" [8] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb232724fa3a" [9] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb235a0a7910" [10] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb23b3ed6dc" [11] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb234e341732" [12] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb23394731a6" [13] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb23337b9322" [14] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb2317d4b6fd" [15] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BMaeb231a5dfcd7" > > > ### 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: 0x163e73f0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x163e73f0> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x163e73f0> > rowMedians(tmp) [1] 0.2572454464 0.1840709134 0.1980072131 0.0004633484 -0.1651193533 [6] 0.1132861738 0.4544983570 0.3147452745 -0.0531576990 -0.4845062068 [11] 0.2289195627 0.1417594205 -0.2066459386 -0.4795693576 0.3574836281 [16] 0.2181727185 -0.6570145404 -0.2338702732 -0.2812607948 0.0820088673 [21] -0.4364546249 -0.4140631259 0.0081552117 0.1131489589 0.1761650692 [26] -0.3341230467 0.1900462159 -0.0124096210 0.1649325169 -0.4795067497 [31] -0.5208782311 -0.4124334102 -0.0867183188 0.1734120170 0.5734181343 [36] 0.5274560038 0.2077606250 -0.3116143410 0.1137249825 -0.4067850451 [41] 0.1254629849 0.0700263632 0.2124253784 -0.1590477470 -0.6171017150 [46] 0.2854750706 -0.2942435966 0.1733022913 -0.0256555911 -0.2446270856 [51] -0.2062448747 0.7494248219 0.3951262228 -0.0116795179 0.0103712793 [56] -0.0744996076 0.2692526546 0.2960781281 0.3340242053 -0.2247898221 [61] -0.0239277550 0.2456529996 0.0426274376 0.3296657973 0.0795011043 [66] -0.1420003843 0.3495277195 -0.6014597113 -0.4396822567 0.0556779406 [71] 0.3906189734 -0.4217015461 -0.3524313789 -0.4603424653 -0.1546249149 [76] 0.2225367315 0.2271742861 0.5022627894 0.4254058630 0.0135097385 [81] 0.1596314753 -0.0866309336 -0.4154701581 0.0986376128 0.4653245966 [86] 0.0700659891 -0.4160299851 -0.2796820057 -0.4433290142 0.5071301117 [91] 0.2836684600 0.6054519614 -0.2406231795 0.0432418021 -0.2114201361 [96] -0.6816671465 0.1182991165 -0.1603050380 -0.2508677926 0.3445811373 [101] 0.2307719622 0.3200721154 -0.5148283101 0.4663604876 -0.5183583886 [106] -0.2728035222 -0.3035902342 0.2781743920 -0.2928210697 -0.0586995580 [111] 0.1894182990 -0.4865172425 -0.2459658234 -0.5374760676 0.2730236094 [116] -0.1638294871 0.3837615964 0.1929817354 -0.2576446923 0.2200920421 [121] -0.3028467264 0.4057303643 0.2892495179 -0.1617701465 -0.2892817118 [126] -0.2491033259 -0.4181471435 -0.3182719390 0.2365644805 0.2936423256 [131] 0.3683870293 0.2944329366 -0.2811178098 0.1038322420 0.7221436326 [136] 0.2681584358 0.3408928673 0.1281290867 0.4415073673 0.1633031400 [141] -0.2153039452 0.8691986651 -0.6805818685 -0.1201767674 0.2688029068 [146] -0.0169225330 0.6377057591 -0.1624045967 0.4116621332 -0.1962265561 [151] 0.1633528128 -0.3946825296 -0.1417196836 -0.2553302451 0.2166798856 [156] 0.1534645406 -0.0315799463 -0.3247262497 0.2849356235 0.2745109381 [161] -0.0859724524 -0.7988271062 -0.1711133243 -0.1080909429 -0.2935937405 [166] 0.3034631518 0.1580319699 -0.8504547479 0.0656540077 -0.2495057152 [171] 0.4693907430 0.1708642222 0.6727784871 0.0888952704 0.0628950374 [176] 0.3718012150 -0.1751075880 0.4596104035 -0.0961427551 -0.1260963000 [181] 0.1431998312 0.5953988738 0.0471576430 -0.1148732659 -0.0885123653 [186] -0.3182340267 0.1527649344 -0.1105216916 0.2931802350 0.0581057803 [191] 0.3856535335 0.5009320212 0.2927411273 -0.3518746131 -0.0116447154 [196] 0.3075642502 -0.1383358350 0.0614704126 -0.1582601805 -0.0010284672 [201] 0.0621964067 -0.0784773805 -0.0159580742 0.3651085759 -0.8510186941 [206] -0.1623934105 0.1324342942 -0.1280453362 -0.0104314600 0.1002257780 [211] -0.2029640211 -0.6754798165 -0.4085476849 -0.2008220429 -0.2315016394 [216] -0.6173276166 0.3584963850 -0.2781379336 -0.0037085111 0.0588772566 [221] 0.1093153686 0.3674287721 0.1055703487 0.0862734670 0.2881213341 [226] 0.2186824900 -0.2084869064 0.3340371793 -0.5789617552 0.2245450063 > > proc.time() user system elapsed 2.068 0.944 2.943
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.1 (2024-06-14) -- "Race for Your Life" 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: 0x3bd099f0> > .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: 0x3bd099f0> > .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: 0x3bd099f0> > .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: 0x3bd099f0> > 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: 0x3a3a84b0> > .Call("R_bm_AddColumn",P) <pointer: 0x3a3a84b0> > .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: 0x3a3a84b0> > .Call("R_bm_AddColumn",P) <pointer: 0x3a3a84b0> > .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: 0x3a3a84b0> > 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: 0x3a3e5070> > .Call("R_bm_AddColumn",P) <pointer: 0x3a3e5070> > .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: 0x3a3e5070> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x3a3e5070> > .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: 0x3a3e5070> > > .Call("R_bm_RowMode",P) <pointer: 0x3a3e5070> > .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: 0x3a3e5070> > > .Call("R_bm_ColMode",P) <pointer: 0x3a3e5070> > .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: 0x3a3e5070> > 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: 0x3b9a0470> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x3b9a0470> > .Call("R_bm_AddColumn",P) <pointer: 0x3b9a0470> > .Call("R_bm_AddColumn",P) <pointer: 0x3b9a0470> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFileaecd31289769f" "BufferedMatrixFileaecd3c2f7b6f" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFileaecd31289769f" "BufferedMatrixFileaecd3c2f7b6f" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x3b578c80> > .Call("R_bm_AddColumn",P) <pointer: 0x3b578c80> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x3b578c80> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x3b578c80> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x3b578c80> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x3b578c80> > .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: 0x3b57b460> > .Call("R_bm_AddColumn",P) <pointer: 0x3b57b460> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x3b57b460> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x3b57b460> > 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: 0x3a8e9bf0> > .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: 0x3a8e9bf0> > rm(P) > > proc.time() user system elapsed 0.398 0.057 0.354
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.1 (2024-06-14) -- "Race for Your Life" 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.420 0.022 0.343