Back to Multiple platform build/check report for BioC 3.19: simplified long |
|
This page was generated on 2024-06-11 14:43 -0400 (Tue, 11 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" | 4757 |
palomino3 | Windows Server 2022 Datacenter | x64 | 4.4.0 (2024-04-24 ucrt) -- "Puppy Cup" | 4491 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.4.0 (2024-04-24) -- "Puppy Cup" | 4522 |
kjohnson3 | macOS 13.6.5 Ventura | arm64 | 4.4.0 (2024-04-24) -- "Puppy Cup" | 4468 |
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 | ![]() | ||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | ![]() | ||||||||
kjohnson3 | macOS 13.6.5 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-10 09:19:15 -0400 (Mon, 10 Jun 2024) |
EndedAt: 2024-06-10 09:20:24 -0400 (Mon, 10 Jun 2024) |
EllapsedTime: 68.8 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.5 * 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.1.0.2.5)’ * 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.1.0.2.5)’ 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.308 0.111 0.666
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 1035428 55.3 NA 638594 34.2 Vcells 877590 6.7 8388608 64.0 196608 2071959 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 10 09:19:50 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 10 09:19:51 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: 0x6000034e4420> > > > > 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 10 09:19:54 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 10 09:19:56 2024" > > ColMode(tmp2) <pointer: 0x6000034e4420> > > > > ### 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.29517710 2.6436427 -0.8559527 -1.5802022 [2,] 2.07410171 0.5089009 1.7764464 0.0654507 [3,] -0.02480884 -0.8396206 -0.6516109 -0.2342465 [4,] -0.59090522 0.7992017 0.7116273 -1.5050856 > 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.29517710 2.6436427 0.8559527 1.5802022 [2,] 2.07410171 0.5089009 1.7764464 0.0654507 [3,] 0.02480884 0.8396206 0.6516109 0.2342465 [4,] 0.59090522 0.7992017 0.7116273 1.5050856 > 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.9646965 1.6259282 0.9251771 1.2570609 [2,] 1.4401742 0.7133729 1.3328340 0.2558334 [3,] 0.1575082 0.9163081 0.8072242 0.4839902 [4,] 0.7687036 0.8939808 0.8435800 1.2268193 > > 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.94214 43.90293 35.10772 39.15081 [2,] 41.47584 32.64263 40.10479 27.62378 [3,] 26.59989 35.00270 33.72385 30.07415 [4,] 33.27794 34.73901 34.14743 38.77328 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x6000034fc000> > exp(tmp5) <pointer: 0x6000034fc000> > log(tmp5,2) <pointer: 0x6000034fc000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.1062 > Min(tmp5) [1] 52.81437 > mean(tmp5) [1] 73.64227 > Sum(tmp5) [1] 14728.45 > Var(tmp5) [1] 856.3295 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 94.65133 70.51346 70.48196 71.02770 70.06640 69.68049 76.16423 71.89046 [9] 72.11783 69.82879 > rowSums(tmp5) [1] 1893.027 1410.269 1409.639 1420.554 1401.328 1393.610 1523.285 1437.809 [9] 1442.357 1396.576 > rowVars(tmp5) [1] 7730.40544 68.23326 49.33676 23.30500 90.01001 95.03717 [7] 65.74296 91.80258 101.77976 102.98628 > rowSd(tmp5) [1] 87.922724 8.260342 7.024013 4.827525 9.487360 9.748701 8.108203 [8] 9.581366 10.088595 10.148216 > rowMax(tmp5) [1] 466.10623 86.32653 82.08234 80.70150 85.62210 96.81082 96.41427 [8] 87.34243 93.89106 89.74421 > rowMin(tmp5) [1] 54.67855 57.13828 55.36419 61.97274 52.81437 53.42374 63.18104 53.66709 [9] 58.03513 54.66616 > > colMeans(tmp5) [1] 113.03564 74.39495 73.36872 70.87539 73.95290 70.63582 71.45989 [8] 71.03299 73.70126 72.56500 71.01902 74.72609 70.07764 66.53961 [15] 73.00021 73.19050 70.53515 70.56004 69.04699 69.12749 > colSums(tmp5) [1] 1130.3564 743.9495 733.6872 708.7539 739.5290 706.3582 714.5989 [8] 710.3299 737.0126 725.6500 710.1902 747.2609 700.7764 665.3961 [15] 730.0021 731.9050 705.3515 705.6004 690.4699 691.2749 > colVars(tmp5) [1] 15568.60508 97.26248 89.63346 109.21229 84.35885 57.61347 [7] 121.65344 62.23560 100.02910 64.45925 66.09946 41.72660 [13] 58.93428 32.32827 76.74640 38.96260 143.63832 39.94609 [19] 92.52640 83.44173 > colSd(tmp5) [1] 124.774216 9.862174 9.467495 10.450468 9.184707 7.590354 [7] 11.029662 7.888954 10.001455 8.028652 8.130157 6.459613 [13] 7.676866 5.685796 8.760502 6.242003 11.984920 6.320292 [19] 9.619064 9.134644 > colMax(tmp5) [1] 466.10623 91.37819 83.47286 83.40515 93.89106 85.15354 91.20756 [8] 81.63448 89.74421 86.27880 79.41485 81.82356 82.08234 72.07240 [15] 96.41427 83.83881 89.87700 80.35568 82.90223 84.01143 > colMin(tmp5) [1] 52.81437 61.70522 54.66616 57.42825 61.23422 58.89975 57.13828 58.03513 [9] 60.14210 59.05504 57.50278 60.68974 61.97274 53.66709 66.15828 62.67600 [17] 53.42374 61.08500 54.40269 54.67855 > > > ### 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] 94.65133 70.51346 70.48196 71.02770 70.06640 NA 76.16423 71.89046 [9] 72.11783 69.82879 > rowSums(tmp5) [1] 1893.027 1410.269 1409.639 1420.554 1401.328 NA 1523.285 1437.809 [9] 1442.357 1396.576 > rowVars(tmp5) [1] 7730.40544 68.23326 49.33676 23.30500 90.01001 98.31676 [7] 65.74296 91.80258 101.77976 102.98628 > rowSd(tmp5) [1] 87.922724 8.260342 7.024013 4.827525 9.487360 9.915481 8.108203 [8] 9.581366 10.088595 10.148216 > rowMax(tmp5) [1] 466.10623 86.32653 82.08234 80.70150 85.62210 NA 96.41427 [8] 87.34243 93.89106 89.74421 > rowMin(tmp5) [1] 54.67855 57.13828 55.36419 61.97274 52.81437 NA 63.18104 53.66709 [9] 58.03513 54.66616 > > colMeans(tmp5) [1] 113.03564 74.39495 73.36872 70.87539 NA 70.63582 71.45989 [8] 71.03299 73.70126 72.56500 71.01902 74.72609 70.07764 66.53961 [15] 73.00021 73.19050 70.53515 70.56004 69.04699 69.12749 > colSums(tmp5) [1] 1130.3564 743.9495 733.6872 708.7539 NA 706.3582 714.5989 [8] 710.3299 737.0126 725.6500 710.1902 747.2609 700.7764 665.3961 [15] 730.0021 731.9050 705.3515 705.6004 690.4699 691.2749 > colVars(tmp5) [1] 15568.60508 97.26248 89.63346 109.21229 NA 57.61347 [7] 121.65344 62.23560 100.02910 64.45925 66.09946 41.72660 [13] 58.93428 32.32827 76.74640 38.96260 143.63832 39.94609 [19] 92.52640 83.44173 > colSd(tmp5) [1] 124.774216 9.862174 9.467495 10.450468 NA 7.590354 [7] 11.029662 7.888954 10.001455 8.028652 8.130157 6.459613 [13] 7.676866 5.685796 8.760502 6.242003 11.984920 6.320292 [19] 9.619064 9.134644 > colMax(tmp5) [1] 466.10623 91.37819 83.47286 83.40515 NA 85.15354 91.20756 [8] 81.63448 89.74421 86.27880 79.41485 81.82356 82.08234 72.07240 [15] 96.41427 83.83881 89.87700 80.35568 82.90223 84.01143 > colMin(tmp5) [1] 52.81437 61.70522 54.66616 57.42825 NA 58.89975 57.13828 58.03513 [9] 60.14210 59.05504 57.50278 60.68974 61.97274 53.66709 66.15828 62.67600 [17] 53.42374 61.08500 54.40269 54.67855 > > Max(tmp5,na.rm=TRUE) [1] 466.1062 > Min(tmp5,na.rm=TRUE) [1] 52.81437 > mean(tmp5,na.rm=TRUE) [1] 73.63279 > Sum(tmp5,na.rm=TRUE) [1] 14652.92 > Var(tmp5,na.rm=TRUE) [1] 860.6364 > > rowMeans(tmp5,na.rm=TRUE) [1] 94.65133 70.51346 70.48196 71.02770 70.06640 69.37268 76.16423 71.89046 [9] 72.11783 69.82879 > rowSums(tmp5,na.rm=TRUE) [1] 1893.027 1410.269 1409.639 1420.554 1401.328 1318.081 1523.285 1437.809 [9] 1442.357 1396.576 > rowVars(tmp5,na.rm=TRUE) [1] 7730.40544 68.23326 49.33676 23.30500 90.01001 98.31676 [7] 65.74296 91.80258 101.77976 102.98628 > rowSd(tmp5,na.rm=TRUE) [1] 87.922724 8.260342 7.024013 4.827525 9.487360 9.915481 8.108203 [8] 9.581366 10.088595 10.148216 > rowMax(tmp5,na.rm=TRUE) [1] 466.10623 86.32653 82.08234 80.70150 85.62210 96.81082 96.41427 [8] 87.34243 93.89106 89.74421 > rowMin(tmp5,na.rm=TRUE) [1] 54.67855 57.13828 55.36419 61.97274 52.81437 53.42374 63.18104 53.66709 [9] 58.03513 54.66616 > > colMeans(tmp5,na.rm=TRUE) [1] 113.03564 74.39495 73.36872 70.87539 73.77778 70.63582 71.45989 [8] 71.03299 73.70126 72.56500 71.01902 74.72609 70.07764 66.53961 [15] 73.00021 73.19050 70.53515 70.56004 69.04699 69.12749 > colSums(tmp5,na.rm=TRUE) [1] 1130.3564 743.9495 733.6872 708.7539 664.0000 706.3582 714.5989 [8] 710.3299 737.0126 725.6500 710.1902 747.2609 700.7764 665.3961 [15] 730.0021 731.9050 705.3515 705.6004 690.4699 691.2749 > colVars(tmp5,na.rm=TRUE) [1] 15568.60508 97.26248 89.63346 109.21229 94.55871 57.61347 [7] 121.65344 62.23560 100.02910 64.45925 66.09946 41.72660 [13] 58.93428 32.32827 76.74640 38.96260 143.63832 39.94609 [19] 92.52640 83.44173 > colSd(tmp5,na.rm=TRUE) [1] 124.774216 9.862174 9.467495 10.450468 9.724131 7.590354 [7] 11.029662 7.888954 10.001455 8.028652 8.130157 6.459613 [13] 7.676866 5.685796 8.760502 6.242003 11.984920 6.320292 [19] 9.619064 9.134644 > colMax(tmp5,na.rm=TRUE) [1] 466.10623 91.37819 83.47286 83.40515 93.89106 85.15354 91.20756 [8] 81.63448 89.74421 86.27880 79.41485 81.82356 82.08234 72.07240 [15] 96.41427 83.83881 89.87700 80.35568 82.90223 84.01143 > colMin(tmp5,na.rm=TRUE) [1] 52.81437 61.70522 54.66616 57.42825 61.23422 58.89975 57.13828 58.03513 [9] 60.14210 59.05504 57.50278 60.68974 61.97274 53.66709 66.15828 62.67600 [17] 53.42374 61.08500 54.40269 54.67855 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 94.65133 70.51346 70.48196 71.02770 70.06640 NaN 76.16423 71.89046 [9] 72.11783 69.82879 > rowSums(tmp5,na.rm=TRUE) [1] 1893.027 1410.269 1409.639 1420.554 1401.328 0.000 1523.285 1437.809 [9] 1442.357 1396.576 > rowVars(tmp5,na.rm=TRUE) [1] 7730.40544 68.23326 49.33676 23.30500 90.01001 NA [7] 65.74296 91.80258 101.77976 102.98628 > rowSd(tmp5,na.rm=TRUE) [1] 87.922724 8.260342 7.024013 4.827525 9.487360 NA 8.108203 [8] 9.581366 10.088595 10.148216 > rowMax(tmp5,na.rm=TRUE) [1] 466.10623 86.32653 82.08234 80.70150 85.62210 NA 96.41427 [8] 87.34243 93.89106 89.74421 > rowMin(tmp5,na.rm=TRUE) [1] 54.67855 57.13828 55.36419 61.97274 52.81437 NA 63.18104 53.66709 [9] 58.03513 54.66616 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 114.83840 74.12093 72.40973 71.00827 NaN 70.72550 71.19745 [8] 71.61108 73.76988 74.06611 72.18603 74.31489 70.97797 66.19461 [15] 73.50535 74.35878 72.43642 71.61282 68.63002 69.90723 > colSums(tmp5,na.rm=TRUE) [1] 1033.5456 667.0884 651.6875 639.0745 0.0000 636.5295 640.7771 [8] 644.4998 663.9289 666.5950 649.6743 668.8340 638.8017 595.7515 [15] 661.5482 669.2290 651.9278 644.5154 617.6702 629.1650 > colVars(tmp5,na.rm=TRUE) [1] 17478.11894 108.57555 90.49135 122.66518 NA 64.72467 [7] 136.08529 66.25537 112.47976 47.16679 59.04052 45.04022 [13] 57.18201 35.03035 83.46909 28.47812 120.92636 32.47041 [19] 102.13619 87.03207 > colSd(tmp5,na.rm=TRUE) [1] 132.204837 10.419959 9.512694 11.075431 NA 8.045165 [7] 11.665560 8.139740 10.605648 6.867809 7.683783 6.711201 [13] 7.561879 5.918645 9.136142 5.336489 10.996652 5.698281 [19] 10.106245 9.329098 > colMax(tmp5,na.rm=TRUE) [1] 466.10623 91.37819 83.47286 83.40515 -Inf 85.15354 91.20756 [8] 81.63448 89.74421 86.27880 79.41485 81.82356 82.08234 72.07240 [15] 96.41427 83.83881 89.87700 80.35568 82.90223 84.01143 > colMin(tmp5,na.rm=TRUE) [1] 52.81437 61.70522 54.66616 57.42825 Inf 58.89975 57.13828 58.03513 [9] 60.14210 62.73080 57.50278 60.68974 61.97274 53.66709 66.15828 67.48651 [17] 59.96536 63.26946 54.40269 54.67855 > > > > > 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] 198.9218 196.9489 303.4738 375.3972 293.0378 130.8366 223.1092 268.9588 [9] 148.6933 285.0858 > apply(copymatrix,1,var,na.rm=TRUE) [1] 198.9218 196.9489 303.4738 375.3972 293.0378 130.8366 223.1092 268.9588 [9] 148.6933 285.0858 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] -1.136868e-13 2.842171e-14 -5.684342e-14 -1.421085e-13 0.000000e+00 [6] -5.684342e-14 1.136868e-13 -1.136868e-13 0.000000e+00 -2.131628e-14 [11] -5.684342e-14 -1.136868e-13 0.000000e+00 0.000000e+00 -1.136868e-13 [16] 8.526513e-14 -1.705303e-13 0.000000e+00 8.526513e-14 -1.421085e-13 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 2 4 3 13 10 2 7 13 10 17 2 3 4 2 4 13 1 4 10 10 9 18 8 2 1 20 7 18 4 4 4 9 1 12 9 17 8 13 7 20 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.436686 > Min(tmp) [1] -2.631122 > mean(tmp) [1] -0.004059254 > Sum(tmp) [1] -0.4059254 > Var(tmp) [1] 0.8817628 > > rowMeans(tmp) [1] -0.004059254 > rowSums(tmp) [1] -0.4059254 > rowVars(tmp) [1] 0.8817628 > rowSd(tmp) [1] 0.9390222 > rowMax(tmp) [1] 2.436686 > rowMin(tmp) [1] -2.631122 > > colMeans(tmp) [1] 1.20219846 -0.57164183 0.54655050 -1.64778666 1.93114718 0.55190516 [7] 1.35653507 -0.04710218 -1.80286077 -0.56411595 -0.86953913 2.43668569 [13] 0.78980083 0.45568311 -0.52412657 0.09022109 -0.10289902 -0.40157522 [19] 0.28734367 -1.26897598 0.47976655 -0.66509807 0.11791320 0.60588616 [25] 1.25544294 0.04312127 0.87501019 1.12335849 0.12301756 -1.00278849 [31] 0.18060513 -0.26362175 0.17519309 -0.71336642 0.07211476 -0.24785444 [37] -0.34089684 0.28907504 -0.98105132 -0.01055591 -1.61277668 0.53260900 [43] -2.63112223 -0.45536204 0.03990396 -2.14229099 -1.14622282 0.78487982 [49] -0.43476298 0.45847687 0.87728249 1.85231276 -0.88559608 0.71681826 [55] -1.31459227 -0.78868458 0.09436508 0.50186676 0.35919333 0.50821266 [61] -0.00186002 1.11153830 -0.52790666 -0.63938950 -0.60980325 -0.09507241 [67] -0.50184786 -2.15852097 1.08356816 0.74329894 0.17142565 0.83056844 [73] -0.72014572 -1.57484809 0.44479901 0.52727679 1.17163490 0.44224141 [79] 0.26486053 1.86531119 -0.55645686 -0.49798397 0.71893835 -0.18411459 [85] -1.30130092 0.37733568 0.68633594 -1.75062382 0.29774528 -0.12707467 [91] -1.25677290 -0.27894466 -0.10671057 0.11242651 0.09558842 1.11419625 [97] 0.58905278 1.50295911 -0.10086889 0.15599036 > colSums(tmp) [1] 1.20219846 -0.57164183 0.54655050 -1.64778666 1.93114718 0.55190516 [7] 1.35653507 -0.04710218 -1.80286077 -0.56411595 -0.86953913 2.43668569 [13] 0.78980083 0.45568311 -0.52412657 0.09022109 -0.10289902 -0.40157522 [19] 0.28734367 -1.26897598 0.47976655 -0.66509807 0.11791320 0.60588616 [25] 1.25544294 0.04312127 0.87501019 1.12335849 0.12301756 -1.00278849 [31] 0.18060513 -0.26362175 0.17519309 -0.71336642 0.07211476 -0.24785444 [37] -0.34089684 0.28907504 -0.98105132 -0.01055591 -1.61277668 0.53260900 [43] -2.63112223 -0.45536204 0.03990396 -2.14229099 -1.14622282 0.78487982 [49] -0.43476298 0.45847687 0.87728249 1.85231276 -0.88559608 0.71681826 [55] -1.31459227 -0.78868458 0.09436508 0.50186676 0.35919333 0.50821266 [61] -0.00186002 1.11153830 -0.52790666 -0.63938950 -0.60980325 -0.09507241 [67] -0.50184786 -2.15852097 1.08356816 0.74329894 0.17142565 0.83056844 [73] -0.72014572 -1.57484809 0.44479901 0.52727679 1.17163490 0.44224141 [79] 0.26486053 1.86531119 -0.55645686 -0.49798397 0.71893835 -0.18411459 [85] -1.30130092 0.37733568 0.68633594 -1.75062382 0.29774528 -0.12707467 [91] -1.25677290 -0.27894466 -0.10671057 0.11242651 0.09558842 1.11419625 [97] 0.58905278 1.50295911 -0.10086889 0.15599036 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] 1.20219846 -0.57164183 0.54655050 -1.64778666 1.93114718 0.55190516 [7] 1.35653507 -0.04710218 -1.80286077 -0.56411595 -0.86953913 2.43668569 [13] 0.78980083 0.45568311 -0.52412657 0.09022109 -0.10289902 -0.40157522 [19] 0.28734367 -1.26897598 0.47976655 -0.66509807 0.11791320 0.60588616 [25] 1.25544294 0.04312127 0.87501019 1.12335849 0.12301756 -1.00278849 [31] 0.18060513 -0.26362175 0.17519309 -0.71336642 0.07211476 -0.24785444 [37] -0.34089684 0.28907504 -0.98105132 -0.01055591 -1.61277668 0.53260900 [43] -2.63112223 -0.45536204 0.03990396 -2.14229099 -1.14622282 0.78487982 [49] -0.43476298 0.45847687 0.87728249 1.85231276 -0.88559608 0.71681826 [55] -1.31459227 -0.78868458 0.09436508 0.50186676 0.35919333 0.50821266 [61] -0.00186002 1.11153830 -0.52790666 -0.63938950 -0.60980325 -0.09507241 [67] -0.50184786 -2.15852097 1.08356816 0.74329894 0.17142565 0.83056844 [73] -0.72014572 -1.57484809 0.44479901 0.52727679 1.17163490 0.44224141 [79] 0.26486053 1.86531119 -0.55645686 -0.49798397 0.71893835 -0.18411459 [85] -1.30130092 0.37733568 0.68633594 -1.75062382 0.29774528 -0.12707467 [91] -1.25677290 -0.27894466 -0.10671057 0.11242651 0.09558842 1.11419625 [97] 0.58905278 1.50295911 -0.10086889 0.15599036 > colMin(tmp) [1] 1.20219846 -0.57164183 0.54655050 -1.64778666 1.93114718 0.55190516 [7] 1.35653507 -0.04710218 -1.80286077 -0.56411595 -0.86953913 2.43668569 [13] 0.78980083 0.45568311 -0.52412657 0.09022109 -0.10289902 -0.40157522 [19] 0.28734367 -1.26897598 0.47976655 -0.66509807 0.11791320 0.60588616 [25] 1.25544294 0.04312127 0.87501019 1.12335849 0.12301756 -1.00278849 [31] 0.18060513 -0.26362175 0.17519309 -0.71336642 0.07211476 -0.24785444 [37] -0.34089684 0.28907504 -0.98105132 -0.01055591 -1.61277668 0.53260900 [43] -2.63112223 -0.45536204 0.03990396 -2.14229099 -1.14622282 0.78487982 [49] -0.43476298 0.45847687 0.87728249 1.85231276 -0.88559608 0.71681826 [55] -1.31459227 -0.78868458 0.09436508 0.50186676 0.35919333 0.50821266 [61] -0.00186002 1.11153830 -0.52790666 -0.63938950 -0.60980325 -0.09507241 [67] -0.50184786 -2.15852097 1.08356816 0.74329894 0.17142565 0.83056844 [73] -0.72014572 -1.57484809 0.44479901 0.52727679 1.17163490 0.44224141 [79] 0.26486053 1.86531119 -0.55645686 -0.49798397 0.71893835 -0.18411459 [85] -1.30130092 0.37733568 0.68633594 -1.75062382 0.29774528 -0.12707467 [91] -1.25677290 -0.27894466 -0.10671057 0.11242651 0.09558842 1.11419625 [97] 0.58905278 1.50295911 -0.10086889 0.15599036 > colMedians(tmp) [1] 1.20219846 -0.57164183 0.54655050 -1.64778666 1.93114718 0.55190516 [7] 1.35653507 -0.04710218 -1.80286077 -0.56411595 -0.86953913 2.43668569 [13] 0.78980083 0.45568311 -0.52412657 0.09022109 -0.10289902 -0.40157522 [19] 0.28734367 -1.26897598 0.47976655 -0.66509807 0.11791320 0.60588616 [25] 1.25544294 0.04312127 0.87501019 1.12335849 0.12301756 -1.00278849 [31] 0.18060513 -0.26362175 0.17519309 -0.71336642 0.07211476 -0.24785444 [37] -0.34089684 0.28907504 -0.98105132 -0.01055591 -1.61277668 0.53260900 [43] -2.63112223 -0.45536204 0.03990396 -2.14229099 -1.14622282 0.78487982 [49] -0.43476298 0.45847687 0.87728249 1.85231276 -0.88559608 0.71681826 [55] -1.31459227 -0.78868458 0.09436508 0.50186676 0.35919333 0.50821266 [61] -0.00186002 1.11153830 -0.52790666 -0.63938950 -0.60980325 -0.09507241 [67] -0.50184786 -2.15852097 1.08356816 0.74329894 0.17142565 0.83056844 [73] -0.72014572 -1.57484809 0.44479901 0.52727679 1.17163490 0.44224141 [79] 0.26486053 1.86531119 -0.55645686 -0.49798397 0.71893835 -0.18411459 [85] -1.30130092 0.37733568 0.68633594 -1.75062382 0.29774528 -0.12707467 [91] -1.25677290 -0.27894466 -0.10671057 0.11242651 0.09558842 1.11419625 [97] 0.58905278 1.50295911 -0.10086889 0.15599036 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.202198 -0.5716418 0.5465505 -1.647787 1.931147 0.5519052 1.356535 [2,] 1.202198 -0.5716418 0.5465505 -1.647787 1.931147 0.5519052 1.356535 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.04710218 -1.802861 -0.564116 -0.8695391 2.436686 0.7898008 0.4556831 [2,] -0.04710218 -1.802861 -0.564116 -0.8695391 2.436686 0.7898008 0.4556831 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.5241266 0.09022109 -0.102899 -0.4015752 0.2873437 -1.268976 0.4797665 [2,] -0.5241266 0.09022109 -0.102899 -0.4015752 0.2873437 -1.268976 0.4797665 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.6650981 0.1179132 0.6058862 1.255443 0.04312127 0.8750102 1.123358 [2,] -0.6650981 0.1179132 0.6058862 1.255443 0.04312127 0.8750102 1.123358 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.1230176 -1.002788 0.1806051 -0.2636217 0.1751931 -0.7133664 0.07211476 [2,] 0.1230176 -1.002788 0.1806051 -0.2636217 0.1751931 -0.7133664 0.07211476 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.2478544 -0.3408968 0.289075 -0.9810513 -0.01055591 -1.612777 0.532609 [2,] -0.2478544 -0.3408968 0.289075 -0.9810513 -0.01055591 -1.612777 0.532609 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -2.631122 -0.455362 0.03990396 -2.142291 -1.146223 0.7848798 -0.434763 [2,] -2.631122 -0.455362 0.03990396 -2.142291 -1.146223 0.7848798 -0.434763 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.4584769 0.8772825 1.852313 -0.8855961 0.7168183 -1.314592 -0.7886846 [2,] 0.4584769 0.8772825 1.852313 -0.8855961 0.7168183 -1.314592 -0.7886846 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.09436508 0.5018668 0.3591933 0.5082127 -0.00186002 1.111538 -0.5279067 [2,] 0.09436508 0.5018668 0.3591933 0.5082127 -0.00186002 1.111538 -0.5279067 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.6393895 -0.6098032 -0.09507241 -0.5018479 -2.158521 1.083568 0.7432989 [2,] -0.6393895 -0.6098032 -0.09507241 -0.5018479 -2.158521 1.083568 0.7432989 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.1714257 0.8305684 -0.7201457 -1.574848 0.444799 0.5272768 1.171635 [2,] 0.1714257 0.8305684 -0.7201457 -1.574848 0.444799 0.5272768 1.171635 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.4422414 0.2648605 1.865311 -0.5564569 -0.497984 0.7189384 -0.1841146 [2,] 0.4422414 0.2648605 1.865311 -0.5564569 -0.497984 0.7189384 -0.1841146 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -1.301301 0.3773357 0.6863359 -1.750624 0.2977453 -0.1270747 -1.256773 [2,] -1.301301 0.3773357 0.6863359 -1.750624 0.2977453 -0.1270747 -1.256773 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.2789447 -0.1067106 0.1124265 0.09558842 1.114196 0.5890528 1.502959 [2,] -0.2789447 -0.1067106 0.1124265 0.09558842 1.114196 0.5890528 1.502959 [,99] [,100] [1,] -0.1008689 0.1559904 [2,] -0.1008689 0.1559904 > > > Max(tmp2) [1] 2.543069 > Min(tmp2) [1] -2.468658 > mean(tmp2) [1] 0.006144812 > Sum(tmp2) [1] 0.6144812 > Var(tmp2) [1] 1.054346 > > rowMeans(tmp2) [1] -0.18936567 -0.49422888 -0.11041593 -2.33714032 0.15626636 -2.13061884 [7] 0.74773400 -0.22794981 -0.58034562 0.69991097 -1.14547482 -0.16873042 [13] -0.83489996 -1.84360129 -1.00700528 0.00623175 -0.26832974 -0.28489252 [19] -0.45622802 0.81814220 1.55656750 0.17941100 -0.77658367 0.80095011 [25] 1.19489791 -0.95660386 -0.29304481 1.24383567 0.19020080 -1.31840442 [31] 1.30291495 0.82742636 0.46920778 1.78773093 -0.36152162 0.11999913 [37] -1.34624205 0.92793347 -0.71545923 0.89465304 0.60867863 -0.04091906 [43] 1.17858715 1.53148725 -0.32683597 0.42363393 -0.18036629 1.67679640 [49] 0.92376355 -0.46536031 -0.28284976 0.50016564 0.47282925 -0.88365188 [55] 0.10983770 1.70983772 -0.39287325 -0.08423148 0.56647468 -0.47376293 [61] 0.83996975 1.13429697 -1.03810553 1.55866652 0.50582191 0.14463640 [67] -2.21098381 1.79438922 -1.30400360 -0.43309546 -1.32227455 2.54306914 [73] 0.96573631 -0.72298488 -1.01702058 0.76221042 0.70586188 0.10986273 [79] 0.69262819 -0.10775318 0.08927187 0.33345354 -2.46865830 1.70913907 [85] 0.22264478 -0.31348523 -1.49287742 1.35535090 -0.83978210 0.58757062 [91] -0.18098505 -1.87848064 -1.09331181 0.29875170 1.14138746 0.17934260 [97] -0.74173272 -1.65811103 -0.71886455 -0.16523845 > rowSums(tmp2) [1] -0.18936567 -0.49422888 -0.11041593 -2.33714032 0.15626636 -2.13061884 [7] 0.74773400 -0.22794981 -0.58034562 0.69991097 -1.14547482 -0.16873042 [13] -0.83489996 -1.84360129 -1.00700528 0.00623175 -0.26832974 -0.28489252 [19] -0.45622802 0.81814220 1.55656750 0.17941100 -0.77658367 0.80095011 [25] 1.19489791 -0.95660386 -0.29304481 1.24383567 0.19020080 -1.31840442 [31] 1.30291495 0.82742636 0.46920778 1.78773093 -0.36152162 0.11999913 [37] -1.34624205 0.92793347 -0.71545923 0.89465304 0.60867863 -0.04091906 [43] 1.17858715 1.53148725 -0.32683597 0.42363393 -0.18036629 1.67679640 [49] 0.92376355 -0.46536031 -0.28284976 0.50016564 0.47282925 -0.88365188 [55] 0.10983770 1.70983772 -0.39287325 -0.08423148 0.56647468 -0.47376293 [61] 0.83996975 1.13429697 -1.03810553 1.55866652 0.50582191 0.14463640 [67] -2.21098381 1.79438922 -1.30400360 -0.43309546 -1.32227455 2.54306914 [73] 0.96573631 -0.72298488 -1.01702058 0.76221042 0.70586188 0.10986273 [79] 0.69262819 -0.10775318 0.08927187 0.33345354 -2.46865830 1.70913907 [85] 0.22264478 -0.31348523 -1.49287742 1.35535090 -0.83978210 0.58757062 [91] -0.18098505 -1.87848064 -1.09331181 0.29875170 1.14138746 0.17934260 [97] -0.74173272 -1.65811103 -0.71886455 -0.16523845 > 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.18936567 -0.49422888 -0.11041593 -2.33714032 0.15626636 -2.13061884 [7] 0.74773400 -0.22794981 -0.58034562 0.69991097 -1.14547482 -0.16873042 [13] -0.83489996 -1.84360129 -1.00700528 0.00623175 -0.26832974 -0.28489252 [19] -0.45622802 0.81814220 1.55656750 0.17941100 -0.77658367 0.80095011 [25] 1.19489791 -0.95660386 -0.29304481 1.24383567 0.19020080 -1.31840442 [31] 1.30291495 0.82742636 0.46920778 1.78773093 -0.36152162 0.11999913 [37] -1.34624205 0.92793347 -0.71545923 0.89465304 0.60867863 -0.04091906 [43] 1.17858715 1.53148725 -0.32683597 0.42363393 -0.18036629 1.67679640 [49] 0.92376355 -0.46536031 -0.28284976 0.50016564 0.47282925 -0.88365188 [55] 0.10983770 1.70983772 -0.39287325 -0.08423148 0.56647468 -0.47376293 [61] 0.83996975 1.13429697 -1.03810553 1.55866652 0.50582191 0.14463640 [67] -2.21098381 1.79438922 -1.30400360 -0.43309546 -1.32227455 2.54306914 [73] 0.96573631 -0.72298488 -1.01702058 0.76221042 0.70586188 0.10986273 [79] 0.69262819 -0.10775318 0.08927187 0.33345354 -2.46865830 1.70913907 [85] 0.22264478 -0.31348523 -1.49287742 1.35535090 -0.83978210 0.58757062 [91] -0.18098505 -1.87848064 -1.09331181 0.29875170 1.14138746 0.17934260 [97] -0.74173272 -1.65811103 -0.71886455 -0.16523845 > rowMin(tmp2) [1] -0.18936567 -0.49422888 -0.11041593 -2.33714032 0.15626636 -2.13061884 [7] 0.74773400 -0.22794981 -0.58034562 0.69991097 -1.14547482 -0.16873042 [13] -0.83489996 -1.84360129 -1.00700528 0.00623175 -0.26832974 -0.28489252 [19] -0.45622802 0.81814220 1.55656750 0.17941100 -0.77658367 0.80095011 [25] 1.19489791 -0.95660386 -0.29304481 1.24383567 0.19020080 -1.31840442 [31] 1.30291495 0.82742636 0.46920778 1.78773093 -0.36152162 0.11999913 [37] -1.34624205 0.92793347 -0.71545923 0.89465304 0.60867863 -0.04091906 [43] 1.17858715 1.53148725 -0.32683597 0.42363393 -0.18036629 1.67679640 [49] 0.92376355 -0.46536031 -0.28284976 0.50016564 0.47282925 -0.88365188 [55] 0.10983770 1.70983772 -0.39287325 -0.08423148 0.56647468 -0.47376293 [61] 0.83996975 1.13429697 -1.03810553 1.55866652 0.50582191 0.14463640 [67] -2.21098381 1.79438922 -1.30400360 -0.43309546 -1.32227455 2.54306914 [73] 0.96573631 -0.72298488 -1.01702058 0.76221042 0.70586188 0.10986273 [79] 0.69262819 -0.10775318 0.08927187 0.33345354 -2.46865830 1.70913907 [85] 0.22264478 -0.31348523 -1.49287742 1.35535090 -0.83978210 0.58757062 [91] -0.18098505 -1.87848064 -1.09331181 0.29875170 1.14138746 0.17934260 [97] -0.74173272 -1.65811103 -0.71886455 -0.16523845 > > colMeans(tmp2) [1] 0.006144812 > colSums(tmp2) [1] 0.6144812 > colVars(tmp2) [1] 1.054346 > colSd(tmp2) [1] 1.026813 > colMax(tmp2) [1] 2.543069 > colMin(tmp2) [1] -2.468658 > colMedians(tmp2) [1] -0.01734366 > colRanges(tmp2) [,1] [1,] -2.468658 [2,] 2.543069 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 0.4451257 -4.0279537 -2.6122193 -2.6269252 -3.8013152 -2.8436966 [7] -1.5868374 -1.0564436 -1.5475074 -0.1155095 > colApply(tmp,quantile)[,1] [,1] [1,] -1.6881830 [2,] -0.4703481 [3,] 0.2439216 [4,] 0.6408898 [5,] 1.3711549 > > rowApply(tmp,sum) [1] -2.1585975 2.6079442 -3.1935097 -5.9342667 -5.1067913 -3.2065707 [7] 2.5538955 -4.6981058 0.7453338 -1.3826138 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 8 2 5 10 7 10 6 2 4 4 [2,] 9 6 6 8 2 6 9 9 1 2 [3,] 3 3 1 9 9 3 5 6 8 5 [4,] 1 9 9 7 6 7 1 10 7 1 [5,] 7 1 7 6 1 8 8 4 3 3 [6,] 2 8 2 1 10 4 10 1 10 7 [7,] 4 7 8 5 3 9 2 7 2 6 [8,] 5 5 4 2 5 5 7 8 5 10 [9,] 10 10 3 4 4 1 3 3 9 8 [10,] 6 4 10 3 8 2 4 5 6 9 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.33368820 1.65548787 1.42953411 -1.38901137 2.30778306 2.29822728 [7] 4.97756970 0.05317474 3.43745059 -0.59754948 -3.98500543 0.13890518 [13] -4.30388310 -4.56012385 -1.32849694 0.02347283 3.12811188 -0.79190548 [19] -1.33997575 4.28165515 > colApply(tmp,quantile)[,1] [,1] [1,] -1.0298165 [2,] -0.6750947 [3,] 0.4733890 [4,] 1.1565578 [5,] 1.4086526 > > rowApply(tmp,sum) [1] -2.2454453 9.4136342 0.1416414 3.3606319 -3.9013532 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 7 17 17 2 16 [2,] 13 7 19 7 14 [3,] 14 20 11 16 1 [4,] 1 13 16 3 13 [5,] 19 5 15 19 10 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.6750947 0.20877575 0.28874731 -2.10758272 1.3957427 1.7062914 [2,] 1.4086526 -0.05121956 2.42942004 0.99014032 -0.5290722 -0.6410565 [3,] 1.1565578 1.55989811 -0.04374757 0.48055632 0.4433480 0.4428321 [4,] -1.0298165 -0.44142667 1.14185273 -0.85069576 1.4063104 0.1646387 [5,] 0.4733890 0.37946024 -2.38673840 0.09857047 -0.4085459 0.6255216 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.1895966 -2.0138346 0.9602185 -0.79864993 -0.9250573 -0.001968055 [2,] 1.5548004 0.6847724 2.0494457 1.03599878 -1.8672918 1.220682005 [3,] 1.9468270 -1.2850080 -0.4822157 -0.09637035 -0.6813160 -1.414988293 [4,] -0.2676787 2.2833494 1.2518888 -0.26188696 0.2231564 1.204522577 [5,] 1.9332176 0.3838956 -0.3418866 -0.47664101 -0.7344968 -0.869343056 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.8610441 -0.0876153 -1.81750032 0.6926464 0.04039727 0.5495229 [2,] -0.4111586 -1.1595882 0.42177124 1.3059360 0.64063873 -1.0933160 [3,] -1.7878828 -0.9789872 -0.07474073 -0.1479267 0.13000459 0.1374697 [4,] -1.0707771 -0.7387502 0.68149212 -0.6927004 0.57820803 0.7654336 [5,] -0.1730205 -1.5951830 -0.53951925 -1.1344825 1.73886326 -1.1510158 [,19] [,20] [1,] 0.1892097 1.2009463 [2,] 0.7097346 0.7143442 [3,] -0.5558992 1.3932305 [4,] -0.6168185 -0.3696700 [5,] -1.0662024 1.3428042 > > > 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 : 650 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 : 561 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.7468447 1.014731 -0.6541466 1.915556 0.7558318 0.4079504 -0.7341605 col8 col9 col10 col11 col12 col13 col14 row1 1.397979 0.3232919 -0.4599379 -0.1997621 1.657768 -1.838922 0.8163056 col15 col16 col17 col18 col19 col20 row1 1.182087 2.174139 0.3614371 -0.7883007 1.222672 0.8187385 > tmp[,"col10"] col10 row1 -0.4599379 row2 -1.2635732 row3 1.3683632 row4 -1.2356463 row5 -0.8590428 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -0.7468447 1.0147307 -0.6541466 1.915556 0.7558318 0.4079504 -0.7341605 row5 -1.3437953 0.2016591 0.5395488 1.943719 -0.3273265 -0.6944125 1.6638427 col8 col9 col10 col11 col12 col13 col14 row1 1.3979794 0.3232919 -0.4599379 -0.1997621 1.657768 -1.838922 0.8163056 row5 -0.1358489 -0.5559453 -0.8590428 -0.2252108 -1.401174 -0.311500 -0.4503803 col15 col16 col17 col18 col19 col20 row1 1.182087 2.1741387 0.3614371 -0.7883007 1.222672 0.8187385 row5 -1.116439 -0.5366035 1.9721249 -0.2662612 2.475952 -1.3310323 > tmp[,c("col6","col20")] col6 col20 row1 0.4079504 0.818738522 row2 1.8158023 1.091100348 row3 -0.7766488 0.004468343 row4 -1.4390666 0.669826954 row5 -0.6944125 -1.331032268 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.4079504 0.8187385 row5 -0.6944125 -1.3310323 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.65536 50.51893 50.93621 50.89454 49.31897 103.9062 50.03507 49.72148 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.31848 50.37812 49.0836 51.67778 50.0869 49.84438 50.92208 50.6521 col17 col18 col19 col20 row1 50.62072 49.62897 50.61617 103.4137 > tmp[,"col10"] col10 row1 50.37812 row2 30.23420 row3 30.54441 row4 29.41459 row5 50.11099 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.65536 50.51893 50.93621 50.89454 49.31897 103.9062 50.03507 49.72148 row5 49.29894 50.70289 50.28535 50.14155 49.18788 104.9772 51.46189 49.67805 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.31848 50.37812 49.08360 51.67778 50.08690 49.84438 50.92208 50.65210 row5 50.17320 50.11099 49.25467 51.22464 49.85833 49.99762 49.75973 50.79415 col17 col18 col19 col20 row1 50.62072 49.62897 50.61617 103.4137 row5 48.89446 49.10322 51.70421 104.4988 > tmp[,c("col6","col20")] col6 col20 row1 103.90619 103.41369 row2 75.73223 74.67513 row3 76.29492 73.32492 row4 74.02562 75.23964 row5 104.97718 104.49883 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 103.9062 103.4137 row5 104.9772 104.4988 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 103.9062 103.4137 row5 104.9772 104.4988 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -1.6011444 [2,] -0.8852302 [3,] -1.4206294 [4,] 0.9715424 [5,] 0.8879443 > tmp[,c("col17","col7")] col17 col7 [1,] 0.1047450 -0.60397809 [2,] 1.1647957 0.04676274 [3,] 0.8897653 -0.29414297 [4,] 2.5328156 -0.48489731 [5,] -0.7273210 -0.01582728 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.6548301 -0.03616064 [2,] 1.1019328 1.51530039 [3,] 0.8869845 0.79679429 [4,] -1.5609816 0.52795602 [5,] -1.1430493 1.65126149 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.6548301 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.6548301 [2,] 1.1019328 > > > > 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.1684102 0.2125155 -0.4201960 0.8631546 -0.4505709 1.6370386 1.1211654 row1 -0.4707284 -0.4628876 -0.9675828 1.5914611 -1.7980602 0.5126598 0.4354359 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 -0.3692491 -1.6932558 0.1239695 -1.0902006 0.65189496 0.1214324 0.8285547 row1 -0.4023581 0.6912576 -0.8203412 -0.2727441 0.05838215 0.4800628 0.3467660 [,15] [,16] [,17] [,18] [,19] [,20] row3 0.6538503 0.6104617 -0.3828214 0.115631 0.6735836 -0.8938249 row1 0.7380382 0.3023669 0.5940671 -2.574375 0.4527088 0.5954775 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.3653395 -0.553759 0.5883055 0.4003346 -0.2131767 -0.2059548 0.4630673 [,8] [,9] [,10] row2 -1.068516 -0.7178749 0.2475886 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -1.448676 -0.5568051 0.5929516 -0.6906471 -1.340402 -1.100481 -0.458616 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.2253726 1.067866 0.1150588 0.7302363 3.861832 1.353364 -1.836019 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.915545 0.5764589 -0.2567756 0.08306938 -0.7140557 0.1830306 > > > 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: 0x6000034e4480> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46facb6daae" [2] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa38cedc07" [3] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa14cf6cb4" [4] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa3de9a818" [5] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa371adf69" [6] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa454182c2" [7] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa4fefb213" [8] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa1942665" [9] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa2564b1b2" [10] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa75ce304b" [11] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa33c4c859" [12] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa3c3d659c" [13] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa62da03a9" [14] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa57267ef2" [15] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BM46fa20586e91" > > > ### 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: 0x6000034e06c0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6000034e06c0> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6000034e06c0> > rowMedians(tmp) [1] -0.245093984 0.124402278 0.054235426 -0.486619037 0.070659410 [6] 0.267852829 0.041335988 -0.161007104 -0.262475785 -0.236569097 [11] 0.437105306 -0.573658926 0.041782942 0.228120104 0.092840471 [16] -0.060482811 0.869209921 -0.107740604 -0.476161894 -0.544532395 [21] 0.413499348 0.450351850 0.315089927 0.015437158 0.159881532 [26] 0.044926084 0.143350562 -0.244896334 -0.283921802 -0.176652656 [31] -0.004286301 -0.006533376 0.110820336 -0.039044332 0.356755034 [36] -0.154441347 -0.702376354 0.241284875 -0.466467155 0.416437785 [41] -0.032689224 0.291720849 0.101746956 0.181360754 0.103695872 [46] 0.051811788 0.028475348 -0.482155523 0.586454512 0.202585725 [51] -0.245606974 0.442833230 0.155386494 -0.947906807 0.143841188 [56] -0.009145024 0.052514094 0.079113298 0.180209757 -0.417649193 [61] 0.369432919 -0.520064898 -0.327371723 -0.295795370 0.274051880 [66] -0.448110052 0.270673752 0.393436840 0.545728719 -0.259027523 [71] 0.044086031 -0.033806676 0.127321495 -0.139433154 0.200649328 [76] 0.027895446 -0.358447217 -0.672134257 -0.359407887 -0.218878325 [81] 0.265434820 0.325392030 0.190783549 -0.527390329 -0.032291873 [86] -0.272369949 -0.322495261 -0.081180874 0.275365361 0.354003615 [91] 0.006589315 0.230334368 -0.215608750 -0.146274694 -0.349445556 [96] 0.083794534 0.437185404 -0.262965985 -0.111847968 -0.208181162 [101] 0.445809393 0.265128443 0.062882563 -0.356801909 -0.888013504 [106] 0.159543613 0.003285667 -0.259287509 -0.106909666 0.216737588 [111] 0.124131401 -0.081454464 -0.743003049 -0.095627793 0.525645021 [116] -0.025670705 -0.201010159 -0.286879017 0.193972000 -0.097299903 [121] 0.155152463 -0.428997107 -0.427727019 0.012286047 -0.182061005 [126] -0.537237938 0.414274529 -0.086984762 0.452465146 0.252090584 [131] 0.132806029 -0.026436708 -0.743681561 0.191228738 -0.033628873 [136] -0.300263555 0.132945533 0.791569247 -0.028172409 -0.311381992 [141] -0.236334111 -0.110615762 -0.015701003 -0.131971414 0.427039998 [146] -0.411947857 0.059852760 0.105434014 0.115773832 0.169163454 [151] -0.069541789 0.117326645 -0.397670320 0.072924697 -0.272467193 [156] -0.086850787 -0.368703957 -0.480065060 -0.357674065 0.558594034 [161] 0.029558404 0.664058620 -0.024382959 -0.133720302 0.146073978 [166] 0.439808527 0.249583265 -0.108792922 -0.017971529 0.421035848 [171] -0.071601453 0.171507572 -0.156523341 0.401930650 -0.318382338 [176] 0.078377175 -0.039166279 -0.183654801 -0.362499825 -0.065363131 [181] -0.336811534 0.473991422 0.288918528 0.324460805 0.124376753 [186] 0.217059223 0.055585359 0.129819782 0.292358493 0.135239018 [191] -0.311169269 0.063454912 0.130168657 -0.076875032 -0.027942307 [196] -0.164448253 -0.707266273 0.461604909 -0.017449781 0.140966473 [201] 0.169956278 0.137505223 0.137542907 0.259319933 0.361839900 [206] -0.107307891 0.297003742 0.303912525 0.228873287 -0.433518447 [211] 0.257472101 0.175685675 0.290480418 0.161311901 -0.021734430 [216] 0.356258880 -0.232854445 -0.631522812 0.011790357 0.088659794 [221] -0.330169942 -0.208937711 0.344888275 -0.034079920 -0.460138690 [226] 0.257084753 0.074557361 0.454232567 0.087123966 0.333672927 > > proc.time() user system elapsed 2.137 7.982 16.565
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: 0x600000f6c2a0> > .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: 0x600000f6c2a0> > .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: 0x600000f6c2a0> > .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: 0x600000f6c2a0> > 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: 0x600000f64660> > .Call("R_bm_AddColumn",P) <pointer: 0x600000f64660> > .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: 0x600000f64660> > .Call("R_bm_AddColumn",P) <pointer: 0x600000f64660> > .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: 0x600000f64660> > 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: 0x600000f7c060> > .Call("R_bm_AddColumn",P) <pointer: 0x600000f7c060> > .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: 0x600000f7c060> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600000f7c060> > .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: 0x600000f7c060> > > .Call("R_bm_RowMode",P) <pointer: 0x600000f7c060> > .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: 0x600000f7c060> > > .Call("R_bm_ColMode",P) <pointer: 0x600000f7c060> > .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: 0x600000f7c060> > 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: 0x600000f7c240> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600000f7c240> > .Call("R_bm_AddColumn",P) <pointer: 0x600000f7c240> > .Call("R_bm_AddColumn",P) <pointer: 0x600000f7c240> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile487d2059aee5" "BufferedMatrixFile487d5fe94cfa" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile487d2059aee5" "BufferedMatrixFile487d5fe94cfa" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600000f7c4e0> > .Call("R_bm_AddColumn",P) <pointer: 0x600000f7c4e0> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600000f7c4e0> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600000f7c4e0> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600000f7c4e0> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600000f7c4e0> > .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: 0x600000f7c6c0> > .Call("R_bm_AddColumn",P) <pointer: 0x600000f7c6c0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600000f7c6c0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600000f7c6c0> > 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: 0x600000f7c8a0> > .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: 0x600000f7c8a0> > rm(P) > > proc.time() user system elapsed 0.311 0.113 0.810
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.298 0.086 0.587