Back to Multiple platform build/check report for BioC 3.19: simplified long |
|
This page was generated on 2024-06-25 17:43 -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 13:17:30 -0400 (Mon, 24 Jun 2024) |
EndedAt: 2024-06-24 13:18:08 -0400 (Mon, 24 Jun 2024) |
EllapsedTime: 38.3 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: aarch64-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 Ventura 13.6.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 15.0.0 (clang-1500.0.40.1)’ * 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-arm64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘Apple clang version 15.0.0 (clang-1500.0.40.1)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/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 arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/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-arm64/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: aarch64-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.349 0.108 0.443
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: aarch64-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 474154 25.4 1035431 55.3 NA 638588 34.2 Vcells 877590 6.7 8388608 64.0 65536 2072077 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 13:17:49 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 13:17:49 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: 0x600002178000> > > > > 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 13:17:51 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 13:17:52 2024" > > ColMode(tmp2) <pointer: 0x600002178000> > > > > ### 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.2599741 -1.5690524 1.107696 -1.2521188 [2,] -0.5571771 -0.4460615 1.257981 0.3545278 [3,] -1.1473168 0.2847510 -1.108576 -0.2838384 [4,] 1.3141716 0.5657434 1.454202 -1.5761567 > 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.2599741 1.5690524 1.107696 1.2521188 [2,] 0.5571771 0.4460615 1.257981 0.3545278 [3,] 1.1473168 0.2847510 1.108576 0.2838384 [4,] 1.3141716 0.5657434 1.454202 1.5761567 > 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.962930 1.2526182 1.052471 1.1189812 [2,] 0.746443 0.6678783 1.121598 0.5954224 [3,] 1.071129 0.5336206 1.052889 0.5327649 [4,] 1.146373 0.7521592 1.205903 1.2554508 > > 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.88927 39.09523 36.63241 37.44193 [2,] 33.02161 32.12484 37.47396 31.30875 [3,] 36.85860 30.62096 36.63747 30.61149 [4,] 37.77790 33.08734 38.51323 39.13066 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x60000217cd20> > exp(tmp5) <pointer: 0x60000217cd20> > log(tmp5,2) <pointer: 0x60000217cd20> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 465.9962 > Min(tmp5) [1] 54.04664 > mean(tmp5) [1] 73.39709 > Sum(tmp5) [1] 14679.42 > Var(tmp5) [1] 846.5235 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.09853 71.18930 69.40995 74.40437 70.76797 73.71438 69.47911 71.61580 [9] 73.82779 69.46366 > rowSums(tmp5) [1] 1801.971 1423.786 1388.199 1488.087 1415.359 1474.288 1389.582 1432.316 [9] 1476.556 1389.273 > rowVars(tmp5) [1] 7916.18051 62.24931 33.94655 80.00843 62.16879 81.59361 [7] 47.41052 64.65577 81.60833 76.48395 > rowSd(tmp5) [1] 88.972920 7.889823 5.826366 8.944743 7.884719 9.032918 6.885530 [8] 8.040881 9.033733 8.745510 > rowMax(tmp5) [1] 465.99619 84.23627 80.60417 89.38030 82.96980 87.77522 83.84003 [8] 88.42520 88.10971 84.60831 > rowMin(tmp5) [1] 55.07089 60.06003 59.54612 54.04664 57.97355 59.48635 59.50098 57.75215 [9] 58.82959 57.02373 > > colMeans(tmp5) [1] 113.16291 68.06868 77.72417 72.83869 71.21210 69.07124 73.91579 [8] 69.08112 71.43739 75.82542 67.48769 70.14523 68.67807 75.57246 [15] 73.87658 68.95125 72.85328 68.33631 66.75461 72.94872 > colSums(tmp5) [1] 1131.6291 680.6868 777.2417 728.3869 712.1210 690.7124 739.1579 [8] 690.8112 714.3739 758.2542 674.8769 701.4523 686.7807 755.7246 [15] 738.7658 689.5125 728.5328 683.3631 667.5461 729.4872 > colVars(tmp5) [1] 15421.56581 60.19167 33.41506 59.63732 53.68179 75.36577 [7] 75.04396 91.11363 21.18894 55.40351 71.11257 107.05008 [13] 49.53786 89.24278 84.60630 64.06257 30.25663 90.26448 [19] 61.23611 75.16174 > colSd(tmp5) [1] 124.183597 7.758329 5.780576 7.722521 7.326786 8.681346 [7] 8.662792 9.545346 4.603144 7.443354 8.432827 10.346501 [13] 7.038313 9.446840 9.198168 8.003910 5.500603 9.500762 [19] 7.825350 8.669587 > colMax(tmp5) [1] 465.99619 81.37161 83.84003 82.96980 83.02706 81.86983 84.35927 [8] 82.36135 77.19846 88.08025 86.12925 87.05229 79.87824 88.42520 [15] 89.38030 84.60831 81.06026 87.05951 82.58932 83.51356 > colMin(tmp5) [1] 61.12217 58.32902 65.26855 63.71380 62.76213 56.99088 63.68112 54.04664 [9] 62.85891 64.76475 57.75215 56.10788 58.03173 63.86119 59.54612 59.50098 [17] 64.28566 55.07089 57.02373 57.97355 > > > ### 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.09853 NA 69.40995 74.40437 70.76797 73.71438 69.47911 71.61580 [9] 73.82779 69.46366 > rowSums(tmp5) [1] 1801.971 NA 1388.199 1488.087 1415.359 1474.288 1389.582 1432.316 [9] 1476.556 1389.273 > rowVars(tmp5) [1] 7916.18051 63.58530 33.94655 80.00843 62.16879 81.59361 [7] 47.41052 64.65577 81.60833 76.48395 > rowSd(tmp5) [1] 88.972920 7.974039 5.826366 8.944743 7.884719 9.032918 6.885530 [8] 8.040881 9.033733 8.745510 > rowMax(tmp5) [1] 465.99619 NA 80.60417 89.38030 82.96980 87.77522 83.84003 [8] 88.42520 88.10971 84.60831 > rowMin(tmp5) [1] 55.07089 NA 59.54612 54.04664 57.97355 59.48635 59.50098 57.75215 [9] 58.82959 57.02373 > > colMeans(tmp5) [1] 113.16291 68.06868 77.72417 NA 71.21210 69.07124 73.91579 [8] 69.08112 71.43739 75.82542 67.48769 70.14523 68.67807 75.57246 [15] 73.87658 68.95125 72.85328 68.33631 66.75461 72.94872 > colSums(tmp5) [1] 1131.6291 680.6868 777.2417 NA 712.1210 690.7124 739.1579 [8] 690.8112 714.3739 758.2542 674.8769 701.4523 686.7807 755.7246 [15] 738.7658 689.5125 728.5328 683.3631 667.5461 729.4872 > colVars(tmp5) [1] 15421.56581 60.19167 33.41506 NA 53.68179 75.36577 [7] 75.04396 91.11363 21.18894 55.40351 71.11257 107.05008 [13] 49.53786 89.24278 84.60630 64.06257 30.25663 90.26448 [19] 61.23611 75.16174 > colSd(tmp5) [1] 124.183597 7.758329 5.780576 NA 7.326786 8.681346 [7] 8.662792 9.545346 4.603144 7.443354 8.432827 10.346501 [13] 7.038313 9.446840 9.198168 8.003910 5.500603 9.500762 [19] 7.825350 8.669587 > colMax(tmp5) [1] 465.99619 81.37161 83.84003 NA 83.02706 81.86983 84.35927 [8] 82.36135 77.19846 88.08025 86.12925 87.05229 79.87824 88.42520 [15] 89.38030 84.60831 81.06026 87.05951 82.58932 83.51356 > colMin(tmp5) [1] 61.12217 58.32902 65.26855 NA 62.76213 56.99088 63.68112 54.04664 [9] 62.85891 64.76475 57.75215 56.10788 58.03173 63.86119 59.54612 59.50098 [17] 64.28566 55.07089 57.02373 57.97355 > > Max(tmp5,na.rm=TRUE) [1] 465.9962 > Min(tmp5,na.rm=TRUE) [1] 54.04664 > mean(tmp5,na.rm=TRUE) [1] 73.43845 > Sum(tmp5,na.rm=TRUE) [1] 14614.25 > Var(tmp5,na.rm=TRUE) [1] 850.4549 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.09853 71.50636 69.40995 74.40437 70.76797 73.71438 69.47911 71.61580 [9] 73.82779 69.46366 > rowSums(tmp5,na.rm=TRUE) [1] 1801.971 1358.621 1388.199 1488.087 1415.359 1474.288 1389.582 1432.316 [9] 1476.556 1389.273 > rowVars(tmp5,na.rm=TRUE) [1] 7916.18051 63.58530 33.94655 80.00843 62.16879 81.59361 [7] 47.41052 64.65577 81.60833 76.48395 > rowSd(tmp5,na.rm=TRUE) [1] 88.972920 7.974039 5.826366 8.944743 7.884719 9.032918 6.885530 [8] 8.040881 9.033733 8.745510 > rowMax(tmp5,na.rm=TRUE) [1] 465.99619 84.23627 80.60417 89.38030 82.96980 87.77522 83.84003 [8] 88.42520 88.10971 84.60831 > rowMin(tmp5,na.rm=TRUE) [1] 55.07089 60.06003 59.54612 54.04664 57.97355 59.48635 59.50098 57.75215 [9] 58.82959 57.02373 > > colMeans(tmp5,na.rm=TRUE) [1] 113.16291 68.06868 77.72417 73.69131 71.21210 69.07124 73.91579 [8] 69.08112 71.43739 75.82542 67.48769 70.14523 68.67807 75.57246 [15] 73.87658 68.95125 72.85328 68.33631 66.75461 72.94872 > colSums(tmp5,na.rm=TRUE) [1] 1131.6291 680.6868 777.2417 663.2218 712.1210 690.7124 739.1579 [8] 690.8112 714.3739 758.2542 674.8769 701.4523 686.7807 755.7246 [15] 738.7658 689.5125 728.5328 683.3631 667.5461 729.4872 > colVars(tmp5,na.rm=TRUE) [1] 15421.56581 60.19167 33.41506 58.91358 53.68179 75.36577 [7] 75.04396 91.11363 21.18894 55.40351 71.11257 107.05008 [13] 49.53786 89.24278 84.60630 64.06257 30.25663 90.26448 [19] 61.23611 75.16174 > colSd(tmp5,na.rm=TRUE) [1] 124.183597 7.758329 5.780576 7.675518 7.326786 8.681346 [7] 8.662792 9.545346 4.603144 7.443354 8.432827 10.346501 [13] 7.038313 9.446840 9.198168 8.003910 5.500603 9.500762 [19] 7.825350 8.669587 > colMax(tmp5,na.rm=TRUE) [1] 465.99619 81.37161 83.84003 82.96980 83.02706 81.86983 84.35927 [8] 82.36135 77.19846 88.08025 86.12925 87.05229 79.87824 88.42520 [15] 89.38030 84.60831 81.06026 87.05951 82.58932 83.51356 > colMin(tmp5,na.rm=TRUE) [1] 61.12217 58.32902 65.26855 63.71380 62.76213 56.99088 63.68112 54.04664 [9] 62.85891 64.76475 57.75215 56.10788 58.03173 63.86119 59.54612 59.50098 [17] 64.28566 55.07089 57.02373 57.97355 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.09853 NaN 69.40995 74.40437 70.76797 73.71438 69.47911 71.61580 [9] 73.82779 69.46366 > rowSums(tmp5,na.rm=TRUE) [1] 1801.971 0.000 1388.199 1488.087 1415.359 1474.288 1389.582 1432.316 [9] 1476.556 1389.273 > rowVars(tmp5,na.rm=TRUE) [1] 7916.18051 NA 33.94655 80.00843 62.16879 81.59361 [7] 47.41052 64.65577 81.60833 76.48395 > rowSd(tmp5,na.rm=TRUE) [1] 88.972920 NA 5.826366 8.944743 7.884719 9.032918 6.885530 [8] 8.040881 9.033733 8.745510 > rowMax(tmp5,na.rm=TRUE) [1] 465.99619 NA 80.60417 89.38030 82.96980 87.77522 83.84003 [8] 88.42520 88.10971 84.60831 > rowMin(tmp5,na.rm=TRUE) [1] 55.07089 NA 59.54612 54.04664 57.97355 59.48635 59.50098 57.75215 [9] 58.82959 57.02373 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 118.09989 68.20257 77.69384 NaN 71.74794 69.95074 73.35908 [8] 67.60554 71.83771 74.89089 67.40401 70.62727 68.75653 76.87371 [15] 74.64925 67.74696 71.94139 68.49598 67.49845 71.77485 > colSums(tmp5,na.rm=TRUE) [1] 1062.8990 613.8231 699.2445 0.0000 645.7314 629.5566 660.2318 [8] 608.4498 646.5394 674.0180 606.6361 635.6454 618.8088 691.8634 [15] 671.8432 609.7227 647.4725 616.4638 607.4860 645.9737 > colVars(tmp5,na.rm=TRUE) [1] 17075.05730 67.51395 37.58159 NA 57.16192 76.08438 [7] 80.93779 78.00774 22.03460 52.50363 79.92286 117.81726 [13] 55.66083 81.34898 88.46570 55.75451 24.68392 101.26075 [19] 62.66600 69.05478 > colSd(tmp5,na.rm=TRUE) [1] 130.671563 8.216687 6.130383 NA 7.560550 8.722636 [7] 8.996543 8.832199 4.694103 7.245939 8.939959 10.854366 [13] 7.460618 9.019367 9.405621 7.466895 4.968291 10.062840 [19] 7.916186 8.309921 > colMax(tmp5,na.rm=TRUE) [1] 465.99619 81.37161 83.84003 -Inf 83.02706 81.86983 84.35927 [8] 79.85353 77.19846 88.08025 86.12925 87.05229 79.87824 88.42520 [15] 89.38030 84.60831 79.02084 87.05951 82.58932 83.00207 > colMin(tmp5,na.rm=TRUE) [1] 61.12217 58.32902 65.26855 Inf 62.76213 56.99088 63.68112 54.04664 [9] 62.85891 64.76475 57.75215 56.10788 58.03173 67.89902 59.54612 59.50098 [17] 64.28566 55.07089 57.02373 57.97355 > > > > > 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] 148.9232 195.4303 210.5312 288.3427 191.9017 209.1629 105.1112 224.1894 [9] 163.9863 121.9846 > apply(copymatrix,1,var,na.rm=TRUE) [1] 148.9232 195.4303 210.5312 288.3427 191.9017 209.1629 105.1112 224.1894 [9] 163.9863 121.9846 > > > > 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 -5.684342e-14 2.842171e-13 5.684342e-14 1.421085e-13 [6] 0.000000e+00 0.000000e+00 0.000000e+00 7.105427e-14 -5.684342e-14 [11] -1.136868e-13 5.684342e-14 -1.989520e-13 -1.705303e-13 -1.421085e-13 [16] -5.684342e-14 -1.136868e-13 5.684342e-14 1.136868e-13 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) + } 9 7 6 11 8 18 6 5 5 10 5 18 1 13 9 1 8 1 10 1 8 5 2 20 10 19 7 17 5 10 9 2 9 7 5 5 5 3 10 1 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.472351 > Min(tmp) [1] -2.064134 > mean(tmp) [1] 0.1304966 > Sum(tmp) [1] 13.04966 > Var(tmp) [1] 0.951334 > > rowMeans(tmp) [1] 0.1304966 > rowSums(tmp) [1] 13.04966 > rowVars(tmp) [1] 0.951334 > rowSd(tmp) [1] 0.9753635 > rowMax(tmp) [1] 2.472351 > rowMin(tmp) [1] -2.064134 > > colMeans(tmp) [1] 0.36614548 -1.04392984 1.63679119 -0.08706667 0.24747131 -1.06752161 [7] -1.02691615 1.31270718 0.64822228 1.17464438 -1.94768081 -0.44567838 [13] 1.02789871 1.39602448 -0.45548754 0.25091180 0.68410237 2.10194694 [19] 0.42096341 -0.02282453 0.39775422 -0.14499111 1.70346294 -0.25597663 [25] 0.57620834 0.58730487 -0.50994426 2.47235125 0.19148235 -1.27916994 [31] 1.17511626 0.92441216 0.74626702 -1.49808298 0.19887969 1.28695747 [37] 0.03703373 1.08947445 0.49570735 -0.82481735 1.78777690 0.46591315 [43] -0.22155330 -0.20493972 -1.00443333 -0.78235307 2.30093079 -0.26275350 [49] -0.37070678 -0.45609269 -0.79869248 -0.88102088 -0.16330667 -0.24838416 [55] -0.46818058 0.22932961 -0.92325010 0.97629344 1.98173331 -1.48793978 [61] 0.63664221 0.76259761 1.17680432 0.13677693 -2.06413412 0.25604891 [67] -0.37663596 1.00530358 -1.34574317 -1.15927030 0.35957944 -0.48588045 [73] 0.60156208 0.13231071 0.25475678 -0.45975559 -0.03131242 -1.77090324 [79] 0.82866824 0.74389658 -1.35571882 -0.42602470 0.61052740 -0.12293686 [85] -0.95333485 0.49498899 -0.90173944 -0.47233398 0.36311224 0.29394580 [91] -0.70554015 1.02640460 2.29204054 -0.38620858 -1.15307293 0.78206383 [97] 1.27898309 0.35884981 -0.01799380 0.83380847 > colSums(tmp) [1] 0.36614548 -1.04392984 1.63679119 -0.08706667 0.24747131 -1.06752161 [7] -1.02691615 1.31270718 0.64822228 1.17464438 -1.94768081 -0.44567838 [13] 1.02789871 1.39602448 -0.45548754 0.25091180 0.68410237 2.10194694 [19] 0.42096341 -0.02282453 0.39775422 -0.14499111 1.70346294 -0.25597663 [25] 0.57620834 0.58730487 -0.50994426 2.47235125 0.19148235 -1.27916994 [31] 1.17511626 0.92441216 0.74626702 -1.49808298 0.19887969 1.28695747 [37] 0.03703373 1.08947445 0.49570735 -0.82481735 1.78777690 0.46591315 [43] -0.22155330 -0.20493972 -1.00443333 -0.78235307 2.30093079 -0.26275350 [49] -0.37070678 -0.45609269 -0.79869248 -0.88102088 -0.16330667 -0.24838416 [55] -0.46818058 0.22932961 -0.92325010 0.97629344 1.98173331 -1.48793978 [61] 0.63664221 0.76259761 1.17680432 0.13677693 -2.06413412 0.25604891 [67] -0.37663596 1.00530358 -1.34574317 -1.15927030 0.35957944 -0.48588045 [73] 0.60156208 0.13231071 0.25475678 -0.45975559 -0.03131242 -1.77090324 [79] 0.82866824 0.74389658 -1.35571882 -0.42602470 0.61052740 -0.12293686 [85] -0.95333485 0.49498899 -0.90173944 -0.47233398 0.36311224 0.29394580 [91] -0.70554015 1.02640460 2.29204054 -0.38620858 -1.15307293 0.78206383 [97] 1.27898309 0.35884981 -0.01799380 0.83380847 > 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.36614548 -1.04392984 1.63679119 -0.08706667 0.24747131 -1.06752161 [7] -1.02691615 1.31270718 0.64822228 1.17464438 -1.94768081 -0.44567838 [13] 1.02789871 1.39602448 -0.45548754 0.25091180 0.68410237 2.10194694 [19] 0.42096341 -0.02282453 0.39775422 -0.14499111 1.70346294 -0.25597663 [25] 0.57620834 0.58730487 -0.50994426 2.47235125 0.19148235 -1.27916994 [31] 1.17511626 0.92441216 0.74626702 -1.49808298 0.19887969 1.28695747 [37] 0.03703373 1.08947445 0.49570735 -0.82481735 1.78777690 0.46591315 [43] -0.22155330 -0.20493972 -1.00443333 -0.78235307 2.30093079 -0.26275350 [49] -0.37070678 -0.45609269 -0.79869248 -0.88102088 -0.16330667 -0.24838416 [55] -0.46818058 0.22932961 -0.92325010 0.97629344 1.98173331 -1.48793978 [61] 0.63664221 0.76259761 1.17680432 0.13677693 -2.06413412 0.25604891 [67] -0.37663596 1.00530358 -1.34574317 -1.15927030 0.35957944 -0.48588045 [73] 0.60156208 0.13231071 0.25475678 -0.45975559 -0.03131242 -1.77090324 [79] 0.82866824 0.74389658 -1.35571882 -0.42602470 0.61052740 -0.12293686 [85] -0.95333485 0.49498899 -0.90173944 -0.47233398 0.36311224 0.29394580 [91] -0.70554015 1.02640460 2.29204054 -0.38620858 -1.15307293 0.78206383 [97] 1.27898309 0.35884981 -0.01799380 0.83380847 > colMin(tmp) [1] 0.36614548 -1.04392984 1.63679119 -0.08706667 0.24747131 -1.06752161 [7] -1.02691615 1.31270718 0.64822228 1.17464438 -1.94768081 -0.44567838 [13] 1.02789871 1.39602448 -0.45548754 0.25091180 0.68410237 2.10194694 [19] 0.42096341 -0.02282453 0.39775422 -0.14499111 1.70346294 -0.25597663 [25] 0.57620834 0.58730487 -0.50994426 2.47235125 0.19148235 -1.27916994 [31] 1.17511626 0.92441216 0.74626702 -1.49808298 0.19887969 1.28695747 [37] 0.03703373 1.08947445 0.49570735 -0.82481735 1.78777690 0.46591315 [43] -0.22155330 -0.20493972 -1.00443333 -0.78235307 2.30093079 -0.26275350 [49] -0.37070678 -0.45609269 -0.79869248 -0.88102088 -0.16330667 -0.24838416 [55] -0.46818058 0.22932961 -0.92325010 0.97629344 1.98173331 -1.48793978 [61] 0.63664221 0.76259761 1.17680432 0.13677693 -2.06413412 0.25604891 [67] -0.37663596 1.00530358 -1.34574317 -1.15927030 0.35957944 -0.48588045 [73] 0.60156208 0.13231071 0.25475678 -0.45975559 -0.03131242 -1.77090324 [79] 0.82866824 0.74389658 -1.35571882 -0.42602470 0.61052740 -0.12293686 [85] -0.95333485 0.49498899 -0.90173944 -0.47233398 0.36311224 0.29394580 [91] -0.70554015 1.02640460 2.29204054 -0.38620858 -1.15307293 0.78206383 [97] 1.27898309 0.35884981 -0.01799380 0.83380847 > colMedians(tmp) [1] 0.36614548 -1.04392984 1.63679119 -0.08706667 0.24747131 -1.06752161 [7] -1.02691615 1.31270718 0.64822228 1.17464438 -1.94768081 -0.44567838 [13] 1.02789871 1.39602448 -0.45548754 0.25091180 0.68410237 2.10194694 [19] 0.42096341 -0.02282453 0.39775422 -0.14499111 1.70346294 -0.25597663 [25] 0.57620834 0.58730487 -0.50994426 2.47235125 0.19148235 -1.27916994 [31] 1.17511626 0.92441216 0.74626702 -1.49808298 0.19887969 1.28695747 [37] 0.03703373 1.08947445 0.49570735 -0.82481735 1.78777690 0.46591315 [43] -0.22155330 -0.20493972 -1.00443333 -0.78235307 2.30093079 -0.26275350 [49] -0.37070678 -0.45609269 -0.79869248 -0.88102088 -0.16330667 -0.24838416 [55] -0.46818058 0.22932961 -0.92325010 0.97629344 1.98173331 -1.48793978 [61] 0.63664221 0.76259761 1.17680432 0.13677693 -2.06413412 0.25604891 [67] -0.37663596 1.00530358 -1.34574317 -1.15927030 0.35957944 -0.48588045 [73] 0.60156208 0.13231071 0.25475678 -0.45975559 -0.03131242 -1.77090324 [79] 0.82866824 0.74389658 -1.35571882 -0.42602470 0.61052740 -0.12293686 [85] -0.95333485 0.49498899 -0.90173944 -0.47233398 0.36311224 0.29394580 [91] -0.70554015 1.02640460 2.29204054 -0.38620858 -1.15307293 0.78206383 [97] 1.27898309 0.35884981 -0.01799380 0.83380847 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.3661455 -1.04393 1.636791 -0.08706667 0.2474713 -1.067522 -1.026916 [2,] 0.3661455 -1.04393 1.636791 -0.08706667 0.2474713 -1.067522 -1.026916 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.312707 0.6482223 1.174644 -1.947681 -0.4456784 1.027899 1.396024 [2,] 1.312707 0.6482223 1.174644 -1.947681 -0.4456784 1.027899 1.396024 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.4554875 0.2509118 0.6841024 2.101947 0.4209634 -0.02282453 0.3977542 [2,] -0.4554875 0.2509118 0.6841024 2.101947 0.4209634 -0.02282453 0.3977542 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.1449911 1.703463 -0.2559766 0.5762083 0.5873049 -0.5099443 2.472351 [2,] -0.1449911 1.703463 -0.2559766 0.5762083 0.5873049 -0.5099443 2.472351 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.1914824 -1.27917 1.175116 0.9244122 0.746267 -1.498083 0.1988797 [2,] 0.1914824 -1.27917 1.175116 0.9244122 0.746267 -1.498083 0.1988797 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 1.286957 0.03703373 1.089474 0.4957074 -0.8248173 1.787777 0.4659131 [2,] 1.286957 0.03703373 1.089474 0.4957074 -0.8248173 1.787777 0.4659131 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.2215533 -0.2049397 -1.004433 -0.7823531 2.300931 -0.2627535 -0.3707068 [2,] -0.2215533 -0.2049397 -1.004433 -0.7823531 2.300931 -0.2627535 -0.3707068 [,50] [,51] [,52] [,53] [,54] [,55] [1,] -0.4560927 -0.7986925 -0.8810209 -0.1633067 -0.2483842 -0.4681806 [2,] -0.4560927 -0.7986925 -0.8810209 -0.1633067 -0.2483842 -0.4681806 [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] 0.2293296 -0.9232501 0.9762934 1.981733 -1.48794 0.6366422 0.7625976 [2,] 0.2293296 -0.9232501 0.9762934 1.981733 -1.48794 0.6366422 0.7625976 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [1,] 1.176804 0.1367769 -2.064134 0.2560489 -0.376636 1.005304 -1.345743 [2,] 1.176804 0.1367769 -2.064134 0.2560489 -0.376636 1.005304 -1.345743 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] -1.15927 0.3595794 -0.4858804 0.6015621 0.1323107 0.2547568 -0.4597556 [2,] -1.15927 0.3595794 -0.4858804 0.6015621 0.1323107 0.2547568 -0.4597556 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] -0.03131242 -1.770903 0.8286682 0.7438966 -1.355719 -0.4260247 0.6105274 [2,] -0.03131242 -1.770903 0.8286682 0.7438966 -1.355719 -0.4260247 0.6105274 [,84] [,85] [,86] [,87] [,88] [,89] [,90] [1,] -0.1229369 -0.9533349 0.494989 -0.9017394 -0.472334 0.3631122 0.2939458 [2,] -0.1229369 -0.9533349 0.494989 -0.9017394 -0.472334 0.3631122 0.2939458 [,91] [,92] [,93] [,94] [,95] [,96] [,97] [1,] -0.7055402 1.026405 2.292041 -0.3862086 -1.153073 0.7820638 1.278983 [2,] -0.7055402 1.026405 2.292041 -0.3862086 -1.153073 0.7820638 1.278983 [,98] [,99] [,100] [1,] 0.3588498 -0.0179938 0.8338085 [2,] 0.3588498 -0.0179938 0.8338085 > > > Max(tmp2) [1] 2.124983 > Min(tmp2) [1] -2.698073 > mean(tmp2) [1] -0.04805804 > Sum(tmp2) [1] -4.805804 > Var(tmp2) [1] 0.975623 > > rowMeans(tmp2) [1] -0.52435709 -0.58305221 1.96717332 0.99262828 0.50654577 0.90962076 [7] -2.69807348 0.71024173 -0.37973822 0.08641552 -0.96882864 0.98033565 [13] 1.25666279 -1.39942092 -0.64309923 -0.66221206 0.42638149 -1.64597780 [19] -0.62892745 -1.16854051 -0.06876572 -0.90098586 0.07402747 -0.89280193 [25] 0.99908639 0.46633230 1.70048486 0.72917179 -0.84957028 -0.95586743 [31] -0.44648931 -1.89967499 1.06108734 -0.44832574 -0.99096202 0.24765060 [37] 0.55605592 -2.27799714 -0.92994265 -0.56691680 -1.42600106 -0.46489546 [43] 0.80845853 1.26122164 1.97912458 1.12796237 -0.83927139 1.68027613 [49] 0.75112553 2.12498269 -0.04922349 0.02708371 -1.01688740 -0.13854938 [55] 1.73703098 -0.51615556 -0.23778926 -0.54404593 -0.73889830 0.27545190 [61] -0.24709071 1.11552323 -0.73993587 -0.38142190 1.56157884 0.38064242 [67] 0.31437010 -0.95551062 0.07778146 0.38621768 -0.18584004 -0.71558165 [73] -1.75878189 -0.68197672 -0.38599857 0.92212986 -0.33014698 0.14359922 [79] 1.10985288 -0.75567326 0.05211797 0.59195346 0.30913855 -1.60219233 [85] -0.63439605 -0.64426938 -0.76022783 -0.57853571 -0.80784217 -0.51047493 [91] -0.69548834 1.98478621 1.21217328 0.59777263 0.08149557 -0.80798400 [97] 0.98892543 -0.18436042 0.81140967 -0.02391807 > rowSums(tmp2) [1] -0.52435709 -0.58305221 1.96717332 0.99262828 0.50654577 0.90962076 [7] -2.69807348 0.71024173 -0.37973822 0.08641552 -0.96882864 0.98033565 [13] 1.25666279 -1.39942092 -0.64309923 -0.66221206 0.42638149 -1.64597780 [19] -0.62892745 -1.16854051 -0.06876572 -0.90098586 0.07402747 -0.89280193 [25] 0.99908639 0.46633230 1.70048486 0.72917179 -0.84957028 -0.95586743 [31] -0.44648931 -1.89967499 1.06108734 -0.44832574 -0.99096202 0.24765060 [37] 0.55605592 -2.27799714 -0.92994265 -0.56691680 -1.42600106 -0.46489546 [43] 0.80845853 1.26122164 1.97912458 1.12796237 -0.83927139 1.68027613 [49] 0.75112553 2.12498269 -0.04922349 0.02708371 -1.01688740 -0.13854938 [55] 1.73703098 -0.51615556 -0.23778926 -0.54404593 -0.73889830 0.27545190 [61] -0.24709071 1.11552323 -0.73993587 -0.38142190 1.56157884 0.38064242 [67] 0.31437010 -0.95551062 0.07778146 0.38621768 -0.18584004 -0.71558165 [73] -1.75878189 -0.68197672 -0.38599857 0.92212986 -0.33014698 0.14359922 [79] 1.10985288 -0.75567326 0.05211797 0.59195346 0.30913855 -1.60219233 [85] -0.63439605 -0.64426938 -0.76022783 -0.57853571 -0.80784217 -0.51047493 [91] -0.69548834 1.98478621 1.21217328 0.59777263 0.08149557 -0.80798400 [97] 0.98892543 -0.18436042 0.81140967 -0.02391807 > 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.52435709 -0.58305221 1.96717332 0.99262828 0.50654577 0.90962076 [7] -2.69807348 0.71024173 -0.37973822 0.08641552 -0.96882864 0.98033565 [13] 1.25666279 -1.39942092 -0.64309923 -0.66221206 0.42638149 -1.64597780 [19] -0.62892745 -1.16854051 -0.06876572 -0.90098586 0.07402747 -0.89280193 [25] 0.99908639 0.46633230 1.70048486 0.72917179 -0.84957028 -0.95586743 [31] -0.44648931 -1.89967499 1.06108734 -0.44832574 -0.99096202 0.24765060 [37] 0.55605592 -2.27799714 -0.92994265 -0.56691680 -1.42600106 -0.46489546 [43] 0.80845853 1.26122164 1.97912458 1.12796237 -0.83927139 1.68027613 [49] 0.75112553 2.12498269 -0.04922349 0.02708371 -1.01688740 -0.13854938 [55] 1.73703098 -0.51615556 -0.23778926 -0.54404593 -0.73889830 0.27545190 [61] -0.24709071 1.11552323 -0.73993587 -0.38142190 1.56157884 0.38064242 [67] 0.31437010 -0.95551062 0.07778146 0.38621768 -0.18584004 -0.71558165 [73] -1.75878189 -0.68197672 -0.38599857 0.92212986 -0.33014698 0.14359922 [79] 1.10985288 -0.75567326 0.05211797 0.59195346 0.30913855 -1.60219233 [85] -0.63439605 -0.64426938 -0.76022783 -0.57853571 -0.80784217 -0.51047493 [91] -0.69548834 1.98478621 1.21217328 0.59777263 0.08149557 -0.80798400 [97] 0.98892543 -0.18436042 0.81140967 -0.02391807 > rowMin(tmp2) [1] -0.52435709 -0.58305221 1.96717332 0.99262828 0.50654577 0.90962076 [7] -2.69807348 0.71024173 -0.37973822 0.08641552 -0.96882864 0.98033565 [13] 1.25666279 -1.39942092 -0.64309923 -0.66221206 0.42638149 -1.64597780 [19] -0.62892745 -1.16854051 -0.06876572 -0.90098586 0.07402747 -0.89280193 [25] 0.99908639 0.46633230 1.70048486 0.72917179 -0.84957028 -0.95586743 [31] -0.44648931 -1.89967499 1.06108734 -0.44832574 -0.99096202 0.24765060 [37] 0.55605592 -2.27799714 -0.92994265 -0.56691680 -1.42600106 -0.46489546 [43] 0.80845853 1.26122164 1.97912458 1.12796237 -0.83927139 1.68027613 [49] 0.75112553 2.12498269 -0.04922349 0.02708371 -1.01688740 -0.13854938 [55] 1.73703098 -0.51615556 -0.23778926 -0.54404593 -0.73889830 0.27545190 [61] -0.24709071 1.11552323 -0.73993587 -0.38142190 1.56157884 0.38064242 [67] 0.31437010 -0.95551062 0.07778146 0.38621768 -0.18584004 -0.71558165 [73] -1.75878189 -0.68197672 -0.38599857 0.92212986 -0.33014698 0.14359922 [79] 1.10985288 -0.75567326 0.05211797 0.59195346 0.30913855 -1.60219233 [85] -0.63439605 -0.64426938 -0.76022783 -0.57853571 -0.80784217 -0.51047493 [91] -0.69548834 1.98478621 1.21217328 0.59777263 0.08149557 -0.80798400 [97] 0.98892543 -0.18436042 0.81140967 -0.02391807 > > colMeans(tmp2) [1] -0.04805804 > colSums(tmp2) [1] -4.805804 > colVars(tmp2) [1] 0.975623 > colSd(tmp2) [1] 0.9877363 > colMax(tmp2) [1] 2.124983 > colMin(tmp2) [1] -2.698073 > colMedians(tmp2) [1] -0.1851002 > colRanges(tmp2) [,1] [1,] -2.698073 [2,] 2.124983 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 3.6975350 -0.5799293 -1.4366712 -1.5779715 -0.0874160 1.8426754 [7] 4.2452247 2.7905542 -3.4842785 -0.7750615 > colApply(tmp,quantile)[,1] [,1] [1,] -0.6359250 [2,] -0.3036759 [3,] 0.1833959 [4,] 0.7598342 [5,] 2.2207914 > > rowApply(tmp,sum) [1] -1.2989740 -1.3538479 4.7912759 0.1242031 0.3981894 -2.9947741 [7] 0.7354458 1.3458427 2.5884868 0.2988136 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 3 5 3 8 6 7 4 6 10 9 [2,] 6 10 4 3 8 6 6 3 1 2 [3,] 8 3 5 1 1 5 3 7 9 10 [4,] 7 2 2 5 5 1 8 8 5 7 [5,] 4 4 8 6 4 10 2 4 7 5 [6,] 1 6 1 7 10 8 5 9 6 6 [7,] 2 8 10 9 7 2 1 10 8 1 [8,] 10 9 7 10 9 4 7 2 2 3 [9,] 9 1 9 2 2 3 10 5 3 4 [10,] 5 7 6 4 3 9 9 1 4 8 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.5765772 2.7283726 2.5807220 -0.9667996 -4.0408537 0.2254131 [7] -1.7242431 4.7552601 -0.3212797 -0.5732189 0.9985870 2.2122432 [13] 0.3086475 -1.5776530 0.9125493 2.5773613 1.0991611 -4.0069023 [19] 2.6502459 -1.2655789 > colApply(tmp,quantile)[,1] [,1] [1,] -0.449720433 [2,] -0.357223775 [3,] -0.232989976 [4,] -0.005759976 [5,] 0.469116955 > > rowApply(tmp,sum) [1] 0.480656 2.927125 -1.985269 2.361302 2.211643 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 11 4 9 11 7 [2,] 19 19 14 1 17 [3,] 9 9 20 8 18 [4,] 15 18 1 6 5 [5,] 4 1 5 18 1 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.469116955 1.3689136 -0.11783273 0.7743103 -1.2957836 0.74725150 [2,] -0.449720433 1.4999797 -0.09737775 1.4949705 -1.7507815 -0.26564832 [3,] -0.232989976 0.2715766 1.80927190 -2.2524244 -0.9885732 -0.39300416 [4,] -0.005759976 -1.2740273 -0.19442149 -0.4333402 1.3313821 -0.05973877 [5,] -0.357223775 0.8619301 1.18108205 -0.5503157 -1.3370975 0.19655283 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.12960401 1.43073483 0.5272359 0.40563656 -0.5911433 0.8140600 [2,] 0.43129835 2.34039069 0.4058678 -0.40908170 -0.3266127 0.2395012 [3,] 0.20864214 0.55079721 -1.4664376 -0.49407988 1.5503035 -0.1733920 [4,] 0.05423632 0.41036252 -0.5905342 -0.02216444 0.2187888 0.6093867 [5,] -1.28881584 0.02297488 0.8025883 -0.05352944 0.1472507 0.7226874 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.42939004 -0.6162460 0.7095517 0.8581140 -1.3276132 -1.51890499 [2,] -0.27824663 0.8206046 -0.8202114 -1.3677181 0.4576520 -0.09210754 [3,] 0.14336666 0.4640470 -0.1242169 1.3841885 1.0132195 -1.54424713 [4,] 0.77681883 -1.1951305 -0.2297590 1.5947426 0.1707556 -0.47196433 [5,] 0.09609863 -1.0509282 1.3771849 0.1080343 0.7851471 -0.37967833 [,19] [,20] [1,] 1.2969746 -1.8947262 [2,] 0.3045770 0.7897889 [3,] -0.5313250 -1.1799918 [4,] 2.1708948 -0.4992256 [5,] -0.5908755 1.5185757 > > > 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 : 563 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.6159119 -0.7882071 0.2755559 1.029721 -0.5180099 -0.7316382 -0.2611391 col8 col9 col10 col11 col12 col13 col14 row1 0.8020906 -0.3054616 0.1083084 0.3454712 -0.5993113 0.7234893 1.274494 col15 col16 col17 col18 col19 col20 row1 1.100604 -1.034456 -0.3457 0.01660001 -0.9777604 -0.4313283 > tmp[,"col10"] col10 row1 0.1083084 row2 -1.1840425 row3 -1.2341339 row4 0.4837738 row5 -0.7060670 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.6159119 -0.7882071 0.2755559 1.029721 -0.5180099 -0.7316382 -0.2611391 row5 0.7523357 -0.1657117 0.6098372 -2.133312 -0.4842520 -1.4049493 -1.0828202 col8 col9 col10 col11 col12 col13 col14 row1 0.8020906 -0.3054616 0.1083084 0.3454712 -0.5993113 0.7234893 1.2744940 row5 -0.6192342 1.4875965 -0.7060670 1.7818804 -0.7565308 -1.6726328 0.5574759 col15 col16 col17 col18 col19 col20 row1 1.1006041 -1.034456 -0.3457 0.01660001 -0.9777604 -0.4313283 row5 -0.4787169 -1.165566 -1.0672 1.21710858 0.9167480 1.0327901 > tmp[,c("col6","col20")] col6 col20 row1 -0.7316382 -0.4313283 row2 0.3146451 -1.6268272 row3 -0.3821779 0.4168867 row4 0.5591828 -0.4904769 row5 -1.4049493 1.0327901 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.7316382 -0.4313283 row5 -1.4049493 1.0327901 > > > > > 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 48.28772 51.53701 49.21406 49.65064 49.17881 105.4265 50.70862 47.68597 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.36251 50.62757 49.38618 49.15882 51.33475 48.56311 48.6246 51.22167 col17 col18 col19 col20 row1 50.46282 51.29133 49.49932 102.5618 > tmp[,"col10"] col10 row1 50.62757 row2 30.27165 row3 30.24577 row4 27.64466 row5 49.55783 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 48.28772 51.53701 49.21406 49.65064 49.17881 105.4265 50.70862 47.68597 row5 50.25781 49.87780 48.81343 52.88084 49.85695 105.6913 49.88577 50.75668 col9 col10 col11 col12 col13 col14 col15 col16 row1 48.36251 50.62757 49.38618 49.15882 51.33475 48.56311 48.62460 51.22167 row5 50.53133 49.55783 50.53353 48.92151 49.09390 48.94175 49.50427 49.79204 col17 col18 col19 col20 row1 50.46282 51.29133 49.49932 102.5618 row5 50.43376 48.79454 49.56719 106.4972 > tmp[,c("col6","col20")] col6 col20 row1 105.42649 102.56185 row2 72.51070 74.83536 row3 75.64912 73.91737 row4 75.38661 75.55806 row5 105.69125 106.49725 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 105.4265 102.5618 row5 105.6913 106.4972 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 105.4265 102.5618 row5 105.6913 106.4972 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.52889215 [2,] 0.81163074 [3,] -1.53419145 [4,] -0.01187501 [5,] -1.20675878 > tmp[,c("col17","col7")] col17 col7 [1,] -0.9338357 0.7864248 [2,] -0.2894997 -0.4028384 [3,] 0.6422587 -0.6664964 [4,] 0.9132827 -2.0652058 [5,] 1.6912712 1.6056101 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.5214462 0.44232468 [2,] 0.9915572 -0.01505199 [3,] 0.6321889 -0.80699888 [4,] -0.5931306 -0.75961223 [5,] -0.3086705 1.23828417 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.5214462 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.5214462 [2,] 0.9915572 > > > > 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.5798333 -1.679450 0.3510528 -0.3237293 -0.7605153 -0.1379001 -1.6568883 row1 0.2347717 3.155419 0.4616634 -1.2438237 -0.3994505 0.6905609 0.9358266 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 0.7090385 -1.57426 1.7661576 -2.5213282 0.7204119 0.09684708 -1.7413076 row1 -0.1934394 -1.51763 0.5903966 0.3665725 -0.9612124 -0.02567667 -0.6344762 [,15] [,16] [,17] [,18] [,19] [,20] row3 1.2462459 -0.2772970 -0.1914239 0.3299133 0.5097274 1.5787455 row1 -0.3399882 0.6039871 -0.3415032 -1.6893731 -0.9283899 -0.8659647 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.6265967 -2.039448 1.407798 0.02780042 -0.3187547 0.3567234 -2.094765 [,8] [,9] [,10] row2 -0.5755149 -0.7580794 0.4911564 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.1477931 -2.0114 1.678998 -0.2397539 0.06753721 -1.316749 0.05103367 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.9457583 -1.085094 1.909871 -0.9677728 -2.205289 -0.1547468 0.6364865 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.6773983 -2.271514 1.016075 -2.24698 -0.7086759 -2.335037 > > > 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: 0x6000021604e0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd69435a5cb7d" [2] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd69417d2970f" [3] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd6942bb6601" [4] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd6945d25cd0d" [5] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd6945cb94041" [6] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd6946299af6" [7] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd694157c8fa3" [8] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd69424ba215a" [9] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd69437e3ae8c" [10] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd69444d885fe" [11] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd69463450a01" [12] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd6944993fa91" [13] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd69412276b54" [14] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd69459f7611b" [15] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMd694861c2" > > > ### 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: 0x600002174360> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600002174360> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600002174360> > rowMedians(tmp) [1] 0.367299969 -0.190835746 0.069159192 0.044698726 -0.094772033 [6] 0.621379925 -0.218870639 0.551165539 -0.031263947 0.476010263 [11] 0.047002996 0.046452220 0.220219736 -0.123671358 0.209983578 [16] 0.004387557 0.453823119 0.122938649 0.209656454 -0.023272053 [21] -0.348594991 0.357012971 0.034470819 -0.118428350 -0.101251355 [26] -0.044947349 -0.432513308 0.233160993 -0.061740785 0.066793116 [31] 0.135913583 0.615706833 0.241519317 0.290370463 -0.299544131 [36] -0.488758187 0.438750142 0.283243408 -0.663309099 -0.042133675 [41] 0.053695213 -0.120144408 0.026218351 -0.058611528 -0.277676018 [46] -0.271601212 -0.421374466 0.877835382 -0.149692329 -0.156491146 [51] 0.138264452 0.044888077 -1.041493127 -0.557759504 0.259049172 [56] -0.030617807 0.478743232 -0.262130029 0.446376322 0.449235438 [61] 0.297852462 0.247937120 -0.001765414 0.331399091 0.059279756 [66] -0.242956191 -0.537189870 0.659560700 -0.029079550 0.154113996 [71] 0.336591328 -0.259253925 0.320872759 0.143603576 -0.298336063 [76] 0.526842607 -0.209810075 -0.249034464 0.164115926 0.361482314 [81] 0.320105184 -0.051894876 0.438809966 0.536215081 -0.280915163 [86] -0.036152526 0.149467038 0.341592934 0.367031909 -0.333813323 [91] -0.362645854 0.552766415 0.096152268 0.264885924 0.526906148 [96] 0.250321142 0.630678908 0.247005626 -0.411742087 -0.269318139 [101] -0.123020063 -0.063612280 0.433886128 0.751911513 0.155036684 [106] 0.189637505 0.181892439 -0.478259271 0.772835680 0.156330203 [111] 0.289745255 -0.450069931 -0.560407799 0.254837309 0.101779472 [116] -0.242445814 -0.052857956 -0.616345648 -0.062124701 0.297074370 [121] 0.174923853 -0.145273781 0.326080660 -0.147375118 -0.099023367 [126] 0.279905597 -0.023302612 0.574792454 -0.452115733 0.215622215 [131] 0.242036249 0.632299922 0.141395051 0.999264545 -0.036813779 [136] -0.152109246 -0.825799157 -0.065441785 0.130912840 -0.221201377 [141] -0.146840016 0.250205874 0.040848684 0.324758083 -0.049432589 [146] 0.243239445 0.094138628 0.006092007 -0.119190012 -0.086044776 [151] 0.104695604 -0.185564838 0.280357727 -0.196370586 0.264578010 [156] 0.274137774 0.094915195 0.438219006 0.278210087 0.062710728 [161] 0.436902876 0.680415635 0.488394286 -0.069989413 -0.125017974 [166] -0.134118821 -0.537264343 0.001937718 -0.369850121 0.070330539 [171] 0.049896511 0.093122530 -0.773287442 0.179195643 -0.246938512 [176] -0.089506207 -0.243259286 -0.122504096 -0.020898579 -0.269526130 [181] 0.286075588 -0.005556781 -0.425254743 -0.029007072 0.288249022 [186] 0.581546475 0.264517191 0.221043693 0.083727853 0.384329185 [191] 0.265514482 0.326286277 0.425930434 -0.005411561 0.158775242 [196] -0.277308710 0.885421652 -0.309764305 -0.631186113 0.162245818 [201] -0.368887336 0.556116352 -0.132205120 -0.265847345 0.019186743 [206] 0.305164577 0.365488763 -0.153743932 -0.041951726 -0.431402778 [211] 0.240023464 -0.320878611 0.396306934 0.046841738 -0.205419843 [216] 0.128093640 -0.033416000 -0.352466576 -0.008988647 -0.466339808 [221] 0.065153176 0.178628761 -0.611031344 0.040484568 0.102304704 [226] 0.205491261 0.143294445 0.117910568 -0.036905400 -0.043978403 > > proc.time() user system elapsed 1.975 8.049 10.372
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: aarch64-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: 0x60000098c5a0> > .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: 0x60000098c5a0> > .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: 0x60000098c5a0> > .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: 0x60000098c5a0> > 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: 0x60000098c660> > .Call("R_bm_AddColumn",P) <pointer: 0x60000098c660> > .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: 0x60000098c660> > .Call("R_bm_AddColumn",P) <pointer: 0x60000098c660> > .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: 0x60000098c660> > 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: 0x60000098c840> > .Call("R_bm_AddColumn",P) <pointer: 0x60000098c840> > .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: 0x60000098c840> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x60000098c840> > .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: 0x60000098c840> > > .Call("R_bm_RowMode",P) <pointer: 0x60000098c840> > .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: 0x60000098c840> > > .Call("R_bm_ColMode",P) <pointer: 0x60000098c840> > .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: 0x60000098c840> > 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: 0x60000098ca20> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x60000098ca20> > .Call("R_bm_AddColumn",P) <pointer: 0x60000098ca20> > .Call("R_bm_AddColumn",P) <pointer: 0x60000098ca20> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFiled6ef1b0d1da9" "BufferedMatrixFiled6ef7a16501e" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFiled6ef1b0d1da9" "BufferedMatrixFiled6ef7a16501e" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x60000098ccc0> > .Call("R_bm_AddColumn",P) <pointer: 0x60000098ccc0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x60000098ccc0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x60000098ccc0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x60000098ccc0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x60000098ccc0> > .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: 0x60000098cea0> > .Call("R_bm_AddColumn",P) <pointer: 0x60000098cea0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x60000098cea0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x60000098cea0> > 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: 0x60000098d080> > .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: 0x60000098d080> > rm(P) > > proc.time() user system elapsed 0.344 0.102 0.432
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: aarch64-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.342 0.074 0.404