Back to Multiple platform build/check report for BioC 3.19: simplified long |
|
This page was generated on 2024-05-04 11:40:19 -0400 (Sat, 04 May 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.4.0 beta (2024-04-15 r86425) -- "Puppy Cup" | 4753 |
palomino3 | Windows Server 2022 Datacenter | x64 | 4.4.0 beta (2024-04-15 r86425 ucrt) -- "Puppy Cup" | 4486 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.4.0 beta (2024-04-14 r86421) -- "Puppy Cup" | 4519 |
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) | aarch64 | 4.4.0 beta (2024-04-15 r86425) -- "Puppy Cup" | 4479 |
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 249/2300 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.68.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino3 | 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 | ||||||||||
kjohnson3 | macOS 13.6.5 Ventura / arm64 | see weekly results here | ||||||||||||
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.68.0 |
Command: /home/biocbuild/R/R-beta-2024-04-15_r86425/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R-beta-2024-04-15_r86425/site-library --no-vignettes --timings BufferedMatrix_1.68.0.tar.gz |
StartedAt: 2024-05-04 05:34:01 -0000 (Sat, 04 May 2024) |
EndedAt: 2024-05-04 05:34:26 -0000 (Sat, 04 May 2024) |
EllapsedTime: 25.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/R/R-beta-2024-04-15_r86425/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R-beta-2024-04-15_r86425/site-library --no-vignettes --timings BufferedMatrix_1.68.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.4.0 beta (2024-04-15 r86425) * using platform: aarch64-unknown-linux-gnu * R was compiled by gcc (GCC) 10.3.1 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.68.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.19-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/R/R-beta-2024-04-15_r86425/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/R/R-beta-2024-04-15_r86425/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘gcc (GCC) 10.3.1’ gcc -I"/home/biocbuild/R/R-beta-2024-04-15_r86425/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"/home/biocbuild/R/R-beta-2024-04-15_r86425/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-beta-2024-04-15_r86425/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-beta-2024-04-15_r86425/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-beta-2024-04-15_r86425/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/R/R-beta-2024-04-15_r86425/lib -lR installing to /home/biocbuild/R/R-beta-2024-04-15_r86425/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.0 beta (2024-04-15 r86425) -- "Puppy Cup" 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.332 0.030 0.347
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.0 beta (2024-04-15 r86425) -- "Puppy Cup" 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.19-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 1026212 54.9 643448 34.4 Vcells 872066 6.7 8388608 64.0 2045060 15.7 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Sat May 4 05:34:20 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 May 4 05:34:20 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: 0x19b04ed0> > > > > 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 May 4 05:34:21 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 May 4 05:34:21 2024" > > ColMode(tmp2) <pointer: 0x19b04ed0> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.4680889 -0.4452851 -0.49323946 -0.6230645 [2,] 0.6126193 0.7308491 0.17820573 1.5790213 [3,] 1.3514504 -0.4540252 -0.06055187 -1.1952946 [4,] -0.2194139 -1.1620313 -0.59396826 -1.0383918 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.19-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,] 100.4680889 0.4452851 0.49323946 0.6230645 [2,] 0.6126193 0.7308491 0.17820573 1.5790213 [3,] 1.3514504 0.4540252 0.06055187 1.1952946 [4,] 0.2194139 1.1620313 0.59396826 1.0383918 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.19-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,] 10.0233771 0.6672968 0.7023101 0.7893444 [2,] 0.7827000 0.8548971 0.4221442 1.2565911 [3,] 1.1625190 0.6738139 0.2460729 1.0932953 [4,] 0.4684164 1.0779755 0.7706934 1.0190151 > > 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.19-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,] 225.70186 32.11825 32.51634 33.51651 [2,] 33.43962 34.27982 29.39965 39.14493 [3,] 37.97664 32.19216 27.52128 37.12825 [4,] 29.90358 36.94179 33.30090 36.22854 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x191abb90> > exp(tmp5) <pointer: 0x191abb90> > log(tmp5,2) <pointer: 0x191abb90> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 469.7689 > Min(tmp5) [1] 52.86886 > mean(tmp5) [1] 72.81966 > Sum(tmp5) [1] 14563.93 > Var(tmp5) [1] 856.7321 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 92.05115 69.58629 72.36161 70.66549 71.71074 70.55566 70.52459 71.27833 [9] 70.62302 68.83971 > rowSums(tmp5) [1] 1841.023 1391.726 1447.232 1413.310 1434.215 1411.113 1410.492 1425.567 [9] 1412.460 1376.794 > rowVars(tmp5) [1] 7935.18392 36.48379 75.88438 40.66825 87.67641 84.08940 [7] 85.48011 29.37531 87.52137 68.86431 > rowSd(tmp5) [1] 89.079649 6.040182 8.711164 6.377166 9.363568 9.170027 9.245545 [8] 5.419899 9.355286 8.298452 > rowMax(tmp5) [1] 469.76885 81.47505 86.52465 87.44324 87.03668 86.50439 84.68741 [8] 81.57681 85.72992 87.77240 > rowMin(tmp5) [1] 65.32556 57.85192 57.28194 61.76295 57.67022 53.54635 52.86886 59.74510 [9] 55.11824 56.57582 > > colMeans(tmp5) [1] 108.62871 72.74602 71.72512 70.38731 70.99831 68.21728 70.28642 [8] 70.94590 71.79077 68.64485 72.47530 71.26085 69.76789 70.74046 [15] 71.13582 70.30203 73.43446 71.54632 71.24599 70.11335 > colSums(tmp5) [1] 1086.2871 727.4602 717.2512 703.8731 709.9831 682.1728 702.8642 [8] 709.4590 717.9077 686.4485 724.7530 712.6085 697.6789 707.4046 [15] 711.3582 703.0203 734.3446 715.4632 712.4599 701.1335 > colVars(tmp5) [1] 16164.61335 26.64596 112.66100 64.56357 39.60421 70.72032 [7] 76.27868 65.03810 33.32285 68.08925 43.18762 54.33052 [13] 103.50713 100.71292 83.67758 83.01679 71.85170 73.83286 [19] 52.11171 22.77640 > colSd(tmp5) [1] 127.140133 5.161973 10.614189 8.035146 6.293188 8.409537 [7] 8.733767 8.064620 5.772595 8.251621 6.571729 7.370924 [13] 10.173845 10.035582 9.147545 9.111355 8.476538 8.592605 [19] 7.218844 4.772463 > colMax(tmp5) [1] 469.76885 83.45737 85.83997 81.47505 78.96389 84.32762 87.77240 [8] 85.82677 80.68390 81.36715 79.82846 82.23020 87.44324 84.77831 [15] 86.50439 84.68741 86.52465 85.49814 87.03668 78.88591 > colMin(tmp5) [1] 59.74510 66.84994 57.28194 55.11824 62.39668 53.54635 56.20180 59.21284 [9] 61.54520 55.87246 57.85192 61.63153 52.86886 56.57582 60.54947 58.05923 [17] 60.79885 57.23851 63.93505 64.11238 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] NA 69.58629 72.36161 70.66549 71.71074 70.55566 70.52459 71.27833 [9] 70.62302 68.83971 > rowSums(tmp5) [1] NA 1391.726 1447.232 1413.310 1434.215 1411.113 1410.492 1425.567 [9] 1412.460 1376.794 > rowVars(tmp5) [1] 8371.45113 36.48379 75.88438 40.66825 87.67641 84.08940 [7] 85.48011 29.37531 87.52137 68.86431 > rowSd(tmp5) [1] 91.495635 6.040182 8.711164 6.377166 9.363568 9.170027 9.245545 [8] 5.419899 9.355286 8.298452 > rowMax(tmp5) [1] NA 81.47505 86.52465 87.44324 87.03668 86.50439 84.68741 81.57681 [9] 85.72992 87.77240 > rowMin(tmp5) [1] NA 57.85192 57.28194 61.76295 57.67022 53.54635 52.86886 59.74510 [9] 55.11824 56.57582 > > colMeans(tmp5) [1] 108.62871 72.74602 71.72512 70.38731 70.99831 68.21728 70.28642 [8] 70.94590 71.79077 68.64485 72.47530 71.26085 69.76789 70.74046 [15] 71.13582 NA 73.43446 71.54632 71.24599 70.11335 > colSums(tmp5) [1] 1086.2871 727.4602 717.2512 703.8731 709.9831 682.1728 702.8642 [8] 709.4590 717.9077 686.4485 724.7530 712.6085 697.6789 707.4046 [15] 711.3582 NA 734.3446 715.4632 712.4599 701.1335 > colVars(tmp5) [1] 16164.61335 26.64596 112.66100 64.56357 39.60421 70.72032 [7] 76.27868 65.03810 33.32285 68.08925 43.18762 54.33052 [13] 103.50713 100.71292 83.67758 NA 71.85170 73.83286 [19] 52.11171 22.77640 > colSd(tmp5) [1] 127.140133 5.161973 10.614189 8.035146 6.293188 8.409537 [7] 8.733767 8.064620 5.772595 8.251621 6.571729 7.370924 [13] 10.173845 10.035582 9.147545 NA 8.476538 8.592605 [19] 7.218844 4.772463 > colMax(tmp5) [1] 469.76885 83.45737 85.83997 81.47505 78.96389 84.32762 87.77240 [8] 85.82677 80.68390 81.36715 79.82846 82.23020 87.44324 84.77831 [15] 86.50439 NA 86.52465 85.49814 87.03668 78.88591 > colMin(tmp5) [1] 59.74510 66.84994 57.28194 55.11824 62.39668 53.54635 56.20180 59.21284 [9] 61.54520 55.87246 57.85192 61.63153 52.86886 56.57582 60.54947 NA [17] 60.79885 57.23851 63.93505 64.11238 > > Max(tmp5,na.rm=TRUE) [1] 469.7689 > Min(tmp5,na.rm=TRUE) [1] 52.86886 > mean(tmp5,na.rm=TRUE) [1] 72.76747 > Sum(tmp5,na.rm=TRUE) [1] 14480.73 > Var(tmp5,na.rm=TRUE) [1] 860.5116 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.51674 69.58629 72.36161 70.66549 71.71074 70.55566 70.52459 71.27833 [9] 70.62302 68.83971 > rowSums(tmp5,na.rm=TRUE) [1] 1757.818 1391.726 1447.232 1413.310 1434.215 1411.113 1410.492 1425.567 [9] 1412.460 1376.794 > rowVars(tmp5,na.rm=TRUE) [1] 8371.45113 36.48379 75.88438 40.66825 87.67641 84.08940 [7] 85.48011 29.37531 87.52137 68.86431 > rowSd(tmp5,na.rm=TRUE) [1] 91.495635 6.040182 8.711164 6.377166 9.363568 9.170027 9.245545 [8] 5.419899 9.355286 8.298452 > rowMax(tmp5,na.rm=TRUE) [1] 469.76885 81.47505 86.52465 87.44324 87.03668 86.50439 84.68741 [8] 81.57681 85.72992 87.77240 > rowMin(tmp5,na.rm=TRUE) [1] 65.32556 57.85192 57.28194 61.76295 57.67022 53.54635 52.86886 59.74510 [9] 55.11824 56.57582 > > colMeans(tmp5,na.rm=TRUE) [1] 108.62871 72.74602 71.72512 70.38731 70.99831 68.21728 70.28642 [8] 70.94590 71.79077 68.64485 72.47530 71.26085 69.76789 70.74046 [15] 71.13582 68.86837 73.43446 71.54632 71.24599 70.11335 > colSums(tmp5,na.rm=TRUE) [1] 1086.2871 727.4602 717.2512 703.8731 709.9831 682.1728 702.8642 [8] 709.4590 717.9077 686.4485 724.7530 712.6085 697.6789 707.4046 [15] 711.3582 619.8153 734.3446 715.4632 712.4599 701.1335 > colVars(tmp5,na.rm=TRUE) [1] 16164.61335 26.64596 112.66100 64.56357 39.60421 70.72032 [7] 76.27868 65.03810 33.32285 68.08925 43.18762 54.33052 [13] 103.50713 100.71292 83.67758 70.27093 71.85170 73.83286 [19] 52.11171 22.77640 > colSd(tmp5,na.rm=TRUE) [1] 127.140133 5.161973 10.614189 8.035146 6.293188 8.409537 [7] 8.733767 8.064620 5.772595 8.251621 6.571729 7.370924 [13] 10.173845 10.035582 9.147545 8.382776 8.476538 8.592605 [19] 7.218844 4.772463 > colMax(tmp5,na.rm=TRUE) [1] 469.76885 83.45737 85.83997 81.47505 78.96389 84.32762 87.77240 [8] 85.82677 80.68390 81.36715 79.82846 82.23020 87.44324 84.77831 [15] 86.50439 84.68741 86.52465 85.49814 87.03668 78.88591 > colMin(tmp5,na.rm=TRUE) [1] 59.74510 66.84994 57.28194 55.11824 62.39668 53.54635 56.20180 59.21284 [9] 61.54520 55.87246 57.85192 61.63153 52.86886 56.57582 60.54947 58.05923 [17] 60.79885 57.23851 63.93505 64.11238 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] NaN 69.58629 72.36161 70.66549 71.71074 70.55566 70.52459 71.27833 [9] 70.62302 68.83971 > rowSums(tmp5,na.rm=TRUE) [1] 0.000 1391.726 1447.232 1413.310 1434.215 1411.113 1410.492 1425.567 [9] 1412.460 1376.794 > rowVars(tmp5,na.rm=TRUE) [1] NA 36.48379 75.88438 40.66825 87.67641 84.08940 85.48011 29.37531 [9] 87.52137 68.86431 > rowSd(tmp5,na.rm=TRUE) [1] NA 6.040182 8.711164 6.377166 9.363568 9.170027 9.245545 5.419899 [9] 9.355286 8.298452 > rowMax(tmp5,na.rm=TRUE) [1] NA 81.47505 86.52465 87.44324 87.03668 86.50439 84.68741 81.57681 [9] 85.72992 87.77240 > rowMin(tmp5,na.rm=TRUE) [1] NA 57.85192 57.28194 61.76295 57.67022 53.54635 52.86886 59.74510 [9] 55.11824 56.57582 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 68.50202 73.40114 72.17474 70.45699 70.47718 67.83546 70.83763 70.80199 [9] 71.46042 68.53493 72.02292 71.72805 68.68585 69.18070 70.77304 NaN [17] 73.85845 71.80322 71.83983 70.41354 > colSums(tmp5,na.rm=TRUE) [1] 616.5182 660.6103 649.5727 634.1129 634.2947 610.5192 637.5387 637.2179 [9] 643.1438 616.8144 648.2063 645.5525 618.1726 622.6263 636.9574 0.0000 [17] 664.7260 646.2290 646.5585 633.7219 > colVars(tmp5,na.rm=TRUE) [1] 70.99504 25.14840 124.46930 72.57940 41.49952 77.92027 82.39544 [8] 72.93485 36.26055 76.46448 46.28386 58.66613 103.27388 85.93244 [15] 92.65673 NA 78.81086 82.31946 54.65838 24.60963 > colSd(tmp5,na.rm=TRUE) [1] 8.425856 5.014818 11.156581 8.519354 6.442012 8.827246 9.077193 [8] 8.540190 6.021674 8.744397 6.803224 7.659382 10.162376 9.269975 [15] 9.625836 NA 8.877548 9.073007 7.393131 4.960810 > colMax(tmp5,na.rm=TRUE) [1] 82.19889 83.45737 85.83997 81.47505 78.96389 84.32762 87.77240 85.82677 [9] 80.68390 81.36715 79.82846 82.23020 87.44324 83.23540 86.50439 -Inf [17] 86.52465 85.49814 87.03668 78.88591 > colMin(tmp5,na.rm=TRUE) [1] 59.74510 67.00377 57.28194 55.11824 62.39668 53.54635 56.20180 59.21284 [9] 61.54520 55.87246 57.85192 61.63153 52.86886 56.57582 60.54947 Inf [17] 60.79885 57.23851 63.93505 64.11238 > > > > > 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] 269.5714 319.5000 171.2762 287.8408 266.4857 172.2271 314.7419 312.4041 [9] 237.8906 230.3943 > apply(copymatrix,1,var,na.rm=TRUE) [1] 269.5714 319.5000 171.2762 287.8408 266.4857 172.2271 314.7419 312.4041 [9] 237.8906 230.3943 > > > > 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 -5.684342e-14 0.000000e+00 7.105427e-14 1.421085e-14 [6] -2.842171e-14 5.684342e-14 1.136868e-13 0.000000e+00 -1.421085e-13 [11] 0.000000e+00 1.421085e-13 -1.989520e-13 5.684342e-14 5.684342e-14 [16] 0.000000e+00 -1.421085e-13 2.842171e-14 5.684342e-14 -2.842171e-13 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 4 9 3 19 9 8 2 6 4 19 9 5 7 18 2 8 6 9 6 9 1 20 4 14 3 10 2 20 5 11 2 1 6 4 7 19 3 3 2 12 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.215006 > Min(tmp) [1] -3.035438 > mean(tmp) [1] -0.08192893 > Sum(tmp) [1] -8.192893 > Var(tmp) [1] 0.9848143 > > rowMeans(tmp) [1] -0.08192893 > rowSums(tmp) [1] -8.192893 > rowVars(tmp) [1] 0.9848143 > rowSd(tmp) [1] 0.9923781 > rowMax(tmp) [1] 2.215006 > rowMin(tmp) [1] -3.035438 > > colMeans(tmp) [1] -0.890312479 0.986659819 1.614931594 0.162277738 0.069283017 [6] -0.145152142 -0.695392779 -0.351915272 -0.147305494 0.891955879 [11] -2.301978909 0.102642382 0.839576516 -0.021335671 0.163465981 [16] -0.807503435 0.137893117 0.305052626 -1.618874936 -0.883077106 [21] -0.524165928 0.863545199 -0.658709066 1.740575047 -1.060640656 [26] -0.010554454 1.221588425 -0.225604690 -0.204647764 0.563353603 [31] -0.183300627 -0.341057800 1.186912190 1.084676042 -0.529524113 [36] 0.684288475 0.319132902 -0.680864280 -0.405608849 -1.401320150 [41] -0.276645161 1.211291158 -1.792915773 -3.035437626 -0.022364175 [46] 1.027549548 0.739521432 -0.305445648 -0.777987951 0.771570420 [51] -0.871003977 -1.205544164 0.917283914 0.861259741 -0.671202550 [56] 0.495447564 0.086334140 -0.950082848 2.166610761 -1.120223012 [61] 0.029302646 0.468824829 -1.147519060 0.612241406 -0.009628447 [66] -1.404924785 -0.803645414 -1.426167351 1.687049500 -0.595533271 [71] 0.647058952 -0.302737767 -0.594917143 -0.178130022 -1.303854182 [76] 1.454947285 0.105578895 -0.994937657 0.270250201 1.268699958 [81] 2.215006493 -1.893380502 1.205122458 -1.145303967 1.037625404 [86] -1.392426178 -0.616838793 -0.270211039 0.658996137 -1.041747460 [91] -0.012556569 0.384904476 0.827089151 0.935957614 -1.842657254 [96] 0.539691998 0.184035753 -0.354860554 -0.999441817 -0.490837113 > colSums(tmp) [1] -0.890312479 0.986659819 1.614931594 0.162277738 0.069283017 [6] -0.145152142 -0.695392779 -0.351915272 -0.147305494 0.891955879 [11] -2.301978909 0.102642382 0.839576516 -0.021335671 0.163465981 [16] -0.807503435 0.137893117 0.305052626 -1.618874936 -0.883077106 [21] -0.524165928 0.863545199 -0.658709066 1.740575047 -1.060640656 [26] -0.010554454 1.221588425 -0.225604690 -0.204647764 0.563353603 [31] -0.183300627 -0.341057800 1.186912190 1.084676042 -0.529524113 [36] 0.684288475 0.319132902 -0.680864280 -0.405608849 -1.401320150 [41] -0.276645161 1.211291158 -1.792915773 -3.035437626 -0.022364175 [46] 1.027549548 0.739521432 -0.305445648 -0.777987951 0.771570420 [51] -0.871003977 -1.205544164 0.917283914 0.861259741 -0.671202550 [56] 0.495447564 0.086334140 -0.950082848 2.166610761 -1.120223012 [61] 0.029302646 0.468824829 -1.147519060 0.612241406 -0.009628447 [66] -1.404924785 -0.803645414 -1.426167351 1.687049500 -0.595533271 [71] 0.647058952 -0.302737767 -0.594917143 -0.178130022 -1.303854182 [76] 1.454947285 0.105578895 -0.994937657 0.270250201 1.268699958 [81] 2.215006493 -1.893380502 1.205122458 -1.145303967 1.037625404 [86] -1.392426178 -0.616838793 -0.270211039 0.658996137 -1.041747460 [91] -0.012556569 0.384904476 0.827089151 0.935957614 -1.842657254 [96] 0.539691998 0.184035753 -0.354860554 -0.999441817 -0.490837113 > 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.890312479 0.986659819 1.614931594 0.162277738 0.069283017 [6] -0.145152142 -0.695392779 -0.351915272 -0.147305494 0.891955879 [11] -2.301978909 0.102642382 0.839576516 -0.021335671 0.163465981 [16] -0.807503435 0.137893117 0.305052626 -1.618874936 -0.883077106 [21] -0.524165928 0.863545199 -0.658709066 1.740575047 -1.060640656 [26] -0.010554454 1.221588425 -0.225604690 -0.204647764 0.563353603 [31] -0.183300627 -0.341057800 1.186912190 1.084676042 -0.529524113 [36] 0.684288475 0.319132902 -0.680864280 -0.405608849 -1.401320150 [41] -0.276645161 1.211291158 -1.792915773 -3.035437626 -0.022364175 [46] 1.027549548 0.739521432 -0.305445648 -0.777987951 0.771570420 [51] -0.871003977 -1.205544164 0.917283914 0.861259741 -0.671202550 [56] 0.495447564 0.086334140 -0.950082848 2.166610761 -1.120223012 [61] 0.029302646 0.468824829 -1.147519060 0.612241406 -0.009628447 [66] -1.404924785 -0.803645414 -1.426167351 1.687049500 -0.595533271 [71] 0.647058952 -0.302737767 -0.594917143 -0.178130022 -1.303854182 [76] 1.454947285 0.105578895 -0.994937657 0.270250201 1.268699958 [81] 2.215006493 -1.893380502 1.205122458 -1.145303967 1.037625404 [86] -1.392426178 -0.616838793 -0.270211039 0.658996137 -1.041747460 [91] -0.012556569 0.384904476 0.827089151 0.935957614 -1.842657254 [96] 0.539691998 0.184035753 -0.354860554 -0.999441817 -0.490837113 > colMin(tmp) [1] -0.890312479 0.986659819 1.614931594 0.162277738 0.069283017 [6] -0.145152142 -0.695392779 -0.351915272 -0.147305494 0.891955879 [11] -2.301978909 0.102642382 0.839576516 -0.021335671 0.163465981 [16] -0.807503435 0.137893117 0.305052626 -1.618874936 -0.883077106 [21] -0.524165928 0.863545199 -0.658709066 1.740575047 -1.060640656 [26] -0.010554454 1.221588425 -0.225604690 -0.204647764 0.563353603 [31] -0.183300627 -0.341057800 1.186912190 1.084676042 -0.529524113 [36] 0.684288475 0.319132902 -0.680864280 -0.405608849 -1.401320150 [41] -0.276645161 1.211291158 -1.792915773 -3.035437626 -0.022364175 [46] 1.027549548 0.739521432 -0.305445648 -0.777987951 0.771570420 [51] -0.871003977 -1.205544164 0.917283914 0.861259741 -0.671202550 [56] 0.495447564 0.086334140 -0.950082848 2.166610761 -1.120223012 [61] 0.029302646 0.468824829 -1.147519060 0.612241406 -0.009628447 [66] -1.404924785 -0.803645414 -1.426167351 1.687049500 -0.595533271 [71] 0.647058952 -0.302737767 -0.594917143 -0.178130022 -1.303854182 [76] 1.454947285 0.105578895 -0.994937657 0.270250201 1.268699958 [81] 2.215006493 -1.893380502 1.205122458 -1.145303967 1.037625404 [86] -1.392426178 -0.616838793 -0.270211039 0.658996137 -1.041747460 [91] -0.012556569 0.384904476 0.827089151 0.935957614 -1.842657254 [96] 0.539691998 0.184035753 -0.354860554 -0.999441817 -0.490837113 > colMedians(tmp) [1] -0.890312479 0.986659819 1.614931594 0.162277738 0.069283017 [6] -0.145152142 -0.695392779 -0.351915272 -0.147305494 0.891955879 [11] -2.301978909 0.102642382 0.839576516 -0.021335671 0.163465981 [16] -0.807503435 0.137893117 0.305052626 -1.618874936 -0.883077106 [21] -0.524165928 0.863545199 -0.658709066 1.740575047 -1.060640656 [26] -0.010554454 1.221588425 -0.225604690 -0.204647764 0.563353603 [31] -0.183300627 -0.341057800 1.186912190 1.084676042 -0.529524113 [36] 0.684288475 0.319132902 -0.680864280 -0.405608849 -1.401320150 [41] -0.276645161 1.211291158 -1.792915773 -3.035437626 -0.022364175 [46] 1.027549548 0.739521432 -0.305445648 -0.777987951 0.771570420 [51] -0.871003977 -1.205544164 0.917283914 0.861259741 -0.671202550 [56] 0.495447564 0.086334140 -0.950082848 2.166610761 -1.120223012 [61] 0.029302646 0.468824829 -1.147519060 0.612241406 -0.009628447 [66] -1.404924785 -0.803645414 -1.426167351 1.687049500 -0.595533271 [71] 0.647058952 -0.302737767 -0.594917143 -0.178130022 -1.303854182 [76] 1.454947285 0.105578895 -0.994937657 0.270250201 1.268699958 [81] 2.215006493 -1.893380502 1.205122458 -1.145303967 1.037625404 [86] -1.392426178 -0.616838793 -0.270211039 0.658996137 -1.041747460 [91] -0.012556569 0.384904476 0.827089151 0.935957614 -1.842657254 [96] 0.539691998 0.184035753 -0.354860554 -0.999441817 -0.490837113 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.8903125 0.9866598 1.614932 0.1622777 0.06928302 -0.1451521 -0.6953928 [2,] -0.8903125 0.9866598 1.614932 0.1622777 0.06928302 -0.1451521 -0.6953928 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.3519153 -0.1473055 0.8919559 -2.301979 0.1026424 0.8395765 -0.02133567 [2,] -0.3519153 -0.1473055 0.8919559 -2.301979 0.1026424 0.8395765 -0.02133567 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.163466 -0.8075034 0.1378931 0.3050526 -1.618875 -0.8830771 -0.5241659 [2,] 0.163466 -0.8075034 0.1378931 0.3050526 -1.618875 -0.8830771 -0.5241659 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.8635452 -0.6587091 1.740575 -1.060641 -0.01055445 1.221588 -0.2256047 [2,] 0.8635452 -0.6587091 1.740575 -1.060641 -0.01055445 1.221588 -0.2256047 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.2046478 0.5633536 -0.1833006 -0.3410578 1.186912 1.084676 -0.5295241 [2,] -0.2046478 0.5633536 -0.1833006 -0.3410578 1.186912 1.084676 -0.5295241 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.6842885 0.3191329 -0.6808643 -0.4056088 -1.40132 -0.2766452 1.211291 [2,] 0.6842885 0.3191329 -0.6808643 -0.4056088 -1.40132 -0.2766452 1.211291 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -1.792916 -3.035438 -0.02236418 1.02755 0.7395214 -0.3054456 -0.777988 [2,] -1.792916 -3.035438 -0.02236418 1.02755 0.7395214 -0.3054456 -0.777988 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.7715704 -0.871004 -1.205544 0.9172839 0.8612597 -0.6712025 0.4954476 [2,] 0.7715704 -0.871004 -1.205544 0.9172839 0.8612597 -0.6712025 0.4954476 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.08633414 -0.9500828 2.166611 -1.120223 0.02930265 0.4688248 -1.147519 [2,] 0.08633414 -0.9500828 2.166611 -1.120223 0.02930265 0.4688248 -1.147519 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.6122414 -0.009628447 -1.404925 -0.8036454 -1.426167 1.687049 -0.5955333 [2,] 0.6122414 -0.009628447 -1.404925 -0.8036454 -1.426167 1.687049 -0.5955333 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.647059 -0.3027378 -0.5949171 -0.17813 -1.303854 1.454947 0.1055789 [2,] 0.647059 -0.3027378 -0.5949171 -0.17813 -1.303854 1.454947 0.1055789 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [,85] [1,] -0.9949377 0.2702502 1.2687 2.215006 -1.893381 1.205122 -1.145304 1.037625 [2,] -0.9949377 0.2702502 1.2687 2.215006 -1.893381 1.205122 -1.145304 1.037625 [,86] [,87] [,88] [,89] [,90] [,91] [,92] [1,] -1.392426 -0.6168388 -0.270211 0.6589961 -1.041747 -0.01255657 0.3849045 [2,] -1.392426 -0.6168388 -0.270211 0.6589961 -1.041747 -0.01255657 0.3849045 [,93] [,94] [,95] [,96] [,97] [,98] [,99] [1,] 0.8270892 0.9359576 -1.842657 0.539692 0.1840358 -0.3548606 -0.9994418 [2,] 0.8270892 0.9359576 -1.842657 0.539692 0.1840358 -0.3548606 -0.9994418 [,100] [1,] -0.4908371 [2,] -0.4908371 > > > Max(tmp2) [1] 3.245362 > Min(tmp2) [1] -2.446327 > mean(tmp2) [1] 0.01559622 > Sum(tmp2) [1] 1.559622 > Var(tmp2) [1] 1.079314 > > rowMeans(tmp2) [1] -1.583170022 1.087705321 0.617353724 0.263760162 0.663565322 [6] -0.507027278 0.182476390 0.177874626 -0.640916370 -1.684965517 [11] 0.972294111 -2.446327291 2.135998561 -0.523751399 0.862537261 [16] 0.273624090 -0.835348864 0.091376840 0.092958821 -0.275609398 [21] 0.622033098 0.351171062 -0.047684908 -0.287863264 -0.271751597 [26] -0.519213479 1.508029526 1.556931693 0.099642168 -0.470764793 [31] -2.143370787 0.324726454 -0.273014524 0.186041850 -0.935117067 [36] 0.326142594 -0.168577961 -0.577722538 1.291443614 0.008337845 [41] 1.125350345 -0.931930458 -0.315582906 1.904028341 0.519067426 [46] 1.934337483 0.177538325 0.161692397 1.912072974 1.848001269 [51] -0.268365229 2.311536244 -0.230221008 0.244747981 -0.822508308 [56] 1.094918172 0.348970583 -0.761185866 -1.040655727 -0.100400188 [61] -0.982379732 0.402319842 0.873603115 -0.029505057 -0.325930099 [66] -0.503165769 -0.865178768 0.389463328 3.245361618 0.374982595 [71] -0.587516315 0.725126988 0.298942753 -0.978834812 -0.008548049 [76] 0.609436438 0.742141069 0.099093454 0.675895353 -1.210023703 [81] 0.460363662 -0.563290804 -1.436743028 -2.292282952 -0.703604358 [86] -1.239996154 0.016827269 0.981418759 -0.817628608 -0.435967049 [91] -1.096127068 -0.721255958 -1.431717266 0.478811237 1.426531074 [96] -0.874885048 -1.866968014 -0.749644780 -0.971167352 1.836423949 > rowSums(tmp2) [1] -1.583170022 1.087705321 0.617353724 0.263760162 0.663565322 [6] -0.507027278 0.182476390 0.177874626 -0.640916370 -1.684965517 [11] 0.972294111 -2.446327291 2.135998561 -0.523751399 0.862537261 [16] 0.273624090 -0.835348864 0.091376840 0.092958821 -0.275609398 [21] 0.622033098 0.351171062 -0.047684908 -0.287863264 -0.271751597 [26] -0.519213479 1.508029526 1.556931693 0.099642168 -0.470764793 [31] -2.143370787 0.324726454 -0.273014524 0.186041850 -0.935117067 [36] 0.326142594 -0.168577961 -0.577722538 1.291443614 0.008337845 [41] 1.125350345 -0.931930458 -0.315582906 1.904028341 0.519067426 [46] 1.934337483 0.177538325 0.161692397 1.912072974 1.848001269 [51] -0.268365229 2.311536244 -0.230221008 0.244747981 -0.822508308 [56] 1.094918172 0.348970583 -0.761185866 -1.040655727 -0.100400188 [61] -0.982379732 0.402319842 0.873603115 -0.029505057 -0.325930099 [66] -0.503165769 -0.865178768 0.389463328 3.245361618 0.374982595 [71] -0.587516315 0.725126988 0.298942753 -0.978834812 -0.008548049 [76] 0.609436438 0.742141069 0.099093454 0.675895353 -1.210023703 [81] 0.460363662 -0.563290804 -1.436743028 -2.292282952 -0.703604358 [86] -1.239996154 0.016827269 0.981418759 -0.817628608 -0.435967049 [91] -1.096127068 -0.721255958 -1.431717266 0.478811237 1.426531074 [96] -0.874885048 -1.866968014 -0.749644780 -0.971167352 1.836423949 > 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.583170022 1.087705321 0.617353724 0.263760162 0.663565322 [6] -0.507027278 0.182476390 0.177874626 -0.640916370 -1.684965517 [11] 0.972294111 -2.446327291 2.135998561 -0.523751399 0.862537261 [16] 0.273624090 -0.835348864 0.091376840 0.092958821 -0.275609398 [21] 0.622033098 0.351171062 -0.047684908 -0.287863264 -0.271751597 [26] -0.519213479 1.508029526 1.556931693 0.099642168 -0.470764793 [31] -2.143370787 0.324726454 -0.273014524 0.186041850 -0.935117067 [36] 0.326142594 -0.168577961 -0.577722538 1.291443614 0.008337845 [41] 1.125350345 -0.931930458 -0.315582906 1.904028341 0.519067426 [46] 1.934337483 0.177538325 0.161692397 1.912072974 1.848001269 [51] -0.268365229 2.311536244 -0.230221008 0.244747981 -0.822508308 [56] 1.094918172 0.348970583 -0.761185866 -1.040655727 -0.100400188 [61] -0.982379732 0.402319842 0.873603115 -0.029505057 -0.325930099 [66] -0.503165769 -0.865178768 0.389463328 3.245361618 0.374982595 [71] -0.587516315 0.725126988 0.298942753 -0.978834812 -0.008548049 [76] 0.609436438 0.742141069 0.099093454 0.675895353 -1.210023703 [81] 0.460363662 -0.563290804 -1.436743028 -2.292282952 -0.703604358 [86] -1.239996154 0.016827269 0.981418759 -0.817628608 -0.435967049 [91] -1.096127068 -0.721255958 -1.431717266 0.478811237 1.426531074 [96] -0.874885048 -1.866968014 -0.749644780 -0.971167352 1.836423949 > rowMin(tmp2) [1] -1.583170022 1.087705321 0.617353724 0.263760162 0.663565322 [6] -0.507027278 0.182476390 0.177874626 -0.640916370 -1.684965517 [11] 0.972294111 -2.446327291 2.135998561 -0.523751399 0.862537261 [16] 0.273624090 -0.835348864 0.091376840 0.092958821 -0.275609398 [21] 0.622033098 0.351171062 -0.047684908 -0.287863264 -0.271751597 [26] -0.519213479 1.508029526 1.556931693 0.099642168 -0.470764793 [31] -2.143370787 0.324726454 -0.273014524 0.186041850 -0.935117067 [36] 0.326142594 -0.168577961 -0.577722538 1.291443614 0.008337845 [41] 1.125350345 -0.931930458 -0.315582906 1.904028341 0.519067426 [46] 1.934337483 0.177538325 0.161692397 1.912072974 1.848001269 [51] -0.268365229 2.311536244 -0.230221008 0.244747981 -0.822508308 [56] 1.094918172 0.348970583 -0.761185866 -1.040655727 -0.100400188 [61] -0.982379732 0.402319842 0.873603115 -0.029505057 -0.325930099 [66] -0.503165769 -0.865178768 0.389463328 3.245361618 0.374982595 [71] -0.587516315 0.725126988 0.298942753 -0.978834812 -0.008548049 [76] 0.609436438 0.742141069 0.099093454 0.675895353 -1.210023703 [81] 0.460363662 -0.563290804 -1.436743028 -2.292282952 -0.703604358 [86] -1.239996154 0.016827269 0.981418759 -0.817628608 -0.435967049 [91] -1.096127068 -0.721255958 -1.431717266 0.478811237 1.426531074 [96] -0.874885048 -1.866968014 -0.749644780 -0.971167352 1.836423949 > > colMeans(tmp2) [1] 0.01559622 > colSums(tmp2) [1] 1.559622 > colVars(tmp2) [1] 1.079314 > colSd(tmp2) [1] 1.0389 > colMax(tmp2) [1] 3.245362 > colMin(tmp2) [1] -2.446327 > colMedians(tmp2) [1] 0.01258256 > colRanges(tmp2) [,1] [1,] -2.446327 [2,] 3.245362 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 1.5083893 4.6506166 1.8559389 8.8284402 2.9275345 0.1167529 [7] 2.1067661 -3.5726897 8.2918953 4.5720232 > colApply(tmp,quantile)[,1] [,1] [1,] -0.6677884 [2,] -0.3990625 [3,] -0.2110392 [4,] 0.1141179 [5,] 2.8099130 > > rowApply(tmp,sum) [1] 3.8577507 2.8564920 5.1585743 4.2976528 9.2688297 0.3152049 1.9016976 [8] 0.9950070 2.4285648 0.2058934 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 2 3 2 2 9 5 2 6 1 10 [2,] 8 2 7 7 7 8 10 3 2 7 [3,] 6 8 8 4 2 3 4 8 5 5 [4,] 10 9 9 5 10 2 6 9 6 6 [5,] 3 7 10 1 1 6 5 7 7 8 [6,] 9 6 6 9 3 1 7 4 8 1 [7,] 7 5 3 10 4 7 8 5 3 3 [8,] 4 1 4 3 8 4 1 1 4 2 [9,] 1 10 1 8 5 10 3 10 10 9 [10,] 5 4 5 6 6 9 9 2 9 4 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -1.22367482 -2.15605172 1.20237753 1.27718685 1.59287658 1.47119198 [7] 1.27373993 -2.43918252 1.53330396 1.63242462 -1.96914061 -0.19404317 [13] 4.07395572 -4.76424757 0.29159300 -0.07126138 -1.50074778 -0.13132325 [19] 0.64761414 2.37532170 > colApply(tmp,quantile)[,1] [,1] [1,] -1.7618388 [2,] -0.7645275 [3,] -0.1547134 [4,] 0.5232016 [5,] 0.9342034 > > rowApply(tmp,sum) [1] 2.215003 6.202926 -8.345103 -1.615230 4.464318 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 7 14 18 2 6 [2,] 18 4 3 9 1 [3,] 3 6 20 20 8 [4,] 4 20 6 14 12 [5,] 19 9 10 12 9 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.1547134 1.5280599 -1.7090613 -1.4791462 1.8972010 0.8170164 [2,] 0.9342034 -0.9044952 -0.5578296 2.4745133 0.2822689 0.8645221 [3,] 0.5232016 -1.1905786 1.3593426 -0.8605828 -0.5537529 -0.8554307 [4,] -1.7618388 -0.3586442 2.3639024 0.6709456 0.1759056 -0.5206113 [5,] -0.7645275 -1.2303937 -0.2539766 0.4714570 -0.2087460 1.1656954 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.09870791 -0.3895611 -0.0861110 2.0030373 -0.6732632 0.4410245 [2,] 0.30022061 -0.2774812 0.4524011 0.9389216 -0.9562614 -1.2407241 [3,] -0.98067884 -1.3085029 0.3007265 -0.2811666 -1.5445995 0.3839637 [4,] -0.20861071 -1.8644768 0.3766000 -0.1233101 0.8658825 0.9936837 [5,] 2.26151678 1.4008396 0.4896874 -0.9050576 0.3391011 -0.7719910 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.4528993 -2.3179048 -1.8847604 -0.1388414 0.9612158 0.01901885 [2,] 2.0287682 -0.6372622 0.3465262 0.9409375 -0.4737178 1.44343759 [3,] -0.1030551 -1.0347995 -0.5484447 -0.5649781 0.5250749 -0.70179228 [4,] 1.6698973 -0.3594512 0.9561076 -1.5679740 -1.6303354 -1.31798127 [5,] -0.9745539 -0.4148298 1.4221643 1.2595945 -0.8829854 0.42599385 [,19] [,20] [1,] 0.5468021 1.4807981 [2,] -0.9898532 1.2338303 [3,] -0.3817638 -0.5272859 [4,] 0.8336895 -0.8086110 [5,] 0.6387396 0.9965901 > > > 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.19-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.19-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.19-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.19-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.1162249 -0.8487981 1.143377 -0.942462 -0.1313287 0.1010205 -1.475458 col8 col9 col10 col11 col12 col13 col14 row1 -0.2852802 -2.317861 -0.4068345 -0.4844734 -0.2166555 -1.282698 -0.6666089 col15 col16 col17 col18 col19 col20 row1 -0.1720226 -1.461507 -1.083061 -0.02294347 1.043818 -0.321076 > tmp[,"col10"] col10 row1 -0.406834540 row2 -0.001671575 row3 -2.743822888 row4 -1.119432432 row5 0.948222765 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 0.1162249 -0.8487981 1.1433771 -0.9424620 -0.1313287 0.1010205 -1.4754582 row5 0.3032657 -1.8502477 0.4920107 -0.8401545 0.8282328 -0.9687764 0.1224417 col8 col9 col10 col11 col12 col13 row1 -0.2852802 -2.3178607 -0.4068345 -0.4844734 -0.2166555 -1.282698 row5 0.2781013 -0.3023013 0.9482228 -0.6065927 -0.1087187 -2.420122 col14 col15 col16 col17 col18 col19 row1 -0.66660887 -0.1720226 -1.461507 -1.08306083 -0.02294347 1.0438180 row5 -0.02096362 0.9027950 1.454790 -0.05829389 -0.95108813 0.2214996 col20 row1 -0.3210760 row5 0.7202403 > tmp[,c("col6","col20")] col6 col20 row1 0.1010205 -0.3210760 row2 2.0863784 -0.8233180 row3 -0.1913869 1.8530269 row4 0.1168676 -0.2709252 row5 -0.9687764 0.7202403 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.1010205 -0.3210760 row5 -0.9687764 0.7202403 > > > > > 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.07113 49.12514 50.42635 51.46402 50.39781 105.3307 49.38677 49.10163 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.3038 49.60054 48.84578 48.53622 51.44495 49.74758 48.41401 51.04607 col17 col18 col19 col20 row1 49.67592 49.50556 49.64118 104.855 > tmp[,"col10"] col10 row1 49.60054 row2 31.16970 row3 29.91349 row4 29.04098 row5 49.90242 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.07113 49.12514 50.42635 51.46402 50.39781 105.3307 49.38677 49.10163 row5 48.67506 50.40024 50.74577 47.71117 50.36327 104.1525 49.24261 51.89402 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.30380 49.60054 48.84578 48.53622 51.44495 49.74758 48.41401 51.04607 row5 50.47166 49.90242 49.51140 48.99320 51.63952 48.55189 50.98225 50.68126 col17 col18 col19 col20 row1 49.67592 49.50556 49.64118 104.8550 row5 47.39910 50.97983 51.06878 104.6616 > tmp[,c("col6","col20")] col6 col20 row1 105.33068 104.85505 row2 74.87252 75.76282 row3 74.41380 75.89901 row4 76.15219 75.68277 row5 104.15247 104.66155 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.3307 104.8550 row5 104.1525 104.6616 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.3307 104.8550 row5 104.1525 104.6616 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.7344616 [2,] 0.1572993 [3,] -1.5430378 [4,] 0.6724984 [5,] -0.3592926 > tmp[,c("col17","col7")] col17 col7 [1,] -0.68926705 0.24286738 [2,] 0.79681377 -0.92572036 [3,] 0.15692469 -1.05188856 [4,] 0.05925496 -0.81872590 [5,] 0.40086598 0.08780571 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.9812965 -1.01387738 [2,] -1.0167677 0.08766847 [3,] -0.8053764 -0.81229362 [4,] 1.5435264 1.59315492 [5,] -0.7010947 0.65307525 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.9812965 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.9812965 [2,] -1.0167677 > > > > 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.3215368 -0.7740534 -1.172970 -0.1289311 1.136408 0.8639297 0.04219201 row1 -0.2082514 -1.6627740 1.478631 -1.3537274 -1.044518 0.3549011 -1.37846933 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 0.8115768 -0.516927 0.419511 1.052297 0.2374094 -1.257615 0.2288823 row1 -0.6852716 1.327880 -1.704550 2.139482 0.6826252 -1.179010 0.5602661 [,15] [,16] [,17] [,18] [,19] [,20] row3 1.3900246 1.075769 0.3901419 2.109877 1.088752 -0.42196362 row1 -0.2118889 2.059858 0.8725948 1.434681 0.617979 0.09892193 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.5672411 0.3065943 0.4155484 -2.140922 1.553069 -0.5919951 -0.2919361 [,8] [,9] [,10] row2 -0.5233044 -0.2759385 1.512434 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.8305194 -0.5439588 -1.086714 0.6067971 -1.214108 1.147301 -0.1432065 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.5473357 0.1432544 -1.057114 3.02484 -0.018228 -0.6245808 0.6243056 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.919645 0.04820785 1.037796 0.04044848 2.442351 0.4237901 > > > 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: 0x1ae9a3a0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b444aac00d" [2] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b463ccb22" [3] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b4274746da" [4] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b42f858117" [5] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b4a17e5f8" [6] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b436a17d44" [7] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b4664e1328" [8] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b463f2f633" [9] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b45af072cf" [10] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b4365ab042" [11] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b44db63d20" [12] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b4302087d6" [13] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b450923518" [14] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b455a5168d" [15] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM2f91b4446c3f6d" > > > ### 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: 0x189f9910> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x189f9910> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x189f9910> > rowMedians(tmp) [1] -0.294848448 -0.024905735 -0.262870489 -0.612931636 -0.327724007 [6] -0.413768952 -0.067347788 0.640575280 0.685553354 0.195027743 [11] -0.125547222 0.085048364 -0.148665130 0.326959557 0.115203695 [16] -0.183092196 0.511836062 -0.137820786 -0.223576230 -0.295096365 [21] 0.114484197 -0.010636617 -0.163868491 0.034903509 0.075347382 [26] -0.162552371 -0.342879977 -0.383699549 -0.222099684 0.137287886 [31] -0.106183509 -0.190990117 0.162047865 0.032861769 -0.254477038 [36] 0.053968192 0.058744303 -0.044734179 0.037511304 -0.551820008 [41] 0.042517024 0.444271771 -0.119167206 0.126749754 -0.141111853 [46] -0.127528273 -0.203815011 -0.181763255 0.227007098 -0.204913538 [51] -0.068053807 -0.157090273 -0.415329291 0.034183592 -0.311052156 [56] -0.933243573 0.140244347 -0.053666598 0.103533784 -0.274182968 [61] 0.341851474 0.274440760 0.319708966 0.187673204 -0.447402714 [66] -0.002004461 -0.546029386 0.572626301 0.598444231 -0.560813420 [71] -0.063347044 -0.109970233 -0.417494047 -0.168823081 -0.501272687 [76] -0.085813959 -0.150680717 0.135087152 -0.415382095 0.181228210 [81] -0.288152183 0.561175943 -0.292302636 0.215322287 -0.412495507 [86] 0.165417945 0.388824887 -0.001898483 0.098284408 0.156495787 [91] -0.016301845 -0.269594704 0.286919383 -0.347826817 0.630488524 [96] 0.241445227 0.240150398 0.038415792 0.108482441 1.036136465 [101] -0.116021662 0.118430120 -0.217345675 0.517915722 -0.620423774 [106] 0.515805360 0.247008349 -0.018075755 0.471424555 0.041660452 [111] -0.416853870 -0.191191686 0.303508633 -0.239976948 0.290518306 [116] 0.005972075 -0.058340504 -0.607220422 -0.031342542 -0.246713449 [121] -0.021724217 -0.546527526 0.376760118 0.341520886 -0.241935092 [126] 0.004002066 0.775404340 0.182090128 -0.107849670 -0.313961569 [131] -0.012101278 0.480414442 -0.728832343 -0.081228711 0.369584559 [136] 0.294969042 -0.484467921 -0.182575065 -0.180937384 0.423943166 [141] -0.021456217 -0.049842885 0.386480497 -0.735032923 0.190057484 [146] -0.437093022 -0.214076569 -0.465724524 -0.318814557 -0.550619261 [151] 0.367408955 -0.220773789 0.208426091 -0.122622102 0.523610351 [156] -0.166485317 0.096835059 -0.162086472 0.662450374 0.264946507 [161] -0.091924577 0.314476940 0.221198626 -0.487227623 0.443298530 [166] 0.403041970 -0.285943139 -0.182328018 0.073656714 0.027543639 [171] 0.020109651 -0.225778918 -0.073854673 0.067756294 -0.205676987 [176] -0.033052437 0.474075760 0.193130870 0.405277009 -0.151160936 [181] -0.197149344 -0.130784529 -0.192379173 -0.344756677 0.298097957 [186] -0.021440062 0.076571721 -0.040868353 0.245767954 0.130611436 [191] -0.145270090 0.261630806 -0.245108145 0.278403145 -0.117447293 [196] 0.112158838 0.607250046 -0.652032188 -0.278974718 0.012929812 [201] 0.102978082 0.020281803 0.528830162 -0.122597430 -0.031270986 [206] -0.267162765 -0.051273574 -0.011240765 -0.194255435 -0.297265344 [211] 0.220156591 -0.104378294 0.462880970 -0.360780357 0.266803932 [216] 0.375395569 0.335982466 -0.548493312 0.245467142 -0.244579359 [221] -0.027843527 0.017776221 0.628438086 -0.101854708 0.118699652 [226] -0.596125197 -0.529550099 0.668565298 -0.474880227 0.124986731 > > proc.time() user system elapsed 1.973 0.869 2.863
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.0 beta (2024-04-15 r86425) -- "Puppy Cup" 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: 0x3a905ed0> > .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: 0x3a905ed0> > .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: 0x3a905ed0> > .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: 0x3a905ed0> > 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: 0x39352fb0> > .Call("R_bm_AddColumn",P) <pointer: 0x39352fb0> > .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: 0x39352fb0> > .Call("R_bm_AddColumn",P) <pointer: 0x39352fb0> > .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: 0x39352fb0> > 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: 0x391ac990> > .Call("R_bm_AddColumn",P) <pointer: 0x391ac990> > .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: 0x391ac990> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x391ac990> > .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: 0x391ac990> > > .Call("R_bm_RowMode",P) <pointer: 0x391ac990> > .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: 0x391ac990> > > .Call("R_bm_ColMode",P) <pointer: 0x391ac990> > .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: 0x391ac990> > 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: 0x3bb0bcf0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x3bb0bcf0> > .Call("R_bm_AddColumn",P) <pointer: 0x3bb0bcf0> > .Call("R_bm_AddColumn",P) <pointer: 0x3bb0bcf0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile2f92181e7987d9" "BufferedMatrixFile2f92188a177fa" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile2f92181e7987d9" "BufferedMatrixFile2f92188a177fa" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x398f04f0> > .Call("R_bm_AddColumn",P) <pointer: 0x398f04f0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x398f04f0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x398f04f0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x398f04f0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x398f04f0> > .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: 0x3a1ea180> > .Call("R_bm_AddColumn",P) <pointer: 0x3a1ea180> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x3a1ea180> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x3a1ea180> > 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: 0x3a1ee880> > .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: 0x3a1ee880> > rm(P) > > proc.time() user system elapsed 0.337 0.037 0.359
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.0 beta (2024-04-15 r86425) -- "Puppy Cup" 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.329 0.038 0.351