Back to Multiple platform build/check report for BioC 3.18: simplified long |
|
This page was generated on 2024-03-04 11:37:11 -0500 (Mon, 04 Mar 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | 4.3.2 Patched (2023-11-13 r85521) -- "Eye Holes" | 4692 |
palomino4 | Windows Server 2022 Datacenter | x64 | 4.3.2 (2023-10-31 ucrt) -- "Eye Holes" | 4445 |
lconway | macOS 12.7.1 Monterey | x86_64 | 4.3.2 Patched (2023-11-01 r85457) -- "Eye Holes" | 4466 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 246/2266 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.66.0 (landing page) Ben Bolstad
| nebbiolo2 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino4 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson1 | macOS 13.6.1 Ventura / arm64 | see weekly results here | ||||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.66.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.66.0.tar.gz |
StartedAt: 2024-03-03 19:21:32 -0500 (Sun, 03 Mar 2024) |
EndedAt: 2024-03-03 19:22:28 -0500 (Sun, 03 Mar 2024) |
EllapsedTime: 56.1 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.66.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck’ * using R version 4.3.2 Patched (2023-11-01 r85457) * using platform: x86_64-apple-darwin20 (64-bit) * R was compiled by Apple clang version 14.0.3 (clang-1403.0.22.14.1) GNU Fortran (GCC) 12.2.0 * running under: macOS Monterey 12.7.1 * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.66.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.18-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R 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 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 in ‘inst/doc’ ... 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.18-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.3-x86_64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.3.2 Patched (2023-11-01 r85457) -- "Eye Holes" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 (64-bit) 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.346 0.150 0.491
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.3.2 Patched (2023-11-01 r85457) -- "Eye Holes" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 (64-bit) 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.18-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 460322 24.6 992415 53.1 NA 645580 34.5 Vcells 848859 6.5 8388608 64.0 98304 2021539 15.5 > > > > > ## > ## 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] "Sun Mar 3 19:22:00 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] "Sun Mar 3 19:22:00 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: 0x600000dcc120> > > > > 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] "Sun Mar 3 19:22:06 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] "Sun Mar 3 19:22:07 2024" > > ColMode(tmp2) <pointer: 0x600000dcc120> > > > > ### 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,] 98.9198562 1.5050780 -0.3905777 -0.9086419 [2,] 0.2658472 -0.7472815 1.4761230 0.1721249 [3,] 0.4191780 1.0399457 -0.3320704 -1.1919995 [4,] 0.1254771 -0.3152536 1.2408638 -0.3419612 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.18-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,] 98.9198562 1.5050780 0.3905777 0.9086419 [2,] 0.2658472 0.7472815 1.4761230 0.1721249 [3,] 0.4191780 1.0399457 0.3320704 1.1919995 [4,] 0.1254771 0.3152536 1.2408638 0.3419612 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.18-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.9458462 1.2268162 0.6249622 0.9532271 [2,] 0.5156037 0.8644544 1.2149580 0.4148794 [3,] 0.6474396 1.0197773 0.5762555 1.0917873 [4,] 0.3542275 0.5614745 1.1139407 0.5847745 > > 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.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 223.37832 38.77324 31.64020 35.44091 [2,] 30.42188 34.39183 38.62570 29.32092 [3,] 31.89357 36.23772 31.09463 37.10987 [4,] 28.66775 30.93000 37.38027 31.18971 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x600000d84000> > exp(tmp5) <pointer: 0x600000d84000> > log(tmp5,2) <pointer: 0x600000d84000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 464.9327 > Min(tmp5) [1] 54.3137 > mean(tmp5) [1] 73.29156 > Sum(tmp5) [1] 14658.31 > Var(tmp5) [1] 847.4708 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 92.11125 71.61254 74.06666 71.08379 71.14275 72.04945 65.98070 72.60483 [9] 71.34808 70.91559 > rowSums(tmp5) [1] 1842.225 1432.251 1481.333 1421.676 1422.855 1440.989 1319.614 1452.097 [9] 1426.962 1418.312 > rowVars(tmp5) [1] 7744.19511 77.66494 68.69858 89.99506 83.11809 86.76781 [7] 67.97715 54.60080 80.69329 67.71785 > rowSd(tmp5) [1] 88.001109 8.812771 8.288461 9.486573 9.116912 9.314924 8.244826 [8] 7.389236 8.982944 8.229086 > rowMax(tmp5) [1] 464.93270 86.99694 86.16402 86.95331 89.35379 85.09631 82.44291 [8] 82.31403 90.41840 92.35553 > rowMin(tmp5) [1] 62.67851 54.31370 56.14629 55.83932 57.27969 56.23444 56.32346 56.25384 [9] 58.01182 59.42388 > > colMeans(tmp5) [1] 110.31298 68.58306 70.47600 69.41968 70.69835 70.02935 64.34092 [8] 71.45672 73.29500 72.68400 74.15704 74.29736 75.02369 68.68504 [15] 67.66835 76.64210 74.22871 71.05654 74.85575 67.92064 > colSums(tmp5) [1] 1103.1298 685.8306 704.7600 694.1968 706.9835 700.2935 643.4092 [8] 714.5672 732.9500 726.8400 741.5704 742.9736 750.2369 686.8504 [15] 676.6835 766.4210 742.2871 710.5654 748.5575 679.2064 > colVars(tmp5) [1] 15613.35573 53.08285 42.97672 64.06517 61.95994 77.39153 [7] 19.10575 89.69426 70.68670 106.63015 56.62370 130.18263 [13] 85.02061 75.20689 63.84178 91.22416 62.66956 51.58404 [19] 78.73084 41.28247 > colSd(tmp5) [1] 124.953414 7.285798 6.555664 8.004072 7.871464 8.797245 [7] 4.371013 9.470706 8.407538 10.326187 7.524872 11.409760 [13] 9.220662 8.672190 7.990105 9.551134 7.916411 7.182203 [19] 8.873040 6.425144 > colMax(tmp5) [1] 464.93270 80.70142 80.39434 77.85024 82.36250 84.45286 71.56819 [8] 85.88343 81.63952 90.41840 85.30568 86.99694 89.35379 81.70323 [15] 85.09631 92.35553 86.02000 80.60224 86.95331 75.46504 > colMin(tmp5) [1] 57.27969 56.25384 59.92055 56.32346 59.34897 56.23444 58.70001 56.14629 [9] 58.16468 59.42388 61.07511 58.01182 57.02540 54.31370 58.31716 58.96556 [17] 62.76971 56.57453 59.84735 55.83932 > > > ### 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.11125 71.61254 74.06666 71.08379 71.14275 72.04945 65.98070 NA [9] 71.34808 70.91559 > rowSums(tmp5) [1] 1842.225 1432.251 1481.333 1421.676 1422.855 1440.989 1319.614 NA [9] 1426.962 1418.312 > rowVars(tmp5) [1] 7744.19511 77.66494 68.69858 89.99506 83.11809 86.76781 [7] 67.97715 57.27567 80.69329 67.71785 > rowSd(tmp5) [1] 88.001109 8.812771 8.288461 9.486573 9.116912 9.314924 8.244826 [8] 7.568069 8.982944 8.229086 > rowMax(tmp5) [1] 464.93270 86.99694 86.16402 86.95331 89.35379 85.09631 82.44291 [8] NA 90.41840 92.35553 > rowMin(tmp5) [1] 62.67851 54.31370 56.14629 55.83932 57.27969 56.23444 56.32346 NA [9] 58.01182 59.42388 > > colMeans(tmp5) [1] 110.31298 68.58306 70.47600 69.41968 70.69835 NA 64.34092 [8] 71.45672 73.29500 72.68400 74.15704 74.29736 75.02369 68.68504 [15] 67.66835 76.64210 74.22871 71.05654 74.85575 67.92064 > colSums(tmp5) [1] 1103.1298 685.8306 704.7600 694.1968 706.9835 NA 643.4092 [8] 714.5672 732.9500 726.8400 741.5704 742.9736 750.2369 686.8504 [15] 676.6835 766.4210 742.2871 710.5654 748.5575 679.2064 > colVars(tmp5) [1] 15613.35573 53.08285 42.97672 64.06517 61.95994 NA [7] 19.10575 89.69426 70.68670 106.63015 56.62370 130.18263 [13] 85.02061 75.20689 63.84178 91.22416 62.66956 51.58404 [19] 78.73084 41.28247 > colSd(tmp5) [1] 124.953414 7.285798 6.555664 8.004072 7.871464 NA [7] 4.371013 9.470706 8.407538 10.326187 7.524872 11.409760 [13] 9.220662 8.672190 7.990105 9.551134 7.916411 7.182203 [19] 8.873040 6.425144 > colMax(tmp5) [1] 464.93270 80.70142 80.39434 77.85024 82.36250 NA 71.56819 [8] 85.88343 81.63952 90.41840 85.30568 86.99694 89.35379 81.70323 [15] 85.09631 92.35553 86.02000 80.60224 86.95331 75.46504 > colMin(tmp5) [1] 57.27969 56.25384 59.92055 56.32346 59.34897 NA 58.70001 56.14629 [9] 58.16468 59.42388 61.07511 58.01182 57.02540 54.31370 58.31716 58.96556 [17] 62.76971 56.57453 59.84735 55.83932 > > Max(tmp5,na.rm=TRUE) [1] 464.9327 > Min(tmp5,na.rm=TRUE) [1] 54.3137 > mean(tmp5,na.rm=TRUE) [1] 73.28257 > Sum(tmp5,na.rm=TRUE) [1] 14583.23 > Var(tmp5,na.rm=TRUE) [1] 851.7347 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.11125 71.61254 74.06666 71.08379 71.14275 72.04945 65.98070 72.47451 [9] 71.34808 70.91559 > rowSums(tmp5,na.rm=TRUE) [1] 1842.225 1432.251 1481.333 1421.676 1422.855 1440.989 1319.614 1377.016 [9] 1426.962 1418.312 > rowVars(tmp5,na.rm=TRUE) [1] 7744.19511 77.66494 68.69858 89.99506 83.11809 86.76781 [7] 67.97715 57.27567 80.69329 67.71785 > rowSd(tmp5,na.rm=TRUE) [1] 88.001109 8.812771 8.288461 9.486573 9.116912 9.314924 8.244826 [8] 7.568069 8.982944 8.229086 > rowMax(tmp5,na.rm=TRUE) [1] 464.93270 86.99694 86.16402 86.95331 89.35379 85.09631 82.44291 [8] 82.31403 90.41840 92.35553 > rowMin(tmp5,na.rm=TRUE) [1] 62.67851 54.31370 56.14629 55.83932 57.27969 56.23444 56.32346 56.25384 [9] 58.01182 59.42388 > > colMeans(tmp5,na.rm=TRUE) [1] 110.31298 68.58306 70.47600 69.41968 70.69835 69.46808 64.34092 [8] 71.45672 73.29500 72.68400 74.15704 74.29736 75.02369 68.68504 [15] 67.66835 76.64210 74.22871 71.05654 74.85575 67.92064 > colSums(tmp5,na.rm=TRUE) [1] 1103.1298 685.8306 704.7600 694.1968 706.9835 625.2127 643.4092 [8] 714.5672 732.9500 726.8400 741.5704 742.9736 750.2369 686.8504 [15] 676.6835 766.4210 742.2871 710.5654 748.5575 679.2064 > colVars(tmp5,na.rm=TRUE) [1] 15613.35573 53.08285 42.97672 64.06517 61.95994 83.52142 [7] 19.10575 89.69426 70.68670 106.63015 56.62370 130.18263 [13] 85.02061 75.20689 63.84178 91.22416 62.66956 51.58404 [19] 78.73084 41.28247 > colSd(tmp5,na.rm=TRUE) [1] 124.953414 7.285798 6.555664 8.004072 7.871464 9.139006 [7] 4.371013 9.470706 8.407538 10.326187 7.524872 11.409760 [13] 9.220662 8.672190 7.990105 9.551134 7.916411 7.182203 [19] 8.873040 6.425144 > colMax(tmp5,na.rm=TRUE) [1] 464.93270 80.70142 80.39434 77.85024 82.36250 84.45286 71.56819 [8] 85.88343 81.63952 90.41840 85.30568 86.99694 89.35379 81.70323 [15] 85.09631 92.35553 86.02000 80.60224 86.95331 75.46504 > colMin(tmp5,na.rm=TRUE) [1] 57.27969 56.25384 59.92055 56.32346 59.34897 56.23444 58.70001 56.14629 [9] 58.16468 59.42388 61.07511 58.01182 57.02540 54.31370 58.31716 58.96556 [17] 62.76971 56.57453 59.84735 55.83932 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 92.11125 71.61254 74.06666 71.08379 71.14275 72.04945 65.98070 NaN [9] 71.34808 70.91559 > rowSums(tmp5,na.rm=TRUE) [1] 1842.225 1432.251 1481.333 1421.676 1422.855 1440.989 1319.614 0.000 [9] 1426.962 1418.312 > rowVars(tmp5,na.rm=TRUE) [1] 7744.19511 77.66494 68.69858 89.99506 83.11809 86.76781 [7] 67.97715 NA 80.69329 67.71785 > rowSd(tmp5,na.rm=TRUE) [1] 88.001109 8.812771 8.288461 9.486573 9.116912 9.314924 8.244826 [8] NA 8.982944 8.229086 > rowMax(tmp5,na.rm=TRUE) [1] 464.93270 86.99694 86.16402 86.95331 89.35379 85.09631 82.44291 [8] NA 90.41840 92.35553 > rowMin(tmp5,na.rm=TRUE) [1] 62.67851 54.31370 56.14629 55.83932 57.27969 56.23444 56.32346 NA [9] 58.01182 59.42388 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 114.05062 69.95297 70.69040 68.65198 71.95939 NaN 64.24218 [8] 71.79582 72.64821 71.61400 73.72849 73.49728 75.38023 67.32174 [15] 67.12422 77.82053 74.55128 69.99591 75.78166 67.08237 > colSums(tmp5,na.rm=TRUE) [1] 1026.4556 629.5767 636.2136 617.8678 647.6345 0.0000 578.1796 [8] 646.1624 653.8339 644.5260 663.5564 661.4755 678.4221 605.8957 [15] 604.1180 700.3848 670.9615 629.9632 682.0350 603.7413 > colVars(tmp5,na.rm=TRUE) [1] 17407.86319 38.60577 47.83166 65.44302 51.81488 NA [7] 21.38428 99.61242 74.81630 107.07872 61.63552 139.25384 [13] 94.21808 63.69881 68.49113 87.00434 69.33266 45.37645 [19] 78.92746 38.53749 > colSd(tmp5,na.rm=TRUE) [1] 131.938862 6.213355 6.916044 8.089686 7.198255 NA [7] 4.624315 9.980602 8.649641 10.347885 7.850829 11.800586 [13] 9.706600 7.981153 8.275937 9.327612 8.326623 6.736204 [19] 8.884113 6.207857 > colMax(tmp5,na.rm=TRUE) [1] 464.93270 80.70142 80.39434 77.85024 82.36250 -Inf 71.56819 [8] 85.88343 81.63952 90.41840 85.30568 86.99694 89.35379 81.70323 [15] 85.09631 92.35553 86.02000 77.30471 86.95331 74.62790 > colMin(tmp5,na.rm=TRUE) [1] 57.27969 62.49680 59.92055 56.32346 60.41046 Inf 58.70001 56.14629 [9] 58.16468 59.42388 61.07511 58.01182 57.02540 54.31370 58.31716 58.96556 [17] 62.76971 56.57453 59.84735 55.83932 > > > > > 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] 235.7822 200.2793 163.8211 180.9475 223.9681 212.7814 311.7571 119.8043 [9] 183.3898 167.7308 > apply(copymatrix,1,var,na.rm=TRUE) [1] 235.7822 200.2793 163.8211 180.9475 223.9681 212.7814 311.7571 119.8043 [9] 183.3898 167.7308 > > > > copymatrix <- matrix(rnorm(200,150,15),10,20) > > tmp5[1:10,1:20] <- copymatrix > which.row <- 1 > which.col <- 3 > cat(which.row," ",which.col,"\n") 1 3 > tmp5[which.row,which.col] <- NA > copymatrix[which.row,which.col] <- NA > > colVars(tmp5,na.rm=TRUE)-apply(copymatrix,2,var,na.rm=TRUE) [1] -1.705303e-13 0.000000e+00 -8.526513e-14 2.842171e-14 0.000000e+00 [6] -1.136868e-13 1.705303e-13 5.684342e-14 2.842171e-14 1.136868e-13 [11] 4.263256e-14 -5.684342e-14 -2.273737e-13 5.684342e-14 -1.705303e-13 [16] -5.684342e-14 -2.842171e-14 2.842171e-14 -4.263256e-14 0.000000e+00 > > > > > > > > > > > ## making sure these things agree > ## > ## first when there is no NA > > > > agree.checks <- function(buff.matrix,r.matrix,err.tol=1e-10){ + + if (Max(buff.matrix,na.rm=TRUE) != max(r.matrix,na.rm=TRUE)){ + stop("No agreement in Max") + } + + + if (Min(buff.matrix,na.rm=TRUE) != min(r.matrix,na.rm=TRUE)){ + stop("No agreement in Min") + } + + + if (abs(Sum(buff.matrix,na.rm=TRUE)- sum(r.matrix,na.rm=TRUE)) > err.tol){ + + cat(Sum(buff.matrix,na.rm=TRUE),"\n") + cat(sum(r.matrix,na.rm=TRUE),"\n") + cat(Sum(buff.matrix,na.rm=TRUE) - sum(r.matrix,na.rm=TRUE),"\n") + + stop("No agreement in Sum") + } + + if (abs(mean(buff.matrix,na.rm=TRUE) - mean(r.matrix,na.rm=TRUE)) > err.tol){ + stop("No agreement in mean") + } + + + if(abs(Var(buff.matrix,na.rm=TRUE) - var(as.vector(r.matrix),na.rm=TRUE)) > err.tol){ + stop("No agreement in Var") + } + + + + if(any(abs(rowMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,mean,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowMeans") + } + + + if(any(abs(colMeans(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,mean,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colMeans") + } + + + if(any(abs(rowSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in rowSums") + } + + + if(any(abs(colSums(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,sum,na.rm=TRUE))> err.tol,na.rm=TRUE)){ + stop("No agreement in colSums") + } + + ### this is to get around the fact that R doesn't like to compute NA on an entire vector of NA when + ### computing variance + my.Var <- function(x,na.rm=FALSE){ + if (all(is.na(x))){ + return(NA) + } else { + var(x,na.rm=na.rm) + } + + } + + if(any(abs(rowVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(colVars(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,my.Var,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in rowVars") + } + + + if(any(abs(rowMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + if(any(abs(colMax(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,max,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMax") + } + + + + if(any(abs(rowMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,1,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + + if(any(abs(colMin(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,min,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMin") + } + + if(any(abs(colMedians(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,median,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colMedian") + } + + if(any(abs(colRanges(buff.matrix,na.rm=TRUE) - apply(r.matrix,2,range,na.rm=TRUE)) > err.tol,na.rm=TRUE)){ + stop("No agreement in colRanges") + } + + + + } > > > > > > > > > > for (rep in 1:20){ + copymatrix <- matrix(rnorm(200,150,15),10,20) + + tmp5[1:10,1:20] <- copymatrix + + + agree.checks(tmp5,copymatrix) + + ## now lets assign some NA values and check agreement + + which.row <- sample(1:10,1,replace=TRUE) + which.col <- sample(1:20,1,replace=TRUE) + + cat(which.row," ",which.col,"\n") + + tmp5[which.row,which.col] <- NA + copymatrix[which.row,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ## make an entire row NA + tmp5[which.row,] <- NA + copymatrix[which.row,] <- NA + + + agree.checks(tmp5,copymatrix) + + ### also make an entire col NA + tmp5[,which.col] <- NA + copymatrix[,which.col] <- NA + + agree.checks(tmp5,copymatrix) + + ### now make 1 element non NA with NA in the rest of row and column + + tmp5[which.row,which.col] <- rnorm(1,150,15) + copymatrix[which.row,which.col] <- tmp5[which.row,which.col] + + agree.checks(tmp5,copymatrix) + } 10 2 2 9 5 17 5 15 10 11 4 7 3 7 4 13 7 9 5 16 5 14 7 1 6 11 1 9 4 1 2 6 9 16 9 3 9 2 3 1 There were 50 or more warnings (use warnings() to see the first 50) > > > ### now test 1 by n and n by 1 matrix > > > err.tol <- 1e-12 > > rm(tmp5) > > dataset1 <- rnorm(100) > dataset2 <- rnorm(100) > > tmp <- createBufferedMatrix(1,100) > tmp[1,] <- dataset1 > > tmp2 <- createBufferedMatrix(100,1) > tmp2[,1] <- dataset2 > > > > > > Max(tmp) [1] 2.221144 > Min(tmp) [1] -2.180508 > mean(tmp) [1] 0.0204974 > Sum(tmp) [1] 2.04974 > Var(tmp) [1] 0.8277729 > > rowMeans(tmp) [1] 0.0204974 > rowSums(tmp) [1] 2.04974 > rowVars(tmp) [1] 0.8277729 > rowSd(tmp) [1] 0.9098203 > rowMax(tmp) [1] 2.221144 > rowMin(tmp) [1] -2.180508 > > colMeans(tmp) [1] 1.673743512 -0.951851067 -0.500220683 1.058677935 -1.278827298 [6] 0.895264256 0.689671119 0.327980333 0.405188227 -0.558249085 [11] -0.420010374 0.672242576 -0.853947611 0.707862169 -0.352786143 [16] 0.204548121 -0.578403910 0.204292292 0.101651676 0.457494414 [21] 0.233087884 -0.936709621 -2.180508368 1.109345962 0.470532805 [26] -0.847013115 -0.709657491 -1.254139167 -0.991851196 0.296392316 [31] -0.951744660 0.217052959 0.974411578 -0.471069281 -0.389483087 [36] 0.209997503 0.797576159 0.823403717 -0.095285634 -0.908819790 [41] 0.408382392 1.113854852 0.885868714 -0.117767525 -0.391292575 [46] -0.575999914 -0.395607957 0.639736353 -0.109728567 1.713275716 [51] -0.053442352 -2.156317511 -1.550916931 0.690421389 0.994570538 [56] -1.492447937 0.163845094 0.730283166 0.006595385 0.031628895 [61] 2.060832500 -0.108736293 -0.030042207 1.319517228 1.152083198 [66] -0.379443168 0.464218197 0.449645645 0.876498338 0.684638054 [71] -0.330892962 0.479625687 1.347062288 -1.870904215 -0.904069651 [76] -1.852481762 -1.993828975 -1.071649801 2.221143766 0.663953078 [81] 1.049574675 -0.564015626 0.459411403 -0.311428858 -0.100028377 [86] -0.200832148 -0.364443176 -0.602908569 -0.475078040 -0.201805698 [91] -1.075467603 0.460008586 0.527370284 0.501971460 0.869089437 [96] 1.057867243 0.420215903 -1.029156766 0.827549991 -0.210104341 > colSums(tmp) [1] 1.673743512 -0.951851067 -0.500220683 1.058677935 -1.278827298 [6] 0.895264256 0.689671119 0.327980333 0.405188227 -0.558249085 [11] -0.420010374 0.672242576 -0.853947611 0.707862169 -0.352786143 [16] 0.204548121 -0.578403910 0.204292292 0.101651676 0.457494414 [21] 0.233087884 -0.936709621 -2.180508368 1.109345962 0.470532805 [26] -0.847013115 -0.709657491 -1.254139167 -0.991851196 0.296392316 [31] -0.951744660 0.217052959 0.974411578 -0.471069281 -0.389483087 [36] 0.209997503 0.797576159 0.823403717 -0.095285634 -0.908819790 [41] 0.408382392 1.113854852 0.885868714 -0.117767525 -0.391292575 [46] -0.575999914 -0.395607957 0.639736353 -0.109728567 1.713275716 [51] -0.053442352 -2.156317511 -1.550916931 0.690421389 0.994570538 [56] -1.492447937 0.163845094 0.730283166 0.006595385 0.031628895 [61] 2.060832500 -0.108736293 -0.030042207 1.319517228 1.152083198 [66] -0.379443168 0.464218197 0.449645645 0.876498338 0.684638054 [71] -0.330892962 0.479625687 1.347062288 -1.870904215 -0.904069651 [76] -1.852481762 -1.993828975 -1.071649801 2.221143766 0.663953078 [81] 1.049574675 -0.564015626 0.459411403 -0.311428858 -0.100028377 [86] -0.200832148 -0.364443176 -0.602908569 -0.475078040 -0.201805698 [91] -1.075467603 0.460008586 0.527370284 0.501971460 0.869089437 [96] 1.057867243 0.420215903 -1.029156766 0.827549991 -0.210104341 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] 1.673743512 -0.951851067 -0.500220683 1.058677935 -1.278827298 [6] 0.895264256 0.689671119 0.327980333 0.405188227 -0.558249085 [11] -0.420010374 0.672242576 -0.853947611 0.707862169 -0.352786143 [16] 0.204548121 -0.578403910 0.204292292 0.101651676 0.457494414 [21] 0.233087884 -0.936709621 -2.180508368 1.109345962 0.470532805 [26] -0.847013115 -0.709657491 -1.254139167 -0.991851196 0.296392316 [31] -0.951744660 0.217052959 0.974411578 -0.471069281 -0.389483087 [36] 0.209997503 0.797576159 0.823403717 -0.095285634 -0.908819790 [41] 0.408382392 1.113854852 0.885868714 -0.117767525 -0.391292575 [46] -0.575999914 -0.395607957 0.639736353 -0.109728567 1.713275716 [51] -0.053442352 -2.156317511 -1.550916931 0.690421389 0.994570538 [56] -1.492447937 0.163845094 0.730283166 0.006595385 0.031628895 [61] 2.060832500 -0.108736293 -0.030042207 1.319517228 1.152083198 [66] -0.379443168 0.464218197 0.449645645 0.876498338 0.684638054 [71] -0.330892962 0.479625687 1.347062288 -1.870904215 -0.904069651 [76] -1.852481762 -1.993828975 -1.071649801 2.221143766 0.663953078 [81] 1.049574675 -0.564015626 0.459411403 -0.311428858 -0.100028377 [86] -0.200832148 -0.364443176 -0.602908569 -0.475078040 -0.201805698 [91] -1.075467603 0.460008586 0.527370284 0.501971460 0.869089437 [96] 1.057867243 0.420215903 -1.029156766 0.827549991 -0.210104341 > colMin(tmp) [1] 1.673743512 -0.951851067 -0.500220683 1.058677935 -1.278827298 [6] 0.895264256 0.689671119 0.327980333 0.405188227 -0.558249085 [11] -0.420010374 0.672242576 -0.853947611 0.707862169 -0.352786143 [16] 0.204548121 -0.578403910 0.204292292 0.101651676 0.457494414 [21] 0.233087884 -0.936709621 -2.180508368 1.109345962 0.470532805 [26] -0.847013115 -0.709657491 -1.254139167 -0.991851196 0.296392316 [31] -0.951744660 0.217052959 0.974411578 -0.471069281 -0.389483087 [36] 0.209997503 0.797576159 0.823403717 -0.095285634 -0.908819790 [41] 0.408382392 1.113854852 0.885868714 -0.117767525 -0.391292575 [46] -0.575999914 -0.395607957 0.639736353 -0.109728567 1.713275716 [51] -0.053442352 -2.156317511 -1.550916931 0.690421389 0.994570538 [56] -1.492447937 0.163845094 0.730283166 0.006595385 0.031628895 [61] 2.060832500 -0.108736293 -0.030042207 1.319517228 1.152083198 [66] -0.379443168 0.464218197 0.449645645 0.876498338 0.684638054 [71] -0.330892962 0.479625687 1.347062288 -1.870904215 -0.904069651 [76] -1.852481762 -1.993828975 -1.071649801 2.221143766 0.663953078 [81] 1.049574675 -0.564015626 0.459411403 -0.311428858 -0.100028377 [86] -0.200832148 -0.364443176 -0.602908569 -0.475078040 -0.201805698 [91] -1.075467603 0.460008586 0.527370284 0.501971460 0.869089437 [96] 1.057867243 0.420215903 -1.029156766 0.827549991 -0.210104341 > colMedians(tmp) [1] 1.673743512 -0.951851067 -0.500220683 1.058677935 -1.278827298 [6] 0.895264256 0.689671119 0.327980333 0.405188227 -0.558249085 [11] -0.420010374 0.672242576 -0.853947611 0.707862169 -0.352786143 [16] 0.204548121 -0.578403910 0.204292292 0.101651676 0.457494414 [21] 0.233087884 -0.936709621 -2.180508368 1.109345962 0.470532805 [26] -0.847013115 -0.709657491 -1.254139167 -0.991851196 0.296392316 [31] -0.951744660 0.217052959 0.974411578 -0.471069281 -0.389483087 [36] 0.209997503 0.797576159 0.823403717 -0.095285634 -0.908819790 [41] 0.408382392 1.113854852 0.885868714 -0.117767525 -0.391292575 [46] -0.575999914 -0.395607957 0.639736353 -0.109728567 1.713275716 [51] -0.053442352 -2.156317511 -1.550916931 0.690421389 0.994570538 [56] -1.492447937 0.163845094 0.730283166 0.006595385 0.031628895 [61] 2.060832500 -0.108736293 -0.030042207 1.319517228 1.152083198 [66] -0.379443168 0.464218197 0.449645645 0.876498338 0.684638054 [71] -0.330892962 0.479625687 1.347062288 -1.870904215 -0.904069651 [76] -1.852481762 -1.993828975 -1.071649801 2.221143766 0.663953078 [81] 1.049574675 -0.564015626 0.459411403 -0.311428858 -0.100028377 [86] -0.200832148 -0.364443176 -0.602908569 -0.475078040 -0.201805698 [91] -1.075467603 0.460008586 0.527370284 0.501971460 0.869089437 [96] 1.057867243 0.420215903 -1.029156766 0.827549991 -0.210104341 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.673744 -0.9518511 -0.5002207 1.058678 -1.278827 0.8952643 0.6896711 [2,] 1.673744 -0.9518511 -0.5002207 1.058678 -1.278827 0.8952643 0.6896711 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.3279803 0.4051882 -0.5582491 -0.4200104 0.6722426 -0.8539476 0.7078622 [2,] 0.3279803 0.4051882 -0.5582491 -0.4200104 0.6722426 -0.8539476 0.7078622 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.3527861 0.2045481 -0.5784039 0.2042923 0.1016517 0.4574944 0.2330879 [2,] -0.3527861 0.2045481 -0.5784039 0.2042923 0.1016517 0.4574944 0.2330879 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -0.9367096 -2.180508 1.109346 0.4705328 -0.8470131 -0.7096575 -1.254139 [2,] -0.9367096 -2.180508 1.109346 0.4705328 -0.8470131 -0.7096575 -1.254139 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.9918512 0.2963923 -0.9517447 0.217053 0.9744116 -0.4710693 -0.3894831 [2,] -0.9918512 0.2963923 -0.9517447 0.217053 0.9744116 -0.4710693 -0.3894831 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.2099975 0.7975762 0.8234037 -0.09528563 -0.9088198 0.4083824 1.113855 [2,] 0.2099975 0.7975762 0.8234037 -0.09528563 -0.9088198 0.4083824 1.113855 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.8858687 -0.1177675 -0.3912926 -0.5759999 -0.395608 0.6397364 -0.1097286 [2,] 0.8858687 -0.1177675 -0.3912926 -0.5759999 -0.395608 0.6397364 -0.1097286 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.713276 -0.05344235 -2.156318 -1.550917 0.6904214 0.9945705 -1.492448 [2,] 1.713276 -0.05344235 -2.156318 -1.550917 0.6904214 0.9945705 -1.492448 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.1638451 0.7302832 0.006595385 0.0316289 2.060833 -0.1087363 -0.03004221 [2,] 0.1638451 0.7302832 0.006595385 0.0316289 2.060833 -0.1087363 -0.03004221 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 1.319517 1.152083 -0.3794432 0.4642182 0.4496456 0.8764983 0.6846381 [2,] 1.319517 1.152083 -0.3794432 0.4642182 0.4496456 0.8764983 0.6846381 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.330893 0.4796257 1.347062 -1.870904 -0.9040697 -1.852482 -1.993829 [2,] -0.330893 0.4796257 1.347062 -1.870904 -0.9040697 -1.852482 -1.993829 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -1.07165 2.221144 0.6639531 1.049575 -0.5640156 0.4594114 -0.3114289 [2,] -1.07165 2.221144 0.6639531 1.049575 -0.5640156 0.4594114 -0.3114289 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.1000284 -0.2008321 -0.3644432 -0.6029086 -0.475078 -0.2018057 -1.075468 [2,] -0.1000284 -0.2008321 -0.3644432 -0.6029086 -0.475078 -0.2018057 -1.075468 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 0.4600086 0.5273703 0.5019715 0.8690894 1.057867 0.4202159 -1.029157 [2,] 0.4600086 0.5273703 0.5019715 0.8690894 1.057867 0.4202159 -1.029157 [,99] [,100] [1,] 0.82755 -0.2101043 [2,] 0.82755 -0.2101043 > > > Max(tmp2) [1] 1.929578 > Min(tmp2) [1] -2.6865 > mean(tmp2) [1] -0.1423118 > Sum(tmp2) [1] -14.23118 > Var(tmp2) [1] 0.9815502 > > rowMeans(tmp2) [1] -0.59761580 -0.18028322 0.57735761 -0.37867568 0.18408781 -1.38297335 [7] 1.29997362 -0.30967331 -0.57565505 -1.58343402 0.10229502 0.25064253 [13] -0.88783755 0.88227202 1.05285837 -0.45000735 -1.17817779 0.71978547 [19] 0.15553964 -0.24152086 0.37446576 -1.13417828 1.89721687 -0.20962179 [25] 0.45142815 0.36479767 -1.52818514 1.05280915 -2.68650044 0.22015606 [31] 0.10253944 -0.28158537 -1.51613614 1.57438149 -1.32780513 1.04439943 [37] -1.81089650 0.01955781 0.34372138 -0.33672827 -2.05588347 -1.50103306 [43] 1.59022724 -0.11029119 0.06023960 0.21584462 -0.93638254 -1.12897490 [49] -1.68386426 -1.21371343 0.06267968 0.29478523 1.59016523 1.60125818 [55] -0.61737474 -0.33892767 -0.72436930 -1.57035862 -2.31226566 0.73485379 [61] 0.32917872 -0.48529204 -1.29449033 -0.69073130 -0.70392553 -0.31898020 [67] -1.91198258 -0.29793110 1.12044512 1.22944805 0.51354726 -0.52247707 [73] -0.32742670 0.76982671 -0.05726353 -0.11743106 -0.70524981 0.85808084 [79] 0.24742858 -0.36441707 -0.54644500 0.61407178 0.26205755 0.55242956 [85] 1.09870852 -0.18318148 -0.28937597 1.46821851 -1.69091524 0.05020974 [91] -0.70500168 -0.37186198 1.92957829 0.30775481 -0.18876755 0.19293858 [97] -1.03901531 -0.91487565 0.11963596 1.80288766 > rowSums(tmp2) [1] -0.59761580 -0.18028322 0.57735761 -0.37867568 0.18408781 -1.38297335 [7] 1.29997362 -0.30967331 -0.57565505 -1.58343402 0.10229502 0.25064253 [13] -0.88783755 0.88227202 1.05285837 -0.45000735 -1.17817779 0.71978547 [19] 0.15553964 -0.24152086 0.37446576 -1.13417828 1.89721687 -0.20962179 [25] 0.45142815 0.36479767 -1.52818514 1.05280915 -2.68650044 0.22015606 [31] 0.10253944 -0.28158537 -1.51613614 1.57438149 -1.32780513 1.04439943 [37] -1.81089650 0.01955781 0.34372138 -0.33672827 -2.05588347 -1.50103306 [43] 1.59022724 -0.11029119 0.06023960 0.21584462 -0.93638254 -1.12897490 [49] -1.68386426 -1.21371343 0.06267968 0.29478523 1.59016523 1.60125818 [55] -0.61737474 -0.33892767 -0.72436930 -1.57035862 -2.31226566 0.73485379 [61] 0.32917872 -0.48529204 -1.29449033 -0.69073130 -0.70392553 -0.31898020 [67] -1.91198258 -0.29793110 1.12044512 1.22944805 0.51354726 -0.52247707 [73] -0.32742670 0.76982671 -0.05726353 -0.11743106 -0.70524981 0.85808084 [79] 0.24742858 -0.36441707 -0.54644500 0.61407178 0.26205755 0.55242956 [85] 1.09870852 -0.18318148 -0.28937597 1.46821851 -1.69091524 0.05020974 [91] -0.70500168 -0.37186198 1.92957829 0.30775481 -0.18876755 0.19293858 [97] -1.03901531 -0.91487565 0.11963596 1.80288766 > 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.59761580 -0.18028322 0.57735761 -0.37867568 0.18408781 -1.38297335 [7] 1.29997362 -0.30967331 -0.57565505 -1.58343402 0.10229502 0.25064253 [13] -0.88783755 0.88227202 1.05285837 -0.45000735 -1.17817779 0.71978547 [19] 0.15553964 -0.24152086 0.37446576 -1.13417828 1.89721687 -0.20962179 [25] 0.45142815 0.36479767 -1.52818514 1.05280915 -2.68650044 0.22015606 [31] 0.10253944 -0.28158537 -1.51613614 1.57438149 -1.32780513 1.04439943 [37] -1.81089650 0.01955781 0.34372138 -0.33672827 -2.05588347 -1.50103306 [43] 1.59022724 -0.11029119 0.06023960 0.21584462 -0.93638254 -1.12897490 [49] -1.68386426 -1.21371343 0.06267968 0.29478523 1.59016523 1.60125818 [55] -0.61737474 -0.33892767 -0.72436930 -1.57035862 -2.31226566 0.73485379 [61] 0.32917872 -0.48529204 -1.29449033 -0.69073130 -0.70392553 -0.31898020 [67] -1.91198258 -0.29793110 1.12044512 1.22944805 0.51354726 -0.52247707 [73] -0.32742670 0.76982671 -0.05726353 -0.11743106 -0.70524981 0.85808084 [79] 0.24742858 -0.36441707 -0.54644500 0.61407178 0.26205755 0.55242956 [85] 1.09870852 -0.18318148 -0.28937597 1.46821851 -1.69091524 0.05020974 [91] -0.70500168 -0.37186198 1.92957829 0.30775481 -0.18876755 0.19293858 [97] -1.03901531 -0.91487565 0.11963596 1.80288766 > rowMin(tmp2) [1] -0.59761580 -0.18028322 0.57735761 -0.37867568 0.18408781 -1.38297335 [7] 1.29997362 -0.30967331 -0.57565505 -1.58343402 0.10229502 0.25064253 [13] -0.88783755 0.88227202 1.05285837 -0.45000735 -1.17817779 0.71978547 [19] 0.15553964 -0.24152086 0.37446576 -1.13417828 1.89721687 -0.20962179 [25] 0.45142815 0.36479767 -1.52818514 1.05280915 -2.68650044 0.22015606 [31] 0.10253944 -0.28158537 -1.51613614 1.57438149 -1.32780513 1.04439943 [37] -1.81089650 0.01955781 0.34372138 -0.33672827 -2.05588347 -1.50103306 [43] 1.59022724 -0.11029119 0.06023960 0.21584462 -0.93638254 -1.12897490 [49] -1.68386426 -1.21371343 0.06267968 0.29478523 1.59016523 1.60125818 [55] -0.61737474 -0.33892767 -0.72436930 -1.57035862 -2.31226566 0.73485379 [61] 0.32917872 -0.48529204 -1.29449033 -0.69073130 -0.70392553 -0.31898020 [67] -1.91198258 -0.29793110 1.12044512 1.22944805 0.51354726 -0.52247707 [73] -0.32742670 0.76982671 -0.05726353 -0.11743106 -0.70524981 0.85808084 [79] 0.24742858 -0.36441707 -0.54644500 0.61407178 0.26205755 0.55242956 [85] 1.09870852 -0.18318148 -0.28937597 1.46821851 -1.69091524 0.05020974 [91] -0.70500168 -0.37186198 1.92957829 0.30775481 -0.18876755 0.19293858 [97] -1.03901531 -0.91487565 0.11963596 1.80288766 > > colMeans(tmp2) [1] -0.1423118 > colSums(tmp2) [1] -14.23118 > colVars(tmp2) [1] 0.9815502 > colSd(tmp2) [1] 0.9907322 > colMax(tmp2) [1] 1.929578 > colMin(tmp2) [1] -2.6865 > colMedians(tmp2) [1] -0.1817324 > colRanges(tmp2) [,1] [1,] -2.686500 [2,] 1.929578 > > 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] 2.81556827 4.75106055 1.57366651 1.60043444 0.07710191 3.25222681 [7] -0.78387828 6.21950431 1.17555820 -1.33316502 > colApply(tmp,quantile)[,1] [,1] [1,] -0.9061989 [2,] -0.1309054 [3,] 0.1313305 [4,] 0.5811109 [5,] 1.4606101 > > rowApply(tmp,sum) [1] 5.7402019 1.5419808 0.9718032 0.6658553 7.2103933 -2.6271951 [7] 2.0176347 4.3022518 -5.1097589 4.6349108 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 5 6 7 5 8 10 5 2 7 4 [2,] 7 2 1 3 9 9 7 9 9 5 [3,] 9 10 10 6 3 3 1 1 4 6 [4,] 6 7 2 10 4 2 10 8 8 1 [5,] 3 5 6 8 5 4 8 3 6 3 [6,] 4 3 4 9 2 6 3 7 10 7 [7,] 8 1 3 7 6 8 6 4 3 2 [8,] 2 9 8 2 10 5 9 6 5 10 [9,] 1 4 9 4 7 7 2 5 1 8 [10,] 10 8 5 1 1 1 4 10 2 9 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.6493660 1.3139657 -0.7959237 0.9994752 4.1119687 1.9785033 [7] 2.5777081 -2.1975290 -0.2219083 1.6882288 0.4596100 1.2655601 [13] 0.4768970 -1.2436270 4.4955233 2.7976822 1.0073687 -0.0239575 [19] -1.4667907 -1.5793998 > colApply(tmp,quantile)[,1] [,1] [1,] -1.0465387 [2,] -0.4961294 [3,] -0.4215224 [4,] 0.6562445 [5,] 0.6585801 > > rowApply(tmp,sum) [1] 10.6606744 -3.8067173 -0.5944043 0.4940456 8.2403907 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 11 15 4 4 5 [2,] 15 4 8 17 17 [3,] 18 2 12 5 2 [4,] 8 12 13 6 14 [5,] 12 9 17 19 18 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.6585801 1.1429813 1.6279447 0.2113913 0.9418055 0.173074876 [2,] 0.6562445 -1.2216114 -1.4813863 -0.1436437 -0.2850241 -0.150075732 [3,] -1.0465387 -0.3486007 0.3150623 0.3532491 1.1140043 1.585193335 [4,] -0.4215224 0.4697027 -0.2308934 -0.1370510 0.6806865 0.002558167 [5,] -0.4961294 1.2714939 -1.0266509 0.7155295 1.6604964 0.367752620 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.2162782 2.8308168 -1.2240691 -0.06720387 -0.9750037 1.26856929 [2,] 0.6858193 -0.9868719 -0.5333496 0.86422942 -0.2682435 0.09728953 [3,] 0.7434256 -2.1278820 -0.2051399 1.82521234 0.4207837 -0.32813312 [4,] 0.3254396 -1.0119712 1.4731205 0.25024976 0.6767599 -1.66400507 [5,] 0.6067454 -0.9016208 0.2675298 -1.18425884 0.6053135 1.89183943 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.2300221 -1.1574546 2.563861688 1.1339017 -0.37393850 1.08991918 [2,] -1.2662162 1.4383642 1.397533766 0.8938549 -1.06257886 -1.56613901 [3,] 0.8551913 -1.5462217 0.063499458 -0.4696334 1.82604260 -0.78297996 [4,] 0.3060337 0.3461137 0.007878525 -0.7421614 0.02683503 0.07882329 [5,] -0.6481339 -0.3244285 0.462749825 1.9817205 0.59100841 1.15641900 [,19] [,20] [1,] 0.34566486 -0.97646741 [2,] 0.09585081 -0.97076339 [3,] -2.07929943 -0.76163935 [4,] 0.10733359 -0.04988493 [5,] 0.06365945 1.17935530 > > > 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.18-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.18-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.18-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.18-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -0.9386341 0.6476103 0.3787831 -0.3061057 1.43714 0.9924514 0.5280047 col8 col9 col10 col11 col12 col13 col14 row1 2.434715 1.842677 1.264131 -1.017727 -0.1879584 -0.1466594 -1.380538 col15 col16 col17 col18 col19 col20 row1 0.4837749 -0.5851805 -0.6823658 1.182185 -0.3498344 1.07931 > tmp[,"col10"] col10 row1 1.2641305 row2 0.7949525 row3 -0.3319325 row4 -0.7952281 row5 -1.3986496 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -0.9386341 0.64761035 0.3787831 -0.30610567 1.437140 0.9924514 row5 -0.2434437 0.03126447 -0.3153760 0.04699508 -3.171436 0.4831072 col7 col8 col9 col10 col11 col12 col13 row1 0.5280047 2.434715 1.8426765 1.264131 -1.017727 -0.1879584 -0.1466594 row5 -0.5549300 1.504044 -0.2196149 -1.398650 1.667077 -1.1173566 -0.1129521 col14 col15 col16 col17 col18 col19 col20 row1 -1.3805377 0.4837749 -0.5851805 -0.6823658 1.182185 -0.3498344 1.0793101 row5 -0.3805195 0.2795453 0.5056599 -0.9789125 2.514772 1.9276315 -0.2758253 > tmp[,c("col6","col20")] col6 col20 row1 0.99245139 1.0793101 row2 -0.02490355 0.0997432 row3 0.35580616 0.2857731 row4 0.50997122 -0.1609551 row5 0.48310717 -0.2758253 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 0.9924514 1.0793101 row5 0.4831072 -0.2758253 > > > > > 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.43567 50.22338 48.80384 50.34834 49.65717 104.7702 49.23374 50.28155 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.59909 48.85226 50.00279 49.72654 49.17188 50.42592 49.44395 49.67976 col17 col18 col19 col20 row1 49.82744 50.14085 49.80152 104.1979 > tmp[,"col10"] col10 row1 48.85226 row2 31.43416 row3 29.07926 row4 29.03442 row5 50.61444 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.43567 50.22338 48.80384 50.34834 49.65717 104.7702 49.23374 50.28155 row5 50.40220 49.49415 50.49663 50.09661 50.93145 103.7894 49.63090 48.23326 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.59909 48.85226 50.00279 49.72654 49.17188 50.42592 49.44395 49.67976 row5 51.18990 50.61444 50.40009 49.84571 51.60041 49.69433 48.68732 50.68431 col17 col18 col19 col20 row1 49.82744 50.14085 49.80152 104.1979 row5 49.66565 49.92070 49.76759 106.1642 > tmp[,c("col6","col20")] col6 col20 row1 104.77024 104.19787 row2 73.95829 74.45859 row3 75.22007 75.78281 row4 74.07732 76.13486 row5 103.78937 106.16419 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.7702 104.1979 row5 103.7894 106.1642 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.7702 104.1979 row5 103.7894 106.1642 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -2.0740580 [2,] 1.4296796 [3,] 0.1166088 [4,] 0.1988293 [5,] 0.3066490 > tmp[,c("col17","col7")] col17 col7 [1,] -0.2258293 -0.74641233 [2,] 0.8692408 -0.83341139 [3,] 0.4756011 1.73110450 [4,] 0.3699618 0.02536126 [5,] 0.6616113 -1.34626632 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.5768559 0.1510223 [2,] -1.5546095 -1.2613939 [3,] -0.2462655 0.7259643 [4,] 0.9585422 0.3251000 [5,] -0.4173086 0.8190136 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.5768559 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.5768559 [2,] -1.5546095 > > > > 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.0001515957 -0.1993463 1.045891 -1.8926385 0.4677985 1.9969596 row1 0.9925197547 0.5923191 -0.255580 -0.6961683 -1.2087213 0.8854088 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.4374981 -1.5831675 -0.3412399 -1.7229564 -0.4685733 1.501257 -1.0742956 row1 -0.7153105 -0.3833862 -0.9879983 0.1422535 -1.7102352 1.133020 -0.2717187 [,14] [,15] [,16] [,17] [,18] [,19] row3 1.8858199 0.4710414 -1.2384746 -0.7438329 -0.7041771 -1.51129403 row1 -0.2041153 0.2394435 -0.4734131 -1.3317705 -0.5119637 0.05488833 [,20] row3 1.2398581 row1 0.5973418 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.1942892 -1.122233 -0.9047723 -0.08207641 0.7030371 0.08744085 0.08839903 [,8] [,9] [,10] row2 -0.7805117 -0.6052992 0.04199747 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 1.554292 0.7429763 1.674406 1.818247 -0.9101996 0.4399395 0.1367062 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.1758373 0.3126734 0.2520969 0.1112737 0.5887917 0.5073066 1.957232 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.310935 -1.411308 -0.2631952 -0.4280855 1.451459 -0.7412423 > > > 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: 0x600000d840c0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c6454a7168c" [2] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c6425b96cbf" [3] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c64309282f2" [4] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c6462d2f6c7" [5] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c64847b581" [6] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c641bdd2c66" [7] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c64558dead4" [8] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c645834302d" [9] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c644a470798" [10] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c647d43b240" [11] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c64676bc7ff" [12] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c6455176b64" [13] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c64748b9de0" [14] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c647a2a18e6" [15] "/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests/BM6c6461c8e2b2" > > > ### 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: 0x600000d5c000> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x600000d5c000> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.18-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x600000d5c000> > rowMedians(tmp) [1] -0.018445577 -0.185186205 -0.505826879 0.930807492 -0.094236922 [6] -0.256472645 0.322643262 0.593560061 -0.006058531 -0.314101889 [11] -0.806730301 0.135867826 -0.415830246 0.068232008 0.022773568 [16] 0.208964997 -0.041157287 0.131292597 0.411642512 -0.025970320 [21] 0.081011544 0.147401069 0.224996645 -0.362058725 0.224610195 [26] 0.283687131 0.192949608 0.220177771 0.593655738 0.376618917 [31] -0.265553127 0.577518352 0.641862813 -0.343545362 -0.096194019 [36] 0.273860248 -0.151872695 0.167344138 -0.252759596 0.170343841 [41] 0.199750372 -0.204622077 -0.217077994 -0.087296003 -0.109894419 [46] 0.054118513 -0.784074692 0.135509092 0.151466870 0.199861269 [51] -0.563043339 -0.311736333 0.091786519 -0.129561836 -0.197869706 [56] -0.113544244 -0.070513815 0.173226139 -0.276242288 -0.035605531 [61] 0.067431426 0.312758176 -0.041270245 -0.110340585 0.354900106 [66] 0.450375062 -0.205620051 0.034329367 0.392386572 -0.595953897 [71] -0.024249263 0.208177212 -0.399285189 -0.438856552 0.372959821 [76] 0.097276458 -0.348647333 0.276603028 0.144113062 0.918279625 [81] 0.191498320 -0.224851608 -0.499270688 -0.121173482 -0.007117859 [86] 0.226332855 0.122097761 0.062299112 -0.263041502 0.397492709 [91] 0.037854595 -0.130131737 0.095853279 0.136182581 0.224011258 [96] 0.146367482 -0.391832142 -0.489577532 0.033493671 0.523981671 [101] 0.200380203 -0.062888935 -0.194970874 0.214935379 -0.132222949 [106] 0.044261009 -0.279362928 0.292202465 0.354017258 0.479074825 [111] -0.104604825 -0.108555797 0.372024059 0.161427883 -0.655475761 [116] -0.041812727 -0.411702746 -0.458240304 0.462463882 0.796514342 [121] 0.439619684 -0.337479310 0.114775120 -0.420260826 -0.147947923 [126] -0.244771637 -0.167952255 -0.335857137 -0.693287413 0.198523663 [131] 0.205481946 0.087728815 -0.026339380 0.153187095 0.775427059 [136] -0.009487582 0.363044606 0.270480652 0.111139552 0.334283051 [141] -0.584940595 -0.482762296 -0.423075949 -0.042982767 0.103245943 [146] -0.128322151 -0.083288156 0.500740465 -0.342347435 0.100099653 [151] 0.282372509 0.517604754 0.055176291 -0.426561415 0.316969772 [156] 0.543175996 -0.005685916 -1.030467327 0.053782796 0.422644765 [161] -0.322921555 -0.373274465 -0.304146236 0.121005415 0.040180035 [166] -0.182601991 0.460829818 -0.375988627 -0.030539974 -0.049047509 [171] -0.078837607 0.160859601 0.061870181 0.030498328 0.139540241 [176] 0.087781606 0.131740567 0.189324220 -0.140996394 -0.136168452 [181] -0.357949823 -0.636435122 0.139286688 0.265746954 -0.543550924 [186] -0.115979225 -0.261659049 0.437735252 0.152484266 -0.215758450 [191] -0.149499423 0.323612716 0.168167496 -0.665613049 0.150938857 [196] 0.206058876 0.198990538 0.031187210 0.674956143 0.155966946 [201] 0.160078200 -0.490646449 -0.234872975 -0.147922275 0.330008111 [206] 0.098393678 -0.315763148 -0.054442204 0.057004876 -0.197281443 [211] 0.499143680 -0.118028406 0.169645022 -0.049702846 -0.507688241 [216] 0.111720844 -0.351329239 -0.281848387 0.700559915 0.169850906 [221] 0.189204378 -0.237638259 0.123904129 -0.073980764 -0.476972584 [226] 0.392597383 -0.068452485 -0.011020186 0.162890263 -0.061244513 > > proc.time() user system elapsed 2.714 15.821 20.573
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.3.2 Patched (2023-11-01 r85457) -- "Eye Holes" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 (64-bit) 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: 0x600003ed82a0> > .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: 0x600003ed82a0> > .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: 0x600003ed82a0> > .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: 0x600003ed82a0> > 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: 0x600003e84000> > .Call("R_bm_AddColumn",P) <pointer: 0x600003e84000> > .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: 0x600003e84000> > .Call("R_bm_AddColumn",P) <pointer: 0x600003e84000> > .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: 0x600003e84000> > 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: 0x600003ed0060> > .Call("R_bm_AddColumn",P) <pointer: 0x600003ed0060> > .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: 0x600003ed0060> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600003ed0060> > .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: 0x600003ed0060> > > .Call("R_bm_RowMode",P) <pointer: 0x600003ed0060> > .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: 0x600003ed0060> > > .Call("R_bm_ColMode",P) <pointer: 0x600003ed0060> > .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: 0x600003ed0060> > 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: 0x600003ed01e0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600003ed01e0> > .Call("R_bm_AddColumn",P) <pointer: 0x600003ed01e0> > .Call("R_bm_AddColumn",P) <pointer: 0x600003ed01e0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile7381211040ac" "BufferedMatrixFile73813e3f1b29" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile7381211040ac" "BufferedMatrixFile73813e3f1b29" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600003e9c120> > .Call("R_bm_AddColumn",P) <pointer: 0x600003e9c120> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600003e9c120> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600003e9c120> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600003e9c120> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600003e9c120> > .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: 0x600003e9c300> > .Call("R_bm_AddColumn",P) <pointer: 0x600003e9c300> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600003e9c300> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600003e9c300> > 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: 0x600003efc240> > .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: 0x600003efc240> > rm(P) > > proc.time() user system elapsed 0.370 0.161 0.525
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.3.2 Patched (2023-11-01 r85457) -- "Eye Holes" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 (64-bit) 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.333 0.090 0.422