Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2024-07-08 11:44 -0400 (Mon, 08 Jul 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4643 |
palomino6 | Windows Server 2022 Datacenter | x64 | 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" | 4414 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4442 |
kjohnson3 | macOS 13.6.5 Ventura | arm64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4391 |
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) | aarch64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 3833 |
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 246/2243 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.69.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino6 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson3 | macOS 13.6.5 Ventura / arm64 | OK | OK | WARNINGS | OK | |||||||||
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) / aarch64 | NA | 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.69.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.69.0.tar.gz |
StartedAt: 2024-07-06 03:28:28 -0000 (Sat, 06 Jul 2024) |
EndedAt: 2024-07-06 03:28:50 -0000 (Sat, 06 Jul 2024) |
EllapsedTime: 22.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/R/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R/site-library --no-vignettes --timings BufferedMatrix_1.69.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.69.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 (GCC) 10.3.1’ * 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 (GCC) 10.3.1’ 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){ | ^~~~~~~~~~~~~~~~~~~ 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.342 0.019 0.347
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] "Sat Jul 6 03:28:45 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] "Sat Jul 6 03:28:45 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: 0x3d6ffa40> > > > > 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] "Sat Jul 6 03:28: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] "Sat Jul 6 03:28:45 2024" > > ColMode(tmp2) <pointer: 0x3d6ffa40> > > > > ### 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.8248295 -0.87926356 0.5535776 -0.6360991 [2,] 0.2281827 -0.08583263 0.4198628 -0.5339307 [3,] -0.5672627 0.11974808 -1.9351330 -1.3281310 [4,] 0.1584395 -0.12299714 -1.3517735 -0.3557416 > 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.8248295 0.87926356 0.5535776 0.6360991 [2,] 0.2281827 0.08583263 0.4198628 0.5339307 [3,] 0.5672627 0.11974808 1.9351330 1.3281310 [4,] 0.1584395 0.12299714 1.3517735 0.3557416 > 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.9912376 0.9376905 0.7440280 0.7975582 [2,] 0.4776848 0.2929721 0.6479682 0.7307057 [3,] 0.7531685 0.3460464 1.3910906 1.1524457 [4,] 0.3980446 0.3507095 1.1626580 0.5964408 > > 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,] 224.73721 35.25617 32.99386 33.61168 [2,] 30.00503 28.01555 31.89954 32.84099 [3,] 33.09895 28.58021 40.84604 37.85259 [4,] 29.13889 28.63009 37.97835 31.32015 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x3e8510e0> > exp(tmp5) <pointer: 0x3e8510e0> > log(tmp5,2) <pointer: 0x3e8510e0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 467.761 > Min(tmp5) [1] 53.71648 > mean(tmp5) [1] 72.14219 > Sum(tmp5) [1] 14428.44 > Var(tmp5) [1] 862.8001 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.64156 68.43540 72.11553 68.01872 69.95701 68.69745 70.05196 69.46751 [9] 73.20396 70.83277 > rowSums(tmp5) [1] 1812.831 1368.708 1442.311 1360.374 1399.140 1373.949 1401.039 1389.350 [9] 1464.079 1416.655 > rowVars(tmp5) [1] 7946.07071 56.99312 61.35975 89.61150 43.47805 58.89666 [7] 88.15923 62.42481 83.23996 121.22271 > rowSd(tmp5) [1] 89.140735 7.549379 7.833247 9.466335 6.593789 7.674416 9.389315 [8] 7.900937 9.123594 11.010119 > rowMax(tmp5) [1] 467.76105 84.57839 85.01568 83.65137 80.13174 89.26468 86.48798 [8] 84.78759 91.06793 91.31457 > rowMin(tmp5) [1] 54.49395 58.31070 59.48597 53.75729 57.72608 53.71648 56.80924 56.97876 [9] 55.63435 57.24398 > > colMeans(tmp5) [1] 107.90555 65.98619 73.31164 70.22170 71.23584 70.07640 71.83245 [8] 68.59454 67.85356 67.26076 70.47036 71.66070 69.90767 71.83313 [15] 65.33059 71.45758 73.50841 69.98408 75.85814 68.55446 > colSums(tmp5) [1] 1079.0555 659.8619 733.1164 702.2170 712.3584 700.7640 718.3245 [8] 685.9454 678.5356 672.6076 704.7036 716.6070 699.0767 718.3313 [15] 653.3059 714.5758 735.0841 699.8408 758.5814 685.5446 > colVars(tmp5) [1] 16025.45179 75.81890 46.19192 52.05918 53.24455 90.06091 [7] 66.22344 94.33880 93.20258 52.85890 84.66171 62.91644 [13] 53.14535 142.74422 60.07292 81.44541 97.32726 91.17140 [19] 56.82969 64.20482 > colSd(tmp5) [1] 126.591673 8.707405 6.796464 7.215205 7.296887 9.490043 [7] 8.137778 9.712816 9.654149 7.270413 9.201180 7.931988 [13] 7.290085 11.947561 7.750672 9.024711 9.865458 9.548372 [19] 7.538547 8.012791 > colMax(tmp5) [1] 467.76105 80.13174 85.01568 81.10689 86.48798 91.06793 83.50427 [8] 83.51109 84.78116 82.04557 89.18066 82.88809 84.57839 90.27456 [15] 81.40581 91.31457 89.26468 81.52106 83.84740 84.78759 > colMin(tmp5) [1] 60.64877 55.63435 65.81076 60.22782 59.59786 57.24398 56.80924 53.71648 [9] 54.59505 59.62034 60.82208 59.12925 62.07177 53.75729 54.49395 59.02399 [17] 62.92008 57.24015 60.54926 59.23517 > > > ### 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] 90.64156 68.43540 72.11553 68.01872 69.95701 NA 70.05196 69.46751 [9] 73.20396 70.83277 > rowSums(tmp5) [1] 1812.831 1368.708 1442.311 1360.374 1399.140 NA 1401.039 1389.350 [9] 1464.079 1416.655 > rowVars(tmp5) [1] 7946.07071 56.99312 61.35975 89.61150 43.47805 60.82696 [7] 88.15923 62.42481 83.23996 121.22271 > rowSd(tmp5) [1] 89.140735 7.549379 7.833247 9.466335 6.593789 7.799164 9.389315 [8] 7.900937 9.123594 11.010119 > rowMax(tmp5) [1] 467.76105 84.57839 85.01568 83.65137 80.13174 NA 86.48798 [8] 84.78759 91.06793 91.31457 > rowMin(tmp5) [1] 54.49395 58.31070 59.48597 53.75729 57.72608 NA 56.80924 56.97876 [9] 55.63435 57.24398 > > colMeans(tmp5) [1] 107.90555 65.98619 73.31164 70.22170 71.23584 70.07640 71.83245 [8] 68.59454 67.85356 67.26076 70.47036 71.66070 NA 71.83313 [15] 65.33059 71.45758 73.50841 69.98408 75.85814 68.55446 > colSums(tmp5) [1] 1079.0555 659.8619 733.1164 702.2170 712.3584 700.7640 718.3245 [8] 685.9454 678.5356 672.6076 704.7036 716.6070 NA 718.3313 [15] 653.3059 714.5758 735.0841 699.8408 758.5814 685.5446 > colVars(tmp5) [1] 16025.45179 75.81890 46.19192 52.05918 53.24455 90.06091 [7] 66.22344 94.33880 93.20258 52.85890 84.66171 62.91644 [13] NA 142.74422 60.07292 81.44541 97.32726 91.17140 [19] 56.82969 64.20482 > colSd(tmp5) [1] 126.591673 8.707405 6.796464 7.215205 7.296887 9.490043 [7] 8.137778 9.712816 9.654149 7.270413 9.201180 7.931988 [13] NA 11.947561 7.750672 9.024711 9.865458 9.548372 [19] 7.538547 8.012791 > colMax(tmp5) [1] 467.76105 80.13174 85.01568 81.10689 86.48798 91.06793 83.50427 [8] 83.51109 84.78116 82.04557 89.18066 82.88809 NA 90.27456 [15] 81.40581 91.31457 89.26468 81.52106 83.84740 84.78759 > colMin(tmp5) [1] 60.64877 55.63435 65.81076 60.22782 59.59786 57.24398 56.80924 53.71648 [9] 54.59505 59.62034 60.82208 59.12925 NA 53.75729 54.49395 59.02399 [17] 62.92008 57.24015 60.54926 59.23517 > > Max(tmp5,na.rm=TRUE) [1] 467.761 > Min(tmp5,na.rm=TRUE) [1] 53.71648 > mean(tmp5,na.rm=TRUE) [1] 72.18357 > Sum(tmp5,na.rm=TRUE) [1] 14364.53 > Var(tmp5,na.rm=TRUE) [1] 866.8134 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.64156 68.43540 72.11553 68.01872 69.95701 68.94955 70.05196 69.46751 [9] 73.20396 70.83277 > rowSums(tmp5,na.rm=TRUE) [1] 1812.831 1368.708 1442.311 1360.374 1399.140 1310.042 1401.039 1389.350 [9] 1464.079 1416.655 > rowVars(tmp5,na.rm=TRUE) [1] 7946.07071 56.99312 61.35975 89.61150 43.47805 60.82696 [7] 88.15923 62.42481 83.23996 121.22271 > rowSd(tmp5,na.rm=TRUE) [1] 89.140735 7.549379 7.833247 9.466335 6.593789 7.799164 9.389315 [8] 7.900937 9.123594 11.010119 > rowMax(tmp5,na.rm=TRUE) [1] 467.76105 84.57839 85.01568 83.65137 80.13174 89.26468 86.48798 [8] 84.78759 91.06793 91.31457 > rowMin(tmp5,na.rm=TRUE) [1] 54.49395 58.31070 59.48597 53.75729 57.72608 53.71648 56.80924 56.97876 [9] 55.63435 57.24398 > > colMeans(tmp5,na.rm=TRUE) [1] 107.90555 65.98619 73.31164 70.22170 71.23584 70.07640 71.83245 [8] 68.59454 67.85356 67.26076 70.47036 71.66070 70.57435 71.83313 [15] 65.33059 71.45758 73.50841 69.98408 75.85814 68.55446 > colSums(tmp5,na.rm=TRUE) [1] 1079.0555 659.8619 733.1164 702.2170 712.3584 700.7640 718.3245 [8] 685.9454 678.5356 672.6076 704.7036 716.6070 635.1692 718.3313 [15] 653.3059 714.5758 735.0841 699.8408 758.5814 685.5446 > colVars(tmp5,na.rm=TRUE) [1] 16025.45179 75.81890 46.19192 52.05918 53.24455 90.06091 [7] 66.22344 94.33880 93.20258 52.85890 84.66171 62.91644 [13] 54.78823 142.74422 60.07292 81.44541 97.32726 91.17140 [19] 56.82969 64.20482 > colSd(tmp5,na.rm=TRUE) [1] 126.591673 8.707405 6.796464 7.215205 7.296887 9.490043 [7] 8.137778 9.712816 9.654149 7.270413 9.201180 7.931988 [13] 7.401907 11.947561 7.750672 9.024711 9.865458 9.548372 [19] 7.538547 8.012791 > colMax(tmp5,na.rm=TRUE) [1] 467.76105 80.13174 85.01568 81.10689 86.48798 91.06793 83.50427 [8] 83.51109 84.78116 82.04557 89.18066 82.88809 84.57839 90.27456 [15] 81.40581 91.31457 89.26468 81.52106 83.84740 84.78759 > colMin(tmp5,na.rm=TRUE) [1] 60.64877 55.63435 65.81076 60.22782 59.59786 57.24398 56.80924 53.71648 [9] 54.59505 59.62034 60.82208 59.12925 62.07177 53.75729 54.49395 59.02399 [17] 62.92008 57.24015 60.54926 59.23517 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.64156 68.43540 72.11553 68.01872 69.95701 NaN 70.05196 69.46751 [9] 73.20396 70.83277 > rowSums(tmp5,na.rm=TRUE) [1] 1812.831 1368.708 1442.311 1360.374 1399.140 0.000 1401.039 1389.350 [9] 1464.079 1416.655 > rowVars(tmp5,na.rm=TRUE) [1] 7946.07071 56.99312 61.35975 89.61150 43.47805 NA [7] 88.15923 62.42481 83.23996 121.22271 > rowSd(tmp5,na.rm=TRUE) [1] 89.140735 7.549379 7.833247 9.466335 6.593789 NA 9.389315 [8] 7.900937 9.123594 11.010119 > rowMax(tmp5,na.rm=TRUE) [1] 467.76105 84.57839 85.01568 83.65137 80.13174 NA 86.48798 [8] 84.78759 91.06793 91.31457 > rowMin(tmp5,na.rm=TRUE) [1] 54.49395 58.31070 59.48597 53.75729 57.72608 NA 56.80924 56.97876 [9] 55.63435 57.24398 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 112.24695 65.89154 74.14507 70.24885 71.82610 70.66840 72.37271 [8] 70.24766 67.41400 67.75322 69.77564 72.47160 NaN 71.94764 [15] 64.80575 72.83909 71.75771 68.97145 75.73799 68.80296 > colSums(tmp5,na.rm=TRUE) [1] 1010.2225 593.0239 667.3056 632.2397 646.4349 636.0156 651.3544 [8] 632.2289 606.7260 609.7790 627.9808 652.2444 0.0000 647.5287 [15] 583.2518 655.5518 645.8194 620.7430 681.6419 619.2267 > colVars(tmp5,na.rm=TRUE) [1] 17816.59615 85.19548 44.15158 58.55828 55.98053 97.37592 [7] 71.21765 75.38719 102.67932 56.73794 89.81487 63.38340 [13] NA 160.43973 64.48319 70.15468 75.01260 91.03191 [19] 63.77099 71.53566 > colSd(tmp5,na.rm=TRUE) [1] 133.478823 9.230140 6.644666 7.652338 7.482014 9.867924 [7] 8.439055 8.682580 10.133080 7.532459 9.477071 7.961369 [13] NA 12.666481 8.030143 8.375839 8.660981 9.541064 [19] 7.985674 8.457876 > colMax(tmp5,na.rm=TRUE) [1] 467.76105 80.13174 85.01568 81.10689 86.48798 91.06793 83.50427 [8] 83.51109 84.78116 82.04557 89.18066 82.88809 -Inf 90.27456 [15] 81.40581 91.31457 83.46719 81.52106 83.84740 84.78759 > colMin(tmp5,na.rm=TRUE) [1] 60.64877 55.63435 65.88895 60.22782 59.59786 57.24398 56.80924 56.97876 [9] 54.59505 59.62034 60.82208 59.12925 Inf 53.75729 54.49395 62.66997 [17] 62.92008 57.24015 60.54926 59.23517 > > > > > 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] 151.3567 233.3966 154.5141 183.3482 261.2303 357.7568 153.1130 398.2556 [9] 315.8641 308.3656 > apply(copymatrix,1,var,na.rm=TRUE) [1] 151.3567 233.3966 154.5141 183.3482 261.2303 357.7568 153.1130 398.2556 [9] 315.8641 308.3656 > > > > 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] 1.136868e-13 -1.421085e-13 8.526513e-14 1.705303e-13 -4.547474e-13 [6] -5.684342e-14 0.000000e+00 5.684342e-14 -2.842171e-14 -1.705303e-13 [11] -5.684342e-14 -5.684342e-14 0.000000e+00 -1.136868e-13 5.684342e-14 [16] 1.136868e-13 5.684342e-14 -8.526513e-14 1.136868e-13 8.526513e-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) + } 1 19 9 9 6 17 6 11 4 2 10 4 1 12 4 10 10 19 7 11 5 10 3 7 2 11 3 16 1 6 7 14 8 17 6 1 3 8 1 20 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 1.751665 > Min(tmp) [1] -2.068333 > mean(tmp) [1] -0.2783248 > Sum(tmp) [1] -27.83248 > Var(tmp) [1] 0.9226439 > > rowMeans(tmp) [1] -0.2783248 > rowSums(tmp) [1] -27.83248 > rowVars(tmp) [1] 0.9226439 > rowSd(tmp) [1] 0.9605435 > rowMax(tmp) [1] 1.751665 > rowMin(tmp) [1] -2.068333 > > colMeans(tmp) [1] -1.59027509 1.52589551 0.31428399 -0.94838481 -0.55888488 0.39098085 [7] -0.78154800 -0.20235563 -0.46312972 -0.95201063 -0.97301652 -2.06833349 [13] -1.72676404 0.83894612 -1.54211752 0.77091676 0.66498477 -0.78008475 [19] 0.82953949 -0.71408503 1.31859004 0.36514344 -1.49854706 -1.49973779 [25] -1.13371322 1.05376103 1.75166537 0.07171808 -0.18841361 -1.29970221 [31] 0.96902526 0.07124046 -1.29503718 -0.64650081 -1.75538343 -1.87231905 [37] -0.06511859 -1.44505346 0.36029709 -1.53727316 -1.62285137 0.74337024 [43] 1.41948357 -0.25641145 -0.51330713 -0.66300344 1.25967515 -0.47528921 [49] -0.83752770 0.25480209 -0.59647394 -0.54694415 -0.32869964 -0.77125207 [55] 0.97006751 -0.73476888 0.25118660 0.92613646 -1.89456409 -0.80122030 [61] 0.38293013 -0.91938661 1.17037064 -0.12409157 -0.03047256 -0.11544084 [67] -0.20706561 -0.03881807 1.57030474 1.04005477 -0.64382941 0.14025200 [73] -0.54997386 0.41011035 -1.53489040 -0.16116944 -1.15526977 -1.49711020 [79] 0.17736183 -1.66868367 -0.42504417 0.11623992 1.13168811 0.15624996 [85] -0.75602834 -1.05330291 0.65550331 0.91586546 0.44517929 -0.02516940 [91] 1.00006925 -1.15499208 -1.60562427 -1.06554248 1.11720351 -1.63000772 [97] -0.98463514 -0.56107261 -0.65472376 0.75887704 > colSums(tmp) [1] -1.59027509 1.52589551 0.31428399 -0.94838481 -0.55888488 0.39098085 [7] -0.78154800 -0.20235563 -0.46312972 -0.95201063 -0.97301652 -2.06833349 [13] -1.72676404 0.83894612 -1.54211752 0.77091676 0.66498477 -0.78008475 [19] 0.82953949 -0.71408503 1.31859004 0.36514344 -1.49854706 -1.49973779 [25] -1.13371322 1.05376103 1.75166537 0.07171808 -0.18841361 -1.29970221 [31] 0.96902526 0.07124046 -1.29503718 -0.64650081 -1.75538343 -1.87231905 [37] -0.06511859 -1.44505346 0.36029709 -1.53727316 -1.62285137 0.74337024 [43] 1.41948357 -0.25641145 -0.51330713 -0.66300344 1.25967515 -0.47528921 [49] -0.83752770 0.25480209 -0.59647394 -0.54694415 -0.32869964 -0.77125207 [55] 0.97006751 -0.73476888 0.25118660 0.92613646 -1.89456409 -0.80122030 [61] 0.38293013 -0.91938661 1.17037064 -0.12409157 -0.03047256 -0.11544084 [67] -0.20706561 -0.03881807 1.57030474 1.04005477 -0.64382941 0.14025200 [73] -0.54997386 0.41011035 -1.53489040 -0.16116944 -1.15526977 -1.49711020 [79] 0.17736183 -1.66868367 -0.42504417 0.11623992 1.13168811 0.15624996 [85] -0.75602834 -1.05330291 0.65550331 0.91586546 0.44517929 -0.02516940 [91] 1.00006925 -1.15499208 -1.60562427 -1.06554248 1.11720351 -1.63000772 [97] -0.98463514 -0.56107261 -0.65472376 0.75887704 > 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] -1.59027509 1.52589551 0.31428399 -0.94838481 -0.55888488 0.39098085 [7] -0.78154800 -0.20235563 -0.46312972 -0.95201063 -0.97301652 -2.06833349 [13] -1.72676404 0.83894612 -1.54211752 0.77091676 0.66498477 -0.78008475 [19] 0.82953949 -0.71408503 1.31859004 0.36514344 -1.49854706 -1.49973779 [25] -1.13371322 1.05376103 1.75166537 0.07171808 -0.18841361 -1.29970221 [31] 0.96902526 0.07124046 -1.29503718 -0.64650081 -1.75538343 -1.87231905 [37] -0.06511859 -1.44505346 0.36029709 -1.53727316 -1.62285137 0.74337024 [43] 1.41948357 -0.25641145 -0.51330713 -0.66300344 1.25967515 -0.47528921 [49] -0.83752770 0.25480209 -0.59647394 -0.54694415 -0.32869964 -0.77125207 [55] 0.97006751 -0.73476888 0.25118660 0.92613646 -1.89456409 -0.80122030 [61] 0.38293013 -0.91938661 1.17037064 -0.12409157 -0.03047256 -0.11544084 [67] -0.20706561 -0.03881807 1.57030474 1.04005477 -0.64382941 0.14025200 [73] -0.54997386 0.41011035 -1.53489040 -0.16116944 -1.15526977 -1.49711020 [79] 0.17736183 -1.66868367 -0.42504417 0.11623992 1.13168811 0.15624996 [85] -0.75602834 -1.05330291 0.65550331 0.91586546 0.44517929 -0.02516940 [91] 1.00006925 -1.15499208 -1.60562427 -1.06554248 1.11720351 -1.63000772 [97] -0.98463514 -0.56107261 -0.65472376 0.75887704 > colMin(tmp) [1] -1.59027509 1.52589551 0.31428399 -0.94838481 -0.55888488 0.39098085 [7] -0.78154800 -0.20235563 -0.46312972 -0.95201063 -0.97301652 -2.06833349 [13] -1.72676404 0.83894612 -1.54211752 0.77091676 0.66498477 -0.78008475 [19] 0.82953949 -0.71408503 1.31859004 0.36514344 -1.49854706 -1.49973779 [25] -1.13371322 1.05376103 1.75166537 0.07171808 -0.18841361 -1.29970221 [31] 0.96902526 0.07124046 -1.29503718 -0.64650081 -1.75538343 -1.87231905 [37] -0.06511859 -1.44505346 0.36029709 -1.53727316 -1.62285137 0.74337024 [43] 1.41948357 -0.25641145 -0.51330713 -0.66300344 1.25967515 -0.47528921 [49] -0.83752770 0.25480209 -0.59647394 -0.54694415 -0.32869964 -0.77125207 [55] 0.97006751 -0.73476888 0.25118660 0.92613646 -1.89456409 -0.80122030 [61] 0.38293013 -0.91938661 1.17037064 -0.12409157 -0.03047256 -0.11544084 [67] -0.20706561 -0.03881807 1.57030474 1.04005477 -0.64382941 0.14025200 [73] -0.54997386 0.41011035 -1.53489040 -0.16116944 -1.15526977 -1.49711020 [79] 0.17736183 -1.66868367 -0.42504417 0.11623992 1.13168811 0.15624996 [85] -0.75602834 -1.05330291 0.65550331 0.91586546 0.44517929 -0.02516940 [91] 1.00006925 -1.15499208 -1.60562427 -1.06554248 1.11720351 -1.63000772 [97] -0.98463514 -0.56107261 -0.65472376 0.75887704 > colMedians(tmp) [1] -1.59027509 1.52589551 0.31428399 -0.94838481 -0.55888488 0.39098085 [7] -0.78154800 -0.20235563 -0.46312972 -0.95201063 -0.97301652 -2.06833349 [13] -1.72676404 0.83894612 -1.54211752 0.77091676 0.66498477 -0.78008475 [19] 0.82953949 -0.71408503 1.31859004 0.36514344 -1.49854706 -1.49973779 [25] -1.13371322 1.05376103 1.75166537 0.07171808 -0.18841361 -1.29970221 [31] 0.96902526 0.07124046 -1.29503718 -0.64650081 -1.75538343 -1.87231905 [37] -0.06511859 -1.44505346 0.36029709 -1.53727316 -1.62285137 0.74337024 [43] 1.41948357 -0.25641145 -0.51330713 -0.66300344 1.25967515 -0.47528921 [49] -0.83752770 0.25480209 -0.59647394 -0.54694415 -0.32869964 -0.77125207 [55] 0.97006751 -0.73476888 0.25118660 0.92613646 -1.89456409 -0.80122030 [61] 0.38293013 -0.91938661 1.17037064 -0.12409157 -0.03047256 -0.11544084 [67] -0.20706561 -0.03881807 1.57030474 1.04005477 -0.64382941 0.14025200 [73] -0.54997386 0.41011035 -1.53489040 -0.16116944 -1.15526977 -1.49711020 [79] 0.17736183 -1.66868367 -0.42504417 0.11623992 1.13168811 0.15624996 [85] -0.75602834 -1.05330291 0.65550331 0.91586546 0.44517929 -0.02516940 [91] 1.00006925 -1.15499208 -1.60562427 -1.06554248 1.11720351 -1.63000772 [97] -0.98463514 -0.56107261 -0.65472376 0.75887704 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.590275 1.525896 0.314284 -0.9483848 -0.5588849 0.3909809 -0.781548 [2,] -1.590275 1.525896 0.314284 -0.9483848 -0.5588849 0.3909809 -0.781548 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.2023556 -0.4631297 -0.9520106 -0.9730165 -2.068333 -1.726764 0.8389461 [2,] -0.2023556 -0.4631297 -0.9520106 -0.9730165 -2.068333 -1.726764 0.8389461 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -1.542118 0.7709168 0.6649848 -0.7800847 0.8295395 -0.714085 1.31859 [2,] -1.542118 0.7709168 0.6649848 -0.7800847 0.8295395 -0.714085 1.31859 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.3651434 -1.498547 -1.499738 -1.133713 1.053761 1.751665 0.07171808 [2,] 0.3651434 -1.498547 -1.499738 -1.133713 1.053761 1.751665 0.07171808 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.1884136 -1.299702 0.9690253 0.07124046 -1.295037 -0.6465008 -1.755383 [2,] -0.1884136 -1.299702 0.9690253 0.07124046 -1.295037 -0.6465008 -1.755383 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.872319 -0.06511859 -1.445053 0.3602971 -1.537273 -1.622851 0.7433702 [2,] -1.872319 -0.06511859 -1.445053 0.3602971 -1.537273 -1.622851 0.7433702 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 1.419484 -0.2564115 -0.5133071 -0.6630034 1.259675 -0.4752892 -0.8375277 [2,] 1.419484 -0.2564115 -0.5133071 -0.6630034 1.259675 -0.4752892 -0.8375277 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.2548021 -0.5964739 -0.5469441 -0.3286996 -0.7712521 0.9700675 -0.7347689 [2,] 0.2548021 -0.5964739 -0.5469441 -0.3286996 -0.7712521 0.9700675 -0.7347689 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.2511866 0.9261365 -1.894564 -0.8012203 0.3829301 -0.9193866 1.170371 [2,] 0.2511866 0.9261365 -1.894564 -0.8012203 0.3829301 -0.9193866 1.170371 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.1240916 -0.03047256 -0.1154408 -0.2070656 -0.03881807 1.570305 1.040055 [2,] -0.1240916 -0.03047256 -0.1154408 -0.2070656 -0.03881807 1.570305 1.040055 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.6438294 0.140252 -0.5499739 0.4101103 -1.53489 -0.1611694 -1.15527 [2,] -0.6438294 0.140252 -0.5499739 0.4101103 -1.53489 -0.1611694 -1.15527 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -1.49711 0.1773618 -1.668684 -0.4250442 0.1162399 1.131688 0.15625 [2,] -1.49711 0.1773618 -1.668684 -0.4250442 0.1162399 1.131688 0.15625 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.7560283 -1.053303 0.6555033 0.9158655 0.4451793 -0.0251694 1.000069 [2,] -0.7560283 -1.053303 0.6555033 0.9158655 0.4451793 -0.0251694 1.000069 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.154992 -1.605624 -1.065542 1.117204 -1.630008 -0.9846351 -0.5610726 [2,] -1.154992 -1.605624 -1.065542 1.117204 -1.630008 -0.9846351 -0.5610726 [,99] [,100] [1,] -0.6547238 0.758877 [2,] -0.6547238 0.758877 > > > Max(tmp2) [1] 2.783086 > Min(tmp2) [1] -1.620512 > mean(tmp2) [1] -0.04344222 > Sum(tmp2) [1] -4.344222 > Var(tmp2) [1] 0.8518084 > > rowMeans(tmp2) [1] -0.353975401 1.540673994 1.097829040 -0.892561840 0.229792519 [6] -0.175009785 -0.527458796 1.106126233 -0.574785316 -0.843622175 [11] 2.783085788 1.094272544 0.369436957 0.560983929 -1.133093352 [16] -1.585258159 -0.854370657 -1.620511939 0.499762952 -0.995180364 [21] -0.766700601 0.003393156 -1.090077248 0.865742435 0.088857408 [26] 0.966175399 0.211848974 0.175534002 -1.589675435 -0.019432056 [31] -0.052603480 -1.543939923 0.378907544 -0.641198996 -0.187971376 [36] 0.595109274 -0.998095943 -1.239867145 1.445675967 2.385048781 [41] 1.287110382 -1.149834775 1.076790597 -0.011381914 0.275558041 [46] 2.239402465 0.771901422 -0.310280998 -0.696413292 0.044903423 [51] 0.244450161 -0.442491942 -0.120817198 -0.521337355 -0.326864560 [56] -0.547741869 0.631744445 -0.542223933 0.599333880 -0.110462149 [61] 0.720004086 0.050863954 -0.163208706 -0.086383063 -1.501490488 [66] 0.734259493 -0.018291809 -1.347438636 -0.003762811 -0.851143662 [71] 0.444888647 1.555618745 0.315500278 0.404451242 -0.718872229 [76] 1.762597034 0.198712166 0.593998558 -1.347326686 -0.725764323 [81] -0.330931026 0.107565907 0.279852809 -0.269521883 -0.732865948 [86] -0.819087694 1.823989567 -1.013461660 -1.291539569 0.432990810 [91] -1.372355385 -0.694218751 -0.248986406 -0.471104546 -0.054704963 [96] 0.645339523 -1.134145807 0.284600855 -0.180843072 -0.426218415 > rowSums(tmp2) [1] -0.353975401 1.540673994 1.097829040 -0.892561840 0.229792519 [6] -0.175009785 -0.527458796 1.106126233 -0.574785316 -0.843622175 [11] 2.783085788 1.094272544 0.369436957 0.560983929 -1.133093352 [16] -1.585258159 -0.854370657 -1.620511939 0.499762952 -0.995180364 [21] -0.766700601 0.003393156 -1.090077248 0.865742435 0.088857408 [26] 0.966175399 0.211848974 0.175534002 -1.589675435 -0.019432056 [31] -0.052603480 -1.543939923 0.378907544 -0.641198996 -0.187971376 [36] 0.595109274 -0.998095943 -1.239867145 1.445675967 2.385048781 [41] 1.287110382 -1.149834775 1.076790597 -0.011381914 0.275558041 [46] 2.239402465 0.771901422 -0.310280998 -0.696413292 0.044903423 [51] 0.244450161 -0.442491942 -0.120817198 -0.521337355 -0.326864560 [56] -0.547741869 0.631744445 -0.542223933 0.599333880 -0.110462149 [61] 0.720004086 0.050863954 -0.163208706 -0.086383063 -1.501490488 [66] 0.734259493 -0.018291809 -1.347438636 -0.003762811 -0.851143662 [71] 0.444888647 1.555618745 0.315500278 0.404451242 -0.718872229 [76] 1.762597034 0.198712166 0.593998558 -1.347326686 -0.725764323 [81] -0.330931026 0.107565907 0.279852809 -0.269521883 -0.732865948 [86] -0.819087694 1.823989567 -1.013461660 -1.291539569 0.432990810 [91] -1.372355385 -0.694218751 -0.248986406 -0.471104546 -0.054704963 [96] 0.645339523 -1.134145807 0.284600855 -0.180843072 -0.426218415 > 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.353975401 1.540673994 1.097829040 -0.892561840 0.229792519 [6] -0.175009785 -0.527458796 1.106126233 -0.574785316 -0.843622175 [11] 2.783085788 1.094272544 0.369436957 0.560983929 -1.133093352 [16] -1.585258159 -0.854370657 -1.620511939 0.499762952 -0.995180364 [21] -0.766700601 0.003393156 -1.090077248 0.865742435 0.088857408 [26] 0.966175399 0.211848974 0.175534002 -1.589675435 -0.019432056 [31] -0.052603480 -1.543939923 0.378907544 -0.641198996 -0.187971376 [36] 0.595109274 -0.998095943 -1.239867145 1.445675967 2.385048781 [41] 1.287110382 -1.149834775 1.076790597 -0.011381914 0.275558041 [46] 2.239402465 0.771901422 -0.310280998 -0.696413292 0.044903423 [51] 0.244450161 -0.442491942 -0.120817198 -0.521337355 -0.326864560 [56] -0.547741869 0.631744445 -0.542223933 0.599333880 -0.110462149 [61] 0.720004086 0.050863954 -0.163208706 -0.086383063 -1.501490488 [66] 0.734259493 -0.018291809 -1.347438636 -0.003762811 -0.851143662 [71] 0.444888647 1.555618745 0.315500278 0.404451242 -0.718872229 [76] 1.762597034 0.198712166 0.593998558 -1.347326686 -0.725764323 [81] -0.330931026 0.107565907 0.279852809 -0.269521883 -0.732865948 [86] -0.819087694 1.823989567 -1.013461660 -1.291539569 0.432990810 [91] -1.372355385 -0.694218751 -0.248986406 -0.471104546 -0.054704963 [96] 0.645339523 -1.134145807 0.284600855 -0.180843072 -0.426218415 > rowMin(tmp2) [1] -0.353975401 1.540673994 1.097829040 -0.892561840 0.229792519 [6] -0.175009785 -0.527458796 1.106126233 -0.574785316 -0.843622175 [11] 2.783085788 1.094272544 0.369436957 0.560983929 -1.133093352 [16] -1.585258159 -0.854370657 -1.620511939 0.499762952 -0.995180364 [21] -0.766700601 0.003393156 -1.090077248 0.865742435 0.088857408 [26] 0.966175399 0.211848974 0.175534002 -1.589675435 -0.019432056 [31] -0.052603480 -1.543939923 0.378907544 -0.641198996 -0.187971376 [36] 0.595109274 -0.998095943 -1.239867145 1.445675967 2.385048781 [41] 1.287110382 -1.149834775 1.076790597 -0.011381914 0.275558041 [46] 2.239402465 0.771901422 -0.310280998 -0.696413292 0.044903423 [51] 0.244450161 -0.442491942 -0.120817198 -0.521337355 -0.326864560 [56] -0.547741869 0.631744445 -0.542223933 0.599333880 -0.110462149 [61] 0.720004086 0.050863954 -0.163208706 -0.086383063 -1.501490488 [66] 0.734259493 -0.018291809 -1.347438636 -0.003762811 -0.851143662 [71] 0.444888647 1.555618745 0.315500278 0.404451242 -0.718872229 [76] 1.762597034 0.198712166 0.593998558 -1.347326686 -0.725764323 [81] -0.330931026 0.107565907 0.279852809 -0.269521883 -0.732865948 [86] -0.819087694 1.823989567 -1.013461660 -1.291539569 0.432990810 [91] -1.372355385 -0.694218751 -0.248986406 -0.471104546 -0.054704963 [96] 0.645339523 -1.134145807 0.284600855 -0.180843072 -0.426218415 > > colMeans(tmp2) [1] -0.04344222 > colSums(tmp2) [1] -4.344222 > colVars(tmp2) [1] 0.8518084 > colSd(tmp2) [1] 0.9229347 > colMax(tmp2) [1] 2.783086 > colMin(tmp2) [1] -1.620512 > colMedians(tmp2) [1] -0.07054401 > colRanges(tmp2) [,1] [1,] -1.620512 [2,] 2.783086 > > 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] -2.9975411 -3.7768376 -1.8656922 -1.9131650 -2.9024273 0.3000327 [7] 3.1426593 -2.9553930 -6.1360694 2.0977929 > colApply(tmp,quantile)[,1] [,1] [1,] -1.9582982 [2,] -0.5958373 [3,] -0.2886774 [4,] 0.1871211 [5,] 0.8425289 > > rowApply(tmp,sum) [1] 0.07699404 -0.84190186 -8.53781766 2.54766326 -3.16312656 -2.58605996 [7] -1.23418811 0.43435992 1.84502135 -5.54758505 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 4 3 6 7 1 3 6 7 9 7 [2,] 5 1 5 2 9 6 3 3 10 4 [3,] 3 8 3 1 7 9 5 4 4 9 [4,] 8 2 7 10 10 1 2 8 2 3 [5,] 7 9 4 9 2 2 1 6 5 5 [6,] 9 4 10 8 8 8 4 2 6 8 [7,] 2 5 9 6 3 10 10 1 8 10 [8,] 1 10 2 5 6 4 8 9 1 6 [9,] 6 7 1 3 5 5 7 5 3 2 [10,] 10 6 8 4 4 7 9 10 7 1 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.58019023 1.75887155 0.42167332 -4.82233437 -3.09599552 -1.82096780 [7] -0.33350339 -1.39134951 0.05436404 -2.98854254 -1.06592059 0.57685455 [13] -1.09536015 -2.30348218 -0.30984447 0.24460942 -1.36986249 -1.03974548 [19] -2.29756684 3.63323861 > colApply(tmp,quantile)[,1] [,1] [1,] -0.6858478 [2,] -0.5497248 [3,] 0.3893489 [4,] 0.4424370 [5,] 0.9839769 > > rowApply(tmp,sum) [1] 3.261275 -0.701859 -5.899456 -5.414822 -7.909811 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 16 15 17 6 11 [2,] 20 7 5 17 13 [3,] 17 4 4 19 15 [4,] 11 1 8 7 3 [5,] 7 5 1 12 10 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.9839769 2.3185700 1.0366438 0.5773110 -0.1712898 -1.5019505 [2,] 0.4424370 -0.3290051 -0.7983413 -2.8676180 -0.4210925 0.5682056 [3,] 0.3893489 -1.1385126 -1.1467900 -0.5417383 -1.6349097 -0.9024156 [4,] -0.6858478 0.7807942 1.1162022 -0.6823718 -0.2298216 -0.2027400 [5,] -0.5497248 0.1270251 0.2139586 -1.3079173 -0.6388819 0.2179327 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.2559970 -0.4103600 0.7860150 -0.8146598 -0.1458184 0.0328251 [2,] 1.1912371 -0.1525140 -1.0925169 0.3921458 0.4285506 -0.1461158 [3,] -1.2445802 0.3898991 0.3730917 -0.2131649 -1.2297584 0.1970524 [4,] -0.6552588 -0.4134219 -1.0553801 -1.4214810 -0.3179604 -0.2575174 [5,] -0.8808985 -0.8049526 1.0431543 -0.9313826 0.1990660 0.7506102 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.7324873 -2.1986770 -1.6406970 0.32109386 0.9597047 0.6505714 [2,] 0.2995790 -0.3794584 1.0584026 0.07596941 0.5405545 0.4342361 [3,] -0.5108026 0.2924109 -0.4844595 -1.06763298 0.4169048 -0.1612713 [4,] -1.0955587 0.8179424 0.0263843 2.30394000 -2.0998400 0.2452811 [5,] -0.5210652 -0.8357000 0.7305252 -1.38876089 -1.1871866 -2.2085627 [,19] [,20] [1,] 1.2474823 -0.75795096 [2,] -1.2971937 1.35067901 [3,] 0.1380845 2.17978805 [4,] -1.6320296 0.04386244 [5,] -0.7539103 0.81686007 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 654 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 566 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -0.3297593 0.2813691 1.36039 0.8427844 0.7780208 0.07874503 0.1820937 col8 col9 col10 col11 col12 col13 col14 row1 0.3014242 -1.27304 -0.3449505 -0.231294 -0.05774713 -1.192346 -0.3202395 col15 col16 col17 col18 col19 col20 row1 -1.004611 -0.4904995 -0.7279696 -0.006550517 -1.52215 0.3610228 > tmp[,"col10"] col10 row1 -0.34495050 row2 -0.07557987 row3 1.55772434 row4 0.66494657 row5 0.20132242 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.3297593 0.2813691 1.3603904 0.8427844 0.7780208 0.07874503 0.1820937 row5 -0.9129524 0.2871039 -0.6610207 0.7805834 1.4839660 0.36537964 0.8783088 col8 col9 col10 col11 col12 col13 row1 0.3014242 -1.2730399 -0.3449505 -0.2312940 -0.05774713 -1.19234648 row5 -0.1384106 -0.4421205 0.2013224 0.2405684 -0.53235689 0.05514562 col14 col15 col16 col17 col18 col19 row1 -0.3202395 -1.004611 -0.4904995 -0.7279696 -0.006550517 -1.522150 row5 0.6160778 1.476963 0.6848553 -0.9161581 -0.375839312 -1.213456 col20 row1 0.3610228 row5 1.1715416 > tmp[,c("col6","col20")] col6 col20 row1 0.07874503 0.3610228 row2 0.58962536 -0.4654462 row3 -1.93316132 0.4044694 row4 -1.09186655 -0.3711636 row5 0.36537964 1.1715416 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.07874503 0.3610228 row5 0.36537964 1.1715416 > > > > > 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 49.10996 49.23391 51.74983 52.26823 50.55796 106.3921 48.99298 50.4115 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.99395 49.43598 49.39331 49.59602 50.35502 51.34596 52.75281 50.26453 col17 col18 col19 col20 row1 50.3486 50.90601 51.12758 105.8165 > tmp[,"col10"] col10 row1 49.43598 row2 31.02592 row3 29.74029 row4 28.90999 row5 49.73763 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.10996 49.23391 51.74983 52.26823 50.55796 106.3921 48.99298 50.4115 row5 50.31602 50.52478 49.47958 50.65981 50.73903 104.7627 49.80063 49.0415 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.99395 49.43598 49.39331 49.59602 50.35502 51.34596 52.75281 50.26453 row5 50.25291 49.73763 49.72777 49.55975 49.06365 51.30908 49.65688 50.21424 col17 col18 col19 col20 row1 50.34860 50.90601 51.12758 105.8165 row5 51.32885 50.77309 49.69152 104.3136 > tmp[,c("col6","col20")] col6 col20 row1 106.39213 105.81647 row2 76.79546 74.93739 row3 75.15395 75.18667 row4 73.60811 77.46042 row5 104.76271 104.31364 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 106.3921 105.8165 row5 104.7627 104.3136 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 106.3921 105.8165 row5 104.7627 104.3136 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 1.3680033 [2,] 1.2805500 [3,] 0.1168829 [4,] 0.7957150 [5,] -1.2428947 > tmp[,c("col17","col7")] col17 col7 [1,] 0.04865257 -0.4397550 [2,] -0.34165077 0.2861042 [3,] -0.30528528 -1.5536500 [4,] 0.73737744 -1.3880836 [5,] 0.18096387 -0.4764405 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.578317754 -0.88576539 [2,] -0.343129954 -0.52083398 [3,] -0.003585133 1.83971888 [4,] 1.759479604 -0.08823069 [5,] 2.145538546 0.81372602 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.5783178 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.5783178 [2,] -0.3431300 > > > > 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 2.030535 0.6265028 -1.36041002 0.06741511 0.354102 -1.892658 2.3300640 row1 -1.719113 -0.6149372 0.03367427 0.16583181 1.702503 -1.321226 -0.0259368 [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.3633687 1.4817530 2.083426 0.0662923 -0.09047617 0.744569482 row1 -0.6010229 0.2281823 -1.082368 -1.5935906 0.93030276 0.005543078 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 -0.1579962 -0.6145369 -0.4054111 -1.783342 2.251916 0.6002004 0.704563 row1 0.1791345 1.3319804 1.4556219 -1.259222 1.331807 0.4158561 1.102461 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -2.677628 -0.1011881 -0.6254568 -1.573886 2.05058 1.118243 -0.9042892 [,8] [,9] [,10] row2 0.9117723 1.344339 1.164975 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.3913563 -1.58928 0.8220005 -0.8437049 1.000842 -0.3328775 1.688987 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.863948 1.147821 -0.7177905 0.3480566 -1.752614 0.720382 -0.002912821 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.6522107 0.458269 1.151582 0.5488211 0.1823725 -0.8691731 > > > 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: 0x3e7a0e40> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c274af4b9d" [2] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c271189f258" [3] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c273d94acd" [4] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c277b24fec1" [5] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c276bf4c634" [6] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c27579bf682" [7] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c273f864e83" [8] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c2760252c18" [9] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c274aac2f71" [10] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c2765ed42c1" [11] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c271ae91018" [12] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c271553e7ab" [13] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c276c6d6f6" [14] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c2731ed8c5d" [15] "/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM3d0c2712db218d" > > > ### 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: 0x3c7fd100> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x3c7fd100> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x3c7fd100> > rowMedians(tmp) [1] 0.050540965 -0.242200320 0.352060522 0.388857201 0.247330089 [6] 0.297673054 0.476877224 -0.100187580 -0.194502272 -0.360215284 [11] -0.164005710 -0.126843010 0.027681862 -0.258755030 0.220941939 [16] 0.168736925 -0.027608768 0.051427436 0.218677026 0.618416210 [21] 0.020326788 -0.020171158 -0.294898173 0.471708757 0.237839236 [26] -0.091390513 0.205283633 0.503050791 0.191557117 0.340633753 [31] -0.028852952 -0.080369230 -0.246452061 -0.061688673 -0.494782475 [36] 0.100999465 -0.094063410 -0.461647395 0.339265482 0.486729062 [41] 0.006911643 0.079485785 -0.075600440 -0.428009902 0.480908222 [46] 0.763002552 0.199865196 -0.321108061 -0.047075353 -0.087263441 [51] 0.346940112 0.075311958 0.422616945 -0.294882866 -0.118139571 [56] 0.188228708 -0.088301974 0.615161559 -0.099633842 0.283410584 [61] 0.298500936 -0.613619046 -0.001123453 -0.380966689 -0.008090170 [66] 0.320921899 -0.149310221 -0.117811349 -0.231174390 0.394135914 [71] 0.311744197 0.465088328 0.600876944 -0.100576882 -0.075328367 [76] -0.111872968 -0.002910107 -0.203279856 -0.089729198 -0.339244319 [81] 0.415399181 0.072295010 -0.230732217 -0.190355008 -0.627953574 [86] 0.095841959 0.119522894 0.112948420 0.153494642 0.315883656 [91] 0.482835627 0.821815516 -0.060668963 0.522580554 0.274688578 [96] -0.118914870 -0.307300346 -0.062758065 0.441157923 -0.342750396 [101] -0.380606270 -0.012410214 -0.458563783 -0.045642146 -0.235848319 [106] 0.246523017 -0.314968377 -0.155448446 0.094987280 -0.501470016 [111] 0.014616680 0.255190832 -0.390768676 -0.242056934 0.179255725 [116] 0.006320181 0.611371289 0.287886238 0.211849133 -0.101045431 [121] 0.155371654 0.072339196 0.348564289 0.139961948 0.355213063 [126] 0.501102954 0.511130608 -0.143631530 0.112990499 -0.093052011 [131] -0.327360661 -0.345407629 -0.058796730 -0.335259480 -0.151847170 [136] -0.276977528 -0.436298843 -0.175096399 0.009188907 0.082353235 [141] 0.134894205 0.138669954 0.070175518 -0.286337250 0.030658986 [146] -0.107407741 0.496351218 0.259272003 -0.544036947 0.294144294 [151] 0.148203359 -0.432398999 0.364973282 -0.167743922 0.524429065 [156] -0.556284467 -0.384617331 0.437369785 -0.488375621 -0.457730865 [161] 0.028670376 0.037771499 -0.679089484 -0.270765469 -0.087212700 [166] 0.254753497 -0.421889642 -0.041904079 -0.520760632 0.162997283 [171] -0.205988897 0.457306745 0.290315974 0.533313910 -0.393450072 [176] -0.198614621 0.089056561 -0.112891963 0.002671861 -0.194554811 [181] -0.204226801 0.431264028 0.012343447 0.098570270 0.448928802 [186] -0.179109893 -0.466409955 0.159308157 0.401007124 0.267262732 [191] -0.564878029 -0.328637182 -0.150327644 0.141239426 -0.453385371 [196] 0.219693839 -0.481441640 0.580279898 -0.078488217 -0.267798736 [201] -0.680898963 -0.408964077 0.223283172 0.091663776 -0.604270117 [206] 0.122967258 0.180825965 -0.141242408 0.146841510 0.137606141 [211] 0.083044806 0.058618701 -0.296519716 0.221822261 0.252552201 [216] -0.144456620 -0.841956752 0.165577570 -0.337765278 -0.318707229 [221] -0.252418766 -0.038357631 -0.249426995 -0.112605583 0.367535693 [226] -0.258529339 0.202699540 -0.174424999 -0.513438133 0.055968777 > > proc.time() user system elapsed 2.010 0.868 2.895
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: 0x11acfa40> > .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: 0x11acfa40> > .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: 0x11acfa40> > .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: 0x11acfa40> > 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: 0x1086eb80> > .Call("R_bm_AddColumn",P) <pointer: 0x1086eb80> > .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: 0x1086eb80> > .Call("R_bm_AddColumn",P) <pointer: 0x1086eb80> > .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: 0x1086eb80> > 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: 0x11d86700> > .Call("R_bm_AddColumn",P) <pointer: 0x11d86700> > .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: 0x11d86700> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x11d86700> > .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: 0x11d86700> > > .Call("R_bm_RowMode",P) <pointer: 0x11d86700> > .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: 0x11d86700> > > .Call("R_bm_ColMode",P) <pointer: 0x11d86700> > .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: 0x11d86700> > 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: 0x13236960> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x13236960> > .Call("R_bm_AddColumn",P) <pointer: 0x13236960> > .Call("R_bm_AddColumn",P) <pointer: 0x13236960> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3d0cbc396213e" "BufferedMatrixFile3d0cbc4e29c299" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile3d0cbc396213e" "BufferedMatrixFile3d0cbc4e29c299" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x12aab740> > .Call("R_bm_AddColumn",P) <pointer: 0x12aab740> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x12aab740> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x12aab740> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x12aab740> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x12aab740> > .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: 0x12abdf30> > .Call("R_bm_AddColumn",P) <pointer: 0x12abdf30> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x12abdf30> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x12abdf30> > 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: 0x12ac8110> > .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: 0x12ac8110> > rm(P) > > proc.time() user system elapsed 0.326 0.032 0.344
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.315 0.040 0.340