Back to Multiple platform build/check report for BioC 3.19: simplified long |
|
This page was generated on 2024-05-09 11:40:37 -0400 (Thu, 09 May 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.4.0 (2024-04-24) -- "Puppy Cup" | 4748 |
palomino3 | Windows Server 2022 Datacenter | x64 | 4.4.0 (2024-04-24 ucrt) -- "Puppy Cup" | 4484 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.4.0 (2024-04-24) -- "Puppy Cup" | 4514 |
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) | aarch64 | 4.4.0 beta (2024-04-15 r86425) -- "Puppy Cup" | 4480 |
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-09 05:27:35 -0000 (Thu, 09 May 2024) |
EndedAt: 2024-05-09 05:28:00 -0000 (Thu, 09 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.311 0.059 0.355
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] "Thu May 9 05:27:55 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] "Thu May 9 05:27:55 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: 0x21c10ed0> > > > > 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] "Thu May 9 05:27:55 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] "Thu May 9 05:27:55 2024" > > ColMode(tmp2) <pointer: 0x21c10ed0> > > > > ### 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.4507057 0.7153737 -0.30444124 0.7894939 [2,] -0.1799339 -0.5603191 -0.67904100 1.9001155 [3,] -1.3442296 -0.7247863 -0.02703463 -1.0202120 [4,] 3.0736729 0.3692084 0.87119072 0.2465037 > 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,] 99.4507057 0.7153737 0.30444124 0.7894939 [2,] 0.1799339 0.5603191 0.67904100 1.9001155 [3,] 1.3442296 0.7247863 0.02703463 1.0202120 [4,] 3.0736729 0.3692084 0.87119072 0.2465037 > 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,] 9.9724975 0.8457977 0.5517619 0.8885347 [2,] 0.4241862 0.7485447 0.8240394 1.3784468 [3,] 1.1594091 0.8513438 0.1644221 1.0100554 [4,] 1.7531893 0.6076252 0.9333760 0.4964914 > > 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,] 224.17568 34.17335 30.82206 34.67484 [2,] 29.42180 33.04577 33.91944 40.68458 [3,] 37.93832 34.23822 26.67126 36.12077 [4,] 45.60557 31.44546 35.20495 30.21142 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x212b7b90> > exp(tmp5) <pointer: 0x212b7b90> > log(tmp5,2) <pointer: 0x212b7b90> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.5923 > Min(tmp5) [1] 55.0385 > mean(tmp5) [1] 72.40333 > Sum(tmp5) [1] 14480.67 > Var(tmp5) [1] 849.6292 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 87.30998 70.44088 71.38487 72.17141 70.23262 71.30949 71.10723 69.67572 [9] 71.15078 69.25037 > rowSums(tmp5) [1] 1746.200 1408.818 1427.697 1443.428 1404.652 1426.190 1422.145 1393.514 [9] 1423.016 1385.007 > rowVars(tmp5) [1] 8034.95585 98.44359 36.42279 88.39083 60.27299 43.80427 [7] 67.19155 82.69429 69.28564 50.24496 > rowSd(tmp5) [1] 89.637915 9.921874 6.035130 9.401640 7.763568 6.618479 8.197045 [8] 9.093640 8.323800 7.088368 > rowMax(tmp5) [1] 466.59231 88.25713 79.71760 94.92201 86.76310 81.09627 85.58058 [8] 90.25686 84.16519 80.21146 > rowMin(tmp5) [1] 57.56345 55.03850 55.51272 55.40217 58.07994 58.11449 57.94101 56.31271 [9] 57.09457 58.30912 > > colMeans(tmp5) [1] 110.49520 67.45477 69.36646 70.26569 72.58040 67.42798 69.15168 [8] 72.56895 66.09084 67.64358 72.35337 73.81552 69.68966 67.72347 [15] 71.86775 71.54723 71.32376 72.81934 70.33938 73.54166 > colSums(tmp5) [1] 1104.9520 674.5477 693.6646 702.6569 725.8040 674.2798 691.5168 [8] 725.6895 660.9084 676.4358 723.5337 738.1552 696.8966 677.2347 [15] 718.6775 715.4723 713.2376 728.1934 703.3938 735.4166 > colVars(tmp5) [1] 15803.50147 22.69108 60.22502 65.64574 74.14305 57.90773 [7] 83.23238 78.12406 38.38011 46.14644 67.86630 46.89017 [13] 99.25349 56.76516 62.44522 43.91200 31.93063 92.58878 [19] 95.25254 52.30417 > colSd(tmp5) [1] 125.711978 4.763516 7.760478 8.102206 8.610636 7.609713 [7] 9.123178 8.838781 6.195168 6.793117 8.238101 6.847640 [13] 9.962605 7.534266 7.902229 6.626613 5.650720 9.622307 [19] 9.759741 7.232162 > colMax(tmp5) [1] 466.59231 74.40644 79.58098 84.67963 85.39941 83.38819 85.58058 [8] 86.47752 79.24620 78.20912 88.25713 83.50484 84.16519 79.70534 [15] 84.33927 78.36037 79.68531 90.25686 90.56627 83.41518 > colMin(tmp5) [1] 57.09457 60.15947 55.51272 61.76765 59.29014 55.03850 58.14242 59.68643 [9] 57.56345 58.71092 61.21681 62.19167 55.40217 57.94101 58.30912 58.09918 [17] 62.63788 58.68352 57.97027 56.31271 > > > ### 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] 87.30998 NA 71.38487 72.17141 70.23262 71.30949 71.10723 69.67572 [9] 71.15078 69.25037 > rowSums(tmp5) [1] 1746.200 NA 1427.697 1443.428 1404.652 1426.190 1422.145 1393.514 [9] 1423.016 1385.007 > rowVars(tmp5) [1] 8034.95585 103.36614 36.42279 88.39083 60.27299 43.80427 [7] 67.19155 82.69429 69.28564 50.24496 > rowSd(tmp5) [1] 89.637915 10.166914 6.035130 9.401640 7.763568 6.618479 8.197045 [8] 9.093640 8.323800 7.088368 > rowMax(tmp5) [1] 466.59231 NA 79.71760 94.92201 86.76310 81.09627 85.58058 [8] 90.25686 84.16519 80.21146 > rowMin(tmp5) [1] 57.56345 NA 55.51272 55.40217 58.07994 58.11449 57.94101 56.31271 [9] 57.09457 58.30912 > > colMeans(tmp5) [1] 110.49520 67.45477 69.36646 70.26569 72.58040 67.42798 69.15168 [8] 72.56895 66.09084 67.64358 72.35337 73.81552 69.68966 67.72347 [15] 71.86775 71.54723 71.32376 NA 70.33938 73.54166 > colSums(tmp5) [1] 1104.9520 674.5477 693.6646 702.6569 725.8040 674.2798 691.5168 [8] 725.6895 660.9084 676.4358 723.5337 738.1552 696.8966 677.2347 [15] 718.6775 715.4723 713.2376 NA 703.3938 735.4166 > colVars(tmp5) [1] 15803.50147 22.69108 60.22502 65.64574 74.14305 57.90773 [7] 83.23238 78.12406 38.38011 46.14644 67.86630 46.89017 [13] 99.25349 56.76516 62.44522 43.91200 31.93063 NA [19] 95.25254 52.30417 > colSd(tmp5) [1] 125.711978 4.763516 7.760478 8.102206 8.610636 7.609713 [7] 9.123178 8.838781 6.195168 6.793117 8.238101 6.847640 [13] 9.962605 7.534266 7.902229 6.626613 5.650720 NA [19] 9.759741 7.232162 > colMax(tmp5) [1] 466.59231 74.40644 79.58098 84.67963 85.39941 83.38819 85.58058 [8] 86.47752 79.24620 78.20912 88.25713 83.50484 84.16519 79.70534 [15] 84.33927 78.36037 79.68531 NA 90.56627 83.41518 > colMin(tmp5) [1] 57.09457 60.15947 55.51272 61.76765 59.29014 55.03850 58.14242 59.68643 [9] 57.56345 58.71092 61.21681 62.19167 55.40217 57.94101 58.30912 58.09918 [17] 62.63788 NA 57.97027 56.31271 > > Max(tmp5,na.rm=TRUE) [1] 466.5923 > Min(tmp5,na.rm=TRUE) [1] 55.0385 > mean(tmp5,na.rm=TRUE) [1] 72.42856 > Sum(tmp5,na.rm=TRUE) [1] 14413.28 > Var(tmp5,na.rm=TRUE) [1] 853.7923 > > rowMeans(tmp5,na.rm=TRUE) [1] 87.30998 70.60178 71.38487 72.17141 70.23262 71.30949 71.10723 69.67572 [9] 71.15078 69.25037 > rowSums(tmp5,na.rm=TRUE) [1] 1746.200 1341.434 1427.697 1443.428 1404.652 1426.190 1422.145 1393.514 [9] 1423.016 1385.007 > rowVars(tmp5,na.rm=TRUE) [1] 8034.95585 103.36614 36.42279 88.39083 60.27299 43.80427 [7] 67.19155 82.69429 69.28564 50.24496 > rowSd(tmp5,na.rm=TRUE) [1] 89.637915 10.166914 6.035130 9.401640 7.763568 6.618479 8.197045 [8] 9.093640 8.323800 7.088368 > rowMax(tmp5,na.rm=TRUE) [1] 466.59231 88.25713 79.71760 94.92201 86.76310 81.09627 85.58058 [8] 90.25686 84.16519 80.21146 > rowMin(tmp5,na.rm=TRUE) [1] 57.56345 55.03850 55.51272 55.40217 58.07994 58.11449 57.94101 56.31271 [9] 57.09457 58.30912 > > colMeans(tmp5,na.rm=TRUE) [1] 110.49520 67.45477 69.36646 70.26569 72.58040 67.42798 69.15168 [8] 72.56895 66.09084 67.64358 72.35337 73.81552 69.68966 67.72347 [15] 71.86775 71.54723 71.32376 73.42329 70.33938 73.54166 > colSums(tmp5,na.rm=TRUE) [1] 1104.9520 674.5477 693.6646 702.6569 725.8040 674.2798 691.5168 [8] 725.6895 660.9084 676.4358 723.5337 738.1552 696.8966 677.2347 [15] 718.6775 715.4723 713.2376 660.8096 703.3938 735.4166 > colVars(tmp5,na.rm=TRUE) [1] 15803.50147 22.69108 60.22502 65.64574 74.14305 57.90773 [7] 83.23238 78.12406 38.38011 46.14644 67.86630 46.89017 [13] 99.25349 56.76516 62.44522 43.91200 31.93063 100.05890 [19] 95.25254 52.30417 > colSd(tmp5,na.rm=TRUE) [1] 125.711978 4.763516 7.760478 8.102206 8.610636 7.609713 [7] 9.123178 8.838781 6.195168 6.793117 8.238101 6.847640 [13] 9.962605 7.534266 7.902229 6.626613 5.650720 10.002945 [19] 9.759741 7.232162 > colMax(tmp5,na.rm=TRUE) [1] 466.59231 74.40644 79.58098 84.67963 85.39941 83.38819 85.58058 [8] 86.47752 79.24620 78.20912 88.25713 83.50484 84.16519 79.70534 [15] 84.33927 78.36037 79.68531 90.25686 90.56627 83.41518 > colMin(tmp5,na.rm=TRUE) [1] 57.09457 60.15947 55.51272 61.76765 59.29014 55.03850 58.14242 59.68643 [9] 57.56345 58.71092 61.21681 62.19167 55.40217 57.94101 58.30912 58.09918 [17] 62.63788 58.68352 57.97027 56.31271 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 87.30998 NaN 71.38487 72.17141 70.23262 71.30949 71.10723 69.67572 [9] 71.15078 69.25037 > rowSums(tmp5,na.rm=TRUE) [1] 1746.200 0.000 1427.697 1443.428 1404.652 1426.190 1422.145 1393.514 [9] 1423.016 1385.007 > rowVars(tmp5,na.rm=TRUE) [1] 8034.95585 NA 36.42279 88.39083 60.27299 43.80427 [7] 67.19155 82.69429 69.28564 50.24496 > rowSd(tmp5,na.rm=TRUE) [1] 89.637915 NA 6.035130 9.401640 7.763568 6.618479 8.197045 [8] 9.093640 8.323800 7.088368 > rowMax(tmp5,na.rm=TRUE) [1] 466.59231 NA 79.71760 94.92201 86.76310 81.09627 85.58058 [8] 90.25686 84.16519 80.21146 > rowMin(tmp5,na.rm=TRUE) [1] 57.56345 NA 55.51272 55.40217 58.07994 58.11449 57.94101 56.31271 [9] 57.09457 58.30912 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.96826 67.30747 69.22953 68.66414 71.15606 68.80459 70.37493 [8] 71.93154 66.86307 67.95501 70.58629 74.08449 68.22206 68.04344 [15] 72.49925 70.97393 70.99637 NaN 71.71373 73.63026 > colSums(tmp5,na.rm=TRUE) [1] 1043.7144 605.7673 623.0658 617.9773 640.4046 619.2413 633.3743 [8] 647.3839 601.7676 611.5951 635.2766 666.7604 613.9985 612.3910 [15] 652.4933 638.7654 638.9673 0.0000 645.4235 662.6723 > colVars(tmp5,na.rm=TRUE) [1] 17441.95173 25.28339 67.54220 44.99567 60.58772 43.82684 [7] 76.80258 83.31871 36.46886 50.82364 41.22050 51.93754 [13] 87.42930 62.70905 65.76441 45.70349 34.71611 NA [19] 85.90981 58.75388 > colSd(tmp5,na.rm=TRUE) [1] 132.067981 5.028259 8.218406 6.707881 7.783812 6.620185 [7] 8.763708 9.127908 6.038945 7.129070 6.420319 7.206770 [13] 9.350364 7.918905 8.109526 6.760436 5.892038 NA [19] 9.268755 7.665108 > colMax(tmp5,na.rm=TRUE) [1] 466.59231 74.40644 79.58098 80.36962 81.09627 83.38819 85.58058 [8] 86.47752 79.24620 78.20912 78.94236 83.50484 84.16519 79.70534 [15] 84.33927 78.36037 79.68531 -Inf 90.56627 83.41518 > colMin(tmp5,na.rm=TRUE) [1] 57.09457 60.15947 55.51272 61.76765 59.29014 60.28876 60.90114 59.68643 [9] 57.56345 58.71092 61.21681 62.19167 55.40217 57.94101 58.30912 58.09918 [17] 62.63788 Inf 58.11449 56.31271 > > > > > 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] 345.2443 286.1274 131.1827 302.3905 223.2208 146.7376 165.2580 445.4901 [9] 311.0108 299.5844 > apply(copymatrix,1,var,na.rm=TRUE) [1] 345.2443 286.1274 131.1827 302.3905 223.2208 146.7376 165.2580 445.4901 [9] 311.0108 299.5844 > > > > 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] -2.557954e-13 8.526513e-14 4.263256e-14 -7.105427e-14 0.000000e+00 [6] 2.842171e-13 1.421085e-14 -2.842171e-14 -1.421085e-13 -5.684342e-14 [11] 1.705303e-13 2.273737e-13 -1.136868e-13 -1.421085e-14 2.131628e-14 [16] 0.000000e+00 8.526513e-14 -5.684342e-14 -1.136868e-13 2.842171e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 2 14 6 18 4 3 3 11 6 8 6 3 8 5 9 9 6 12 10 9 6 5 5 19 6 12 10 2 1 6 5 9 10 10 2 10 3 16 4 1 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.905603 > Min(tmp) [1] -3.064587 > mean(tmp) [1] -0.1329989 > Sum(tmp) [1] -13.29989 > Var(tmp) [1] 1.06146 > > rowMeans(tmp) [1] -0.1329989 > rowSums(tmp) [1] -13.29989 > rowVars(tmp) [1] 1.06146 > rowSd(tmp) [1] 1.030272 > rowMax(tmp) [1] 1.905603 > rowMin(tmp) [1] -3.064587 > > colMeans(tmp) [1] -1.74603756 -1.89231250 -0.68244206 -1.50859811 1.39268057 1.04663451 [7] -0.28857556 -0.36625874 0.56327595 -1.53224782 -0.47468841 -0.02334060 [13] -1.52253714 -1.59132516 -0.45510463 -0.23126149 0.08947619 0.18253500 [19] 0.59491964 1.33546132 0.66245924 1.14106444 -0.28138594 1.66507479 [25] 0.89173791 -0.28769121 0.25688113 -0.61819907 -0.63368845 -0.64265498 [31] 0.18258880 -0.53656497 -0.97055042 -1.24293410 -1.61129771 -1.46780710 [37] -1.42990430 -1.34749677 -0.08809863 1.13131218 -0.24982181 -0.01579493 [43] 1.90560340 1.59913687 0.16804428 0.22932609 1.46857029 1.76042985 [49] 0.51022589 0.54212648 0.16439518 -1.67192051 -1.81619007 -0.28471067 [55] 0.63082762 -0.72282710 -0.01967332 -0.47059066 1.11774213 -3.06458693 [61] -0.09301491 1.77284742 0.04710735 -0.21372287 -1.38292862 -0.83583990 [67] 1.79404191 -0.43700178 0.28214430 0.36723593 -2.52300887 0.20060056 [73] -0.52150951 -1.15693200 1.45144172 -1.10634717 0.39834945 -0.80316030 [79] 0.47309793 -0.01775058 -1.22771084 -0.46604669 0.46324063 -1.01118698 [85] -0.76876980 0.11197961 -0.84824698 0.79237504 0.60690512 0.59119681 [91] -1.73141011 1.45801827 -0.62680638 0.30050772 -0.45552817 0.32010452 [97] 0.48688592 0.44549801 0.73662985 0.38341843 > colSums(tmp) [1] -1.74603756 -1.89231250 -0.68244206 -1.50859811 1.39268057 1.04663451 [7] -0.28857556 -0.36625874 0.56327595 -1.53224782 -0.47468841 -0.02334060 [13] -1.52253714 -1.59132516 -0.45510463 -0.23126149 0.08947619 0.18253500 [19] 0.59491964 1.33546132 0.66245924 1.14106444 -0.28138594 1.66507479 [25] 0.89173791 -0.28769121 0.25688113 -0.61819907 -0.63368845 -0.64265498 [31] 0.18258880 -0.53656497 -0.97055042 -1.24293410 -1.61129771 -1.46780710 [37] -1.42990430 -1.34749677 -0.08809863 1.13131218 -0.24982181 -0.01579493 [43] 1.90560340 1.59913687 0.16804428 0.22932609 1.46857029 1.76042985 [49] 0.51022589 0.54212648 0.16439518 -1.67192051 -1.81619007 -0.28471067 [55] 0.63082762 -0.72282710 -0.01967332 -0.47059066 1.11774213 -3.06458693 [61] -0.09301491 1.77284742 0.04710735 -0.21372287 -1.38292862 -0.83583990 [67] 1.79404191 -0.43700178 0.28214430 0.36723593 -2.52300887 0.20060056 [73] -0.52150951 -1.15693200 1.45144172 -1.10634717 0.39834945 -0.80316030 [79] 0.47309793 -0.01775058 -1.22771084 -0.46604669 0.46324063 -1.01118698 [85] -0.76876980 0.11197961 -0.84824698 0.79237504 0.60690512 0.59119681 [91] -1.73141011 1.45801827 -0.62680638 0.30050772 -0.45552817 0.32010452 [97] 0.48688592 0.44549801 0.73662985 0.38341843 > 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.74603756 -1.89231250 -0.68244206 -1.50859811 1.39268057 1.04663451 [7] -0.28857556 -0.36625874 0.56327595 -1.53224782 -0.47468841 -0.02334060 [13] -1.52253714 -1.59132516 -0.45510463 -0.23126149 0.08947619 0.18253500 [19] 0.59491964 1.33546132 0.66245924 1.14106444 -0.28138594 1.66507479 [25] 0.89173791 -0.28769121 0.25688113 -0.61819907 -0.63368845 -0.64265498 [31] 0.18258880 -0.53656497 -0.97055042 -1.24293410 -1.61129771 -1.46780710 [37] -1.42990430 -1.34749677 -0.08809863 1.13131218 -0.24982181 -0.01579493 [43] 1.90560340 1.59913687 0.16804428 0.22932609 1.46857029 1.76042985 [49] 0.51022589 0.54212648 0.16439518 -1.67192051 -1.81619007 -0.28471067 [55] 0.63082762 -0.72282710 -0.01967332 -0.47059066 1.11774213 -3.06458693 [61] -0.09301491 1.77284742 0.04710735 -0.21372287 -1.38292862 -0.83583990 [67] 1.79404191 -0.43700178 0.28214430 0.36723593 -2.52300887 0.20060056 [73] -0.52150951 -1.15693200 1.45144172 -1.10634717 0.39834945 -0.80316030 [79] 0.47309793 -0.01775058 -1.22771084 -0.46604669 0.46324063 -1.01118698 [85] -0.76876980 0.11197961 -0.84824698 0.79237504 0.60690512 0.59119681 [91] -1.73141011 1.45801827 -0.62680638 0.30050772 -0.45552817 0.32010452 [97] 0.48688592 0.44549801 0.73662985 0.38341843 > colMin(tmp) [1] -1.74603756 -1.89231250 -0.68244206 -1.50859811 1.39268057 1.04663451 [7] -0.28857556 -0.36625874 0.56327595 -1.53224782 -0.47468841 -0.02334060 [13] -1.52253714 -1.59132516 -0.45510463 -0.23126149 0.08947619 0.18253500 [19] 0.59491964 1.33546132 0.66245924 1.14106444 -0.28138594 1.66507479 [25] 0.89173791 -0.28769121 0.25688113 -0.61819907 -0.63368845 -0.64265498 [31] 0.18258880 -0.53656497 -0.97055042 -1.24293410 -1.61129771 -1.46780710 [37] -1.42990430 -1.34749677 -0.08809863 1.13131218 -0.24982181 -0.01579493 [43] 1.90560340 1.59913687 0.16804428 0.22932609 1.46857029 1.76042985 [49] 0.51022589 0.54212648 0.16439518 -1.67192051 -1.81619007 -0.28471067 [55] 0.63082762 -0.72282710 -0.01967332 -0.47059066 1.11774213 -3.06458693 [61] -0.09301491 1.77284742 0.04710735 -0.21372287 -1.38292862 -0.83583990 [67] 1.79404191 -0.43700178 0.28214430 0.36723593 -2.52300887 0.20060056 [73] -0.52150951 -1.15693200 1.45144172 -1.10634717 0.39834945 -0.80316030 [79] 0.47309793 -0.01775058 -1.22771084 -0.46604669 0.46324063 -1.01118698 [85] -0.76876980 0.11197961 -0.84824698 0.79237504 0.60690512 0.59119681 [91] -1.73141011 1.45801827 -0.62680638 0.30050772 -0.45552817 0.32010452 [97] 0.48688592 0.44549801 0.73662985 0.38341843 > colMedians(tmp) [1] -1.74603756 -1.89231250 -0.68244206 -1.50859811 1.39268057 1.04663451 [7] -0.28857556 -0.36625874 0.56327595 -1.53224782 -0.47468841 -0.02334060 [13] -1.52253714 -1.59132516 -0.45510463 -0.23126149 0.08947619 0.18253500 [19] 0.59491964 1.33546132 0.66245924 1.14106444 -0.28138594 1.66507479 [25] 0.89173791 -0.28769121 0.25688113 -0.61819907 -0.63368845 -0.64265498 [31] 0.18258880 -0.53656497 -0.97055042 -1.24293410 -1.61129771 -1.46780710 [37] -1.42990430 -1.34749677 -0.08809863 1.13131218 -0.24982181 -0.01579493 [43] 1.90560340 1.59913687 0.16804428 0.22932609 1.46857029 1.76042985 [49] 0.51022589 0.54212648 0.16439518 -1.67192051 -1.81619007 -0.28471067 [55] 0.63082762 -0.72282710 -0.01967332 -0.47059066 1.11774213 -3.06458693 [61] -0.09301491 1.77284742 0.04710735 -0.21372287 -1.38292862 -0.83583990 [67] 1.79404191 -0.43700178 0.28214430 0.36723593 -2.52300887 0.20060056 [73] -0.52150951 -1.15693200 1.45144172 -1.10634717 0.39834945 -0.80316030 [79] 0.47309793 -0.01775058 -1.22771084 -0.46604669 0.46324063 -1.01118698 [85] -0.76876980 0.11197961 -0.84824698 0.79237504 0.60690512 0.59119681 [91] -1.73141011 1.45801827 -0.62680638 0.30050772 -0.45552817 0.32010452 [97] 0.48688592 0.44549801 0.73662985 0.38341843 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.746038 -1.892312 -0.6824421 -1.508598 1.392681 1.046635 -0.2885756 [2,] -1.746038 -1.892312 -0.6824421 -1.508598 1.392681 1.046635 -0.2885756 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.3662587 0.5632759 -1.532248 -0.4746884 -0.0233406 -1.522537 -1.591325 [2,] -0.3662587 0.5632759 -1.532248 -0.4746884 -0.0233406 -1.522537 -1.591325 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.4551046 -0.2312615 0.08947619 0.182535 0.5949196 1.335461 0.6624592 [2,] -0.4551046 -0.2312615 0.08947619 0.182535 0.5949196 1.335461 0.6624592 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.141064 -0.2813859 1.665075 0.8917379 -0.2876912 0.2568811 -0.6181991 [2,] 1.141064 -0.2813859 1.665075 0.8917379 -0.2876912 0.2568811 -0.6181991 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.6336885 -0.642655 0.1825888 -0.536565 -0.9705504 -1.242934 -1.611298 [2,] -0.6336885 -0.642655 0.1825888 -0.536565 -0.9705504 -1.242934 -1.611298 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.467807 -1.429904 -1.347497 -0.08809863 1.131312 -0.2498218 -0.01579493 [2,] -1.467807 -1.429904 -1.347497 -0.08809863 1.131312 -0.2498218 -0.01579493 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [,50] [1,] 1.905603 1.599137 0.1680443 0.2293261 1.46857 1.76043 0.5102259 0.5421265 [2,] 1.905603 1.599137 0.1680443 0.2293261 1.46857 1.76043 0.5102259 0.5421265 [,51] [,52] [,53] [,54] [,55] [,56] [,57] [1,] 0.1643952 -1.671921 -1.81619 -0.2847107 0.6308276 -0.7228271 -0.01967332 [2,] 0.1643952 -1.671921 -1.81619 -0.2847107 0.6308276 -0.7228271 -0.01967332 [,58] [,59] [,60] [,61] [,62] [,63] [,64] [1,] -0.4705907 1.117742 -3.064587 -0.09301491 1.772847 0.04710735 -0.2137229 [2,] -0.4705907 1.117742 -3.064587 -0.09301491 1.772847 0.04710735 -0.2137229 [,65] [,66] [,67] [,68] [,69] [,70] [,71] [1,] -1.382929 -0.8358399 1.794042 -0.4370018 0.2821443 0.3672359 -2.523009 [2,] -1.382929 -0.8358399 1.794042 -0.4370018 0.2821443 0.3672359 -2.523009 [,72] [,73] [,74] [,75] [,76] [,77] [,78] [1,] 0.2006006 -0.5215095 -1.156932 1.451442 -1.106347 0.3983495 -0.8031603 [2,] 0.2006006 -0.5215095 -1.156932 1.451442 -1.106347 0.3983495 -0.8031603 [,79] [,80] [,81] [,82] [,83] [,84] [,85] [1,] 0.4730979 -0.01775058 -1.227711 -0.4660467 0.4632406 -1.011187 -0.7687698 [2,] 0.4730979 -0.01775058 -1.227711 -0.4660467 0.4632406 -1.011187 -0.7687698 [,86] [,87] [,88] [,89] [,90] [,91] [,92] [1,] 0.1119796 -0.848247 0.792375 0.6069051 0.5911968 -1.73141 1.458018 [2,] 0.1119796 -0.848247 0.792375 0.6069051 0.5911968 -1.73141 1.458018 [,93] [,94] [,95] [,96] [,97] [,98] [,99] [1,] -0.6268064 0.3005077 -0.4555282 0.3201045 0.4868859 0.445498 0.7366299 [2,] -0.6268064 0.3005077 -0.4555282 0.3201045 0.4868859 0.445498 0.7366299 [,100] [1,] 0.3834184 [2,] 0.3834184 > > > Max(tmp2) [1] 2.271794 > Min(tmp2) [1] -2.617813 > mean(tmp2) [1] 0.02901083 > Sum(tmp2) [1] 2.901083 > Var(tmp2) [1] 0.8075366 > > rowMeans(tmp2) [1] -0.77018702 0.30754810 -0.07120542 0.57363352 0.33956134 -0.81386948 [7] 0.02852514 0.20405814 0.55672267 0.53476006 -0.64132117 1.09807868 [13] -0.07824677 1.13057264 0.18786913 -0.25908612 0.39268418 0.30868843 [19] -1.71670771 -2.61781300 -0.23088784 0.67231928 -0.57477954 -0.63150714 [25] 0.30062477 1.24346754 1.57426466 0.24701234 0.04086754 -1.25151114 [31] 0.88578430 -0.14640275 0.58116621 -0.64312850 1.10025276 -0.71881176 [37] 0.09160990 0.27085953 1.99560424 0.87790489 0.70686707 -0.58883376 [43] 0.21725777 0.89495449 -0.09391965 0.29322219 -1.20065858 1.40894784 [49] -1.26084694 0.58165911 1.25169801 0.64019883 2.27179402 -0.23291947 [55] 1.69760964 0.41450686 -1.85886044 -1.02316658 0.69262167 -0.62165890 [61] 0.26093994 -1.72237984 1.24131290 -0.16778478 0.02399196 -1.07750393 [67] -0.61377898 -0.55483127 0.40378878 0.71894399 -1.52300218 0.13161043 [73] -0.58884049 0.36543425 -1.00722003 -1.73102479 0.84117544 0.40549667 [79] -0.17280652 0.28086508 -0.02373507 -0.30639995 0.61622533 -0.70678153 [85] -1.19010656 -1.55732170 -0.58196615 1.59136887 0.79860602 0.95507745 [91] 0.33032051 -1.18274443 0.20113647 -0.32272472 0.22553206 0.04982122 [97] -0.66618029 0.58375481 0.09506817 -0.09170179 > rowSums(tmp2) [1] -0.77018702 0.30754810 -0.07120542 0.57363352 0.33956134 -0.81386948 [7] 0.02852514 0.20405814 0.55672267 0.53476006 -0.64132117 1.09807868 [13] -0.07824677 1.13057264 0.18786913 -0.25908612 0.39268418 0.30868843 [19] -1.71670771 -2.61781300 -0.23088784 0.67231928 -0.57477954 -0.63150714 [25] 0.30062477 1.24346754 1.57426466 0.24701234 0.04086754 -1.25151114 [31] 0.88578430 -0.14640275 0.58116621 -0.64312850 1.10025276 -0.71881176 [37] 0.09160990 0.27085953 1.99560424 0.87790489 0.70686707 -0.58883376 [43] 0.21725777 0.89495449 -0.09391965 0.29322219 -1.20065858 1.40894784 [49] -1.26084694 0.58165911 1.25169801 0.64019883 2.27179402 -0.23291947 [55] 1.69760964 0.41450686 -1.85886044 -1.02316658 0.69262167 -0.62165890 [61] 0.26093994 -1.72237984 1.24131290 -0.16778478 0.02399196 -1.07750393 [67] -0.61377898 -0.55483127 0.40378878 0.71894399 -1.52300218 0.13161043 [73] -0.58884049 0.36543425 -1.00722003 -1.73102479 0.84117544 0.40549667 [79] -0.17280652 0.28086508 -0.02373507 -0.30639995 0.61622533 -0.70678153 [85] -1.19010656 -1.55732170 -0.58196615 1.59136887 0.79860602 0.95507745 [91] 0.33032051 -1.18274443 0.20113647 -0.32272472 0.22553206 0.04982122 [97] -0.66618029 0.58375481 0.09506817 -0.09170179 > 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.77018702 0.30754810 -0.07120542 0.57363352 0.33956134 -0.81386948 [7] 0.02852514 0.20405814 0.55672267 0.53476006 -0.64132117 1.09807868 [13] -0.07824677 1.13057264 0.18786913 -0.25908612 0.39268418 0.30868843 [19] -1.71670771 -2.61781300 -0.23088784 0.67231928 -0.57477954 -0.63150714 [25] 0.30062477 1.24346754 1.57426466 0.24701234 0.04086754 -1.25151114 [31] 0.88578430 -0.14640275 0.58116621 -0.64312850 1.10025276 -0.71881176 [37] 0.09160990 0.27085953 1.99560424 0.87790489 0.70686707 -0.58883376 [43] 0.21725777 0.89495449 -0.09391965 0.29322219 -1.20065858 1.40894784 [49] -1.26084694 0.58165911 1.25169801 0.64019883 2.27179402 -0.23291947 [55] 1.69760964 0.41450686 -1.85886044 -1.02316658 0.69262167 -0.62165890 [61] 0.26093994 -1.72237984 1.24131290 -0.16778478 0.02399196 -1.07750393 [67] -0.61377898 -0.55483127 0.40378878 0.71894399 -1.52300218 0.13161043 [73] -0.58884049 0.36543425 -1.00722003 -1.73102479 0.84117544 0.40549667 [79] -0.17280652 0.28086508 -0.02373507 -0.30639995 0.61622533 -0.70678153 [85] -1.19010656 -1.55732170 -0.58196615 1.59136887 0.79860602 0.95507745 [91] 0.33032051 -1.18274443 0.20113647 -0.32272472 0.22553206 0.04982122 [97] -0.66618029 0.58375481 0.09506817 -0.09170179 > rowMin(tmp2) [1] -0.77018702 0.30754810 -0.07120542 0.57363352 0.33956134 -0.81386948 [7] 0.02852514 0.20405814 0.55672267 0.53476006 -0.64132117 1.09807868 [13] -0.07824677 1.13057264 0.18786913 -0.25908612 0.39268418 0.30868843 [19] -1.71670771 -2.61781300 -0.23088784 0.67231928 -0.57477954 -0.63150714 [25] 0.30062477 1.24346754 1.57426466 0.24701234 0.04086754 -1.25151114 [31] 0.88578430 -0.14640275 0.58116621 -0.64312850 1.10025276 -0.71881176 [37] 0.09160990 0.27085953 1.99560424 0.87790489 0.70686707 -0.58883376 [43] 0.21725777 0.89495449 -0.09391965 0.29322219 -1.20065858 1.40894784 [49] -1.26084694 0.58165911 1.25169801 0.64019883 2.27179402 -0.23291947 [55] 1.69760964 0.41450686 -1.85886044 -1.02316658 0.69262167 -0.62165890 [61] 0.26093994 -1.72237984 1.24131290 -0.16778478 0.02399196 -1.07750393 [67] -0.61377898 -0.55483127 0.40378878 0.71894399 -1.52300218 0.13161043 [73] -0.58884049 0.36543425 -1.00722003 -1.73102479 0.84117544 0.40549667 [79] -0.17280652 0.28086508 -0.02373507 -0.30639995 0.61622533 -0.70678153 [85] -1.19010656 -1.55732170 -0.58196615 1.59136887 0.79860602 0.95507745 [91] 0.33032051 -1.18274443 0.20113647 -0.32272472 0.22553206 0.04982122 [97] -0.66618029 0.58375481 0.09506817 -0.09170179 > > colMeans(tmp2) [1] 0.02901083 > colSums(tmp2) [1] 2.901083 > colVars(tmp2) [1] 0.8075366 > colSd(tmp2) [1] 0.8986304 > colMax(tmp2) [1] 2.271794 > colMin(tmp2) [1] -2.617813 > colMedians(tmp2) [1] 0.1597398 > colRanges(tmp2) [,1] [1,] -2.617813 [2,] 2.271794 > > 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.9000987 1.3381326 -1.1160043 2.5991722 1.0566421 0.3656051 [7] 1.5675722 4.6426887 0.6983648 -2.3868722 > colApply(tmp,quantile)[,1] [,1] [1,] -1.3810186 [2,] -0.4191208 [3,] 0.4963225 [4,] 0.7725745 [5,] 1.1355764 > > rowApply(tmp,sum) [1] -1.4805167 -3.1032606 3.8885774 4.7419548 1.6123254 5.4583942 [7] 0.7122516 2.7324444 -2.8669590 -1.0298113 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 8 6 3 7 10 3 6 8 4 7 [2,] 5 4 6 3 1 1 7 3 10 9 [3,] 2 10 4 10 4 7 3 5 5 4 [4,] 7 9 7 5 5 2 10 6 2 6 [5,] 9 2 2 9 7 9 8 1 6 5 [6,] 3 3 10 1 3 4 1 7 8 8 [7,] 4 8 9 4 8 8 4 10 1 3 [8,] 1 7 5 6 9 10 5 4 9 10 [9,] 6 5 1 8 2 5 9 9 7 2 [10,] 10 1 8 2 6 6 2 2 3 1 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.6287274 -0.1962707 -2.2403388 -0.8101154 -2.2266537 0.2726636 [7] -3.3445875 1.1077755 0.6464951 0.3344509 5.8160712 0.8848176 [13] 0.2087793 3.9709690 -3.5464962 0.6630059 3.9184716 1.3868498 [19] 0.9281127 -0.6766928 > colApply(tmp,quantile)[,1] [,1] [1,] -0.8948070 [2,] 0.1033637 [3,] 0.1613212 [4,] 0.4310916 [5,] 0.8277579 > > rowApply(tmp,sum) [1] -3.6950869 -0.2196228 -1.4921069 6.1271764 7.0056747 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 13 11 5 14 11 [2,] 3 18 20 8 2 [3,] 6 1 12 6 17 [4,] 4 13 9 12 7 [5,] 16 6 1 3 12 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.1033637 -1.4546221 -0.8880034 -1.40812073 0.6267503 0.3303129 [2,] 0.1613212 1.0713013 -2.2545645 0.52227941 -0.5977041 -1.5243917 [3,] -0.8948070 1.8763776 0.1060525 -0.53945459 -2.0084091 0.8180189 [4,] 0.8277579 -0.2288758 -0.5607393 0.59562789 -0.8219703 1.0785731 [5,] 0.4310916 -1.4604518 1.3569158 0.01955263 0.5746795 -0.4298497 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.8437413 -0.375132 0.04953845 -0.1888577 0.7138111 -0.3142666 [2,] -0.2348245 -1.048193 0.61110727 0.7322502 1.2481720 1.0411554 [3,] -0.6398835 1.760809 -1.86835983 0.5534384 1.1519545 -1.7792569 [4,] -0.7417770 1.639178 0.95829984 -0.8737635 1.0837101 0.7609702 [5,] 0.1156389 -0.868887 0.89590938 0.1113835 1.6184235 1.1762155 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.9479380 0.04267374 -1.3321139 1.8666925 1.2823412 0.12135318 [2,] 0.4312221 1.29225673 -1.1944119 -0.1966166 -0.6617039 -0.03779671 [3,] -1.0913073 -0.16329343 0.4520200 -0.5570205 0.6604420 1.72726699 [4,] -0.8782924 1.53781627 0.1430529 0.5644656 -0.3187752 -0.80029112 [5,] 0.7992190 1.26151571 -1.6150433 -1.0145151 2.9561674 0.37631747 [,19] [,20] [1,] -1.4993226 -0.4756817 [2,] -0.1421057 0.5616241 [3,] -0.7536909 -0.3030042 [4,] 1.7257590 0.4364502 [5,] 1.5974729 -0.8960812 > > > 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 : 653 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.6802773 1.098803 -2.308501 0.1186116 -1.158987 -1.430608 0.994827 col8 col9 col10 col11 col12 col13 col14 row1 0.1575657 -2.024925 0.5558782 -0.614075 -0.7187063 1.085625 -0.3092813 col15 col16 col17 col18 col19 col20 row1 2.013719 -0.5646111 0.4829469 1.29173 -0.7654765 0.911134 > tmp[,"col10"] col10 row1 0.55587815 row2 0.55094158 row3 -0.06639397 row4 1.74198191 row5 0.30106339 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.6802773 1.098803 -2.3085009 0.1186116 -1.158987 -1.430608 0.9948270 row5 -0.6040955 1.422170 -0.2058163 -0.4024052 1.423532 -1.753376 0.5753328 col8 col9 col10 col11 col12 col13 col14 row1 0.1575657 -2.0249254 0.5558782 -0.614075 -0.7187063 1.085625 -0.3092813 row5 1.1793988 0.8721501 0.3010634 -2.484980 -0.7585364 -1.196156 0.6970766 col15 col16 col17 col18 col19 col20 row1 2.013719 -0.5646111 0.4829469 1.2917304 -0.7654765 0.9111340 row5 1.065811 -0.3736636 0.6693406 0.4275048 -0.3714929 -0.5418828 > tmp[,c("col6","col20")] col6 col20 row1 -1.4306080 0.9111340 row2 -0.6008205 -0.1646297 row3 0.5096236 -0.2593673 row4 0.6836037 0.2551443 row5 -1.7533764 -0.5418828 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.430608 0.9111340 row5 -1.753376 -0.5418828 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.11505 48.81929 49.95691 49.68665 50.42437 103.259 49.20104 50.73739 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.35993 48.83693 50.25214 49.49182 49.18302 50.43625 49.89358 49.93829 col17 col18 col19 col20 row1 50.71968 51.49247 49.57616 106.1809 > tmp[,"col10"] col10 row1 48.83693 row2 28.69819 row3 30.51170 row4 30.36653 row5 49.73873 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.11505 48.81929 49.95691 49.68665 50.42437 103.2590 49.20104 50.73739 row5 50.08747 49.45116 51.14258 48.59296 51.50453 105.9983 49.81956 50.82240 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.35993 48.83693 50.25214 49.49182 49.18302 50.43625 49.89358 49.93829 row5 49.30359 49.73873 51.21683 48.82988 52.24462 49.74510 50.42055 49.08291 col17 col18 col19 col20 row1 50.71968 51.49247 49.57616 106.1809 row5 47.91181 50.72547 48.71101 104.9468 > tmp[,c("col6","col20")] col6 col20 row1 103.25899 106.18087 row2 74.61369 73.75052 row3 74.05984 74.33615 row4 76.13856 75.00065 row5 105.99832 104.94682 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.2590 106.1809 row5 105.9983 104.9468 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.2590 106.1809 row5 105.9983 104.9468 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -1.0195712 [2,] 0.4002211 [3,] 0.2518642 [4,] 0.1330300 [5,] -0.3970880 > tmp[,c("col17","col7")] col17 col7 [1,] 1.1859766 0.96357317 [2,] 0.7460174 -0.67669459 [3,] 0.5732896 0.01527727 [4,] 0.5072443 0.98664478 [5,] -0.2608275 -0.26769341 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.6251136 0.5497053 [2,] 0.8698312 0.5458781 [3,] -0.6021575 0.1186145 [4,] -0.4320655 -1.3092680 [5,] -0.1458244 1.5235654 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.6251136 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.6251136 [2,] 0.8698312 > > > > 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] row3 -1.046560 0.5728858 0.006836792 0.2477254 -0.6158261 0.7429792 row1 -1.239208 0.2538373 0.164106028 0.3105232 0.5873981 -0.7607286 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.22698916 -0.1547767 0.7205664 0.7315756 -0.5727478 0.1503136 -1.0215151 row1 -0.03770726 0.7225732 0.3653121 0.8212618 0.2633738 1.6617562 0.5335212 [,14] [,15] [,16] [,17] [,18] [,19] row3 0.708314 0.2313803 -1.8247008 0.08149498 0.0004585134 -2.587379 row1 -0.560916 0.3397863 0.6126997 0.29144997 1.1903704368 1.458449 [,20] row3 -1.0172785 row1 0.4806228 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.5531845 -1.090367 0.5001156 -0.8318459 0.04216646 -0.717347 -0.8824737 [,8] [,9] [,10] row2 1.954272 -0.3129696 1.775173 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.7779746 0.9430346 1.128573 -0.3910086 -0.5244368 1.385932 -0.6200127 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.2318754 -0.1090818 -1.079806 -0.5357769 0.6218356 0.3507776 0.6640245 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.016714 1.271935 0.4177627 -0.4580894 -1.107854 -0.05889274 > > > 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: 0x21320f40> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c771c1da6f2" [2] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c77392e728f" [3] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c7743f0f4c3" [4] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c776bac9573" [5] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c774982c694" [6] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c775444ddfd" [7] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c77d180e06" [8] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c77694cd5bc" [9] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c774090bac1" [10] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c773eb7df13" [11] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c774b1639d1" [12] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c77fbbde6b" [13] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c7720e340c1" [14] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c77258c8881" [15] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM143c772e4fea38" > > > ### 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: 0x22608f00> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x22608f00> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x22608f00> > rowMedians(tmp) [1] -0.0716894052 -0.0546809449 0.2272724639 0.2980790561 -0.0494431066 [6] -0.2269167751 0.2921670623 -0.1718821949 0.3238289921 -0.0139032438 [11] -0.4133304040 0.0085228477 0.1136162793 0.1899475709 0.0387551196 [16] -0.4217718023 0.0851746679 -0.1584142923 0.4198343770 0.2687247521 [21] 0.2749521134 0.4570266205 -0.3689822416 -0.2514075726 -0.2586844301 [26] 0.7846579164 0.1038857607 -0.1671991497 -0.0400287676 -0.0889982187 [31] 0.2177569287 -0.2751613266 0.2350261646 -0.2842511900 0.0903279988 [36] 0.2472574737 -0.6253153288 -0.4608629331 0.3271106036 -0.3991509106 [41] 0.3149630911 0.5579984138 0.0851468561 0.3418735226 -0.0922181373 [46] -0.0643494504 0.4231407215 -0.0691571389 -0.4121140618 -0.2650140495 [51] -0.0693410495 0.1248595706 0.2996567980 0.0686482372 0.4879474384 [56] 0.2193917636 -0.1344299940 -0.2728939068 0.9101577241 0.0923414908 [61] -0.3048088234 0.3024063385 -0.1788532072 0.4644913082 -0.4879560010 [66] -0.1741663326 0.1376328384 0.3253382239 -0.0348163251 0.4051932156 [71] 0.2456591178 0.4000206858 0.0372391078 0.0912529108 -0.0922437750 [76] -0.0966029698 -0.0088776439 -0.1616157429 0.0006090263 -0.5926736045 [81] -0.0307403725 -0.0433861648 -0.5027575272 -0.5493111937 0.0038084257 [86] 0.4977478942 -0.1860711799 0.1587431129 0.6135436745 -0.0035819503 [91] -0.0462090399 -0.0902480784 0.4068400217 0.0993640542 0.0997651317 [96] 0.1872385648 0.6152706308 0.3211688731 -0.6237658001 0.0366994885 [101] -0.3852552232 0.6732851276 0.1338667588 -0.1410481412 -0.5195854705 [106] -0.0252420562 -0.0869745546 0.1528226240 -0.3370920595 -0.0642836798 [111] -0.6870874652 -0.0837943347 -0.2715555530 -0.4266627734 0.1728963488 [116] 0.2314348273 0.0444101393 0.1082768339 -0.0556972672 -0.1415577723 [121] 0.0555865856 0.0299505872 -0.6309425216 0.4541588126 -0.2353867510 [126] 0.2298853525 -0.1961135963 0.4695252368 -0.5497549848 -0.1222996992 [131] -0.1717595744 -0.5906532072 0.0070762331 0.5221767713 -0.3761421070 [136] 0.3225377452 -0.3693843602 0.2480335131 -0.0214515840 0.3934123864 [141] 0.1821067064 0.5395204430 -0.0841650508 -0.0975272524 -0.0352907195 [146] 0.2936414555 0.4132034965 -0.0835107099 -0.4329872296 0.1606011368 [151] 0.3655147041 0.2367122652 -0.2597217605 -0.2951586323 -0.2238423724 [156] 0.0734553612 -0.1577710414 0.4172185636 0.3691328831 -0.0259501751 [161] 0.1124837872 -0.1544408145 -0.2550733366 -0.0134997744 0.2544962238 [166] 0.2385048804 -0.1906400556 -0.6561538978 -0.0910568276 -0.2966638029 [171] 0.3837826920 -0.1677873091 0.3603178096 -0.3895432088 -0.4540346914 [176] -0.2591755911 -0.3611084872 0.3718350074 -0.2620425531 -0.4356717002 [181] 0.5600686764 0.5278584962 0.0246352977 -0.2072640660 0.0653930275 [186] -0.1288167024 0.1127827466 0.2938704483 0.1746491082 0.1643336379 [191] -0.6298510733 0.1104120024 0.3045177127 -0.4011955421 0.0516814859 [196] 0.1217400510 0.1586262716 0.1323928906 -0.0847042933 0.3405425194 [201] -0.1481195474 -0.2368252848 0.3567350375 0.1154340386 -0.0994125853 [206] 0.2841686566 -0.2657020999 0.1198462123 -0.0027305935 0.0422331973 [211] 0.2269251626 0.4862438538 0.2743838302 -0.0605995809 0.1505680961 [216] -0.2673462666 -0.6621847014 -0.0848758126 0.3727800567 0.2597797735 [221] -0.3926242406 -0.2736669553 -0.1428372622 -0.0576530073 0.2081854205 [226] -0.0383091401 -0.4560192840 0.1612854738 -0.0015183665 -0.1409620286 > > proc.time() user system elapsed 2.039 0.797 2.856
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: 0x3f5fced0> > .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: 0x3f5fced0> > .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: 0x3f5fced0> > .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: 0x3f5fced0> > 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: 0x3e049fb0> > .Call("R_bm_AddColumn",P) <pointer: 0x3e049fb0> > .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: 0x3e049fb0> > .Call("R_bm_AddColumn",P) <pointer: 0x3e049fb0> > .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: 0x3e049fb0> > 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: 0x3dea3990> > .Call("R_bm_AddColumn",P) <pointer: 0x3dea3990> > .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: 0x3dea3990> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x3dea3990> > .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: 0x3dea3990> > > .Call("R_bm_RowMode",P) <pointer: 0x3dea3990> > .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: 0x3dea3990> > > .Call("R_bm_ColMode",P) <pointer: 0x3dea3990> > .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: 0x3dea3990> > 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: 0x40802cf0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x40802cf0> > .Call("R_bm_AddColumn",P) <pointer: 0x40802cf0> > .Call("R_bm_AddColumn",P) <pointer: 0x40802cf0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile143cc1239cdc6b" "BufferedMatrixFile143cc15e83b395" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile143cc1239cdc6b" "BufferedMatrixFile143cc15e83b395" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x3e5e74f0> > .Call("R_bm_AddColumn",P) <pointer: 0x3e5e74f0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x3e5e74f0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x3e5e74f0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x3e5e74f0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x3e5e74f0> > .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: 0x3eee1180> > .Call("R_bm_AddColumn",P) <pointer: 0x3eee1180> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x3eee1180> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x3eee1180> > 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: 0x3eee5880> > .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: 0x3eee5880> > rm(P) > > proc.time() user system elapsed 0.333 0.042 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.344 0.038 0.367