Back to Multiple platform build/check report for BioC 3.19: simplified long |
|
This page was generated on 2024-03-28 11:40:23 -0400 (Thu, 28 Mar 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | R Under development (unstable) (2024-03-18 r86148) -- "Unsuffered Consequences" | 4708 |
palomino3 | Windows Server 2022 Datacenter | x64 | R Under development (unstable) (2024-03-16 r86144 ucrt) -- "Unsuffered Consequences" | 4446 |
lconway | macOS 12.7.1 Monterey | x86_64 | R Under development (unstable) (2024-03-18 r86148) -- "Unsuffered Consequences" | 4471 |
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) | aarch64 | R Under development (unstable) (2024-03-19 r86153) -- "Unsuffered Consequences" | 4426 |
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 247/2270 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.67.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 | ||||||||||
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.67.0 |
Command: /home/biocbuild/R/R-4.4-devel-2024.03.20/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R-4.4-devel-2024.03.20/site-library --no-vignettes --timings BufferedMatrix_1.67.0.tar.gz |
StartedAt: 2024-03-28 03:26:56 -0000 (Thu, 28 Mar 2024) |
EndedAt: 2024-03-28 03:27:23 -0000 (Thu, 28 Mar 2024) |
EllapsedTime: 27.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/R/R-4.4-devel-2024.03.20/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/R/R-4.4-devel-2024.03.20/site-library --no-vignettes --timings BufferedMatrix_1.67.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck’ * using R Under development (unstable) (2024-03-19 r86153) * 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.67.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-4.4-devel-2024.03.20/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/R/R-4.4-devel-2024.03.20/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘gcc (GCC) 10.3.1’ gcc -I"/home/biocbuild/R/R-4.4-devel-2024.03.20/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"/home/biocbuild/R/R-4.4-devel-2024.03.20/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function ‘dbm_ReadOnlyMode’: doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ At top level: doubleBufferedMatrix.c:3327:12: warning: ‘sort_double’ defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ gcc -I"/home/biocbuild/R/R-4.4-devel-2024.03.20/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"/home/biocbuild/R/R-4.4-devel-2024.03.20/include" -DNDEBUG -I/usr/local/include -fPIC -g -O2 -Wall -c init_package.c -o init_package.o gcc -shared -L/home/biocbuild/R/R-4.4-devel-2024.03.20/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/R/R-4.4-devel-2024.03.20/lib -lR installing to /home/biocbuild/R/R-4.4-devel-2024.03.20/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 Under development (unstable) (2024-03-19 r86153) -- "Unsuffered Consequences" 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.330 0.035 0.351
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2024-03-19 r86153) -- "Unsuffered Consequences" 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 471733 25.2 1025790 54.8 644037 34.4 Vcells 872050 6.7 8388608 64.0 2045368 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 Mar 28 03:27:17 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 Mar 28 03:27:18 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: 0x23343430> > > > > 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 Mar 28 03:27:18 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 Mar 28 03:27:18 2024" > > ColMode(tmp2) <pointer: 0x23343430> > > > > ### 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.46713232 -0.5360061 1.2378912 -0.09110712 [2,] 0.57713748 -0.9736907 -0.4312100 -0.76056465 [3,] 0.16202924 1.2519326 0.2935854 0.24316815 [4,] -0.09468443 -1.3604954 -1.0704659 0.80017233 > 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.46713232 0.5360061 1.2378912 0.09110712 [2,] 0.57713748 0.9736907 0.4312100 0.76056465 [3,] 0.16202924 1.2519326 0.2935854 0.24316815 [4,] 0.09468443 1.3604954 1.0704659 0.80017233 > 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.9733210 0.7321244 1.1126056 0.3018396 [2,] 0.7596956 0.9867577 0.6566658 0.8721036 [3,] 0.4025286 1.1188980 0.5418352 0.4931208 [4,] 0.3077084 1.1664027 1.0346332 0.8945235 > > 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.20034 32.85725 37.36395 28.10950 [2,] 33.17409 35.84127 31.99787 34.48160 [3,] 29.18731 37.44091 30.71194 30.17438 [4,] 28.17177 38.02452 36.41680 34.74541 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x22efaec0> > exp(tmp5) <pointer: 0x22efaec0> > log(tmp5,2) <pointer: 0x22efaec0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.6436 > Min(tmp5) [1] 53.87515 > mean(tmp5) [1] 72.43134 > Sum(tmp5) [1] 14486.27 > Var(tmp5) [1] 856.389 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.69018 68.75738 72.80802 70.26476 68.57443 70.69472 69.61332 73.37260 [9] 70.11293 69.42505 > rowSums(tmp5) [1] 1813.804 1375.148 1456.160 1405.295 1371.489 1413.894 1392.266 1467.452 [9] 1402.259 1388.501 > rowVars(tmp5) [1] 7917.26488 47.32275 98.74401 43.72283 63.14712 77.50940 [7] 93.52802 100.79946 58.77084 55.21171 > rowSd(tmp5) [1] 88.979014 6.879153 9.937002 6.612324 7.946516 8.803942 9.670989 [8] 10.039894 7.666214 7.430458 > rowMax(tmp5) [1] 466.64364 82.56439 91.18631 82.00798 82.49317 84.71536 86.85995 [8] 91.11270 84.77413 83.30823 > rowMin(tmp5) [1] 54.45051 55.87939 58.02232 58.50519 53.87515 56.26709 55.43568 57.42680 [9] 59.66312 54.79038 > > colMeans(tmp5) [1] 111.91387 72.51657 69.42768 67.74401 74.57272 73.68557 75.38395 [8] 68.67525 71.79982 71.11424 69.11150 68.95676 66.55995 69.92529 [15] 69.41356 70.05285 69.87190 67.24640 72.49096 68.16391 > colSums(tmp5) [1] 1119.1387 725.1657 694.2768 677.4401 745.7272 736.8557 753.8395 [8] 686.7525 717.9982 711.1424 691.1150 689.5676 665.5995 699.2529 [15] 694.1356 700.5285 698.7190 672.4640 724.9096 681.6391 > colVars(tmp5) [1] 15602.17721 80.47595 52.44738 86.24113 98.93650 47.18346 [7] 67.14999 84.85250 116.65767 72.86011 75.45191 90.32054 [13] 81.67154 119.74195 35.97665 33.51783 54.42469 52.49226 [19] 73.90306 63.39759 > colSd(tmp5) [1] 124.908675 8.970839 7.242056 9.286610 9.946683 6.869022 [7] 8.194510 9.211542 10.800818 8.535813 8.686306 9.503712 [13] 9.037231 10.942667 5.998054 5.789458 7.377309 7.245155 [19] 8.596689 7.962260 > colMax(tmp5) [1] 466.64364 84.71536 77.76816 83.30823 85.74857 82.56439 91.11270 [8] 87.32295 84.72457 86.21007 84.29217 91.18631 82.16976 89.54189 [15] 79.79676 78.91722 81.82580 80.20676 86.85995 79.44723 > colMin(tmp5) [1] 58.63584 57.42680 56.26709 53.87515 58.28378 62.85129 67.84611 57.75552 [9] 58.34144 58.24641 55.43568 59.68686 54.45051 54.79038 58.96593 62.61440 [17] 55.19078 58.50519 58.29634 55.87939 > > > ### 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 68.75738 72.80802 70.26476 68.57443 70.69472 69.61332 73.37260 [9] 70.11293 69.42505 > rowSums(tmp5) [1] NA 1375.148 1456.160 1405.295 1371.489 1413.894 1392.266 1467.452 [9] 1402.259 1388.501 > rowVars(tmp5) [1] 8328.02612 47.32275 98.74401 43.72283 63.14712 77.50940 [7] 93.52802 100.79946 58.77084 55.21171 > rowSd(tmp5) [1] 91.258020 6.879153 9.937002 6.612324 7.946516 8.803942 9.670989 [8] 10.039894 7.666214 7.430458 > rowMax(tmp5) [1] NA 82.56439 91.18631 82.00798 82.49317 84.71536 86.85995 91.11270 [9] 84.77413 83.30823 > rowMin(tmp5) [1] NA 55.87939 58.02232 58.50519 53.87515 56.26709 55.43568 57.42680 [9] 59.66312 54.79038 > > colMeans(tmp5) [1] 111.91387 NA 69.42768 67.74401 74.57272 73.68557 75.38395 [8] 68.67525 71.79982 71.11424 69.11150 68.95676 66.55995 69.92529 [15] 69.41356 70.05285 69.87190 67.24640 72.49096 68.16391 > colSums(tmp5) [1] 1119.1387 NA 694.2768 677.4401 745.7272 736.8557 753.8395 [8] 686.7525 717.9982 711.1424 691.1150 689.5676 665.5995 699.2529 [15] 694.1356 700.5285 698.7190 672.4640 724.9096 681.6391 > colVars(tmp5) [1] 15602.17721 NA 52.44738 86.24113 98.93650 47.18346 [7] 67.14999 84.85250 116.65767 72.86011 75.45191 90.32054 [13] 81.67154 119.74195 35.97665 33.51783 54.42469 52.49226 [19] 73.90306 63.39759 > colSd(tmp5) [1] 124.908675 NA 7.242056 9.286610 9.946683 6.869022 [7] 8.194510 9.211542 10.800818 8.535813 8.686306 9.503712 [13] 9.037231 10.942667 5.998054 5.789458 7.377309 7.245155 [19] 8.596689 7.962260 > colMax(tmp5) [1] 466.64364 NA 77.76816 83.30823 85.74857 82.56439 91.11270 [8] 87.32295 84.72457 86.21007 84.29217 91.18631 82.16976 89.54189 [15] 79.79676 78.91722 81.82580 80.20676 86.85995 79.44723 > colMin(tmp5) [1] 58.63584 NA 56.26709 53.87515 58.28378 62.85129 67.84611 57.75552 [9] 58.34144 58.24641 55.43568 59.68686 54.45051 54.79038 58.96593 62.61440 [17] 55.19078 58.50519 58.29634 55.87939 > > Max(tmp5,na.rm=TRUE) [1] 466.6436 > Min(tmp5,na.rm=TRUE) [1] 53.87515 > mean(tmp5,na.rm=TRUE) [1] 72.45166 > Sum(tmp5,na.rm=TRUE) [1] 14417.88 > Var(tmp5,na.rm=TRUE) [1] 860.6312 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.86397 68.75738 72.80802 70.26476 68.57443 70.69472 69.61332 73.37260 [9] 70.11293 69.42505 > rowSums(tmp5,na.rm=TRUE) [1] 1745.416 1375.148 1456.160 1405.295 1371.489 1413.894 1392.266 1467.452 [9] 1402.259 1388.501 > rowVars(tmp5,na.rm=TRUE) [1] 8328.02612 47.32275 98.74401 43.72283 63.14712 77.50940 [7] 93.52802 100.79946 58.77084 55.21171 > rowSd(tmp5,na.rm=TRUE) [1] 91.258020 6.879153 9.937002 6.612324 7.946516 8.803942 9.670989 [8] 10.039894 7.666214 7.430458 > rowMax(tmp5,na.rm=TRUE) [1] 466.64364 82.56439 91.18631 82.00798 82.49317 84.71536 86.85995 [8] 91.11270 84.77413 83.30823 > rowMin(tmp5,na.rm=TRUE) [1] 54.45051 55.87939 58.02232 58.50519 53.87515 56.26709 55.43568 57.42680 [9] 59.66312 54.79038 > > colMeans(tmp5,na.rm=TRUE) [1] 111.91387 72.97530 69.42768 67.74401 74.57272 73.68557 75.38395 [8] 68.67525 71.79982 71.11424 69.11150 68.95676 66.55995 69.92529 [15] 69.41356 70.05285 69.87190 67.24640 72.49096 68.16391 > colSums(tmp5,na.rm=TRUE) [1] 1119.1387 656.7777 694.2768 677.4401 745.7272 736.8557 753.8395 [8] 686.7525 717.9982 711.1424 691.1150 689.5676 665.5995 699.2529 [15] 694.1356 700.5285 698.7190 672.4640 724.9096 681.6391 > colVars(tmp5,na.rm=TRUE) [1] 15602.17721 88.16813 52.44738 86.24113 98.93650 47.18346 [7] 67.14999 84.85250 116.65767 72.86011 75.45191 90.32054 [13] 81.67154 119.74195 35.97665 33.51783 54.42469 52.49226 [19] 73.90306 63.39759 > colSd(tmp5,na.rm=TRUE) [1] 124.908675 9.389789 7.242056 9.286610 9.946683 6.869022 [7] 8.194510 9.211542 10.800818 8.535813 8.686306 9.503712 [13] 9.037231 10.942667 5.998054 5.789458 7.377309 7.245155 [19] 8.596689 7.962260 > colMax(tmp5,na.rm=TRUE) [1] 466.64364 84.71536 77.76816 83.30823 85.74857 82.56439 91.11270 [8] 87.32295 84.72457 86.21007 84.29217 91.18631 82.16976 89.54189 [15] 79.79676 78.91722 81.82580 80.20676 86.85995 79.44723 > colMin(tmp5,na.rm=TRUE) [1] 58.63584 57.42680 56.26709 53.87515 58.28378 62.85129 67.84611 57.75552 [9] 58.34144 58.24641 55.43568 59.68686 54.45051 54.79038 58.96593 62.61440 [17] 55.19078 58.50519 58.29634 55.87939 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] NaN 68.75738 72.80802 70.26476 68.57443 70.69472 69.61332 73.37260 [9] 70.11293 69.42505 > rowSums(tmp5,na.rm=TRUE) [1] 0.000 1375.148 1456.160 1405.295 1371.489 1413.894 1392.266 1467.452 [9] 1402.259 1388.501 > rowVars(tmp5,na.rm=TRUE) [1] NA 47.32275 98.74401 43.72283 63.14712 77.50940 93.52802 [8] 100.79946 58.77084 55.21171 > rowSd(tmp5,na.rm=TRUE) [1] NA 6.879153 9.937002 6.612324 7.946516 8.803942 9.670989 [8] 10.039894 7.666214 7.430458 > rowMax(tmp5,na.rm=TRUE) [1] NA 82.56439 91.18631 82.00798 82.49317 84.71536 86.85995 91.11270 [9] 84.77413 83.30823 > rowMin(tmp5,na.rm=TRUE) [1] NA 55.87939 58.02232 58.50519 53.87515 56.26709 55.43568 57.42680 [9] 59.66312 54.79038 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 72.49945 NaN 68.50096 68.77043 73.75709 74.88938 76.22149 68.05581 [9] 70.36374 70.41858 69.66562 69.43120 67.90544 68.51272 69.88504 69.06791 [17] 71.50314 65.80636 72.91171 66.91021 > colSums(tmp5,na.rm=TRUE) [1] 652.4951 0.0000 616.5086 618.9338 663.8138 674.0044 685.9934 612.5023 [9] 633.2737 633.7672 626.9905 624.8808 611.1490 616.6145 628.9654 621.6112 [17] 643.5282 592.2573 656.2054 602.1919 > colVars(tmp5,na.rm=TRUE) [1] 75.61484 NA 49.34168 85.16901 103.81931 36.77841 67.65220 [8] 91.14232 108.03863 76.52325 81.42913 99.07829 71.51404 112.26196 [15] 37.97289 26.79406 31.29233 35.72450 81.14935 53.63990 > colSd(tmp5,na.rm=TRUE) [1] 8.695679 NA 7.024363 9.228706 10.189176 6.064520 8.225096 [8] 9.546849 10.394163 8.747757 9.023809 9.953808 8.456597 10.595375 [15] 6.162215 5.176298 5.593954 5.976997 9.008293 7.323927 > colMax(tmp5,na.rm=TRUE) [1] 82.55464 -Inf 76.99472 83.30823 85.74857 82.56439 91.11270 87.32295 [9] 83.44910 86.21007 84.29217 91.18631 82.16976 89.54189 79.79676 76.46655 [17] 81.82580 76.86255 86.85995 74.96417 > colMin(tmp5,na.rm=TRUE) [1] 58.63584 Inf 56.26709 53.87515 58.28378 67.00572 68.95142 57.75552 [9] 58.34144 58.24641 55.43568 59.68686 56.94050 54.79038 58.96593 62.61440 [17] 64.28876 58.50519 58.29634 55.87939 > > > > > 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] 242.0384 150.1593 192.3049 122.8797 194.3354 224.6395 409.0350 277.0243 [9] 160.0763 110.1793 > apply(copymatrix,1,var,na.rm=TRUE) [1] 242.0384 150.1593 192.3049 122.8797 194.3354 224.6395 409.0350 277.0243 [9] 160.0763 110.1793 > > > > 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] -4.547474e-13 -1.421085e-14 -1.989520e-13 -5.684342e-14 1.705303e-13 [6] 2.273737e-13 8.526513e-14 -1.705303e-13 -1.705303e-13 1.136868e-13 [11] -1.705303e-13 5.684342e-14 5.684342e-14 -1.136868e-13 1.278977e-13 [16] -4.263256e-14 8.526513e-14 1.847411e-13 -1.136868e-13 -1.421085e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 1 12 8 9 1 7 4 7 2 8 8 2 9 1 2 9 3 17 2 12 6 5 1 12 3 3 1 5 6 16 5 20 5 16 4 13 1 3 1 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.328002 > Min(tmp) [1] -2.34641 > mean(tmp) [1] -0.01153943 > Sum(tmp) [1] -1.153943 > Var(tmp) [1] 0.7611952 > > rowMeans(tmp) [1] -0.01153943 > rowSums(tmp) [1] -1.153943 > rowVars(tmp) [1] 0.7611952 > rowSd(tmp) [1] 0.872465 > rowMax(tmp) [1] 2.328002 > rowMin(tmp) [1] -2.34641 > > colMeans(tmp) [1] 0.140852886 0.357507457 -2.290188165 0.624599990 -0.067123360 [6] -0.468592936 0.876960808 0.290248843 0.595074744 1.120516220 [11] 0.708459947 0.704337757 -0.577429230 0.207448314 -0.005482797 [16] -1.261837210 -0.446556628 1.254977021 -1.290401190 1.820047075 [21] 2.143513074 0.169970346 -0.057536902 0.496776762 0.170680453 [26] 2.328001953 0.318764787 0.103138027 -0.657964600 0.777826559 [31] -0.005073259 0.466294321 -0.413522799 -0.835046806 -0.938520098 [36] -0.888026014 0.379659960 -2.346409722 -0.937686370 -0.015348076 [41] -0.577395341 0.182653780 -0.965219029 -0.218651601 -0.757697267 [46] -1.510306864 -1.528923344 -0.455555751 1.134917386 0.763634195 [51] 0.597400669 -0.285302860 0.344920148 -1.080592050 0.247272274 [56] -0.822843360 -1.462250924 1.549922902 -0.537593920 -0.867331801 [61] -1.651649916 0.633437458 0.010784245 0.696743489 0.853658765 [66] -0.324782094 0.736879974 -0.401278046 -0.636743986 0.218066586 [71] 0.246829869 0.660702251 -1.465502833 -0.167449928 0.033139763 [76] -0.112007571 -0.735040577 0.312614029 0.555589951 -0.838784560 [81] -0.225361731 1.397502780 0.285685670 1.544384509 -0.431268453 [86] -0.384363910 -0.277298925 -0.507645830 0.835257199 -0.060558782 [91] 0.769812957 0.706465022 0.369481230 -0.878938117 -0.627829795 [96] 0.680155341 -0.028099844 0.146125449 -0.376014772 0.979391867 > colSums(tmp) [1] 0.140852886 0.357507457 -2.290188165 0.624599990 -0.067123360 [6] -0.468592936 0.876960808 0.290248843 0.595074744 1.120516220 [11] 0.708459947 0.704337757 -0.577429230 0.207448314 -0.005482797 [16] -1.261837210 -0.446556628 1.254977021 -1.290401190 1.820047075 [21] 2.143513074 0.169970346 -0.057536902 0.496776762 0.170680453 [26] 2.328001953 0.318764787 0.103138027 -0.657964600 0.777826559 [31] -0.005073259 0.466294321 -0.413522799 -0.835046806 -0.938520098 [36] -0.888026014 0.379659960 -2.346409722 -0.937686370 -0.015348076 [41] -0.577395341 0.182653780 -0.965219029 -0.218651601 -0.757697267 [46] -1.510306864 -1.528923344 -0.455555751 1.134917386 0.763634195 [51] 0.597400669 -0.285302860 0.344920148 -1.080592050 0.247272274 [56] -0.822843360 -1.462250924 1.549922902 -0.537593920 -0.867331801 [61] -1.651649916 0.633437458 0.010784245 0.696743489 0.853658765 [66] -0.324782094 0.736879974 -0.401278046 -0.636743986 0.218066586 [71] 0.246829869 0.660702251 -1.465502833 -0.167449928 0.033139763 [76] -0.112007571 -0.735040577 0.312614029 0.555589951 -0.838784560 [81] -0.225361731 1.397502780 0.285685670 1.544384509 -0.431268453 [86] -0.384363910 -0.277298925 -0.507645830 0.835257199 -0.060558782 [91] 0.769812957 0.706465022 0.369481230 -0.878938117 -0.627829795 [96] 0.680155341 -0.028099844 0.146125449 -0.376014772 0.979391867 > 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.140852886 0.357507457 -2.290188165 0.624599990 -0.067123360 [6] -0.468592936 0.876960808 0.290248843 0.595074744 1.120516220 [11] 0.708459947 0.704337757 -0.577429230 0.207448314 -0.005482797 [16] -1.261837210 -0.446556628 1.254977021 -1.290401190 1.820047075 [21] 2.143513074 0.169970346 -0.057536902 0.496776762 0.170680453 [26] 2.328001953 0.318764787 0.103138027 -0.657964600 0.777826559 [31] -0.005073259 0.466294321 -0.413522799 -0.835046806 -0.938520098 [36] -0.888026014 0.379659960 -2.346409722 -0.937686370 -0.015348076 [41] -0.577395341 0.182653780 -0.965219029 -0.218651601 -0.757697267 [46] -1.510306864 -1.528923344 -0.455555751 1.134917386 0.763634195 [51] 0.597400669 -0.285302860 0.344920148 -1.080592050 0.247272274 [56] -0.822843360 -1.462250924 1.549922902 -0.537593920 -0.867331801 [61] -1.651649916 0.633437458 0.010784245 0.696743489 0.853658765 [66] -0.324782094 0.736879974 -0.401278046 -0.636743986 0.218066586 [71] 0.246829869 0.660702251 -1.465502833 -0.167449928 0.033139763 [76] -0.112007571 -0.735040577 0.312614029 0.555589951 -0.838784560 [81] -0.225361731 1.397502780 0.285685670 1.544384509 -0.431268453 [86] -0.384363910 -0.277298925 -0.507645830 0.835257199 -0.060558782 [91] 0.769812957 0.706465022 0.369481230 -0.878938117 -0.627829795 [96] 0.680155341 -0.028099844 0.146125449 -0.376014772 0.979391867 > colMin(tmp) [1] 0.140852886 0.357507457 -2.290188165 0.624599990 -0.067123360 [6] -0.468592936 0.876960808 0.290248843 0.595074744 1.120516220 [11] 0.708459947 0.704337757 -0.577429230 0.207448314 -0.005482797 [16] -1.261837210 -0.446556628 1.254977021 -1.290401190 1.820047075 [21] 2.143513074 0.169970346 -0.057536902 0.496776762 0.170680453 [26] 2.328001953 0.318764787 0.103138027 -0.657964600 0.777826559 [31] -0.005073259 0.466294321 -0.413522799 -0.835046806 -0.938520098 [36] -0.888026014 0.379659960 -2.346409722 -0.937686370 -0.015348076 [41] -0.577395341 0.182653780 -0.965219029 -0.218651601 -0.757697267 [46] -1.510306864 -1.528923344 -0.455555751 1.134917386 0.763634195 [51] 0.597400669 -0.285302860 0.344920148 -1.080592050 0.247272274 [56] -0.822843360 -1.462250924 1.549922902 -0.537593920 -0.867331801 [61] -1.651649916 0.633437458 0.010784245 0.696743489 0.853658765 [66] -0.324782094 0.736879974 -0.401278046 -0.636743986 0.218066586 [71] 0.246829869 0.660702251 -1.465502833 -0.167449928 0.033139763 [76] -0.112007571 -0.735040577 0.312614029 0.555589951 -0.838784560 [81] -0.225361731 1.397502780 0.285685670 1.544384509 -0.431268453 [86] -0.384363910 -0.277298925 -0.507645830 0.835257199 -0.060558782 [91] 0.769812957 0.706465022 0.369481230 -0.878938117 -0.627829795 [96] 0.680155341 -0.028099844 0.146125449 -0.376014772 0.979391867 > colMedians(tmp) [1] 0.140852886 0.357507457 -2.290188165 0.624599990 -0.067123360 [6] -0.468592936 0.876960808 0.290248843 0.595074744 1.120516220 [11] 0.708459947 0.704337757 -0.577429230 0.207448314 -0.005482797 [16] -1.261837210 -0.446556628 1.254977021 -1.290401190 1.820047075 [21] 2.143513074 0.169970346 -0.057536902 0.496776762 0.170680453 [26] 2.328001953 0.318764787 0.103138027 -0.657964600 0.777826559 [31] -0.005073259 0.466294321 -0.413522799 -0.835046806 -0.938520098 [36] -0.888026014 0.379659960 -2.346409722 -0.937686370 -0.015348076 [41] -0.577395341 0.182653780 -0.965219029 -0.218651601 -0.757697267 [46] -1.510306864 -1.528923344 -0.455555751 1.134917386 0.763634195 [51] 0.597400669 -0.285302860 0.344920148 -1.080592050 0.247272274 [56] -0.822843360 -1.462250924 1.549922902 -0.537593920 -0.867331801 [61] -1.651649916 0.633437458 0.010784245 0.696743489 0.853658765 [66] -0.324782094 0.736879974 -0.401278046 -0.636743986 0.218066586 [71] 0.246829869 0.660702251 -1.465502833 -0.167449928 0.033139763 [76] -0.112007571 -0.735040577 0.312614029 0.555589951 -0.838784560 [81] -0.225361731 1.397502780 0.285685670 1.544384509 -0.431268453 [86] -0.384363910 -0.277298925 -0.507645830 0.835257199 -0.060558782 [91] 0.769812957 0.706465022 0.369481230 -0.878938117 -0.627829795 [96] 0.680155341 -0.028099844 0.146125449 -0.376014772 0.979391867 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.1408529 0.3575075 -2.290188 0.6246 -0.06712336 -0.4685929 0.8769608 [2,] 0.1408529 0.3575075 -2.290188 0.6246 -0.06712336 -0.4685929 0.8769608 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.2902488 0.5950747 1.120516 0.7084599 0.7043378 -0.5774292 0.2074483 [2,] 0.2902488 0.5950747 1.120516 0.7084599 0.7043378 -0.5774292 0.2074483 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.005482797 -1.261837 -0.4465566 1.254977 -1.290401 1.820047 2.143513 [2,] -0.005482797 -1.261837 -0.4465566 1.254977 -1.290401 1.820047 2.143513 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.1699703 -0.0575369 0.4967768 0.1706805 2.328002 0.3187648 0.103138 [2,] 0.1699703 -0.0575369 0.4967768 0.1706805 2.328002 0.3187648 0.103138 [,29] [,30] [,31] [,32] [,33] [,34] [1,] -0.6579646 0.7778266 -0.005073259 0.4662943 -0.4135228 -0.8350468 [2,] -0.6579646 0.7778266 -0.005073259 0.4662943 -0.4135228 -0.8350468 [,35] [,36] [,37] [,38] [,39] [,40] [,41] [1,] -0.9385201 -0.888026 0.37966 -2.34641 -0.9376864 -0.01534808 -0.5773953 [2,] -0.9385201 -0.888026 0.37966 -2.34641 -0.9376864 -0.01534808 -0.5773953 [,42] [,43] [,44] [,45] [,46] [,47] [,48] [1,] 0.1826538 -0.965219 -0.2186516 -0.7576973 -1.510307 -1.528923 -0.4555558 [2,] 0.1826538 -0.965219 -0.2186516 -0.7576973 -1.510307 -1.528923 -0.4555558 [,49] [,50] [,51] [,52] [,53] [,54] [,55] [1,] 1.134917 0.7636342 0.5974007 -0.2853029 0.3449201 -1.080592 0.2472723 [2,] 1.134917 0.7636342 0.5974007 -0.2853029 0.3449201 -1.080592 0.2472723 [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] -0.8228434 -1.462251 1.549923 -0.5375939 -0.8673318 -1.65165 0.6334375 [2,] -0.8228434 -1.462251 1.549923 -0.5375939 -0.8673318 -1.65165 0.6334375 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [1,] 0.01078424 0.6967435 0.8536588 -0.3247821 0.73688 -0.401278 -0.636744 [2,] 0.01078424 0.6967435 0.8536588 -0.3247821 0.73688 -0.401278 -0.636744 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] 0.2180666 0.2468299 0.6607023 -1.465503 -0.1674499 0.03313976 -0.1120076 [2,] 0.2180666 0.2468299 0.6607023 -1.465503 -0.1674499 0.03313976 -0.1120076 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] -0.7350406 0.312614 0.55559 -0.8387846 -0.2253617 1.397503 0.2856857 [2,] -0.7350406 0.312614 0.55559 -0.8387846 -0.2253617 1.397503 0.2856857 [,84] [,85] [,86] [,87] [,88] [,89] [,90] [1,] 1.544385 -0.4312685 -0.3843639 -0.2772989 -0.5076458 0.8352572 -0.06055878 [2,] 1.544385 -0.4312685 -0.3843639 -0.2772989 -0.5076458 0.8352572 -0.06055878 [,91] [,92] [,93] [,94] [,95] [,96] [,97] [1,] 0.769813 0.706465 0.3694812 -0.8789381 -0.6278298 0.6801553 -0.02809984 [2,] 0.769813 0.706465 0.3694812 -0.8789381 -0.6278298 0.6801553 -0.02809984 [,98] [,99] [,100] [1,] 0.1461254 -0.3760148 0.9793919 [2,] 0.1461254 -0.3760148 0.9793919 > > > Max(tmp2) [1] 2.183076 > Min(tmp2) [1] -2.743807 > mean(tmp2) [1] -0.00835916 > Sum(tmp2) [1] -0.835916 > Var(tmp2) [1] 1.009314 > > rowMeans(tmp2) [1] -0.48998793 1.57425846 0.64180724 0.68627495 0.88700780 0.26758334 [7] -1.27965496 0.29956910 0.98868406 0.43137121 -1.96201228 0.51996275 [13] 0.61221599 0.20708445 0.23735765 -0.70803180 -0.65969946 1.35090110 [19] 1.05656359 -0.98262100 0.10954193 -0.69390717 0.76354445 -0.40340886 [25] -0.82903432 1.81042894 0.56326050 -2.74380727 0.25481234 0.07874054 [31] -1.21672006 -0.38557459 -0.32064835 0.02573419 -0.63495948 0.89114058 [37] 0.10047728 0.76519187 0.27593952 0.47945325 -1.62338809 -0.59314594 [43] -0.52812185 -0.70040916 0.82239774 -0.41115026 0.06494631 -0.39276189 [49] -1.36050572 0.29987523 0.47100099 0.13701125 -0.83297238 1.50193644 [55] 1.32562866 0.60452746 -0.37492815 -1.25974282 -1.09087602 0.77703412 [61] -1.38368793 1.09991651 1.13956350 1.93391281 0.04907346 1.61215257 [67] -0.83304202 -0.84273778 -0.70146462 -0.21297865 1.50491524 -1.26317735 [73] -1.49988918 1.64691456 0.35289133 1.00026680 -0.41687793 -0.06000264 [79] -0.23063360 -0.98851387 -0.25728732 -0.12033004 -2.29021015 -2.20287476 [85] -0.75067218 -0.03162126 0.82071338 2.18307576 1.57037238 -0.70223690 [91] 0.32350569 -1.64065138 -0.58167474 0.78665696 -0.62404888 0.84570876 [97] -0.09670029 1.25212443 -1.02833892 0.39677675 > rowSums(tmp2) [1] -0.48998793 1.57425846 0.64180724 0.68627495 0.88700780 0.26758334 [7] -1.27965496 0.29956910 0.98868406 0.43137121 -1.96201228 0.51996275 [13] 0.61221599 0.20708445 0.23735765 -0.70803180 -0.65969946 1.35090110 [19] 1.05656359 -0.98262100 0.10954193 -0.69390717 0.76354445 -0.40340886 [25] -0.82903432 1.81042894 0.56326050 -2.74380727 0.25481234 0.07874054 [31] -1.21672006 -0.38557459 -0.32064835 0.02573419 -0.63495948 0.89114058 [37] 0.10047728 0.76519187 0.27593952 0.47945325 -1.62338809 -0.59314594 [43] -0.52812185 -0.70040916 0.82239774 -0.41115026 0.06494631 -0.39276189 [49] -1.36050572 0.29987523 0.47100099 0.13701125 -0.83297238 1.50193644 [55] 1.32562866 0.60452746 -0.37492815 -1.25974282 -1.09087602 0.77703412 [61] -1.38368793 1.09991651 1.13956350 1.93391281 0.04907346 1.61215257 [67] -0.83304202 -0.84273778 -0.70146462 -0.21297865 1.50491524 -1.26317735 [73] -1.49988918 1.64691456 0.35289133 1.00026680 -0.41687793 -0.06000264 [79] -0.23063360 -0.98851387 -0.25728732 -0.12033004 -2.29021015 -2.20287476 [85] -0.75067218 -0.03162126 0.82071338 2.18307576 1.57037238 -0.70223690 [91] 0.32350569 -1.64065138 -0.58167474 0.78665696 -0.62404888 0.84570876 [97] -0.09670029 1.25212443 -1.02833892 0.39677675 > 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.48998793 1.57425846 0.64180724 0.68627495 0.88700780 0.26758334 [7] -1.27965496 0.29956910 0.98868406 0.43137121 -1.96201228 0.51996275 [13] 0.61221599 0.20708445 0.23735765 -0.70803180 -0.65969946 1.35090110 [19] 1.05656359 -0.98262100 0.10954193 -0.69390717 0.76354445 -0.40340886 [25] -0.82903432 1.81042894 0.56326050 -2.74380727 0.25481234 0.07874054 [31] -1.21672006 -0.38557459 -0.32064835 0.02573419 -0.63495948 0.89114058 [37] 0.10047728 0.76519187 0.27593952 0.47945325 -1.62338809 -0.59314594 [43] -0.52812185 -0.70040916 0.82239774 -0.41115026 0.06494631 -0.39276189 [49] -1.36050572 0.29987523 0.47100099 0.13701125 -0.83297238 1.50193644 [55] 1.32562866 0.60452746 -0.37492815 -1.25974282 -1.09087602 0.77703412 [61] -1.38368793 1.09991651 1.13956350 1.93391281 0.04907346 1.61215257 [67] -0.83304202 -0.84273778 -0.70146462 -0.21297865 1.50491524 -1.26317735 [73] -1.49988918 1.64691456 0.35289133 1.00026680 -0.41687793 -0.06000264 [79] -0.23063360 -0.98851387 -0.25728732 -0.12033004 -2.29021015 -2.20287476 [85] -0.75067218 -0.03162126 0.82071338 2.18307576 1.57037238 -0.70223690 [91] 0.32350569 -1.64065138 -0.58167474 0.78665696 -0.62404888 0.84570876 [97] -0.09670029 1.25212443 -1.02833892 0.39677675 > rowMin(tmp2) [1] -0.48998793 1.57425846 0.64180724 0.68627495 0.88700780 0.26758334 [7] -1.27965496 0.29956910 0.98868406 0.43137121 -1.96201228 0.51996275 [13] 0.61221599 0.20708445 0.23735765 -0.70803180 -0.65969946 1.35090110 [19] 1.05656359 -0.98262100 0.10954193 -0.69390717 0.76354445 -0.40340886 [25] -0.82903432 1.81042894 0.56326050 -2.74380727 0.25481234 0.07874054 [31] -1.21672006 -0.38557459 -0.32064835 0.02573419 -0.63495948 0.89114058 [37] 0.10047728 0.76519187 0.27593952 0.47945325 -1.62338809 -0.59314594 [43] -0.52812185 -0.70040916 0.82239774 -0.41115026 0.06494631 -0.39276189 [49] -1.36050572 0.29987523 0.47100099 0.13701125 -0.83297238 1.50193644 [55] 1.32562866 0.60452746 -0.37492815 -1.25974282 -1.09087602 0.77703412 [61] -1.38368793 1.09991651 1.13956350 1.93391281 0.04907346 1.61215257 [67] -0.83304202 -0.84273778 -0.70146462 -0.21297865 1.50491524 -1.26317735 [73] -1.49988918 1.64691456 0.35289133 1.00026680 -0.41687793 -0.06000264 [79] -0.23063360 -0.98851387 -0.25728732 -0.12033004 -2.29021015 -2.20287476 [85] -0.75067218 -0.03162126 0.82071338 2.18307576 1.57037238 -0.70223690 [91] 0.32350569 -1.64065138 -0.58167474 0.78665696 -0.62404888 0.84570876 [97] -0.09670029 1.25212443 -1.02833892 0.39677675 > > colMeans(tmp2) [1] -0.00835916 > colSums(tmp2) [1] -0.835916 > colVars(tmp2) [1] 1.009314 > colSd(tmp2) [1] 1.004646 > colMax(tmp2) [1] 2.183076 > colMin(tmp2) [1] -2.743807 > colMedians(tmp2) [1] 0.05700988 > colRanges(tmp2) [,1] [1,] -2.743807 [2,] 2.183076 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 2.2794302 -0.3244886 0.3311583 1.3038590 3.4658780 -0.1945798 [7] -1.2494375 8.1352858 1.0977599 1.5305507 > colApply(tmp,quantile)[,1] [,1] [1,] -1.1101969 [2,] -0.2783218 [3,] 0.4284927 [4,] 0.9311451 [5,] 1.3328462 > > rowApply(tmp,sum) [1] 3.8410224 2.2742802 6.4338250 -3.1622837 6.1004929 2.1818131 [7] 3.0447530 -1.7844714 -2.3934289 -0.1605867 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 9 2 6 3 7 5 9 10 4 6 [2,] 1 9 5 5 1 2 7 2 9 9 [3,] 6 5 4 4 6 1 4 8 6 5 [4,] 2 1 3 10 5 9 1 6 7 8 [5,] 3 3 10 8 4 10 5 4 8 2 [6,] 8 6 1 6 3 4 10 5 3 7 [7,] 7 4 2 2 10 3 3 9 5 1 [8,] 10 8 9 9 8 7 2 7 10 3 [9,] 5 7 7 1 9 6 8 1 1 10 [10,] 4 10 8 7 2 8 6 3 2 4 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 2.98374066 1.14496910 -2.30993098 -2.14869432 -1.72012371 -1.99844377 [7] -2.54378574 2.99647420 0.03131103 2.38901387 -1.35202301 3.04408444 [13] 0.97540608 -2.75712986 -0.97233886 2.88334114 -1.56203364 2.65198643 [19] 5.16902220 -1.93980800 > colApply(tmp,quantile)[,1] [,1] [1,] -1.75792791 [2,] -0.20502925 [3,] 0.07444344 [4,] 1.33858976 [5,] 3.53366462 > > rowApply(tmp,sum) [1] -5.529287 8.902483 4.336405 -5.619301 2.874737 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 14 20 17 2 6 [2,] 4 11 20 13 12 [3,] 7 2 4 5 18 [4,] 17 14 3 6 1 [5,] 11 5 12 3 7 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.07444344 -1.27999973 -0.7310575 0.7971721 -0.3019139 -1.76842897 [2,] 3.53366462 0.41008046 -1.3176073 0.7776404 -0.3854250 0.05705746 [3,] 1.33858976 1.72405422 -0.8625930 -0.9638209 0.4842815 0.06255555 [4,] -1.75792791 -0.02865767 -0.9607407 -0.8454918 -1.3668247 1.03600776 [5,] -0.20502925 0.31949183 1.5620675 -1.9141941 -0.1502416 -1.38563557 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -2.6281872 -0.7231874 0.3466475 -0.7947337 0.5659985 -0.06847439 [2,] -0.5254602 1.4019239 1.3545328 1.9054157 0.6826221 0.56704995 [3,] -0.3383901 1.4409227 -0.1978281 1.6105364 -1.1439882 0.66837824 [4,] 0.7995943 -0.7441886 -0.2559801 -0.6597803 -1.3105437 1.76206292 [5,] 0.1486574 1.6210037 -1.2160610 0.3275757 -0.1461118 0.11506773 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.7569626 -0.34696913 -0.16585260 1.02331643 -1.4762627 1.1642358 [2,] 0.3675443 -1.65077158 0.06304477 1.14692005 -0.2704527 0.2332159 [3,] 1.2035628 -0.03020399 0.35652782 0.83685439 -1.1709879 -0.6434383 [4,] -0.7322085 0.29473330 -2.49620659 0.08545122 -0.3263615 1.4807102 [5,] 0.8934702 -1.02391846 1.27014774 -0.20920095 1.6820311 0.4172628 [,19] [,20] [1,] 2.2074262 -0.6664971 [2,] 1.2230366 -0.6715496 [3,] 0.5990556 -0.6376632 [4,] 0.6648540 -0.2578029 [5,] 0.4746498 0.2937047 > > > 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.07814525 -0.9908165 0.567062 0.9759397 -0.2842066 -0.4171686 -0.8802052 col8 col9 col10 col11 col12 col13 col14 row1 0.2923187 0.4429429 0.2026438 -2.282212 -3.568945 -1.199805 -0.08189375 col15 col16 col17 col18 col19 col20 row1 -0.1474701 -0.2396322 0.5109318 0.2863222 0.5640345 1.124073 > tmp[,"col10"] col10 row1 0.2026438 row2 -0.8106039 row3 0.1019351 row4 0.2371588 row5 -1.4570853 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.07814525 -0.99081649 0.5670620 0.97593970 -0.2842066 -0.4171686 row5 -2.01164803 -0.04730648 -0.9671294 -0.07587515 -0.4406948 0.8603175 col7 col8 col9 col10 col11 col12 row1 -0.88020523 0.2923187 0.4429429 0.2026438 -2.2822119 -3.568945 row5 0.02040392 -0.5721158 0.5562418 -1.4570853 -0.3253209 1.108137 col13 col14 col15 col16 col17 col18 row1 -1.1998052 -0.08189375 -0.1474701 -0.2396322 0.51093181 0.2863222 row5 -0.4751934 0.39045885 0.7970554 -0.4438431 0.06694196 -0.3774876 col19 col20 row1 0.5640345 1.124073 row5 0.6654371 1.620490 > tmp[,c("col6","col20")] col6 col20 row1 -0.4171686 1.1240728 row2 0.2909213 0.2231415 row3 0.3939380 -0.7343083 row4 -0.1148070 1.2216860 row5 0.8603175 1.6204902 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.4171686 1.124073 row5 0.8603175 1.620490 > > > > > 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 47.8113 49.33075 50.675 48.63432 48.8029 103.652 49.00356 49.34436 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.59973 50.57917 49.92099 50.06692 49.64533 51.50022 50.99925 49.81782 col17 col18 col19 col20 row1 47.74716 49.19435 49.06151 104.0833 > tmp[,"col10"] col10 row1 50.57917 row2 29.29998 row3 30.24751 row4 31.64880 row5 49.08632 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 47.81130 49.33075 50.67500 48.63432 48.80290 103.6520 49.00356 49.34436 row5 48.99588 48.87021 49.18953 49.39274 49.69464 105.0813 49.44498 50.59767 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.59973 50.57917 49.92099 50.06692 49.64533 51.50022 50.99925 49.81782 row5 50.01058 49.08632 48.47331 49.98129 50.59702 50.20838 50.22696 50.22364 col17 col18 col19 col20 row1 47.74716 49.19435 49.06151 104.0833 row5 51.77867 49.57422 48.55825 105.9000 > tmp[,c("col6","col20")] col6 col20 row1 103.65205 104.08328 row2 75.15093 74.43665 row3 73.68141 74.76131 row4 74.79723 75.75329 row5 105.08135 105.89999 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.6520 104.0833 row5 105.0813 105.9000 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.6520 104.0833 row5 105.0813 105.9000 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.4343307 [2,] -0.6963944 [3,] 0.2945081 [4,] -0.1596118 [5,] -0.8990678 > tmp[,c("col17","col7")] col17 col7 [1,] -0.11987548 -1.0705454 [2,] -1.79737447 1.9538565 [3,] -0.32776791 -0.4121095 [4,] -0.09653845 1.1984471 [5,] -0.90299014 1.4918858 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.94981701 -1.2247703 [2,] 0.55335972 -1.6973913 [3,] 1.61029533 1.6584857 [4,] 0.42986162 0.1885693 [5,] -0.05276866 -0.3338813 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.949817 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.9498170 [2,] 0.5533597 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 -0.3692908 3.220674 -0.18460303 0.2845093 -0.1029227 -1.9952833 -0.1066861 row1 0.3724893 2.168512 0.01343151 0.4301477 -0.5589053 -0.5798407 -0.8798049 [,8] [,9] [,10] [,11] [,12] [,13] row3 1.0715541 -0.5206787 0.9982908 -0.4667225 -0.3350874 0.68704634 row1 -0.9886757 0.8029602 -0.1109142 -0.1337072 -1.2194599 0.03389452 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 -0.6629028 0.104191 0.2137252 0.9473598 0.02042432 -1.7579716 0.5183064 row1 1.1876965 0.485619 -0.6660928 0.8628271 0.16904914 -0.1365117 -1.3274525 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.7012401 0.4620427 1.586904 -0.1149249 -1.070172 -0.8007877 -1.020652 [,8] [,9] [,10] row2 2.166042 -0.8390305 0.1493114 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.3155834 -0.0111301 -0.259367 -0.4962423 0.07859254 0.836916 -0.3987548 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 1.104484 -0.1696198 2.073849 0.1455753 1.297092 -0.8144064 -0.2041675 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.097352 -1.787078 0.717795 1.247776 1.019506 -0.6726543 > > > 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: 0x2236dc60> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd4e56f32c" [2] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd7d7a2d68" [3] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd46d3a007" [4] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd73ca76eb" [5] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd3aa03f36" [6] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd5fd6707c" [7] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd421b3a8a" [8] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd143ae2cc" [9] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd14ad0e81" [10] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd322ad78a" [11] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd6665ecf4" [12] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd633dd298" [13] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd4777521" [14] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd4346a7f2" [15] "/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM353bdd4ee181eb" > > > ### 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: 0x24093630> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x24093630> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x24093630> > rowMedians(tmp) [1] -0.4130357955 -0.3843585456 -0.0753181125 -0.2277153092 -0.0732347700 [6] 0.1822825234 -0.2878409006 0.0450287334 -0.0840060532 -0.5627914237 [11] 0.0040397604 -0.1840361405 -0.0041720079 -0.1407307537 -0.0379426920 [16] -0.0779291390 0.1609649171 -0.2726849175 -0.5172026001 0.5199313984 [21] -0.4469007902 0.0004349047 -0.3894112724 -0.0408457701 0.9083741071 [26] 0.4329191031 -0.1412684408 -0.1775188926 -0.6633870500 -0.0377332997 [31] -0.2032600008 -0.1262583945 0.5932210765 0.0305808979 0.0555644396 [36] 0.4197019023 -0.4449244733 0.1390412850 0.1090546736 -0.0209291513 [41] 0.0936544439 -0.1151564349 -0.2680720873 0.5124904242 -0.0705222009 [46] -0.2831854404 -0.4951366529 -0.4703455826 0.0030967763 0.2967652836 [51] 0.7906461863 0.5517421122 0.0313913960 0.3497537991 -0.2813452390 [56] 0.2162937254 0.2265137013 0.1601615751 -0.1003589158 -0.0844885125 [61] 0.6177317086 -0.5464665632 -0.1064182292 0.0311067978 0.2691367735 [66] -0.1289548507 -0.5132950191 0.4264168073 0.2788968638 -0.3695780122 [71] -0.4266944262 0.1944970657 0.2628747758 0.1149418238 0.0790546503 [76] 0.2688550166 -0.1140381358 0.0936300108 0.6192160672 -0.3161241584 [81] -0.1871091747 0.0113278655 -0.3080013845 0.0495279889 0.2274819443 [86] -0.1608727573 0.3096976540 -0.0370323090 0.2777521552 0.4497141204 [91] -0.2577158155 -0.2288028943 0.1780046620 0.0199508049 -0.0076694571 [96] -0.4643415762 0.2459553092 0.4093739779 -0.4454826434 -0.2948788553 [101] -0.0865148695 -0.0538763693 0.1751620248 0.5539556866 -0.1613364081 [106] -0.2236423907 -0.1772005672 -0.1205579391 0.2595786009 0.5458304010 [111] -0.2496060487 0.1279985242 -0.0508021997 -0.2655666603 0.4459865290 [116] -0.4534473896 -0.2833151263 0.3699224723 -0.3798657892 -0.2109699495 [121] 0.0707690038 -0.5530396315 0.1816634084 0.2150492382 0.2626327299 [126] 0.2079825378 -0.0253054869 0.6562208448 -0.2605029086 -0.2466503885 [131] 0.1503016559 -0.0931333614 0.1744398989 0.4626303294 0.3508931797 [136] 0.4873963347 -0.2073854169 0.3327217239 0.1065611894 -0.2848581834 [141] 0.0141592991 0.5568511086 -0.3769306494 -0.0637063100 0.0185701471 [146] -0.2597753790 -0.2096482734 0.0226342458 -0.0243635742 0.0454160850 [151] 0.4088340599 -0.0712379007 0.1296622728 0.2263364135 0.2362158309 [156] 0.4631778396 0.6231494195 0.3016965599 0.1835936788 -0.7332591240 [161] 0.0814532330 0.1253512569 -0.1465668344 -0.1006200104 -0.0418173836 [166] 0.2959731554 -0.2255903067 0.3428233264 0.0385939587 -0.4082117017 [171] 0.0312186685 -0.3876775903 -0.0914001901 0.0082116058 0.2685888308 [176] 0.2797747590 0.1179940272 -0.2261672078 0.2323173320 -0.2877411341 [181] -0.1021329870 -0.0546106695 -0.0664222563 0.4760068423 -0.4712863938 [186] 0.2800536962 0.3329680530 -0.5301147451 -0.3880545458 -0.4767238059 [191] -0.0855349152 0.4284865114 -0.4454159913 -0.0877748152 0.0762748631 [196] 0.0485894661 0.3349393341 -0.0206375202 -0.2813632247 -0.3555108428 [201] 0.2324497593 0.3007884352 0.0324362602 -0.1122064748 -0.4242755911 [206] 0.0962893469 0.3540643728 -0.0634475919 0.5967661423 -0.7799068594 [211] 0.4345397140 0.2687825460 0.1026214537 0.2032968216 -0.5399712869 [216] 0.2624013204 0.0624228749 -0.0039085693 0.1960338468 0.2551390614 [221] 0.3223531187 0.2498005817 0.2395577554 -0.0149427359 0.0536127288 [226] -0.1267889966 0.3935745709 -0.6591121446 0.3072283318 -0.0427711929 > > proc.time() user system elapsed 2.014 0.935 2.969
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2024-03-19 r86153) -- "Unsuffered Consequences" 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: 0x831b430> > .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: 0x831b430> > .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: 0x831b430> > .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: 0x831b430> > 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: 0x74d8120> > .Call("R_bm_AddColumn",P) <pointer: 0x74d8120> > .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: 0x74d8120> > .Call("R_bm_AddColumn",P) <pointer: 0x74d8120> > .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: 0x74d8120> > 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: 0x7ce77e0> > .Call("R_bm_AddColumn",P) <pointer: 0x7ce77e0> > .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: 0x7ce77e0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x7ce77e0> > .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: 0x7ce77e0> > > .Call("R_bm_RowMode",P) <pointer: 0x7ce77e0> > .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: 0x7ce77e0> > > .Call("R_bm_ColMode",P) <pointer: 0x7ce77e0> > .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: 0x7ce77e0> > 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: 0x79cf0a0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x79cf0a0> > .Call("R_bm_AddColumn",P) <pointer: 0x79cf0a0> > .Call("R_bm_AddColumn",P) <pointer: 0x79cf0a0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile353c532404e1e2" "BufferedMatrixFile353c5374cf07ad" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile353c532404e1e2" "BufferedMatrixFile353c5374cf07ad" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x9058a10> > .Call("R_bm_AddColumn",P) <pointer: 0x9058a10> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x9058a10> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x9058a10> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x9058a10> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x9058a10> > .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: 0x91b40d0> > .Call("R_bm_AddColumn",P) <pointer: 0x91b40d0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x91b40d0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x91b40d0> > 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: 0x805b070> > .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: 0x805b070> > rm(P) > > proc.time() user system elapsed 0.340 0.025 0.350
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2024-03-19 r86153) -- "Unsuffered Consequences" 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.321 0.035 0.342