Back to Multiple platform build/check report for BioC 3.15 |
|
This page was generated on 2022-10-19 13:20:03 -0400 (Wed, 19 Oct 2022).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 20.04.5 LTS) | x86_64 | 4.2.1 (2022-06-23) -- "Funny-Looking Kid" | 4386 |
palomino3 | Windows Server 2022 Datacenter | x64 | 4.2.1 (2022-06-23 ucrt) -- "Funny-Looking Kid" | 4138 |
merida1 | macOS 10.14.6 Mojave | x86_64 | 4.2.1 (2022-06-23) -- "Funny-Looking Kid" | 4205 |
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 |
To the developers/maintainers of the BufferedMatrix package: - Please 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 How and When does the builder pull? When will my changes propagate? for more information. - Make sure to use the following settings in order to reproduce any error or warning you see on this page. |
Package 229/2140 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.60.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 20.04.5 LTS) / x86_64 | OK | OK | OK | ![]() | ||||||||
palomino3 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | ![]() | ||||||||
merida1 | macOS 10.14.6 Mojave / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
Package: BufferedMatrix |
Version: 1.60.0 |
Command: /home/biocbuild/bbs-3.15-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.15-bioc/R/library --no-vignettes --timings BufferedMatrix_1.60.0.tar.gz |
StartedAt: 2022-10-18 18:51:24 -0400 (Tue, 18 Oct 2022) |
EndedAt: 2022-10-18 18:51:47 -0400 (Tue, 18 Oct 2022) |
EllapsedTime: 23.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.15-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.15-bioc/R/library --no-vignettes --timings BufferedMatrix_1.60.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.2.1 (2022-06-23) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.60.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 * 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 R 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 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 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 in ‘inst/doc’ ... 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.15-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.15-bioc/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/bbs-3.15-bioc/R/library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs gcc -I"/home/biocbuild/bbs-3.15-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"/home/biocbuild/bbs-3.15-bioc/R/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/bbs-3.15-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"/home/biocbuild/bbs-3.15-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -c init_package.c -o init_package.o gcc -shared -L/home/biocbuild/bbs-3.15-bioc/R/lib -L/usr/local/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -L/home/biocbuild/bbs-3.15-bioc/R/lib -lR installing to /home/biocbuild/bbs-3.15-bioc/R/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.2.1 (2022-06-23) -- "Funny-Looking Kid" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) 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.264 0.061 0.308
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) 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.15-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 444030 23.8 953765 51 629782 33.7 Vcells 800613 6.2 8388608 64 1915681 14.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] "Tue Oct 18 18:51:41 2022" > 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] "Tue Oct 18 18:51:42 2022" > > > 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: 0x563b385b43c0> > > > > 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] "Tue Oct 18 18:51:42 2022" > 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] "Tue Oct 18 18:51:42 2022" > > ColMode(tmp2) <pointer: 0x563b385b43c0> > > > > ### 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,] 98.8355771 1.26535735 2.3081768 0.1636449 [2,] 1.1012750 0.63076438 -0.5371311 -0.1455720 [3,] -0.1993094 0.05216168 -0.4500057 -0.7297795 [4,] -1.3256431 0.94654160 1.3439945 1.0080829 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.15-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,] 98.8355771 1.26535735 2.3081768 0.1636449 [2,] 1.1012750 0.63076438 0.5371311 0.1455720 [3,] 0.1993094 0.05216168 0.4500057 0.7297795 [4,] 1.3256431 0.94654160 1.3439945 1.0080829 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.15-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.9416084 1.1248810 1.5192685 0.4045305 [2,] 1.0494165 0.7942068 0.7328923 0.3815390 [3,] 0.4464408 0.2283893 0.6708246 0.8542713 [4,] 1.1513657 0.9729037 1.1593077 1.0040333 > > 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.15-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 223.25166 37.51417 42.50086 29.20895 [2,] 36.59544 33.57283 32.86605 28.96096 [3,] 29.66372 27.33605 32.15825 34.27249 [4,] 37.83930 35.67558 37.93707 36.04842 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x563b3827e4f0> > exp(tmp5) <pointer: 0x563b3827e4f0> > log(tmp5,2) <pointer: 0x563b3827e4f0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 464.6691 > Min(tmp5) [1] 53.82683 > mean(tmp5) [1] 72.47452 > Sum(tmp5) [1] 14494.9 > Var(tmp5) [1] 852.0718 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 87.56994 69.73411 69.63940 73.58054 72.20892 72.29365 70.95296 69.61419 [9] 68.29412 70.85739 > rowSums(tmp5) [1] 1751.399 1394.682 1392.788 1471.611 1444.178 1445.873 1419.059 1392.284 [9] 1365.882 1417.148 > rowVars(tmp5) [1] 7958.35652 103.22928 42.04338 39.06481 62.28098 53.26756 [7] 108.39127 89.02540 86.13533 92.71151 > rowSd(tmp5) [1] 89.209621 10.160181 6.484087 6.250184 7.891830 7.298463 10.411113 [8] 9.435327 9.280912 9.628682 > rowMax(tmp5) [1] 464.66908 87.70950 78.98614 86.37519 86.08188 83.22689 98.46282 [8] 93.04345 83.99161 92.81172 > rowMin(tmp5) [1] 54.25878 53.94929 56.89642 63.70767 58.02645 57.65725 54.89577 53.82683 [9] 54.04959 55.76377 > > colMeans(tmp5) [1] 110.63868 69.82594 68.68387 69.58278 69.83733 71.64619 72.80030 [8] 66.72079 67.34538 71.67901 76.96558 67.25148 73.67405 70.70801 [15] 70.53033 66.91964 68.70907 69.37546 76.98393 69.61262 > colSums(tmp5) [1] 1106.3868 698.2594 686.8387 695.8278 698.3733 716.4619 728.0030 [8] 667.2079 673.4538 716.7901 769.6558 672.5148 736.7405 707.0801 [15] 705.3033 669.1964 687.0907 693.7546 769.8393 696.1262 > colVars(tmp5) [1] 15507.47641 80.03230 92.58396 51.56021 124.05010 44.54149 [7] 20.98650 42.39997 77.91334 38.54620 88.11573 74.48970 [13] 99.11136 119.58596 114.71259 51.90450 95.08731 101.08609 [19] 44.64182 90.32156 > colSd(tmp5) [1] 124.529018 8.946077 9.622056 7.180544 11.137778 6.673941 [7] 4.581103 6.511526 8.826853 6.208559 9.386998 8.630742 [13] 9.955469 10.935537 10.710397 7.204478 9.751272 10.054158 [19] 6.681454 9.503765 > colMax(tmp5) [1] 464.66908 80.25834 88.45998 77.94681 89.49669 83.22689 79.22217 [8] 77.87207 79.03817 84.36995 98.46282 86.08188 93.04345 92.81172 [15] 85.27433 76.98978 81.73210 83.07145 86.37519 87.70950 > colMin(tmp5) [1] 61.74114 56.77169 54.89577 60.27845 53.94929 62.68165 66.22622 55.93253 [9] 54.25878 65.17553 64.99443 54.04959 54.78623 53.82683 56.01310 56.36420 [17] 55.68658 55.76377 68.73406 57.12838 > > > ### 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.56994 69.73411 69.63940 73.58054 72.20892 72.29365 70.95296 69.61419 [9] 68.29412 NA > rowSums(tmp5) [1] 1751.399 1394.682 1392.788 1471.611 1444.178 1445.873 1419.059 1392.284 [9] 1365.882 NA > rowVars(tmp5) [1] 7958.35652 103.22928 42.04338 39.06481 62.28098 53.26756 [7] 108.39127 89.02540 86.13533 92.97409 > rowSd(tmp5) [1] 89.209621 10.160181 6.484087 6.250184 7.891830 7.298463 10.411113 [8] 9.435327 9.280912 9.642308 > rowMax(tmp5) [1] 464.66908 87.70950 78.98614 86.37519 86.08188 83.22689 98.46282 [8] 93.04345 83.99161 NA > rowMin(tmp5) [1] 54.25878 53.94929 56.89642 63.70767 58.02645 57.65725 54.89577 53.82683 [9] 54.04959 NA > > colMeans(tmp5) [1] 110.63868 69.82594 68.68387 NA 69.83733 71.64619 72.80030 [8] 66.72079 67.34538 71.67901 76.96558 67.25148 73.67405 70.70801 [15] 70.53033 66.91964 68.70907 69.37546 76.98393 69.61262 > colSums(tmp5) [1] 1106.3868 698.2594 686.8387 NA 698.3733 716.4619 728.0030 [8] 667.2079 673.4538 716.7901 769.6558 672.5148 736.7405 707.0801 [15] 705.3033 669.1964 687.0907 693.7546 769.8393 696.1262 > colVars(tmp5) [1] 15507.47641 80.03230 92.58396 NA 124.05010 44.54149 [7] 20.98650 42.39997 77.91334 38.54620 88.11573 74.48970 [13] 99.11136 119.58596 114.71259 51.90450 95.08731 101.08609 [19] 44.64182 90.32156 > colSd(tmp5) [1] 124.529018 8.946077 9.622056 NA 11.137778 6.673941 [7] 4.581103 6.511526 8.826853 6.208559 9.386998 8.630742 [13] 9.955469 10.935537 10.710397 7.204478 9.751272 10.054158 [19] 6.681454 9.503765 > colMax(tmp5) [1] 464.66908 80.25834 88.45998 NA 89.49669 83.22689 79.22217 [8] 77.87207 79.03817 84.36995 98.46282 86.08188 93.04345 92.81172 [15] 85.27433 76.98978 81.73210 83.07145 86.37519 87.70950 > colMin(tmp5) [1] 61.74114 56.77169 54.89577 NA 53.94929 62.68165 66.22622 55.93253 [9] 54.25878 65.17553 64.99443 54.04959 54.78623 53.82683 56.01310 56.36420 [17] 55.68658 55.76377 68.73406 57.12838 > > Max(tmp5,na.rm=TRUE) [1] 464.6691 > Min(tmp5,na.rm=TRUE) [1] 53.82683 > mean(tmp5,na.rm=TRUE) [1] 72.52859 > Sum(tmp5,na.rm=TRUE) [1] 14433.19 > Var(tmp5,na.rm=TRUE) [1] 855.7875 > > rowMeans(tmp5,na.rm=TRUE) [1] 87.56994 69.73411 69.63940 73.58054 72.20892 72.29365 70.95296 69.61419 [9] 68.29412 71.33858 > rowSums(tmp5,na.rm=TRUE) [1] 1751.399 1394.682 1392.788 1471.611 1444.178 1445.873 1419.059 1392.284 [9] 1365.882 1355.433 > rowVars(tmp5,na.rm=TRUE) [1] 7958.35652 103.22928 42.04338 39.06481 62.28098 53.26756 [7] 108.39127 89.02540 86.13533 92.97409 > rowSd(tmp5,na.rm=TRUE) [1] 89.209621 10.160181 6.484087 6.250184 7.891830 7.298463 10.411113 [8] 9.435327 9.280912 9.642308 > rowMax(tmp5,na.rm=TRUE) [1] 464.66908 87.70950 78.98614 86.37519 86.08188 83.22689 98.46282 [8] 93.04345 83.99161 92.81172 > rowMin(tmp5,na.rm=TRUE) [1] 54.25878 53.94929 56.89642 63.70767 58.02645 57.65725 54.89577 53.82683 [9] 54.04959 55.76377 > > colMeans(tmp5,na.rm=TRUE) [1] 110.63868 69.82594 68.68387 70.45700 69.83733 71.64619 72.80030 [8] 66.72079 67.34538 71.67901 76.96558 67.25148 73.67405 70.70801 [15] 70.53033 66.91964 68.70907 69.37546 76.98393 69.61262 > colSums(tmp5,na.rm=TRUE) [1] 1106.3868 698.2594 686.8387 634.1130 698.3733 716.4619 728.0030 [8] 667.2079 673.4538 716.7901 769.6558 672.5148 736.7405 707.0801 [15] 705.3033 669.1964 687.0907 693.7546 769.8393 696.1262 > colVars(tmp5,na.rm=TRUE) [1] 15507.47641 80.03230 92.58396 49.40744 124.05010 44.54149 [7] 20.98650 42.39997 77.91334 38.54620 88.11573 74.48970 [13] 99.11136 119.58596 114.71259 51.90450 95.08731 101.08609 [19] 44.64182 90.32156 > colSd(tmp5,na.rm=TRUE) [1] 124.529018 8.946077 9.622056 7.029042 11.137778 6.673941 [7] 4.581103 6.511526 8.826853 6.208559 9.386998 8.630742 [13] 9.955469 10.935537 10.710397 7.204478 9.751272 10.054158 [19] 6.681454 9.503765 > colMax(tmp5,na.rm=TRUE) [1] 464.66908 80.25834 88.45998 77.94681 89.49669 83.22689 79.22217 [8] 77.87207 79.03817 84.36995 98.46282 86.08188 93.04345 92.81172 [15] 85.27433 76.98978 81.73210 83.07145 86.37519 87.70950 > colMin(tmp5,na.rm=TRUE) [1] 61.74114 56.77169 54.89577 60.27845 53.94929 62.68165 66.22622 55.93253 [9] 54.25878 65.17553 64.99443 54.04959 54.78623 53.82683 56.01310 56.36420 [17] 55.68658 55.76377 68.73406 57.12838 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 87.56994 69.73411 69.63940 73.58054 72.20892 72.29365 70.95296 69.61419 [9] 68.29412 NaN > rowSums(tmp5,na.rm=TRUE) [1] 1751.399 1394.682 1392.788 1471.611 1444.178 1445.873 1419.059 1392.284 [9] 1365.882 0.000 > rowVars(tmp5,na.rm=TRUE) [1] 7958.35652 103.22928 42.04338 39.06481 62.28098 53.26756 [7] 108.39127 89.02540 86.13533 NA > rowSd(tmp5,na.rm=TRUE) [1] 89.209621 10.160181 6.484087 6.250184 7.891830 7.298463 10.411113 [8] 9.435327 9.280912 NA > rowMax(tmp5,na.rm=TRUE) [1] 464.66908 87.70950 78.98614 86.37519 86.08188 83.22689 98.46282 [8] 93.04345 83.99161 NA > rowMin(tmp5,na.rm=TRUE) [1] 54.25878 53.94929 56.89642 63.70767 58.02645 57.65725 54.89577 53.82683 [9] 54.04959 NA > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.21762 70.85809 68.64097 NaN 67.65296 71.55888 72.70781 [8] 67.32851 66.20697 72.06948 77.15773 66.83331 73.68385 68.25204 [15] 71.32016 67.09822 69.40757 70.88787 76.21665 69.52839 > colSums(tmp5,na.rm=TRUE) [1] 1036.9586 637.7228 617.7687 0.0000 608.8766 644.0300 654.3703 [8] 605.9566 595.8627 648.6253 694.4195 601.4998 663.1547 614.2684 [15] 641.8815 603.8840 624.6681 637.9908 685.9499 625.7555 > colVars(tmp5,na.rm=TRUE) [1] 17210.03499 78.05138 104.13625 NA 85.87715 50.02342 [7] 23.51358 43.54505 73.07281 41.64929 98.71486 81.83370 [13] 111.49919 66.67671 122.03351 58.03381 101.48441 87.98879 [19] 43.59910 101.53194 > colSd(tmp5,na.rm=TRUE) [1] 131.187023 8.834669 10.204717 NA 9.266992 7.072724 [7] 4.849080 6.598868 8.548263 6.453626 9.935535 9.046198 [13] 10.559318 8.165581 11.046878 7.617993 10.073947 9.380234 [19] 6.602961 10.076306 > colMax(tmp5,na.rm=TRUE) [1] 464.66908 80.25834 88.45998 -Inf 86.71615 83.22689 79.22217 [8] 77.87207 79.03817 84.36995 98.46282 86.08188 93.04345 77.34429 [15] 85.27433 76.98978 81.73210 83.07145 86.37519 87.70950 > colMin(tmp5,na.rm=TRUE) [1] 61.74114 56.77169 54.89577 Inf 53.94929 62.68165 66.22622 55.93253 [9] 54.25878 65.17553 64.99443 54.04959 54.78623 53.82683 56.01310 56.36420 [17] 55.68658 55.92119 68.73406 57.12838 > > > > > 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] 337.7105 184.9729 137.4857 276.0950 217.4083 236.3701 266.3420 252.8851 [9] 226.7661 251.7785 > apply(copymatrix,1,var,na.rm=TRUE) [1] 337.7105 184.9729 137.4857 276.0950 217.4083 236.3701 266.3420 252.8851 [9] 226.7661 251.7785 > > > > 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] 7.105427e-15 5.684342e-14 -2.273737e-13 -2.842171e-14 5.684342e-14 [6] 2.842171e-14 -5.684342e-14 -5.684342e-14 8.526513e-14 -8.526513e-14 [11] -8.526513e-14 -3.410605e-13 5.684342e-14 1.421085e-13 0.000000e+00 [16] 0.000000e+00 -5.684342e-14 -8.526513e-14 0.000000e+00 -1.136868e-13 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 8 4 1 5 10 3 1 18 7 15 3 2 6 18 2 3 7 6 3 18 7 9 10 9 9 5 1 13 1 20 6 3 6 8 7 15 5 19 4 11 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.850036 > Min(tmp) [1] -2.45875 > mean(tmp) [1] 0.05184266 > Sum(tmp) [1] 5.184266 > Var(tmp) [1] 1.024033 > > rowMeans(tmp) [1] 0.05184266 > rowSums(tmp) [1] 5.184266 > rowVars(tmp) [1] 1.024033 > rowSd(tmp) [1] 1.011945 > rowMax(tmp) [1] 2.850036 > rowMin(tmp) [1] -2.45875 > > colMeans(tmp) [1] -1.15424139 -0.73257001 0.71777602 1.22010302 -1.29173344 1.70741460 [7] -0.39737100 -1.03596394 1.87165563 0.41609298 1.35890229 0.41929692 [13] -0.40818829 -2.03946822 -0.89330875 -1.03284643 0.39727310 -1.48284088 [19] -0.32475862 0.39958452 0.68126563 0.53109189 -1.33990707 0.88531194 [25] 0.13884831 0.48501309 0.06701940 -1.15307692 -0.35924759 0.75695083 [31] 2.85003574 0.51603642 1.09403481 0.38640997 -0.86715244 0.69412021 [37] -2.45875050 -0.73916465 1.62104100 -0.33798227 1.24442283 -0.71342282 [43] -0.34749073 -0.33196973 0.71277589 -0.61293086 -1.35113697 0.58136990 [49] 0.89957419 0.05842413 0.19549622 -0.20425646 0.38529297 1.05869000 [55] 1.51629191 -0.33267630 -0.49491139 1.16383743 -0.59908947 0.38162243 [61] -1.19875692 -0.75459229 0.07978532 -0.75045893 -1.78353554 1.77271488 [67] -0.77165615 0.45886029 -0.48489283 -0.04035188 1.61747922 -0.22154426 [73] -0.81075982 0.39874622 -0.99386936 0.43777368 0.03229677 -0.32372557 [79] -0.06247992 0.75052644 0.06414672 -1.77587721 1.05846729 0.89108379 [85] 0.38742055 -0.51784434 -0.42003308 2.57694476 1.85281438 -0.65542915 [91] 0.51532812 -1.05827620 -0.27662984 2.14315572 -0.68077204 0.46652042 [97] -0.96649371 -0.41208611 0.44602131 -0.18237358 > colSums(tmp) [1] -1.15424139 -0.73257001 0.71777602 1.22010302 -1.29173344 1.70741460 [7] -0.39737100 -1.03596394 1.87165563 0.41609298 1.35890229 0.41929692 [13] -0.40818829 -2.03946822 -0.89330875 -1.03284643 0.39727310 -1.48284088 [19] -0.32475862 0.39958452 0.68126563 0.53109189 -1.33990707 0.88531194 [25] 0.13884831 0.48501309 0.06701940 -1.15307692 -0.35924759 0.75695083 [31] 2.85003574 0.51603642 1.09403481 0.38640997 -0.86715244 0.69412021 [37] -2.45875050 -0.73916465 1.62104100 -0.33798227 1.24442283 -0.71342282 [43] -0.34749073 -0.33196973 0.71277589 -0.61293086 -1.35113697 0.58136990 [49] 0.89957419 0.05842413 0.19549622 -0.20425646 0.38529297 1.05869000 [55] 1.51629191 -0.33267630 -0.49491139 1.16383743 -0.59908947 0.38162243 [61] -1.19875692 -0.75459229 0.07978532 -0.75045893 -1.78353554 1.77271488 [67] -0.77165615 0.45886029 -0.48489283 -0.04035188 1.61747922 -0.22154426 [73] -0.81075982 0.39874622 -0.99386936 0.43777368 0.03229677 -0.32372557 [79] -0.06247992 0.75052644 0.06414672 -1.77587721 1.05846729 0.89108379 [85] 0.38742055 -0.51784434 -0.42003308 2.57694476 1.85281438 -0.65542915 [91] 0.51532812 -1.05827620 -0.27662984 2.14315572 -0.68077204 0.46652042 [97] -0.96649371 -0.41208611 0.44602131 -0.18237358 > 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.15424139 -0.73257001 0.71777602 1.22010302 -1.29173344 1.70741460 [7] -0.39737100 -1.03596394 1.87165563 0.41609298 1.35890229 0.41929692 [13] -0.40818829 -2.03946822 -0.89330875 -1.03284643 0.39727310 -1.48284088 [19] -0.32475862 0.39958452 0.68126563 0.53109189 -1.33990707 0.88531194 [25] 0.13884831 0.48501309 0.06701940 -1.15307692 -0.35924759 0.75695083 [31] 2.85003574 0.51603642 1.09403481 0.38640997 -0.86715244 0.69412021 [37] -2.45875050 -0.73916465 1.62104100 -0.33798227 1.24442283 -0.71342282 [43] -0.34749073 -0.33196973 0.71277589 -0.61293086 -1.35113697 0.58136990 [49] 0.89957419 0.05842413 0.19549622 -0.20425646 0.38529297 1.05869000 [55] 1.51629191 -0.33267630 -0.49491139 1.16383743 -0.59908947 0.38162243 [61] -1.19875692 -0.75459229 0.07978532 -0.75045893 -1.78353554 1.77271488 [67] -0.77165615 0.45886029 -0.48489283 -0.04035188 1.61747922 -0.22154426 [73] -0.81075982 0.39874622 -0.99386936 0.43777368 0.03229677 -0.32372557 [79] -0.06247992 0.75052644 0.06414672 -1.77587721 1.05846729 0.89108379 [85] 0.38742055 -0.51784434 -0.42003308 2.57694476 1.85281438 -0.65542915 [91] 0.51532812 -1.05827620 -0.27662984 2.14315572 -0.68077204 0.46652042 [97] -0.96649371 -0.41208611 0.44602131 -0.18237358 > colMin(tmp) [1] -1.15424139 -0.73257001 0.71777602 1.22010302 -1.29173344 1.70741460 [7] -0.39737100 -1.03596394 1.87165563 0.41609298 1.35890229 0.41929692 [13] -0.40818829 -2.03946822 -0.89330875 -1.03284643 0.39727310 -1.48284088 [19] -0.32475862 0.39958452 0.68126563 0.53109189 -1.33990707 0.88531194 [25] 0.13884831 0.48501309 0.06701940 -1.15307692 -0.35924759 0.75695083 [31] 2.85003574 0.51603642 1.09403481 0.38640997 -0.86715244 0.69412021 [37] -2.45875050 -0.73916465 1.62104100 -0.33798227 1.24442283 -0.71342282 [43] -0.34749073 -0.33196973 0.71277589 -0.61293086 -1.35113697 0.58136990 [49] 0.89957419 0.05842413 0.19549622 -0.20425646 0.38529297 1.05869000 [55] 1.51629191 -0.33267630 -0.49491139 1.16383743 -0.59908947 0.38162243 [61] -1.19875692 -0.75459229 0.07978532 -0.75045893 -1.78353554 1.77271488 [67] -0.77165615 0.45886029 -0.48489283 -0.04035188 1.61747922 -0.22154426 [73] -0.81075982 0.39874622 -0.99386936 0.43777368 0.03229677 -0.32372557 [79] -0.06247992 0.75052644 0.06414672 -1.77587721 1.05846729 0.89108379 [85] 0.38742055 -0.51784434 -0.42003308 2.57694476 1.85281438 -0.65542915 [91] 0.51532812 -1.05827620 -0.27662984 2.14315572 -0.68077204 0.46652042 [97] -0.96649371 -0.41208611 0.44602131 -0.18237358 > colMedians(tmp) [1] -1.15424139 -0.73257001 0.71777602 1.22010302 -1.29173344 1.70741460 [7] -0.39737100 -1.03596394 1.87165563 0.41609298 1.35890229 0.41929692 [13] -0.40818829 -2.03946822 -0.89330875 -1.03284643 0.39727310 -1.48284088 [19] -0.32475862 0.39958452 0.68126563 0.53109189 -1.33990707 0.88531194 [25] 0.13884831 0.48501309 0.06701940 -1.15307692 -0.35924759 0.75695083 [31] 2.85003574 0.51603642 1.09403481 0.38640997 -0.86715244 0.69412021 [37] -2.45875050 -0.73916465 1.62104100 -0.33798227 1.24442283 -0.71342282 [43] -0.34749073 -0.33196973 0.71277589 -0.61293086 -1.35113697 0.58136990 [49] 0.89957419 0.05842413 0.19549622 -0.20425646 0.38529297 1.05869000 [55] 1.51629191 -0.33267630 -0.49491139 1.16383743 -0.59908947 0.38162243 [61] -1.19875692 -0.75459229 0.07978532 -0.75045893 -1.78353554 1.77271488 [67] -0.77165615 0.45886029 -0.48489283 -0.04035188 1.61747922 -0.22154426 [73] -0.81075982 0.39874622 -0.99386936 0.43777368 0.03229677 -0.32372557 [79] -0.06247992 0.75052644 0.06414672 -1.77587721 1.05846729 0.89108379 [85] 0.38742055 -0.51784434 -0.42003308 2.57694476 1.85281438 -0.65542915 [91] 0.51532812 -1.05827620 -0.27662984 2.14315572 -0.68077204 0.46652042 [97] -0.96649371 -0.41208611 0.44602131 -0.18237358 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.154241 -0.73257 0.717776 1.220103 -1.291733 1.707415 -0.397371 [2,] -1.154241 -0.73257 0.717776 1.220103 -1.291733 1.707415 -0.397371 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.035964 1.871656 0.416093 1.358902 0.4192969 -0.4081883 -2.039468 [2,] -1.035964 1.871656 0.416093 1.358902 0.4192969 -0.4081883 -2.039468 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.8933088 -1.032846 0.3972731 -1.482841 -0.3247586 0.3995845 0.6812656 [2,] -0.8933088 -1.032846 0.3972731 -1.482841 -0.3247586 0.3995845 0.6812656 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.5310919 -1.339907 0.8853119 0.1388483 0.4850131 0.0670194 -1.153077 [2,] 0.5310919 -1.339907 0.8853119 0.1388483 0.4850131 0.0670194 -1.153077 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.3592476 0.7569508 2.850036 0.5160364 1.094035 0.38641 -0.8671524 [2,] -0.3592476 0.7569508 2.850036 0.5160364 1.094035 0.38641 -0.8671524 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.6941202 -2.45875 -0.7391647 1.621041 -0.3379823 1.244423 -0.7134228 [2,] 0.6941202 -2.45875 -0.7391647 1.621041 -0.3379823 1.244423 -0.7134228 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.3474907 -0.3319697 0.7127759 -0.6129309 -1.351137 0.5813699 0.8995742 [2,] -0.3474907 -0.3319697 0.7127759 -0.6129309 -1.351137 0.5813699 0.8995742 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.05842413 0.1954962 -0.2042565 0.385293 1.05869 1.516292 -0.3326763 [2,] 0.05842413 0.1954962 -0.2042565 0.385293 1.05869 1.516292 -0.3326763 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.4949114 1.163837 -0.5990895 0.3816224 -1.198757 -0.7545923 0.07978532 [2,] -0.4949114 1.163837 -0.5990895 0.3816224 -1.198757 -0.7545923 0.07978532 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.7504589 -1.783536 1.772715 -0.7716561 0.4588603 -0.4848928 -0.04035188 [2,] -0.7504589 -1.783536 1.772715 -0.7716561 0.4588603 -0.4848928 -0.04035188 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 1.617479 -0.2215443 -0.8107598 0.3987462 -0.9938694 0.4377737 0.03229677 [2,] 1.617479 -0.2215443 -0.8107598 0.3987462 -0.9938694 0.4377737 0.03229677 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.3237256 -0.06247992 0.7505264 0.06414672 -1.775877 1.058467 0.8910838 [2,] -0.3237256 -0.06247992 0.7505264 0.06414672 -1.775877 1.058467 0.8910838 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.3874205 -0.5178443 -0.4200331 2.576945 1.852814 -0.6554292 0.5153281 [2,] 0.3874205 -0.5178443 -0.4200331 2.576945 1.852814 -0.6554292 0.5153281 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.058276 -0.2766298 2.143156 -0.680772 0.4665204 -0.9664937 -0.4120861 [2,] -1.058276 -0.2766298 2.143156 -0.680772 0.4665204 -0.9664937 -0.4120861 [,99] [,100] [1,] 0.4460213 -0.1823736 [2,] 0.4460213 -0.1823736 > > > Max(tmp2) [1] 3.094671 > Min(tmp2) [1] -2.410316 > mean(tmp2) [1] 0.1308056 > Sum(tmp2) [1] 13.08056 > Var(tmp2) [1] 1.10497 > > rowMeans(tmp2) [1] -0.29140345 0.99300520 0.75561367 -1.86177759 3.09467050 0.45674418 [7] 0.30446585 1.16566801 0.01080590 0.17990259 -0.58698802 0.39847835 [13] -0.62917428 0.05738627 -0.42571506 0.08866395 1.47036755 1.23878215 [19] 0.37355849 0.26936286 -0.15324433 1.56233175 0.31114447 -1.31946783 [25] -0.51844676 0.03277328 2.38900939 0.57492721 -2.41031585 -1.24207168 [31] -0.15327927 1.39736554 1.20524649 -0.51017855 -0.52837943 -1.01669463 [37] -1.30703812 -2.40891621 1.31430793 0.56697551 -1.12983501 -0.13609146 [43] 0.82434643 -0.29972586 0.48828155 -0.47968346 -0.10797938 0.54462223 [49] 0.67076385 0.10595418 -0.12460006 -0.41376076 -0.90669309 0.61935947 [55] 2.62891689 0.36529744 -0.89404880 1.68366785 -0.85277233 -0.42004423 [61] -1.83780428 0.21480942 0.51169136 -0.23984906 -0.29274343 1.29969384 [67] 0.31118370 -0.66058136 0.78344279 1.12870106 -1.81605508 0.72740316 [73] 0.47398923 0.31275088 0.52392729 -0.71271656 -0.79976835 1.14235855 [79] -1.26656724 1.36113168 -0.06620864 1.73397195 -0.64159125 1.10683424 [85] -0.30695508 0.53160268 0.90738537 0.97081190 1.09816354 0.46985933 [91] -0.96143110 -2.32163036 0.53748637 -0.69017830 -1.09485180 1.01464817 [97] -0.92745995 1.40846173 1.13376740 0.99843389 > rowSums(tmp2) [1] -0.29140345 0.99300520 0.75561367 -1.86177759 3.09467050 0.45674418 [7] 0.30446585 1.16566801 0.01080590 0.17990259 -0.58698802 0.39847835 [13] -0.62917428 0.05738627 -0.42571506 0.08866395 1.47036755 1.23878215 [19] 0.37355849 0.26936286 -0.15324433 1.56233175 0.31114447 -1.31946783 [25] -0.51844676 0.03277328 2.38900939 0.57492721 -2.41031585 -1.24207168 [31] -0.15327927 1.39736554 1.20524649 -0.51017855 -0.52837943 -1.01669463 [37] -1.30703812 -2.40891621 1.31430793 0.56697551 -1.12983501 -0.13609146 [43] 0.82434643 -0.29972586 0.48828155 -0.47968346 -0.10797938 0.54462223 [49] 0.67076385 0.10595418 -0.12460006 -0.41376076 -0.90669309 0.61935947 [55] 2.62891689 0.36529744 -0.89404880 1.68366785 -0.85277233 -0.42004423 [61] -1.83780428 0.21480942 0.51169136 -0.23984906 -0.29274343 1.29969384 [67] 0.31118370 -0.66058136 0.78344279 1.12870106 -1.81605508 0.72740316 [73] 0.47398923 0.31275088 0.52392729 -0.71271656 -0.79976835 1.14235855 [79] -1.26656724 1.36113168 -0.06620864 1.73397195 -0.64159125 1.10683424 [85] -0.30695508 0.53160268 0.90738537 0.97081190 1.09816354 0.46985933 [91] -0.96143110 -2.32163036 0.53748637 -0.69017830 -1.09485180 1.01464817 [97] -0.92745995 1.40846173 1.13376740 0.99843389 > 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.29140345 0.99300520 0.75561367 -1.86177759 3.09467050 0.45674418 [7] 0.30446585 1.16566801 0.01080590 0.17990259 -0.58698802 0.39847835 [13] -0.62917428 0.05738627 -0.42571506 0.08866395 1.47036755 1.23878215 [19] 0.37355849 0.26936286 -0.15324433 1.56233175 0.31114447 -1.31946783 [25] -0.51844676 0.03277328 2.38900939 0.57492721 -2.41031585 -1.24207168 [31] -0.15327927 1.39736554 1.20524649 -0.51017855 -0.52837943 -1.01669463 [37] -1.30703812 -2.40891621 1.31430793 0.56697551 -1.12983501 -0.13609146 [43] 0.82434643 -0.29972586 0.48828155 -0.47968346 -0.10797938 0.54462223 [49] 0.67076385 0.10595418 -0.12460006 -0.41376076 -0.90669309 0.61935947 [55] 2.62891689 0.36529744 -0.89404880 1.68366785 -0.85277233 -0.42004423 [61] -1.83780428 0.21480942 0.51169136 -0.23984906 -0.29274343 1.29969384 [67] 0.31118370 -0.66058136 0.78344279 1.12870106 -1.81605508 0.72740316 [73] 0.47398923 0.31275088 0.52392729 -0.71271656 -0.79976835 1.14235855 [79] -1.26656724 1.36113168 -0.06620864 1.73397195 -0.64159125 1.10683424 [85] -0.30695508 0.53160268 0.90738537 0.97081190 1.09816354 0.46985933 [91] -0.96143110 -2.32163036 0.53748637 -0.69017830 -1.09485180 1.01464817 [97] -0.92745995 1.40846173 1.13376740 0.99843389 > rowMin(tmp2) [1] -0.29140345 0.99300520 0.75561367 -1.86177759 3.09467050 0.45674418 [7] 0.30446585 1.16566801 0.01080590 0.17990259 -0.58698802 0.39847835 [13] -0.62917428 0.05738627 -0.42571506 0.08866395 1.47036755 1.23878215 [19] 0.37355849 0.26936286 -0.15324433 1.56233175 0.31114447 -1.31946783 [25] -0.51844676 0.03277328 2.38900939 0.57492721 -2.41031585 -1.24207168 [31] -0.15327927 1.39736554 1.20524649 -0.51017855 -0.52837943 -1.01669463 [37] -1.30703812 -2.40891621 1.31430793 0.56697551 -1.12983501 -0.13609146 [43] 0.82434643 -0.29972586 0.48828155 -0.47968346 -0.10797938 0.54462223 [49] 0.67076385 0.10595418 -0.12460006 -0.41376076 -0.90669309 0.61935947 [55] 2.62891689 0.36529744 -0.89404880 1.68366785 -0.85277233 -0.42004423 [61] -1.83780428 0.21480942 0.51169136 -0.23984906 -0.29274343 1.29969384 [67] 0.31118370 -0.66058136 0.78344279 1.12870106 -1.81605508 0.72740316 [73] 0.47398923 0.31275088 0.52392729 -0.71271656 -0.79976835 1.14235855 [79] -1.26656724 1.36113168 -0.06620864 1.73397195 -0.64159125 1.10683424 [85] -0.30695508 0.53160268 0.90738537 0.97081190 1.09816354 0.46985933 [91] -0.96143110 -2.32163036 0.53748637 -0.69017830 -1.09485180 1.01464817 [97] -0.92745995 1.40846173 1.13376740 0.99843389 > > colMeans(tmp2) [1] 0.1308056 > colSums(tmp2) [1] 13.08056 > colVars(tmp2) [1] 1.10497 > colSd(tmp2) [1] 1.051175 > colMax(tmp2) [1] 3.094671 > colMin(tmp2) [1] -2.410316 > colMedians(tmp2) [1] 0.2420861 > colRanges(tmp2) [,1] [1,] -2.410316 [2,] 3.094671 > > 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] 0.9762230 3.3619373 3.4611249 0.5676063 -2.0365699 -1.3624144 [7] 3.3514142 2.0924422 -1.5365039 4.7833721 > colApply(tmp,quantile)[,1] [,1] [1,] -2.17948356 [2,] -0.06692944 [3,] 0.07263621 [4,] 0.74653064 [5,] 1.04430510 > > rowApply(tmp,sum) [1] -0.4011665 2.5062314 -2.2056044 1.7826060 -2.0060387 1.6007959 [7] 1.3871869 1.0309262 4.6155975 5.3480975 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 5 5 10 7 7 8 5 1 7 3 [2,] 9 3 8 9 4 10 6 4 4 1 [3,] 7 9 9 3 5 6 8 5 6 7 [4,] 6 7 3 8 2 5 2 6 5 8 [5,] 1 10 1 1 8 7 3 3 1 6 [6,] 4 1 2 2 1 9 9 7 3 10 [7,] 10 2 4 10 6 4 1 9 10 2 [8,] 2 6 6 5 9 2 7 8 8 5 [9,] 3 8 5 4 3 1 4 2 9 9 [10,] 8 4 7 6 10 3 10 10 2 4 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.4121047 -0.3155708 2.8793924 0.4791992 -1.5759390 -1.9708721 [7] -3.7925968 0.3603725 -2.7193665 1.2704815 0.2801871 2.3004453 [13] -0.3004884 -4.2813058 6.8785848 2.1205869 5.0513979 0.1632138 [19] 2.9258944 -2.7186280 > colApply(tmp,quantile)[,1] [,1] [1,] -0.7740621 [2,] -0.2486177 [3,] -0.2222099 [4,] 0.6447297 [5,] 2.0122646 > > rowApply(tmp,sum) [1] 1.5533273 -0.4903491 -0.9770612 -0.6641636 9.0253396 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 3 9 11 19 13 [2,] 16 2 4 10 16 [3,] 15 16 6 15 17 [4,] 11 20 1 2 19 [5,] 10 6 2 18 1 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.7740621 0.7189906 0.5001383 -0.1714561 -0.2145999 -0.3333891 [2,] -0.2486177 -1.1534573 0.6292093 2.2363505 -0.4404171 -0.7283496 [3,] -0.2222099 -0.8003918 -0.4740328 -1.9305815 -1.2675097 -0.5172764 [4,] 2.0122646 -0.3409831 0.8183361 -1.4601692 1.4083020 -0.2608913 [5,] 0.6447297 1.2602707 1.4057415 1.8050555 -1.0617142 -0.1309657 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.9844515 -0.319482291 -2.2830693 0.9755966 0.26268498 -0.004873589 [2,] -0.8266380 -0.003521091 -0.2068134 -0.6445398 0.07470778 -0.212360140 [3,] -0.8864672 -0.297873897 -0.2788362 -0.3073257 1.55282410 0.752304513 [4,] -0.5347534 0.017053406 -0.4551999 0.9284036 -2.03529442 2.465983082 [5,] -0.5602868 0.964196379 0.5045523 0.3183468 0.42526467 -0.700608590 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.28648157 -0.6428472 3.66730613 1.5410611 -0.1640734 -0.5673144 [2,] 0.07574617 -1.9187464 1.18097886 -0.2053969 1.0539242 -0.2667325 [3,] -0.29845964 0.1317198 1.27021378 0.1749480 1.0846546 0.6681743 [4,] -0.37137611 -1.0461606 0.82278741 -1.0736715 0.4013361 -0.9061189 [5,] 0.58008277 -0.8052713 -0.06270137 1.6836462 2.6755564 1.2352053 [,19] [,20] [1,] 1.10655357 -0.4729035 [2,] 1.39650044 -0.2821765 [3,] 0.79873173 -0.1296673 [4,] -0.04297868 -1.0110328 [5,] -0.33291266 -0.8228478 > > > 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.15-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.15-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.15-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.15-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 1.875949 1.68235 0.520484 0.4174956 -0.6511139 1.372351 -0.07441164 col8 col9 col10 col11 col12 col13 col14 row1 -0.1811514 0.6892934 0.2961343 -0.1339954 -0.5560317 1.446067 0.4339148 col15 col16 col17 col18 col19 col20 row1 0.04665734 0.8643822 0.9125775 -0.1853578 -1.014949 0.6489417 > tmp[,"col10"] col10 row1 0.2961343 row2 1.8690875 row3 -1.4064055 row4 0.6935820 row5 -0.6213903 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 1.875949 1.6823495 0.520484 0.4174956 -0.6511139 1.37235085 -0.07441164 row5 -1.022786 0.6789585 -1.930330 -0.1723492 -0.1302204 0.08739491 1.51094888 col8 col9 col10 col11 col12 col13 col14 row1 -0.1811514 0.6892934 0.2961343 -0.1339954 -0.5560317 1.4460674 0.4339148 row5 0.3427135 2.3428879 -0.6213903 -0.9577858 -0.1874226 0.8041303 -0.5416181 col15 col16 col17 col18 col19 col20 row1 0.04665734 0.8643822 0.9125775 -0.1853578 -1.014949 0.6489417 row5 0.49727196 -1.0334877 2.1875328 0.2698927 1.919069 0.8565480 > tmp[,c("col6","col20")] col6 col20 row1 1.37235085 0.6489417 row2 0.26915039 0.4047363 row3 -0.56799515 0.4857231 row4 -0.78034898 -1.0129701 row5 0.08739491 0.8565480 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 1.37235085 0.6489417 row5 0.08739491 0.8565480 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.64003 50.11032 49.80643 48.4756 49.39656 104.6114 49.13181 50.87435 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.09907 51.04837 50.20251 50.5126 50.12465 48.72674 50.0401 51.95904 col17 col18 col19 col20 row1 50.69415 50.88321 49.54699 107.5897 > tmp[,"col10"] col10 row1 51.04837 row2 28.89474 row3 30.96044 row4 32.21535 row5 49.46239 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.64003 50.11032 49.80643 48.47560 49.39656 104.6114 49.13181 50.87435 row5 49.16622 51.27750 49.88229 50.06941 50.59910 106.4146 51.12938 50.83044 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.09907 51.04837 50.20251 50.5126 50.12465 48.72674 50.04010 51.95904 row5 50.57100 49.46239 50.53401 49.2922 50.75664 47.94991 49.86296 51.27666 col17 col18 col19 col20 row1 50.69415 50.88321 49.54699 107.5897 row5 51.92891 50.20738 49.43711 104.6979 > tmp[,c("col6","col20")] col6 col20 row1 104.61144 107.58972 row2 75.00948 76.76358 row3 73.34222 73.52648 row4 75.84942 74.39105 row5 106.41464 104.69792 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.6114 107.5897 row5 106.4146 104.6979 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.6114 107.5897 row5 106.4146 104.6979 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.41693383 [2,] -0.25091689 [3,] 0.01175658 [4,] 0.13215247 [5,] -0.18114414 > tmp[,c("col17","col7")] col17 col7 [1,] -0.3741067 0.8775458 [2,] 1.2500980 0.8228320 [3,] 0.1950582 -0.8249990 [4,] 0.9664720 -1.7031578 [5,] -0.3904367 -0.6270317 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -1.0305587 -1.22725194 [2,] -0.7314495 -0.97137841 [3,] -0.7366024 0.83693096 [4,] 0.5648947 0.01140244 [5,] 1.1538019 0.38636682 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -1.030559 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -1.0305587 [2,] -0.7314495 > > > > 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 0.5260277 1.0581333 -0.06789368 -0.2262485 0.5884893 0.6754309 row1 0.3032061 -0.1705183 1.68468792 -1.1292347 1.5231843 1.4583111 [,7] [,8] [,9] [,10] [,11] [,12] row3 -0.66422943 -0.03894196 -0.03867734 -0.08311846 -2.3196664 0.2068409 row1 -0.04246849 -0.87472071 -0.91895691 -0.78243395 0.1674936 0.4927362 [,13] [,14] [,15] [,16] [,17] [,18] [,19] row3 0.6180236 -1.409540 -0.9088615 1.5014630 2.274256 -0.3148497 1.0234003 row1 -1.3408917 -3.363516 -0.5811261 -0.1034402 1.355180 -1.0831879 0.4457029 [,20] row3 0.5175306 row1 -0.8095716 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.9216968 1.943594 1.815717 -0.6565069 1.671123 -1.979046 -0.4129547 [,8] [,9] [,10] row2 0.008700329 0.2307878 0.6753654 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.3737675 -0.2942484 -0.6914163 -2.441354 0.518726 -0.7525782 -0.2829332 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.488639 0.5329592 0.1912514 -0.3151434 0.5571566 1.16207 -2.25079 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.852574 -0.1428163 -0.0236173 1.106066 -0.09105662 0.1501343 > > > 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: 0x563b37d04360> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a5341786e" [2] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a2f6ab89a" [3] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a1fcedc50" [4] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a56a972fa" [5] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a2aeb4eea" [6] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a68a5f11a" [7] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a4735330d" [8] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a28e36ef3" [9] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a6fcc9f13" [10] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a63e90d7a" [11] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a4d0d96a1" [12] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a2c838f6e" [13] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a4d84db24" [14] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a3e96b0e3" [15] "/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests/BM28301a6143dee2" > > > ### 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: 0x563b37a0a460> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x563b37a0a460> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.15-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x563b37a0a460> > rowMedians(tmp) [1] 0.3849287439 -0.1326102799 -0.6094042899 -0.1002484959 0.4186107063 [6] -0.3659264523 0.1792992404 0.0831878628 0.0857521139 -0.1231990855 [11] 0.4925154013 0.0230511743 -0.0779534474 -0.3351685157 0.5289696593 [16] -0.3656127118 -0.0194324713 -0.3128146874 -0.1235383380 0.2908633464 [21] 0.1632021803 -0.1073078700 0.1599696718 -0.2704800535 -0.0049591970 [26] 0.2476462823 0.0620794104 -0.3376520288 0.4796156426 0.5488653199 [31] 0.2494400310 0.0518086683 -0.0907624629 -0.1199858561 -0.4453934108 [36] -0.2411848701 0.3443933325 0.0759372281 0.1153663345 -0.3730222954 [41] -0.1920864610 0.4140413378 -0.2744961531 0.1630566091 0.0356852331 [46] -0.3357330532 -0.3892269605 0.3855070962 0.1547809268 0.2159870818 [51] -0.1962956124 0.2874218175 -0.0051381483 0.2809756012 -0.4161137352 [56] -0.1352831806 0.0563243591 0.4967372959 0.0030620028 0.2995394397 [61] 0.3113615545 -0.3597962187 0.1694579156 0.8401897127 0.1650775447 [66] -0.2006837593 0.1676825348 -0.4531198921 -0.5074790522 -0.4182805778 [71] 0.1128374510 -0.4072355826 -0.0400890524 -0.3343479502 -0.1334722358 [76] 0.0811716276 -0.3888488767 -0.4547450249 -0.0113827176 0.2726987870 [81] -0.0554572395 -0.1069944781 -0.0616485566 -0.1918786141 0.4798912119 [86] -0.0166329460 0.7876832336 -0.0579850482 0.0301886921 -0.4720924521 [91] -0.5857076428 0.4609006296 -0.1329250296 0.4624632218 -0.1914456079 [96] -0.4731844567 0.0203492715 -0.4215338962 0.0261208218 -0.6543212374 [101] 0.2783688833 -0.2855282652 0.2338417222 -0.2750067103 -0.0646323943 [106] 0.4298430922 -0.0755954504 0.3350438055 -0.1560573799 0.2022375448 [111] 0.0179198783 -0.3020929558 -0.5430849759 0.0842355247 -0.2752951627 [116] -0.0488612343 0.1630936421 -0.2366005235 0.5665278573 0.0607012962 [121] 0.0322791567 -0.1321144593 -0.4002278536 -0.3034908955 -0.0112646866 [126] 0.2374619278 -0.0458446024 -0.0278817813 0.0007478982 -0.4149239542 [131] -0.2809289015 -0.2465579953 -0.3753633992 -0.5035903904 -0.1066300096 [136] -0.7969042012 -0.1057253592 -0.0395085796 0.2022884489 -0.2914057053 [141] 0.0772485444 0.2055553573 0.1820108022 0.2169437327 0.1794205832 [146] 0.2677137123 0.4185411021 0.0673549002 -0.0966494255 0.2179075107 [151] 0.6630313841 -0.0706322824 -0.5280603569 -0.0199480268 -0.3707878990 [156] 0.1010220856 -0.0037432488 0.0303101312 -0.2686500212 -0.0273477295 [161] 0.4466702438 0.1039275690 -0.3736429512 -0.0157940186 0.7209172251 [166] -0.4434292572 0.1088883072 0.1982237542 0.1505842197 -0.1003083694 [171] -0.1489238616 -0.4246090301 -0.2679776005 -0.0474395802 -0.3291121887 [176] -0.4503493207 -0.0145189965 -0.3525797127 -0.2122528932 -0.0414293952 [181] -0.2396273830 0.6877169877 0.5233512721 0.5695966742 -0.4879460225 [186] 0.0528021287 0.4339146408 -0.1509094603 0.4861141121 0.2755060008 [191] 0.2016831213 -0.1457384398 -0.2007439041 0.2075310402 0.2541653344 [196] 0.1312343750 -0.1777606350 0.0912611136 -0.2875372191 0.0976166018 [201] -0.2975016162 -0.1373267412 -0.4885561145 0.1300311382 -0.4133231880 [206] -0.2000714144 -0.3547190685 -0.0414480731 -0.0909370750 -0.7776607496 [211] 0.0696630418 0.0819157526 -0.1686700893 -0.5077114401 0.0381206049 [216] -0.0675082128 0.2650518315 -0.1548578496 -0.3897742617 -0.0033232228 [221] -0.3263827818 -0.3277505758 -0.1850074016 -0.1988043682 0.4557194569 [226] 0.1638255689 0.5368287641 -0.1031743972 -0.4687464262 0.0441816579 > > proc.time() user system elapsed 1.513 1.677 3.202
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) 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: 0x556373efd390> > .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: 0x556373efd390> > .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: 0x556373efd390> > .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: 0x556373efd390> > 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: 0x5563747f43a0> > .Call("R_bm_AddColumn",P) <pointer: 0x5563747f43a0> > .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: 0x5563747f43a0> > .Call("R_bm_AddColumn",P) <pointer: 0x5563747f43a0> > .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: 0x5563747f43a0> > 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: 0x556373954550> > .Call("R_bm_AddColumn",P) <pointer: 0x556373954550> > .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: 0x556373954550> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x556373954550> > .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: 0x556373954550> > > .Call("R_bm_RowMode",P) <pointer: 0x556373954550> > .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: 0x556373954550> > > .Call("R_bm_ColMode",P) <pointer: 0x556373954550> > .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: 0x556373954550> > 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: 0x5563746eb210> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x5563746eb210> > .Call("R_bm_AddColumn",P) <pointer: 0x5563746eb210> > .Call("R_bm_AddColumn",P) <pointer: 0x5563746eb210> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile283487118baeef" "BufferedMatrixFile283487632be337" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile283487118baeef" "BufferedMatrixFile283487632be337" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x55637634cbc0> > .Call("R_bm_AddColumn",P) <pointer: 0x55637634cbc0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x55637634cbc0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x55637634cbc0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x55637634cbc0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x55637634cbc0> > .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: 0x556374831be0> > .Call("R_bm_AddColumn",P) <pointer: 0x556374831be0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x556374831be0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x556374831be0> > 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: 0x5563745bcc40> > .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: 0x5563745bcc40> > rm(P) > > proc.time() user system elapsed 0.291 0.062 0.338
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) 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.318 0.055 0.358