Back to Multiple platform build/check report for BioC 3.19: simplified long |
|
This page was generated on 2024-06-25 17:41 -0400 (Tue, 25 Jun 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.4.0 (2024-04-24) -- "Puppy Cup" | 4760 |
palomino3 | Windows Server 2022 Datacenter | x64 | 4.4.0 (2024-04-24 ucrt) -- "Puppy Cup" | 4494 |
merida1 | macOS 12.7.4 Monterey | x86_64 | 4.4.0 (2024-04-24) -- "Puppy Cup" | 4508 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.0 (2024-04-24) -- "Puppy Cup" | 4466 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 249/2300 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.68.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino3 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.7.4 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-06-24 01:22:58 -0400 (Mon, 24 Jun 2024) |
EndedAt: 2024-06-24 01:24:20 -0400 (Mon, 24 Jun 2024) |
EllapsedTime: 81.6 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.0 (2024-04-24) * 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.4 * 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.0 (2024-04-24) -- "Puppy Cup" 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.606 0.210 0.852
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.0 (2024-04-24) -- "Puppy Cup" 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 474174 25.4 1035481 55.4 NA 638602 34.2 Vcells 877658 6.7 8388608 64.0 65536 2072388 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] "Mon Jun 24 01:23:39 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 Jun 24 01:23:40 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: 0x600002908000> > > > > 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 Jun 24 01:23:46 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 Jun 24 01:23:49 2024" > > ColMode(tmp2) <pointer: 0x600002908000> > > > > ### 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.54967194 2.2715398 -0.01603554 0.1406134 [2,] 0.93819331 -0.6916428 1.11847176 0.3903195 [3,] -0.20750383 0.1552068 -0.62554064 -0.3030125 [4,] 0.05839196 -0.7526207 0.98676446 0.9961975 > 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 : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.54967194 2.2715398 0.01603554 0.1406134 [2,] 0.93819331 0.6916428 1.11847176 0.3903195 [3,] 0.20750383 0.1552068 0.62554064 0.3030125 [4,] 0.05839196 0.7526207 0.98676446 0.9961975 > 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 : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 10.0274459 1.5071628 0.1266315 0.3749845 [2,] 0.9686038 0.8316506 1.0575783 0.6247555 [3,] 0.4555259 0.3939629 0.7909113 0.5504657 [4,] 0.2416443 0.8675371 0.9933602 0.9980969 > > 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 : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 225.82413 42.34317 26.28235 28.89046 [2,] 35.62423 34.00815 36.69425 31.63787 [3,] 29.76276 29.09484 33.53465 30.80767 [4,] 27.47483 34.42799 35.92037 35.97717 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x6000029200c0> > exp(tmp5) <pointer: 0x6000029200c0> > log(tmp5,2) <pointer: 0x6000029200c0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 470.0233 > Min(tmp5) [1] 53.37169 > mean(tmp5) [1] 71.90215 > Sum(tmp5) [1] 14380.43 > Var(tmp5) [1] 865.4998 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.39265 70.60973 66.86007 70.41418 73.26293 71.78258 70.66726 66.73764 [9] 68.22195 70.07248 > rowSums(tmp5) [1] 1807.853 1412.195 1337.201 1408.284 1465.259 1435.652 1413.345 1334.753 [9] 1364.439 1401.450 > rowVars(tmp5) [1] 8061.31020 61.97742 56.23216 63.15799 64.95350 74.19044 [7] 46.41531 31.70133 82.02675 82.83815 > rowSd(tmp5) [1] 89.784799 7.872574 7.498810 7.947200 8.059373 8.613387 6.812878 [8] 5.630393 9.056862 9.101547 > rowMax(tmp5) [1] 470.02334 92.46871 81.53038 85.14613 86.27475 91.02631 82.00446 [8] 80.02085 91.67945 90.10460 > rowMin(tmp5) [1] 54.03221 57.80047 54.98572 56.87545 55.87313 60.07738 54.88360 57.46641 [9] 53.37169 53.55279 > > colMeans(tmp5) [1] 110.00069 70.70175 72.84730 69.40024 68.31915 66.85966 72.84258 [8] 70.41086 77.70961 65.59767 70.00327 70.75380 69.56256 69.21653 [15] 72.91502 71.49083 66.25760 66.97649 65.50777 70.66954 > colSums(tmp5) [1] 1100.0069 707.0175 728.4730 694.0024 683.1915 668.5966 728.4258 [8] 704.1086 777.0961 655.9767 700.0327 707.5380 695.6256 692.1653 [15] 729.1502 714.9083 662.5760 669.7649 655.0777 706.6954 > colVars(tmp5) [1] 16060.38232 84.78682 131.18071 42.47171 142.39759 70.34756 [7] 68.13810 24.11290 53.23276 51.38776 106.82931 52.49261 [13] 37.66651 73.29027 34.84762 49.05835 64.53909 20.02793 [19] 32.82804 56.83943 > colSd(tmp5) [1] 126.729564 9.207976 11.453415 6.517032 11.933046 8.387345 [7] 8.254581 4.910489 7.296079 7.168526 10.335827 7.245178 [13] 6.137305 8.560973 5.903187 7.004167 8.033622 4.475258 [19] 5.729576 7.539193 > colMax(tmp5) [1] 470.02334 88.13176 91.67945 77.09313 92.46871 82.38100 90.10460 [8] 77.24722 90.85925 81.42317 91.02631 78.65634 79.03342 83.80376 [15] 81.53038 82.96656 80.02085 75.82024 74.42329 82.17032 > colMin(tmp5) [1] 57.18527 57.54464 54.70327 59.94269 53.37169 54.88360 63.13793 62.90476 [9] 65.16465 56.92885 54.03221 56.93259 60.07738 53.55279 62.13757 57.46641 [17] 54.98572 61.05524 55.87313 57.96521 > > > ### 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] 90.39265 NA 66.86007 70.41418 73.26293 71.78258 70.66726 66.73764 [9] 68.22195 70.07248 > rowSums(tmp5) [1] 1807.853 NA 1337.201 1408.284 1465.259 1435.652 1413.345 1334.753 [9] 1364.439 1401.450 > rowVars(tmp5) [1] 8061.31020 64.05492 56.23216 63.15799 64.95350 74.19044 [7] 46.41531 31.70133 82.02675 82.83815 > rowSd(tmp5) [1] 89.784799 8.003432 7.498810 7.947200 8.059373 8.613387 6.812878 [8] 5.630393 9.056862 9.101547 > rowMax(tmp5) [1] 470.02334 NA 81.53038 85.14613 86.27475 91.02631 82.00446 [8] 80.02085 91.67945 90.10460 > rowMin(tmp5) [1] 54.03221 NA 54.98572 56.87545 55.87313 60.07738 54.88360 57.46641 [9] 53.37169 53.55279 > > colMeans(tmp5) [1] 110.00069 70.70175 72.84730 69.40024 68.31915 66.85966 72.84258 [8] 70.41086 NA 65.59767 70.00327 70.75380 69.56256 69.21653 [15] 72.91502 71.49083 66.25760 66.97649 65.50777 70.66954 > colSums(tmp5) [1] 1100.0069 707.0175 728.4730 694.0024 683.1915 668.5966 728.4258 [8] 704.1086 NA 655.9767 700.0327 707.5380 695.6256 692.1653 [15] 729.1502 714.9083 662.5760 669.7649 655.0777 706.6954 > colVars(tmp5) [1] 16060.38232 84.78682 131.18071 42.47171 142.39759 70.34756 [7] 68.13810 24.11290 NA 51.38776 106.82931 52.49261 [13] 37.66651 73.29027 34.84762 49.05835 64.53909 20.02793 [19] 32.82804 56.83943 > colSd(tmp5) [1] 126.729564 9.207976 11.453415 6.517032 11.933046 8.387345 [7] 8.254581 4.910489 NA 7.168526 10.335827 7.245178 [13] 6.137305 8.560973 5.903187 7.004167 8.033622 4.475258 [19] 5.729576 7.539193 > colMax(tmp5) [1] 470.02334 88.13176 91.67945 77.09313 92.46871 82.38100 90.10460 [8] 77.24722 NA 81.42317 91.02631 78.65634 79.03342 83.80376 [15] 81.53038 82.96656 80.02085 75.82024 74.42329 82.17032 > colMin(tmp5) [1] 57.18527 57.54464 54.70327 59.94269 53.37169 54.88360 63.13793 62.90476 [9] NA 56.92885 54.03221 56.93259 60.07738 53.55279 62.13757 57.46641 [17] 54.98572 61.05524 55.87313 57.96521 > > Max(tmp5,na.rm=TRUE) [1] 470.0233 > Min(tmp5,na.rm=TRUE) [1] 53.37169 > mean(tmp5,na.rm=TRUE) [1] 71.88436 > Sum(tmp5,na.rm=TRUE) [1] 14304.99 > Var(tmp5,na.rm=TRUE) [1] 869.8074 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.39265 70.35539 66.86007 70.41418 73.26293 71.78258 70.66726 66.73764 [9] 68.22195 70.07248 > rowSums(tmp5,na.rm=TRUE) [1] 1807.853 1336.752 1337.201 1408.284 1465.259 1435.652 1413.345 1334.753 [9] 1364.439 1401.450 > rowVars(tmp5,na.rm=TRUE) [1] 8061.31020 64.05492 56.23216 63.15799 64.95350 74.19044 [7] 46.41531 31.70133 82.02675 82.83815 > rowSd(tmp5,na.rm=TRUE) [1] 89.784799 8.003432 7.498810 7.947200 8.059373 8.613387 6.812878 [8] 5.630393 9.056862 9.101547 > rowMax(tmp5,na.rm=TRUE) [1] 470.02334 92.46871 81.53038 85.14613 86.27475 91.02631 82.00446 [8] 80.02085 91.67945 90.10460 > rowMin(tmp5,na.rm=TRUE) [1] 54.03221 57.80047 54.98572 56.87545 55.87313 60.07738 54.88360 57.46641 [9] 53.37169 53.55279 > > colMeans(tmp5,na.rm=TRUE) [1] 110.00069 70.70175 72.84730 69.40024 68.31915 66.85966 72.84258 [8] 70.41086 77.96154 65.59767 70.00327 70.75380 69.56256 69.21653 [15] 72.91502 71.49083 66.25760 66.97649 65.50777 70.66954 > colSums(tmp5,na.rm=TRUE) [1] 1100.0069 707.0175 728.4730 694.0024 683.1915 668.5966 728.4258 [8] 704.1086 701.6538 655.9767 700.0327 707.5380 695.6256 692.1653 [15] 729.1502 714.9083 662.5760 669.7649 655.0777 706.6954 > colVars(tmp5,na.rm=TRUE) [1] 16060.38232 84.78682 131.18071 42.47171 142.39759 70.34756 [7] 68.13810 24.11290 59.17285 51.38776 106.82931 52.49261 [13] 37.66651 73.29027 34.84762 49.05835 64.53909 20.02793 [19] 32.82804 56.83943 > colSd(tmp5,na.rm=TRUE) [1] 126.729564 9.207976 11.453415 6.517032 11.933046 8.387345 [7] 8.254581 4.910489 7.692389 7.168526 10.335827 7.245178 [13] 6.137305 8.560973 5.903187 7.004167 8.033622 4.475258 [19] 5.729576 7.539193 > colMax(tmp5,na.rm=TRUE) [1] 470.02334 88.13176 91.67945 77.09313 92.46871 82.38100 90.10460 [8] 77.24722 90.85925 81.42317 91.02631 78.65634 79.03342 83.80376 [15] 81.53038 82.96656 80.02085 75.82024 74.42329 82.17032 > colMin(tmp5,na.rm=TRUE) [1] 57.18527 57.54464 54.70327 59.94269 53.37169 54.88360 63.13793 62.90476 [9] 65.16465 56.92885 54.03221 56.93259 60.07738 53.55279 62.13757 57.46641 [17] 54.98572 61.05524 55.87313 57.96521 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.39265 NaN 66.86007 70.41418 73.26293 71.78258 70.66726 66.73764 [9] 68.22195 70.07248 > rowSums(tmp5,na.rm=TRUE) [1] 1807.853 0.000 1337.201 1408.284 1465.259 1435.652 1413.345 1334.753 [9] 1364.439 1401.450 > rowVars(tmp5,na.rm=TRUE) [1] 8061.31020 NA 56.23216 63.15799 64.95350 74.19044 [7] 46.41531 31.70133 82.02675 82.83815 > rowSd(tmp5,na.rm=TRUE) [1] 89.784799 NA 7.498810 7.947200 8.059373 8.613387 6.812878 [8] 5.630393 9.056862 9.101547 > rowMax(tmp5,na.rm=TRUE) [1] 470.02334 NA 81.53038 85.14613 86.27475 91.02631 82.00446 [8] 80.02085 91.67945 90.10460 > rowMin(tmp5,na.rm=TRUE) [1] 54.03221 NA 54.98572 56.87545 55.87313 60.07738 54.88360 57.46641 [9] 53.37169 53.55279 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 113.98442 70.69267 72.45542 69.79470 65.63586 67.86623 72.52628 [8] 70.36739 NaN 66.00477 69.52984 70.90593 69.71477 69.55423 [15] 74.11251 70.21575 65.94603 67.02284 65.77873 70.84504 > colSums(tmp5,na.rm=TRUE) [1] 1025.8597 636.2340 652.0988 628.1523 590.7228 610.7961 652.7366 [8] 633.3065 0.0000 594.0429 625.7685 638.1534 627.4330 625.9881 [15] 667.0126 631.9417 593.5143 603.2056 592.0086 637.6054 > colVars(tmp5,na.rm=TRUE) [1] 17889.39192 95.38425 145.85058 46.03018 79.19709 67.74254 [7] 75.52990 27.10575 NA 55.94677 117.66139 58.79383 [13] 42.11419 81.16856 23.07116 36.90004 71.51437 22.50725 [19] 36.10556 63.59783 > colSd(tmp5,na.rm=TRUE) [1] 133.751231 9.766486 12.076861 6.784555 8.899275 8.230586 [7] 8.690794 5.206318 NA 7.479757 10.847184 7.667713 [13] 6.489544 9.009360 4.803245 6.074541 8.456617 4.744181 [19] 6.008790 7.974825 > colMax(tmp5,na.rm=TRUE) [1] 470.02334 88.13176 91.67945 77.09313 86.27475 82.38100 90.10460 [8] 77.24722 -Inf 81.42317 91.02631 78.65634 79.03342 83.80376 [15] 81.53038 78.60267 80.02085 75.82024 74.42329 82.17032 > colMin(tmp5,na.rm=TRUE) [1] 57.18527 57.54464 54.70327 59.94269 53.37169 54.88360 63.13793 62.90476 [9] Inf 56.92885 54.03221 56.93259 60.07738 53.55279 66.40368 57.46641 [17] 54.98572 61.05524 55.87313 57.96521 > > > > > 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] 219.7935 291.9463 324.2874 285.3227 187.7778 76.9533 142.8174 305.4234 [9] 162.5374 346.8122 > apply(copymatrix,1,var,na.rm=TRUE) [1] 219.7935 291.9463 324.2874 285.3227 187.7778 76.9533 142.8174 305.4234 [9] 162.5374 346.8122 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 2.842171e-14 1.705303e-13 -1.136868e-13 -5.684342e-14 1.421085e-14 [6] -5.684342e-14 8.526513e-14 -3.979039e-13 -7.105427e-14 -1.421085e-13 [11] 1.705303e-13 1.421085e-13 8.526513e-14 8.526513e-14 -8.526513e-14 [16] -1.421085e-14 -8.526513e-14 -2.842171e-14 5.684342e-14 5.684342e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 10 17 6 3 6 14 1 13 5 6 10 16 7 7 5 5 5 1 5 16 7 3 9 20 9 13 4 7 7 1 5 18 6 19 1 14 1 3 7 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] 2.674084 > Min(tmp) [1] -2.966951 > mean(tmp) [1] -0.04928752 > Sum(tmp) [1] -4.928752 > Var(tmp) [1] 1.069889 > > rowMeans(tmp) [1] -0.04928752 > rowSums(tmp) [1] -4.928752 > rowVars(tmp) [1] 1.069889 > rowSd(tmp) [1] 1.034354 > rowMax(tmp) [1] 2.674084 > rowMin(tmp) [1] -2.966951 > > colMeans(tmp) [1] 0.180019316 1.297843215 -0.966794210 0.646421483 0.351867486 [6] 0.719465889 -0.183305200 -0.828082151 -0.263430687 -0.139276737 [11] -0.033848860 1.408985133 -1.338978069 -0.864863236 0.679078880 [16] -1.093233038 0.245916381 0.622825834 -0.500956981 1.828289742 [21] -0.105332215 0.184770481 0.671405546 -1.572878113 1.446540992 [26] -0.420002889 0.495133234 -1.406238077 -1.443405984 -0.619445676 [31] 0.386365102 -1.846624843 0.885053302 0.023521289 -1.030896216 [36] 0.361582688 0.448925963 0.544182260 0.169542233 -0.546140605 [41] -1.482249118 0.692244311 1.280008702 0.101311597 -0.503068952 [46] 0.125930640 -1.778524010 1.381472131 1.795575823 -2.966950590 [51] 1.009640701 -1.159827772 -0.477275147 -0.196971664 -0.742156771 [56] -0.395897371 -2.743903724 0.387546580 2.480767684 0.079287018 [61] -0.281943649 -0.282214049 -0.439453570 0.650779280 -0.049457224 [66] -0.725910598 0.796725363 0.455787478 1.329815745 -1.049085259 [71] -0.300900611 -0.667416173 -0.756907722 1.137700228 0.009973626 [76] 0.764999338 0.347517227 -1.222703178 -0.885765722 -0.170469672 [81] 0.616451860 1.552989669 0.113839098 2.674084142 0.312517096 [86] -0.027302533 -0.587993885 0.968024489 0.966826781 -1.109915934 [91] 0.047368150 -1.753133882 0.100917734 -1.485750120 -0.449021315 [96] 1.624711459 -1.298212951 -1.517463676 -0.058531301 0.438809339 > colSums(tmp) [1] 0.180019316 1.297843215 -0.966794210 0.646421483 0.351867486 [6] 0.719465889 -0.183305200 -0.828082151 -0.263430687 -0.139276737 [11] -0.033848860 1.408985133 -1.338978069 -0.864863236 0.679078880 [16] -1.093233038 0.245916381 0.622825834 -0.500956981 1.828289742 [21] -0.105332215 0.184770481 0.671405546 -1.572878113 1.446540992 [26] -0.420002889 0.495133234 -1.406238077 -1.443405984 -0.619445676 [31] 0.386365102 -1.846624843 0.885053302 0.023521289 -1.030896216 [36] 0.361582688 0.448925963 0.544182260 0.169542233 -0.546140605 [41] -1.482249118 0.692244311 1.280008702 0.101311597 -0.503068952 [46] 0.125930640 -1.778524010 1.381472131 1.795575823 -2.966950590 [51] 1.009640701 -1.159827772 -0.477275147 -0.196971664 -0.742156771 [56] -0.395897371 -2.743903724 0.387546580 2.480767684 0.079287018 [61] -0.281943649 -0.282214049 -0.439453570 0.650779280 -0.049457224 [66] -0.725910598 0.796725363 0.455787478 1.329815745 -1.049085259 [71] -0.300900611 -0.667416173 -0.756907722 1.137700228 0.009973626 [76] 0.764999338 0.347517227 -1.222703178 -0.885765722 -0.170469672 [81] 0.616451860 1.552989669 0.113839098 2.674084142 0.312517096 [86] -0.027302533 -0.587993885 0.968024489 0.966826781 -1.109915934 [91] 0.047368150 -1.753133882 0.100917734 -1.485750120 -0.449021315 [96] 1.624711459 -1.298212951 -1.517463676 -0.058531301 0.438809339 > 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.180019316 1.297843215 -0.966794210 0.646421483 0.351867486 [6] 0.719465889 -0.183305200 -0.828082151 -0.263430687 -0.139276737 [11] -0.033848860 1.408985133 -1.338978069 -0.864863236 0.679078880 [16] -1.093233038 0.245916381 0.622825834 -0.500956981 1.828289742 [21] -0.105332215 0.184770481 0.671405546 -1.572878113 1.446540992 [26] -0.420002889 0.495133234 -1.406238077 -1.443405984 -0.619445676 [31] 0.386365102 -1.846624843 0.885053302 0.023521289 -1.030896216 [36] 0.361582688 0.448925963 0.544182260 0.169542233 -0.546140605 [41] -1.482249118 0.692244311 1.280008702 0.101311597 -0.503068952 [46] 0.125930640 -1.778524010 1.381472131 1.795575823 -2.966950590 [51] 1.009640701 -1.159827772 -0.477275147 -0.196971664 -0.742156771 [56] -0.395897371 -2.743903724 0.387546580 2.480767684 0.079287018 [61] -0.281943649 -0.282214049 -0.439453570 0.650779280 -0.049457224 [66] -0.725910598 0.796725363 0.455787478 1.329815745 -1.049085259 [71] -0.300900611 -0.667416173 -0.756907722 1.137700228 0.009973626 [76] 0.764999338 0.347517227 -1.222703178 -0.885765722 -0.170469672 [81] 0.616451860 1.552989669 0.113839098 2.674084142 0.312517096 [86] -0.027302533 -0.587993885 0.968024489 0.966826781 -1.109915934 [91] 0.047368150 -1.753133882 0.100917734 -1.485750120 -0.449021315 [96] 1.624711459 -1.298212951 -1.517463676 -0.058531301 0.438809339 > colMin(tmp) [1] 0.180019316 1.297843215 -0.966794210 0.646421483 0.351867486 [6] 0.719465889 -0.183305200 -0.828082151 -0.263430687 -0.139276737 [11] -0.033848860 1.408985133 -1.338978069 -0.864863236 0.679078880 [16] -1.093233038 0.245916381 0.622825834 -0.500956981 1.828289742 [21] -0.105332215 0.184770481 0.671405546 -1.572878113 1.446540992 [26] -0.420002889 0.495133234 -1.406238077 -1.443405984 -0.619445676 [31] 0.386365102 -1.846624843 0.885053302 0.023521289 -1.030896216 [36] 0.361582688 0.448925963 0.544182260 0.169542233 -0.546140605 [41] -1.482249118 0.692244311 1.280008702 0.101311597 -0.503068952 [46] 0.125930640 -1.778524010 1.381472131 1.795575823 -2.966950590 [51] 1.009640701 -1.159827772 -0.477275147 -0.196971664 -0.742156771 [56] -0.395897371 -2.743903724 0.387546580 2.480767684 0.079287018 [61] -0.281943649 -0.282214049 -0.439453570 0.650779280 -0.049457224 [66] -0.725910598 0.796725363 0.455787478 1.329815745 -1.049085259 [71] -0.300900611 -0.667416173 -0.756907722 1.137700228 0.009973626 [76] 0.764999338 0.347517227 -1.222703178 -0.885765722 -0.170469672 [81] 0.616451860 1.552989669 0.113839098 2.674084142 0.312517096 [86] -0.027302533 -0.587993885 0.968024489 0.966826781 -1.109915934 [91] 0.047368150 -1.753133882 0.100917734 -1.485750120 -0.449021315 [96] 1.624711459 -1.298212951 -1.517463676 -0.058531301 0.438809339 > colMedians(tmp) [1] 0.180019316 1.297843215 -0.966794210 0.646421483 0.351867486 [6] 0.719465889 -0.183305200 -0.828082151 -0.263430687 -0.139276737 [11] -0.033848860 1.408985133 -1.338978069 -0.864863236 0.679078880 [16] -1.093233038 0.245916381 0.622825834 -0.500956981 1.828289742 [21] -0.105332215 0.184770481 0.671405546 -1.572878113 1.446540992 [26] -0.420002889 0.495133234 -1.406238077 -1.443405984 -0.619445676 [31] 0.386365102 -1.846624843 0.885053302 0.023521289 -1.030896216 [36] 0.361582688 0.448925963 0.544182260 0.169542233 -0.546140605 [41] -1.482249118 0.692244311 1.280008702 0.101311597 -0.503068952 [46] 0.125930640 -1.778524010 1.381472131 1.795575823 -2.966950590 [51] 1.009640701 -1.159827772 -0.477275147 -0.196971664 -0.742156771 [56] -0.395897371 -2.743903724 0.387546580 2.480767684 0.079287018 [61] -0.281943649 -0.282214049 -0.439453570 0.650779280 -0.049457224 [66] -0.725910598 0.796725363 0.455787478 1.329815745 -1.049085259 [71] -0.300900611 -0.667416173 -0.756907722 1.137700228 0.009973626 [76] 0.764999338 0.347517227 -1.222703178 -0.885765722 -0.170469672 [81] 0.616451860 1.552989669 0.113839098 2.674084142 0.312517096 [86] -0.027302533 -0.587993885 0.968024489 0.966826781 -1.109915934 [91] 0.047368150 -1.753133882 0.100917734 -1.485750120 -0.449021315 [96] 1.624711459 -1.298212951 -1.517463676 -0.058531301 0.438809339 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.1800193 1.297843 -0.9667942 0.6464215 0.3518675 0.7194659 -0.1833052 [2,] 0.1800193 1.297843 -0.9667942 0.6464215 0.3518675 0.7194659 -0.1833052 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.8280822 -0.2634307 -0.1392767 -0.03384886 1.408985 -1.338978 -0.8648632 [2,] -0.8280822 -0.2634307 -0.1392767 -0.03384886 1.408985 -1.338978 -0.8648632 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.6790789 -1.093233 0.2459164 0.6228258 -0.500957 1.82829 -0.1053322 [2,] 0.6790789 -1.093233 0.2459164 0.6228258 -0.500957 1.82829 -0.1053322 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.1847705 0.6714055 -1.572878 1.446541 -0.4200029 0.4951332 -1.406238 [2,] 0.1847705 0.6714055 -1.572878 1.446541 -0.4200029 0.4951332 -1.406238 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -1.443406 -0.6194457 0.3863651 -1.846625 0.8850533 0.02352129 -1.030896 [2,] -1.443406 -0.6194457 0.3863651 -1.846625 0.8850533 0.02352129 -1.030896 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.3615827 0.448926 0.5441823 0.1695422 -0.5461406 -1.482249 0.6922443 [2,] 0.3615827 0.448926 0.5441823 0.1695422 -0.5461406 -1.482249 0.6922443 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 1.280009 0.1013116 -0.503069 0.1259306 -1.778524 1.381472 1.795576 [2,] 1.280009 0.1013116 -0.503069 0.1259306 -1.778524 1.381472 1.795576 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -2.966951 1.009641 -1.159828 -0.4772751 -0.1969717 -0.7421568 -0.3958974 [2,] -2.966951 1.009641 -1.159828 -0.4772751 -0.1969717 -0.7421568 -0.3958974 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -2.743904 0.3875466 2.480768 0.07928702 -0.2819436 -0.282214 -0.4394536 [2,] -2.743904 0.3875466 2.480768 0.07928702 -0.2819436 -0.282214 -0.4394536 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 0.6507793 -0.04945722 -0.7259106 0.7967254 0.4557875 1.329816 -1.049085 [2,] 0.6507793 -0.04945722 -0.7259106 0.7967254 0.4557875 1.329816 -1.049085 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.3009006 -0.6674162 -0.7569077 1.1377 0.009973626 0.7649993 0.3475172 [2,] -0.3009006 -0.6674162 -0.7569077 1.1377 0.009973626 0.7649993 0.3475172 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -1.222703 -0.8857657 -0.1704697 0.6164519 1.55299 0.1138391 2.674084 [2,] -1.222703 -0.8857657 -0.1704697 0.6164519 1.55299 0.1138391 2.674084 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.3125171 -0.02730253 -0.5879939 0.9680245 0.9668268 -1.109916 0.04736815 [2,] 0.3125171 -0.02730253 -0.5879939 0.9680245 0.9668268 -1.109916 0.04736815 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.753134 0.1009177 -1.48575 -0.4490213 1.624711 -1.298213 -1.517464 [2,] -1.753134 0.1009177 -1.48575 -0.4490213 1.624711 -1.298213 -1.517464 [,99] [,100] [1,] -0.0585313 0.4388093 [2,] -0.0585313 0.4388093 > > > Max(tmp2) [1] 2.204277 > Min(tmp2) [1] -1.92733 > mean(tmp2) [1] -0.08285568 > Sum(tmp2) [1] -8.285568 > Var(tmp2) [1] 0.9085752 > > rowMeans(tmp2) [1] 0.08127872 -1.13156419 1.17523984 0.06185268 0.46284743 0.01528655 [7] -1.10899382 -0.20631457 0.25112683 0.72559487 -0.69812407 0.37624814 [13] -0.39811682 -1.39119216 0.79121089 1.58356023 0.44406352 -1.76416988 [19] 0.33937695 -0.92166959 0.79616667 -0.30539328 1.18298040 0.12372455 [25] 0.10027224 -0.64941310 -0.92301722 0.50813808 -1.35960359 -1.90804238 [31] -1.30408099 -0.78121551 -1.20078368 -0.67272494 0.10118948 -1.09965527 [37] -0.23465086 1.04355967 -0.90071875 0.22986871 -0.98211589 -0.33982241 [43] -1.01834768 0.69189615 0.06993311 1.23617273 0.23772726 0.68445643 [49] -0.42334944 -1.53041752 0.01463147 1.06580133 1.49162418 -0.29957784 [55] 1.50263639 -0.16591495 -1.47099005 0.50753512 0.69362851 -0.18780665 [61] 1.63218169 -0.23763674 -0.86986799 2.20427678 -0.43552504 1.12679687 [67] 1.32710040 0.10257374 1.53918343 -0.27329101 0.36091805 0.11817845 [73] -0.70948011 -0.74770073 -0.56221778 1.72175624 0.67038252 0.66688236 [79] -1.10343161 0.11339530 -0.55878274 -0.96099593 -1.90931411 -0.78566416 [85] -1.51813031 -1.59843686 0.02029121 0.24652824 0.51671642 1.13160119 [91] -0.79995247 -1.54355610 1.14395871 0.64424752 0.02167199 0.74099403 [97] 0.53845934 -1.10293346 -1.92733030 -0.44125676 > rowSums(tmp2) [1] 0.08127872 -1.13156419 1.17523984 0.06185268 0.46284743 0.01528655 [7] -1.10899382 -0.20631457 0.25112683 0.72559487 -0.69812407 0.37624814 [13] -0.39811682 -1.39119216 0.79121089 1.58356023 0.44406352 -1.76416988 [19] 0.33937695 -0.92166959 0.79616667 -0.30539328 1.18298040 0.12372455 [25] 0.10027224 -0.64941310 -0.92301722 0.50813808 -1.35960359 -1.90804238 [31] -1.30408099 -0.78121551 -1.20078368 -0.67272494 0.10118948 -1.09965527 [37] -0.23465086 1.04355967 -0.90071875 0.22986871 -0.98211589 -0.33982241 [43] -1.01834768 0.69189615 0.06993311 1.23617273 0.23772726 0.68445643 [49] -0.42334944 -1.53041752 0.01463147 1.06580133 1.49162418 -0.29957784 [55] 1.50263639 -0.16591495 -1.47099005 0.50753512 0.69362851 -0.18780665 [61] 1.63218169 -0.23763674 -0.86986799 2.20427678 -0.43552504 1.12679687 [67] 1.32710040 0.10257374 1.53918343 -0.27329101 0.36091805 0.11817845 [73] -0.70948011 -0.74770073 -0.56221778 1.72175624 0.67038252 0.66688236 [79] -1.10343161 0.11339530 -0.55878274 -0.96099593 -1.90931411 -0.78566416 [85] -1.51813031 -1.59843686 0.02029121 0.24652824 0.51671642 1.13160119 [91] -0.79995247 -1.54355610 1.14395871 0.64424752 0.02167199 0.74099403 [97] 0.53845934 -1.10293346 -1.92733030 -0.44125676 > 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.08127872 -1.13156419 1.17523984 0.06185268 0.46284743 0.01528655 [7] -1.10899382 -0.20631457 0.25112683 0.72559487 -0.69812407 0.37624814 [13] -0.39811682 -1.39119216 0.79121089 1.58356023 0.44406352 -1.76416988 [19] 0.33937695 -0.92166959 0.79616667 -0.30539328 1.18298040 0.12372455 [25] 0.10027224 -0.64941310 -0.92301722 0.50813808 -1.35960359 -1.90804238 [31] -1.30408099 -0.78121551 -1.20078368 -0.67272494 0.10118948 -1.09965527 [37] -0.23465086 1.04355967 -0.90071875 0.22986871 -0.98211589 -0.33982241 [43] -1.01834768 0.69189615 0.06993311 1.23617273 0.23772726 0.68445643 [49] -0.42334944 -1.53041752 0.01463147 1.06580133 1.49162418 -0.29957784 [55] 1.50263639 -0.16591495 -1.47099005 0.50753512 0.69362851 -0.18780665 [61] 1.63218169 -0.23763674 -0.86986799 2.20427678 -0.43552504 1.12679687 [67] 1.32710040 0.10257374 1.53918343 -0.27329101 0.36091805 0.11817845 [73] -0.70948011 -0.74770073 -0.56221778 1.72175624 0.67038252 0.66688236 [79] -1.10343161 0.11339530 -0.55878274 -0.96099593 -1.90931411 -0.78566416 [85] -1.51813031 -1.59843686 0.02029121 0.24652824 0.51671642 1.13160119 [91] -0.79995247 -1.54355610 1.14395871 0.64424752 0.02167199 0.74099403 [97] 0.53845934 -1.10293346 -1.92733030 -0.44125676 > rowMin(tmp2) [1] 0.08127872 -1.13156419 1.17523984 0.06185268 0.46284743 0.01528655 [7] -1.10899382 -0.20631457 0.25112683 0.72559487 -0.69812407 0.37624814 [13] -0.39811682 -1.39119216 0.79121089 1.58356023 0.44406352 -1.76416988 [19] 0.33937695 -0.92166959 0.79616667 -0.30539328 1.18298040 0.12372455 [25] 0.10027224 -0.64941310 -0.92301722 0.50813808 -1.35960359 -1.90804238 [31] -1.30408099 -0.78121551 -1.20078368 -0.67272494 0.10118948 -1.09965527 [37] -0.23465086 1.04355967 -0.90071875 0.22986871 -0.98211589 -0.33982241 [43] -1.01834768 0.69189615 0.06993311 1.23617273 0.23772726 0.68445643 [49] -0.42334944 -1.53041752 0.01463147 1.06580133 1.49162418 -0.29957784 [55] 1.50263639 -0.16591495 -1.47099005 0.50753512 0.69362851 -0.18780665 [61] 1.63218169 -0.23763674 -0.86986799 2.20427678 -0.43552504 1.12679687 [67] 1.32710040 0.10257374 1.53918343 -0.27329101 0.36091805 0.11817845 [73] -0.70948011 -0.74770073 -0.56221778 1.72175624 0.67038252 0.66688236 [79] -1.10343161 0.11339530 -0.55878274 -0.96099593 -1.90931411 -0.78566416 [85] -1.51813031 -1.59843686 0.02029121 0.24652824 0.51671642 1.13160119 [91] -0.79995247 -1.54355610 1.14395871 0.64424752 0.02167199 0.74099403 [97] 0.53845934 -1.10293346 -1.92733030 -0.44125676 > > colMeans(tmp2) [1] -0.08285568 > colSums(tmp2) [1] -8.285568 > colVars(tmp2) [1] 0.9085752 > colSd(tmp2) [1] 0.9531921 > colMax(tmp2) [1] 2.204277 > colMin(tmp2) [1] -1.92733 > colMedians(tmp2) [1] 0.01778888 > colRanges(tmp2) [,1] [1,] -1.927330 [2,] 2.204277 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] -2.2451060 -6.7625185 3.4481860 0.1799904 -1.2149515 -3.3254765 [7] 1.6502657 -8.5198453 2.4127186 -1.7122889 > colApply(tmp,quantile)[,1] [,1] [1,] -2.32171140 [2,] -0.74045047 [3,] -0.07281081 [4,] 0.41040318 [5,] 1.24614304 > > rowApply(tmp,sum) [1] -5.7643819 -0.2162207 -6.1512684 2.4975430 2.2011765 -1.8796138 [7] -0.3659447 -3.7337914 -2.5714693 -0.1050555 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 4 1 9 6 3 8 6 7 4 9 [2,] 3 4 3 5 5 6 1 8 3 1 [3,] 10 5 8 9 4 10 5 3 6 6 [4,] 9 3 4 1 10 7 4 4 8 10 [5,] 1 10 6 10 8 4 10 1 2 3 [6,] 5 7 5 8 2 2 7 9 1 4 [7,] 8 9 1 3 6 9 2 10 7 8 [8,] 2 2 2 2 1 3 9 5 10 2 [9,] 6 8 10 7 9 1 3 6 9 5 [10,] 7 6 7 4 7 5 8 2 5 7 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.3280389 5.4299526 -0.2316520 2.7192455 -1.7241366 0.6203587 [7] -1.4419444 1.2147818 -3.1145256 1.3387146 0.8296467 0.3131253 [13] -1.3585456 -1.9578599 -3.1033402 -0.7449175 1.2189813 -3.7311336 [19] 4.1911287 -0.4095432 > colApply(tmp,quantile)[,1] [,1] [1,] -0.9361055 [2,] -0.7075587 [3,] -0.4987786 [4,] 0.7171879 [5,] 1.0972160 > > rowApply(tmp,sum) [1] 5.9891770 -0.1452651 3.2536448 -6.0327425 -3.3345163 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 2 18 4 18 7 [2,] 20 16 19 20 12 [3,] 5 15 9 3 19 [4,] 12 14 14 16 15 [5,] 13 8 2 10 5 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.9361055 2.0907953 -0.58657676 0.5690212 0.7072204 -0.61337400 [2,] 0.7171879 0.6707390 0.59854028 0.5979848 -0.3497241 0.23157385 [3,] -0.4987786 1.2558913 -0.06550714 0.4935339 -0.6820615 0.79563423 [4,] 1.0972160 1.2101732 -1.60147110 0.7210555 -0.5851129 -0.03600956 [5,] -0.7075587 0.2023538 1.42336276 0.3376501 -0.8144585 0.24253422 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.0006977064 0.8669617 0.009214849 1.3408533 0.9299186 0.3075346 [2,] -0.7955780686 0.4805435 -1.094131016 -0.7259357 1.6473194 -0.5739390 [3,] -0.3835999090 0.5712087 -0.194348759 1.0343808 -0.2392785 -0.5501784 [4,] -0.3046550329 -0.1441775 -0.653324286 -1.7162001 -1.0296747 0.9494188 [5,] 0.0425863409 -0.5597546 -1.181936372 1.4056162 -0.4786381 0.1802895 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.5631350 -0.2549305 0.7715550 -0.9755220 1.2868189 -0.80693904 [2,] 0.2579297 0.6882086 -0.5741986 -0.2143699 -1.1831269 -1.72599576 [3,] -1.0465736 0.2031034 -0.0804827 1.4518166 0.7692404 0.05525336 [4,] -1.6268979 -1.0073552 -1.2387208 -1.2806162 1.1292150 0.56188396 [5,] 0.4938612 -1.5868862 -1.9814931 0.2737740 -0.7831661 -1.81533612 [,19] [,20] [1,] 1.1209154 -0.40062163 [2,] 0.8706636 0.33104319 [3,] 0.3847691 -0.02037781 [4,] 0.3663221 -0.84381185 [5,] 1.4484585 0.52422491 > > > 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 : 653 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 : 567 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.2581415 -1.927724 -1.815818 0.0796872 -1.12686 -0.6693854 -0.798211 col8 col9 col10 col11 col12 col13 col14 row1 0.318962 0.04235331 -0.005167744 0.5656473 -3.054017 0.8411066 2.823507 col15 col16 col17 col18 col19 col20 row1 0.6290276 0.2452584 -1.102537 0.3964013 -1.43115 1.121043 > tmp[,"col10"] col10 row1 -0.005167744 row2 -1.033829923 row3 -0.743168728 row4 0.538594173 row5 -0.411983648 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -0.2581415 -1.927724 -1.8158175 0.0796872 -1.1268599 -0.6693854 row5 0.3824968 -2.061468 -0.9149482 -0.4531174 0.2331009 -0.4928439 col7 col8 col9 col10 col11 col12 row1 -0.7982110 0.3189620 0.04235331 -0.005167744 0.5656473 -3.0540174 row5 0.1720618 0.9216554 1.80202406 -0.411983648 -1.4375716 -0.6033531 col13 col14 col15 col16 col17 col18 row1 0.8411066 2.82350709 0.6290276 0.2452584 -1.1025367 0.3964013 row5 -2.1989008 0.02078946 -0.6483240 -0.6763520 -0.2727967 -0.2187111 col19 col20 row1 -1.4311502 1.1210428 row5 -0.3249798 0.2917354 > tmp[,c("col6","col20")] col6 col20 row1 -0.6693854 1.1210428 row2 -0.7465149 0.8705848 row3 -0.6290799 -0.2707082 row4 -0.4786733 0.4287700 row5 -0.4928439 0.2917354 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.6693854 1.1210428 row5 -0.4928439 0.2917354 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.37609 49.16107 51.32148 50.23709 50.21939 104.8754 50.29814 48.75713 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.88055 49.98851 49.55709 50.09618 48.90957 50.00909 49.44089 51.0458 col17 col18 col19 col20 row1 47.88568 48.65494 51.57527 107.0885 > tmp[,"col10"] col10 row1 49.98851 row2 29.23169 row3 31.01701 row4 30.51680 row5 49.85402 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.37609 49.16107 51.32148 50.23709 50.21939 104.8754 50.29814 48.75713 row5 50.84373 49.25960 49.30651 50.27958 51.20994 103.6150 51.25929 50.50585 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.88055 49.98851 49.55709 50.09618 48.90957 50.00909 49.44089 51.04580 row5 50.75305 49.85402 51.00013 50.09832 48.91083 49.75120 49.25213 50.06921 col17 col18 col19 col20 row1 47.88568 48.65494 51.57527 107.0885 row5 48.90813 51.14076 50.76361 105.3000 > tmp[,c("col6","col20")] col6 col20 row1 104.87544 107.08848 row2 75.84929 73.97309 row3 75.55676 73.25960 row4 73.36340 74.13622 row5 103.61497 105.30005 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.8754 107.0885 row5 103.6150 105.3000 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.8754 107.0885 row5 103.6150 105.3000 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -1.1913969 [2,] -0.2187782 [3,] -0.6061353 [4,] -0.1498455 [5,] -0.2539302 > tmp[,c("col17","col7")] col17 col7 [1,] -0.39375446 -1.1277868 [2,] -0.08203171 0.1671270 [3,] -0.17179392 -1.2923572 [4,] 0.59789721 1.1861743 [5,] -0.13951151 -0.8825689 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.8156482 -0.8034700 [2,] -0.4168810 -0.6689322 [3,] -0.6368710 -0.2902919 [4,] 0.1456020 -2.1893973 [5,] 0.8833119 -0.5133789 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.815648 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.815648 [2,] -0.416881 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 0.07288923 -0.1730774 -0.9096561 -0.70982619 0.6352496 -0.7848130 row1 -1.72189965 -0.2492904 -0.3128338 -0.03812603 -1.7023253 0.3611348 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 1.614297 -0.3602524 -1.4680627 -0.3455499 2.1790741 1.4483601 0.94773339 row1 1.360952 0.1063270 0.6758445 0.4290947 0.6102782 -0.1227373 -0.09789248 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 0.6514674 0.3927913 -0.2578130 0.6714579 0.2296145 0.5043155 0.6089556 row1 1.3858500 1.3356065 0.5712065 -0.4944787 -0.4979138 -0.9027310 -0.6501330 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.7043204 -2.002918 -0.9477399 1.295816 -0.3734567 -0.4540943 0.8668892 [,8] [,9] [,10] row2 -1.417196 0.2331577 0.311043 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 1.394744 -0.5472082 -0.6633045 -0.9498983 -1.064884 -1.195157 0.4222061 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.3553584 0.5311735 -0.4651936 -0.9668247 -1.008243 0.0174654 -1.108083 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.4356144 0.3367718 -0.2143208 0.6551742 -0.6616266 -0.5540372 > > > 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: 0x6000029141e0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e538734088" [2] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e51691bdac" [3] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e53a3b72c7" [4] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e514ec84af" [5] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e533fb07e4" [6] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e525c32465" [7] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e52e8a7641" [8] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e5459bd46" [9] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e51f9940e5" [10] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e56738a98" [11] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e5b900477" [12] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e51c15268f" [13] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e5309684b0" [14] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e569e157bb" [15] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM155e54946ec4b" > > > ### 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: 0x6000029600c0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6000029600c0> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6000029600c0> > rowMedians(tmp) [1] -0.0817980423 -0.0294230223 0.7849667174 0.2514044043 0.1615617721 [6] 0.2202855730 -0.2850825043 0.0113095838 -0.0176895598 0.4952427643 [11] -0.2843271579 -0.5640421684 -0.2465675815 0.1585512509 0.0752644208 [16] -0.1672871118 0.1449091070 0.0740074173 -0.0748021554 -0.0892219308 [21] 0.0846360761 0.1426008514 -0.1221561638 0.1720278954 -0.1088149624 [26] -0.2784321862 -0.1086694029 -0.5241382168 -0.2466657275 0.0669023351 [31] 0.3227406778 0.6960891293 -0.3239941229 0.1794402776 0.5197266785 [36] 0.1497839972 -0.2822224413 -0.1544343512 0.0847162701 -0.3804114612 [41] 0.1583605456 -0.6684164832 0.6647449384 -0.2300805029 -0.0220641300 [46] 0.2112634692 0.2261732399 -0.4468301509 -0.1033248482 0.8315854164 [51] -0.0256705637 0.5473941685 0.2009056094 -0.0871140068 -0.6300310473 [56] -0.1825144161 -0.6132392227 -0.3072169424 0.1673169189 -0.0244486663 [61] 0.3358528130 -0.0990639997 0.2012551412 -0.0940684437 -0.2247359164 [66] -0.2138497662 -0.0394003307 0.1490050953 0.0147925615 -0.3109647209 [71] -0.1515169526 -0.0762416849 -0.0947086754 -0.0676606935 0.4429941533 [76] 0.0903746910 0.0917797605 0.2068632846 -0.3761279743 -0.1594382377 [81] 0.1960647052 -0.1941952432 -0.3047769184 -0.1233189930 0.8443380016 [86] -0.6905699825 -0.0107709802 0.2083398486 -0.2193654792 -0.1758351801 [91] -0.4635632819 -0.3355726397 0.3694413720 0.1816508767 0.2458250430 [96] -0.4385102811 -0.0698127547 -0.5292585564 0.4607054951 -0.6233428429 [101] -0.2911430356 0.7365928077 -0.6407182916 0.1397688501 -0.6539992779 [106] 0.1729850108 0.0736733516 -0.0053158493 -0.4351943482 -0.4945500194 [111] -0.3393805614 -0.3297055000 -0.0586391209 -0.3680323901 -0.0983276537 [116] -0.0180185433 -0.3706739205 0.1895997729 -0.2160910035 0.3829626837 [121] -0.5439885912 -0.5341190806 0.4040722353 0.5488483627 -0.4083041524 [126] -0.0076348328 0.2987066266 0.3726587156 0.4310889707 0.4476207513 [131] -0.5340902477 0.2483086101 0.0674098840 0.2999046838 -0.0769727291 [136] -0.3025996991 0.4819925042 -0.5739511128 0.3680997783 -0.0072221193 [141] 0.4146498308 -0.0796010576 -0.3552788894 0.4495324427 0.5552585532 [146] -0.3062068369 -0.0448260343 0.3951546789 0.3365404245 -0.3832787511 [151] -0.2812929114 -0.2135749940 0.0229985774 0.3439996135 -0.3446657956 [156] -0.1792591929 -0.0385656901 -0.3134122232 -0.1743637249 -0.1857611966 [161] 0.0846971135 -0.0506417130 -0.3977113585 0.2113806635 -0.5447263660 [166] 0.3854346725 0.1316196424 -0.1193448976 0.1794283433 -0.0101661968 [171] 0.0752892723 0.1962283121 -0.0488815017 -0.1099009845 -0.3349285386 [176] 0.0085211895 0.7951232176 -0.3251604923 0.2200027878 0.1131204188 [181] 0.0032390620 -0.1189409891 -0.1341184498 -0.5170216664 -0.0073552369 [186] -0.0597696716 -0.3275835065 -0.0348592350 0.1694725741 -0.2876304033 [191] -0.0657523580 -0.2393394998 0.3340024060 -0.4791449240 0.4615271802 [196] 0.5066802117 -0.1736930590 0.0385780488 0.0436754059 0.0275763404 [201] -0.3280580550 -0.0531444930 -0.2177279932 -0.3000028890 -0.1338651022 [206] -0.4165734034 0.5705372020 0.2153996280 0.5995509287 -0.3998289267 [211] -0.3105872828 0.0185441443 0.2186575886 -0.1777084671 0.0262387579 [216] 0.1255504144 0.0730394662 0.1144440453 0.0004015306 -0.4763003908 [221] 0.8466091447 -0.8503124633 0.1387498978 0.0279884218 -0.0031606948 [226] 0.1056555407 0.2692293500 -0.4112814810 0.1906310639 0.3068282187 > > proc.time() user system elapsed 5.189 18.863 28.035
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.0 (2024-04-24) -- "Puppy Cup" 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: 0x6000036300c0> > .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: 0x6000036300c0> > .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: 0x6000036300c0> > .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: 0x6000036300c0> > 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: 0x600003608000> > .Call("R_bm_AddColumn",P) <pointer: 0x600003608000> > .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: 0x600003608000> > .Call("R_bm_AddColumn",P) <pointer: 0x600003608000> > .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: 0x600003608000> > 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: 0x600003608180> > .Call("R_bm_AddColumn",P) <pointer: 0x600003608180> > .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: 0x600003608180> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600003608180> > .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: 0x600003608180> > > .Call("R_bm_RowMode",P) <pointer: 0x600003608180> > .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: 0x600003608180> > > .Call("R_bm_ColMode",P) <pointer: 0x600003608180> > .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: 0x600003608180> > 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: 0x600003608360> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600003608360> > .Call("R_bm_AddColumn",P) <pointer: 0x600003608360> > .Call("R_bm_AddColumn",P) <pointer: 0x600003608360> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile177e2118743b5" "BufferedMatrixFile177e27d020c91" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile177e2118743b5" "BufferedMatrixFile177e27d020c91" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x60000361c120> > .Call("R_bm_AddColumn",P) <pointer: 0x60000361c120> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x60000361c120> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x60000361c120> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x60000361c120> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x60000361c120> > .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: 0x60000360c060> > .Call("R_bm_AddColumn",P) <pointer: 0x60000360c060> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x60000360c060> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x60000360c060> > 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: 0x60000360c240> > .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: 0x60000360c240> > rm(P) > > proc.time() user system elapsed 0.598 0.215 0.787
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.0 (2024-04-24) -- "Puppy Cup" 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.593 0.138 0.724