Back to Multiple platform build/check report for BioC 3.19: simplified long |
|
This page was generated on 2024-10-18 20:40 -0400 (Fri, 18 Oct 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4763 |
palomino7 | Windows Server 2022 Datacenter | x64 | 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" | 4500 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4530 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.1 (2024-06-14) -- "Race for Your Life" | 4480 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 249/2300 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.68.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino7 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.7.5 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson1 | macOS 13.6.6 Ventura / arm64 | OK | OK | WARNINGS | OK | |||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.68.0 |
Command: /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.68.0.tar.gz |
StartedAt: 2024-10-17 02:08:15 -0400 (Thu, 17 Oct 2024) |
EndedAt: 2024-10-17 02:09:37 -0400 (Thu, 17 Oct 2024) |
EllapsedTime: 81.4 seconds |
RetCode: 0 |
Status: WARNINGS |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 1 |
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:BufferedMatrix.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings BufferedMatrix_1.68.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.4.1 (2024-06-14) * using platform: x86_64-apple-darwin20 * R was compiled by Apple clang version 14.0.0 (clang-1400.0.29.202) GNU Fortran (GCC) 12.2.0 * running under: macOS Monterey 12.7.6 * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.68.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... WARNING Found the following significant warnings: doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] See ‘/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking sizes of PDF files under ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.4.1 (2024-06-14) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 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.599 0.213 0.893
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.1 (2024-06-14) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 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] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells 474173 25.4 1035480 55.4 NA 638600 34.2 Vcells 877659 6.7 8388608 64.0 65536 2072434 15.9 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Thu Oct 17 02:08:52 2024" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Thu Oct 17 02:08:53 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: 0x600002f14000> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Thu Oct 17 02:09:00 2024" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Thu Oct 17 02:09:03 2024" > > ColMode(tmp2) <pointer: 0x600002f14000> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.2768670 -0.6714689 0.5296076 0.1644077 [2,] -0.7899389 0.7133868 -0.5299751 -0.1880200 [3,] -0.1853523 -0.6786394 -0.4274572 1.4548212 [4,] -1.2389442 0.3227120 -0.9302163 0.6557304 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.2768670 0.6714689 0.5296076 0.1644077 [2,] 0.7899389 0.7133868 0.5299751 0.1880200 [3,] 0.1853523 0.6786394 0.4274572 1.4548212 [4,] 1.2389442 0.3227120 0.9302163 0.6557304 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9637777 0.8194321 0.7277415 0.4054722 [2,] 0.8887851 0.8446223 0.7279939 0.4336128 [3,] 0.4305256 0.8237957 0.6538021 1.2061597 [4,] 1.1130787 0.5680775 0.9644772 0.8097718 > > 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: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 223.91464 33.86579 32.80702 29.21913 [2,] 34.67779 34.15961 32.80991 29.52415 [3,] 29.49061 33.91660 31.96548 38.51642 [4,] 37.36973 31.00349 35.57499 33.75345 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600002f64000> > exp(tmp5) <pointer: 0x600002f64000> > log(tmp5,2) <pointer: 0x600002f64000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.049 > Min(tmp5) [1] 53.54176 > mean(tmp5) [1] 71.7335 > Sum(tmp5) [1] 14346.7 > Var(tmp5) [1] 861.3366 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 89.55271 69.45175 70.43970 69.30675 70.34215 70.67631 70.68040 71.18487 [9] 67.61860 68.08172 > rowSums(tmp5) [1] 1791.054 1389.035 1408.794 1386.135 1406.843 1413.526 1413.608 1423.697 [9] 1352.372 1361.634 > rowVars(tmp5) [1] 7939.44217 60.28430 71.83434 80.31560 63.19495 53.02999 [7] 102.49381 128.52186 78.89137 59.12254 > rowSd(tmp5) [1] 89.103547 7.764297 8.475514 8.961897 7.949525 7.282169 10.123923 [8] 11.336748 8.882081 7.689118 > rowMax(tmp5) [1] 466.04900 84.25827 85.29781 85.21447 85.25761 82.78014 86.24867 [8] 94.18836 82.37375 82.17939 > rowMin(tmp5) [1] 56.94545 56.59539 56.81354 57.39952 58.66036 55.81846 55.39084 56.44488 [9] 53.54176 57.43474 > > colMeans(tmp5) [1] 108.55595 69.47974 68.44711 73.14008 64.07718 63.99938 69.98812 [8] 73.58477 63.02268 66.96150 70.50272 72.35046 73.31937 70.23960 [15] 71.46380 71.88813 75.23702 69.88711 69.71454 68.81066 > colSums(tmp5) [1] 1085.5595 694.7974 684.4711 731.4008 640.7718 639.9938 699.8812 [8] 735.8477 630.2268 669.6150 705.0272 723.5046 733.1937 702.3960 [15] 714.6380 718.8813 752.3702 698.8711 697.1454 688.1066 > colVars(tmp5) [1] 15865.87506 60.93199 94.64495 124.73616 34.35929 22.71546 [7] 68.96438 71.46816 52.90223 37.90217 85.37469 41.25217 [13] 69.48383 71.34787 97.60710 47.64499 75.00603 111.71163 [19] 129.50980 67.94674 > colSd(tmp5) [1] 125.959815 7.805895 9.728563 11.168534 5.861680 4.766074 [7] 8.304479 8.453884 7.273392 6.156473 9.239843 6.422785 [13] 8.335696 8.446767 9.879631 6.902535 8.660602 10.569372 [19] 11.380237 8.242981 > colMax(tmp5) [1] 466.04900 85.82301 84.71604 94.18836 73.42463 69.70140 81.39202 [8] 85.25761 76.79704 73.77411 86.19661 79.05846 86.24867 81.55325 [15] 85.29781 81.48136 83.09424 85.21447 96.51093 81.74706 > colMin(tmp5) [1] 59.36582 58.74773 54.54024 58.53505 56.94545 56.44415 53.54176 58.75512 [9] 55.80332 56.79665 57.43474 61.41132 60.63353 57.87557 57.39952 59.83747 [17] 57.31357 55.39084 56.81354 55.81846 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] NA 69.45175 70.43970 69.30675 70.34215 70.67631 70.68040 71.18487 [9] 67.61860 68.08172 > rowSums(tmp5) [1] NA 1389.035 1408.794 1386.135 1406.843 1413.526 1413.608 1423.697 [9] 1352.372 1361.634 > rowVars(tmp5) [1] 8366.15703 60.28430 71.83434 80.31560 63.19495 53.02999 [7] 102.49381 128.52186 78.89137 59.12254 > rowSd(tmp5) [1] 91.466699 7.764297 8.475514 8.961897 7.949525 7.282169 10.123923 [8] 11.336748 8.882081 7.689118 > rowMax(tmp5) [1] NA 84.25827 85.29781 85.21447 85.25761 82.78014 86.24867 94.18836 [9] 82.37375 82.17939 > rowMin(tmp5) [1] NA 56.59539 56.81354 57.39952 58.66036 55.81846 55.39084 56.44488 [9] 53.54176 57.43474 > > colMeans(tmp5) [1] 108.55595 69.47974 68.44711 73.14008 64.07718 63.99938 69.98812 [8] 73.58477 63.02268 66.96150 70.50272 72.35046 73.31937 70.23960 [15] 71.46380 71.88813 75.23702 NA 69.71454 68.81066 > colSums(tmp5) [1] 1085.5595 694.7974 684.4711 731.4008 640.7718 639.9938 699.8812 [8] 735.8477 630.2268 669.6150 705.0272 723.5046 733.1937 702.3960 [15] 714.6380 718.8813 752.3702 NA 697.1454 688.1066 > colVars(tmp5) [1] 15865.87506 60.93199 94.64495 124.73616 34.35929 22.71546 [7] 68.96438 71.46816 52.90223 37.90217 85.37469 41.25217 [13] 69.48383 71.34787 97.60710 47.64499 75.00603 NA [19] 129.50980 67.94674 > colSd(tmp5) [1] 125.959815 7.805895 9.728563 11.168534 5.861680 4.766074 [7] 8.304479 8.453884 7.273392 6.156473 9.239843 6.422785 [13] 8.335696 8.446767 9.879631 6.902535 8.660602 NA [19] 11.380237 8.242981 > colMax(tmp5) [1] 466.04900 85.82301 84.71604 94.18836 73.42463 69.70140 81.39202 [8] 85.25761 76.79704 73.77411 86.19661 79.05846 86.24867 81.55325 [15] 85.29781 81.48136 83.09424 NA 96.51093 81.74706 > colMin(tmp5) [1] 59.36582 58.74773 54.54024 58.53505 56.94545 56.44415 53.54176 58.75512 [9] 55.80332 56.79665 57.43474 61.41132 60.63353 57.87557 57.39952 59.83747 [17] 57.31357 NA 56.81354 55.81846 > > Max(tmp5,na.rm=TRUE) [1] 466.049 > Min(tmp5,na.rm=TRUE) [1] 53.54176 > mean(tmp5,na.rm=TRUE) [1] 71.72271 > Sum(tmp5,na.rm=TRUE) [1] 14272.82 > Var(tmp5,na.rm=TRUE) [1] 865.6634 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.37761 69.45175 70.43970 69.30675 70.34215 70.67631 70.68040 71.18487 [9] 67.61860 68.08172 > rowSums(tmp5,na.rm=TRUE) [1] 1717.175 1389.035 1408.794 1386.135 1406.843 1413.526 1413.608 1423.697 [9] 1352.372 1361.634 > rowVars(tmp5,na.rm=TRUE) [1] 8366.15703 60.28430 71.83434 80.31560 63.19495 53.02999 [7] 102.49381 128.52186 78.89137 59.12254 > rowSd(tmp5,na.rm=TRUE) [1] 91.466699 7.764297 8.475514 8.961897 7.949525 7.282169 10.123923 [8] 11.336748 8.882081 7.689118 > rowMax(tmp5,na.rm=TRUE) [1] 466.04900 84.25827 85.29781 85.21447 85.25761 82.78014 86.24867 [8] 94.18836 82.37375 82.17939 > rowMin(tmp5,na.rm=TRUE) [1] 56.94545 56.59539 56.81354 57.39952 58.66036 55.81846 55.39084 56.44488 [9] 53.54176 57.43474 > > colMeans(tmp5,na.rm=TRUE) [1] 108.55595 69.47974 68.44711 73.14008 64.07718 63.99938 69.98812 [8] 73.58477 63.02268 66.96150 70.50272 72.35046 73.31937 70.23960 [15] 71.46380 71.88813 75.23702 69.44350 69.71454 68.81066 > colSums(tmp5,na.rm=TRUE) [1] 1085.5595 694.7974 684.4711 731.4008 640.7718 639.9938 699.8812 [8] 735.8477 630.2268 669.6150 705.0272 723.5046 733.1937 702.3960 [15] 714.6380 718.8813 752.3702 624.9915 697.1454 688.1066 > colVars(tmp5,na.rm=TRUE) [1] 15865.87506 60.93199 94.64495 124.73616 34.35929 22.71546 [7] 68.96438 71.46816 52.90223 37.90217 85.37469 41.25217 [13] 69.48383 71.34787 97.60710 47.64499 75.00603 123.46168 [19] 129.50980 67.94674 > colSd(tmp5,na.rm=TRUE) [1] 125.959815 7.805895 9.728563 11.168534 5.861680 4.766074 [7] 8.304479 8.453884 7.273392 6.156473 9.239843 6.422785 [13] 8.335696 8.446767 9.879631 6.902535 8.660602 11.111331 [19] 11.380237 8.242981 > colMax(tmp5,na.rm=TRUE) [1] 466.04900 85.82301 84.71604 94.18836 73.42463 69.70140 81.39202 [8] 85.25761 76.79704 73.77411 86.19661 79.05846 86.24867 81.55325 [15] 85.29781 81.48136 83.09424 85.21447 96.51093 81.74706 > colMin(tmp5,na.rm=TRUE) [1] 59.36582 58.74773 54.54024 58.53505 56.94545 56.44415 53.54176 58.75512 [9] 55.80332 56.79665 57.43474 61.41132 60.63353 57.87557 57.39952 59.83747 [17] 57.31357 55.39084 56.81354 55.81846 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] NaN 69.45175 70.43970 69.30675 70.34215 70.67631 70.68040 71.18487 [9] 67.61860 68.08172 > rowSums(tmp5,na.rm=TRUE) [1] 0.000 1389.035 1408.794 1386.135 1406.843 1413.526 1413.608 1423.697 [9] 1352.372 1361.634 > rowVars(tmp5,na.rm=TRUE) [1] NA 60.28430 71.83434 80.31560 63.19495 53.02999 102.49381 [8] 128.52186 78.89137 59.12254 > rowSd(tmp5,na.rm=TRUE) [1] NA 7.764297 8.475514 8.961897 7.949525 7.282169 10.123923 [8] 11.336748 8.882081 7.689118 > rowMax(tmp5,na.rm=TRUE) [1] NA 84.25827 85.29781 85.21447 85.25761 82.78014 86.24867 94.18836 [9] 82.37375 82.17939 > rowMin(tmp5,na.rm=TRUE) [1] NA 56.59539 56.81354 57.39952 58.66036 55.81846 55.39084 56.44488 [9] 53.54176 57.43474 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 68.83450 69.36780 68.46528 74.50945 64.86959 63.56966 70.44621 75.23251 [9] 63.09959 67.66268 70.37513 71.63344 72.30536 70.29687 72.51086 72.01501 [17] 75.94902 NaN 66.73716 67.74805 > colSums(tmp5,na.rm=TRUE) [1] 619.5105 624.3102 616.1875 670.5851 583.8264 572.1270 634.0159 677.0926 [9] 567.8963 608.9641 633.3762 644.7009 650.7482 632.6718 652.5977 648.1351 [17] 683.5412 0.0000 600.6345 609.7324 > colVars(tmp5,na.rm=TRUE) [1] 98.93228 68.40752 106.47185 119.23259 31.59010 23.47747 75.22406 [8] 49.85744 59.44847 37.10886 95.86341 40.62474 66.60190 80.22945 [15] 97.47435 53.41951 78.67864 NA 45.96980 63.73714 > colSd(tmp5,na.rm=TRUE) [1] 9.946471 8.270884 10.318520 10.919368 5.620507 4.845355 8.673180 [8] 7.060980 7.710284 6.091705 9.790986 6.373754 8.160999 8.957090 [15] 9.872910 7.308865 8.870098 NA 6.780103 7.983554 > colMax(tmp5,na.rm=TRUE) [1] 82.78014 85.82301 84.71604 94.18836 73.42463 69.70140 81.39202 85.25761 [9] 76.79704 73.77411 86.19661 79.05846 86.24867 81.55325 85.29781 81.48136 [17] 83.09424 -Inf 77.05934 81.74706 > colMin(tmp5,na.rm=TRUE) [1] 59.36582 58.74773 54.54024 58.53505 58.00317 56.44415 53.54176 62.21628 [9] 55.80332 56.79665 57.43474 61.41132 60.63353 57.87557 57.39952 59.83747 [17] 57.31357 Inf 56.81354 55.81846 > > > > > 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] 222.8505 145.1863 257.4591 306.3786 262.1404 149.6866 118.6181 220.9623 [9] 303.8351 178.7603 > apply(copymatrix,1,var,na.rm=TRUE) [1] 222.8505 145.1863 257.4591 306.3786 262.1404 149.6866 118.6181 220.9623 [9] 303.8351 178.7603 > > > > 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] 5.684342e-14 -1.136868e-13 0.000000e+00 2.273737e-13 -1.136868e-13 [6] 2.842171e-14 1.136868e-13 1.136868e-13 2.131628e-13 5.684342e-14 [11] -3.126388e-13 0.000000e+00 1.136868e-13 5.684342e-14 -2.842171e-14 [16] 0.000000e+00 5.684342e-14 1.421085e-14 8.526513e-14 -1.705303e-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) + } 3 9 4 19 3 2 3 18 10 10 8 17 6 13 4 9 10 5 9 18 5 3 10 12 7 15 4 5 5 13 3 16 4 17 4 20 9 3 4 2 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 1.799476 > Min(tmp) [1] -1.903485 > mean(tmp) [1] -0.06105925 > Sum(tmp) [1] -6.105925 > Var(tmp) [1] 0.9492404 > > rowMeans(tmp) [1] -0.06105925 > rowSums(tmp) [1] -6.105925 > rowVars(tmp) [1] 0.9492404 > rowSd(tmp) [1] 0.9742897 > rowMax(tmp) [1] 1.799476 > rowMin(tmp) [1] -1.903485 > > colMeans(tmp) [1] -0.662209703 -0.232672979 -1.654340429 0.136473723 -1.646669946 [6] -0.552404446 -0.859770624 -1.309148060 0.468008744 -1.903485357 [11] -0.798747335 -0.347410870 0.451902746 0.505124888 0.404127855 [16] -0.172256458 0.693262085 0.257491454 0.837981488 0.267929946 [21] 0.234539109 -1.682503668 -1.280995821 0.532329814 -0.106138067 [26] -0.247578062 -0.064061785 -1.333020452 1.243231535 -0.185595608 [31] 0.212884182 0.792731163 1.045873985 -1.794525152 -0.300793744 [36] -0.791608877 0.856946381 0.567659205 1.376910041 1.639245533 [41] -0.794056496 1.411095018 1.450085102 -1.551207411 0.411108278 [46] -0.411850163 -1.810021251 -0.441000298 0.281309438 -0.655234270 [51] 0.375109934 -1.266012629 -0.853425512 0.216185724 -0.546033045 [56] -0.876117417 -0.429030967 0.039009306 1.666072754 -0.745079669 [61] 0.505302474 -1.343764328 -1.096284968 1.751504205 1.741702777 [66] -0.525464767 1.258702841 -0.015749829 0.408665187 0.341724409 [71] 0.493071290 0.255886065 1.799475904 0.706601647 -1.267664237 [76] 0.060561341 -1.318544737 0.834444859 -0.945240289 0.824549613 [81] 0.734781135 -0.181181386 -0.248214386 -1.055432854 0.774313418 [86] -1.804843879 0.016364743 -0.611301529 0.380124798 0.003894397 [91] 1.702447188 0.358615373 -0.526006742 0.811310904 1.370025367 [96] -0.978090544 1.131661227 -1.415383392 -1.763821824 0.655710201 > colSums(tmp) [1] -0.662209703 -0.232672979 -1.654340429 0.136473723 -1.646669946 [6] -0.552404446 -0.859770624 -1.309148060 0.468008744 -1.903485357 [11] -0.798747335 -0.347410870 0.451902746 0.505124888 0.404127855 [16] -0.172256458 0.693262085 0.257491454 0.837981488 0.267929946 [21] 0.234539109 -1.682503668 -1.280995821 0.532329814 -0.106138067 [26] -0.247578062 -0.064061785 -1.333020452 1.243231535 -0.185595608 [31] 0.212884182 0.792731163 1.045873985 -1.794525152 -0.300793744 [36] -0.791608877 0.856946381 0.567659205 1.376910041 1.639245533 [41] -0.794056496 1.411095018 1.450085102 -1.551207411 0.411108278 [46] -0.411850163 -1.810021251 -0.441000298 0.281309438 -0.655234270 [51] 0.375109934 -1.266012629 -0.853425512 0.216185724 -0.546033045 [56] -0.876117417 -0.429030967 0.039009306 1.666072754 -0.745079669 [61] 0.505302474 -1.343764328 -1.096284968 1.751504205 1.741702777 [66] -0.525464767 1.258702841 -0.015749829 0.408665187 0.341724409 [71] 0.493071290 0.255886065 1.799475904 0.706601647 -1.267664237 [76] 0.060561341 -1.318544737 0.834444859 -0.945240289 0.824549613 [81] 0.734781135 -0.181181386 -0.248214386 -1.055432854 0.774313418 [86] -1.804843879 0.016364743 -0.611301529 0.380124798 0.003894397 [91] 1.702447188 0.358615373 -0.526006742 0.811310904 1.370025367 [96] -0.978090544 1.131661227 -1.415383392 -1.763821824 0.655710201 > 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.662209703 -0.232672979 -1.654340429 0.136473723 -1.646669946 [6] -0.552404446 -0.859770624 -1.309148060 0.468008744 -1.903485357 [11] -0.798747335 -0.347410870 0.451902746 0.505124888 0.404127855 [16] -0.172256458 0.693262085 0.257491454 0.837981488 0.267929946 [21] 0.234539109 -1.682503668 -1.280995821 0.532329814 -0.106138067 [26] -0.247578062 -0.064061785 -1.333020452 1.243231535 -0.185595608 [31] 0.212884182 0.792731163 1.045873985 -1.794525152 -0.300793744 [36] -0.791608877 0.856946381 0.567659205 1.376910041 1.639245533 [41] -0.794056496 1.411095018 1.450085102 -1.551207411 0.411108278 [46] -0.411850163 -1.810021251 -0.441000298 0.281309438 -0.655234270 [51] 0.375109934 -1.266012629 -0.853425512 0.216185724 -0.546033045 [56] -0.876117417 -0.429030967 0.039009306 1.666072754 -0.745079669 [61] 0.505302474 -1.343764328 -1.096284968 1.751504205 1.741702777 [66] -0.525464767 1.258702841 -0.015749829 0.408665187 0.341724409 [71] 0.493071290 0.255886065 1.799475904 0.706601647 -1.267664237 [76] 0.060561341 -1.318544737 0.834444859 -0.945240289 0.824549613 [81] 0.734781135 -0.181181386 -0.248214386 -1.055432854 0.774313418 [86] -1.804843879 0.016364743 -0.611301529 0.380124798 0.003894397 [91] 1.702447188 0.358615373 -0.526006742 0.811310904 1.370025367 [96] -0.978090544 1.131661227 -1.415383392 -1.763821824 0.655710201 > colMin(tmp) [1] -0.662209703 -0.232672979 -1.654340429 0.136473723 -1.646669946 [6] -0.552404446 -0.859770624 -1.309148060 0.468008744 -1.903485357 [11] -0.798747335 -0.347410870 0.451902746 0.505124888 0.404127855 [16] -0.172256458 0.693262085 0.257491454 0.837981488 0.267929946 [21] 0.234539109 -1.682503668 -1.280995821 0.532329814 -0.106138067 [26] -0.247578062 -0.064061785 -1.333020452 1.243231535 -0.185595608 [31] 0.212884182 0.792731163 1.045873985 -1.794525152 -0.300793744 [36] -0.791608877 0.856946381 0.567659205 1.376910041 1.639245533 [41] -0.794056496 1.411095018 1.450085102 -1.551207411 0.411108278 [46] -0.411850163 -1.810021251 -0.441000298 0.281309438 -0.655234270 [51] 0.375109934 -1.266012629 -0.853425512 0.216185724 -0.546033045 [56] -0.876117417 -0.429030967 0.039009306 1.666072754 -0.745079669 [61] 0.505302474 -1.343764328 -1.096284968 1.751504205 1.741702777 [66] -0.525464767 1.258702841 -0.015749829 0.408665187 0.341724409 [71] 0.493071290 0.255886065 1.799475904 0.706601647 -1.267664237 [76] 0.060561341 -1.318544737 0.834444859 -0.945240289 0.824549613 [81] 0.734781135 -0.181181386 -0.248214386 -1.055432854 0.774313418 [86] -1.804843879 0.016364743 -0.611301529 0.380124798 0.003894397 [91] 1.702447188 0.358615373 -0.526006742 0.811310904 1.370025367 [96] -0.978090544 1.131661227 -1.415383392 -1.763821824 0.655710201 > colMedians(tmp) [1] -0.662209703 -0.232672979 -1.654340429 0.136473723 -1.646669946 [6] -0.552404446 -0.859770624 -1.309148060 0.468008744 -1.903485357 [11] -0.798747335 -0.347410870 0.451902746 0.505124888 0.404127855 [16] -0.172256458 0.693262085 0.257491454 0.837981488 0.267929946 [21] 0.234539109 -1.682503668 -1.280995821 0.532329814 -0.106138067 [26] -0.247578062 -0.064061785 -1.333020452 1.243231535 -0.185595608 [31] 0.212884182 0.792731163 1.045873985 -1.794525152 -0.300793744 [36] -0.791608877 0.856946381 0.567659205 1.376910041 1.639245533 [41] -0.794056496 1.411095018 1.450085102 -1.551207411 0.411108278 [46] -0.411850163 -1.810021251 -0.441000298 0.281309438 -0.655234270 [51] 0.375109934 -1.266012629 -0.853425512 0.216185724 -0.546033045 [56] -0.876117417 -0.429030967 0.039009306 1.666072754 -0.745079669 [61] 0.505302474 -1.343764328 -1.096284968 1.751504205 1.741702777 [66] -0.525464767 1.258702841 -0.015749829 0.408665187 0.341724409 [71] 0.493071290 0.255886065 1.799475904 0.706601647 -1.267664237 [76] 0.060561341 -1.318544737 0.834444859 -0.945240289 0.824549613 [81] 0.734781135 -0.181181386 -0.248214386 -1.055432854 0.774313418 [86] -1.804843879 0.016364743 -0.611301529 0.380124798 0.003894397 [91] 1.702447188 0.358615373 -0.526006742 0.811310904 1.370025367 [96] -0.978090544 1.131661227 -1.415383392 -1.763821824 0.655710201 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.6622097 -0.232673 -1.65434 0.1364737 -1.64667 -0.5524044 -0.8597706 [2,] -0.6622097 -0.232673 -1.65434 0.1364737 -1.64667 -0.5524044 -0.8597706 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.309148 0.4680087 -1.903485 -0.7987473 -0.3474109 0.4519027 0.5051249 [2,] -1.309148 0.4680087 -1.903485 -0.7987473 -0.3474109 0.4519027 0.5051249 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.4041279 -0.1722565 0.6932621 0.2574915 0.8379815 0.2679299 0.2345391 [2,] 0.4041279 -0.1722565 0.6932621 0.2574915 0.8379815 0.2679299 0.2345391 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1.682504 -1.280996 0.5323298 -0.1061381 -0.2475781 -0.06406179 -1.33302 [2,] -1.682504 -1.280996 0.5323298 -0.1061381 -0.2475781 -0.06406179 -1.33302 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 1.243232 -0.1855956 0.2128842 0.7927312 1.045874 -1.794525 -0.3007937 [2,] 1.243232 -0.1855956 0.2128842 0.7927312 1.045874 -1.794525 -0.3007937 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.7916089 0.8569464 0.5676592 1.37691 1.639246 -0.7940565 1.411095 [2,] -0.7916089 0.8569464 0.5676592 1.37691 1.639246 -0.7940565 1.411095 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 1.450085 -1.551207 0.4111083 -0.4118502 -1.810021 -0.4410003 0.2813094 [2,] 1.450085 -1.551207 0.4111083 -0.4118502 -1.810021 -0.4410003 0.2813094 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -0.6552343 0.3751099 -1.266013 -0.8534255 0.2161857 -0.546033 -0.8761174 [2,] -0.6552343 0.3751099 -1.266013 -0.8534255 0.2161857 -0.546033 -0.8761174 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.429031 0.03900931 1.666073 -0.7450797 0.5053025 -1.343764 -1.096285 [2,] -0.429031 0.03900931 1.666073 -0.7450797 0.5053025 -1.343764 -1.096285 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 1.751504 1.741703 -0.5254648 1.258703 -0.01574983 0.4086652 0.3417244 [2,] 1.751504 1.741703 -0.5254648 1.258703 -0.01574983 0.4086652 0.3417244 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.4930713 0.2558861 1.799476 0.7066016 -1.267664 0.06056134 -1.318545 [2,] 0.4930713 0.2558861 1.799476 0.7066016 -1.267664 0.06056134 -1.318545 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.8344449 -0.9452403 0.8245496 0.7347811 -0.1811814 -0.2482144 -1.055433 [2,] 0.8344449 -0.9452403 0.8245496 0.7347811 -0.1811814 -0.2482144 -1.055433 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.7743134 -1.804844 0.01636474 -0.6113015 0.3801248 0.003894397 1.702447 [2,] 0.7743134 -1.804844 0.01636474 -0.6113015 0.3801248 0.003894397 1.702447 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.3586154 -0.5260067 0.8113109 1.370025 -0.9780905 1.131661 -1.415383 [2,] 0.3586154 -0.5260067 0.8113109 1.370025 -0.9780905 1.131661 -1.415383 [,99] [,100] [1,] -1.763822 0.6557102 [2,] -1.763822 0.6557102 > > > Max(tmp2) [1] 2.91181 > Min(tmp2) [1] -2.815247 > mean(tmp2) [1] -0.07947557 > Sum(tmp2) [1] -7.947557 > Var(tmp2) [1] 1.124687 > > rowMeans(tmp2) [1] -0.03008263 1.10259684 0.42577665 -1.19571508 -0.69396685 -0.13414561 [7] -0.23628767 -2.34648939 -0.97663863 -0.73578392 -0.91505706 0.50883084 [13] 0.13217349 -1.43538653 1.83642793 -1.12927622 -0.09807004 -2.21559845 [19] -0.28505204 -1.42682248 0.02736738 0.26606725 -0.05367233 0.08176950 [25] -0.89390394 -0.45676719 1.12275203 0.05456407 0.74134024 -2.27201737 [31] 0.42574478 -2.16764282 0.73102119 -0.56168445 0.68095219 0.19480194 [37] -1.13602888 0.26181614 1.06997640 -0.23220259 -1.01740562 -0.28259461 [43] 0.25060863 1.91028317 -0.08023639 -0.98391035 1.11239846 0.51497350 [49] 1.26818770 -1.13950980 -0.95681445 -0.14944914 0.18724172 -0.69945709 [55] -0.03760622 -0.44269237 0.25020892 -0.27613837 -0.36943440 -0.35388001 [61] 1.59973096 0.37300841 0.46921610 -0.64424642 -0.89810907 -0.44769479 [67] -0.69236315 0.97509524 2.55208832 0.24369580 1.12252683 1.11201882 [73] -0.88327327 -0.36656850 0.08566988 -0.21349881 -1.10016254 2.91181014 [79] 2.60139692 0.06210950 -2.81524718 1.03244458 0.11348375 0.82367555 [85] -1.11688628 2.48124795 -0.75221517 -0.06249028 -0.66269520 0.26744152 [91] -1.61363656 0.87389646 -0.04197523 -0.17481337 0.87466934 -0.66755927 [97] -0.90661921 0.45423961 -0.54360262 -1.11382586 > rowSums(tmp2) [1] -0.03008263 1.10259684 0.42577665 -1.19571508 -0.69396685 -0.13414561 [7] -0.23628767 -2.34648939 -0.97663863 -0.73578392 -0.91505706 0.50883084 [13] 0.13217349 -1.43538653 1.83642793 -1.12927622 -0.09807004 -2.21559845 [19] -0.28505204 -1.42682248 0.02736738 0.26606725 -0.05367233 0.08176950 [25] -0.89390394 -0.45676719 1.12275203 0.05456407 0.74134024 -2.27201737 [31] 0.42574478 -2.16764282 0.73102119 -0.56168445 0.68095219 0.19480194 [37] -1.13602888 0.26181614 1.06997640 -0.23220259 -1.01740562 -0.28259461 [43] 0.25060863 1.91028317 -0.08023639 -0.98391035 1.11239846 0.51497350 [49] 1.26818770 -1.13950980 -0.95681445 -0.14944914 0.18724172 -0.69945709 [55] -0.03760622 -0.44269237 0.25020892 -0.27613837 -0.36943440 -0.35388001 [61] 1.59973096 0.37300841 0.46921610 -0.64424642 -0.89810907 -0.44769479 [67] -0.69236315 0.97509524 2.55208832 0.24369580 1.12252683 1.11201882 [73] -0.88327327 -0.36656850 0.08566988 -0.21349881 -1.10016254 2.91181014 [79] 2.60139692 0.06210950 -2.81524718 1.03244458 0.11348375 0.82367555 [85] -1.11688628 2.48124795 -0.75221517 -0.06249028 -0.66269520 0.26744152 [91] -1.61363656 0.87389646 -0.04197523 -0.17481337 0.87466934 -0.66755927 [97] -0.90661921 0.45423961 -0.54360262 -1.11382586 > 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.03008263 1.10259684 0.42577665 -1.19571508 -0.69396685 -0.13414561 [7] -0.23628767 -2.34648939 -0.97663863 -0.73578392 -0.91505706 0.50883084 [13] 0.13217349 -1.43538653 1.83642793 -1.12927622 -0.09807004 -2.21559845 [19] -0.28505204 -1.42682248 0.02736738 0.26606725 -0.05367233 0.08176950 [25] -0.89390394 -0.45676719 1.12275203 0.05456407 0.74134024 -2.27201737 [31] 0.42574478 -2.16764282 0.73102119 -0.56168445 0.68095219 0.19480194 [37] -1.13602888 0.26181614 1.06997640 -0.23220259 -1.01740562 -0.28259461 [43] 0.25060863 1.91028317 -0.08023639 -0.98391035 1.11239846 0.51497350 [49] 1.26818770 -1.13950980 -0.95681445 -0.14944914 0.18724172 -0.69945709 [55] -0.03760622 -0.44269237 0.25020892 -0.27613837 -0.36943440 -0.35388001 [61] 1.59973096 0.37300841 0.46921610 -0.64424642 -0.89810907 -0.44769479 [67] -0.69236315 0.97509524 2.55208832 0.24369580 1.12252683 1.11201882 [73] -0.88327327 -0.36656850 0.08566988 -0.21349881 -1.10016254 2.91181014 [79] 2.60139692 0.06210950 -2.81524718 1.03244458 0.11348375 0.82367555 [85] -1.11688628 2.48124795 -0.75221517 -0.06249028 -0.66269520 0.26744152 [91] -1.61363656 0.87389646 -0.04197523 -0.17481337 0.87466934 -0.66755927 [97] -0.90661921 0.45423961 -0.54360262 -1.11382586 > rowMin(tmp2) [1] -0.03008263 1.10259684 0.42577665 -1.19571508 -0.69396685 -0.13414561 [7] -0.23628767 -2.34648939 -0.97663863 -0.73578392 -0.91505706 0.50883084 [13] 0.13217349 -1.43538653 1.83642793 -1.12927622 -0.09807004 -2.21559845 [19] -0.28505204 -1.42682248 0.02736738 0.26606725 -0.05367233 0.08176950 [25] -0.89390394 -0.45676719 1.12275203 0.05456407 0.74134024 -2.27201737 [31] 0.42574478 -2.16764282 0.73102119 -0.56168445 0.68095219 0.19480194 [37] -1.13602888 0.26181614 1.06997640 -0.23220259 -1.01740562 -0.28259461 [43] 0.25060863 1.91028317 -0.08023639 -0.98391035 1.11239846 0.51497350 [49] 1.26818770 -1.13950980 -0.95681445 -0.14944914 0.18724172 -0.69945709 [55] -0.03760622 -0.44269237 0.25020892 -0.27613837 -0.36943440 -0.35388001 [61] 1.59973096 0.37300841 0.46921610 -0.64424642 -0.89810907 -0.44769479 [67] -0.69236315 0.97509524 2.55208832 0.24369580 1.12252683 1.11201882 [73] -0.88327327 -0.36656850 0.08566988 -0.21349881 -1.10016254 2.91181014 [79] 2.60139692 0.06210950 -2.81524718 1.03244458 0.11348375 0.82367555 [85] -1.11688628 2.48124795 -0.75221517 -0.06249028 -0.66269520 0.26744152 [91] -1.61363656 0.87389646 -0.04197523 -0.17481337 0.87466934 -0.66755927 [97] -0.90661921 0.45423961 -0.54360262 -1.11382586 > > colMeans(tmp2) [1] -0.07947557 > colSums(tmp2) [1] -7.947557 > colVars(tmp2) [1] 1.124687 > colSd(tmp2) [1] 1.060513 > colMax(tmp2) [1] 2.91181 > colMin(tmp2) [1] -2.815247 > colMedians(tmp2) [1] -0.08915322 > colRanges(tmp2) [,1] [1,] -2.815247 [2,] 2.911810 > > 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] 5.5466229 1.1370084 0.6780858 4.4115986 1.6742698 2.0262928 [7] -6.1672681 -3.6211220 2.6015055 3.4700530 > colApply(tmp,quantile)[,1] [,1] [1,] -1.6121199 [2,] 0.2080457 [3,] 0.5820249 [4,] 1.2441631 [5,] 1.7794994 > > rowApply(tmp,sum) [1] -3.47656870 6.85900925 1.13171097 8.65997220 0.06849531 2.42857362 [7] -0.84873476 1.73021115 0.50424968 -5.29987189 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 7 4 8 7 10 10 8 1 7 8 [2,] 3 9 4 5 8 7 7 2 6 1 [3,] 2 1 2 8 4 2 9 10 3 10 [4,] 9 7 10 9 5 3 2 9 5 2 [5,] 4 3 5 10 9 9 3 4 2 5 [6,] 8 5 1 6 7 8 5 8 1 7 [7,] 1 2 7 2 1 6 1 6 9 4 [8,] 6 10 3 1 2 5 4 7 8 3 [9,] 5 6 6 4 6 4 6 3 10 6 [10,] 10 8 9 3 3 1 10 5 4 9 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.80810360 0.96056666 -1.94461421 -0.82192939 0.18255704 1.21229222 [7] 1.43463368 6.31550147 3.35190812 -1.91189797 3.14031977 0.52883773 [13] -1.13373609 -2.23183358 -0.06648039 -0.93191251 -2.38656154 -2.05402953 [19] -0.46383599 -3.76912876 > colApply(tmp,quantile)[,1] [,1] [1,] -2.0588929 [2,] -1.5329606 [3,] -0.3631897 [4,] 0.5736904 [5,] 2.5732492 > > rowApply(tmp,sum) [1] -4.036248 3.453182 1.057659 1.428039 -3.300078 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 8 2 20 2 17 [2,] 18 18 8 5 12 [3,] 11 15 2 9 1 [4,] 10 10 1 15 18 [5,] 13 11 5 13 11 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.3631897 0.77913528 -0.2426398 -0.31748230 0.17952722 0.8134994 [2,] -1.5329606 1.30328830 1.0965519 0.04539065 0.45833766 -1.9341978 [3,] 2.5732492 -0.48462641 -1.5714665 -1.97685084 -0.68146832 -0.4922303 [4,] -2.0588929 -0.71737493 0.2434728 0.73613143 0.32207472 1.2899115 [5,] 0.5736904 0.08014443 -1.4705326 0.69088168 -0.09591424 1.5353094 [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.2467373 0.4936393 0.3948861 -1.4480154 0.6455758 1.9975044 -0.7104038 [2,] -0.3029821 1.4718345 1.1036417 0.6320793 1.2007716 -0.2774736 -1.1317516 [3,] 1.5871263 1.1301977 0.8166495 0.8168771 -0.6339429 -0.2719758 0.9189849 [4,] 0.7121738 3.1134672 0.8855966 -0.6285332 1.5093259 0.2535031 0.2709682 [5,] -0.8084217 0.1063627 0.1511343 -1.2843057 0.4185894 -1.1727205 -0.4815338 [,14] [,15] [,16] [,17] [,18] [,19] [1,] -1.2744813 -0.3620862 -1.0037947489 -1.77645413 -0.9090276 -0.11960844 [2,] 1.0208656 1.3767700 -0.0005195733 -1.39703720 -0.3334426 -0.02516289 [3,] 0.3819785 -1.1040077 1.2506591402 0.01828247 -0.9555029 -0.08252097 [4,] -1.5966354 -0.8922126 -0.4049858325 1.39970499 -0.2349530 0.26026930 [5,] -0.7635611 0.9150562 -0.7732714975 -0.63105767 0.3788965 -0.49681299 [,20] [1,] -1.0595697 [2,] 0.6791790 [3,] -0.1817537 [4,] -3.0349728 [5,] -0.1720116 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 649 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 562 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 0.5188595 -1.232727 0.6257678 1.817565 -1.202058 0.3165668 -0.7395753 col8 col9 col10 col11 col12 col13 col14 row1 0.5530774 -0.2005672 0.5898193 -0.214712 -1.566747 2.128848 0.5292314 col15 col16 col17 col18 col19 col20 row1 0.3272902 0.7643034 -0.6922704 -0.02825685 1.958897 -1.126719 > tmp[,"col10"] col10 row1 0.5898193 row2 -0.1926239 row3 -0.9828166 row4 0.5662580 row5 -0.1597212 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 0.5188595 -1.232727 0.6257678 1.8175654 -1.202058 0.3165668 -0.7395753 row5 -0.3162196 1.504392 -0.7803893 0.4261889 1.207574 0.7703898 -1.3354422 col8 col9 col10 col11 col12 col13 row1 0.5530774 -0.2005672 0.5898193 -0.2147120 -1.56674659 2.128848 row5 -0.9018742 -0.6170160 -0.1597212 0.8106872 0.07818222 -0.428363 col14 col15 col16 col17 col18 col19 row1 0.52923145 0.3272902 0.7643034 -0.6922704 -0.02825685 1.9588970 row5 -0.02430885 0.1102894 0.1991564 2.3555080 -1.04669358 -0.5198104 col20 row1 -1.1267189 row5 -0.7617483 > tmp[,c("col6","col20")] col6 col20 row1 0.3165668 -1.1267189 row2 -1.1944900 0.1484385 row3 -0.2882329 -1.5732087 row4 0.8653789 -0.4226181 row5 0.7703898 -0.7617483 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.3165668 -1.1267189 row5 0.7703898 -0.7617483 > > > > > 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 51.32789 50.68625 50.63923 49.86496 49.52794 104.2524 50.48088 50.02386 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.29281 48.94447 49.69855 50.79101 49.53792 48.5865 50.06973 50.43551 col17 col18 col19 col20 row1 50.61356 52.53623 49.83828 103.3021 > tmp[,"col10"] col10 row1 48.94447 row2 28.80527 row3 29.39522 row4 30.20442 row5 50.90837 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.32789 50.68625 50.63923 49.86496 49.52794 104.2524 50.48088 50.02386 row5 49.41925 48.99940 51.74570 49.79162 49.92358 105.2149 49.40652 49.39362 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.29281 48.94447 49.69855 50.79101 49.53792 48.58650 50.06973 50.43551 row5 48.96644 50.90837 49.88112 51.24998 50.29737 50.23122 49.41956 51.36534 col17 col18 col19 col20 row1 50.61356 52.53623 49.83828 103.3021 row5 50.91066 49.20853 49.60758 104.4203 > tmp[,c("col6","col20")] col6 col20 row1 104.25242 103.30207 row2 75.27459 74.31214 row3 76.72645 75.42350 row4 73.88728 72.95419 row5 105.21487 104.42034 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.2524 103.3021 row5 105.2149 104.4203 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.2524 103.3021 row5 105.2149 104.4203 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 1.7343059 [2,] -0.1175643 [3,] -0.6296149 [4,] -0.3868774 [5,] 1.0414967 > tmp[,c("col17","col7")] col17 col7 [1,] 1.0551682 -0.36808036 [2,] -1.1970201 0.18669867 [3,] 1.2831779 2.72403112 [4,] -0.2287294 0.75423878 [5,] -1.8299791 0.03536581 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.75613514 0.3813641 [2,] 0.08463772 2.0980623 [3,] 0.84181637 -0.4200117 [4,] 1.03064003 0.3458816 [5,] 0.18448249 -0.3047817 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.7561351 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.75613514 [2,] 0.08463772 > > > > 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.08690826 0.7234287 0.7579068 -0.5038913 1.675204 1.9035527 0.8866067 row1 0.97730232 -0.7308569 -1.4825709 -0.8276002 -1.159916 0.1524169 -2.5196827 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 -1.562882 1.30420196 0.5100465 -0.7729264 -0.53478374 1.3759129 0.6377113 row1 -1.545540 0.03679966 -0.9219221 -0.5236371 -0.03465327 0.6778151 1.2271131 [,15] [,16] [,17] [,18] [,19] [,20] row3 0.35784058 -0.98653610 -0.27363528 -0.1313602 -0.1320311 -0.2972534 row1 -0.09513542 -0.03384559 -0.09239849 -0.8435800 0.4877619 1.2396408 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.6569575 -1.186593 -1.088937 0.05732334 0.9047182 0.6810695 0.04242563 [,8] [,9] [,10] row2 -1.126114 0.6642672 -0.4309565 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.245879 -0.4338672 -0.2791935 -0.9499476 0.517149 0.6345234 1.141094 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.549513 0.7644368 1.269362 0.976527 -0.6813235 -0.4764313 1.272764 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.5419792 0.1797683 -0.8627815 -0.09948667 0.2475852 -0.6108475 > > > 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: 0x600002f18000> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb1561c10ed" [2] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb14c9b63c5" [3] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb16db341cd" [4] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb113a531ff" [5] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb14275666c" [6] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb129975e8a" [7] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb110bfcb5b" [8] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb11fbfcbf4" [9] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb168e71074" [10] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb119e9657a" [11] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb12a0539e0" [12] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb13d1ab6ad" [13] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb124cf3732" [14] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb12030c67f" [15] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb16237cc5b" > > > ### 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: 0x600002f0c1e0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600002f0c1e0> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600002f0c1e0> > rowMedians(tmp) [1] 0.466330525 -0.039913084 0.448656568 0.177717900 0.191257123 [6] -0.334402539 0.036152879 -0.475220661 0.005952281 0.096171920 [11] -0.033658484 -0.353201204 -0.193675250 0.214921597 0.454393136 [16] 0.366601288 0.167392862 0.258732957 -0.006171213 0.763216985 [21] 0.132379527 0.407821235 0.643958659 0.498124090 -0.052524173 [26] -0.245515288 -0.045144214 -0.155529244 0.234066888 0.528928638 [31] -0.318301160 -0.183391307 -0.322565194 0.013674889 0.232015641 [36] 0.018884755 0.141362998 0.403746268 0.049955204 0.202295716 [41] 0.194034670 0.071684526 -0.083659655 -0.005762049 -0.004694837 [46] -0.031145734 0.140664997 -0.283965026 0.258278841 0.074297873 [51] -0.147346184 -0.148893530 -0.206287367 0.881414878 -0.445363738 [56] -0.091122484 -0.600080670 0.038250528 0.136171949 -0.038779427 [61] -0.227278134 0.935473263 0.136010347 -0.205293050 0.131498707 [66] 0.104560502 -0.027248824 -0.034553693 -0.333687879 -0.589163558 [71] 0.386237528 -0.161291666 0.116181198 -0.167303025 -0.302630240 [76] 0.079486910 -0.091235031 -0.414042397 -0.011230110 -0.004920209 [81] -0.080742373 -0.248117241 0.463399845 0.201486384 0.641297290 [86] -0.166715705 0.029697323 -0.081706698 0.197141520 -0.430613232 [91] -0.155518642 0.229777268 -0.053518757 0.174291905 -0.590713201 [96] 0.567705602 -0.512017633 0.322249725 0.423240590 0.350016789 [101] -0.093434326 0.574157594 0.097604420 -0.181576188 -0.097559378 [106] 0.649990683 0.043515728 -0.129158372 0.269321488 -0.170416753 [111] -0.417170439 0.949194975 -0.330332467 0.333276087 -0.434680338 [116] 0.440061786 0.593092099 0.089002658 -0.157139837 -0.068996089 [121] 0.209612081 -0.381064301 0.122420727 -0.100220376 0.469521496 [126] -0.118565327 -0.174239761 0.300981652 -0.379420356 0.456043639 [131] -0.039843361 -0.196873753 0.483101009 0.411576566 -0.186016049 [136] 0.440317913 0.136225756 -0.489681595 -0.199333470 0.588508090 [141] -0.319693164 0.183723151 -0.058867735 0.094843300 0.102578054 [146] -0.056382364 0.164149221 -0.522921146 -0.316470886 -0.103727735 [151] 0.611803736 -0.102841024 -0.522110111 0.578065196 0.281223980 [156] -0.119833559 -0.361188042 0.048452411 -0.498933784 0.416100076 [161] -0.354359215 -0.456099195 0.320944133 0.313944364 0.586650341 [166] 0.326610802 0.284034644 -0.026820357 0.321332745 0.079758765 [171] -0.170449173 -0.105301875 0.370827985 0.089059848 0.169563330 [176] -0.309644686 0.119528255 0.653864648 0.065861735 -0.338406632 [181] 0.304117021 0.185452417 0.228120980 -0.130569414 0.176198770 [186] 0.474202633 0.293344902 0.302763667 0.159775781 -0.013228307 [191] -0.119358268 -0.767502313 -0.267102775 -0.200479723 0.562968881 [196] 0.444346469 0.287537573 -0.060231941 -0.126137844 -0.037395417 [201] -0.092834959 -0.386269908 -0.219470692 -0.103297737 -0.127008314 [206] 0.625960963 0.798923760 -0.618040943 0.095495293 0.003980665 [211] -0.240759848 0.074868913 0.396313482 0.193488087 -0.012636533 [216] 0.331159918 -0.040916973 0.052534674 -0.144505035 -0.243717520 [221] -0.640053172 0.048315914 -0.064545728 0.010843534 -0.163673218 [226] -0.095302477 0.330399285 -0.493327108 0.167433083 0.065563065 > > proc.time() user system elapsed 5.233 18.924 31.181
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.1 (2024-06-14) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 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: 0x600001ec8000> > .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: 0x600001ec8000> > .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: 0x600001ec8000> > .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: 0x600001ec8000> > 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: 0x600001ecc000> > .Call("R_bm_AddColumn",P) <pointer: 0x600001ecc000> > .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: 0x600001ecc000> > .Call("R_bm_AddColumn",P) <pointer: 0x600001ecc000> > .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: 0x600001ecc000> > 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: 0x600001ecc180> > .Call("R_bm_AddColumn",P) <pointer: 0x600001ecc180> > .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: 0x600001ecc180> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600001ecc180> > .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: 0x600001ecc180> > > .Call("R_bm_RowMode",P) <pointer: 0x600001ecc180> > .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: 0x600001ecc180> > > .Call("R_bm_ColMode",P) <pointer: 0x600001ecc180> > .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: 0x600001ecc180> > 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: 0x600001ef01e0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600001ef01e0> > .Call("R_bm_AddColumn",P) <pointer: 0x600001ef01e0> > .Call("R_bm_AddColumn",P) <pointer: 0x600001ef01e0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFiled85e36efaf45" "BufferedMatrixFiled85e59bbc6a9" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFiled85e36efaf45" "BufferedMatrixFiled85e59bbc6a9" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600001ee44e0> > .Call("R_bm_AddColumn",P) <pointer: 0x600001ee44e0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600001ee44e0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600001ee44e0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600001ee44e0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600001ee44e0> > .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: 0x600001ed4000> > .Call("R_bm_AddColumn",P) <pointer: 0x600001ed4000> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600001ed4000> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600001ed4000> > 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: 0x600001ed4180> > .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: 0x600001ed4180> > rm(P) > > proc.time() user system elapsed 0.615 0.228 0.904
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.1 (2024-06-14) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 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.602 0.141 0.745