Back to Multiple platform build/check report for BioC 3.19: simplified long |
|
This page was generated on 2024-05-30 11:35:27 -0400 (Thu, 30 May 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" | 4753 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.4.0 (2024-04-24) -- "Puppy Cup" | 4518 |
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 | |||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson3 | macOS 13.6.5 Ventura / arm64 | see weekly results here | ||||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.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-05-29 19:29:17 -0400 (Wed, 29 May 2024) |
EndedAt: 2024-05-29 19:30:08 -0400 (Wed, 29 May 2024) |
EllapsedTime: 50.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: x86_64-apple-darwin20 * R was compiled by Apple clang version 14.0.0 (clang-1400.0.29.202) GNU Fortran (GCC) 12.2.0 * running under: macOS Monterey 12.7.1 * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.68.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... WARNING Found the following significant warnings: doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] See ‘/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking sizes of PDF files under ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.4.0 (2024-04-24) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.321 0.140 0.448
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.0 (2024-04-24) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells 474174 25.4 1035461 55.3 NA 638642 34.2 Vcells 877658 6.7 8388608 64.0 98304 2071719 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] "Wed May 29 19:29:40 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] "Wed May 29 19:29:41 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: 0x60000199c000> > > > > 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] "Wed May 29 19:29:45 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] "Wed May 29 19:29:46 2024" > > ColMode(tmp2) <pointer: 0x60000199c000> > > > > ### 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.9640931 0.2387396 0.19475808 0.1291332 [2,] -1.4879895 -0.2283391 0.25277664 -0.4967603 [3,] -1.0021099 1.6620123 -1.16109885 0.5142397 [4,] -0.4826543 -0.7310833 0.04068888 -1.8068400 > 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.9640931 0.2387396 0.19475808 0.1291332 [2,] 1.4879895 0.2283391 0.25277664 0.4967603 [3,] 1.0021099 1.6620123 1.16109885 0.5142397 [4,] 0.4826543 0.7310833 0.04068888 1.8068400 > 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.9982045 0.4886098 0.4413140 0.3593511 [2,] 1.2198318 0.4778484 0.5027690 0.7048122 [3,] 1.0010544 1.2891906 1.0775430 0.7171051 [4,] 0.6947332 0.8550341 0.2017148 1.3441875 > > 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,] 224.94614 30.12484 29.60790 28.72264 [2,] 38.68631 30.00682 30.28047 32.54488 [3,] 36.01265 39.55392 36.93653 32.68529 [4,] 32.42999 34.28142 27.05784 40.24872 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600001980000> > exp(tmp5) <pointer: 0x600001980000> > log(tmp5,2) <pointer: 0x600001980000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 468.1959 > Min(tmp5) [1] 54.59661 > mean(tmp5) [1] 71.86686 > Sum(tmp5) [1] 14373.37 > Var(tmp5) [1] 860.3736 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 86.12892 68.20734 70.38335 73.27153 68.42929 73.23262 71.38833 71.20847 [9] 69.53516 66.88362 > rowSums(tmp5) [1] 1722.578 1364.147 1407.667 1465.431 1368.586 1464.652 1427.767 1424.169 [9] 1390.703 1337.672 > rowVars(tmp5) [1] 8126.16472 63.98037 69.72413 42.70449 77.05611 100.01844 [7] 63.70412 68.10447 42.59433 77.66554 > rowSd(tmp5) [1] 90.145242 7.998773 8.350098 6.534867 8.778161 10.000922 7.981486 [8] 8.252543 6.526433 8.812805 > rowMax(tmp5) [1] 468.19591 88.36543 82.32630 84.77378 85.33443 90.07810 89.05189 [8] 86.26693 82.17334 92.38534 > rowMin(tmp5) [1] 56.13559 59.38771 58.36359 56.31734 54.59661 58.71710 59.91861 55.41448 [9] 59.94278 54.80035 > > colMeans(tmp5) [1] 112.01689 73.06412 69.64266 69.75496 71.23412 69.80700 66.65507 [8] 69.92842 71.06570 68.30499 69.39051 67.20486 69.16147 72.76439 [15] 65.45432 70.89654 72.74218 68.56825 73.10527 66.57556 > colSums(tmp5) [1] 1120.1689 730.6412 696.4266 697.5496 712.3412 698.0700 666.5507 [8] 699.2842 710.6570 683.0499 693.9051 672.0486 691.6147 727.6439 [15] 654.5432 708.9654 727.4218 685.6825 731.0527 665.7556 > colVars(tmp5) [1] 15716.11023 82.47029 68.55709 72.89306 102.19311 76.91138 [7] 90.28200 91.89058 69.54433 51.99572 80.34331 35.93284 [13] 39.93966 58.14387 62.90008 99.00855 38.27451 36.92869 [19] 111.14978 48.35839 > colSd(tmp5) [1] 125.363911 9.081315 8.279921 8.537743 10.109061 8.769913 [7] 9.501684 9.585957 8.339324 7.210806 8.963443 5.994401 [13] 6.319783 7.625213 7.930957 9.950304 6.186639 6.076898 [19] 10.542760 6.954020 > colMax(tmp5) [1] 468.19591 92.38534 82.17334 83.77243 89.56625 84.08747 90.07810 [8] 88.36543 84.77378 86.26693 82.34823 74.93957 78.09504 84.45718 [15] 81.15924 83.53829 83.27022 79.30925 89.05189 80.26686 > colMin(tmp5) [1] 63.52227 62.45527 56.31734 59.78242 57.40041 58.36359 54.80035 57.55234 [9] 54.59661 60.02490 55.69238 59.23475 60.19273 61.29076 56.13559 55.33618 [17] 61.17230 60.76366 59.38771 57.47079 > > > ### 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] 86.12892 68.20734 70.38335 73.27153 68.42929 73.23262 71.38833 71.20847 [9] 69.53516 NA > rowSums(tmp5) [1] 1722.578 1364.147 1407.667 1465.431 1368.586 1464.652 1427.767 1424.169 [9] 1390.703 NA > rowVars(tmp5) [1] 8126.16472 63.98037 69.72413 42.70449 77.05611 100.01844 [7] 63.70412 68.10447 42.59433 81.97014 > rowSd(tmp5) [1] 90.145242 7.998773 8.350098 6.534867 8.778161 10.000922 7.981486 [8] 8.252543 6.526433 9.053736 > rowMax(tmp5) [1] 468.19591 88.36543 82.32630 84.77378 85.33443 90.07810 89.05189 [8] 86.26693 82.17334 NA > rowMin(tmp5) [1] 56.13559 59.38771 58.36359 56.31734 54.59661 58.71710 59.91861 55.41448 [9] 59.94278 NA > > colMeans(tmp5) [1] 112.01689 73.06412 69.64266 69.75496 71.23412 69.80700 66.65507 [8] 69.92842 71.06570 68.30499 69.39051 NA 69.16147 72.76439 [15] 65.45432 70.89654 72.74218 68.56825 73.10527 66.57556 > colSums(tmp5) [1] 1120.1689 730.6412 696.4266 697.5496 712.3412 698.0700 666.5507 [8] 699.2842 710.6570 683.0499 693.9051 NA 691.6147 727.6439 [15] 654.5432 708.9654 727.4218 685.6825 731.0527 665.7556 > colVars(tmp5) [1] 15716.11023 82.47029 68.55709 72.89306 102.19311 76.91138 [7] 90.28200 91.89058 69.54433 51.99572 80.34331 NA [13] 39.93966 58.14387 62.90008 99.00855 38.27451 36.92869 [19] 111.14978 48.35839 > colSd(tmp5) [1] 125.363911 9.081315 8.279921 8.537743 10.109061 8.769913 [7] 9.501684 9.585957 8.339324 7.210806 8.963443 NA [13] 6.319783 7.625213 7.930957 9.950304 6.186639 6.076898 [19] 10.542760 6.954020 > colMax(tmp5) [1] 468.19591 92.38534 82.17334 83.77243 89.56625 84.08747 90.07810 [8] 88.36543 84.77378 86.26693 82.34823 NA 78.09504 84.45718 [15] 81.15924 83.53829 83.27022 79.30925 89.05189 80.26686 > colMin(tmp5) [1] 63.52227 62.45527 56.31734 59.78242 57.40041 58.36359 54.80035 57.55234 [9] 54.59661 60.02490 55.69238 NA 60.19273 61.29076 56.13559 55.33618 [17] 61.17230 60.76366 59.38771 57.47079 > > Max(tmp5,na.rm=TRUE) [1] 468.1959 > Min(tmp5,na.rm=TRUE) [1] 54.59661 > mean(tmp5,na.rm=TRUE) [1] 71.88981 > Sum(tmp5,na.rm=TRUE) [1] 14306.07 > Var(tmp5,na.rm=TRUE) [1] 864.6131 > > rowMeans(tmp5,na.rm=TRUE) [1] 86.12892 68.20734 70.38335 73.27153 68.42929 73.23262 71.38833 71.20847 [9] 69.53516 66.86170 > rowSums(tmp5,na.rm=TRUE) [1] 1722.578 1364.147 1407.667 1465.431 1368.586 1464.652 1427.767 1424.169 [9] 1390.703 1270.372 > rowVars(tmp5,na.rm=TRUE) [1] 8126.16472 63.98037 69.72413 42.70449 77.05611 100.01844 [7] 63.70412 68.10447 42.59433 81.97014 > rowSd(tmp5,na.rm=TRUE) [1] 90.145242 7.998773 8.350098 6.534867 8.778161 10.000922 7.981486 [8] 8.252543 6.526433 9.053736 > rowMax(tmp5,na.rm=TRUE) [1] 468.19591 88.36543 82.32630 84.77378 85.33443 90.07810 89.05189 [8] 86.26693 82.17334 92.38534 > rowMin(tmp5,na.rm=TRUE) [1] 56.13559 59.38771 58.36359 56.31734 54.59661 58.71710 59.91861 55.41448 [9] 59.94278 54.80035 > > colMeans(tmp5,na.rm=TRUE) [1] 112.01689 73.06412 69.64266 69.75496 71.23412 69.80700 66.65507 [8] 69.92842 71.06570 68.30499 69.39051 67.19427 69.16147 72.76439 [15] 65.45432 70.89654 72.74218 68.56825 73.10527 66.57556 > colSums(tmp5,na.rm=TRUE) [1] 1120.1689 730.6412 696.4266 697.5496 712.3412 698.0700 666.5507 [8] 699.2842 710.6570 683.0499 693.9051 604.7485 691.6147 727.6439 [15] 654.5432 708.9654 727.4218 685.6825 731.0527 665.7556 > colVars(tmp5,na.rm=TRUE) [1] 15716.11023 82.47029 68.55709 72.89306 102.19311 76.91138 [7] 90.28200 91.89058 69.54433 51.99572 80.34331 40.42319 [13] 39.93966 58.14387 62.90008 99.00855 38.27451 36.92869 [19] 111.14978 48.35839 > colSd(tmp5,na.rm=TRUE) [1] 125.363911 9.081315 8.279921 8.537743 10.109061 8.769913 [7] 9.501684 9.585957 8.339324 7.210806 8.963443 6.357923 [13] 6.319783 7.625213 7.930957 9.950304 6.186639 6.076898 [19] 10.542760 6.954020 > colMax(tmp5,na.rm=TRUE) [1] 468.19591 92.38534 82.17334 83.77243 89.56625 84.08747 90.07810 [8] 88.36543 84.77378 86.26693 82.34823 74.93957 78.09504 84.45718 [15] 81.15924 83.53829 83.27022 79.30925 89.05189 80.26686 > colMin(tmp5,na.rm=TRUE) [1] 63.52227 62.45527 56.31734 59.78242 57.40041 58.36359 54.80035 57.55234 [9] 54.59661 60.02490 55.69238 59.23475 60.19273 61.29076 56.13559 55.33618 [17] 61.17230 60.76366 59.38771 57.47079 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 86.12892 68.20734 70.38335 73.27153 68.42929 73.23262 71.38833 71.20847 [9] 69.53516 NaN > rowSums(tmp5,na.rm=TRUE) [1] 1722.578 1364.147 1407.667 1465.431 1368.586 1464.652 1427.767 1424.169 [9] 1390.703 0.000 > rowVars(tmp5,na.rm=TRUE) [1] 8126.16472 63.98037 69.72413 42.70449 77.05611 100.01844 [7] 63.70412 68.10447 42.59433 NA > rowSd(tmp5,na.rm=TRUE) [1] 90.145242 7.998773 8.350098 6.534867 8.778161 10.000922 7.981486 [8] 8.252543 6.526433 NA > rowMax(tmp5,na.rm=TRUE) [1] 468.19591 88.36543 82.32630 84.77378 85.33443 90.07810 89.05189 [8] 86.26693 82.17334 NA > rowMin(tmp5,na.rm=TRUE) [1] 56.13559 59.38771 58.36359 56.31734 54.59661 58.71710 59.91861 55.41448 [9] 59.94278 NA > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 117.11792 70.91732 69.73218 68.76898 72.77120 70.12325 67.97226 [8] 71.30354 71.59706 68.84565 68.55756 NaN 68.60141 73.42596 [15] 65.48325 72.62547 73.09461 69.07073 73.96281 67.24570 > colSums(tmp5,na.rm=TRUE) [1] 1054.0613 638.2559 627.5896 618.9209 654.9408 631.1092 611.7503 [8] 641.7319 644.3735 619.6108 617.0180 0.0000 617.4127 660.8336 [15] 589.3493 653.6292 657.8515 621.6365 665.6653 605.2113 > colVars(tmp5,na.rm=TRUE) [1] 17387.89252 40.93053 77.03657 71.06798 88.38786 85.40017 [7] 82.04859 82.10366 75.06106 55.20666 82.58095 NA [13] 41.40341 60.48799 70.75317 77.75618 41.66146 38.70437 [19] 116.77053 49.35085 > colSd(tmp5,na.rm=TRUE) [1] 131.863158 6.397697 8.777048 8.430183 9.401482 9.241221 [7] 9.058068 9.061107 8.663778 7.430119 9.087406 NA [13] 6.434548 7.777402 8.411490 8.817946 6.454569 6.221283 [19] 10.806041 7.025016 > colMax(tmp5,na.rm=TRUE) [1] 468.19591 82.32630 82.17334 83.77243 89.56625 84.08747 90.07810 [8] 88.36543 84.77378 86.26693 82.34823 -Inf 78.09504 84.45718 [15] 81.15924 83.53829 83.27022 79.30925 89.05189 80.26686 > colMin(tmp5,na.rm=TRUE) [1] 63.52227 62.45527 56.31734 59.78242 60.36198 58.36359 60.34312 60.34467 [9] 54.59661 60.02490 55.69238 Inf 60.19273 61.29076 56.13559 55.41448 [17] 61.17230 60.76366 59.38771 57.47079 > > > > > 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] 298.6872 246.5805 224.1700 166.4931 286.3694 147.5685 329.6130 110.2094 [9] 213.1042 133.1081 > apply(copymatrix,1,var,na.rm=TRUE) [1] 298.6872 246.5805 224.1700 166.4931 286.3694 147.5685 329.6130 110.2094 [9] 213.1042 133.1081 > > > > 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] 0.000000e+00 2.273737e-13 -5.684342e-14 5.400125e-13 8.526513e-14 [6] -1.705303e-13 -1.705303e-13 5.684342e-14 -2.273737e-13 2.842171e-14 [11] -1.563194e-13 5.684342e-14 5.684342e-14 5.684342e-14 4.263256e-14 [16] -5.684342e-14 -1.136868e-13 -8.526513e-14 0.000000e+00 0.000000e+00 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 9 14 4 3 4 18 6 19 2 3 5 5 3 9 1 14 10 14 6 5 5 3 9 4 10 8 2 9 5 10 2 3 9 1 2 5 7 13 7 9 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 3.112294 > Min(tmp) [1] -2.202453 > mean(tmp) [1] 0.04580372 > Sum(tmp) [1] 4.580372 > Var(tmp) [1] 1.115765 > > rowMeans(tmp) [1] 0.04580372 > rowSums(tmp) [1] 4.580372 > rowVars(tmp) [1] 1.115765 > rowSd(tmp) [1] 1.056298 > rowMax(tmp) [1] 3.112294 > rowMin(tmp) [1] -2.202453 > > colMeans(tmp) [1] -0.595491079 1.228114524 -0.083390633 -0.243785622 -1.398751897 [6] 1.524816600 0.549391586 0.247167249 0.080667174 -0.792993201 [11] 1.085417638 -0.595244114 -0.665828432 0.536572481 0.038174134 [16] 0.074042858 -0.388144869 -0.244016181 0.917212950 0.486147453 [21] -0.270816191 1.133425181 1.183119559 -1.102047310 0.344246236 [26] -0.901993637 -0.784783395 -1.013201848 0.697144074 1.331052896 [31] -0.686048653 -0.630384175 -0.388271241 0.598121988 2.007273689 [36] -0.724327960 -0.737368006 -0.310284684 -0.937535581 -0.449572421 [41] -0.673625352 -1.160743897 0.204823160 -0.742557858 0.489382014 [46] 0.547485725 0.235651702 1.057590896 0.335778723 0.004027314 [51] -0.347572168 -0.802827099 0.590294479 2.232754842 0.647468375 [56] -1.890506994 -0.835180937 0.280575239 -1.813480884 -0.469747420 [61] -1.346759605 3.112293507 2.998115751 -0.336517655 -2.202453125 [66] 1.592445277 -1.026186808 0.957799166 -0.106455832 1.683075016 [71] 0.429603656 0.519402549 0.245371248 0.331310952 0.566801842 [76] 2.164123418 1.588157345 0.118727838 -0.601560680 0.980612386 [81] -0.920750389 0.393036349 0.241424407 -1.728044310 0.787910164 [86] 1.315168936 -2.178444583 0.433306695 -1.196603178 -0.268037315 [91] 0.955115486 0.690713603 0.628230323 -0.214225021 -2.003746614 [96] -1.790069932 0.607107558 -0.475707617 -0.117496346 -0.253839436 > colSums(tmp) [1] -0.595491079 1.228114524 -0.083390633 -0.243785622 -1.398751897 [6] 1.524816600 0.549391586 0.247167249 0.080667174 -0.792993201 [11] 1.085417638 -0.595244114 -0.665828432 0.536572481 0.038174134 [16] 0.074042858 -0.388144869 -0.244016181 0.917212950 0.486147453 [21] -0.270816191 1.133425181 1.183119559 -1.102047310 0.344246236 [26] -0.901993637 -0.784783395 -1.013201848 0.697144074 1.331052896 [31] -0.686048653 -0.630384175 -0.388271241 0.598121988 2.007273689 [36] -0.724327960 -0.737368006 -0.310284684 -0.937535581 -0.449572421 [41] -0.673625352 -1.160743897 0.204823160 -0.742557858 0.489382014 [46] 0.547485725 0.235651702 1.057590896 0.335778723 0.004027314 [51] -0.347572168 -0.802827099 0.590294479 2.232754842 0.647468375 [56] -1.890506994 -0.835180937 0.280575239 -1.813480884 -0.469747420 [61] -1.346759605 3.112293507 2.998115751 -0.336517655 -2.202453125 [66] 1.592445277 -1.026186808 0.957799166 -0.106455832 1.683075016 [71] 0.429603656 0.519402549 0.245371248 0.331310952 0.566801842 [76] 2.164123418 1.588157345 0.118727838 -0.601560680 0.980612386 [81] -0.920750389 0.393036349 0.241424407 -1.728044310 0.787910164 [86] 1.315168936 -2.178444583 0.433306695 -1.196603178 -0.268037315 [91] 0.955115486 0.690713603 0.628230323 -0.214225021 -2.003746614 [96] -1.790069932 0.607107558 -0.475707617 -0.117496346 -0.253839436 > 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.595491079 1.228114524 -0.083390633 -0.243785622 -1.398751897 [6] 1.524816600 0.549391586 0.247167249 0.080667174 -0.792993201 [11] 1.085417638 -0.595244114 -0.665828432 0.536572481 0.038174134 [16] 0.074042858 -0.388144869 -0.244016181 0.917212950 0.486147453 [21] -0.270816191 1.133425181 1.183119559 -1.102047310 0.344246236 [26] -0.901993637 -0.784783395 -1.013201848 0.697144074 1.331052896 [31] -0.686048653 -0.630384175 -0.388271241 0.598121988 2.007273689 [36] -0.724327960 -0.737368006 -0.310284684 -0.937535581 -0.449572421 [41] -0.673625352 -1.160743897 0.204823160 -0.742557858 0.489382014 [46] 0.547485725 0.235651702 1.057590896 0.335778723 0.004027314 [51] -0.347572168 -0.802827099 0.590294479 2.232754842 0.647468375 [56] -1.890506994 -0.835180937 0.280575239 -1.813480884 -0.469747420 [61] -1.346759605 3.112293507 2.998115751 -0.336517655 -2.202453125 [66] 1.592445277 -1.026186808 0.957799166 -0.106455832 1.683075016 [71] 0.429603656 0.519402549 0.245371248 0.331310952 0.566801842 [76] 2.164123418 1.588157345 0.118727838 -0.601560680 0.980612386 [81] -0.920750389 0.393036349 0.241424407 -1.728044310 0.787910164 [86] 1.315168936 -2.178444583 0.433306695 -1.196603178 -0.268037315 [91] 0.955115486 0.690713603 0.628230323 -0.214225021 -2.003746614 [96] -1.790069932 0.607107558 -0.475707617 -0.117496346 -0.253839436 > colMin(tmp) [1] -0.595491079 1.228114524 -0.083390633 -0.243785622 -1.398751897 [6] 1.524816600 0.549391586 0.247167249 0.080667174 -0.792993201 [11] 1.085417638 -0.595244114 -0.665828432 0.536572481 0.038174134 [16] 0.074042858 -0.388144869 -0.244016181 0.917212950 0.486147453 [21] -0.270816191 1.133425181 1.183119559 -1.102047310 0.344246236 [26] -0.901993637 -0.784783395 -1.013201848 0.697144074 1.331052896 [31] -0.686048653 -0.630384175 -0.388271241 0.598121988 2.007273689 [36] -0.724327960 -0.737368006 -0.310284684 -0.937535581 -0.449572421 [41] -0.673625352 -1.160743897 0.204823160 -0.742557858 0.489382014 [46] 0.547485725 0.235651702 1.057590896 0.335778723 0.004027314 [51] -0.347572168 -0.802827099 0.590294479 2.232754842 0.647468375 [56] -1.890506994 -0.835180937 0.280575239 -1.813480884 -0.469747420 [61] -1.346759605 3.112293507 2.998115751 -0.336517655 -2.202453125 [66] 1.592445277 -1.026186808 0.957799166 -0.106455832 1.683075016 [71] 0.429603656 0.519402549 0.245371248 0.331310952 0.566801842 [76] 2.164123418 1.588157345 0.118727838 -0.601560680 0.980612386 [81] -0.920750389 0.393036349 0.241424407 -1.728044310 0.787910164 [86] 1.315168936 -2.178444583 0.433306695 -1.196603178 -0.268037315 [91] 0.955115486 0.690713603 0.628230323 -0.214225021 -2.003746614 [96] -1.790069932 0.607107558 -0.475707617 -0.117496346 -0.253839436 > colMedians(tmp) [1] -0.595491079 1.228114524 -0.083390633 -0.243785622 -1.398751897 [6] 1.524816600 0.549391586 0.247167249 0.080667174 -0.792993201 [11] 1.085417638 -0.595244114 -0.665828432 0.536572481 0.038174134 [16] 0.074042858 -0.388144869 -0.244016181 0.917212950 0.486147453 [21] -0.270816191 1.133425181 1.183119559 -1.102047310 0.344246236 [26] -0.901993637 -0.784783395 -1.013201848 0.697144074 1.331052896 [31] -0.686048653 -0.630384175 -0.388271241 0.598121988 2.007273689 [36] -0.724327960 -0.737368006 -0.310284684 -0.937535581 -0.449572421 [41] -0.673625352 -1.160743897 0.204823160 -0.742557858 0.489382014 [46] 0.547485725 0.235651702 1.057590896 0.335778723 0.004027314 [51] -0.347572168 -0.802827099 0.590294479 2.232754842 0.647468375 [56] -1.890506994 -0.835180937 0.280575239 -1.813480884 -0.469747420 [61] -1.346759605 3.112293507 2.998115751 -0.336517655 -2.202453125 [66] 1.592445277 -1.026186808 0.957799166 -0.106455832 1.683075016 [71] 0.429603656 0.519402549 0.245371248 0.331310952 0.566801842 [76] 2.164123418 1.588157345 0.118727838 -0.601560680 0.980612386 [81] -0.920750389 0.393036349 0.241424407 -1.728044310 0.787910164 [86] 1.315168936 -2.178444583 0.433306695 -1.196603178 -0.268037315 [91] 0.955115486 0.690713603 0.628230323 -0.214225021 -2.003746614 [96] -1.790069932 0.607107558 -0.475707617 -0.117496346 -0.253839436 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.5954911 1.228115 -0.08339063 -0.2437856 -1.398752 1.524817 0.5493916 [2,] -0.5954911 1.228115 -0.08339063 -0.2437856 -1.398752 1.524817 0.5493916 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.2471672 0.08066717 -0.7929932 1.085418 -0.5952441 -0.6658284 0.5365725 [2,] 0.2471672 0.08066717 -0.7929932 1.085418 -0.5952441 -0.6658284 0.5365725 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.03817413 0.07404286 -0.3881449 -0.2440162 0.9172129 0.4861475 -0.2708162 [2,] 0.03817413 0.07404286 -0.3881449 -0.2440162 0.9172129 0.4861475 -0.2708162 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.133425 1.18312 -1.102047 0.3442462 -0.9019936 -0.7847834 -1.013202 [2,] 1.133425 1.18312 -1.102047 0.3442462 -0.9019936 -0.7847834 -1.013202 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.6971441 1.331053 -0.6860487 -0.6303842 -0.3882712 0.598122 2.007274 [2,] 0.6971441 1.331053 -0.6860487 -0.6303842 -0.3882712 0.598122 2.007274 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.724328 -0.737368 -0.3102847 -0.9375356 -0.4495724 -0.6736254 -1.160744 [2,] -0.724328 -0.737368 -0.3102847 -0.9375356 -0.4495724 -0.6736254 -1.160744 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.2048232 -0.7425579 0.489382 0.5474857 0.2356517 1.057591 0.3357787 [2,] 0.2048232 -0.7425579 0.489382 0.5474857 0.2356517 1.057591 0.3357787 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.004027314 -0.3475722 -0.8028271 0.5902945 2.232755 0.6474684 -1.890507 [2,] 0.004027314 -0.3475722 -0.8028271 0.5902945 2.232755 0.6474684 -1.890507 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.8351809 0.2805752 -1.813481 -0.4697474 -1.34676 3.112294 2.998116 [2,] -0.8351809 0.2805752 -1.813481 -0.4697474 -1.34676 3.112294 2.998116 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.3365177 -2.202453 1.592445 -1.026187 0.9577992 -0.1064558 1.683075 [2,] -0.3365177 -2.202453 1.592445 -1.026187 0.9577992 -0.1064558 1.683075 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.4296037 0.5194025 0.2453712 0.331311 0.5668018 2.164123 1.588157 [2,] 0.4296037 0.5194025 0.2453712 0.331311 0.5668018 2.164123 1.588157 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.1187278 -0.6015607 0.9806124 -0.9207504 0.3930363 0.2414244 -1.728044 [2,] 0.1187278 -0.6015607 0.9806124 -0.9207504 0.3930363 0.2414244 -1.728044 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.7879102 1.315169 -2.178445 0.4333067 -1.196603 -0.2680373 0.9551155 [2,] 0.7879102 1.315169 -2.178445 0.4333067 -1.196603 -0.2680373 0.9551155 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.6907136 0.6282303 -0.214225 -2.003747 -1.79007 0.6071076 -0.4757076 [2,] 0.6907136 0.6282303 -0.214225 -2.003747 -1.79007 0.6071076 -0.4757076 [,99] [,100] [1,] -0.1174963 -0.2538394 [2,] -0.1174963 -0.2538394 > > > Max(tmp2) [1] 2.217382 > Min(tmp2) [1] -2.155778 > mean(tmp2) [1] 0.02302867 > Sum(tmp2) [1] 2.302867 > Var(tmp2) [1] 0.8194052 > > rowMeans(tmp2) [1] 0.2417855735 0.7405222718 0.9544943053 1.1624139853 -0.7670249107 [6] 0.8927941573 1.4405713640 -0.4004200194 0.8566019566 -0.4752636856 [11] 0.6266440498 0.1912345498 -0.9114517180 2.2173818607 0.0004348049 [16] 0.7696184573 -1.1473314372 -0.6615812284 -0.4009975703 0.1111608673 [21] 0.2870083905 -0.5475699475 0.2316234144 -0.3216557692 0.8278597655 [26] -1.1501785548 0.8949198948 1.7791194401 -2.0715520839 -0.9892213707 [31] 0.3672029265 1.0359849637 -0.3007129574 0.3510789011 -0.1421863800 [36] -0.4390314058 -0.0188124563 -0.0581198329 -1.1362590048 -0.7858838601 [41] 0.8975456548 0.8087702285 -0.6007175557 1.3041142737 1.8918912036 [46] -1.7855107251 0.1390254423 -1.0495065476 0.2721179376 0.7187010925 [51] 0.8699858595 -0.1345161077 0.0679192940 -0.5827658669 -0.4760770796 [56] 2.0344598782 0.0997641693 -1.0642657386 -0.0322170190 -1.1792318715 [61] 0.5526829992 -0.7830215759 2.1051125796 -1.5447433525 0.1628133450 [66] -0.0598474959 -0.6408593292 0.9781894738 0.0932241246 -0.0951961081 [71] -1.9306119752 0.5000411648 -1.4037837937 0.3350092433 0.3059105792 [76] 1.0660699207 0.3333781551 -0.6316287831 0.5643539254 0.2113580555 [81] -2.1557780601 0.6174214910 -0.2152460716 -0.1150662231 0.0971543225 [86] -0.4621115392 -0.6098854386 0.3721659469 -0.4249195665 -0.1183524631 [91] -0.3720439158 -0.0562566891 1.0171340316 -0.4861199299 -1.6119631456 [96] 0.1014473831 1.2612279697 -0.7051524371 0.4713941068 0.1246778175 > rowSums(tmp2) [1] 0.2417855735 0.7405222718 0.9544943053 1.1624139853 -0.7670249107 [6] 0.8927941573 1.4405713640 -0.4004200194 0.8566019566 -0.4752636856 [11] 0.6266440498 0.1912345498 -0.9114517180 2.2173818607 0.0004348049 [16] 0.7696184573 -1.1473314372 -0.6615812284 -0.4009975703 0.1111608673 [21] 0.2870083905 -0.5475699475 0.2316234144 -0.3216557692 0.8278597655 [26] -1.1501785548 0.8949198948 1.7791194401 -2.0715520839 -0.9892213707 [31] 0.3672029265 1.0359849637 -0.3007129574 0.3510789011 -0.1421863800 [36] -0.4390314058 -0.0188124563 -0.0581198329 -1.1362590048 -0.7858838601 [41] 0.8975456548 0.8087702285 -0.6007175557 1.3041142737 1.8918912036 [46] -1.7855107251 0.1390254423 -1.0495065476 0.2721179376 0.7187010925 [51] 0.8699858595 -0.1345161077 0.0679192940 -0.5827658669 -0.4760770796 [56] 2.0344598782 0.0997641693 -1.0642657386 -0.0322170190 -1.1792318715 [61] 0.5526829992 -0.7830215759 2.1051125796 -1.5447433525 0.1628133450 [66] -0.0598474959 -0.6408593292 0.9781894738 0.0932241246 -0.0951961081 [71] -1.9306119752 0.5000411648 -1.4037837937 0.3350092433 0.3059105792 [76] 1.0660699207 0.3333781551 -0.6316287831 0.5643539254 0.2113580555 [81] -2.1557780601 0.6174214910 -0.2152460716 -0.1150662231 0.0971543225 [86] -0.4621115392 -0.6098854386 0.3721659469 -0.4249195665 -0.1183524631 [91] -0.3720439158 -0.0562566891 1.0171340316 -0.4861199299 -1.6119631456 [96] 0.1014473831 1.2612279697 -0.7051524371 0.4713941068 0.1246778175 > 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.2417855735 0.7405222718 0.9544943053 1.1624139853 -0.7670249107 [6] 0.8927941573 1.4405713640 -0.4004200194 0.8566019566 -0.4752636856 [11] 0.6266440498 0.1912345498 -0.9114517180 2.2173818607 0.0004348049 [16] 0.7696184573 -1.1473314372 -0.6615812284 -0.4009975703 0.1111608673 [21] 0.2870083905 -0.5475699475 0.2316234144 -0.3216557692 0.8278597655 [26] -1.1501785548 0.8949198948 1.7791194401 -2.0715520839 -0.9892213707 [31] 0.3672029265 1.0359849637 -0.3007129574 0.3510789011 -0.1421863800 [36] -0.4390314058 -0.0188124563 -0.0581198329 -1.1362590048 -0.7858838601 [41] 0.8975456548 0.8087702285 -0.6007175557 1.3041142737 1.8918912036 [46] -1.7855107251 0.1390254423 -1.0495065476 0.2721179376 0.7187010925 [51] 0.8699858595 -0.1345161077 0.0679192940 -0.5827658669 -0.4760770796 [56] 2.0344598782 0.0997641693 -1.0642657386 -0.0322170190 -1.1792318715 [61] 0.5526829992 -0.7830215759 2.1051125796 -1.5447433525 0.1628133450 [66] -0.0598474959 -0.6408593292 0.9781894738 0.0932241246 -0.0951961081 [71] -1.9306119752 0.5000411648 -1.4037837937 0.3350092433 0.3059105792 [76] 1.0660699207 0.3333781551 -0.6316287831 0.5643539254 0.2113580555 [81] -2.1557780601 0.6174214910 -0.2152460716 -0.1150662231 0.0971543225 [86] -0.4621115392 -0.6098854386 0.3721659469 -0.4249195665 -0.1183524631 [91] -0.3720439158 -0.0562566891 1.0171340316 -0.4861199299 -1.6119631456 [96] 0.1014473831 1.2612279697 -0.7051524371 0.4713941068 0.1246778175 > rowMin(tmp2) [1] 0.2417855735 0.7405222718 0.9544943053 1.1624139853 -0.7670249107 [6] 0.8927941573 1.4405713640 -0.4004200194 0.8566019566 -0.4752636856 [11] 0.6266440498 0.1912345498 -0.9114517180 2.2173818607 0.0004348049 [16] 0.7696184573 -1.1473314372 -0.6615812284 -0.4009975703 0.1111608673 [21] 0.2870083905 -0.5475699475 0.2316234144 -0.3216557692 0.8278597655 [26] -1.1501785548 0.8949198948 1.7791194401 -2.0715520839 -0.9892213707 [31] 0.3672029265 1.0359849637 -0.3007129574 0.3510789011 -0.1421863800 [36] -0.4390314058 -0.0188124563 -0.0581198329 -1.1362590048 -0.7858838601 [41] 0.8975456548 0.8087702285 -0.6007175557 1.3041142737 1.8918912036 [46] -1.7855107251 0.1390254423 -1.0495065476 0.2721179376 0.7187010925 [51] 0.8699858595 -0.1345161077 0.0679192940 -0.5827658669 -0.4760770796 [56] 2.0344598782 0.0997641693 -1.0642657386 -0.0322170190 -1.1792318715 [61] 0.5526829992 -0.7830215759 2.1051125796 -1.5447433525 0.1628133450 [66] -0.0598474959 -0.6408593292 0.9781894738 0.0932241246 -0.0951961081 [71] -1.9306119752 0.5000411648 -1.4037837937 0.3350092433 0.3059105792 [76] 1.0660699207 0.3333781551 -0.6316287831 0.5643539254 0.2113580555 [81] -2.1557780601 0.6174214910 -0.2152460716 -0.1150662231 0.0971543225 [86] -0.4621115392 -0.6098854386 0.3721659469 -0.4249195665 -0.1183524631 [91] -0.3720439158 -0.0562566891 1.0171340316 -0.4861199299 -1.6119631456 [96] 0.1014473831 1.2612279697 -0.7051524371 0.4713941068 0.1246778175 > > colMeans(tmp2) [1] 0.02302867 > colSums(tmp2) [1] 2.302867 > colVars(tmp2) [1] 0.8194052 > colSd(tmp2) [1] 0.90521 > colMax(tmp2) [1] 2.217382 > colMin(tmp2) [1] -2.155778 > colMedians(tmp2) [1] 0.08057171 > colRanges(tmp2) [,1] [1,] -2.155778 [2,] 2.217382 > > 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.4627513 -1.5173483 -1.7079776 0.3733894 -5.1284609 2.5945025 [7] -5.4176008 -4.1575665 -1.4744164 5.3683750 > colApply(tmp,quantile)[,1] [,1] [1,] -2.59951662 [2,] -0.18937821 [3,] 0.05977496 [4,] 0.36257956 [5,] 1.22470677 > > rowApply(tmp,sum) [1] 0.09356637 -2.82340452 1.17714251 1.98241556 -1.88442437 -2.10865796 [7] -1.06432509 -6.45240096 -0.65899107 0.20922461 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 10 7 5 7 6 1 5 8 9 4 [2,] 9 8 1 4 5 2 8 1 10 6 [3,] 1 3 3 6 10 7 1 10 5 8 [4,] 7 6 7 5 4 9 9 3 3 5 [5,] 8 5 6 3 3 8 3 4 1 1 [6,] 4 1 2 8 8 10 6 9 8 9 [7,] 6 4 4 2 9 4 2 5 2 2 [8,] 2 9 8 1 1 3 10 2 4 7 [9,] 5 2 9 9 2 6 7 7 7 3 [10,] 3 10 10 10 7 5 4 6 6 10 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.73331743 -1.73867228 2.95609111 -3.85381394 1.28861707 2.64966081 [7] 0.11406641 -2.71111378 -0.07419154 -0.53040234 3.22029130 0.69706476 [13] 2.28325695 0.12270366 1.36858174 -2.88377286 5.00441631 1.02858212 [19] -2.86002764 -0.54366345 > colApply(tmp,quantile)[,1] [,1] [1,] -0.67772699 [2,] -0.46450355 [3,] 0.01052265 [4,] 0.63458213 [5,] 1.23044319 > > rowApply(tmp,sum) [1] -4.1868090 2.7793222 2.8003044 5.5697630 -0.6915888 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 14 14 18 5 8 [2,] 16 15 6 2 6 [3,] 15 9 15 15 17 [4,] 5 2 12 4 4 [5,] 8 19 7 18 5 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.01052265 0.4245236 0.3932992 -0.8858232 -0.2597816 -0.23200227 [2,] 0.63458213 0.7221237 0.3563048 -1.7905614 1.2793666 1.26921347 [3,] 1.23044319 -0.6137626 0.5862975 0.4283865 -0.3918667 0.34663432 [4,] -0.67772699 -1.6441261 1.0712908 -0.7488766 1.3353828 1.21636056 [5,] -0.46450355 -0.6274309 0.5488988 -0.8569393 -0.6744840 0.04945473 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.2001725 -0.001688226 -0.1805214 -3.0040453 1.7480971 0.5800271 [2,] -1.2887409 -0.927779951 0.4740106 -0.6840721 0.2943527 0.5724847 [3,] 0.1480906 -1.017876093 1.0830707 2.2593082 1.2052278 -1.9341697 [4,] 1.8539920 -0.319132486 -0.1884168 0.5632821 0.4398374 0.9641332 [5,] 0.6008971 -0.444637026 -1.2623346 0.3351248 -0.4672237 0.5145895 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -1.2665124 -0.5836254 -0.7552744 -0.03188049 1.2552471 1.2907704 [2,] 0.7965387 0.6183327 0.2493215 -1.82042189 0.9287268 1.5420688 [3,] 0.5331033 -1.5575107 1.5797025 -0.65821117 -0.2774242 -0.7239546 [4,] 0.1295279 1.1460019 0.2691698 -0.86041552 2.6166897 -2.2795258 [5,] 2.0905995 0.4995053 0.0256624 0.48715621 0.4811768 1.1992233 [,19] [,20] [1,] -1.2400845 -0.24788454 [2,] -0.9123376 0.46580894 [3,] 0.4879746 0.08684091 [4,] 0.6427612 0.03955397 [5,] -1.8383413 -0.88798273 > > > 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 1.35416 -0.6601648 0.9089913 2.190428 -1.318511 0.01987195 0.07734417 col8 col9 col10 col11 col12 col13 col14 row1 -0.228742 0.5855492 -1.222243 0.6222804 -0.4954359 1.70119 2.117125 col15 col16 col17 col18 col19 col20 row1 0.4428164 0.8416136 0.09014087 -0.682854 -1.437428 0.8801515 > tmp[,"col10"] col10 row1 -1.222242739 row2 -2.284143815 row3 -0.446247096 row4 -0.007054429 row5 -0.273227910 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 1.3541601 -0.6601648 0.9089913 2.190428 -1.318511 0.01987195 0.07734417 row5 -0.5715015 -1.0871114 0.4712925 0.630936 1.489952 -0.27944395 -0.68486556 col8 col9 col10 col11 col12 col13 col14 row1 -0.228742 0.5855492 -1.2222427 0.6222804 -0.4954359 1.701190 2.1171246 row5 2.640545 1.7235175 -0.2732279 -1.8086453 -0.0493560 -1.582344 -0.3134926 col15 col16 col17 col18 col19 col20 row1 0.4428164 0.8416136 0.09014087 -0.68285399 -1.4374284 0.8801515 row5 0.6167042 1.1264966 -0.41261152 0.07996731 -0.3896687 -0.9801855 > tmp[,c("col6","col20")] col6 col20 row1 0.01987195 0.88015150 row2 -0.59268121 0.23864563 row3 -0.47604544 -0.28081637 row4 1.83447979 0.09561766 row5 -0.27944395 -0.98018554 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.01987195 0.8801515 row5 -0.27944395 -0.9801855 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.50827 50.19716 49.69443 49.47049 50.4304 104.2952 49.38236 47.94655 col9 col10 col11 col12 col13 col14 col15 col16 row1 47.11597 49.21939 49.43411 48.32273 51.10648 50.33742 50.34392 49.66624 col17 col18 col19 col20 row1 49.0807 47.98595 48.66155 105.528 > tmp[,"col10"] col10 row1 49.21939 row2 29.47718 row3 29.23838 row4 29.07419 row5 50.49330 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.50827 50.19716 49.69443 49.47049 50.43040 104.2952 49.38236 47.94655 row5 50.68195 51.48195 50.65622 49.41659 48.29106 102.8648 48.88854 49.93111 col9 col10 col11 col12 col13 col14 col15 col16 row1 47.11597 49.21939 49.43411 48.32273 51.10648 50.33742 50.34392 49.66624 row5 50.30431 50.49330 50.86848 50.44028 49.03304 49.26051 51.76603 49.81343 col17 col18 col19 col20 row1 49.08070 47.98595 48.66155 105.5280 row5 49.52273 49.61334 50.45426 104.6256 > tmp[,c("col6","col20")] col6 col20 row1 104.29523 105.52804 row2 75.15591 74.03401 row3 75.23042 76.39055 row4 75.05604 73.55555 row5 102.86482 104.62555 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.2952 105.5280 row5 102.8648 104.6256 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.2952 105.5280 row5 102.8648 104.6256 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 1.2356879 [2,] 0.7593126 [3,] 1.2972557 [4,] -0.1329294 [5,] -1.1345006 > tmp[,c("col17","col7")] col17 col7 [1,] -0.5065317 -0.3520191 [2,] -0.3689663 0.3188165 [3,] -0.5114135 -0.9522335 [4,] -0.1171614 0.3490445 [5,] -2.4596525 -0.3050089 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -1.0553299 1.1114963 [2,] 0.7834260 0.4827003 [3,] -0.8649106 -0.2445742 [4,] -2.4676917 1.4203097 [5,] 0.3585130 -0.6740123 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -1.05533 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -1.055330 [2,] 0.783426 > > > > 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.2764993 -1.2701080 -0.9119043 1.6400928 1.022247 -0.2134538 1.0242147 row1 0.6239620 0.2023916 0.3026696 -0.9547974 2.230245 -0.5904785 0.1621493 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 0.3169587 -0.8899736 -0.5009122 0.2050589 -0.3235936 -1.133699 0.1000659 row1 0.1668254 -0.6351278 0.4389083 0.1791146 -1.4572935 -0.658599 -1.9839969 [,15] [,16] [,17] [,18] [,19] [,20] row3 -1.1505257 0.1631000 -0.7382812 -1.14016210 0.71376964 -0.2329757 row1 -0.7722367 -0.4961117 -0.5689463 0.01285791 0.03922845 -0.4911044 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.4598133 -1.440358 0.7539192 1.050795 1.098655 0.7372299 -0.1754938 [,8] [,9] [,10] row2 -0.9484139 0.6044506 -0.7713107 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.9308055 -0.4122442 -0.7824526 -1.093671 -1.056964 -1.509938 0.3525912 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.399322 1.500113 0.00187614 -0.6508827 0.3363946 1.082641 0.6055426 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.4689599 0.4722209 -0.4516714 -0.6329384 -0.8132045 -0.6373276 > > > 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: 0x6000019a8000> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf0636461fece" [2] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf0635d9fb9de" [3] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf0632163cdd7" [4] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf0631f5eef61" [5] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf06311b5d95e" [6] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf06339d1b367" [7] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf06376594cd8" [8] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf06360c4359b" [9] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf063719b84be" [10] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf06319281037" [11] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf063154097c8" [12] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf06343acd65e" [13] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf06382dd808" [14] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf06379c1f969" [15] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMf0632ddd9af2" > > > ### 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: 0x6000019bc060> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6000019bc060> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6000019bc060> > rowMedians(tmp) [1] -0.5826123872 0.4012222618 -0.6555025523 -0.0231977852 -0.2404228471 [6] 0.3684422214 -0.2629680947 -0.0042865958 -0.5270275018 0.0470989052 [11] 0.6081603008 0.3138663688 -0.1276729978 0.3593190644 0.3704311920 [16] -0.4437378364 0.3419201504 -0.0483947794 -0.3040088336 0.0247533502 [21] -0.2664308288 -0.9065805489 0.2072309119 0.2830194668 0.1363826245 [26] 0.4570754064 0.5205362335 -0.4393341916 -0.4091834996 -0.2406666508 [31] -0.0137069215 -0.2723891556 0.2404577050 0.7270486317 0.1833276087 [36] 0.2739158380 -0.1781098582 -0.2805904484 -0.1331035119 -0.8377850460 [41] 0.2414257950 0.4455314937 -0.1759553651 0.1174885690 -0.2888908763 [46] 0.2593416994 0.2030604668 0.3949409556 0.0495384568 -0.0639942758 [51] -0.3166723419 -0.3106644032 0.3067586906 -0.1210161760 0.3191504208 [56] 0.0365399620 -0.0245402222 0.0095004919 0.0317138914 0.1147471139 [61] 0.1901778001 -0.2667285474 0.1627199473 -0.0345862940 0.1903964518 [66] -0.2562083662 0.5862342065 -0.2821529792 -0.1530163212 -0.0701749096 [71] 0.4412419331 0.0065126513 -0.3314495422 -0.0181067380 0.2179021046 [76] 0.6039770439 -0.6576852539 -0.2027643077 0.6253405242 -0.2406458872 [81] 0.0508765977 0.5425929762 0.0298231253 0.4351852614 0.6437007611 [86] 0.1433445966 0.1752131998 0.5634326016 0.1908234509 -0.0742882115 [91] 0.0247362830 -0.4732709031 0.0459556431 -0.3529803016 0.4061261348 [96] -0.3086969239 -0.3799561991 0.1018601637 0.0322963811 0.0954808912 [101] 0.1031607232 -0.2991779610 0.0790822733 -0.1852294831 0.6271438907 [106] 0.3209093777 -0.0050275463 -0.7041086779 0.2205017180 0.0177326590 [111] 0.3757108711 -0.1872295801 -0.0170915568 -0.1448162719 -0.6463441358 [116] 0.0848871677 0.3021625538 0.3356187881 -0.2618640581 0.1422198332 [121] -0.1304243931 0.2226116881 0.1405741440 -0.2810038057 -0.1858401860 [126] 0.4381281087 -0.2584720340 -0.0881164707 -0.5246615194 -0.1213443620 [131] -0.0034565788 -0.1280833232 0.2726697122 -0.0866450144 -0.2775192453 [136] -0.1829708860 0.1173036544 0.0133542190 0.1866608689 -0.0161182112 [141] -0.4734515030 -0.7165084185 0.2999789909 0.0860571033 -0.1444627212 [146] 0.1163237454 0.0440069937 0.1239318279 0.1603634472 0.0835016393 [151] 0.2301141268 -0.5021286020 -0.0119193549 0.2606064767 -0.4382671675 [156] 0.1862814959 -0.4835483376 0.1255801665 -0.5399182112 -0.4054041498 [161] 0.3045012296 0.1892234813 -0.3504959483 -0.1201823491 0.0521520162 [166] 0.0996285269 -0.7399050014 -0.0680306811 -0.2147283904 0.2309140061 [171] 0.0661180983 0.3060045652 0.3133905498 -0.3346274126 -0.1902634843 [176] 0.4536735368 -0.8078952987 0.7978505353 -0.4222133313 -0.1479643316 [181] -0.2451060381 -0.0477654724 -0.4169010604 0.1393482194 -0.0001712172 [186] -0.1269573101 0.5856274490 0.0011555339 -0.0403551231 -0.2455260442 [191] 0.3603840063 -0.4736140294 0.3409943366 0.7619842595 0.3020317261 [196] -0.2801889845 0.7973756296 0.3939946561 0.0695214965 0.0843013777 [201] -0.3315471869 -0.0402843053 -0.1466810719 0.0819011101 0.1285136014 [206] 0.3972141839 0.1946667542 -0.0307891925 0.3222705113 -0.6615357747 [211] -0.4006047233 0.8495532455 0.2021208436 0.1146951229 0.0770250113 [216] -0.3207676624 0.3795333477 0.0601167498 0.2402284981 -0.2536381105 [221] 0.0410496483 -0.0555767376 0.1166857289 0.5450240687 0.2025674738 [226] -0.4100451679 -0.2113029834 -0.1167649406 0.2822060458 0.6059940938 > > proc.time() user system elapsed 2.610 14.277 19.554
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.0 (2024-04-24) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x600000698000> > .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: 0x600000698000> > .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: 0x600000698000> > .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: 0x600000698000> > 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: 0x6000006c8180> > .Call("R_bm_AddColumn",P) <pointer: 0x6000006c8180> > .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: 0x6000006c8180> > .Call("R_bm_AddColumn",P) <pointer: 0x6000006c8180> > .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: 0x6000006c8180> > 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: 0x6000006fc360> > .Call("R_bm_AddColumn",P) <pointer: 0x6000006fc360> > .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: 0x6000006fc360> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x6000006fc360> > .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: 0x6000006fc360> > > .Call("R_bm_RowMode",P) <pointer: 0x6000006fc360> > .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: 0x6000006fc360> > > .Call("R_bm_ColMode",P) <pointer: 0x6000006fc360> > .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: 0x6000006fc360> > 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: 0x6000006980c0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x6000006980c0> > .Call("R_bm_AddColumn",P) <pointer: 0x6000006980c0> > .Call("R_bm_AddColumn",P) <pointer: 0x6000006980c0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilef5011b5314cd" "BufferedMatrixFilef5016b7aacbe" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilef5011b5314cd" "BufferedMatrixFilef5016b7aacbe" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600000698360> > .Call("R_bm_AddColumn",P) <pointer: 0x600000698360> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600000698360> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600000698360> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600000698360> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600000698360> > .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: 0x600000698540> > .Call("R_bm_AddColumn",P) <pointer: 0x600000698540> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600000698540> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600000698540> > 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: 0x6000006c0000> > .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: 0x6000006c0000> > rm(P) > > proc.time() user system elapsed 0.329 0.147 0.467
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.0 (2024-04-24) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.343 0.092 0.423