Back to Multiple platform build/check report for BioC 3.20: simplified long |
|
This page was generated on 2025-01-23 12:10 -0500 (Thu, 23 Jan 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4746 |
palomino8 | Windows Server 2022 Datacenter | x64 | 4.4.2 (2024-10-31 ucrt) -- "Pile of Leaves" | 4493 |
merida1 | macOS 12.7.5 Monterey | x86_64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4517 |
kjohnson1 | macOS 13.6.6 Ventura | arm64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4469 |
taishan | Linux (openEuler 24.03 LTS) | aarch64 | 4.4.2 (2024-10-31) -- "Pile of Leaves" | 4394 |
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 251/2289 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.70.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino8 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.7.5 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson1 | macOS 13.6.6 Ventura / arm64 | OK | OK | WARNINGS | OK | |||||||||
taishan | Linux (openEuler 24.03 LTS) / aarch64 | OK | OK | 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.70.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.70.0.tar.gz |
StartedAt: 2025-01-21 13:08:10 -0500 (Tue, 21 Jan 2025) |
EndedAt: 2025-01-21 13:08:49 -0500 (Tue, 21 Jan 2025) |
EllapsedTime: 38.2 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.70.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.4.2 (2024-10-31) * 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.7.1 * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.70.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.20-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 15.0.0 (clang-1500.0.40.1)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking sizes of PDF files under ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘Apple clang version 15.0.0 (clang-1500.0.40.1)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.4.2 (2024-10-31) -- "Pile of Leaves" 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.340 0.106 0.431
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.4.2 (2024-10-31) -- "Pile of Leaves" 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.20-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 474168 25.4 1035467 55.3 NA 638597 34.2 Vcells 877630 6.7 8388608 64.0 65536 2072107 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] "Tue Jan 21 13:08:30 2025" > 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] "Tue Jan 21 13:08:30 2025" > > > 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: 0x600003214000> > > > > 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] "Tue Jan 21 13:08:32 2025" > 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] "Tue Jan 21 13:08:33 2025" > > ColMode(tmp2) <pointer: 0x600003214000> > > > > ### 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.4650018 -0.6246704 0.6485895 -1.3409360 [2,] 0.4831442 2.9865401 1.2048553 -1.1819556 [3,] 0.7236144 0.9683287 0.7911376 -1.3622485 [4,] -0.6310322 -0.4882616 -0.3234987 0.4484598 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.4650018 0.6246704 0.6485895 1.3409360 [2,] 0.4831442 2.9865401 1.2048553 1.1819556 [3,] 0.7236144 0.9683287 0.7911376 1.3622485 [4,] 0.6310322 0.4882616 0.3234987 0.4484598 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9732142 0.7903609 0.8053505 1.1579879 [2,] 0.6950857 1.7281609 1.0976590 1.0871778 [3,] 0.8506553 0.9840369 0.8894592 1.1671540 [4,] 0.7943753 0.6987572 0.5687695 0.6696714 > > 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.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.19714 33.52828 33.70209 37.92081 [2,] 32.43400 45.26815 37.18145 37.05373 [3,] 34.23017 35.80870 34.68573 38.03379 [4,] 33.57479 32.47583 31.01119 32.14517 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600003204000> > exp(tmp5) <pointer: 0x600003204000> > log(tmp5,2) <pointer: 0x600003204000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.637 > Min(tmp5) [1] 52.52801 > mean(tmp5) [1] 72.86525 > Sum(tmp5) [1] 14573.05 > Var(tmp5) [1] 857.0486 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 92.11835 71.90243 70.32847 69.50429 72.12137 69.13078 72.90835 72.21724 [9] 70.51781 67.90339 > rowSums(tmp5) [1] 1842.367 1438.049 1406.569 1390.086 1442.427 1382.616 1458.167 1444.345 [9] 1410.356 1358.068 > rowVars(tmp5) [1] 7818.70346 88.43964 66.71366 63.75259 68.82329 79.11580 [7] 88.93868 94.07839 85.28554 65.35097 > rowSd(tmp5) [1] 88.423433 9.404235 8.167843 7.984522 8.295980 8.894706 9.430730 [8] 9.699402 9.235017 8.083995 > rowMax(tmp5) [1] 466.63698 94.21972 86.32443 83.48929 94.85972 88.37119 93.09446 [8] 88.27699 89.74369 88.23682 > rowMin(tmp5) [1] 59.51932 59.55640 55.29126 52.52801 61.40046 53.01130 58.74380 53.56965 [9] 56.68755 58.66280 > > colMeans(tmp5) [1] 108.68236 70.51364 73.59481 76.58162 70.28444 71.81342 68.63034 [8] 72.17411 66.71188 68.15889 72.29921 73.25784 68.47147 71.29213 [15] 71.72808 70.18970 65.71692 68.21590 75.11496 73.87323 > colSums(tmp5) [1] 1086.8236 705.1364 735.9481 765.8162 702.8444 718.1342 686.3034 [8] 721.7411 667.1188 681.5889 722.9921 732.5784 684.7147 712.9213 [15] 717.2808 701.8970 657.1692 682.1590 751.1496 738.7323 > colVars(tmp5) [1] 15830.43592 110.89779 72.49612 81.24557 66.08843 92.29625 [7] 23.45219 123.46469 59.83041 35.12848 128.37214 93.52621 [13] 114.51667 49.99711 90.13311 97.99280 57.44921 33.31552 [19] 71.11862 53.61725 > colSd(tmp5) [1] 125.819060 10.530802 8.514465 9.013633 8.129479 9.607094 [7] 4.842746 11.111467 7.735012 5.926928 11.330143 9.670895 [13] 10.701246 7.070863 9.493846 9.899131 7.579526 5.771960 [19] 8.433186 7.322380 > colMax(tmp5) [1] 466.63698 94.21972 89.74369 88.59672 82.14952 84.52990 76.86956 [8] 86.95371 75.13170 78.70604 93.09446 94.85972 88.23682 80.69962 [15] 88.27699 89.15062 83.34702 75.21121 86.93883 84.97246 > colMin(tmp5) [1] 60.57342 59.79490 58.02038 58.66280 56.68755 53.56965 62.66267 53.01130 [9] 52.52801 56.18867 59.27694 61.47117 55.67758 55.03000 59.82255 59.93600 [17] 55.29126 59.34681 57.86955 58.03341 > > > ### 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] 92.11835 71.90243 NA 69.50429 72.12137 69.13078 72.90835 72.21724 [9] 70.51781 67.90339 > rowSums(tmp5) [1] 1842.367 1438.049 NA 1390.086 1442.427 1382.616 1458.167 1444.345 [9] 1410.356 1358.068 > rowVars(tmp5) [1] 7818.70346 88.43964 70.21100 63.75259 68.82329 79.11580 [7] 88.93868 94.07839 85.28554 65.35097 > rowSd(tmp5) [1] 88.423433 9.404235 8.379200 7.984522 8.295980 8.894706 9.430730 [8] 9.699402 9.235017 8.083995 > rowMax(tmp5) [1] 466.63698 94.21972 NA 83.48929 94.85972 88.37119 93.09446 [8] 88.27699 89.74369 88.23682 > rowMin(tmp5) [1] 59.51932 59.55640 NA 52.52801 61.40046 53.01130 58.74380 53.56965 [9] 56.68755 58.66280 > > colMeans(tmp5) [1] 108.68236 70.51364 73.59481 76.58162 70.28444 71.81342 68.63034 [8] 72.17411 66.71188 NA 72.29921 73.25784 68.47147 71.29213 [15] 71.72808 70.18970 65.71692 68.21590 75.11496 73.87323 > colSums(tmp5) [1] 1086.8236 705.1364 735.9481 765.8162 702.8444 718.1342 686.3034 [8] 721.7411 667.1188 NA 722.9921 732.5784 684.7147 712.9213 [15] 717.2808 701.8970 657.1692 682.1590 751.1496 738.7323 > colVars(tmp5) [1] 15830.43592 110.89779 72.49612 81.24557 66.08843 92.29625 [7] 23.45219 123.46469 59.83041 NA 128.37214 93.52621 [13] 114.51667 49.99711 90.13311 97.99280 57.44921 33.31552 [19] 71.11862 53.61725 > colSd(tmp5) [1] 125.819060 10.530802 8.514465 9.013633 8.129479 9.607094 [7] 4.842746 11.111467 7.735012 NA 11.330143 9.670895 [13] 10.701246 7.070863 9.493846 9.899131 7.579526 5.771960 [19] 8.433186 7.322380 > colMax(tmp5) [1] 466.63698 94.21972 89.74369 88.59672 82.14952 84.52990 76.86956 [8] 86.95371 75.13170 NA 93.09446 94.85972 88.23682 80.69962 [15] 88.27699 89.15062 83.34702 75.21121 86.93883 84.97246 > colMin(tmp5) [1] 60.57342 59.79490 58.02038 58.66280 56.68755 53.56965 62.66267 53.01130 [9] 52.52801 NA 59.27694 61.47117 55.67758 55.03000 59.82255 59.93600 [17] 55.29126 59.34681 57.86955 58.03341 > > Max(tmp5,na.rm=TRUE) [1] 466.637 > Min(tmp5,na.rm=TRUE) [1] 52.52801 > mean(tmp5,na.rm=TRUE) [1] 72.88749 > Sum(tmp5,na.rm=TRUE) [1] 14504.61 > Var(tmp5,na.rm=TRUE) [1] 861.2777 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.11835 71.90243 70.42797 69.50429 72.12137 69.13078 72.90835 72.21724 [9] 70.51781 67.90339 > rowSums(tmp5,na.rm=TRUE) [1] 1842.367 1438.049 1338.131 1390.086 1442.427 1382.616 1458.167 1444.345 [9] 1410.356 1358.068 > rowVars(tmp5,na.rm=TRUE) [1] 7818.70346 88.43964 70.21100 63.75259 68.82329 79.11580 [7] 88.93868 94.07839 85.28554 65.35097 > rowSd(tmp5,na.rm=TRUE) [1] 88.423433 9.404235 8.379200 7.984522 8.295980 8.894706 9.430730 [8] 9.699402 9.235017 8.083995 > rowMax(tmp5,na.rm=TRUE) [1] 466.63698 94.21972 86.32443 83.48929 94.85972 88.37119 93.09446 [8] 88.27699 89.74369 88.23682 > rowMin(tmp5,na.rm=TRUE) [1] 59.51932 59.55640 55.29126 52.52801 61.40046 53.01130 58.74380 53.56965 [9] 56.68755 58.66280 > > colMeans(tmp5,na.rm=TRUE) [1] 108.68236 70.51364 73.59481 76.58162 70.28444 71.81342 68.63034 [8] 72.17411 66.71188 68.12786 72.29921 73.25784 68.47147 71.29213 [15] 71.72808 70.18970 65.71692 68.21590 75.11496 73.87323 > colSums(tmp5,na.rm=TRUE) [1] 1086.8236 705.1364 735.9481 765.8162 702.8444 718.1342 686.3034 [8] 721.7411 667.1188 613.1508 722.9921 732.5784 684.7147 712.9213 [15] 717.2808 701.8970 657.1692 682.1590 751.1496 738.7323 > colVars(tmp5,na.rm=TRUE) [1] 15830.43592 110.89779 72.49612 81.24557 66.08843 92.29625 [7] 23.45219 123.46469 59.83041 39.50871 128.37214 93.52621 [13] 114.51667 49.99711 90.13311 97.99280 57.44921 33.31552 [19] 71.11862 53.61725 > colSd(tmp5,na.rm=TRUE) [1] 125.819060 10.530802 8.514465 9.013633 8.129479 9.607094 [7] 4.842746 11.111467 7.735012 6.285595 11.330143 9.670895 [13] 10.701246 7.070863 9.493846 9.899131 7.579526 5.771960 [19] 8.433186 7.322380 > colMax(tmp5,na.rm=TRUE) [1] 466.63698 94.21972 89.74369 88.59672 82.14952 84.52990 76.86956 [8] 86.95371 75.13170 78.70604 93.09446 94.85972 88.23682 80.69962 [15] 88.27699 89.15062 83.34702 75.21121 86.93883 84.97246 > colMin(tmp5,na.rm=TRUE) [1] 60.57342 59.79490 58.02038 58.66280 56.68755 53.56965 62.66267 53.01130 [9] 52.52801 56.18867 59.27694 61.47117 55.67758 55.03000 59.82255 59.93600 [17] 55.29126 59.34681 57.86955 58.03341 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 92.11835 71.90243 NaN 69.50429 72.12137 69.13078 72.90835 72.21724 [9] 70.51781 67.90339 > rowSums(tmp5,na.rm=TRUE) [1] 1842.367 1438.049 0.000 1390.086 1442.427 1382.616 1458.167 1444.345 [9] 1410.356 1358.068 > rowVars(tmp5,na.rm=TRUE) [1] 7818.70346 88.43964 NA 63.75259 68.82329 79.11580 [7] 88.93868 94.07839 85.28554 65.35097 > rowSd(tmp5,na.rm=TRUE) [1] 88.423433 9.404235 NA 7.984522 8.295980 8.894706 9.430730 [8] 9.699402 9.235017 8.083995 > rowMax(tmp5,na.rm=TRUE) [1] 466.63698 94.21972 NA 83.48929 94.85972 88.37119 93.09446 [8] 88.27699 89.74369 88.23682 > rowMin(tmp5,na.rm=TRUE) [1] 59.51932 59.55640 NA 52.52801 61.40046 53.01130 58.74380 53.56965 [9] 56.68755 58.66280 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 112.84200 70.06726 73.75048 76.29487 69.80564 71.65160 69.13404 [8] 72.61570 65.93436 NaN 70.74086 73.06272 69.89302 70.24685 [15] 72.77446 70.58265 66.87532 67.52769 77.03111 73.98375 > colSums(tmp5,na.rm=TRUE) [1] 1015.5780 630.6053 663.7543 686.6538 628.2508 644.8644 622.2063 [8] 653.5413 593.4092 0.0000 636.6677 657.5644 629.0371 632.2217 [15] 654.9702 635.2438 601.8779 607.7492 693.2800 665.8537 > colVars(tmp5,na.rm=TRUE) [1] 17614.58615 122.51834 81.28552 90.47625 71.77042 103.53869 [7] 23.52945 136.70404 60.50821 NA 117.09829 104.78865 [13] 106.09740 43.95495 89.08203 108.50483 49.53394 32.15159 [19] 38.70233 60.18200 > colSd(tmp5,na.rm=TRUE) [1] 132.719954 11.068800 9.015848 9.511900 8.471743 10.175396 [7] 4.850716 11.692050 7.778702 NA 10.821196 10.236633 [13] 10.300359 6.629853 9.438328 10.416565 7.038036 5.670237 [19] 6.221120 7.757706 > colMax(tmp5,na.rm=TRUE) [1] 466.63698 94.21972 89.74369 88.59672 82.14952 84.52990 76.86956 [8] 86.95371 75.13170 -Inf 93.09446 94.85972 88.23682 79.80121 [15] 88.27699 89.15062 83.34702 75.21121 86.93883 84.97246 > colMin(tmp5,na.rm=TRUE) [1] 60.57342 59.79490 58.02038 58.66280 56.68755 53.56965 62.66267 53.01130 [9] 52.52801 Inf 59.27694 61.47117 57.60020 55.03000 59.82255 59.93600 [17] 59.90519 59.34681 67.94828 58.03341 > > > > > 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] 266.6028 374.6750 194.4796 200.1393 148.4758 216.8863 179.8117 192.1206 [9] 308.9294 151.8730 > apply(copymatrix,1,var,na.rm=TRUE) [1] 266.6028 374.6750 194.4796 200.1393 148.4758 216.8863 179.8117 192.1206 [9] 308.9294 151.8730 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] 5.684342e-14 -8.526513e-14 -1.136868e-13 -4.263256e-14 -3.126388e-13 [6] -5.684342e-14 -5.684342e-14 -5.684342e-14 5.684342e-14 0.000000e+00 [11] 9.947598e-14 -5.684342e-14 -1.421085e-14 -1.136868e-13 -2.842171e-14 [16] 1.421085e-13 -1.136868e-13 2.842171e-14 -8.526513e-14 2.131628e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 3 5 9 8 3 2 10 1 10 20 9 3 5 11 9 6 7 16 7 1 7 19 6 20 10 13 2 10 4 13 1 16 9 15 5 14 7 3 4 18 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.838314 > Min(tmp) [1] -2.774605 > mean(tmp) [1] -0.1384343 > Sum(tmp) [1] -13.84343 > Var(tmp) [1] 1.016291 > > rowMeans(tmp) [1] -0.1384343 > rowSums(tmp) [1] -13.84343 > rowVars(tmp) [1] 1.016291 > rowSd(tmp) [1] 1.008113 > rowMax(tmp) [1] 2.838314 > rowMin(tmp) [1] -2.774605 > > colMeans(tmp) [1] -0.992247115 -1.108077415 0.134394554 -1.659681121 -1.020685020 [6] 0.210776778 0.396535408 0.165284225 -1.205165374 0.170321565 [11] 1.318757331 0.078454435 -1.737465523 1.398396079 -0.425804500 [16] -0.014188498 0.201085760 0.204293654 0.125948258 0.194506557 [21] 1.885057042 -2.774604529 -1.572572527 -0.352865355 -0.708684337 [26] -2.286401264 -0.138853778 0.789165473 -0.197915413 1.344712232 [31] -0.655473722 0.206741098 -0.578832474 -0.754680138 -0.346912078 [36] 2.138114890 -0.437735515 -0.187114314 0.056599332 -0.447195914 [41] -0.959929014 -0.281467443 -0.698467323 -0.150592021 0.147132204 [46] 0.928958629 0.587871952 0.275930046 -1.248820966 0.113208681 [51] -1.402606247 0.530652146 -0.129604043 0.216333590 -0.266620206 [56] 2.026661947 0.250413662 -1.659495620 -0.123790773 1.048421962 [61] 0.050056147 0.240060819 0.429376691 0.998972874 -1.057574596 [66] -0.766426694 -0.720211158 -0.514979771 0.330672868 -0.008044602 [71] 0.420191097 1.547442371 -1.940158645 -0.027192906 -0.977702645 [76] 0.609685294 -0.929694196 0.482081863 -2.067939755 1.172455292 [81] 2.838314483 0.607888435 -0.522178208 -1.049357026 1.047836298 [86] -2.242186875 0.299276440 0.150581889 0.937552720 -0.680040736 [91] 0.417568761 -0.139012280 -0.807019881 -2.036424325 0.234256874 [96] -1.642305548 0.545263108 0.288444873 -0.548095481 0.564960002 > colSums(tmp) [1] -0.992247115 -1.108077415 0.134394554 -1.659681121 -1.020685020 [6] 0.210776778 0.396535408 0.165284225 -1.205165374 0.170321565 [11] 1.318757331 0.078454435 -1.737465523 1.398396079 -0.425804500 [16] -0.014188498 0.201085760 0.204293654 0.125948258 0.194506557 [21] 1.885057042 -2.774604529 -1.572572527 -0.352865355 -0.708684337 [26] -2.286401264 -0.138853778 0.789165473 -0.197915413 1.344712232 [31] -0.655473722 0.206741098 -0.578832474 -0.754680138 -0.346912078 [36] 2.138114890 -0.437735515 -0.187114314 0.056599332 -0.447195914 [41] -0.959929014 -0.281467443 -0.698467323 -0.150592021 0.147132204 [46] 0.928958629 0.587871952 0.275930046 -1.248820966 0.113208681 [51] -1.402606247 0.530652146 -0.129604043 0.216333590 -0.266620206 [56] 2.026661947 0.250413662 -1.659495620 -0.123790773 1.048421962 [61] 0.050056147 0.240060819 0.429376691 0.998972874 -1.057574596 [66] -0.766426694 -0.720211158 -0.514979771 0.330672868 -0.008044602 [71] 0.420191097 1.547442371 -1.940158645 -0.027192906 -0.977702645 [76] 0.609685294 -0.929694196 0.482081863 -2.067939755 1.172455292 [81] 2.838314483 0.607888435 -0.522178208 -1.049357026 1.047836298 [86] -2.242186875 0.299276440 0.150581889 0.937552720 -0.680040736 [91] 0.417568761 -0.139012280 -0.807019881 -2.036424325 0.234256874 [96] -1.642305548 0.545263108 0.288444873 -0.548095481 0.564960002 > 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.992247115 -1.108077415 0.134394554 -1.659681121 -1.020685020 [6] 0.210776778 0.396535408 0.165284225 -1.205165374 0.170321565 [11] 1.318757331 0.078454435 -1.737465523 1.398396079 -0.425804500 [16] -0.014188498 0.201085760 0.204293654 0.125948258 0.194506557 [21] 1.885057042 -2.774604529 -1.572572527 -0.352865355 -0.708684337 [26] -2.286401264 -0.138853778 0.789165473 -0.197915413 1.344712232 [31] -0.655473722 0.206741098 -0.578832474 -0.754680138 -0.346912078 [36] 2.138114890 -0.437735515 -0.187114314 0.056599332 -0.447195914 [41] -0.959929014 -0.281467443 -0.698467323 -0.150592021 0.147132204 [46] 0.928958629 0.587871952 0.275930046 -1.248820966 0.113208681 [51] -1.402606247 0.530652146 -0.129604043 0.216333590 -0.266620206 [56] 2.026661947 0.250413662 -1.659495620 -0.123790773 1.048421962 [61] 0.050056147 0.240060819 0.429376691 0.998972874 -1.057574596 [66] -0.766426694 -0.720211158 -0.514979771 0.330672868 -0.008044602 [71] 0.420191097 1.547442371 -1.940158645 -0.027192906 -0.977702645 [76] 0.609685294 -0.929694196 0.482081863 -2.067939755 1.172455292 [81] 2.838314483 0.607888435 -0.522178208 -1.049357026 1.047836298 [86] -2.242186875 0.299276440 0.150581889 0.937552720 -0.680040736 [91] 0.417568761 -0.139012280 -0.807019881 -2.036424325 0.234256874 [96] -1.642305548 0.545263108 0.288444873 -0.548095481 0.564960002 > colMin(tmp) [1] -0.992247115 -1.108077415 0.134394554 -1.659681121 -1.020685020 [6] 0.210776778 0.396535408 0.165284225 -1.205165374 0.170321565 [11] 1.318757331 0.078454435 -1.737465523 1.398396079 -0.425804500 [16] -0.014188498 0.201085760 0.204293654 0.125948258 0.194506557 [21] 1.885057042 -2.774604529 -1.572572527 -0.352865355 -0.708684337 [26] -2.286401264 -0.138853778 0.789165473 -0.197915413 1.344712232 [31] -0.655473722 0.206741098 -0.578832474 -0.754680138 -0.346912078 [36] 2.138114890 -0.437735515 -0.187114314 0.056599332 -0.447195914 [41] -0.959929014 -0.281467443 -0.698467323 -0.150592021 0.147132204 [46] 0.928958629 0.587871952 0.275930046 -1.248820966 0.113208681 [51] -1.402606247 0.530652146 -0.129604043 0.216333590 -0.266620206 [56] 2.026661947 0.250413662 -1.659495620 -0.123790773 1.048421962 [61] 0.050056147 0.240060819 0.429376691 0.998972874 -1.057574596 [66] -0.766426694 -0.720211158 -0.514979771 0.330672868 -0.008044602 [71] 0.420191097 1.547442371 -1.940158645 -0.027192906 -0.977702645 [76] 0.609685294 -0.929694196 0.482081863 -2.067939755 1.172455292 [81] 2.838314483 0.607888435 -0.522178208 -1.049357026 1.047836298 [86] -2.242186875 0.299276440 0.150581889 0.937552720 -0.680040736 [91] 0.417568761 -0.139012280 -0.807019881 -2.036424325 0.234256874 [96] -1.642305548 0.545263108 0.288444873 -0.548095481 0.564960002 > colMedians(tmp) [1] -0.992247115 -1.108077415 0.134394554 -1.659681121 -1.020685020 [6] 0.210776778 0.396535408 0.165284225 -1.205165374 0.170321565 [11] 1.318757331 0.078454435 -1.737465523 1.398396079 -0.425804500 [16] -0.014188498 0.201085760 0.204293654 0.125948258 0.194506557 [21] 1.885057042 -2.774604529 -1.572572527 -0.352865355 -0.708684337 [26] -2.286401264 -0.138853778 0.789165473 -0.197915413 1.344712232 [31] -0.655473722 0.206741098 -0.578832474 -0.754680138 -0.346912078 [36] 2.138114890 -0.437735515 -0.187114314 0.056599332 -0.447195914 [41] -0.959929014 -0.281467443 -0.698467323 -0.150592021 0.147132204 [46] 0.928958629 0.587871952 0.275930046 -1.248820966 0.113208681 [51] -1.402606247 0.530652146 -0.129604043 0.216333590 -0.266620206 [56] 2.026661947 0.250413662 -1.659495620 -0.123790773 1.048421962 [61] 0.050056147 0.240060819 0.429376691 0.998972874 -1.057574596 [66] -0.766426694 -0.720211158 -0.514979771 0.330672868 -0.008044602 [71] 0.420191097 1.547442371 -1.940158645 -0.027192906 -0.977702645 [76] 0.609685294 -0.929694196 0.482081863 -2.067939755 1.172455292 [81] 2.838314483 0.607888435 -0.522178208 -1.049357026 1.047836298 [86] -2.242186875 0.299276440 0.150581889 0.937552720 -0.680040736 [91] 0.417568761 -0.139012280 -0.807019881 -2.036424325 0.234256874 [96] -1.642305548 0.545263108 0.288444873 -0.548095481 0.564960002 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.9922471 -1.108077 0.1343946 -1.659681 -1.020685 0.2107768 0.3965354 [2,] -0.9922471 -1.108077 0.1343946 -1.659681 -1.020685 0.2107768 0.3965354 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.1652842 -1.205165 0.1703216 1.318757 0.07845443 -1.737466 1.398396 [2,] 0.1652842 -1.205165 0.1703216 1.318757 0.07845443 -1.737466 1.398396 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.4258045 -0.0141885 0.2010858 0.2042937 0.1259483 0.1945066 1.885057 [2,] -0.4258045 -0.0141885 0.2010858 0.2042937 0.1259483 0.1945066 1.885057 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -2.774605 -1.572573 -0.3528654 -0.7086843 -2.286401 -0.1388538 0.7891655 [2,] -2.774605 -1.572573 -0.3528654 -0.7086843 -2.286401 -0.1388538 0.7891655 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.1979154 1.344712 -0.6554737 0.2067411 -0.5788325 -0.7546801 -0.3469121 [2,] -0.1979154 1.344712 -0.6554737 0.2067411 -0.5788325 -0.7546801 -0.3469121 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 2.138115 -0.4377355 -0.1871143 0.05659933 -0.4471959 -0.959929 -0.2814674 [2,] 2.138115 -0.4377355 -0.1871143 0.05659933 -0.4471959 -0.959929 -0.2814674 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.6984673 -0.150592 0.1471322 0.9289586 0.587872 0.27593 -1.248821 [2,] -0.6984673 -0.150592 0.1471322 0.9289586 0.587872 0.27593 -1.248821 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.1132087 -1.402606 0.5306521 -0.129604 0.2163336 -0.2666202 2.026662 [2,] 0.1132087 -1.402606 0.5306521 -0.129604 0.2163336 -0.2666202 2.026662 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.2504137 -1.659496 -0.1237908 1.048422 0.05005615 0.2400608 0.4293767 [2,] 0.2504137 -1.659496 -0.1237908 1.048422 0.05005615 0.2400608 0.4293767 [,64] [,65] [,66] [,67] [,68] [,69] [1,] 0.9989729 -1.057575 -0.7664267 -0.7202112 -0.5149798 0.3306729 [2,] 0.9989729 -1.057575 -0.7664267 -0.7202112 -0.5149798 0.3306729 [,70] [,71] [,72] [,73] [,74] [,75] [,76] [1,] -0.008044602 0.4201911 1.547442 -1.940159 -0.02719291 -0.9777026 0.6096853 [2,] -0.008044602 0.4201911 1.547442 -1.940159 -0.02719291 -0.9777026 0.6096853 [,77] [,78] [,79] [,80] [,81] [,82] [,83] [1,] -0.9296942 0.4820819 -2.06794 1.172455 2.838314 0.6078884 -0.5221782 [2,] -0.9296942 0.4820819 -2.06794 1.172455 2.838314 0.6078884 -0.5221782 [,84] [,85] [,86] [,87] [,88] [,89] [,90] [1,] -1.049357 1.047836 -2.242187 0.2992764 0.1505819 0.9375527 -0.6800407 [2,] -1.049357 1.047836 -2.242187 0.2992764 0.1505819 0.9375527 -0.6800407 [,91] [,92] [,93] [,94] [,95] [,96] [,97] [1,] 0.4175688 -0.1390123 -0.8070199 -2.036424 0.2342569 -1.642306 0.5452631 [2,] 0.4175688 -0.1390123 -0.8070199 -2.036424 0.2342569 -1.642306 0.5452631 [,98] [,99] [,100] [1,] 0.2884449 -0.5480955 0.56496 [2,] 0.2884449 -0.5480955 0.56496 > > > Max(tmp2) [1] 2.539357 > Min(tmp2) [1] -2.205404 > mean(tmp2) [1] 0.0665665 > Sum(tmp2) [1] 6.65665 > Var(tmp2) [1] 0.95351 > > rowMeans(tmp2) [1] 0.44698557 -1.02372541 -1.14319125 1.50381354 -0.65752844 -0.07118114 [7] -1.27384215 0.03243105 -0.44990222 -1.29502637 -0.31455274 0.28003788 [13] 2.53935725 0.18375838 -2.11661846 0.50208776 0.08974598 1.85417221 [19] -1.14325763 0.30425293 0.62768172 -0.08005731 0.20047721 -0.88507362 [25] 1.16039279 -1.03272367 1.31112811 -1.58841259 0.11111395 0.26490277 [31] -0.44006447 0.28012083 0.20916218 0.79808525 1.11755340 0.83711182 [37] 1.35881207 0.66319186 1.53246085 -0.28759927 0.76480964 -1.09022824 [43] -1.22187710 0.37160170 -0.36344994 0.26204212 0.70626999 -0.82818311 [49] -0.62743997 -0.38370326 0.98046764 0.09221647 -0.42073840 0.13141773 [55] 1.13692140 -0.13724699 2.15978100 2.24493922 -0.41061084 -0.75192906 [61] -1.32323119 0.05724490 0.58582923 1.13840657 -0.88536437 0.17523951 [67] -0.24953038 1.48407826 0.74013277 -0.77341466 -0.43312862 0.73338367 [73] -0.13156193 1.01178155 0.45911285 -0.41507648 1.13776138 -0.66971629 [79] 0.66527355 -0.21923752 0.32083807 -1.79655132 1.21394963 0.23293129 [85] -2.01838320 1.72312438 1.07474965 0.90721279 -2.20540357 -0.04418591 [91] 0.34642628 -0.74978352 0.02879985 0.36949694 -1.43819073 -0.59253950 [97] 0.61992675 0.28933708 -0.69091224 -1.04331626 > rowSums(tmp2) [1] 0.44698557 -1.02372541 -1.14319125 1.50381354 -0.65752844 -0.07118114 [7] -1.27384215 0.03243105 -0.44990222 -1.29502637 -0.31455274 0.28003788 [13] 2.53935725 0.18375838 -2.11661846 0.50208776 0.08974598 1.85417221 [19] -1.14325763 0.30425293 0.62768172 -0.08005731 0.20047721 -0.88507362 [25] 1.16039279 -1.03272367 1.31112811 -1.58841259 0.11111395 0.26490277 [31] -0.44006447 0.28012083 0.20916218 0.79808525 1.11755340 0.83711182 [37] 1.35881207 0.66319186 1.53246085 -0.28759927 0.76480964 -1.09022824 [43] -1.22187710 0.37160170 -0.36344994 0.26204212 0.70626999 -0.82818311 [49] -0.62743997 -0.38370326 0.98046764 0.09221647 -0.42073840 0.13141773 [55] 1.13692140 -0.13724699 2.15978100 2.24493922 -0.41061084 -0.75192906 [61] -1.32323119 0.05724490 0.58582923 1.13840657 -0.88536437 0.17523951 [67] -0.24953038 1.48407826 0.74013277 -0.77341466 -0.43312862 0.73338367 [73] -0.13156193 1.01178155 0.45911285 -0.41507648 1.13776138 -0.66971629 [79] 0.66527355 -0.21923752 0.32083807 -1.79655132 1.21394963 0.23293129 [85] -2.01838320 1.72312438 1.07474965 0.90721279 -2.20540357 -0.04418591 [91] 0.34642628 -0.74978352 0.02879985 0.36949694 -1.43819073 -0.59253950 [97] 0.61992675 0.28933708 -0.69091224 -1.04331626 > 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.44698557 -1.02372541 -1.14319125 1.50381354 -0.65752844 -0.07118114 [7] -1.27384215 0.03243105 -0.44990222 -1.29502637 -0.31455274 0.28003788 [13] 2.53935725 0.18375838 -2.11661846 0.50208776 0.08974598 1.85417221 [19] -1.14325763 0.30425293 0.62768172 -0.08005731 0.20047721 -0.88507362 [25] 1.16039279 -1.03272367 1.31112811 -1.58841259 0.11111395 0.26490277 [31] -0.44006447 0.28012083 0.20916218 0.79808525 1.11755340 0.83711182 [37] 1.35881207 0.66319186 1.53246085 -0.28759927 0.76480964 -1.09022824 [43] -1.22187710 0.37160170 -0.36344994 0.26204212 0.70626999 -0.82818311 [49] -0.62743997 -0.38370326 0.98046764 0.09221647 -0.42073840 0.13141773 [55] 1.13692140 -0.13724699 2.15978100 2.24493922 -0.41061084 -0.75192906 [61] -1.32323119 0.05724490 0.58582923 1.13840657 -0.88536437 0.17523951 [67] -0.24953038 1.48407826 0.74013277 -0.77341466 -0.43312862 0.73338367 [73] -0.13156193 1.01178155 0.45911285 -0.41507648 1.13776138 -0.66971629 [79] 0.66527355 -0.21923752 0.32083807 -1.79655132 1.21394963 0.23293129 [85] -2.01838320 1.72312438 1.07474965 0.90721279 -2.20540357 -0.04418591 [91] 0.34642628 -0.74978352 0.02879985 0.36949694 -1.43819073 -0.59253950 [97] 0.61992675 0.28933708 -0.69091224 -1.04331626 > rowMin(tmp2) [1] 0.44698557 -1.02372541 -1.14319125 1.50381354 -0.65752844 -0.07118114 [7] -1.27384215 0.03243105 -0.44990222 -1.29502637 -0.31455274 0.28003788 [13] 2.53935725 0.18375838 -2.11661846 0.50208776 0.08974598 1.85417221 [19] -1.14325763 0.30425293 0.62768172 -0.08005731 0.20047721 -0.88507362 [25] 1.16039279 -1.03272367 1.31112811 -1.58841259 0.11111395 0.26490277 [31] -0.44006447 0.28012083 0.20916218 0.79808525 1.11755340 0.83711182 [37] 1.35881207 0.66319186 1.53246085 -0.28759927 0.76480964 -1.09022824 [43] -1.22187710 0.37160170 -0.36344994 0.26204212 0.70626999 -0.82818311 [49] -0.62743997 -0.38370326 0.98046764 0.09221647 -0.42073840 0.13141773 [55] 1.13692140 -0.13724699 2.15978100 2.24493922 -0.41061084 -0.75192906 [61] -1.32323119 0.05724490 0.58582923 1.13840657 -0.88536437 0.17523951 [67] -0.24953038 1.48407826 0.74013277 -0.77341466 -0.43312862 0.73338367 [73] -0.13156193 1.01178155 0.45911285 -0.41507648 1.13776138 -0.66971629 [79] 0.66527355 -0.21923752 0.32083807 -1.79655132 1.21394963 0.23293129 [85] -2.01838320 1.72312438 1.07474965 0.90721279 -2.20540357 -0.04418591 [91] 0.34642628 -0.74978352 0.02879985 0.36949694 -1.43819073 -0.59253950 [97] 0.61992675 0.28933708 -0.69091224 -1.04331626 > > colMeans(tmp2) [1] 0.0665665 > colSums(tmp2) [1] 6.65665 > colVars(tmp2) [1] 0.95351 > colSd(tmp2) [1] 0.9764784 > colMax(tmp2) [1] 2.539357 > colMin(tmp2) [1] -2.205404 > colMedians(tmp2) [1] 0.1212658 > colRanges(tmp2) [,1] [1,] -2.205404 [2,] 2.539357 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 5.1121286 -2.2155416 1.1994764 -1.1477179 4.7150076 5.4881391 [7] 4.7966750 -2.1303300 -3.6932052 0.8885079 > colApply(tmp,quantile)[,1] [,1] [1,] -1.4169974 [2,] -0.3507674 [3,] 0.5728986 [4,] 1.1017114 [5,] 2.4097262 > > rowApply(tmp,sum) [1] 4.363304 3.827412 3.124056 2.730068 2.692548 2.972219 4.598911 [8] 2.683631 -5.741035 -8.237974 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 10 4 7 9 2 9 2 8 7 2 [2,] 1 2 1 10 6 4 9 9 4 1 [3,] 6 10 6 1 8 3 8 2 10 4 [4,] 5 5 9 3 5 1 5 5 5 3 [5,] 9 7 8 6 4 10 4 4 3 8 [6,] 4 3 4 2 10 8 6 7 6 10 [7,] 7 6 10 5 9 7 1 10 8 6 [8,] 2 8 2 8 7 5 3 1 2 9 [9,] 8 1 3 4 3 6 10 3 1 5 [10,] 3 9 5 7 1 2 7 6 9 7 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.58119504 -0.07696831 -0.43220024 -3.00568293 -3.68040511 -2.18682091 [7] 0.69110337 -2.91810940 -0.83271118 3.48281680 0.65027641 0.22363045 [13] -1.90596503 1.34854258 0.01195829 1.21974907 3.19886854 3.53498461 [19] 0.71113507 -3.87394685 > colApply(tmp,quantile)[,1] [,1] [1,] -0.71773183 [2,] -0.41053331 [3,] 0.05438366 [4,] 0.14470446 [5,] 1.51037206 > > rowApply(tmp,sum) [1] -0.6687770 3.3679835 -3.5459612 -1.5575019 -0.8542931 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 7 19 14 10 6 [2,] 13 6 5 11 17 [3,] 20 3 6 15 4 [4,] 8 4 17 3 2 [5,] 5 1 12 6 7 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.41053331 -0.1282472 1.7704474 -0.3930688 -0.50879717 -0.48336658 [2,] 1.51037206 -0.4290741 -0.8154756 -0.4967887 -1.95089263 0.01577241 [3,] 0.14470446 -0.8287358 -0.7409737 0.3784952 0.05211899 -0.55582665 [4,] 0.05438366 0.1453350 0.2706841 -1.1562122 -0.55773344 -1.47308731 [5,] -0.71773183 1.1637538 -0.9168824 -1.3381084 -0.71510086 0.30968722 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.191736085 -0.1858287 -0.7517989 1.4286078 -0.2169343 -1.6512672 [2,] 0.600996273 1.0278888 -0.0868553 1.2102154 0.2591435 0.4131195 [3,] 0.353867273 -2.4111255 0.5936246 0.5741641 1.9779874 -0.8441045 [4,] 0.005981098 -0.2254906 0.3205945 0.5578379 -1.3833336 0.5187391 [5,] -0.078005193 -1.1235534 -0.9082761 -0.2880083 0.0134134 1.7871435 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.69102397 -0.19895282 0.62650669 1.14805521 0.8525385 0.20524370 [2,] 0.08224418 -0.45393383 -1.22300766 0.23933035 0.5234654 2.02998576 [3,] -0.91634583 -0.03761966 0.06383522 0.21950926 -0.4071933 -0.04686132 [4,] 0.15877839 1.40443848 0.26389867 -0.32492718 0.1462949 -0.58715918 [5,] -0.53961779 0.63461042 0.28072537 -0.06221858 2.0837630 1.93377565 [,19] [,20] [1,] -0.7921278888 -0.09649339 [2,] 0.6405867648 0.27089088 [3,] 0.0001224329 -1.11560379 [4,] 1.3082795670 -1.00480373 [5,] -0.4457258050 -1.92793682 > > > 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.20-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.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 654 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 567 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.20-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 2.293669 1.476187 0.1272864 -1.584084 0.06382107 -1.085231 -0.6740336 col8 col9 col10 col11 col12 col13 col14 row1 -0.7494544 0.7331621 -1.096263 0.9444717 0.3033824 -1.693706 -1.220238 col15 col16 col17 col18 col19 col20 row1 -0.1830144 0.1172635 1.229189 1.128338 -0.3704408 -0.02472917 > tmp[,"col10"] col10 row1 -1.0962632 row2 0.3293998 row3 1.3849047 row4 1.5295011 row5 1.0808290 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 2.2936693 1.4761869 0.1272864 -1.584084 0.06382107 -1.0852307 -0.6740336 row5 0.7836511 0.1580805 -0.7137639 -1.747163 0.77318385 -0.7098567 -0.5992456 col8 col9 col10 col11 col12 col13 col14 row1 -0.7494544 0.7331621 -1.096263 0.9444717 0.3033824 -1.693706 -1.220238 row5 -0.4853604 0.8151731 1.080829 0.1774812 0.2501532 -0.132156 1.635934 col15 col16 col17 col18 col19 col20 row1 -0.1830144 0.117263488 1.229189 1.12833793 -0.370440797 -0.02472917 row5 0.1862725 0.002954652 -2.349477 0.04972156 -0.003050622 0.67557046 > tmp[,c("col6","col20")] col6 col20 row1 -1.08523065 -0.02472917 row2 0.96852433 -0.11962207 row3 -0.52779173 -0.04339808 row4 0.08304683 -0.57461214 row5 -0.70985673 0.67557046 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -1.0852307 -0.02472917 row5 -0.7098567 0.67557046 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 48.84691 49.6851 49.04523 49.60083 50.31717 104.4201 51.71095 47.81313 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.30236 50.88165 48.66269 49.78866 49.48071 50.22992 50.96032 49.25918 col17 col18 col19 col20 row1 49.83103 50.783 48.87727 102.6945 > tmp[,"col10"] col10 row1 50.88165 row2 28.33335 row3 27.98642 row4 30.47214 row5 48.56797 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 48.84691 49.68510 49.04523 49.60083 50.31717 104.4201 51.71095 47.81313 row5 48.78627 49.34133 49.22687 51.73748 49.54280 104.8621 49.64898 50.97273 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.30236 50.88165 48.66269 49.78866 49.48071 50.22992 50.96032 49.25918 row5 50.16658 48.56797 50.99318 50.63335 49.59554 48.03691 49.35828 50.37682 col17 col18 col19 col20 row1 49.83103 50.78300 48.87727 102.6945 row5 50.76956 50.09849 51.00360 106.0075 > tmp[,c("col6","col20")] col6 col20 row1 104.42014 102.69450 row2 76.39522 73.60796 row3 76.29929 73.71906 row4 75.28021 73.66837 row5 104.86213 106.00750 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.4201 102.6945 row5 104.8621 106.0075 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.4201 102.6945 row5 104.8621 106.0075 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.5144319 [2,] -1.3797692 [3,] 0.8755527 [4,] 1.3842588 [5,] 0.3801655 > tmp[,c("col17","col7")] col17 col7 [1,] 0.0032991 0.66453086 [2,] -2.4715712 0.07385903 [3,] 1.1477593 -0.01973572 [4,] -0.2781926 -1.17444320 [5,] -2.5620486 0.24776965 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -1.5932816 0.004705913 [2,] 2.2550194 0.841311731 [3,] 1.1517665 0.090414639 [4,] -0.5120967 -1.332253896 [5,] 0.5747699 -0.757389767 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -1.593282 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -1.593282 [2,] 2.255019 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row3 0.05094829 -0.1228066 0.1301884 -0.3346737 -2.4360952 1.2713846 row1 -0.27096772 0.1047148 0.8316636 -2.2612741 0.4761787 -0.9732709 [,7] [,8] [,9] [,10] [,11] [,12] row3 -0.5435791 1.3700557 1.1337014 -0.2497305 0.8742208 0.006451548 row1 -0.6898800 -0.8151079 -0.9335558 -2.0653555 -0.2847278 1.365791760 [,13] [,14] [,15] [,16] [,17] [,18] row3 -0.968671 -0.5869592 0.9824186 0.7587126 0.49131611 -0.02403022 row1 -1.139506 1.0986247 -0.6754738 0.4897107 -0.05194445 1.29545765 [,19] [,20] row3 -0.06840635 0.9405866 row1 1.33569193 -0.2097815 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.9633378 1.160568 0.1160471 0.7780588 0.8836418 -0.980063 -2.505453 [,8] [,9] [,10] row2 0.7577449 -0.9315996 0.3000636 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.31355 0.3661226 -0.4177008 -1.006743 0.4807567 0.7288481 -0.1256835 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.4042458 -1.894895 -0.2271688 -0.7815833 0.6909271 -2.616835 0.09456969 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.09489678 1.234908 0.246013 -0.1804548 0.07569278 -0.119055 > > > 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: 0x600003208c00> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e5e7e2476" [2] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e2b8bef71" [3] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e7014fa0c" [4] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e712c6350" [5] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e192c533c" [6] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e2d0c950d" [7] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e150d9f96" [8] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e31683ba6" [9] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e322428a1" [10] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e63e77bbe" [11] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e726d2a2f" [12] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e5cecae59" [13] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e36aa84b8" [14] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e74ef6811" [15] "/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests/BM1752e11997011" > > > ### 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: 0x6000032096e0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6000032096e0> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.20-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6000032096e0> > rowMedians(tmp) [1] -0.170342769 0.391232624 -0.278324465 0.241992827 0.005837581 [6] -0.037058812 -0.485566865 0.168580633 -0.539236112 0.189295458 [11] 0.023168211 0.089382705 -0.133833870 0.000638871 0.194403467 [16] -0.194544083 0.046696478 0.273074810 0.257671194 -0.342580348 [21] -0.164087061 -0.238986566 0.466902367 -0.009548375 -0.077386581 [26] 0.255171369 0.318323092 0.711885752 -0.248198571 0.469705653 [31] 0.372415805 0.403965847 0.394366798 0.188894534 -0.047672684 [36] -0.606199668 0.137517709 -0.175201808 0.153701764 -0.196198578 [41] 0.198771331 0.244672350 -0.733361229 -0.142792709 -0.078428620 [46] -0.123998755 -0.024030303 -0.113562195 0.488969783 -0.094525961 [51] 0.344039229 0.022072455 0.739328314 0.514699001 0.067469320 [56] -0.076467426 0.004600119 0.416888690 0.041714231 0.287871939 [61] -0.570116078 -0.562118763 -0.007478206 0.262572711 -0.139832136 [66] 0.046662857 -0.282844801 0.418706015 -0.167156808 0.642687039 [71] 0.455689226 -0.160345122 -0.201931196 0.128709623 0.116128399 [76] -0.313127267 -0.045787725 0.915260467 0.459020622 0.222101190 [81] -0.195858502 0.512258517 0.448255514 -0.292434203 -0.040510539 [86] -0.210174413 0.091763030 -0.161565553 0.272973135 -0.218785195 [91] 0.266361020 -0.126356837 0.094095573 -0.106466821 0.228411090 [96] -0.305878181 0.455854857 0.164413877 -0.241712557 -0.743161562 [101] -0.294735907 0.002519978 0.519143661 -0.108724579 0.282648912 [106] 0.156406045 -0.503524989 -0.071803396 -0.146869881 0.163474565 [111] -0.071602278 0.318901001 0.146070351 -0.121921468 -0.120081822 [116] 0.201418197 0.246576099 -0.589204974 0.345345558 -0.678768390 [121] 0.088177067 -0.124755184 0.349470339 -0.115430915 0.026170647 [126] 0.184532372 -0.393847608 -0.100930396 0.149509101 0.010193306 [131] -0.408961982 0.163700174 0.554853331 -0.181287048 0.465583998 [136] 0.367694912 -0.057743551 -0.044210201 0.040700231 0.331138362 [141] -0.199641648 0.250697788 -0.143632665 -0.035925461 -0.508677130 [146] -0.637998181 -0.561182855 -0.387428641 -0.834113027 -0.031484548 [151] -0.013838104 -0.213563374 0.085267676 0.275289884 -0.099885333 [156] 0.108981218 -0.131497420 0.520485752 -0.475629974 0.091038286 [161] 0.188344823 -0.035657930 0.375737297 -0.522424722 0.110722353 [166] 0.353279191 0.603837255 0.308367049 -0.287504649 0.331747699 [171] 0.088770818 0.228815323 -0.140928212 0.048805868 0.242346203 [176] -0.155014197 -0.222797501 0.096875551 -0.174967427 0.447340559 [181] 0.010062211 -0.158130098 0.022060166 -0.323873598 0.207402472 [186] -0.272619515 0.219369142 0.052649102 -0.288575640 0.348517673 [191] 0.042541855 0.061737532 -0.439309606 -0.095733912 -0.381409662 [196] -0.206072588 -0.301258980 0.508088128 -0.368405091 0.178188936 [201] 0.418159362 -0.119646273 -0.142708944 -0.165051272 0.821245174 [206] 0.360470817 -0.025450961 0.162784208 0.055598537 -0.647249211 [211] 0.024083905 -0.610380741 0.130068704 0.273993286 -0.693087024 [216] -0.220175116 -0.365089064 -0.563235846 0.495394212 0.105043116 [221] 0.045551313 0.113627439 0.190375661 -0.229965439 0.537176104 [226] -0.509610380 -0.048068469 -0.128586693 0.151478113 -0.455472782 > > proc.time() user system elapsed 1.974 8.748 10.841
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.4.2 (2024-10-31) -- "Pile of Leaves" 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: 0x600000df8420> > .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: 0x600000df8420> > .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: 0x600000df8420> > .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: 0x600000df8420> > 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: 0x600000df8ba0> > .Call("R_bm_AddColumn",P) <pointer: 0x600000df8ba0> > .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: 0x600000df8ba0> > .Call("R_bm_AddColumn",P) <pointer: 0x600000df8ba0> > .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: 0x600000df8ba0> > 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: 0x600000df8d80> > .Call("R_bm_AddColumn",P) <pointer: 0x600000df8d80> > .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: 0x600000df8d80> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600000df8d80> > .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: 0x600000df8d80> > > .Call("R_bm_RowMode",P) <pointer: 0x600000df8d80> > .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: 0x600000df8d80> > > .Call("R_bm_ColMode",P) <pointer: 0x600000df8d80> > .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: 0x600000df8d80> > 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: 0x600000df8f60> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600000df8f60> > .Call("R_bm_AddColumn",P) <pointer: 0x600000df8f60> > .Call("R_bm_AddColumn",P) <pointer: 0x600000df8f60> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1754d54fd0f9" "BufferedMatrixFile1754d58ac0452" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile1754d54fd0f9" "BufferedMatrixFile1754d58ac0452" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600000df9200> > .Call("R_bm_AddColumn",P) <pointer: 0x600000df9200> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600000df9200> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600000df9200> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600000df9200> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600000df9200> > .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: 0x600000df93e0> > .Call("R_bm_AddColumn",P) <pointer: 0x600000df93e0> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600000df93e0> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600000df93e0> > 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: 0x600000df95c0> > .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: 0x600000df95c0> > rm(P) > > proc.time() user system elapsed 0.355 0.115 0.454
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.4.2 (2024-10-31) -- "Pile of Leaves" 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.345 0.066 0.396