Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2024-12-24 11:44 -0500 (Tue, 24 Dec 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | R Under development (unstable) (2024-10-21 r87258) -- "Unsuffered Consequences" | 4754 |
palomino7 | Windows Server 2022 Datacenter | x64 | R Under development (unstable) (2024-10-26 r87273 ucrt) -- "Unsuffered Consequences" | 4472 |
lconway | macOS 12.7.1 Monterey | x86_64 | R Under development (unstable) (2024-11-20 r87352) -- "Unsuffered Consequences" | 4426 |
kjohnson3 | macOS 13.7.1 Ventura | arm64 | R Under development (unstable) (2024-11-20 r87352) -- "Unsuffered Consequences" | 4381 |
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) | aarch64 | R Under development (unstable) (2024-11-24 r87369) -- "Unsuffered Consequences" | 4373 |
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 245/2274 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.71.1 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino7 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson3 | macOS 13.7.1 Ventura / arm64 | OK | OK | WARNINGS | OK | |||||||||
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) / 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.71.1 |
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.71.1.tar.gz |
StartedAt: 2024-12-23 18:26:29 -0500 (Mon, 23 Dec 2024) |
EndedAt: 2024-12-23 18:26:46 -0500 (Mon, 23 Dec 2024) |
EllapsedTime: 17.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.71.1.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck’ * using R Under development (unstable) (2024-11-20 r87352) * 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.71.1’ * 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.21-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 15.0.0 (clang-1500.1.0.2.5)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files is not available * checking sizes of PDF files under ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘Rcodetesting.R’ Running ‘c_code_level_tests.R’ Running ‘objectTesting.R’ Running ‘rawCalltesting.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.21-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.5-arm64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘Apple clang version 15.0.0 (clang-1500.1.0.2.5)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /Library/Frameworks/R.framework/Versions/4.5-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 Under development (unstable) (2024-11-20 r87352) -- "Unsuffered Consequences" 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.147 0.054 0.194
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2024-11-20 r87352) -- "Unsuffered Consequences" 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.21-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 480570 25.7 1055742 56.4 NA 634628 33.9 Vcells 890031 6.8 8388608 64.0 196608 2108441 16.1 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Mon Dec 23 18:26:39 2024" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Mon Dec 23 18:26:39 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: 0x600003a58240> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Mon Dec 23 18:26:40 2024" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Mon Dec 23 18:26:40 2024" > > ColMode(tmp2) <pointer: 0x600003a58240> > > > > ### 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,] 97.163406812 -1.0539711 0.02477693 1.3526531 [2,] -0.002832552 0.3379334 1.34966465 0.3999477 [3,] -0.303967313 1.3798195 0.75153710 0.1953715 [4,] 0.283944247 -1.1673330 0.38316046 0.3010329 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-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,] 97.163406812 1.0539711 0.02477693 1.3526531 [2,] 0.002832552 0.3379334 1.34966465 0.3999477 [3,] 0.303967313 1.3798195 0.75153710 0.1953715 [4,] 0.283944247 1.1673330 0.38316046 0.3010329 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-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.85715003 1.0266310 0.1574069 1.1630362 [2,] 0.05322172 0.5813204 1.1617507 0.6324142 [3,] 0.55133231 1.1746572 0.8669124 0.4420084 [4,] 0.53286419 1.0804319 0.6189996 0.5486647 > > 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.21-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,] 220.73491 36.32028 26.59885 37.98301 [2,] 25.53505 31.15114 37.96717 31.72409 [3,] 30.81729 38.12639 34.42066 29.61546 [4,] 30.61259 36.97165 31.57316 30.78768 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600003a5c000> > exp(tmp5) <pointer: 0x600003a5c000> > log(tmp5,2) <pointer: 0x600003a5c000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 459.4308 > Min(tmp5) [1] 53.14786 > mean(tmp5) [1] 71.20612 > Sum(tmp5) [1] 14241.22 > Var(tmp5) [1] 822.8515 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 93.89807 68.40230 69.34849 70.29986 69.33533 66.49179 68.38425 67.00279 [9] 66.87278 72.02554 > rowSums(tmp5) [1] 1877.961 1368.046 1386.970 1405.997 1386.707 1329.836 1367.685 1340.056 [9] 1337.456 1440.511 > rowVars(tmp5) [1] 7472.86396 65.96887 56.49722 47.19491 87.01816 33.43570 [7] 61.24063 44.69702 63.23130 56.80901 > rowSd(tmp5) [1] 86.445728 8.122123 7.516463 6.869855 9.328352 5.782361 7.825639 [8] 6.685583 7.951811 7.537175 > rowMax(tmp5) [1] 459.43079 82.79134 80.42321 83.38126 82.78672 74.55398 82.42994 [8] 78.62736 85.12607 83.75894 > rowMin(tmp5) [1] 55.36201 53.14786 56.12962 57.72898 55.06128 55.58361 55.48123 55.43135 [9] 54.19944 62.49028 > > colMeans(tmp5) [1] 105.79928 70.49601 66.19680 64.44556 72.06803 66.21196 68.52391 [8] 68.19433 69.59999 69.62482 75.58239 69.98447 71.10729 68.61057 [15] 72.57159 66.92340 68.69999 70.37106 65.11536 73.99560 > colSums(tmp5) [1] 1057.9928 704.9601 661.9680 644.4556 720.6803 662.1196 685.2391 [8] 681.9433 695.9999 696.2482 755.8239 699.8447 711.0729 686.1057 [15] 725.7159 669.2340 686.9999 703.7106 651.1536 739.9560 > colVars(tmp5) [1] 15534.20379 51.22151 81.85236 41.12630 44.88865 52.62800 [7] 60.90715 82.97819 54.38818 59.66575 41.23689 62.04864 [13] 35.41885 71.95005 92.07029 35.84976 63.70166 84.23757 [19] 20.76013 51.38955 > colSd(tmp5) [1] 124.636286 7.156920 9.047229 6.412979 6.699900 7.254516 [7] 7.804303 9.109236 7.374834 7.724361 6.421596 7.877096 [13] 5.951374 8.482337 9.595326 5.987467 7.981332 9.178102 [19] 4.556329 7.168650 > colMax(tmp5) [1] 459.43079 79.35509 82.42994 79.05667 83.75894 76.75920 77.31867 [8] 78.72639 78.49767 89.27937 82.79134 82.84917 81.21756 82.05146 [15] 88.06029 77.75548 78.62736 83.38126 72.31331 85.12607 > colMin(tmp5) [1] 53.14786 58.61347 55.36201 57.43114 62.66308 55.43135 57.72898 54.19944 [9] 55.48123 63.66532 63.47967 56.12962 61.23999 57.47876 60.17364 58.34626 [17] 55.58361 55.06128 58.53584 64.24926 > > > ### 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] 93.89807 68.40230 69.34849 NA 69.33533 66.49179 68.38425 67.00279 [9] 66.87278 72.02554 > rowSums(tmp5) [1] 1877.961 1368.046 1386.970 NA 1386.707 1329.836 1367.685 1340.056 [9] 1337.456 1440.511 > rowVars(tmp5) [1] 7472.86396 65.96887 56.49722 47.93399 87.01816 33.43570 [7] 61.24063 44.69702 63.23130 56.80901 > rowSd(tmp5) [1] 86.445728 8.122123 7.516463 6.923438 9.328352 5.782361 7.825639 [8] 6.685583 7.951811 7.537175 > rowMax(tmp5) [1] 459.43079 82.79134 80.42321 NA 82.78672 74.55398 82.42994 [8] 78.62736 85.12607 83.75894 > rowMin(tmp5) [1] 55.36201 53.14786 56.12962 NA 55.06128 55.58361 55.48123 55.43135 [9] 54.19944 62.49028 > > colMeans(tmp5) [1] 105.79928 70.49601 66.19680 64.44556 72.06803 66.21196 68.52391 [8] 68.19433 69.59999 69.62482 75.58239 69.98447 71.10729 68.61057 [15] 72.57159 NA 68.69999 70.37106 65.11536 73.99560 > colSums(tmp5) [1] 1057.9928 704.9601 661.9680 644.4556 720.6803 662.1196 685.2391 [8] 681.9433 695.9999 696.2482 755.8239 699.8447 711.0729 686.1057 [15] 725.7159 NA 686.9999 703.7106 651.1536 739.9560 > colVars(tmp5) [1] 15534.20379 51.22151 81.85236 41.12630 44.88865 52.62800 [7] 60.90715 82.97819 54.38818 59.66575 41.23689 62.04864 [13] 35.41885 71.95005 92.07029 NA 63.70166 84.23757 [19] 20.76013 51.38955 > colSd(tmp5) [1] 124.636286 7.156920 9.047229 6.412979 6.699900 7.254516 [7] 7.804303 9.109236 7.374834 7.724361 6.421596 7.877096 [13] 5.951374 8.482337 9.595326 NA 7.981332 9.178102 [19] 4.556329 7.168650 > colMax(tmp5) [1] 459.43079 79.35509 82.42994 79.05667 83.75894 76.75920 77.31867 [8] 78.72639 78.49767 89.27937 82.79134 82.84917 81.21756 82.05146 [15] 88.06029 NA 78.62736 83.38126 72.31331 85.12607 > colMin(tmp5) [1] 53.14786 58.61347 55.36201 57.43114 62.66308 55.43135 57.72898 54.19944 [9] 55.48123 63.66532 63.47967 56.12962 61.23999 57.47876 60.17364 NA [17] 55.58361 55.06128 58.53584 64.24926 > > Max(tmp5,na.rm=TRUE) [1] 459.4308 > Min(tmp5,na.rm=TRUE) [1] 53.14786 > mean(tmp5,na.rm=TRUE) [1] 71.23919 > Sum(tmp5,na.rm=TRUE) [1] 14176.6 > Var(tmp5,na.rm=TRUE) [1] 826.7875 > > rowMeans(tmp5,na.rm=TRUE) [1] 93.89807 68.40230 69.34849 70.59851 69.33533 66.49179 68.38425 67.00279 [9] 66.87278 72.02554 > rowSums(tmp5,na.rm=TRUE) [1] 1877.961 1368.046 1386.970 1341.372 1386.707 1329.836 1367.685 1340.056 [9] 1337.456 1440.511 > rowVars(tmp5,na.rm=TRUE) [1] 7472.86396 65.96887 56.49722 47.93399 87.01816 33.43570 [7] 61.24063 44.69702 63.23130 56.80901 > rowSd(tmp5,na.rm=TRUE) [1] 86.445728 8.122123 7.516463 6.923438 9.328352 5.782361 7.825639 [8] 6.685583 7.951811 7.537175 > rowMax(tmp5,na.rm=TRUE) [1] 459.43079 82.79134 80.42321 83.38126 82.78672 74.55398 82.42994 [8] 78.62736 85.12607 83.75894 > rowMin(tmp5,na.rm=TRUE) [1] 55.36201 53.14786 56.12962 57.72898 55.06128 55.58361 55.48123 55.43135 [9] 54.19944 62.49028 > > colMeans(tmp5,na.rm=TRUE) [1] 105.79928 70.49601 66.19680 64.44556 72.06803 66.21196 68.52391 [8] 68.19433 69.59999 69.62482 75.58239 69.98447 71.10729 68.61057 [15] 72.57159 67.17871 68.69999 70.37106 65.11536 73.99560 > colSums(tmp5,na.rm=TRUE) [1] 1057.9928 704.9601 661.9680 644.4556 720.6803 662.1196 685.2391 [8] 681.9433 695.9999 696.2482 755.8239 699.8447 711.0729 686.1057 [15] 725.7159 604.6084 686.9999 703.7106 651.1536 739.9560 > colVars(tmp5,na.rm=TRUE) [1] 15534.20379 51.22151 81.85236 41.12630 44.88865 52.62800 [7] 60.90715 82.97819 54.38818 59.66575 41.23689 62.04864 [13] 35.41885 71.95005 92.07029 39.59769 63.70166 84.23757 [19] 20.76013 51.38955 > colSd(tmp5,na.rm=TRUE) [1] 124.636286 7.156920 9.047229 6.412979 6.699900 7.254516 [7] 7.804303 9.109236 7.374834 7.724361 6.421596 7.877096 [13] 5.951374 8.482337 9.595326 6.292669 7.981332 9.178102 [19] 4.556329 7.168650 > colMax(tmp5,na.rm=TRUE) [1] 459.43079 79.35509 82.42994 79.05667 83.75894 76.75920 77.31867 [8] 78.72639 78.49767 89.27937 82.79134 82.84917 81.21756 82.05146 [15] 88.06029 77.75548 78.62736 83.38126 72.31331 85.12607 > colMin(tmp5,na.rm=TRUE) [1] 53.14786 58.61347 55.36201 57.43114 62.66308 55.43135 57.72898 54.19944 [9] 55.48123 63.66532 63.47967 56.12962 61.23999 57.47876 60.17364 58.34626 [17] 55.58361 55.06128 58.53584 64.24926 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 93.89807 68.40230 69.34849 NaN 69.33533 66.49179 68.38425 67.00279 [9] 66.87278 72.02554 > rowSums(tmp5,na.rm=TRUE) [1] 1877.961 1368.046 1386.970 0.000 1386.707 1329.836 1367.685 1340.056 [9] 1337.456 1440.511 > rowVars(tmp5,na.rm=TRUE) [1] 7472.86396 65.96887 56.49722 NA 87.01816 33.43570 [7] 61.24063 44.69702 63.23130 56.80901 > rowSd(tmp5,na.rm=TRUE) [1] 86.445728 8.122123 7.516463 NA 9.328352 5.782361 7.825639 [8] 6.685583 7.951811 7.537175 > rowMax(tmp5,na.rm=TRUE) [1] 459.43079 82.79134 80.42321 NA 82.78672 74.55398 82.42994 [8] 78.62736 85.12607 83.75894 > rowMin(tmp5,na.rm=TRUE) [1] 55.36201 53.14786 56.12962 NA 55.06128 55.58361 55.48123 55.43135 [9] 54.19944 62.49028 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 110.47519 69.77872 66.25029 64.48612 73.11302 65.07095 69.72334 [8] 68.69123 68.85430 69.82773 75.42939 69.91923 70.77941 68.55422 [15] 71.96690 NaN 67.59722 68.92548 64.98107 74.53379 > colSums(tmp5,na.rm=TRUE) [1] 994.2767 628.0084 596.2526 580.3751 658.0172 585.6385 627.5101 618.2211 [9] 619.6887 628.4496 678.8645 629.2731 637.0147 616.9879 647.7021 0.0000 [17] 608.3750 620.3294 584.8296 670.8041 > colVars(tmp5,na.rm=TRUE) [1] 17230.00769 51.83596 92.05172 46.24858 38.21458 44.56008 [7] 52.33577 90.57270 54.93113 66.66078 46.12817 69.75684 [13] 38.63672 80.90807 99.46557 NA 57.98331 71.25818 [19] 23.15226 54.55471 > colSd(tmp5,na.rm=TRUE) [1] 131.263124 7.199720 9.594359 6.800631 6.181794 6.675334 [7] 7.234347 9.516969 7.411554 8.164605 6.791772 8.352056 [13] 6.215845 8.994891 9.973243 NA 7.614677 8.441456 [19] 4.811680 7.386116 > colMax(tmp5,na.rm=TRUE) [1] 459.43079 79.35509 82.42994 79.05667 83.75894 76.75920 77.31867 [8] 78.72639 78.49767 89.27937 82.79134 82.84917 81.21756 82.05146 [15] 88.06029 -Inf 78.62736 82.48877 72.31331 85.12607 > colMin(tmp5,na.rm=TRUE) [1] 53.14786 58.61347 55.36201 57.43114 63.55956 55.43135 59.30647 54.19944 [9] 55.48123 63.66532 63.47967 56.12962 61.23999 57.47876 60.17364 Inf [17] 55.58361 55.06128 58.53584 64.24926 > > > > > 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] 161.9379 184.5059 238.8767 123.1642 261.0744 437.2235 194.6781 486.8111 [9] 207.5720 279.5094 > apply(copymatrix,1,var,na.rm=TRUE) [1] 161.9379 184.5059 238.8767 123.1642 261.0744 437.2235 194.6781 486.8111 [9] 207.5720 279.5094 > > > > 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 0.000000e+00 -5.684342e-14 2.842171e-14 0.000000e+00 [6] 0.000000e+00 -1.136868e-13 -2.273737e-13 2.842171e-14 0.000000e+00 [11] 1.989520e-13 -5.684342e-14 0.000000e+00 -2.842171e-14 2.842171e-14 [16] -1.136868e-13 0.000000e+00 8.526513e-14 2.842171e-14 5.684342e-14 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 7 4 10 19 1 16 3 14 1 18 4 3 1 6 5 5 7 19 9 5 1 9 1 4 6 17 5 18 2 11 2 5 5 7 9 14 3 4 5 3 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.133605 > Min(tmp) [1] -1.994558 > mean(tmp) [1] 0.06576538 > Sum(tmp) [1] 6.576538 > Var(tmp) [1] 1.053028 > > rowMeans(tmp) [1] 0.06576538 > rowSums(tmp) [1] 6.576538 > rowVars(tmp) [1] 1.053028 > rowSd(tmp) [1] 1.026171 > rowMax(tmp) [1] 3.133605 > rowMin(tmp) [1] -1.994558 > > colMeans(tmp) [1] -0.89881968 0.70597520 0.36023749 -0.11281629 -0.09776763 0.19864807 [7] 0.64255865 -0.17060041 1.01743232 -1.21806460 -0.10296002 0.03453385 [13] 1.44212284 -1.73824457 0.39286846 -1.11099166 -1.02580989 -0.77527189 [19] -0.15579437 2.04164396 -0.17877547 0.80084179 -0.90316436 0.72294565 [25] 1.44433733 0.47212211 -0.75309834 -1.17552685 0.18825115 1.12678462 [31] -0.54448992 -0.67123440 0.48390254 0.09521042 -1.13317374 -1.48337822 [37] -0.15118354 -0.57071329 0.77883578 -1.72271215 0.79170509 -1.44036201 [43] -1.23433670 0.28499872 0.95672080 1.82407542 -0.37342643 -0.20194269 [49] -0.62318076 3.13360456 0.03511653 0.28617371 0.43500131 2.28037280 [55] 1.51174928 0.13748677 -0.27053687 0.10344639 -0.36445836 0.20643152 [61] 0.58952091 -0.70631803 0.88385764 -1.02294787 -1.05351783 -0.04537573 [67] -0.58159954 1.35548155 0.95514568 -1.99455849 2.13505746 0.45337922 [73] 1.68529087 0.76399226 0.17989891 0.66694598 -0.21104563 0.61306056 [79] -0.50436684 -0.29226852 2.27560435 -0.68883878 -0.56148543 -1.27320304 [85] 1.75491093 0.07265116 0.07470652 -1.16214087 1.19741910 -0.13742260 [91] -0.07919637 1.30751508 -0.98143192 0.30229962 0.84495453 -1.76574439 [97] -0.94567406 -0.70577692 0.95129711 -1.50683900 > colSums(tmp) [1] -0.89881968 0.70597520 0.36023749 -0.11281629 -0.09776763 0.19864807 [7] 0.64255865 -0.17060041 1.01743232 -1.21806460 -0.10296002 0.03453385 [13] 1.44212284 -1.73824457 0.39286846 -1.11099166 -1.02580989 -0.77527189 [19] -0.15579437 2.04164396 -0.17877547 0.80084179 -0.90316436 0.72294565 [25] 1.44433733 0.47212211 -0.75309834 -1.17552685 0.18825115 1.12678462 [31] -0.54448992 -0.67123440 0.48390254 0.09521042 -1.13317374 -1.48337822 [37] -0.15118354 -0.57071329 0.77883578 -1.72271215 0.79170509 -1.44036201 [43] -1.23433670 0.28499872 0.95672080 1.82407542 -0.37342643 -0.20194269 [49] -0.62318076 3.13360456 0.03511653 0.28617371 0.43500131 2.28037280 [55] 1.51174928 0.13748677 -0.27053687 0.10344639 -0.36445836 0.20643152 [61] 0.58952091 -0.70631803 0.88385764 -1.02294787 -1.05351783 -0.04537573 [67] -0.58159954 1.35548155 0.95514568 -1.99455849 2.13505746 0.45337922 [73] 1.68529087 0.76399226 0.17989891 0.66694598 -0.21104563 0.61306056 [79] -0.50436684 -0.29226852 2.27560435 -0.68883878 -0.56148543 -1.27320304 [85] 1.75491093 0.07265116 0.07470652 -1.16214087 1.19741910 -0.13742260 [91] -0.07919637 1.30751508 -0.98143192 0.30229962 0.84495453 -1.76574439 [97] -0.94567406 -0.70577692 0.95129711 -1.50683900 > 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.89881968 0.70597520 0.36023749 -0.11281629 -0.09776763 0.19864807 [7] 0.64255865 -0.17060041 1.01743232 -1.21806460 -0.10296002 0.03453385 [13] 1.44212284 -1.73824457 0.39286846 -1.11099166 -1.02580989 -0.77527189 [19] -0.15579437 2.04164396 -0.17877547 0.80084179 -0.90316436 0.72294565 [25] 1.44433733 0.47212211 -0.75309834 -1.17552685 0.18825115 1.12678462 [31] -0.54448992 -0.67123440 0.48390254 0.09521042 -1.13317374 -1.48337822 [37] -0.15118354 -0.57071329 0.77883578 -1.72271215 0.79170509 -1.44036201 [43] -1.23433670 0.28499872 0.95672080 1.82407542 -0.37342643 -0.20194269 [49] -0.62318076 3.13360456 0.03511653 0.28617371 0.43500131 2.28037280 [55] 1.51174928 0.13748677 -0.27053687 0.10344639 -0.36445836 0.20643152 [61] 0.58952091 -0.70631803 0.88385764 -1.02294787 -1.05351783 -0.04537573 [67] -0.58159954 1.35548155 0.95514568 -1.99455849 2.13505746 0.45337922 [73] 1.68529087 0.76399226 0.17989891 0.66694598 -0.21104563 0.61306056 [79] -0.50436684 -0.29226852 2.27560435 -0.68883878 -0.56148543 -1.27320304 [85] 1.75491093 0.07265116 0.07470652 -1.16214087 1.19741910 -0.13742260 [91] -0.07919637 1.30751508 -0.98143192 0.30229962 0.84495453 -1.76574439 [97] -0.94567406 -0.70577692 0.95129711 -1.50683900 > colMin(tmp) [1] -0.89881968 0.70597520 0.36023749 -0.11281629 -0.09776763 0.19864807 [7] 0.64255865 -0.17060041 1.01743232 -1.21806460 -0.10296002 0.03453385 [13] 1.44212284 -1.73824457 0.39286846 -1.11099166 -1.02580989 -0.77527189 [19] -0.15579437 2.04164396 -0.17877547 0.80084179 -0.90316436 0.72294565 [25] 1.44433733 0.47212211 -0.75309834 -1.17552685 0.18825115 1.12678462 [31] -0.54448992 -0.67123440 0.48390254 0.09521042 -1.13317374 -1.48337822 [37] -0.15118354 -0.57071329 0.77883578 -1.72271215 0.79170509 -1.44036201 [43] -1.23433670 0.28499872 0.95672080 1.82407542 -0.37342643 -0.20194269 [49] -0.62318076 3.13360456 0.03511653 0.28617371 0.43500131 2.28037280 [55] 1.51174928 0.13748677 -0.27053687 0.10344639 -0.36445836 0.20643152 [61] 0.58952091 -0.70631803 0.88385764 -1.02294787 -1.05351783 -0.04537573 [67] -0.58159954 1.35548155 0.95514568 -1.99455849 2.13505746 0.45337922 [73] 1.68529087 0.76399226 0.17989891 0.66694598 -0.21104563 0.61306056 [79] -0.50436684 -0.29226852 2.27560435 -0.68883878 -0.56148543 -1.27320304 [85] 1.75491093 0.07265116 0.07470652 -1.16214087 1.19741910 -0.13742260 [91] -0.07919637 1.30751508 -0.98143192 0.30229962 0.84495453 -1.76574439 [97] -0.94567406 -0.70577692 0.95129711 -1.50683900 > colMedians(tmp) [1] -0.89881968 0.70597520 0.36023749 -0.11281629 -0.09776763 0.19864807 [7] 0.64255865 -0.17060041 1.01743232 -1.21806460 -0.10296002 0.03453385 [13] 1.44212284 -1.73824457 0.39286846 -1.11099166 -1.02580989 -0.77527189 [19] -0.15579437 2.04164396 -0.17877547 0.80084179 -0.90316436 0.72294565 [25] 1.44433733 0.47212211 -0.75309834 -1.17552685 0.18825115 1.12678462 [31] -0.54448992 -0.67123440 0.48390254 0.09521042 -1.13317374 -1.48337822 [37] -0.15118354 -0.57071329 0.77883578 -1.72271215 0.79170509 -1.44036201 [43] -1.23433670 0.28499872 0.95672080 1.82407542 -0.37342643 -0.20194269 [49] -0.62318076 3.13360456 0.03511653 0.28617371 0.43500131 2.28037280 [55] 1.51174928 0.13748677 -0.27053687 0.10344639 -0.36445836 0.20643152 [61] 0.58952091 -0.70631803 0.88385764 -1.02294787 -1.05351783 -0.04537573 [67] -0.58159954 1.35548155 0.95514568 -1.99455849 2.13505746 0.45337922 [73] 1.68529087 0.76399226 0.17989891 0.66694598 -0.21104563 0.61306056 [79] -0.50436684 -0.29226852 2.27560435 -0.68883878 -0.56148543 -1.27320304 [85] 1.75491093 0.07265116 0.07470652 -1.16214087 1.19741910 -0.13742260 [91] -0.07919637 1.30751508 -0.98143192 0.30229962 0.84495453 -1.76574439 [97] -0.94567406 -0.70577692 0.95129711 -1.50683900 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.8988197 0.7059752 0.3602375 -0.1128163 -0.09776763 0.1986481 0.6425586 [2,] -0.8988197 0.7059752 0.3602375 -0.1128163 -0.09776763 0.1986481 0.6425586 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.1706004 1.017432 -1.218065 -0.10296 0.03453385 1.442123 -1.738245 [2,] -0.1706004 1.017432 -1.218065 -0.10296 0.03453385 1.442123 -1.738245 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.3928685 -1.110992 -1.02581 -0.7752719 -0.1557944 2.041644 -0.1787755 [2,] 0.3928685 -1.110992 -1.02581 -0.7752719 -0.1557944 2.041644 -0.1787755 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.8008418 -0.9031644 0.7229456 1.444337 0.4721221 -0.7530983 -1.175527 [2,] 0.8008418 -0.9031644 0.7229456 1.444337 0.4721221 -0.7530983 -1.175527 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.1882511 1.126785 -0.5444899 -0.6712344 0.4839025 0.09521042 -1.133174 [2,] 0.1882511 1.126785 -0.5444899 -0.6712344 0.4839025 0.09521042 -1.133174 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -1.483378 -0.1511835 -0.5707133 0.7788358 -1.722712 0.7917051 -1.440362 [2,] -1.483378 -0.1511835 -0.5707133 0.7788358 -1.722712 0.7917051 -1.440362 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -1.234337 0.2849987 0.9567208 1.824075 -0.3734264 -0.2019427 -0.6231808 [2,] -1.234337 0.2849987 0.9567208 1.824075 -0.3734264 -0.2019427 -0.6231808 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 3.133605 0.03511653 0.2861737 0.4350013 2.280373 1.511749 0.1374868 [2,] 3.133605 0.03511653 0.2861737 0.4350013 2.280373 1.511749 0.1374868 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.2705369 0.1034464 -0.3644584 0.2064315 0.5895209 -0.706318 0.8838576 [2,] -0.2705369 0.1034464 -0.3644584 0.2064315 0.5895209 -0.706318 0.8838576 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -1.022948 -1.053518 -0.04537573 -0.5815995 1.355482 0.9551457 -1.994558 [2,] -1.022948 -1.053518 -0.04537573 -0.5815995 1.355482 0.9551457 -1.994558 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 2.135057 0.4533792 1.685291 0.7639923 0.1798989 0.666946 -0.2110456 [2,] 2.135057 0.4533792 1.685291 0.7639923 0.1798989 0.666946 -0.2110456 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 0.6130606 -0.5043668 -0.2922685 2.275604 -0.6888388 -0.5614854 -1.273203 [2,] 0.6130606 -0.5043668 -0.2922685 2.275604 -0.6888388 -0.5614854 -1.273203 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 1.754911 0.07265116 0.07470652 -1.162141 1.197419 -0.1374226 -0.07919637 [2,] 1.754911 0.07265116 0.07470652 -1.162141 1.197419 -0.1374226 -0.07919637 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 1.307515 -0.9814319 0.3022996 0.8449545 -1.765744 -0.9456741 -0.7057769 [2,] 1.307515 -0.9814319 0.3022996 0.8449545 -1.765744 -0.9456741 -0.7057769 [,99] [,100] [1,] 0.9512971 -1.506839 [2,] 0.9512971 -1.506839 > > > Max(tmp2) [1] 2.006411 > Min(tmp2) [1] -2.157037 > mean(tmp2) [1] -0.007266886 > Sum(tmp2) [1] -0.7266886 > Var(tmp2) [1] 0.9143674 > > rowMeans(tmp2) [1] 0.74446227 1.18341915 -1.43070973 1.13496898 -0.91936679 0.19747020 [7] -1.03329949 1.05630628 -0.19659610 2.00641074 -0.50543416 -0.07775725 [13] 0.42207897 1.60087262 -0.52320158 0.51395285 -0.58069837 -0.69851270 [19] -0.35513128 1.70769557 -1.47828858 0.80621495 -0.23690693 -0.24804691 [25] 1.84344128 -1.76370583 0.25354740 0.14447095 -0.40243632 -0.01525264 [31] 0.08753710 1.02498087 1.90962654 -0.38526352 0.03276098 0.41546426 [37] -0.16595137 0.60366910 -0.08819318 0.87311598 -1.34208204 -1.09432744 [43] -0.12727844 -0.88747190 0.43558663 1.13284070 0.70610096 0.47908894 [49] 0.29263955 -1.27795442 -0.51173919 -0.65737764 -1.65693616 1.36417526 [55] 0.01091305 -0.18756125 -0.78769707 -1.47100200 -1.31530736 -0.01718530 [61] -0.45131231 -0.44415900 0.19393906 1.25506923 -0.19476323 0.20146063 [67] 0.23242748 -1.05190855 -0.62861610 1.93938243 0.91739466 -1.94274519 [73] 1.39252751 0.92017554 -0.94408975 -2.15703721 -0.15068666 0.14543745 [79] -0.95642797 -0.18198109 -1.18340300 0.02644502 1.48438584 -0.16164668 [85] 0.45077254 0.11385319 0.87498479 -1.35766374 -1.04430561 0.75626675 [91] -0.44904412 -0.64447960 -0.44451161 0.54822095 1.54654270 -0.79611325 [97] 0.88197296 -1.22760123 1.15082854 0.10858094 > rowSums(tmp2) [1] 0.74446227 1.18341915 -1.43070973 1.13496898 -0.91936679 0.19747020 [7] -1.03329949 1.05630628 -0.19659610 2.00641074 -0.50543416 -0.07775725 [13] 0.42207897 1.60087262 -0.52320158 0.51395285 -0.58069837 -0.69851270 [19] -0.35513128 1.70769557 -1.47828858 0.80621495 -0.23690693 -0.24804691 [25] 1.84344128 -1.76370583 0.25354740 0.14447095 -0.40243632 -0.01525264 [31] 0.08753710 1.02498087 1.90962654 -0.38526352 0.03276098 0.41546426 [37] -0.16595137 0.60366910 -0.08819318 0.87311598 -1.34208204 -1.09432744 [43] -0.12727844 -0.88747190 0.43558663 1.13284070 0.70610096 0.47908894 [49] 0.29263955 -1.27795442 -0.51173919 -0.65737764 -1.65693616 1.36417526 [55] 0.01091305 -0.18756125 -0.78769707 -1.47100200 -1.31530736 -0.01718530 [61] -0.45131231 -0.44415900 0.19393906 1.25506923 -0.19476323 0.20146063 [67] 0.23242748 -1.05190855 -0.62861610 1.93938243 0.91739466 -1.94274519 [73] 1.39252751 0.92017554 -0.94408975 -2.15703721 -0.15068666 0.14543745 [79] -0.95642797 -0.18198109 -1.18340300 0.02644502 1.48438584 -0.16164668 [85] 0.45077254 0.11385319 0.87498479 -1.35766374 -1.04430561 0.75626675 [91] -0.44904412 -0.64447960 -0.44451161 0.54822095 1.54654270 -0.79611325 [97] 0.88197296 -1.22760123 1.15082854 0.10858094 > 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.74446227 1.18341915 -1.43070973 1.13496898 -0.91936679 0.19747020 [7] -1.03329949 1.05630628 -0.19659610 2.00641074 -0.50543416 -0.07775725 [13] 0.42207897 1.60087262 -0.52320158 0.51395285 -0.58069837 -0.69851270 [19] -0.35513128 1.70769557 -1.47828858 0.80621495 -0.23690693 -0.24804691 [25] 1.84344128 -1.76370583 0.25354740 0.14447095 -0.40243632 -0.01525264 [31] 0.08753710 1.02498087 1.90962654 -0.38526352 0.03276098 0.41546426 [37] -0.16595137 0.60366910 -0.08819318 0.87311598 -1.34208204 -1.09432744 [43] -0.12727844 -0.88747190 0.43558663 1.13284070 0.70610096 0.47908894 [49] 0.29263955 -1.27795442 -0.51173919 -0.65737764 -1.65693616 1.36417526 [55] 0.01091305 -0.18756125 -0.78769707 -1.47100200 -1.31530736 -0.01718530 [61] -0.45131231 -0.44415900 0.19393906 1.25506923 -0.19476323 0.20146063 [67] 0.23242748 -1.05190855 -0.62861610 1.93938243 0.91739466 -1.94274519 [73] 1.39252751 0.92017554 -0.94408975 -2.15703721 -0.15068666 0.14543745 [79] -0.95642797 -0.18198109 -1.18340300 0.02644502 1.48438584 -0.16164668 [85] 0.45077254 0.11385319 0.87498479 -1.35766374 -1.04430561 0.75626675 [91] -0.44904412 -0.64447960 -0.44451161 0.54822095 1.54654270 -0.79611325 [97] 0.88197296 -1.22760123 1.15082854 0.10858094 > rowMin(tmp2) [1] 0.74446227 1.18341915 -1.43070973 1.13496898 -0.91936679 0.19747020 [7] -1.03329949 1.05630628 -0.19659610 2.00641074 -0.50543416 -0.07775725 [13] 0.42207897 1.60087262 -0.52320158 0.51395285 -0.58069837 -0.69851270 [19] -0.35513128 1.70769557 -1.47828858 0.80621495 -0.23690693 -0.24804691 [25] 1.84344128 -1.76370583 0.25354740 0.14447095 -0.40243632 -0.01525264 [31] 0.08753710 1.02498087 1.90962654 -0.38526352 0.03276098 0.41546426 [37] -0.16595137 0.60366910 -0.08819318 0.87311598 -1.34208204 -1.09432744 [43] -0.12727844 -0.88747190 0.43558663 1.13284070 0.70610096 0.47908894 [49] 0.29263955 -1.27795442 -0.51173919 -0.65737764 -1.65693616 1.36417526 [55] 0.01091305 -0.18756125 -0.78769707 -1.47100200 -1.31530736 -0.01718530 [61] -0.45131231 -0.44415900 0.19393906 1.25506923 -0.19476323 0.20146063 [67] 0.23242748 -1.05190855 -0.62861610 1.93938243 0.91739466 -1.94274519 [73] 1.39252751 0.92017554 -0.94408975 -2.15703721 -0.15068666 0.14543745 [79] -0.95642797 -0.18198109 -1.18340300 0.02644502 1.48438584 -0.16164668 [85] 0.45077254 0.11385319 0.87498479 -1.35766374 -1.04430561 0.75626675 [91] -0.44904412 -0.64447960 -0.44451161 0.54822095 1.54654270 -0.79611325 [97] 0.88197296 -1.22760123 1.15082854 0.10858094 > > colMeans(tmp2) [1] -0.007266886 > colSums(tmp2) [1] -0.7266886 > colVars(tmp2) [1] 0.9143674 > colSd(tmp2) [1] 0.9562256 > colMax(tmp2) [1] 2.006411 > colMin(tmp2) [1] -2.157037 > colMedians(tmp2) [1] -0.04747127 > colRanges(tmp2) [,1] [1,] -2.157037 [2,] 2.006411 > > 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.7274475 2.1214471 0.5483095 -8.0329671 -0.8924838 2.8730759 [7] -0.7711410 1.3036875 0.3762852 -7.6411289 > colApply(tmp,quantile)[,1] [,1] [1,] -2.1434397 [2,] -0.5641455 [3,] -0.3192905 [4,] 0.2923514 [5,] 2.6750995 > > rowApply(tmp,sum) [1] 1.2011216 1.1645514 -3.7646104 2.0813654 2.2342618 -2.0544378 [7] -5.9304413 1.2716467 -6.7573236 -0.2884967 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 4 1 7 8 1 5 7 10 10 5 [2,] 10 10 10 7 2 6 5 3 3 2 [3,] 6 8 4 10 6 2 3 9 5 7 [4,] 3 2 2 3 5 3 2 8 1 1 [5,] 7 6 6 5 8 4 4 4 4 4 [6,] 9 9 5 9 3 8 6 5 9 9 [7,] 8 5 1 4 7 9 8 2 7 8 [8,] 1 7 9 2 9 7 9 6 6 10 [9,] 2 4 3 6 4 10 10 7 8 3 [10,] 5 3 8 1 10 1 1 1 2 6 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -1.91969680 -0.13263259 -1.91533315 -1.31182799 3.22729446 -0.58615883 [7] 3.35110902 3.37579841 -2.69078173 -0.79882537 0.08565489 2.46034797 [13] 0.76733155 0.98716643 -2.33327196 -0.09196077 -3.82537387 1.10329287 [19] -6.36894428 2.72991535 > colApply(tmp,quantile)[,1] [,1] [1,] -1.5250968 [2,] -0.9095591 [3,] -0.5347648 [4,] 0.4363430 [5,] 0.6133808 > > rowApply(tmp,sum) [1] -0.25803149 -0.01676346 -2.68212827 2.80714578 -3.73711894 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 3 3 13 4 17 [2,] 5 9 17 17 4 [3,] 4 10 3 19 12 [4,] 8 6 18 9 1 [5,] 20 14 9 12 18 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.5250968 -0.775559149 -1.4848928 -0.020152170 1.7218318 0.9726005 [2,] -0.9095591 0.007862295 0.1168533 -0.412007908 0.5821580 0.6873245 [3,] 0.4363430 1.060767289 -1.7513191 1.159733495 -0.1386807 -1.1109826 [4,] -0.5347648 0.742215754 0.9194615 0.004428304 0.3409368 0.4524219 [5,] 0.6133808 -1.167918775 0.2845640 -2.043829706 0.7210485 -1.5875233 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.3359357 0.8465890 -0.5027225 -1.7433832 0.83922573 0.8890292 [2,] 0.1782815 0.7616216 0.1883218 1.1786506 0.23998956 0.6586385 [3,] 1.7130106 1.9583266 -0.9988648 -0.1357672 0.62177718 0.3729430 [4,] 0.3781403 0.3210016 -0.5581574 -0.5783054 -0.04751414 0.7911623 [5,] 0.7457410 -0.5117405 -0.8193590 0.4799798 -1.56782345 -0.2514250 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.4393219 -0.72790964 0.4930315 1.2707077 0.4178045 0.5615737 [2,] -0.1255035 0.78956759 -1.0148709 -0.3843236 -2.6052478 -0.6203737 [3,] 0.2324825 0.48513633 -1.4485511 -1.0091090 -2.1597958 0.6461559 [4,] -0.2334332 0.37639932 -0.6041194 0.3494913 0.1901482 -0.2644733 [5,] 0.4544639 0.06397282 0.2412379 -0.3187273 0.3317171 0.7804102 [,19] [,20] [1,] -2.8541271 0.5881603 [2,] -0.5090353 1.1748891 [3,] -1.9444937 -0.6712402 [4,] -0.5010987 1.2632046 [5,] -0.5601895 0.3749015 > > > 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.21-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.21-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.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 563 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.21-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.137907 -0.3901524 1.561567 -1.338865 0.461403 0.8295389 0.9107926 col8 col9 col10 col11 col12 col13 col14 row1 1.012491 1.046847 0.005482235 -0.4396573 -0.3862033 0.8516781 -0.5556715 col15 col16 col17 col18 col19 col20 row1 -0.4092276 -1.121048 -0.07207569 1.189895 0.3543324 1.338177 > tmp[,"col10"] col10 row1 0.005482235 row2 0.309902393 row3 0.993142793 row4 -0.465417077 row5 -0.528507630 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 1.13790727 -0.3901524 1.5615666 -1.3388646 0.461403 0.8295389 0.9107926 row5 -0.08518532 0.5531021 0.0210941 0.9690381 -1.062049 0.2685361 -0.7422029 col8 col9 col10 col11 col12 col13 row1 1.0124914 1.046847 0.005482235 -0.4396573 -0.3862033 0.8516781 row5 -0.4290965 1.411985 -0.528507630 -0.6556575 0.6444357 -0.3993324 col14 col15 col16 col17 col18 col19 col20 row1 -0.5556715 -0.4092276 -1.121048 -0.07207569 1.189895 0.3543324 1.3381766 row5 -0.4254951 0.8511810 1.396147 -1.64127420 0.431128 -0.8014853 0.3414923 > tmp[,c("col6","col20")] col6 col20 row1 0.8295389 1.33817660 row2 -0.3249031 -0.06758272 row3 -0.9515099 0.85297747 row4 -0.1908582 -0.02293883 row5 0.2685361 0.34149233 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.8295389 1.3381766 row5 0.2685361 0.3414923 > > > > > 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 49.97117 50.128 48.5574 50.3571 49.69692 104.4097 49.90921 49.77543 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.53313 52.12485 48.92016 50.53073 51.7593 50.82838 49.69533 49.58916 col17 col18 col19 col20 row1 49.22134 48.85226 50.83195 104.8134 > tmp[,"col10"] col10 row1 52.12485 row2 30.73367 row3 28.77178 row4 29.10961 row5 50.18018 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.97117 50.12800 48.55740 50.35710 49.69692 104.4097 49.90921 49.77543 row5 50.32404 50.14472 50.08552 49.19307 50.36731 102.8772 49.48854 50.85413 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.53313 52.12485 48.92016 50.53073 51.75930 50.82838 49.69533 49.58916 row5 49.62476 50.18018 49.89814 48.93750 50.70392 50.40329 51.51223 49.80884 col17 col18 col19 col20 row1 49.22134 48.85226 50.83195 104.8134 row5 50.08925 51.65339 50.66699 103.0700 > tmp[,c("col6","col20")] col6 col20 row1 104.40965 104.81335 row2 75.84914 76.97756 row3 74.61372 75.81958 row4 76.51121 75.20890 row5 102.87722 103.06998 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.4097 104.8134 row5 102.8772 103.0700 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.4097 104.8134 row5 102.8772 103.0700 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.1875687 [2,] 0.1818142 [3,] 1.4023583 [4,] 1.3902866 [5,] 0.5086146 > tmp[,c("col17","col7")] col17 col7 [1,] 0.29776854 0.19594213 [2,] -0.17741717 -1.91201276 [3,] -0.26575915 -1.46785402 [4,] 0.64474951 0.06765514 [5,] 0.01077448 -0.21787560 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.02550304 0.8681881 [2,] 0.03628326 -1.2724741 [3,] 1.39531123 0.8878893 [4,] -1.88001941 -0.3731028 [5,] 0.17036590 -0.7488020 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.02550304 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.02550304 [2,] 0.03628326 > > > > 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 -1.0986427 1.4109475 0.5108355 -0.2460250 0.3841827 -0.09571206 row1 -0.4974914 0.1135047 -1.2556590 0.7477888 -3.2664890 -0.39357342 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 -2.3094607 -1.1657064 0.7225822 -0.1005698 0.6290710 -0.1866997 -2.0708332 row1 -0.1569897 0.9502725 0.8723631 -0.4492423 0.4607098 -0.2591174 -0.1895287 [,14] [,15] [,16] [,17] [,18] [,19] row3 -0.7976223 -0.8866471 -0.9371852 -0.99161355 0.82641701 0.6904485 row1 0.2515283 -1.2329945 0.2341403 -0.07393983 0.09168619 0.3209744 [,20] row3 -1.0660712 row1 0.9168172 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 2.032661 1.258697 0.0469026 -0.1032243 -2.172563 -1.003395 0.1862575 [,8] [,9] [,10] row2 1.862099 1.283361 1.241809 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.1359415 -1.524011 0.2351582 1.339549 0.2195863 0.3038769 0.1688932 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.270939 1.480562 -0.5527259 -1.432561 -0.2719853 -1.566273 2.566121 [,15] [,16] [,17] [,18] [,19] [,20] row5 -0.2798889 -0.2672961 -2.444749 0.9972915 1.405389 -0.2292671 > > > 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: 0x600003a6c120> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea527b4f3fc" [2] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea558fe39c1" [3] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea51a81db8c" [4] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea54374d1ec" [5] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea52a81ff8d" [6] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea53cb097c8" [7] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea56dbcea98" [8] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea5dcdd971" [9] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea5457e90cb" [10] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea578542311" [11] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea55bca6ece" [12] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea54730c576" [13] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea552f3ea7d" [14] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea5ba7df17" [15] "/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests/BM9ea53a2764fb" > > > ### 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: 0x600003a6c360> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600003a6c360> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600003a6c360> > rowMedians(tmp) [1] 0.2292469364 -0.5480540572 0.1165758923 -0.4489390036 -0.6457954666 [6] -0.0492464316 -0.4165342202 -0.1271987487 -0.2376290903 -0.0996088829 [11] 0.1932853490 -0.3244679026 0.1429531511 -0.4497501838 -0.2198354987 [16] -0.3927220422 0.2280427721 -0.1123809186 -0.0005804458 -0.3267497192 [21] -0.1012925333 0.1672049869 0.0216066916 0.5596935919 0.3074351348 [26] 0.1440939472 -0.1099446965 0.4078881608 0.5714664691 0.2568095113 [31] 0.0135840764 -0.3517456830 -0.1417862000 0.0280831841 0.3950435118 [36] -0.1405772585 -0.3083804591 0.4355220429 -0.3943311769 0.1490899242 [41] -0.0551741345 0.3728457791 0.1649913152 -0.5132836646 -0.2251607863 [46] -0.2629904275 0.3038154183 -0.2760356695 -0.3787215736 -0.1524119112 [51] 0.1865830256 0.1954990437 -0.1090981536 0.3015129296 -0.5763044075 [56] 0.0796899816 -0.3019841182 -0.4501496087 0.1888930077 0.3252463678 [61] -0.0576346501 0.0115136047 -0.3701955093 -0.0612402525 -0.4259451621 [66] -0.8878817936 0.2868312360 0.0998069464 -0.0642977584 -0.8964399454 [71] 0.0232680283 -0.2745296154 0.3718797130 0.1416155939 0.3094026403 [76] 0.0154657269 -0.5856461403 0.2493529358 -0.2010751921 -0.1427016903 [81] 0.2799277308 0.3647401173 0.1104407136 0.5525308143 0.5090858031 [86] -0.2601728571 -0.1331636407 -0.0158730433 0.1334866194 1.0997884950 [91] 0.2528350242 -0.5451207515 0.6371345577 -0.5233443761 -0.3000150803 [96] -0.2389450517 0.5717606401 -0.2100670928 -0.0626375662 -0.3386377564 [101] 0.3931937225 -0.2521787189 -0.2106585587 0.1781187095 -0.0474765640 [106] -0.4698316396 -0.3175362062 -0.2206507702 0.3219971686 0.0919618448 [111] 0.5541844917 -0.0865427292 0.2189644006 -0.3983745670 0.2003575276 [116] 0.0636184524 0.1147203811 0.0256086169 0.1966641679 -0.1496719310 [121] 0.1658064062 0.3764668778 0.3869995493 -0.0326533342 0.4169719471 [126] -0.3502930472 -0.2459492691 -0.4309118723 -0.3400856653 0.3316281422 [131] -0.6690102326 0.1888991159 0.1206993049 -0.4222319177 -0.0432960618 [136] 0.2324680476 0.1474385802 0.6275670016 -0.0955048598 0.7153651268 [141] 0.3536100210 0.1268281646 0.2474602930 -0.1469236782 -0.4389718835 [146] -0.0648585508 0.2251970601 0.2649381552 0.0728876175 0.4528119873 [151] -0.3551204011 -0.4761731862 -0.0687243935 0.3074422778 0.1428954907 [156] 0.6279845836 -0.0751344722 0.5734111238 -0.1337886501 -0.1720015766 [161] 0.3825523108 -0.4172110672 -0.0217628979 0.1061216313 0.1715764822 [166] -0.1415041204 0.0499696970 0.2115116777 0.1701887688 0.0500123637 [171] -0.5870192752 -0.2215936592 0.1704889998 -0.0580250680 -0.1051930837 [176] -0.7296835500 0.1592859566 0.1033782285 -0.0056266026 -0.0425777601 [181] -0.2524722361 0.1180044088 -0.3578684905 0.0484876954 0.0428861016 [186] -1.0878685500 0.5518419013 -0.0485084205 -0.6426131470 -0.0981622338 [191] 0.7804870770 0.4788464935 -0.2204216987 -0.3446394329 0.3830061162 [196] 0.0638617471 0.0095711081 -0.0239761854 0.1875418903 -0.1599094328 [201] 0.4405999301 0.4639251689 -0.1811626286 -0.2082041396 -0.1054394190 [206] -0.2158068195 0.2590221233 -0.3230078778 0.1225111112 0.0103992268 [211] -0.0659970313 -0.1636671322 -0.4648907136 -0.2841549612 -0.1044118290 [216] 0.4015569902 -0.0076938449 0.3118008891 0.2292941428 0.1050114650 [221] -0.3141975736 0.0653180766 -0.0693998409 -0.0741759915 0.0997431052 [226] -0.2161079317 -0.1379488477 0.1248601285 0.0729325553 -0.1148831426 > > proc.time() user system elapsed 0.691 3.386 4.291
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2024-11-20 r87352) -- "Unsuffered Consequences" 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: 0x6000004ec000> > .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: 0x6000004ec000> > .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: 0x6000004ec000> > .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: 0x6000004ec000> > 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: 0x6000004ec180> > .Call("R_bm_AddColumn",P) <pointer: 0x6000004ec180> > .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: 0x6000004ec180> > .Call("R_bm_AddColumn",P) <pointer: 0x6000004ec180> > .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: 0x6000004ec180> > 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: 0x6000004fc480> > .Call("R_bm_AddColumn",P) <pointer: 0x6000004fc480> > .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: 0x6000004fc480> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x6000004fc480> > .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: 0x6000004fc480> > > .Call("R_bm_RowMode",P) <pointer: 0x6000004fc480> > .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: 0x6000004fc480> > > .Call("R_bm_ColMode",P) <pointer: 0x6000004fc480> > .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: 0x6000004fc480> > 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: 0x6000004e4000> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x6000004e4000> > .Call("R_bm_AddColumn",P) <pointer: 0x6000004e4000> > .Call("R_bm_AddColumn",P) <pointer: 0x6000004e4000> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile9f93425c9741" "BufferedMatrixFile9f934cce4e70" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile9f93425c9741" "BufferedMatrixFile9f934cce4e70" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x6000004e4240> > .Call("R_bm_AddColumn",P) <pointer: 0x6000004e4240> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x6000004e4240> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x6000004e4240> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x6000004e4240> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x6000004e4240> > .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: 0x6000004e4420> > .Call("R_bm_AddColumn",P) <pointer: 0x6000004e4420> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x6000004e4420> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x6000004e4420> > 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: 0x6000004e4600> > .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: 0x6000004e4600> > rm(P) > > proc.time() user system elapsed 0.120 0.049 0.168
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2024-11-20 r87352) -- "Unsuffered Consequences" 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.135 0.030 0.159