Back to Multiple platform build/check report for BioC 3.18: simplified long |
|
This page was generated on 2024-03-27 11:35:43 -0400 (Wed, 27 Mar 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.3.3 (2024-02-29) -- "Angel Food Cake" | 4667 |
palomino4 | Windows Server 2022 Datacenter | x64 | 4.3.3 (2024-02-29 ucrt) -- "Angel Food Cake" | 4403 |
merida1 | macOS 12.7.1 Monterey | x86_64 | 4.3.3 (2024-02-29) -- "Angel Food Cake" | 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 246/2266 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.66.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino4 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson1 | macOS 13.6.1 Ventura / arm64 | see weekly results here | ||||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.66.0 |
Command: /home/biocbuild/bbs-3.18-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.18-bioc/R/site-library --timings BufferedMatrix_1.66.0.tar.gz |
StartedAt: 2024-03-25 20:36:14 -0400 (Mon, 25 Mar 2024) |
EndedAt: 2024-03-25 20:36:36 -0400 (Mon, 25 Mar 2024) |
EllapsedTime: 22.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.18-bioc/R/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/home/biocbuild/bbs-3.18-bioc/R/site-library --timings BufferedMatrix_1.66.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.3.3 (2024-02-29) * using platform: x86_64-pc-linux-gnu (64-bit) * R was compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 GNU Fortran (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 * running under: Ubuntu 22.04.4 LTS * using session charset: UTF-8 * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.66.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 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’ * 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 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 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 ... ‘BufferedMatrix.Rnw’... OK OK * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * DONE Status: 2 NOTEs See ‘/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /home/biocbuild/bbs-3.18-bioc/R/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/home/biocbuild/bbs-3.18-bioc/R/site-library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’ gcc -I"/home/biocbuild/bbs-3.18-bioc/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -Wall -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"/home/biocbuild/bbs-3.18-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.18-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.18-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.18-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.18-bioc/R/lib -lR installing to /home/biocbuild/bbs-3.18-bioc/R/site-library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.3.3 (2024-02-29) -- "Angel Food Cake" Copyright (C) 2024 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.271 0.020 0.281
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.3.3 (2024-02-29) -- "Angel Food Cake" Copyright (C) 2024 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.18-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 457988 24.5 983265 52.6 650542 34.8 Vcells 843172 6.5 8388608 64.0 2057435 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] "Mon Mar 25 20:36:29 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] "Mon Mar 25 20:36:29 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: 0x563e985ec010> > > > > 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] "Mon Mar 25 20:36:29 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] "Mon Mar 25 20:36:29 2024" > > ColMode(tmp2) <pointer: 0x563e985ec010> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.3770283 -0.1718021 -0.6510584 0.7580530 [2,] 1.0352393 0.2642558 -1.3848437 -1.3842744 [3,] 0.4940285 1.0262911 1.3044409 1.8273867 [4,] -0.4354030 1.0765401 -0.5673600 -0.1355474 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.3770283 0.1718021 0.6510584 0.7580530 [2,] 1.0352393 0.2642558 1.3848437 1.3842744 [3,] 0.4940285 1.0262911 1.3044409 1.8273867 [4,] 0.4354030 1.0765401 0.5673600 0.1355474 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 10.0188337 0.4144902 0.8068819 0.8706624 [2,] 1.0174671 0.5140582 1.1767938 1.1765519 [3,] 0.7028716 1.0130603 1.1421212 1.3518087 [4,] 0.6598508 1.0375645 0.7532330 0.3681676 > > 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.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 225.56537 29.31670 33.71988 34.46468 [2,] 36.20991 30.40484 38.15278 38.14979 [3,] 32.52274 36.15689 37.72565 40.34547 [4,] 32.03391 36.45219 33.09969 28.81722 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x563e989b26a0> > exp(tmp5) <pointer: 0x563e989b26a0> > log(tmp5,2) <pointer: 0x563e989b26a0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 469.4848 > Min(tmp5) [1] 54.17032 > mean(tmp5) [1] 72.04182 > Sum(tmp5) [1] 14408.36 > Var(tmp5) [1] 860.4563 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 88.42796 69.55181 70.28102 67.04676 69.84777 69.87748 71.53202 72.57846 [9] 71.40748 69.86746 > rowSums(tmp5) [1] 1768.559 1391.036 1405.620 1340.935 1396.955 1397.550 1430.640 1451.569 [9] 1428.150 1397.349 > rowVars(tmp5) [1] 8112.49010 61.30210 40.89514 46.10895 75.47960 71.66690 [7] 63.80768 55.46630 68.51259 81.75202 > rowSd(tmp5) [1] 90.069363 7.829566 6.394931 6.790357 8.687900 8.465631 7.987971 [8] 7.447570 8.277233 9.041682 > rowMax(tmp5) [1] 469.48475 83.22881 83.97382 79.33066 83.62566 88.27489 84.66642 [8] 86.58130 85.62783 87.26893 > rowMin(tmp5) [1] 55.99556 57.90885 54.35508 54.17032 56.33279 54.76191 54.59723 58.77009 [9] 58.06984 55.79092 > > colMeans(tmp5) [1] 111.31450 66.43163 74.26558 70.48851 71.18415 75.37658 67.07808 [8] 71.54966 68.34590 71.57513 67.17618 70.00112 70.40103 70.84617 [15] 65.68906 72.25613 66.65988 73.88603 65.74230 70.56881 > colSums(tmp5) [1] 1113.1450 664.3163 742.6558 704.8851 711.8415 753.7658 670.7808 [8] 715.4966 683.4590 715.7513 671.7618 700.0112 704.0103 708.4617 [15] 656.8906 722.5613 666.5988 738.8603 657.4230 705.6881 > colVars(tmp5) [1] 15884.55729 50.60888 48.77292 72.28283 55.13292 78.74995 [7] 36.56775 74.75652 26.74727 34.06804 68.69493 55.73026 [13] 116.89779 53.21933 33.25328 60.74875 70.90355 76.53052 [19] 47.14942 104.30174 > colSd(tmp5) [1] 126.033953 7.113992 6.983761 8.501931 7.425155 8.874117 [7] 6.047128 8.646186 5.171777 5.836784 8.288241 7.465270 [13] 10.811928 7.295158 5.766566 7.794148 8.420424 8.748172 [19] 6.866543 10.212823 > colMax(tmp5) [1] 469.48475 75.87045 85.62783 83.97382 82.49395 87.26893 75.68953 [8] 89.92201 78.80052 80.26869 78.71035 80.59341 85.58428 85.22966 [15] 77.22257 83.62566 83.22881 88.27489 77.08615 86.58130 > colMin(tmp5) [1] 59.24665 54.76191 65.09357 59.23973 60.11332 62.22573 58.77009 58.06984 [9] 60.89745 63.52510 54.17032 55.79092 56.49951 60.27770 57.85856 57.90885 [17] 54.35508 59.03386 56.33279 54.59723 > > > ### 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] 88.42796 69.55181 70.28102 67.04676 69.84777 69.87748 NA 72.57846 [9] 71.40748 69.86746 > rowSums(tmp5) [1] 1768.559 1391.036 1405.620 1340.935 1396.955 1397.550 NA 1451.569 [9] 1428.150 1397.349 > rowVars(tmp5) [1] 8112.49010 61.30210 40.89514 46.10895 75.47960 71.66690 [7] 64.77497 55.46630 68.51259 81.75202 > rowSd(tmp5) [1] 90.069363 7.829566 6.394931 6.790357 8.687900 8.465631 8.048290 [8] 7.447570 8.277233 9.041682 > rowMax(tmp5) [1] 469.48475 83.22881 83.97382 79.33066 83.62566 88.27489 NA [8] 86.58130 85.62783 87.26893 > rowMin(tmp5) [1] 55.99556 57.90885 54.35508 54.17032 56.33279 54.76191 NA 58.77009 [9] 58.06984 55.79092 > > colMeans(tmp5) [1] 111.31450 66.43163 74.26558 70.48851 71.18415 75.37658 67.07808 [8] 71.54966 68.34590 NA 67.17618 70.00112 70.40103 70.84617 [15] 65.68906 72.25613 66.65988 73.88603 65.74230 70.56881 > colSums(tmp5) [1] 1113.1450 664.3163 742.6558 704.8851 711.8415 753.7658 670.7808 [8] 715.4966 683.4590 NA 671.7618 700.0112 704.0103 708.4617 [15] 656.8906 722.5613 666.5988 738.8603 657.4230 705.6881 > colVars(tmp5) [1] 15884.55729 50.60888 48.77292 72.28283 55.13292 78.74995 [7] 36.56775 74.75652 26.74727 NA 68.69493 55.73026 [13] 116.89779 53.21933 33.25328 60.74875 70.90355 76.53052 [19] 47.14942 104.30174 > colSd(tmp5) [1] 126.033953 7.113992 6.983761 8.501931 7.425155 8.874117 [7] 6.047128 8.646186 5.171777 NA 8.288241 7.465270 [13] 10.811928 7.295158 5.766566 7.794148 8.420424 8.748172 [19] 6.866543 10.212823 > colMax(tmp5) [1] 469.48475 75.87045 85.62783 83.97382 82.49395 87.26893 75.68953 [8] 89.92201 78.80052 NA 78.71035 80.59341 85.58428 85.22966 [15] 77.22257 83.62566 83.22881 88.27489 77.08615 86.58130 > colMin(tmp5) [1] 59.24665 54.76191 65.09357 59.23973 60.11332 62.22573 58.77009 58.06984 [9] 60.89745 NA 54.17032 55.79092 56.49951 60.27770 57.85856 57.90885 [17] 54.35508 59.03386 56.33279 54.59723 > > Max(tmp5,na.rm=TRUE) [1] 469.4848 > Min(tmp5,na.rm=TRUE) [1] 54.17032 > mean(tmp5,na.rm=TRUE) [1] 72.01102 > Sum(tmp5,na.rm=TRUE) [1] 14330.19 > Var(tmp5,na.rm=TRUE) [1] 864.6114 > > rowMeans(tmp5,na.rm=TRUE) [1] 88.42796 69.55181 70.28102 67.04676 69.84777 69.87748 71.18260 72.57846 [9] 71.40748 69.86746 > rowSums(tmp5,na.rm=TRUE) [1] 1768.559 1391.036 1405.620 1340.935 1396.955 1397.550 1352.469 1451.569 [9] 1428.150 1397.349 > rowVars(tmp5,na.rm=TRUE) [1] 8112.49010 61.30210 40.89514 46.10895 75.47960 71.66690 [7] 64.77497 55.46630 68.51259 81.75202 > rowSd(tmp5,na.rm=TRUE) [1] 90.069363 7.829566 6.394931 6.790357 8.687900 8.465631 8.048290 [8] 7.447570 8.277233 9.041682 > rowMax(tmp5,na.rm=TRUE) [1] 469.48475 83.22881 83.97382 79.33066 83.62566 88.27489 84.66642 [8] 86.58130 85.62783 87.26893 > rowMin(tmp5,na.rm=TRUE) [1] 55.99556 57.90885 54.35508 54.17032 56.33279 54.76191 54.59723 58.77009 [9] 58.06984 55.79092 > > colMeans(tmp5,na.rm=TRUE) [1] 111.31450 66.43163 74.26558 70.48851 71.18415 75.37658 67.07808 [8] 71.54966 68.34590 70.84225 67.17618 70.00112 70.40103 70.84617 [15] 65.68906 72.25613 66.65988 73.88603 65.74230 70.56881 > colSums(tmp5,na.rm=TRUE) [1] 1113.1450 664.3163 742.6558 704.8851 711.8415 753.7658 670.7808 [8] 715.4966 683.4590 637.5803 671.7618 700.0112 704.0103 708.4617 [15] 656.8906 722.5613 666.5988 738.8603 657.4230 705.6881 > colVars(tmp5,na.rm=TRUE) [1] 15884.55729 50.60888 48.77292 72.28283 55.13292 78.74995 [7] 36.56775 74.75652 26.74727 32.28401 68.69493 55.73026 [13] 116.89779 53.21933 33.25328 60.74875 70.90355 76.53052 [19] 47.14942 104.30174 > colSd(tmp5,na.rm=TRUE) [1] 126.033953 7.113992 6.983761 8.501931 7.425155 8.874117 [7] 6.047128 8.646186 5.171777 5.681902 8.288241 7.465270 [13] 10.811928 7.295158 5.766566 7.794148 8.420424 8.748172 [19] 6.866543 10.212823 > colMax(tmp5,na.rm=TRUE) [1] 469.48475 75.87045 85.62783 83.97382 82.49395 87.26893 75.68953 [8] 89.92201 78.80052 80.26869 78.71035 80.59341 85.58428 85.22966 [15] 77.22257 83.62566 83.22881 88.27489 77.08615 86.58130 > colMin(tmp5,na.rm=TRUE) [1] 59.24665 54.76191 65.09357 59.23973 60.11332 62.22573 58.77009 58.06984 [9] 60.89745 63.52510 54.17032 55.79092 56.49951 60.27770 57.85856 57.90885 [17] 54.35508 59.03386 56.33279 54.59723 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 88.42796 69.55181 70.28102 67.04676 69.84777 69.87748 NaN 72.57846 [9] 71.40748 69.86746 > rowSums(tmp5,na.rm=TRUE) [1] 1768.559 1391.036 1405.620 1340.935 1396.955 1397.550 0.000 1451.569 [9] 1428.150 1397.349 > rowVars(tmp5,na.rm=TRUE) [1] 8112.49010 61.30210 40.89514 46.10895 75.47960 71.66690 [7] NA 55.46630 68.51259 81.75202 > rowSd(tmp5,na.rm=TRUE) [1] 90.069363 7.829566 6.394931 6.790357 8.687900 8.465631 NA [8] 7.447570 8.277233 9.041682 > rowMax(tmp5,na.rm=TRUE) [1] 469.48475 83.22881 83.97382 79.33066 83.62566 88.27489 NA [8] 86.58130 85.62783 87.26893 > rowMin(tmp5,na.rm=TRUE) [1] 55.99556 57.90885 54.35508 54.17032 56.33279 54.76191 NA 58.77009 [9] 58.06984 55.79092 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 116.31405 66.15504 73.23455 71.73837 70.23037 74.93328 66.12125 [8] 71.97890 68.48028 NaN 66.03954 70.26034 68.81599 71.42160 [15] 65.89221 72.72129 66.21340 73.75131 64.48187 72.34343 > colSums(tmp5,na.rm=TRUE) [1] 1046.8265 595.3954 659.1109 645.6453 632.0734 674.3995 595.0913 [8] 647.8101 616.3225 0.0000 594.3558 632.3430 619.3439 642.7944 [15] 593.0299 654.4916 595.9206 663.7618 580.3368 651.0909 > colVars(tmp5,na.rm=TRUE) [1] 17588.92710 56.07437 42.91048 63.74388 51.79056 86.38296 [7] 30.83913 82.02828 29.88754 NA 62.74719 61.94063 [13] 103.24595 56.14671 36.94566 65.90820 77.52387 85.89265 [19] 35.17046 81.91009 > colSd(tmp5,na.rm=TRUE) [1] 132.623253 7.488282 6.550609 7.983977 7.196566 9.294243 [7] 5.553299 9.056946 5.466950 NA 7.921312 7.870237 [13] 10.161002 7.493111 6.078295 8.118387 8.804764 9.267829 [19] 5.930469 9.050420 > colMax(tmp5,na.rm=TRUE) [1] 469.48475 75.87045 85.62783 83.97382 82.49395 87.26893 74.31362 [8] 89.92201 78.80052 -Inf 78.71035 80.59341 85.58428 85.22966 [15] 77.22257 83.62566 83.22881 88.27489 73.90865 86.58130 > colMin(tmp5,na.rm=TRUE) [1] 59.24665 54.76191 65.09357 59.97928 60.11332 62.22573 58.77009 58.06984 [9] 60.89745 Inf 54.17032 55.79092 56.49951 60.27770 57.85856 57.90885 [17] 54.35508 59.03386 56.33279 56.93028 > > > > > 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] 159.8961 136.4030 157.4480 285.8796 202.3999 206.0569 172.1108 201.8115 [9] 185.2543 208.1282 > apply(copymatrix,1,var,na.rm=TRUE) [1] 159.8961 136.4030 157.4480 285.8796 202.3999 206.0569 172.1108 201.8115 [9] 185.2543 208.1282 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] -1.421085e-13 5.684342e-14 8.526513e-14 2.273737e-13 0.000000e+00 [6] -5.684342e-14 -1.705303e-13 0.000000e+00 -1.136868e-13 -2.273737e-13 [11] -5.684342e-14 -5.684342e-14 -2.273737e-13 -8.526513e-14 -1.705303e-13 [16] 5.684342e-14 -5.684342e-14 -5.684342e-14 1.421085e-14 0.000000e+00 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 2 5 3 9 3 7 3 2 2 15 5 16 1 10 6 6 6 3 5 16 3 13 3 10 9 11 8 9 7 5 9 2 2 7 9 6 6 20 1 10 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] 3.226733 > Min(tmp) [1] -2.100497 > mean(tmp) [1] -0.09820297 > Sum(tmp) [1] -9.820297 > Var(tmp) [1] 1.221796 > > rowMeans(tmp) [1] -0.09820297 > rowSums(tmp) [1] -9.820297 > rowVars(tmp) [1] 1.221796 > rowSd(tmp) [1] 1.105349 > rowMax(tmp) [1] 3.226733 > rowMin(tmp) [1] -2.100497 > > colMeans(tmp) [1] 0.162567214 -0.584307739 0.047649531 -0.737198336 -0.071963094 [6] 0.188574344 0.358329647 -0.721316319 -0.054422256 -0.270622704 [11] 0.452081369 -0.023421766 0.702353684 -1.150030262 -0.213145122 [16] 0.232710485 -2.100497229 -0.751190650 0.545988237 0.140422952 [21] -1.080085905 -0.487232404 -1.371708934 -0.221604267 -1.387604624 [26] -0.200438726 -1.936406867 -1.234290660 2.544334543 -0.107207423 [31] 2.074731230 1.697285682 -0.173000258 -0.707881780 -1.097850330 [36] -0.089012188 2.507008275 0.180777640 1.762682406 -0.567730901 [41] -0.600425610 1.174497663 -0.339569523 -0.219322053 -0.486937405 [46] 0.541565618 0.556263163 0.064808342 -0.617065995 0.288734429 [51] 0.374695305 0.690402508 1.765563543 -0.708822799 0.248101130 [56] -0.725156081 -1.877588842 -2.082069766 0.889095691 0.034283053 [61] 2.448819929 1.410693159 0.209752301 -0.812222727 -0.495624387 [66] 0.398531683 -0.049089680 -1.593120420 0.382034090 -1.753390028 [71] -1.152228009 0.282701202 -1.213459973 0.699091868 -0.154305677 [76] 1.198569287 0.195065523 -1.969420599 -1.462482993 1.856936872 [81] -0.004221221 -0.078423346 0.519020022 -1.749714841 -0.091729516 [86] -0.669304723 -0.407831893 -2.036644009 -1.733519947 -0.815702611 [91] -0.957140135 3.226733302 0.916653055 -0.747107882 0.867019014 [96] -0.012904518 -0.006320283 -0.846846173 -0.936923738 2.089381771 > colSums(tmp) [1] 0.162567214 -0.584307739 0.047649531 -0.737198336 -0.071963094 [6] 0.188574344 0.358329647 -0.721316319 -0.054422256 -0.270622704 [11] 0.452081369 -0.023421766 0.702353684 -1.150030262 -0.213145122 [16] 0.232710485 -2.100497229 -0.751190650 0.545988237 0.140422952 [21] -1.080085905 -0.487232404 -1.371708934 -0.221604267 -1.387604624 [26] -0.200438726 -1.936406867 -1.234290660 2.544334543 -0.107207423 [31] 2.074731230 1.697285682 -0.173000258 -0.707881780 -1.097850330 [36] -0.089012188 2.507008275 0.180777640 1.762682406 -0.567730901 [41] -0.600425610 1.174497663 -0.339569523 -0.219322053 -0.486937405 [46] 0.541565618 0.556263163 0.064808342 -0.617065995 0.288734429 [51] 0.374695305 0.690402508 1.765563543 -0.708822799 0.248101130 [56] -0.725156081 -1.877588842 -2.082069766 0.889095691 0.034283053 [61] 2.448819929 1.410693159 0.209752301 -0.812222727 -0.495624387 [66] 0.398531683 -0.049089680 -1.593120420 0.382034090 -1.753390028 [71] -1.152228009 0.282701202 -1.213459973 0.699091868 -0.154305677 [76] 1.198569287 0.195065523 -1.969420599 -1.462482993 1.856936872 [81] -0.004221221 -0.078423346 0.519020022 -1.749714841 -0.091729516 [86] -0.669304723 -0.407831893 -2.036644009 -1.733519947 -0.815702611 [91] -0.957140135 3.226733302 0.916653055 -0.747107882 0.867019014 [96] -0.012904518 -0.006320283 -0.846846173 -0.936923738 2.089381771 > 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.162567214 -0.584307739 0.047649531 -0.737198336 -0.071963094 [6] 0.188574344 0.358329647 -0.721316319 -0.054422256 -0.270622704 [11] 0.452081369 -0.023421766 0.702353684 -1.150030262 -0.213145122 [16] 0.232710485 -2.100497229 -0.751190650 0.545988237 0.140422952 [21] -1.080085905 -0.487232404 -1.371708934 -0.221604267 -1.387604624 [26] -0.200438726 -1.936406867 -1.234290660 2.544334543 -0.107207423 [31] 2.074731230 1.697285682 -0.173000258 -0.707881780 -1.097850330 [36] -0.089012188 2.507008275 0.180777640 1.762682406 -0.567730901 [41] -0.600425610 1.174497663 -0.339569523 -0.219322053 -0.486937405 [46] 0.541565618 0.556263163 0.064808342 -0.617065995 0.288734429 [51] 0.374695305 0.690402508 1.765563543 -0.708822799 0.248101130 [56] -0.725156081 -1.877588842 -2.082069766 0.889095691 0.034283053 [61] 2.448819929 1.410693159 0.209752301 -0.812222727 -0.495624387 [66] 0.398531683 -0.049089680 -1.593120420 0.382034090 -1.753390028 [71] -1.152228009 0.282701202 -1.213459973 0.699091868 -0.154305677 [76] 1.198569287 0.195065523 -1.969420599 -1.462482993 1.856936872 [81] -0.004221221 -0.078423346 0.519020022 -1.749714841 -0.091729516 [86] -0.669304723 -0.407831893 -2.036644009 -1.733519947 -0.815702611 [91] -0.957140135 3.226733302 0.916653055 -0.747107882 0.867019014 [96] -0.012904518 -0.006320283 -0.846846173 -0.936923738 2.089381771 > colMin(tmp) [1] 0.162567214 -0.584307739 0.047649531 -0.737198336 -0.071963094 [6] 0.188574344 0.358329647 -0.721316319 -0.054422256 -0.270622704 [11] 0.452081369 -0.023421766 0.702353684 -1.150030262 -0.213145122 [16] 0.232710485 -2.100497229 -0.751190650 0.545988237 0.140422952 [21] -1.080085905 -0.487232404 -1.371708934 -0.221604267 -1.387604624 [26] -0.200438726 -1.936406867 -1.234290660 2.544334543 -0.107207423 [31] 2.074731230 1.697285682 -0.173000258 -0.707881780 -1.097850330 [36] -0.089012188 2.507008275 0.180777640 1.762682406 -0.567730901 [41] -0.600425610 1.174497663 -0.339569523 -0.219322053 -0.486937405 [46] 0.541565618 0.556263163 0.064808342 -0.617065995 0.288734429 [51] 0.374695305 0.690402508 1.765563543 -0.708822799 0.248101130 [56] -0.725156081 -1.877588842 -2.082069766 0.889095691 0.034283053 [61] 2.448819929 1.410693159 0.209752301 -0.812222727 -0.495624387 [66] 0.398531683 -0.049089680 -1.593120420 0.382034090 -1.753390028 [71] -1.152228009 0.282701202 -1.213459973 0.699091868 -0.154305677 [76] 1.198569287 0.195065523 -1.969420599 -1.462482993 1.856936872 [81] -0.004221221 -0.078423346 0.519020022 -1.749714841 -0.091729516 [86] -0.669304723 -0.407831893 -2.036644009 -1.733519947 -0.815702611 [91] -0.957140135 3.226733302 0.916653055 -0.747107882 0.867019014 [96] -0.012904518 -0.006320283 -0.846846173 -0.936923738 2.089381771 > colMedians(tmp) [1] 0.162567214 -0.584307739 0.047649531 -0.737198336 -0.071963094 [6] 0.188574344 0.358329647 -0.721316319 -0.054422256 -0.270622704 [11] 0.452081369 -0.023421766 0.702353684 -1.150030262 -0.213145122 [16] 0.232710485 -2.100497229 -0.751190650 0.545988237 0.140422952 [21] -1.080085905 -0.487232404 -1.371708934 -0.221604267 -1.387604624 [26] -0.200438726 -1.936406867 -1.234290660 2.544334543 -0.107207423 [31] 2.074731230 1.697285682 -0.173000258 -0.707881780 -1.097850330 [36] -0.089012188 2.507008275 0.180777640 1.762682406 -0.567730901 [41] -0.600425610 1.174497663 -0.339569523 -0.219322053 -0.486937405 [46] 0.541565618 0.556263163 0.064808342 -0.617065995 0.288734429 [51] 0.374695305 0.690402508 1.765563543 -0.708822799 0.248101130 [56] -0.725156081 -1.877588842 -2.082069766 0.889095691 0.034283053 [61] 2.448819929 1.410693159 0.209752301 -0.812222727 -0.495624387 [66] 0.398531683 -0.049089680 -1.593120420 0.382034090 -1.753390028 [71] -1.152228009 0.282701202 -1.213459973 0.699091868 -0.154305677 [76] 1.198569287 0.195065523 -1.969420599 -1.462482993 1.856936872 [81] -0.004221221 -0.078423346 0.519020022 -1.749714841 -0.091729516 [86] -0.669304723 -0.407831893 -2.036644009 -1.733519947 -0.815702611 [91] -0.957140135 3.226733302 0.916653055 -0.747107882 0.867019014 [96] -0.012904518 -0.006320283 -0.846846173 -0.936923738 2.089381771 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.1625672 -0.5843077 0.04764953 -0.7371983 -0.07196309 0.1885743 0.3583296 [2,] 0.1625672 -0.5843077 0.04764953 -0.7371983 -0.07196309 0.1885743 0.3583296 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.7213163 -0.05442226 -0.2706227 0.4520814 -0.02342177 0.7023537 -1.15003 [2,] -0.7213163 -0.05442226 -0.2706227 0.4520814 -0.02342177 0.7023537 -1.15003 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.2131451 0.2327105 -2.100497 -0.7511907 0.5459882 0.140423 -1.080086 [2,] -0.2131451 0.2327105 -2.100497 -0.7511907 0.5459882 0.140423 -1.080086 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.4872324 -1.371709 -0.2216043 -1.387605 -0.2004387 -1.936407 -1.234291 [2,] -0.4872324 -1.371709 -0.2216043 -1.387605 -0.2004387 -1.936407 -1.234291 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 2.544335 -0.1072074 2.074731 1.697286 -0.1730003 -0.7078818 -1.09785 [2,] 2.544335 -0.1072074 2.074731 1.697286 -0.1730003 -0.7078818 -1.09785 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.08901219 2.507008 0.1807776 1.762682 -0.5677309 -0.6004256 1.174498 [2,] -0.08901219 2.507008 0.1807776 1.762682 -0.5677309 -0.6004256 1.174498 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.3395695 -0.2193221 -0.4869374 0.5415656 0.5562632 0.06480834 -0.617066 [2,] -0.3395695 -0.2193221 -0.4869374 0.5415656 0.5562632 0.06480834 -0.617066 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.2887344 0.3746953 0.6904025 1.765564 -0.7088228 0.2481011 -0.7251561 [2,] 0.2887344 0.3746953 0.6904025 1.765564 -0.7088228 0.2481011 -0.7251561 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.877589 -2.08207 0.8890957 0.03428305 2.44882 1.410693 0.2097523 [2,] -1.877589 -2.08207 0.8890957 0.03428305 2.44882 1.410693 0.2097523 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.8122227 -0.4956244 0.3985317 -0.04908968 -1.59312 0.3820341 -1.75339 [2,] -0.8122227 -0.4956244 0.3985317 -0.04908968 -1.59312 0.3820341 -1.75339 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -1.152228 0.2827012 -1.21346 0.6990919 -0.1543057 1.198569 0.1950655 [2,] -1.152228 0.2827012 -1.21346 0.6990919 -0.1543057 1.198569 0.1950655 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -1.969421 -1.462483 1.856937 -0.004221221 -0.07842335 0.51902 -1.749715 [2,] -1.969421 -1.462483 1.856937 -0.004221221 -0.07842335 0.51902 -1.749715 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.09172952 -0.6693047 -0.4078319 -2.036644 -1.73352 -0.8157026 -0.9571401 [2,] -0.09172952 -0.6693047 -0.4078319 -2.036644 -1.73352 -0.8157026 -0.9571401 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 3.226733 0.9166531 -0.7471079 0.867019 -0.01290452 -0.006320283 -0.8468462 [2,] 3.226733 0.9166531 -0.7471079 0.867019 -0.01290452 -0.006320283 -0.8468462 [,99] [,100] [1,] -0.9369237 2.089382 [2,] -0.9369237 2.089382 > > > Max(tmp2) [1] 2.660869 > Min(tmp2) [1] -2.271214 > mean(tmp2) [1] 0.07302326 > Sum(tmp2) [1] 7.302326 > Var(tmp2) [1] 1.015322 > > rowMeans(tmp2) [1] -0.544561137 -0.431788008 -1.321432930 -0.786996529 0.700334627 [6] 0.381091436 0.422574127 -1.420527055 0.726248650 1.425197887 [11] 0.881530902 0.400702550 0.251600070 -1.871714269 0.034080187 [16] -0.159544409 -1.113244259 0.085279781 1.434395253 0.545311480 [21] 0.886008644 1.832223557 0.938428477 0.882211704 -0.350634468 [26] 0.948554692 -0.012140000 -1.184195548 0.230771336 -0.493863509 [31] -0.411108501 -0.291825814 -0.425715628 -1.347366490 0.809121373 [36] 1.361370178 0.615994404 -0.803175525 -0.657327726 -1.084020336 [41] -0.866070249 0.148448249 -1.940656383 0.283511088 1.321646428 [46] -1.728614391 0.111176473 0.965293100 0.687306624 0.480265123 [51] -0.051392876 0.748321879 -0.401566002 -0.205590701 -0.671694473 [56] -0.563586306 -0.469252817 -1.425342941 -0.330352766 0.025752954 [61] -0.943765902 0.110013854 -1.781963977 -0.007380445 0.448798089 [66] 2.045630178 0.295102054 0.728984655 1.705783453 1.801023602 [71] 1.151423766 -0.855657247 -0.193518817 2.660868864 1.351430607 [76] -0.052251045 0.433892536 -0.625718061 0.043965568 -1.970231425 [81] 0.429158035 0.470148711 -0.765558090 0.030346543 0.646727742 [86] 0.522423614 0.212275646 2.143105567 -0.432707942 1.413995061 [91] 0.812346765 -2.271213596 -1.441421036 0.176542435 1.121688410 [96] 0.809135008 -0.083652927 1.441771731 0.165094669 -1.643761399 > rowSums(tmp2) [1] -0.544561137 -0.431788008 -1.321432930 -0.786996529 0.700334627 [6] 0.381091436 0.422574127 -1.420527055 0.726248650 1.425197887 [11] 0.881530902 0.400702550 0.251600070 -1.871714269 0.034080187 [16] -0.159544409 -1.113244259 0.085279781 1.434395253 0.545311480 [21] 0.886008644 1.832223557 0.938428477 0.882211704 -0.350634468 [26] 0.948554692 -0.012140000 -1.184195548 0.230771336 -0.493863509 [31] -0.411108501 -0.291825814 -0.425715628 -1.347366490 0.809121373 [36] 1.361370178 0.615994404 -0.803175525 -0.657327726 -1.084020336 [41] -0.866070249 0.148448249 -1.940656383 0.283511088 1.321646428 [46] -1.728614391 0.111176473 0.965293100 0.687306624 0.480265123 [51] -0.051392876 0.748321879 -0.401566002 -0.205590701 -0.671694473 [56] -0.563586306 -0.469252817 -1.425342941 -0.330352766 0.025752954 [61] -0.943765902 0.110013854 -1.781963977 -0.007380445 0.448798089 [66] 2.045630178 0.295102054 0.728984655 1.705783453 1.801023602 [71] 1.151423766 -0.855657247 -0.193518817 2.660868864 1.351430607 [76] -0.052251045 0.433892536 -0.625718061 0.043965568 -1.970231425 [81] 0.429158035 0.470148711 -0.765558090 0.030346543 0.646727742 [86] 0.522423614 0.212275646 2.143105567 -0.432707942 1.413995061 [91] 0.812346765 -2.271213596 -1.441421036 0.176542435 1.121688410 [96] 0.809135008 -0.083652927 1.441771731 0.165094669 -1.643761399 > 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.544561137 -0.431788008 -1.321432930 -0.786996529 0.700334627 [6] 0.381091436 0.422574127 -1.420527055 0.726248650 1.425197887 [11] 0.881530902 0.400702550 0.251600070 -1.871714269 0.034080187 [16] -0.159544409 -1.113244259 0.085279781 1.434395253 0.545311480 [21] 0.886008644 1.832223557 0.938428477 0.882211704 -0.350634468 [26] 0.948554692 -0.012140000 -1.184195548 0.230771336 -0.493863509 [31] -0.411108501 -0.291825814 -0.425715628 -1.347366490 0.809121373 [36] 1.361370178 0.615994404 -0.803175525 -0.657327726 -1.084020336 [41] -0.866070249 0.148448249 -1.940656383 0.283511088 1.321646428 [46] -1.728614391 0.111176473 0.965293100 0.687306624 0.480265123 [51] -0.051392876 0.748321879 -0.401566002 -0.205590701 -0.671694473 [56] -0.563586306 -0.469252817 -1.425342941 -0.330352766 0.025752954 [61] -0.943765902 0.110013854 -1.781963977 -0.007380445 0.448798089 [66] 2.045630178 0.295102054 0.728984655 1.705783453 1.801023602 [71] 1.151423766 -0.855657247 -0.193518817 2.660868864 1.351430607 [76] -0.052251045 0.433892536 -0.625718061 0.043965568 -1.970231425 [81] 0.429158035 0.470148711 -0.765558090 0.030346543 0.646727742 [86] 0.522423614 0.212275646 2.143105567 -0.432707942 1.413995061 [91] 0.812346765 -2.271213596 -1.441421036 0.176542435 1.121688410 [96] 0.809135008 -0.083652927 1.441771731 0.165094669 -1.643761399 > rowMin(tmp2) [1] -0.544561137 -0.431788008 -1.321432930 -0.786996529 0.700334627 [6] 0.381091436 0.422574127 -1.420527055 0.726248650 1.425197887 [11] 0.881530902 0.400702550 0.251600070 -1.871714269 0.034080187 [16] -0.159544409 -1.113244259 0.085279781 1.434395253 0.545311480 [21] 0.886008644 1.832223557 0.938428477 0.882211704 -0.350634468 [26] 0.948554692 -0.012140000 -1.184195548 0.230771336 -0.493863509 [31] -0.411108501 -0.291825814 -0.425715628 -1.347366490 0.809121373 [36] 1.361370178 0.615994404 -0.803175525 -0.657327726 -1.084020336 [41] -0.866070249 0.148448249 -1.940656383 0.283511088 1.321646428 [46] -1.728614391 0.111176473 0.965293100 0.687306624 0.480265123 [51] -0.051392876 0.748321879 -0.401566002 -0.205590701 -0.671694473 [56] -0.563586306 -0.469252817 -1.425342941 -0.330352766 0.025752954 [61] -0.943765902 0.110013854 -1.781963977 -0.007380445 0.448798089 [66] 2.045630178 0.295102054 0.728984655 1.705783453 1.801023602 [71] 1.151423766 -0.855657247 -0.193518817 2.660868864 1.351430607 [76] -0.052251045 0.433892536 -0.625718061 0.043965568 -1.970231425 [81] 0.429158035 0.470148711 -0.765558090 0.030346543 0.646727742 [86] 0.522423614 0.212275646 2.143105567 -0.432707942 1.413995061 [91] 0.812346765 -2.271213596 -1.441421036 0.176542435 1.121688410 [96] 0.809135008 -0.083652927 1.441771731 0.165094669 -1.643761399 > > colMeans(tmp2) [1] 0.07302326 > colSums(tmp2) [1] 7.302326 > colVars(tmp2) [1] 1.015322 > colSd(tmp2) [1] 1.007632 > colMax(tmp2) [1] 2.660869 > colMin(tmp2) [1] -2.271214 > colMedians(tmp2) [1] 0.1105952 > colRanges(tmp2) [,1] [1,] -2.271214 [2,] 2.660869 > > 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] 3.3280287 -3.0717379 -0.1358745 -4.2059992 0.7745532 0.3594701 [7] -0.3078845 -0.1618874 2.0966562 2.6078577 > colApply(tmp,quantile)[,1] [,1] [1,] -0.9556247 [2,] -0.5279104 [3,] -0.1542741 [4,] 0.6092336 [5,] 3.1835716 > > rowApply(tmp,sum) [1] -1.62284785 1.53360654 3.51224923 1.18682613 -0.35628301 0.08497347 [7] -2.20430773 0.26804829 -0.50643866 -0.61264408 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 10 2 1 10 5 7 3 10 5 4 [2,] 6 4 8 1 1 1 4 6 4 9 [3,] 2 5 2 5 8 10 6 1 9 5 [4,] 9 1 7 2 6 6 8 2 3 1 [5,] 3 8 4 7 4 2 9 7 8 6 [6,] 1 3 10 4 7 8 5 9 7 7 [7,] 5 9 3 8 2 3 7 3 2 8 [8,] 8 6 6 3 9 4 2 8 6 3 [9,] 4 10 9 9 10 5 1 5 1 10 [10,] 7 7 5 6 3 9 10 4 10 2 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 2.39728166 -1.08602117 -2.94932402 -5.15782957 -0.47307237 -4.05085827 [7] 2.82197417 -1.39781245 0.47822655 2.28664584 0.05771946 4.45639913 [13] -0.58059044 -0.47637791 -0.23087458 -3.22683491 2.10067862 -0.52816760 [19] 0.49223027 3.31198729 > colApply(tmp,quantile)[,1] [,1] [1,] -0.92341939 [2,] 0.08648267 [3,] 0.63511222 [4,] 0.88398249 [5,] 1.71512367 > > rowApply(tmp,sum) [1] 0.6782349 -0.1273296 5.1119057 -4.7889219 -2.6285094 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 15 17 3 20 12 [2,] 3 18 16 5 5 [3,] 9 2 7 16 4 [4,] 4 1 4 10 6 [5,] 19 4 12 3 14 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.63511222 -1.2097113 -0.3041465 -0.9646290 1.1286621 -0.4065421 [2,] 0.88398249 1.2258366 -1.9773652 -2.5604251 -0.9326746 -1.3635667 [3,] -0.92341939 0.8372364 0.2103882 -0.7397559 0.4129960 0.2560547 [4,] 1.71512367 -0.8597411 0.2466915 -0.1393152 -1.5070915 -2.3706029 [5,] 0.08648267 -1.0796418 -1.1248920 -0.7537043 0.4250356 -0.1662012 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.3663817 -1.2716148 0.28440639 2.3272913 -0.44618728 0.2554226 [2,] 0.3035143 0.2658308 0.49813186 0.1096718 0.58328074 2.5998824 [3,] 1.0090251 1.1904878 0.08118053 0.3261295 0.23026748 0.5487773 [4,] 0.6689070 -0.2185023 0.17706385 -0.5862390 0.01176288 -0.7000875 [5,] 0.4741460 -1.3640139 -0.56255608 0.1097923 -0.32140435 1.7524044 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.42984219 -0.6431484 -1.6799673 -0.001951685 0.8596126 0.471403256 [2,] 0.23312689 -0.6319647 1.2670349 0.243845188 0.8172775 -0.484899265 [3,] -1.74406423 -0.3010622 0.8088149 0.368168191 1.4251839 -1.138817802 [4,] -0.03496223 -0.1240709 -1.7892382 -1.249135177 -0.3864514 0.614571354 [5,] 1.39515131 1.2238682 1.1624811 -2.587761430 -0.6149439 0.009574857 [,19] [,20] [1,] 0.8201186 0.8875647 [2,] -0.5035049 -0.7043446 [3,] 0.6771755 1.5771397 [4,] 1.5172383 0.2251571 [5,] -2.0187972 1.3264703 > > > 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.18-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.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 652 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 565 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /home/biocbuild/bbs-3.18-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.09275054 -0.4720249 0.1437151 -0.4844938 0.3341833 -0.4166722 -1.661966 col8 col9 col10 col11 col12 col13 col14 row1 0.1937892 1.745016 0.06345853 0.05245037 0.262642 -0.05414287 0.4106141 col15 col16 col17 col18 col19 col20 row1 0.9036032 0.6488667 -0.2720576 1.244934 0.04535035 -0.2854411 > tmp[,"col10"] col10 row1 0.06345853 row2 -0.60637854 row3 -0.60651159 row4 -1.88164497 row5 1.14664703 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.09275054 -0.4720249 0.1437151 -0.4844938 0.33418334 -0.4166722 row5 -1.81085924 1.3504223 -0.5157018 -0.4025538 0.03149348 -2.0627109 col7 col8 col9 col10 col11 col12 col13 row1 -1.6619656 0.1937892 1.745016 0.06345853 0.05245037 0.2626420 -0.05414287 row5 0.8894515 -0.8484619 0.171939 1.14664703 1.21597550 0.1855152 -1.00713632 col14 col15 col16 col17 col18 col19 row1 0.4106141 0.9036032 0.648866674 -0.2720576 1.244934 0.04535035 row5 0.4338916 1.2146643 -0.007305511 0.1066988 1.010461 -0.39256859 col20 row1 -0.2854411 row5 0.1567314 > tmp[,c("col6","col20")] col6 col20 row1 -0.4166722 -0.2854411 row2 -0.1732115 -0.5708520 row3 2.3263203 -1.0528198 row4 1.4615553 1.7450634 row5 -2.0627109 0.1567314 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.4166722 -0.2854411 row5 -2.0627109 0.1567314 > > > > > 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.35319 51.62979 49.94651 49.77144 48.5978 103.6454 51.67509 48.48316 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.91114 51.70905 50.53214 50.01607 51.19952 49.52572 49.12467 49.57155 col17 col18 col19 col20 row1 49.91798 50.32993 50.34821 104.8873 > tmp[,"col10"] col10 row1 51.70905 row2 29.35605 row3 32.25965 row4 29.12576 row5 50.08185 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.35319 51.62979 49.94651 49.77144 48.59780 103.6454 51.67509 48.48316 row5 49.32054 50.91990 49.89422 49.71841 49.26871 105.7868 49.72167 48.44067 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.91114 51.70905 50.53214 50.01607 51.19952 49.52572 49.12467 49.57155 row5 49.73952 50.08185 49.67345 49.76160 49.85746 50.06323 50.00127 49.08639 col17 col18 col19 col20 row1 49.91798 50.32993 50.34821 104.8873 row5 49.43602 50.23923 51.99143 107.7564 > tmp[,c("col6","col20")] col6 col20 row1 103.64541 104.88734 row2 76.15137 74.40497 row3 76.18926 74.41823 row4 75.43734 75.25329 row5 105.78675 107.75640 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.6454 104.8873 row5 105.7868 107.7564 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.6454 104.8873 row5 105.7868 107.7564 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -2.1639917 [2,] 0.9011858 [3,] 1.0368701 [4,] -1.3744750 [5,] -0.2622730 > tmp[,c("col17","col7")] col17 col7 [1,] -0.06693832 -0.79685161 [2,] -0.85469237 -0.02090629 [3,] -2.36373437 -0.45995059 [4,] 2.24691224 0.34121407 [5,] -0.83564666 0.62716957 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.7030844 0.52397990 [2,] -0.1008612 -1.18351537 [3,] 0.2839226 -0.08539384 [4,] -0.9547772 0.53849911 [5,] 0.3659561 1.13140001 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.703084 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.7030844 [2,] -0.1008612 > > > > 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.4228289 1.0404864 -0.6978341 1.6435804 2.038826 0.2156838 -1.937206 row1 -0.9757986 -0.7935525 -1.1822633 -0.9522872 1.973153 0.9806305 1.352953 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 0.7473793 -1.374052 0.7253138 1.6561572 -1.6231491 -2.733387 1.259781 row1 0.2818399 0.192409 0.6435641 -0.1791212 -0.2886034 -1.075843 2.798360 [,15] [,16] [,17] [,18] [,19] [,20] row3 1.208305 -0.4642119 1.4870337 0.8989267 0.43940477 -0.3249109 row1 -1.863233 -0.7964451 -0.5779871 1.0372574 0.09246355 -1.5392024 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] row2 -0.5670421 -0.08558317 -0.6795207 0.3544977 -1.591983 -0.5253287 [,7] [,8] [,9] [,10] row2 -0.7544825 1.190469 -0.948438 0.7590648 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 1.295167 0.3703016 -1.530607 -0.1101114 -2.029272 1.553019 0.3993023 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 1.23462 -0.1974254 -1.312892 -0.3834642 -0.2698716 -0.9535435 1.780416 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.4098637 -0.7176078 1.276047 0.5677921 0.2372337 -0.8122356 > > > 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: 0x563e97ee3050> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a58a27312" [2] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a3bfdc1d" [3] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a16a7387c" [4] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a266f522f" [5] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a7e417950" [6] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a48cbebab" [7] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a3c340767" [8] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a2c82f7be" [9] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a73aa20ae" [10] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a48dd54a4" [11] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a569d6dab" [12] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a235a85b1" [13] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a8ae8449" [14] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a1f6e58e4" [15] "/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM127c1a66124b9c" > > > ### 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: 0x563e998afca0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x563e998afca0> Warning message: In dir.create(new.directory) : '/home/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x563e998afca0> > rowMedians(tmp) [1] -0.1302970209 -0.0226566016 -0.3189008290 -0.3277161574 0.7420887305 [6] 0.4696775596 0.1913903559 0.2334437180 0.2618116496 -0.1548893583 [11] -0.2652124553 -0.2730943547 0.1995544561 0.1470894983 0.2140698676 [16] 0.0255258227 -0.2777745670 0.1835588527 -0.1762118373 -0.3567452165 [21] 0.7337645428 0.2716483023 0.5821411503 -0.1022668384 0.6040873126 [26] 0.0494060035 0.4712887175 -0.1870470831 -0.1338062785 -0.1525824945 [31] 0.0585035216 0.5765197714 0.3833238341 0.3661553534 -0.3494611099 [36] 0.0098491661 -0.1615035519 0.1833164486 0.1329584976 0.1700317858 [41] -0.2243167479 -0.0981979467 -0.3015545947 -0.0710185422 -0.3927052354 [46] -0.3096530516 -0.4601637390 -0.3330077449 0.0601875651 -0.4223590609 [51] -0.0288399088 0.6899767315 0.5224384969 0.2993263427 0.3073022571 [56] -0.0746981979 0.3121427547 0.0945980183 -0.9123254439 0.0158800742 [61] -0.0700541319 0.3296767191 0.3313415127 -0.2476903051 -0.1675905888 [66] 0.3825827604 0.1011998728 -0.0235505170 -0.1610884306 0.3413208507 [71] 0.1758513310 -0.0572794817 0.4809721372 0.0368632528 0.0240747106 [76] 0.4956932769 -0.3977801326 0.1860499183 0.1679992678 -0.5573583981 [81] -0.5600725578 0.7578324717 -0.5246242865 -0.0215848357 0.5355718752 [86] -0.2046664365 0.0855428801 0.0171234480 -0.3592971536 0.0005053341 [91] 0.3081986373 -0.1954133836 0.0379679132 0.1135763888 0.0543072614 [96] 0.1423002509 -0.1212413498 0.1735301074 0.3656836059 0.3881618933 [101] -0.0437398030 -0.2243974203 0.1213072350 -0.5850036794 0.0363681560 [106] 0.3826303316 -0.5268247609 0.1458070669 -0.2238209211 -0.1102075280 [111] -0.1852129929 -0.4211446878 -0.4288462002 0.2569567664 -0.1193124638 [116] 0.0716993757 -0.4695405602 0.3501216233 0.0342768792 0.3980497762 [121] -0.2776598966 -0.0452149491 -0.4621978116 -0.2009359290 -0.1138677143 [126] 0.1042901168 0.2058667463 0.2114596527 0.2692038468 0.2404118652 [131] 0.2735397584 -0.4802014882 -0.0982349877 -0.1485119673 0.0665573364 [136] 0.1893481175 0.3336497618 0.2995198200 -0.0804535918 -0.1618992035 [141] 0.1526788646 -0.3757910043 -0.3949748303 0.0292000769 0.0735842090 [146] -0.4621885723 0.2128209828 -0.4445395711 -0.6243750394 0.0594867027 [151] -0.0190390225 0.1682314661 -0.2069868123 -0.1193664715 -0.0576489896 [156] -0.6281463248 -0.0683898004 -0.1217298213 -0.1542343057 -0.1248337535 [161] -0.2728920060 -0.6160381848 -0.1975857526 -0.3438745554 0.1488131243 [166] -0.2218268422 -0.3091640315 0.2804796889 0.3685839019 0.0911327816 [171] -0.2034257128 0.1017557633 0.0721877148 -0.0883148036 0.3059854569 [176] 0.2543308410 -0.5316443980 0.0446232424 -0.1363036129 0.0541453276 [181] -0.4775590953 -0.3971318917 -0.1871422630 0.3436361479 0.1231652028 [186] -0.2612663073 0.7685666515 -0.4975526079 -0.3650780740 0.1992417608 [191] 0.5147371386 -0.6599224571 0.1479181566 0.3190699360 -0.0094184652 [196] -0.0196923147 -0.1278435139 -0.3536389483 0.5879973369 -0.0226686924 [201] -0.1166142338 -0.2893569192 -0.1025188095 0.2244563719 0.2874809020 [206] 0.0992769519 0.3886991092 -0.7008690743 0.3550999890 -0.3543312145 [211] -0.2705925511 0.9121276395 0.4010772937 0.5584224832 -0.5584460197 [216] -0.0167858503 -0.2317220975 0.1433642322 0.0981084837 0.1509071174 [221] -0.5442557736 0.1176977055 0.1595861018 0.6392330531 -0.5338513781 [226] 0.4785649923 -0.0274659436 0.1750681973 -0.1214753045 -0.1858855072 > > proc.time() user system elapsed 1.352 0.587 1.933
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.3.3 (2024-02-29) -- "Angel Food Cake" Copyright (C) 2024 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: 0x55c8f6908010> > .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: 0x55c8f6908010> > .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: 0x55c8f6908010> > .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: 0x55c8f6908010> > 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: 0x55c8f6cce6a0> > .Call("R_bm_AddColumn",P) <pointer: 0x55c8f6cce6a0> > .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: 0x55c8f6cce6a0> > .Call("R_bm_AddColumn",P) <pointer: 0x55c8f6cce6a0> > .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: 0x55c8f6cce6a0> > 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: 0x55c8f5e111c0> > .Call("R_bm_AddColumn",P) <pointer: 0x55c8f5e111c0> > .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: 0x55c8f5e111c0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x55c8f5e111c0> > .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: 0x55c8f5e111c0> > > .Call("R_bm_RowMode",P) <pointer: 0x55c8f5e111c0> > .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: 0x55c8f5e111c0> > > .Call("R_bm_ColMode",P) <pointer: 0x55c8f5e111c0> > .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: 0x55c8f5e111c0> > 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: 0x55c8f87385e0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x55c8f87385e0> > .Call("R_bm_AddColumn",P) <pointer: 0x55c8f87385e0> > .Call("R_bm_AddColumn",P) <pointer: 0x55c8f87385e0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile127ddb42976e86" "BufferedMatrixFile127ddb66cd6a68" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile127ddb42976e86" "BufferedMatrixFile127ddb66cd6a68" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x55c8f6b75280> > .Call("R_bm_AddColumn",P) <pointer: 0x55c8f6b75280> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x55c8f6b75280> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x55c8f6b75280> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x55c8f6b75280> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x55c8f6b75280> > .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: 0x55c8f7dc7920> > .Call("R_bm_AddColumn",P) <pointer: 0x55c8f7dc7920> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x55c8f7dc7920> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x55c8f7dc7920> > 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: 0x55c8f70a5c00> > .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: 0x55c8f70a5c00> > rm(P) > > proc.time() user system elapsed 0.255 0.030 0.275
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.3.3 (2024-02-29) -- "Angel Food Cake" Copyright (C) 2024 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.245 0.042 0.277