Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2024-11-20 12:07 -0500 (Wed, 20 Nov 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
teran2 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4481 |
nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4479 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.2 (2024-10-31 ucrt) -- "Pile of Leaves" | 4359 |
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-20 05:49:05 -0000 (Wed, 20 Nov 2024) |
EndedAt: 2024-11-20 05:49:37 -0000 (Wed, 20 Nov 2024) |
EllapsedTime: 32.1 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.419 0.032 0.350
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] "Wed Nov 20 05:49: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] "Wed Nov 20 05:49: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: 0x3ebee9f0> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Wed Nov 20 05:49: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] "Wed Nov 20 05:49:32 2024" > > ColMode(tmp2) <pointer: 0x3ebee9f0> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.2905929 -0.8832994 -0.7604273 0.916547 [2,] -0.2888511 -1.1312297 0.7444777 1.046633 [3,] -1.3763878 -1.7962369 0.2650359 1.350070 [4,] -0.5467097 -0.9641428 -0.5013125 0.413524 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.2905929 0.8832994 0.7604273 0.916547 [2,] 0.2888511 1.1312297 0.7444777 1.046633 [3,] 1.3763878 1.7962369 0.2650359 1.350070 [4,] 0.5467097 0.9641428 0.5013125 0.413524 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9644665 0.9398401 0.8720248 0.9573646 [2,] 0.5374487 1.0635928 0.8628312 1.0230508 [3,] 1.1731955 1.3402376 0.5148163 1.1619253 [4,] 0.7393982 0.9819078 0.7080342 0.6430583 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 223.93526 35.28170 34.48068 35.49019 [2,] 30.66334 36.76716 34.37279 36.27714 [3,] 38.10834 40.19861 30.41320 37.96932 [4,] 32.94069 35.78322 32.58165 31.84411 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x3d5763e0> > exp(tmp5) <pointer: 0x3d5763e0> > log(tmp5,2) <pointer: 0x3d5763e0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.0919 > Min(tmp5) [1] 52.81046 > mean(tmp5) [1] 73.6383 > Sum(tmp5) [1] 14727.66 > Var(tmp5) [1] 845.8018 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 94.62058 70.18935 70.99442 69.60898 69.22124 71.89118 71.95455 70.75421 [9] 76.11504 71.03348 > rowSums(tmp5) [1] 1892.412 1403.787 1419.888 1392.180 1384.425 1437.824 1439.091 1415.084 [9] 1522.301 1420.670 > rowVars(tmp5) [1] 7746.22623 32.48643 64.19320 55.25748 67.88923 81.66810 [7] 67.13478 66.33552 44.04465 83.93941 > rowSd(tmp5) [1] 88.012648 5.699687 8.012066 7.433537 8.239492 9.037041 8.193581 [8] 8.144662 6.636615 9.161845 > rowMax(tmp5) [1] 466.09190 80.04279 83.66815 82.22713 89.40940 92.80933 88.06321 [8] 84.02949 90.08150 90.71483 > rowMin(tmp5) [1] 58.23872 59.77900 57.06614 54.19412 55.92458 56.34393 59.84559 56.41978 [9] 62.18306 52.81046 > > colMeans(tmp5) [1] 109.76846 72.55249 70.35491 74.88862 73.98392 71.95547 70.72882 [8] 72.18118 70.58424 71.37214 75.79450 74.09211 70.20626 69.46826 [15] 70.15261 72.30738 68.70739 68.45448 72.37031 72.84251 > colSums(tmp5) [1] 1097.6846 725.5249 703.5491 748.8862 739.8392 719.5547 707.2882 [8] 721.8118 705.8424 713.7214 757.9450 740.9211 702.0626 694.6826 [15] 701.5261 723.0738 687.0739 684.5448 723.7031 728.4251 > colVars(tmp5) [1] 15706.86808 38.40345 33.71991 60.62328 106.69463 78.87016 [7] 129.54104 99.57152 54.34912 94.18430 116.72819 119.53583 [13] 46.73835 32.34312 48.79969 95.80380 41.18991 57.05395 [19] 64.51348 66.88047 > colSd(tmp5) [1] 125.327044 6.197052 5.806885 7.786095 10.329309 8.880887 [7] 11.381610 9.978553 7.372185 9.704860 10.804082 10.933244 [13] 6.836545 5.687101 6.985677 9.787941 6.417936 7.553406 [19] 8.032028 8.178048 > colMax(tmp5) [1] 466.09190 83.66815 82.85201 83.78926 90.71483 82.73720 90.08150 [8] 83.00300 80.94796 92.80933 89.40940 88.06321 76.91378 77.85044 [15] 82.22713 95.60049 78.98474 80.67659 82.04391 80.87262 > colMin(tmp5) [1] 58.99060 63.61229 62.82182 59.51808 55.92458 56.41978 57.28961 54.19412 [9] 59.97045 59.84559 60.40811 52.81046 56.34393 59.69757 59.51399 59.77900 [17] 61.01061 57.91277 58.83305 58.23872 > > > ### 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] 94.62058 70.18935 70.99442 69.60898 69.22124 71.89118 71.95455 NA [9] 76.11504 71.03348 > rowSums(tmp5) [1] 1892.412 1403.787 1419.888 1392.180 1384.425 1437.824 1439.091 NA [9] 1522.301 1420.670 > rowVars(tmp5) [1] 7746.22623 32.48643 64.19320 55.25748 67.88923 81.66810 [7] 67.13478 63.94406 44.04465 83.93941 > rowSd(tmp5) [1] 88.012648 5.699687 8.012066 7.433537 8.239492 9.037041 8.193581 [8] 7.996503 6.636615 9.161845 > rowMax(tmp5) [1] 466.09190 80.04279 83.66815 82.22713 89.40940 92.80933 88.06321 [8] NA 90.08150 90.71483 > rowMin(tmp5) [1] 58.23872 59.77900 57.06614 54.19412 55.92458 56.34393 59.84559 NA [9] 62.18306 52.81046 > > colMeans(tmp5) [1] 109.76846 72.55249 70.35491 74.88862 73.98392 71.95547 70.72882 [8] 72.18118 NA 71.37214 75.79450 74.09211 70.20626 69.46826 [15] 70.15261 72.30738 68.70739 68.45448 72.37031 72.84251 > colSums(tmp5) [1] 1097.6846 725.5249 703.5491 748.8862 739.8392 719.5547 707.2882 [8] 721.8118 NA 713.7214 757.9450 740.9211 702.0626 694.6826 [15] 701.5261 723.0738 687.0739 684.5448 723.7031 728.4251 > colVars(tmp5) [1] 15706.86808 38.40345 33.71991 60.62328 106.69463 78.87016 [7] 129.54104 99.57152 NA 94.18430 116.72819 119.53583 [13] 46.73835 32.34312 48.79969 95.80380 41.18991 57.05395 [19] 64.51348 66.88047 > colSd(tmp5) [1] 125.327044 6.197052 5.806885 7.786095 10.329309 8.880887 [7] 11.381610 9.978553 NA 9.704860 10.804082 10.933244 [13] 6.836545 5.687101 6.985677 9.787941 6.417936 7.553406 [19] 8.032028 8.178048 > colMax(tmp5) [1] 466.09190 83.66815 82.85201 83.78926 90.71483 82.73720 90.08150 [8] 83.00300 NA 92.80933 89.40940 88.06321 76.91378 77.85044 [15] 82.22713 95.60049 78.98474 80.67659 82.04391 80.87262 > colMin(tmp5) [1] 58.99060 63.61229 62.82182 59.51808 55.92458 56.41978 57.28961 54.19412 [9] NA 59.84559 60.40811 52.81046 56.34393 59.69757 59.51399 59.77900 [17] 61.01061 57.91277 58.83305 58.23872 > > Max(tmp5,na.rm=TRUE) [1] 466.0919 > Min(tmp5,na.rm=TRUE) [1] 52.81046 > mean(tmp5,na.rm=TRUE) [1] 73.60157 > Sum(tmp5,na.rm=TRUE) [1] 14646.71 > Var(tmp5,na.rm=TRUE) [1] 849.8023 > > rowMeans(tmp5,na.rm=TRUE) [1] 94.62058 70.18935 70.99442 69.60898 69.22124 71.89118 71.95455 70.21770 [9] 76.11504 71.03348 > rowSums(tmp5,na.rm=TRUE) [1] 1892.412 1403.787 1419.888 1392.180 1384.425 1437.824 1439.091 1334.136 [9] 1522.301 1420.670 > rowVars(tmp5,na.rm=TRUE) [1] 7746.22623 32.48643 64.19320 55.25748 67.88923 81.66810 [7] 67.13478 63.94406 44.04465 83.93941 > rowSd(tmp5,na.rm=TRUE) [1] 88.012648 5.699687 8.012066 7.433537 8.239492 9.037041 8.193581 [8] 7.996503 6.636615 9.161845 > rowMax(tmp5,na.rm=TRUE) [1] 466.09190 80.04279 83.66815 82.22713 89.40940 92.80933 88.06321 [8] 84.02949 90.08150 90.71483 > rowMin(tmp5,na.rm=TRUE) [1] 58.23872 59.77900 57.06614 54.19412 55.92458 56.34393 59.84559 56.41978 [9] 62.18306 52.81046 > > colMeans(tmp5,na.rm=TRUE) [1] 109.76846 72.55249 70.35491 74.88862 73.98392 71.95547 70.72882 [8] 72.18118 69.43271 71.37214 75.79450 74.09211 70.20626 69.46826 [15] 70.15261 72.30738 68.70739 68.45448 72.37031 72.84251 > colSums(tmp5,na.rm=TRUE) [1] 1097.6846 725.5249 703.5491 748.8862 739.8392 719.5547 707.2882 [8] 721.8118 624.8944 713.7214 757.9450 740.9211 702.0626 694.6826 [15] 701.5261 723.0738 687.0739 684.5448 723.7031 728.4251 > colVars(tmp5,na.rm=TRUE) [1] 15706.86808 38.40345 33.71991 60.62328 106.69463 78.87016 [7] 129.54104 99.57152 46.22514 94.18430 116.72819 119.53583 [13] 46.73835 32.34312 48.79969 95.80380 41.18991 57.05395 [19] 64.51348 66.88047 > colSd(tmp5,na.rm=TRUE) [1] 125.327044 6.197052 5.806885 7.786095 10.329309 8.880887 [7] 11.381610 9.978553 6.798908 9.704860 10.804082 10.933244 [13] 6.836545 5.687101 6.985677 9.787941 6.417936 7.553406 [19] 8.032028 8.178048 > colMax(tmp5,na.rm=TRUE) [1] 466.09190 83.66815 82.85201 83.78926 90.71483 82.73720 90.08150 [8] 83.00300 79.59812 92.80933 89.40940 88.06321 76.91378 77.85044 [15] 82.22713 95.60049 78.98474 80.67659 82.04391 80.87262 > colMin(tmp5,na.rm=TRUE) [1] 58.99060 63.61229 62.82182 59.51808 55.92458 56.41978 57.28961 54.19412 [9] 59.97045 59.84559 60.40811 52.81046 56.34393 59.69757 59.51399 59.77900 [17] 61.01061 57.91277 58.83305 58.23872 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 94.62058 70.18935 70.99442 69.60898 69.22124 71.89118 71.95455 NaN [9] 76.11504 71.03348 > rowSums(tmp5,na.rm=TRUE) [1] 1892.412 1403.787 1419.888 1392.180 1384.425 1437.824 1439.091 0.000 [9] 1522.301 1420.670 > rowVars(tmp5,na.rm=TRUE) [1] 7746.22623 32.48643 64.19320 55.25748 67.88923 81.66810 [7] 67.13478 NA 44.04465 83.93941 > rowSd(tmp5,na.rm=TRUE) [1] 88.012648 5.699687 8.012066 7.433537 8.239492 9.037041 8.193581 [8] NA 6.636615 9.161845 > rowMax(tmp5,na.rm=TRUE) [1] 466.09190 80.04279 83.66815 82.22713 89.40940 92.80933 88.06321 [8] NA 90.08150 90.71483 > rowMin(tmp5,na.rm=TRUE) [1] 58.23872 59.77900 57.06614 54.19412 55.92458 56.34393 59.84559 NA [9] 62.18306 52.81046 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 114.20335 72.37625 71.19193 76.59645 73.93763 73.68166 71.40679 [8] 71.45224 NaN 72.32295 76.26120 72.98795 70.91805 69.72559 [15] 69.22505 72.13314 69.56258 68.16279 71.41656 72.18028 > colSums(tmp5,na.rm=TRUE) [1] 1027.8301 651.3862 640.7273 689.3681 665.4387 663.1349 642.6611 [8] 643.0701 0.0000 650.9066 686.3508 656.8916 638.2624 627.5303 [15] 623.0255 649.1983 626.0633 613.4651 642.7490 649.6226 > colVars(tmp5,na.rm=TRUE) [1] 17448.95895 42.85446 30.05329 35.38823 120.00735 55.20701 [7] 140.56269 106.04014 NA 95.78673 128.86889 120.76230 [13] 46.88095 35.64107 45.22056 107.43775 38.11082 63.22846 [19] 62.34411 70.30692 > colSd(tmp5,na.rm=TRUE) [1] 132.094508 6.546332 5.482089 5.948800 10.954787 7.430142 [7] 11.855914 10.297580 NA 9.787069 11.352044 10.989190 [13] 6.846967 5.970014 6.724623 10.365218 6.173396 7.951632 [19] 7.895829 8.384922 > colMax(tmp5,na.rm=TRUE) [1] 466.09190 83.66815 82.85201 83.78926 90.71483 82.73720 90.08150 [8] 83.00300 -Inf 92.80933 89.40940 88.06321 76.91378 77.85044 [15] 82.22713 95.60049 78.98474 80.67659 82.04391 80.87262 > colMin(tmp5,na.rm=TRUE) [1] 58.99060 63.61229 63.30109 66.27934 55.92458 60.26020 57.28961 54.19412 [9] Inf 59.84559 60.40811 52.81046 56.34393 59.69757 59.51399 59.77900 [17] 62.18306 57.91277 58.83305 58.23872 > > > > > 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] 227.8803 156.2599 177.6152 146.5779 261.9212 150.8734 226.1175 243.2069 [9] 128.3908 138.9082 > apply(copymatrix,1,var,na.rm=TRUE) [1] 227.8803 156.2599 177.6152 146.5779 261.9212 150.8734 226.1175 243.2069 [9] 128.3908 138.9082 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 0.000000e+00 -8.526513e-14 -1.705303e-13 2.842171e-14 -7.105427e-14 [6] 0.000000e+00 5.684342e-14 -2.273737e-13 1.989520e-13 2.273737e-13 [11] 8.526513e-14 -5.684342e-14 -1.136868e-13 1.136868e-13 1.705303e-13 [16] -8.526513e-14 -2.842171e-14 1.136868e-13 -8.526513e-14 1.421085e-13 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 10 9 4 7 8 10 6 12 5 7 9 4 9 1 9 17 7 17 7 20 3 9 7 20 2 11 4 10 1 14 1 19 6 3 4 10 3 6 4 14 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 2.813666 > Min(tmp) [1] -2.573187 > mean(tmp) [1] -0.06838047 > Sum(tmp) [1] -6.838047 > Var(tmp) [1] 1.157406 > > rowMeans(tmp) [1] -0.06838047 > rowSums(tmp) [1] -6.838047 > rowVars(tmp) [1] 1.157406 > rowSd(tmp) [1] 1.075828 > rowMax(tmp) [1] 2.813666 > rowMin(tmp) [1] -2.573187 > > colMeans(tmp) [1] 0.832267141 0.135933582 -1.024075151 2.813666423 -0.545759742 [6] 0.343509456 -0.807995160 0.472985394 -2.158642527 1.308745509 [11] 0.688312894 0.890570369 -0.597017198 0.847902715 -0.824709398 [16] -0.358343856 0.058474890 -0.393978129 -0.420422983 0.146608894 [21] 1.638590676 0.658825636 1.123841109 0.063677081 -1.909734852 [26] 0.176042196 0.071547471 -1.689983516 -0.577383486 -0.065267326 [31] 2.774633186 0.968605954 1.251750881 -0.438741418 -1.847030185 [36] -1.932644871 -1.230686131 -0.343741869 -0.689374196 0.495297500 [41] 2.502232657 -0.930923691 0.318472156 1.205763871 0.699267079 [46] 0.599625441 -0.547323787 -0.758845447 0.811461171 1.252547801 [51] 0.031269535 -0.952815618 -0.090935912 -0.016846909 -1.374688484 [56] 0.400486540 -1.033121263 -1.205900197 -0.837304279 0.129029323 [61] 0.080247477 2.805586171 -0.441414018 -0.079174026 -0.423727844 [66] 0.601051244 -1.096636070 -0.168194646 0.979465582 -2.152116660 [71] -0.314487352 -0.850973205 -1.521595480 0.442885389 -0.456868828 [76] -1.584608817 -0.434643133 0.320528062 -1.096565836 0.993461625 [81] 1.339100459 -0.547283531 0.448695303 -0.660640432 1.634851797 [86] 0.867731937 -0.271193044 -0.775079583 -0.395800975 -2.573187431 [91] 0.961966764 -0.425883120 0.719083294 -1.167072401 -0.852513051 [96] -0.008124531 0.407180342 0.115708293 -1.629274832 0.263760684 > colSums(tmp) [1] 0.832267141 0.135933582 -1.024075151 2.813666423 -0.545759742 [6] 0.343509456 -0.807995160 0.472985394 -2.158642527 1.308745509 [11] 0.688312894 0.890570369 -0.597017198 0.847902715 -0.824709398 [16] -0.358343856 0.058474890 -0.393978129 -0.420422983 0.146608894 [21] 1.638590676 0.658825636 1.123841109 0.063677081 -1.909734852 [26] 0.176042196 0.071547471 -1.689983516 -0.577383486 -0.065267326 [31] 2.774633186 0.968605954 1.251750881 -0.438741418 -1.847030185 [36] -1.932644871 -1.230686131 -0.343741869 -0.689374196 0.495297500 [41] 2.502232657 -0.930923691 0.318472156 1.205763871 0.699267079 [46] 0.599625441 -0.547323787 -0.758845447 0.811461171 1.252547801 [51] 0.031269535 -0.952815618 -0.090935912 -0.016846909 -1.374688484 [56] 0.400486540 -1.033121263 -1.205900197 -0.837304279 0.129029323 [61] 0.080247477 2.805586171 -0.441414018 -0.079174026 -0.423727844 [66] 0.601051244 -1.096636070 -0.168194646 0.979465582 -2.152116660 [71] -0.314487352 -0.850973205 -1.521595480 0.442885389 -0.456868828 [76] -1.584608817 -0.434643133 0.320528062 -1.096565836 0.993461625 [81] 1.339100459 -0.547283531 0.448695303 -0.660640432 1.634851797 [86] 0.867731937 -0.271193044 -0.775079583 -0.395800975 -2.573187431 [91] 0.961966764 -0.425883120 0.719083294 -1.167072401 -0.852513051 [96] -0.008124531 0.407180342 0.115708293 -1.629274832 0.263760684 > 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.832267141 0.135933582 -1.024075151 2.813666423 -0.545759742 [6] 0.343509456 -0.807995160 0.472985394 -2.158642527 1.308745509 [11] 0.688312894 0.890570369 -0.597017198 0.847902715 -0.824709398 [16] -0.358343856 0.058474890 -0.393978129 -0.420422983 0.146608894 [21] 1.638590676 0.658825636 1.123841109 0.063677081 -1.909734852 [26] 0.176042196 0.071547471 -1.689983516 -0.577383486 -0.065267326 [31] 2.774633186 0.968605954 1.251750881 -0.438741418 -1.847030185 [36] -1.932644871 -1.230686131 -0.343741869 -0.689374196 0.495297500 [41] 2.502232657 -0.930923691 0.318472156 1.205763871 0.699267079 [46] 0.599625441 -0.547323787 -0.758845447 0.811461171 1.252547801 [51] 0.031269535 -0.952815618 -0.090935912 -0.016846909 -1.374688484 [56] 0.400486540 -1.033121263 -1.205900197 -0.837304279 0.129029323 [61] 0.080247477 2.805586171 -0.441414018 -0.079174026 -0.423727844 [66] 0.601051244 -1.096636070 -0.168194646 0.979465582 -2.152116660 [71] -0.314487352 -0.850973205 -1.521595480 0.442885389 -0.456868828 [76] -1.584608817 -0.434643133 0.320528062 -1.096565836 0.993461625 [81] 1.339100459 -0.547283531 0.448695303 -0.660640432 1.634851797 [86] 0.867731937 -0.271193044 -0.775079583 -0.395800975 -2.573187431 [91] 0.961966764 -0.425883120 0.719083294 -1.167072401 -0.852513051 [96] -0.008124531 0.407180342 0.115708293 -1.629274832 0.263760684 > colMin(tmp) [1] 0.832267141 0.135933582 -1.024075151 2.813666423 -0.545759742 [6] 0.343509456 -0.807995160 0.472985394 -2.158642527 1.308745509 [11] 0.688312894 0.890570369 -0.597017198 0.847902715 -0.824709398 [16] -0.358343856 0.058474890 -0.393978129 -0.420422983 0.146608894 [21] 1.638590676 0.658825636 1.123841109 0.063677081 -1.909734852 [26] 0.176042196 0.071547471 -1.689983516 -0.577383486 -0.065267326 [31] 2.774633186 0.968605954 1.251750881 -0.438741418 -1.847030185 [36] -1.932644871 -1.230686131 -0.343741869 -0.689374196 0.495297500 [41] 2.502232657 -0.930923691 0.318472156 1.205763871 0.699267079 [46] 0.599625441 -0.547323787 -0.758845447 0.811461171 1.252547801 [51] 0.031269535 -0.952815618 -0.090935912 -0.016846909 -1.374688484 [56] 0.400486540 -1.033121263 -1.205900197 -0.837304279 0.129029323 [61] 0.080247477 2.805586171 -0.441414018 -0.079174026 -0.423727844 [66] 0.601051244 -1.096636070 -0.168194646 0.979465582 -2.152116660 [71] -0.314487352 -0.850973205 -1.521595480 0.442885389 -0.456868828 [76] -1.584608817 -0.434643133 0.320528062 -1.096565836 0.993461625 [81] 1.339100459 -0.547283531 0.448695303 -0.660640432 1.634851797 [86] 0.867731937 -0.271193044 -0.775079583 -0.395800975 -2.573187431 [91] 0.961966764 -0.425883120 0.719083294 -1.167072401 -0.852513051 [96] -0.008124531 0.407180342 0.115708293 -1.629274832 0.263760684 > colMedians(tmp) [1] 0.832267141 0.135933582 -1.024075151 2.813666423 -0.545759742 [6] 0.343509456 -0.807995160 0.472985394 -2.158642527 1.308745509 [11] 0.688312894 0.890570369 -0.597017198 0.847902715 -0.824709398 [16] -0.358343856 0.058474890 -0.393978129 -0.420422983 0.146608894 [21] 1.638590676 0.658825636 1.123841109 0.063677081 -1.909734852 [26] 0.176042196 0.071547471 -1.689983516 -0.577383486 -0.065267326 [31] 2.774633186 0.968605954 1.251750881 -0.438741418 -1.847030185 [36] -1.932644871 -1.230686131 -0.343741869 -0.689374196 0.495297500 [41] 2.502232657 -0.930923691 0.318472156 1.205763871 0.699267079 [46] 0.599625441 -0.547323787 -0.758845447 0.811461171 1.252547801 [51] 0.031269535 -0.952815618 -0.090935912 -0.016846909 -1.374688484 [56] 0.400486540 -1.033121263 -1.205900197 -0.837304279 0.129029323 [61] 0.080247477 2.805586171 -0.441414018 -0.079174026 -0.423727844 [66] 0.601051244 -1.096636070 -0.168194646 0.979465582 -2.152116660 [71] -0.314487352 -0.850973205 -1.521595480 0.442885389 -0.456868828 [76] -1.584608817 -0.434643133 0.320528062 -1.096565836 0.993461625 [81] 1.339100459 -0.547283531 0.448695303 -0.660640432 1.634851797 [86] 0.867731937 -0.271193044 -0.775079583 -0.395800975 -2.573187431 [91] 0.961966764 -0.425883120 0.719083294 -1.167072401 -0.852513051 [96] -0.008124531 0.407180342 0.115708293 -1.629274832 0.263760684 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.8322671 0.1359336 -1.024075 2.813666 -0.5457597 0.3435095 -0.8079952 [2,] 0.8322671 0.1359336 -1.024075 2.813666 -0.5457597 0.3435095 -0.8079952 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.4729854 -2.158643 1.308746 0.6883129 0.8905704 -0.5970172 0.8479027 [2,] 0.4729854 -2.158643 1.308746 0.6883129 0.8905704 -0.5970172 0.8479027 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.8247094 -0.3583439 0.05847489 -0.3939781 -0.420423 0.1466089 1.638591 [2,] -0.8247094 -0.3583439 0.05847489 -0.3939781 -0.420423 0.1466089 1.638591 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.6588256 1.123841 0.06367708 -1.909735 0.1760422 0.07154747 -1.689984 [2,] 0.6588256 1.123841 0.06367708 -1.909735 0.1760422 0.07154747 -1.689984 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.5773835 -0.06526733 2.774633 0.968606 1.251751 -0.4387414 -1.84703 [2,] -0.5773835 -0.06526733 2.774633 0.968606 1.251751 -0.4387414 -1.84703 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.932645 -1.230686 -0.3437419 -0.6893742 0.4952975 2.502233 -0.9309237 [2,] -1.932645 -1.230686 -0.3437419 -0.6893742 0.4952975 2.502233 -0.9309237 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.3184722 1.205764 0.6992671 0.5996254 -0.5473238 -0.7588454 0.8114612 [2,] 0.3184722 1.205764 0.6992671 0.5996254 -0.5473238 -0.7588454 0.8114612 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.252548 0.03126953 -0.9528156 -0.09093591 -0.01684691 -1.374688 0.4004865 [2,] 1.252548 0.03126953 -0.9528156 -0.09093591 -0.01684691 -1.374688 0.4004865 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.033121 -1.2059 -0.8373043 0.1290293 0.08024748 2.805586 -0.441414 [2,] -1.033121 -1.2059 -0.8373043 0.1290293 0.08024748 2.805586 -0.441414 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.07917403 -0.4237278 0.6010512 -1.096636 -0.1681946 0.9794656 -2.152117 [2,] -0.07917403 -0.4237278 0.6010512 -1.096636 -0.1681946 0.9794656 -2.152117 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.3144874 -0.8509732 -1.521595 0.4428854 -0.4568688 -1.584609 -0.4346431 [2,] -0.3144874 -0.8509732 -1.521595 0.4428854 -0.4568688 -1.584609 -0.4346431 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.3205281 -1.096566 0.9934616 1.3391 -0.5472835 0.4486953 -0.6606404 [2,] 0.3205281 -1.096566 0.9934616 1.3391 -0.5472835 0.4486953 -0.6606404 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 1.634852 0.8677319 -0.271193 -0.7750796 -0.395801 -2.573187 0.9619668 [2,] 1.634852 0.8677319 -0.271193 -0.7750796 -0.395801 -2.573187 0.9619668 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.4258831 0.7190833 -1.167072 -0.8525131 -0.008124531 0.4071803 0.1157083 [2,] -0.4258831 0.7190833 -1.167072 -0.8525131 -0.008124531 0.4071803 0.1157083 [,99] [,100] [1,] -1.629275 0.2637607 [2,] -1.629275 0.2637607 > > > Max(tmp2) [1] 1.98831 > Min(tmp2) [1] -2.712126 > mean(tmp2) [1] 0.2064611 > Sum(tmp2) [1] 20.64611 > Var(tmp2) [1] 0.8858582 > > rowMeans(tmp2) [1] 1.98831047 -0.96786037 1.04879413 -0.37272622 0.07438872 -1.31971703 [7] -0.18455369 -0.46059890 -0.29720415 -0.89746606 0.08344840 1.19483804 [13] 0.92860397 0.62346443 1.23583406 0.13230191 0.16443731 0.75371133 [19] 0.18063141 -0.07363024 -0.80954839 -0.34157064 -1.53178695 0.45849652 [25] 0.86360086 1.05660909 1.96958618 -0.53743784 -1.62362440 -0.95631311 [31] -0.04590693 -0.24154172 0.22520643 -0.82609156 1.32139054 0.81105489 [37] -0.67821136 1.86206819 1.20060311 -2.71212594 0.14523897 -0.77636495 [43] -0.08800637 0.48302345 1.34983850 0.45080140 1.53047326 0.08448704 [49] -0.24321170 0.71139205 0.84829227 1.47508562 0.95761775 -0.71984232 [55] -0.60227866 0.87783861 0.21322071 1.53685407 -1.22154825 1.19754164 [61] -0.16197302 1.28151511 -0.30524196 0.51705326 0.31718998 1.41919196 [67] -0.25844118 -0.45582705 0.39305959 0.96211905 1.26138370 1.56606254 [73] 0.27992469 -0.45345016 -0.13949114 0.30631575 0.11020556 -0.23109584 [79] 0.77277808 0.33999040 0.02168560 -0.15473398 0.08019417 0.23923719 [85] 0.29515304 -0.57773523 1.89074862 1.75864534 0.17991568 -1.70997185 [91] 1.51259619 -1.23891412 -0.10754496 1.45949248 -1.29750744 -0.59686344 [97] -0.73279426 1.31975854 -1.15410348 0.42766499 > rowSums(tmp2) [1] 1.98831047 -0.96786037 1.04879413 -0.37272622 0.07438872 -1.31971703 [7] -0.18455369 -0.46059890 -0.29720415 -0.89746606 0.08344840 1.19483804 [13] 0.92860397 0.62346443 1.23583406 0.13230191 0.16443731 0.75371133 [19] 0.18063141 -0.07363024 -0.80954839 -0.34157064 -1.53178695 0.45849652 [25] 0.86360086 1.05660909 1.96958618 -0.53743784 -1.62362440 -0.95631311 [31] -0.04590693 -0.24154172 0.22520643 -0.82609156 1.32139054 0.81105489 [37] -0.67821136 1.86206819 1.20060311 -2.71212594 0.14523897 -0.77636495 [43] -0.08800637 0.48302345 1.34983850 0.45080140 1.53047326 0.08448704 [49] -0.24321170 0.71139205 0.84829227 1.47508562 0.95761775 -0.71984232 [55] -0.60227866 0.87783861 0.21322071 1.53685407 -1.22154825 1.19754164 [61] -0.16197302 1.28151511 -0.30524196 0.51705326 0.31718998 1.41919196 [67] -0.25844118 -0.45582705 0.39305959 0.96211905 1.26138370 1.56606254 [73] 0.27992469 -0.45345016 -0.13949114 0.30631575 0.11020556 -0.23109584 [79] 0.77277808 0.33999040 0.02168560 -0.15473398 0.08019417 0.23923719 [85] 0.29515304 -0.57773523 1.89074862 1.75864534 0.17991568 -1.70997185 [91] 1.51259619 -1.23891412 -0.10754496 1.45949248 -1.29750744 -0.59686344 [97] -0.73279426 1.31975854 -1.15410348 0.42766499 > 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] 1.98831047 -0.96786037 1.04879413 -0.37272622 0.07438872 -1.31971703 [7] -0.18455369 -0.46059890 -0.29720415 -0.89746606 0.08344840 1.19483804 [13] 0.92860397 0.62346443 1.23583406 0.13230191 0.16443731 0.75371133 [19] 0.18063141 -0.07363024 -0.80954839 -0.34157064 -1.53178695 0.45849652 [25] 0.86360086 1.05660909 1.96958618 -0.53743784 -1.62362440 -0.95631311 [31] -0.04590693 -0.24154172 0.22520643 -0.82609156 1.32139054 0.81105489 [37] -0.67821136 1.86206819 1.20060311 -2.71212594 0.14523897 -0.77636495 [43] -0.08800637 0.48302345 1.34983850 0.45080140 1.53047326 0.08448704 [49] -0.24321170 0.71139205 0.84829227 1.47508562 0.95761775 -0.71984232 [55] -0.60227866 0.87783861 0.21322071 1.53685407 -1.22154825 1.19754164 [61] -0.16197302 1.28151511 -0.30524196 0.51705326 0.31718998 1.41919196 [67] -0.25844118 -0.45582705 0.39305959 0.96211905 1.26138370 1.56606254 [73] 0.27992469 -0.45345016 -0.13949114 0.30631575 0.11020556 -0.23109584 [79] 0.77277808 0.33999040 0.02168560 -0.15473398 0.08019417 0.23923719 [85] 0.29515304 -0.57773523 1.89074862 1.75864534 0.17991568 -1.70997185 [91] 1.51259619 -1.23891412 -0.10754496 1.45949248 -1.29750744 -0.59686344 [97] -0.73279426 1.31975854 -1.15410348 0.42766499 > rowMin(tmp2) [1] 1.98831047 -0.96786037 1.04879413 -0.37272622 0.07438872 -1.31971703 [7] -0.18455369 -0.46059890 -0.29720415 -0.89746606 0.08344840 1.19483804 [13] 0.92860397 0.62346443 1.23583406 0.13230191 0.16443731 0.75371133 [19] 0.18063141 -0.07363024 -0.80954839 -0.34157064 -1.53178695 0.45849652 [25] 0.86360086 1.05660909 1.96958618 -0.53743784 -1.62362440 -0.95631311 [31] -0.04590693 -0.24154172 0.22520643 -0.82609156 1.32139054 0.81105489 [37] -0.67821136 1.86206819 1.20060311 -2.71212594 0.14523897 -0.77636495 [43] -0.08800637 0.48302345 1.34983850 0.45080140 1.53047326 0.08448704 [49] -0.24321170 0.71139205 0.84829227 1.47508562 0.95761775 -0.71984232 [55] -0.60227866 0.87783861 0.21322071 1.53685407 -1.22154825 1.19754164 [61] -0.16197302 1.28151511 -0.30524196 0.51705326 0.31718998 1.41919196 [67] -0.25844118 -0.45582705 0.39305959 0.96211905 1.26138370 1.56606254 [73] 0.27992469 -0.45345016 -0.13949114 0.30631575 0.11020556 -0.23109584 [79] 0.77277808 0.33999040 0.02168560 -0.15473398 0.08019417 0.23923719 [85] 0.29515304 -0.57773523 1.89074862 1.75864534 0.17991568 -1.70997185 [91] 1.51259619 -1.23891412 -0.10754496 1.45949248 -1.29750744 -0.59686344 [97] -0.73279426 1.31975854 -1.15410348 0.42766499 > > colMeans(tmp2) [1] 0.2064611 > colSums(tmp2) [1] 20.64611 > colVars(tmp2) [1] 0.8858582 > colSd(tmp2) [1] 0.9412004 > colMax(tmp2) [1] 1.98831 > colMin(tmp2) [1] -2.712126 > colMedians(tmp2) [1] 0.1721765 > colRanges(tmp2) [,1] [1,] -2.712126 [2,] 1.988310 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 5.00653533 -0.52508162 -1.64588189 -2.38403988 -2.34195275 -6.09585948 [7] -5.79694893 0.01935326 -6.32877967 3.95900114 > colApply(tmp,quantile)[,1] [,1] [1,] -0.6559823 [2,] 0.1413434 [3,] 0.5267999 [4,] 1.0392391 [5,] 1.1604791 > > rowApply(tmp,sum) [1] -5.6920180 -2.8159236 4.1501492 3.3877115 -2.5381412 0.6474011 [7] -3.8094079 -3.9355009 -3.8149423 -1.7129824 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 8 9 2 8 7 8 9 7 8 8 [2,] 9 4 5 4 6 3 8 3 7 5 [3,] 1 8 7 5 3 9 7 4 3 4 [4,] 2 7 3 7 1 7 6 6 5 7 [5,] 3 6 6 6 5 4 2 10 6 6 [6,] 7 1 9 3 10 6 1 5 4 2 [7,] 6 2 8 1 4 10 3 1 1 10 [8,] 4 10 4 10 8 5 4 8 2 9 [9,] 5 5 1 9 2 1 5 2 9 1 [10,] 10 3 10 2 9 2 10 9 10 3 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.8106670 -3.5354234 -0.7247636 -0.6128947 0.3960388 0.5718753 [7] -2.2501136 -1.8077745 -1.3962341 1.3721565 -2.4377057 2.2814301 [13] -3.0509730 2.9486884 0.7195169 2.0889953 2.2167880 4.3998156 [19] -1.1631600 -2.5236089 > colApply(tmp,quantile)[,1] [,1] [1,] -0.1098595 [2,] -0.1000083 [3,] 0.5087676 [4,] 0.7277914 [5,] 0.7839758 > > rowApply(tmp,sum) [1] 0.04457605 -1.33482074 -0.16795936 3.52946878 -2.76794455 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 17 11 7 15 14 [2,] 7 7 4 8 1 [3,] 2 17 20 11 4 [4,] 9 9 6 3 16 [5,] 13 10 8 6 17 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.7277914 -0.32191244 -2.0342167 -0.1036310 0.33086600 0.6080101 [2,] -0.1000083 -0.67471817 1.1887023 -0.2161361 -0.16808749 0.3849518 [3,] -0.1098595 -0.64502408 0.9294053 -0.3084035 -0.06446547 -0.3771727 [4,] 0.7839758 0.01258403 0.1310909 -0.5572174 -0.33571599 0.2503244 [5,] 0.5087676 -1.90635272 -0.9397454 0.5724932 0.63344175 -0.2942384 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.61497270 0.5838639 -3.0068721 -0.14454952 0.06480006 1.0812308 [2,] -2.08015837 -1.9369551 0.8654222 0.80170454 -0.65584524 -0.8043885 [3,] 0.50937446 0.6530845 0.5676824 0.10356397 -0.82806664 0.6157293 [4,] 0.06931731 -0.2983895 -1.2529744 0.08313227 0.57495891 1.2605659 [5,] -0.13367435 -0.8093784 1.4305078 0.52830521 -1.59355283 0.1282926 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.6819219 2.074745474 -0.4142424 -0.5749928 -0.08591224 2.0472682 [2,] 1.4650178 1.039868380 -0.9112960 0.9255999 1.27868180 2.1745436 [3,] -2.5037591 0.008216145 0.4091070 0.4978750 0.91755632 0.3976139 [4,] -0.4129836 0.981999404 0.7043326 0.8715876 0.94495940 -1.1049590 [5,] -0.9173263 -1.156141051 0.9316156 0.3689254 -0.83849726 0.8853489 [,19] [,20] [1,] 0.1506753 0.3585485 [2,] -1.4030805 -2.5086395 [3,] -1.4927229 0.5523061 [4,] 1.2448910 -0.4220110 [5,] 0.3370770 -0.5038130 > > > 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 : 652 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 : 565 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.6808857 -0.223358 -0.3669809 -0.4376916 -0.8495042 -0.798127 -0.7897872 col8 col9 col10 col11 col12 col13 col14 row1 0.1352367 -1.325079 0.4145826 -0.9645561 0.8974223 -1.303264 -0.4475299 col15 col16 col17 col18 col19 col20 row1 1.254937 0.594641 -0.5321497 0.4595804 0.07551566 0.07276861 > tmp[,"col10"] col10 row1 0.4145826 row2 -0.1465787 row3 -0.3657690 row4 0.1144266 row5 1.0621229 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.6808857 -0.2233580 -0.3669809 -0.4376916 -0.8495042 -0.7981270 row5 -1.6111005 0.7571068 -0.6028219 -1.4290566 -0.5639476 0.2025664 col7 col8 col9 col10 col11 col12 col13 row1 -0.7897872 0.1352367 -1.325079 0.4145826 -0.9645561 0.8974223 -1.3032639 row5 -0.5826899 1.0619864 -0.731009 1.0621229 -1.5064694 0.8263000 -0.9868946 col14 col15 col16 col17 col18 col19 col20 row1 -0.4475299 1.2549375 0.594641 -0.5321497 0.4595804 0.07551566 0.07276861 row5 -0.5316354 0.7855767 1.552875 -0.5541041 0.8444230 1.16283197 0.78023165 > tmp[,c("col6","col20")] col6 col20 row1 -0.7981270 0.07276861 row2 0.1361754 -1.87774651 row3 1.7705713 0.83918062 row4 0.5923021 0.36806262 row5 0.2025664 0.78023165 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.7981270 0.07276861 row5 0.2025664 0.78023165 > > > > > 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.99921 50.99153 48.97404 51.27331 49.71397 105.6989 51.2403 47.89643 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.24625 48.91369 49.64741 50.13181 50.14057 50.53583 50.13962 49.87097 col17 col18 col19 col20 row1 50.47967 49.98877 48.00065 106.5829 > tmp[,"col10"] col10 row1 48.91369 row2 30.07662 row3 31.70031 row4 29.27865 row5 50.30976 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.99921 50.99153 48.97404 51.27331 49.71397 105.6989 51.24030 47.89643 row5 49.48424 51.99199 50.55928 50.82197 49.16708 104.5096 50.83263 50.35971 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.24625 48.91369 49.64741 50.13181 50.14057 50.53583 50.13962 49.87097 row5 50.68631 50.30976 49.11046 50.39505 49.37149 49.29709 49.76150 48.86441 col17 col18 col19 col20 row1 50.47967 49.98877 48.00065 106.5829 row5 48.83839 50.70033 49.29688 103.6475 > tmp[,c("col6","col20")] col6 col20 row1 105.69892 106.58294 row2 74.92323 76.29427 row3 76.16655 74.82116 row4 75.51601 75.18208 row5 104.50957 103.64750 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.6989 106.5829 row5 104.5096 103.6475 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.6989 106.5829 row5 104.5096 103.6475 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.01128839 [2,] -0.50201266 [3,] -0.26282542 [4,] 0.14705786 [5,] 0.60077236 > tmp[,c("col17","col7")] col17 col7 [1,] 0.8759424 1.7690723 [2,] 1.8260884 0.2442026 [3,] -1.5434191 1.0114663 [4,] -0.1958756 0.4503558 [5,] 0.3085213 -2.5890618 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.003695978 -0.726091580 [2,] 0.880961616 0.009830697 [3,] 2.210823523 -1.452782506 [4,] 0.633668293 0.228507220 [5,] -0.325252937 0.832685813 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.003695978 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.003695978 [2,] 0.880961616 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 0.07450742 1.814483 1.6313193 2.013741 -0.1392958 -0.7981561 0.1009870 row1 1.93055665 1.190724 -0.3637957 -2.085076 -0.2328369 -0.8940831 0.8479323 [,8] [,9] [,10] [,11] [,12] [,13] row3 -1.4704228 -0.9154471 0.4561402 1.2481456 -0.2489139 0.3781826 row1 0.9713972 0.4296085 1.1089884 -0.7927261 1.3603647 -0.9179149 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 -0.1683844 0.4817980 -0.03651318 -0.6227275 -0.7579502 1.0487968 0.416254 row1 1.2149139 0.3433473 -0.06631560 -0.2518592 -0.6591119 0.3183943 1.179630 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.5973155 -0.8820932 -1.055868 -0.5090171 -1.484882 -1.294493 0.7096787 [,8] [,9] [,10] row2 1.469942 -0.9533148 1.744743 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.1617283 0.2579105 0.3843138 0.3673013 0.4809131 1.386916 0.4086731 [,8] [,9] [,10] [,11] [,12] [,13] row5 0.4980012 0.7309875 -0.2926077 -0.1670199 -0.4782507 -0.07464738 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.6868155 -0.8155422 -0.8687022 1.171305 0.7623721 -0.3525627 0.4900476 > > > 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: 0x3d052260> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff06e8b4834" [2] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff0f1ac4f4" [3] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff042203c61" [4] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff01875d556" [5] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff016da50f6" [6] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff02ab57630" [7] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff05ecc3cc1" [8] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff01ccdd263" [9] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff04fe8443f" [10] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff0ea3231a" [11] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff041c9855a" [12] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff06ac49140" [13] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff03b7da60e" [14] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff02c0f8509" [15] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM34eff05bc09d67" > > > ### 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: 0x3e9dfb50> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x3e9dfb50> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x3e9dfb50> > rowMedians(tmp) [1] 0.265706104 0.135402000 0.185230317 -0.264545666 -0.209976793 [6] 0.331007981 0.443393363 0.059953358 0.394146849 0.386107623 [11] -0.248238204 0.279115383 0.298478934 -0.012863300 -0.252076803 [16] -0.369232712 -0.246334464 0.007692758 -0.075006047 -0.024468347 [21] 0.454043785 -0.350346586 -0.219892568 0.174360825 -0.329369009 [26] 0.223447330 -0.126676342 -0.084343558 0.167921998 0.411300897 [31] 0.424190697 0.469720875 0.093340241 0.270446203 -0.219514642 [36] 0.533931322 0.077938612 0.024378875 -0.451640240 -0.138890002 [41] -0.083630272 0.540730651 -0.086587244 0.067501599 -0.718167278 [46] -0.268418720 0.063480044 0.340114806 -0.102510674 -0.229456862 [51] 0.685463457 0.681689911 -0.389565647 0.131785341 0.272597285 [56] -0.697153177 -0.337223788 -0.155362273 -0.014523090 0.367169627 [61] -0.145309562 -0.014998800 -0.397036545 0.549666771 0.079556061 [66] 0.436746324 -0.865214870 0.564344425 -0.369632449 -0.242564167 [71] 0.007562105 0.307316528 -0.100105123 -0.521934225 0.491504532 [76] 0.103021825 -0.345844890 -0.093256788 0.074050387 0.241399629 [81] -0.442879196 0.033068852 -0.471775961 0.006227505 0.206584652 [86] -0.512915414 -0.498667121 0.065110240 -0.132890999 -0.327446957 [91] 0.547330821 -0.218627490 0.674078720 -0.539360254 0.687013157 [96] 0.184176524 -0.059089450 0.047543633 0.803740894 -0.091581627 [101] -0.283357574 0.681506024 -0.237184318 0.266780473 0.175887307 [106] 0.112314461 0.803221476 -0.083787227 0.081228153 0.078115569 [111] 0.171086529 0.097075473 0.169386812 0.081866664 0.085770631 [116] -0.194941413 0.245838958 -0.135270494 0.524033557 -0.001268524 [121] 0.326189725 -0.008919832 0.087398372 -0.068333855 -0.081483418 [126] -0.396150645 0.825292280 0.699900143 0.235115483 -0.305721717 [131] -0.207993916 -0.149805675 0.039729407 -0.033070141 0.269565108 [136] 0.401778236 0.002199809 0.055576854 -0.078781841 -0.313978607 [141] 0.040416964 -0.013843831 0.148884829 -0.024412224 -0.059000557 [146] 0.404809802 0.282637572 0.196935668 -0.204597811 -0.564313910 [151] 0.049503787 0.195421123 -0.718043341 -0.809190160 -0.107798583 [156] 0.043869889 0.495396289 -0.689323621 -0.165173492 0.125612337 [161] -0.521926934 0.305457984 0.165080542 -0.173124991 -0.572622959 [166] -0.181248549 -0.074075087 -0.071631919 -0.675948431 0.028905539 [171] 0.173005270 -0.119698887 0.416500966 0.004558725 0.156698464 [176] -0.506722960 -0.210853766 -0.085728313 0.205877085 -0.595517728 [181] 0.030593004 0.744085701 -0.476216700 0.193979536 -0.438067245 [186] -0.018714850 0.413753077 -0.380560117 -0.246895476 -0.500825177 [191] 0.368665625 0.268267205 -0.107163110 -0.012930822 0.327703088 [196] 0.205099836 -0.114164688 0.154118790 -0.534023536 -0.154240912 [201] -0.040781164 -0.371961444 -0.439883340 0.397201637 0.785620793 [206] -0.081675842 -0.018089934 0.117633446 -0.031975186 0.039735931 [211] -0.183409026 -0.378083049 -0.376514960 -0.074202980 0.809059802 [216] -0.154434423 0.651338083 0.287075186 -0.269123458 -0.536513666 [221] 0.401046809 0.011478203 -0.228661941 -0.220348788 0.265564703 [226] -0.090117700 0.193525004 0.052283547 -0.040660887 -0.488734448 > > proc.time() user system elapsed 1.977 1.093 2.998
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: 0x1eac49f0> > .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: 0x1eac49f0> > .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: 0x1eac49f0> > .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: 0x1eac49f0> > 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: 0x1d1634b0> > .Call("R_bm_AddColumn",P) <pointer: 0x1d1634b0> > .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: 0x1d1634b0> > .Call("R_bm_AddColumn",P) <pointer: 0x1d1634b0> > .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: 0x1d1634b0> > 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: 0x1d1a0070> > .Call("R_bm_AddColumn",P) <pointer: 0x1d1a0070> > .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: 0x1d1a0070> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x1d1a0070> > .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: 0x1d1a0070> > > .Call("R_bm_RowMode",P) <pointer: 0x1d1a0070> > .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: 0x1d1a0070> > > .Call("R_bm_ColMode",P) <pointer: 0x1d1a0070> > .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: 0x1d1a0070> > 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: 0x1e75b470> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x1e75b470> > .Call("R_bm_AddColumn",P) <pointer: 0x1e75b470> > .Call("R_bm_AddColumn",P) <pointer: 0x1e75b470> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile34f07a66009f3e" "BufferedMatrixFile34f07a913307b" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile34f07a66009f3e" "BufferedMatrixFile34f07a913307b" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x1e333c80> > .Call("R_bm_AddColumn",P) <pointer: 0x1e333c80> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x1e333c80> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x1e333c80> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x1e333c80> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x1e333c80> > .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: 0x1e336460> > .Call("R_bm_AddColumn",P) <pointer: 0x1e336460> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x1e336460> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x1e336460> > 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: 0x1d6a4bf0> > .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: 0x1d6a4bf0> > rm(P) > > proc.time() user system elapsed 0.413 0.038 0.350
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.418 0.036 0.352