Back to Multiple platform build/check report for BioC 3.19: simplified long |
|
This page was generated on 2024-03-04 11:38:56 -0500 (Mon, 04 Mar 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) | x86_64 | R Under development (unstable) (2024-01-16 r85808) -- "Unsuffered Consequences" | 4676 |
palomino3 | Windows Server 2022 Datacenter | x64 | R Under development (unstable) (2024-01-14 r85805 ucrt) -- "Unsuffered Consequences" | 4414 |
merida1 | macOS 12.7.1 Monterey | x86_64 | R Under development (unstable) (2024-01-16 r85808) -- "Unsuffered Consequences" | 4441 |
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) | aarch64 | R Under development (unstable) (2024-01-16 r85812) -- "Unsuffered Consequences" | 4417 |
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/2251 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.67.0 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 22.04.3 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino3 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
merida1 | macOS 12.7.1 Monterey / x86_64 | 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.67.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.67.0.tar.gz |
StartedAt: 2024-03-02 01:07:00 -0500 (Sat, 02 Mar 2024) |
EndedAt: 2024-03-02 01:08:18 -0500 (Sat, 02 Mar 2024) |
EllapsedTime: 78.0 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.67.0.tar.gz ### ############################################################################## ############################################################################## * using log directory ‘/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck’ * using R Under development (unstable) (2024-01-16 r85808) * using platform: x86_64-apple-darwin20 * R was compiled by Apple clang version 14.0.0 (clang-1400.0.29.202) GNU Fortran (GCC) 12.2.0 * running under: macOS Monterey 12.7.1 * using session charset: UTF-8 * using option ‘--no-vignettes’ * checking for file ‘BufferedMatrix/DESCRIPTION’ ... OK * this is package ‘BufferedMatrix’ version ‘1.67.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BufferedMatrix’ can be installed ... WARNING Found the following significant warnings: doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] See ‘/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking 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 ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs See ‘/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/00check.log’ for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R Under development (unstable) (2024-01-16 r85808) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix", "BufferedMatrix", .libPaths());.C("dbm_c_tester",integer(1)) Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 Adding Additional Column Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 0.000000 1.000000 2.000000 3.000000 4.000000 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 0.000000 2.000000 3.000000 4.000000 5.000000 6.000000 0.000000 3.000000 4.000000 5.000000 6.000000 7.000000 0.000000 4.000000 5.000000 6.000000 7.000000 8.000000 0.000000 Reassigning values 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 3 Buffer Cols: 3 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Activating Row Buffer In row mode: 1 1.000000 6.000000 11.000000 16.000000 21.000000 26.000000 2.000000 7.000000 12.000000 17.000000 22.000000 27.000000 3.000000 8.000000 13.000000 18.000000 23.000000 28.000000 4.000000 9.000000 14.000000 19.000000 24.000000 29.000000 5.000000 10.000000 15.000000 20.000000 25.000000 30.000000 Squaring Last Column 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 5.000000 10.000000 15.000000 20.000000 25.000000 900.000000 Square rooting Last Row, then turing off Row Buffer In row mode: 0 Checking on value that should be not be in column buffer2.236068 1.000000 6.000000 11.000000 16.000000 21.000000 676.000000 2.000000 7.000000 12.000000 17.000000 22.000000 729.000000 3.000000 8.000000 13.000000 18.000000 23.000000 784.000000 4.000000 9.000000 14.000000 19.000000 24.000000 841.000000 2.236068 3.162278 3.872983 4.472136 5.000000 30.000000 Single Indexing. Assign each value its square 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Resizing Buffers Smaller Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 1.000000 36.000000 121.000000 256.000000 441.000000 676.000000 4.000000 49.000000 144.000000 289.000000 484.000000 729.000000 9.000000 64.000000 169.000000 324.000000 529.000000 784.000000 16.000000 81.000000 196.000000 361.000000 576.000000 841.000000 25.000000 100.000000 225.000000 400.000000 625.000000 900.000000 Activating Row Mode. Resizing Buffers Checking dimensions Rows: 5 Cols: 6 Buffer Rows: 1 Buffer Cols: 1 Activating ReadOnly Mode. The results of assignment is: 0 Printing matrix reversed. 900.000000 625.000000 400.000000 225.000000 100.000000 25.000000 841.000000 576.000000 361.000000 196.000000 81.000000 16.000000 784.000000 529.000000 324.000000 169.000000 64.000000 9.000000 729.000000 484.000000 289.000000 144.000000 49.000000 -30.000000 676.000000 441.000000 256.000000 121.000000 -20.000000 -10.000000 [[1]] [1] 0 > > proc.time() user system elapsed 0.587 0.201 0.843
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2024-01-16 r85808) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > > ### this is used to control how many repetitions in something below > ### higher values result in more checks. > nreps <-100 ##20000 > > > ## test creation and some simple assignments and subsetting operations > > ## first on single elements > tmp <- createBufferedMatrix(1000,10) > > tmp[10,5] [1] 0 > tmp[10,5] <- 10 > tmp[10,5] [1] 10 > tmp[10,5] <- 12.445 > tmp[10,5] [1] 12.445 > > > > ## now testing accessing multiple elements > tmp2 <- createBufferedMatrix(10,20) > > > tmp2[3,1] <- 51.34 > tmp2[9,2] <- 9.87654 > tmp2[,1:2] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[,-(3:20)] [,1] [,2] [1,] 0.00 0.00000 [2,] 0.00 0.00000 [3,] 51.34 0.00000 [4,] 0.00 0.00000 [5,] 0.00 0.00000 [6,] 0.00 0.00000 [7,] 0.00 0.00000 [8,] 0.00 0.00000 [9,] 0.00 9.87654 [10,] 0.00 0.00000 > tmp2[3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 51.34 0 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 > tmp2[-3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 0 > tmp2[2,1:3] [,1] [,2] [,3] [1,] 0 0 0 > tmp2[3:9,1:3] [,1] [,2] [,3] [1,] 51.34 0.00000 0 [2,] 0.00 0.00000 0 [3,] 0.00 0.00000 0 [4,] 0.00 0.00000 0 [5,] 0.00 0.00000 0 [6,] 0.00 0.00000 0 [7,] 0.00 9.87654 0 > tmp2[-4,-4] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [2,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [3,] 51.34 0.00000 0 0 0 0 0 0 0 0 0 0 0 [4,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [5,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [6,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [7,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [8,] 0.00 9.87654 0 0 0 0 0 0 0 0 0 0 0 [9,] 0.00 0.00000 0 0 0 0 0 0 0 0 0 0 0 [,14] [,15] [,16] [,17] [,18] [,19] [1,] 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 [3,] 0 0 0 0 0 0 [4,] 0 0 0 0 0 0 [5,] 0 0 0 0 0 0 [6,] 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 [8,] 0 0 0 0 0 0 [9,] 0 0 0 0 0 0 > > ## now testing accessing/assigning multiple elements > tmp3 <- createBufferedMatrix(10,10) > > for (i in 1:10){ + for (j in 1:10){ + tmp3[i,j] <- (j-1)*10 + i + } + } > > tmp3[2:4,2:4] [,1] [,2] [,3] [1,] 12 22 32 [2,] 13 23 33 [3,] 14 24 34 > tmp3[c(-10),c(2:4,2:4,10,1,2,1:10,10:1)] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 11 21 31 11 21 31 91 1 11 1 11 21 31 [2,] 12 22 32 12 22 32 92 2 12 2 12 22 32 [3,] 13 23 33 13 23 33 93 3 13 3 13 23 33 [4,] 14 24 34 14 24 34 94 4 14 4 14 24 34 [5,] 15 25 35 15 25 35 95 5 15 5 15 25 35 [6,] 16 26 36 16 26 36 96 6 16 6 16 26 36 [7,] 17 27 37 17 27 37 97 7 17 7 17 27 37 [8,] 18 28 38 18 28 38 98 8 18 8 18 28 38 [9,] 19 29 39 19 29 39 99 9 19 9 19 29 39 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 41 51 61 71 81 91 91 81 71 61 51 41 [2,] 42 52 62 72 82 92 92 82 72 62 52 42 [3,] 43 53 63 73 83 93 93 83 73 63 53 43 [4,] 44 54 64 74 84 94 94 84 74 64 54 44 [5,] 45 55 65 75 85 95 95 85 75 65 55 45 [6,] 46 56 66 76 86 96 96 86 76 66 56 46 [7,] 47 57 67 77 87 97 97 87 77 67 57 47 [8,] 48 58 68 78 88 98 98 88 78 68 58 48 [9,] 49 59 69 79 89 99 99 89 79 69 59 49 [,26] [,27] [,28] [,29] [1,] 31 21 11 1 [2,] 32 22 12 2 [3,] 33 23 13 3 [4,] 34 24 14 4 [5,] 35 25 15 5 [6,] 36 26 16 6 [7,] 37 27 17 7 [8,] 38 28 18 8 [9,] 39 29 19 9 > tmp3[-c(1:5),-c(6:10)] [,1] [,2] [,3] [,4] [,5] [1,] 6 16 26 36 46 [2,] 7 17 27 37 47 [3,] 8 18 28 38 48 [4,] 9 19 29 39 49 [5,] 10 20 30 40 50 > > ## assignment of whole columns > tmp3[,1] <- c(1:10*100.0) > tmp3[,1:2] <- tmp3[,1:2]*100 > tmp3[,1:2] <- tmp3[,2:1] > tmp3[,1:2] [,1] [,2] [1,] 1100 1e+04 [2,] 1200 2e+04 [3,] 1300 3e+04 [4,] 1400 4e+04 [5,] 1500 5e+04 [6,] 1600 6e+04 [7,] 1700 7e+04 [8,] 1800 8e+04 [9,] 1900 9e+04 [10,] 2000 1e+05 > > > tmp3[,-1] <- tmp3[,1:9] > tmp3[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1100 1100 1e+04 21 31 41 51 61 71 81 [2,] 1200 1200 2e+04 22 32 42 52 62 72 82 [3,] 1300 1300 3e+04 23 33 43 53 63 73 83 [4,] 1400 1400 4e+04 24 34 44 54 64 74 84 [5,] 1500 1500 5e+04 25 35 45 55 65 75 85 [6,] 1600 1600 6e+04 26 36 46 56 66 76 86 [7,] 1700 1700 7e+04 27 37 47 57 67 77 87 [8,] 1800 1800 8e+04 28 38 48 58 68 78 88 [9,] 1900 1900 9e+04 29 39 49 59 69 79 89 [10,] 2000 2000 1e+05 30 40 50 60 70 80 90 > > tmp3[,1:2] <- rep(1,10) > tmp3[,1:2] <- rep(1,20) > tmp3[,1:2] <- matrix(c(1:5),1,5) > > tmp3[,-c(1:8)] <- matrix(c(1:5),1,5) > > tmp3[1,] <- 1:10 > tmp3[1,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 > tmp3[-1,] <- c(1,2) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 2 1 2 1 2 1 2 1 2 1 [10,] 1 2 1 2 1 2 1 2 1 2 > tmp3[-c(1:8),] <- matrix(c(1:5),1,5) > tmp3[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 3 4 5 6 7 8 9 10 [2,] 1 2 1 2 1 2 1 2 1 2 [3,] 2 1 2 1 2 1 2 1 2 1 [4,] 1 2 1 2 1 2 1 2 1 2 [5,] 2 1 2 1 2 1 2 1 2 1 [6,] 1 2 1 2 1 2 1 2 1 2 [7,] 2 1 2 1 2 1 2 1 2 1 [8,] 1 2 1 2 1 2 1 2 1 2 [9,] 1 3 5 2 4 1 3 5 2 4 [10,] 2 4 1 3 5 2 4 1 3 5 > > > tmp3[1:2,1:2] <- 5555.04 > tmp3[-(1:2),1:2] <- 1234.56789 > > > > ## testing accessors for the directory and prefix > directory(tmp3) [1] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) Ncells 473445 25.3 1033281 55.2 NA 638837 34.2 Vcells 877115 6.7 8388608 64.0 65536 2074449 15.9 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Sat Mar 2 01:07:34 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] "Sat Mar 2 01:07:35 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: 0x6000011c4000> > > > > 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] "Sat Mar 2 01:07:42 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] "Sat Mar 2 01:07:44 2024" > > ColMode(tmp2) <pointer: 0x6000011c4000> > > > > ### Now testing assignments > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + + new.data <- rnorm(20) + tmp2[which.row,] <- new.data + test.matrix[which.row,] <- new.data + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + new.data <- rnorm(10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[,which.col] <- new.data + test.matrix[,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[,prev.col] == test.matrix[,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.col <- which.col + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + new.data <- matrix(rnorm(50),5,10) + tmp2[which.row,] <- new.data + test.matrix[which.row,]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,] == test.matrix[prev.row,])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + } > > > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + new.data <- matrix(rnorm(25),5,5) + tmp2[which.row,which.col] <- new.data + test.matrix[which.row,which.col]<- new.data + + if (rep > 1){ + if (!all(tmp2[prev.row,prev.col] == test.matrix[prev.row,prev.col])){ + cat("incorrect agreement") + break; + } + } + prev.row <- which.row + prev.col <- which.col + } > > > > > ### > ### > ### testing some more functions > ### > > > > ## duplication function > tmp5 <- duplicate(tmp2) > > # making sure really did copy everything. > tmp5[1,1] <- tmp5[1,1] +100.00 > > if (tmp5[1,1] == tmp2[1,1]){ + stop("Problem with duplication") + } > > > > > ### testing elementwise applying of functions > > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.43287635 0.5753648 0.6141713 -0.644356294 [2,] -0.04169401 0.6370478 0.1347006 0.327916953 [3,] 0.69152828 0.7694964 -0.9608797 -0.405427930 [4,] 0.21831527 -0.3034190 0.7262757 0.007158516 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.43287635 0.5753648 0.6141713 0.644356294 [2,] 0.04169401 0.6370478 0.1347006 0.327916953 [3,] 0.69152828 0.7694964 0.9608797 0.405427930 [4,] 0.21831527 0.3034190 0.7262757 0.007158516 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9716035 0.7585281 0.7836908 0.80271807 [2,] 0.2041911 0.7981528 0.3670157 0.57264033 [3,] 0.8315818 0.8772094 0.9802447 0.63673223 [4,] 0.4672422 0.5508348 0.8522181 0.08460801 > > my.function <- function(x,power){ + (x+5)^power + } > > ewApply(tmp5,my.function,power=2) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.14891 33.16065 33.45108 33.67154 [2,] 27.08360 33.61858 28.80486 31.05432 [3,] 34.00735 34.54159 35.76333 31.77275 [4,] 29.89074 30.81177 34.24846 25.85324 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x6000011c0000> > exp(tmp5) <pointer: 0x6000011c0000> > log(tmp5,2) <pointer: 0x6000011c0000> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.5366 > Min(tmp5) [1] 53.81013 > mean(tmp5) [1] 72.944 > Sum(tmp5) [1] 14588.8 > Var(tmp5) [1] 855.291 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 91.32434 67.40045 73.59269 73.47786 68.88862 75.12386 70.18941 69.97771 [9] 66.80619 72.65888 > rowSums(tmp5) [1] 1826.487 1348.009 1471.854 1469.557 1377.772 1502.477 1403.788 1399.554 [9] 1336.124 1453.178 > rowVars(tmp5) [1] 7868.72487 77.00056 62.30232 68.60414 68.49157 67.76248 [7] 94.31948 89.83727 28.78359 64.20923 > rowSd(tmp5) [1] 88.705833 8.774996 7.893182 8.282762 8.275963 8.231797 9.711822 [8] 9.478253 5.365034 8.013066 > rowMax(tmp5) [1] 466.53659 84.45766 94.15413 89.63945 84.09276 87.00800 88.70769 [8] 84.73782 75.11542 87.82724 > rowMin(tmp5) [1] 54.41540 55.27059 60.65479 53.81013 57.05038 59.71039 55.29901 55.60621 [9] 57.98393 55.23337 > > colMeans(tmp5) [1] 107.14878 69.55127 68.14688 67.64191 70.11734 68.96988 69.14134 [8] 72.97916 71.14066 71.66205 72.91632 68.60121 69.06428 75.37078 [15] 69.84991 70.80281 76.16655 70.94789 73.35049 75.31049 > colSums(tmp5) [1] 1071.4878 695.5127 681.4688 676.4191 701.1734 689.6988 691.4134 [8] 729.7916 711.4066 716.6205 729.1632 686.0121 690.6428 753.7078 [15] 698.4991 708.0281 761.6655 709.4789 733.5049 753.1049 > colVars(tmp5) [1] 15994.92820 41.30486 50.37790 39.25805 90.00877 36.38038 [7] 43.25179 44.40501 126.52238 136.94801 110.18995 86.26192 [13] 77.41667 48.99530 86.16195 75.32368 156.68383 28.15874 [19] 38.81361 100.22498 > colSd(tmp5) [1] 126.471057 6.426885 7.097739 6.265624 9.487295 6.031615 [7] 6.576609 6.663708 11.248217 11.702479 10.497140 9.287730 [13] 8.798675 6.999664 9.282346 8.678922 12.517341 5.306481 [19] 6.230057 10.011242 > colMax(tmp5) [1] 466.53659 82.91523 80.87205 76.09950 86.46156 75.99795 77.04796 [8] 84.02295 86.24110 89.63945 94.15413 81.74890 83.37078 88.70769 [15] 84.73782 82.40164 90.45871 80.40080 81.93003 85.70632 > colMin(tmp5) [1] 56.37098 57.98393 56.84940 53.81013 59.09057 57.94622 56.06745 62.61503 [9] 55.23337 55.27059 59.71039 55.29901 54.41540 65.38584 57.34511 56.13617 [17] 56.78650 62.68037 61.73702 57.31737 > > > ### 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] 91.32434 67.40045 73.59269 73.47786 68.88862 75.12386 70.18941 69.97771 [9] 66.80619 NA > rowSums(tmp5) [1] 1826.487 1348.009 1471.854 1469.557 1377.772 1502.477 1403.788 1399.554 [9] 1336.124 NA > rowVars(tmp5) [1] 7868.72487 77.00056 62.30232 68.60414 68.49157 67.76248 [7] 94.31948 89.83727 28.78359 66.96202 > rowSd(tmp5) [1] 88.705833 8.774996 7.893182 8.282762 8.275963 8.231797 9.711822 [8] 9.478253 5.365034 8.183032 > rowMax(tmp5) [1] 466.53659 84.45766 94.15413 89.63945 84.09276 87.00800 88.70769 [8] 84.73782 75.11542 NA > rowMin(tmp5) [1] 54.41540 55.27059 60.65479 53.81013 57.05038 59.71039 55.29901 55.60621 [9] 57.98393 NA > > colMeans(tmp5) [1] 107.14878 69.55127 68.14688 67.64191 70.11734 68.96988 69.14134 [8] 72.97916 71.14066 NA 72.91632 68.60121 69.06428 75.37078 [15] 69.84991 70.80281 76.16655 70.94789 73.35049 75.31049 > colSums(tmp5) [1] 1071.4878 695.5127 681.4688 676.4191 701.1734 689.6988 691.4134 [8] 729.7916 711.4066 NA 729.1632 686.0121 690.6428 753.7078 [15] 698.4991 708.0281 761.6655 709.4789 733.5049 753.1049 > colVars(tmp5) [1] 15994.92820 41.30486 50.37790 39.25805 90.00877 36.38038 [7] 43.25179 44.40501 126.52238 NA 110.18995 86.26192 [13] 77.41667 48.99530 86.16195 75.32368 156.68383 28.15874 [19] 38.81361 100.22498 > colSd(tmp5) [1] 126.471057 6.426885 7.097739 6.265624 9.487295 6.031615 [7] 6.576609 6.663708 11.248217 NA 10.497140 9.287730 [13] 8.798675 6.999664 9.282346 8.678922 12.517341 5.306481 [19] 6.230057 10.011242 > colMax(tmp5) [1] 466.53659 82.91523 80.87205 76.09950 86.46156 75.99795 77.04796 [8] 84.02295 86.24110 NA 94.15413 81.74890 83.37078 88.70769 [15] 84.73782 82.40164 90.45871 80.40080 81.93003 85.70632 > colMin(tmp5) [1] 56.37098 57.98393 56.84940 53.81013 59.09057 57.94622 56.06745 62.61503 [9] 55.23337 NA 59.71039 55.29901 54.41540 65.38584 57.34511 56.13617 [17] 56.78650 62.68037 61.73702 57.31737 > > Max(tmp5,na.rm=TRUE) [1] 466.5366 > Min(tmp5,na.rm=TRUE) [1] 53.81013 > mean(tmp5,na.rm=TRUE) [1] 72.92668 > Sum(tmp5,na.rm=TRUE) [1] 14512.41 > Var(tmp5,na.rm=TRUE) [1] 859.5504 > > rowMeans(tmp5,na.rm=TRUE) [1] 91.32434 67.40045 73.59269 73.47786 68.88862 75.12386 70.18941 69.97771 [9] 66.80619 72.46247 > rowSums(tmp5,na.rm=TRUE) [1] 1826.487 1348.009 1471.854 1469.557 1377.772 1502.477 1403.788 1399.554 [9] 1336.124 1376.787 > rowVars(tmp5,na.rm=TRUE) [1] 7868.72487 77.00056 62.30232 68.60414 68.49157 67.76248 [7] 94.31948 89.83727 28.78359 66.96202 > rowSd(tmp5,na.rm=TRUE) [1] 88.705833 8.774996 7.893182 8.282762 8.275963 8.231797 9.711822 [8] 9.478253 5.365034 8.183032 > rowMax(tmp5,na.rm=TRUE) [1] 466.53659 84.45766 94.15413 89.63945 84.09276 87.00800 88.70769 [8] 84.73782 75.11542 87.82724 > rowMin(tmp5,na.rm=TRUE) [1] 54.41540 55.27059 60.65479 53.81013 57.05038 59.71039 55.29901 55.60621 [9] 57.98393 55.23337 > > colMeans(tmp5,na.rm=TRUE) [1] 107.14878 69.55127 68.14688 67.64191 70.11734 68.96988 69.14134 [8] 72.97916 71.14066 71.13665 72.91632 68.60121 69.06428 75.37078 [15] 69.84991 70.80281 76.16655 70.94789 73.35049 75.31049 > colSums(tmp5,na.rm=TRUE) [1] 1071.4878 695.5127 681.4688 676.4191 701.1734 689.6988 691.4134 [8] 729.7916 711.4066 640.2299 729.1632 686.0121 690.6428 753.7078 [15] 698.4991 708.0281 761.6655 709.4789 733.5049 753.1049 > colVars(tmp5,na.rm=TRUE) [1] 15994.92820 41.30486 50.37790 39.25805 90.00877 36.38038 [7] 43.25179 44.40501 126.52238 150.96101 110.18995 86.26192 [13] 77.41667 48.99530 86.16195 75.32368 156.68383 28.15874 [19] 38.81361 100.22498 > colSd(tmp5,na.rm=TRUE) [1] 126.471057 6.426885 7.097739 6.265624 9.487295 6.031615 [7] 6.576609 6.663708 11.248217 12.286619 10.497140 9.287730 [13] 8.798675 6.999664 9.282346 8.678922 12.517341 5.306481 [19] 6.230057 10.011242 > colMax(tmp5,na.rm=TRUE) [1] 466.53659 82.91523 80.87205 76.09950 86.46156 75.99795 77.04796 [8] 84.02295 86.24110 89.63945 94.15413 81.74890 83.37078 88.70769 [15] 84.73782 82.40164 90.45871 80.40080 81.93003 85.70632 > colMin(tmp5,na.rm=TRUE) [1] 56.37098 57.98393 56.84940 53.81013 59.09057 57.94622 56.06745 62.61503 [9] 55.23337 55.27059 59.71039 55.29901 54.41540 65.38584 57.34511 56.13617 [17] 56.78650 62.68037 61.73702 57.31737 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 91.32434 67.40045 73.59269 73.47786 68.88862 75.12386 70.18941 69.97771 [9] 66.80619 NaN > rowSums(tmp5,na.rm=TRUE) [1] 1826.487 1348.009 1471.854 1469.557 1377.772 1502.477 1403.788 1399.554 [9] 1336.124 0.000 > rowVars(tmp5,na.rm=TRUE) [1] 7868.72487 77.00056 62.30232 68.60414 68.49157 67.76248 [7] 94.31948 89.83727 28.78359 NA > rowSd(tmp5,na.rm=TRUE) [1] 88.705833 8.774996 7.893182 8.282762 8.275963 8.231797 9.711822 [8] 9.478253 5.365034 NA > rowMax(tmp5,na.rm=TRUE) [1] 466.53659 84.45766 94.15413 89.63945 84.09276 87.00800 88.70769 [8] 84.73782 75.11542 NA > rowMin(tmp5,na.rm=TRUE) [1] 54.41540 55.27059 60.65479 53.81013 57.05038 59.71039 55.29901 55.60621 [9] 57.98393 NA > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 111.01763 69.74560 66.73298 67.00077 70.59187 68.69590 68.70222 [8] 72.93281 72.90814 NaN 72.44948 68.88932 68.24634 74.74292 [15] 70.02331 72.43244 74.87092 70.53452 72.39721 75.46257 > colSums(tmp5,na.rm=TRUE) [1] 999.1587 627.7104 600.5968 603.0069 635.3268 618.2631 618.3200 656.3953 [9] 656.1733 0.0000 652.0453 620.0038 614.2171 672.6863 630.2098 651.8919 [17] 673.8383 634.8107 651.5748 679.1631 > colVars(tmp5,na.rm=TRUE) [1] 17825.90393 46.04314 34.18488 39.54093 98.72658 40.08348 [7] 46.48897 49.93146 107.19297 NA 121.51185 96.11087 [13] 79.56736 50.68492 96.59391 54.86270 157.38435 29.75626 [19] 33.44190 112.49292 > colSd(tmp5,na.rm=TRUE) [1] 133.513684 6.785510 5.846784 6.288158 9.936125 6.331152 [7] 6.818282 7.066220 10.353404 NA 11.023241 9.803615 [13] 8.920054 7.119334 9.828220 7.406936 12.545292 5.454930 [19] 5.782897 10.606268 > colMax(tmp5,na.rm=TRUE) [1] 466.53659 82.91523 74.43668 76.09950 86.46156 75.99795 77.04796 [8] 84.02295 86.24110 -Inf 94.15413 81.74890 83.37078 88.70769 [15] 84.73782 82.40164 90.45871 80.40080 79.31674 85.70632 > colMin(tmp5,na.rm=TRUE) [1] 56.37098 57.98393 56.84940 53.81013 59.09057 57.94622 56.06745 62.61503 [9] 57.05038 Inf 59.71039 55.29901 54.41540 65.38584 57.34511 61.45934 [17] 56.78650 62.68037 61.73702 57.31737 > > > > > 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] 323.7676 328.2628 210.2415 166.6495 151.8955 252.0184 237.1729 156.6495 [9] 245.4650 323.4996 > apply(copymatrix,1,var,na.rm=TRUE) [1] 323.7676 328.2628 210.2415 166.6495 151.8955 252.0184 237.1729 156.6495 [9] 245.4650 323.4996 > > > > 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 5.684342e-14 -5.684342e-14 1.705303e-13 -1.421085e-14 [6] 2.273737e-13 1.136868e-13 0.000000e+00 0.000000e+00 5.684342e-14 [11] -1.705303e-13 1.136868e-13 1.421085e-14 2.842171e-14 0.000000e+00 [16] 5.684342e-14 1.705303e-13 -2.273737e-13 -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) + } 2 14 10 7 6 3 2 8 1 3 8 18 1 1 3 11 3 18 1 3 3 15 1 3 9 10 6 10 7 14 1 17 4 8 4 4 6 3 8 11 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.475116 > Min(tmp) [1] -2.574081 > mean(tmp) [1] -0.1395397 > Sum(tmp) [1] -13.95397 > Var(tmp) [1] 1.028677 > > rowMeans(tmp) [1] -0.1395397 > rowSums(tmp) [1] -13.95397 > rowVars(tmp) [1] 1.028677 > rowSd(tmp) [1] 1.014237 > rowMax(tmp) [1] 2.475116 > rowMin(tmp) [1] -2.574081 > > colMeans(tmp) [1] -0.99940087 -0.38240492 -0.08248278 1.29029579 -1.90410726 0.65289026 [7] -0.90968953 -0.91716243 2.01666371 0.90256023 -0.66276936 0.77571512 [13] 0.45011096 0.83480833 0.39654423 -0.84464366 -0.98893965 -1.38484852 [19] -1.50335665 -0.86129245 -1.74430796 -1.82620026 0.32111846 0.76952834 [25] 0.70653447 -0.31592461 -1.25224080 -1.45899903 1.29896013 -0.66092106 [31] 0.49508039 0.51132941 -1.70881379 -0.89148810 0.28882119 1.58695404 [37] 2.32040311 0.05982141 2.20284498 -1.44603396 -0.51390622 0.39980605 [43] -0.72796823 -0.32569027 -0.74590685 -0.39777894 0.02944292 0.27926463 [49] 0.29514141 -0.77564093 0.98006874 -0.18124801 -0.71029470 -1.12659933 [55] -1.18620517 0.49489830 0.23573340 0.79609374 0.37617165 0.03852248 [61] -1.15144226 -0.26476395 0.40625667 -2.57408150 -0.96607248 -1.81742301 [67] 0.63376677 -0.44912940 0.92560092 -0.15049526 -0.66562413 0.76565568 [73] -0.35051332 0.41694367 1.09868716 -0.29864700 0.17696818 -1.22854445 [79] 1.17803685 -0.89763205 -0.19436286 0.02324336 -0.15077905 0.90440179 [85] -0.49025052 -0.02920052 -1.06083735 0.80069185 0.35338067 -0.77397980 [91] -1.45639743 1.70389596 2.47511631 -0.74125245 0.05264514 0.69454029 [97] -0.98418849 -0.16652402 -2.04009277 -0.03042827 > colSums(tmp) [1] -0.99940087 -0.38240492 -0.08248278 1.29029579 -1.90410726 0.65289026 [7] -0.90968953 -0.91716243 2.01666371 0.90256023 -0.66276936 0.77571512 [13] 0.45011096 0.83480833 0.39654423 -0.84464366 -0.98893965 -1.38484852 [19] -1.50335665 -0.86129245 -1.74430796 -1.82620026 0.32111846 0.76952834 [25] 0.70653447 -0.31592461 -1.25224080 -1.45899903 1.29896013 -0.66092106 [31] 0.49508039 0.51132941 -1.70881379 -0.89148810 0.28882119 1.58695404 [37] 2.32040311 0.05982141 2.20284498 -1.44603396 -0.51390622 0.39980605 [43] -0.72796823 -0.32569027 -0.74590685 -0.39777894 0.02944292 0.27926463 [49] 0.29514141 -0.77564093 0.98006874 -0.18124801 -0.71029470 -1.12659933 [55] -1.18620517 0.49489830 0.23573340 0.79609374 0.37617165 0.03852248 [61] -1.15144226 -0.26476395 0.40625667 -2.57408150 -0.96607248 -1.81742301 [67] 0.63376677 -0.44912940 0.92560092 -0.15049526 -0.66562413 0.76565568 [73] -0.35051332 0.41694367 1.09868716 -0.29864700 0.17696818 -1.22854445 [79] 1.17803685 -0.89763205 -0.19436286 0.02324336 -0.15077905 0.90440179 [85] -0.49025052 -0.02920052 -1.06083735 0.80069185 0.35338067 -0.77397980 [91] -1.45639743 1.70389596 2.47511631 -0.74125245 0.05264514 0.69454029 [97] -0.98418849 -0.16652402 -2.04009277 -0.03042827 > 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.99940087 -0.38240492 -0.08248278 1.29029579 -1.90410726 0.65289026 [7] -0.90968953 -0.91716243 2.01666371 0.90256023 -0.66276936 0.77571512 [13] 0.45011096 0.83480833 0.39654423 -0.84464366 -0.98893965 -1.38484852 [19] -1.50335665 -0.86129245 -1.74430796 -1.82620026 0.32111846 0.76952834 [25] 0.70653447 -0.31592461 -1.25224080 -1.45899903 1.29896013 -0.66092106 [31] 0.49508039 0.51132941 -1.70881379 -0.89148810 0.28882119 1.58695404 [37] 2.32040311 0.05982141 2.20284498 -1.44603396 -0.51390622 0.39980605 [43] -0.72796823 -0.32569027 -0.74590685 -0.39777894 0.02944292 0.27926463 [49] 0.29514141 -0.77564093 0.98006874 -0.18124801 -0.71029470 -1.12659933 [55] -1.18620517 0.49489830 0.23573340 0.79609374 0.37617165 0.03852248 [61] -1.15144226 -0.26476395 0.40625667 -2.57408150 -0.96607248 -1.81742301 [67] 0.63376677 -0.44912940 0.92560092 -0.15049526 -0.66562413 0.76565568 [73] -0.35051332 0.41694367 1.09868716 -0.29864700 0.17696818 -1.22854445 [79] 1.17803685 -0.89763205 -0.19436286 0.02324336 -0.15077905 0.90440179 [85] -0.49025052 -0.02920052 -1.06083735 0.80069185 0.35338067 -0.77397980 [91] -1.45639743 1.70389596 2.47511631 -0.74125245 0.05264514 0.69454029 [97] -0.98418849 -0.16652402 -2.04009277 -0.03042827 > colMin(tmp) [1] -0.99940087 -0.38240492 -0.08248278 1.29029579 -1.90410726 0.65289026 [7] -0.90968953 -0.91716243 2.01666371 0.90256023 -0.66276936 0.77571512 [13] 0.45011096 0.83480833 0.39654423 -0.84464366 -0.98893965 -1.38484852 [19] -1.50335665 -0.86129245 -1.74430796 -1.82620026 0.32111846 0.76952834 [25] 0.70653447 -0.31592461 -1.25224080 -1.45899903 1.29896013 -0.66092106 [31] 0.49508039 0.51132941 -1.70881379 -0.89148810 0.28882119 1.58695404 [37] 2.32040311 0.05982141 2.20284498 -1.44603396 -0.51390622 0.39980605 [43] -0.72796823 -0.32569027 -0.74590685 -0.39777894 0.02944292 0.27926463 [49] 0.29514141 -0.77564093 0.98006874 -0.18124801 -0.71029470 -1.12659933 [55] -1.18620517 0.49489830 0.23573340 0.79609374 0.37617165 0.03852248 [61] -1.15144226 -0.26476395 0.40625667 -2.57408150 -0.96607248 -1.81742301 [67] 0.63376677 -0.44912940 0.92560092 -0.15049526 -0.66562413 0.76565568 [73] -0.35051332 0.41694367 1.09868716 -0.29864700 0.17696818 -1.22854445 [79] 1.17803685 -0.89763205 -0.19436286 0.02324336 -0.15077905 0.90440179 [85] -0.49025052 -0.02920052 -1.06083735 0.80069185 0.35338067 -0.77397980 [91] -1.45639743 1.70389596 2.47511631 -0.74125245 0.05264514 0.69454029 [97] -0.98418849 -0.16652402 -2.04009277 -0.03042827 > colMedians(tmp) [1] -0.99940087 -0.38240492 -0.08248278 1.29029579 -1.90410726 0.65289026 [7] -0.90968953 -0.91716243 2.01666371 0.90256023 -0.66276936 0.77571512 [13] 0.45011096 0.83480833 0.39654423 -0.84464366 -0.98893965 -1.38484852 [19] -1.50335665 -0.86129245 -1.74430796 -1.82620026 0.32111846 0.76952834 [25] 0.70653447 -0.31592461 -1.25224080 -1.45899903 1.29896013 -0.66092106 [31] 0.49508039 0.51132941 -1.70881379 -0.89148810 0.28882119 1.58695404 [37] 2.32040311 0.05982141 2.20284498 -1.44603396 -0.51390622 0.39980605 [43] -0.72796823 -0.32569027 -0.74590685 -0.39777894 0.02944292 0.27926463 [49] 0.29514141 -0.77564093 0.98006874 -0.18124801 -0.71029470 -1.12659933 [55] -1.18620517 0.49489830 0.23573340 0.79609374 0.37617165 0.03852248 [61] -1.15144226 -0.26476395 0.40625667 -2.57408150 -0.96607248 -1.81742301 [67] 0.63376677 -0.44912940 0.92560092 -0.15049526 -0.66562413 0.76565568 [73] -0.35051332 0.41694367 1.09868716 -0.29864700 0.17696818 -1.22854445 [79] 1.17803685 -0.89763205 -0.19436286 0.02324336 -0.15077905 0.90440179 [85] -0.49025052 -0.02920052 -1.06083735 0.80069185 0.35338067 -0.77397980 [91] -1.45639743 1.70389596 2.47511631 -0.74125245 0.05264514 0.69454029 [97] -0.98418849 -0.16652402 -2.04009277 -0.03042827 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.9994009 -0.3824049 -0.08248278 1.290296 -1.904107 0.6528903 -0.9096895 [2,] -0.9994009 -0.3824049 -0.08248278 1.290296 -1.904107 0.6528903 -0.9096895 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.9171624 2.016664 0.9025602 -0.6627694 0.7757151 0.450111 0.8348083 [2,] -0.9171624 2.016664 0.9025602 -0.6627694 0.7757151 0.450111 0.8348083 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.3965442 -0.8446437 -0.9889397 -1.384849 -1.503357 -0.8612924 -1.744308 [2,] 0.3965442 -0.8446437 -0.9889397 -1.384849 -1.503357 -0.8612924 -1.744308 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1.8262 0.3211185 0.7695283 0.7065345 -0.3159246 -1.252241 -1.458999 [2,] -1.8262 0.3211185 0.7695283 0.7065345 -0.3159246 -1.252241 -1.458999 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 1.29896 -0.6609211 0.4950804 0.5113294 -1.708814 -0.8914881 0.2888212 [2,] 1.29896 -0.6609211 0.4950804 0.5113294 -1.708814 -0.8914881 0.2888212 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 1.586954 2.320403 0.05982141 2.202845 -1.446034 -0.5139062 0.399806 [2,] 1.586954 2.320403 0.05982141 2.202845 -1.446034 -0.5139062 0.399806 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -0.7279682 -0.3256903 -0.7459068 -0.3977789 0.02944292 0.2792646 0.2951414 [2,] -0.7279682 -0.3256903 -0.7459068 -0.3977789 0.02944292 0.2792646 0.2951414 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] -0.7756409 0.9800687 -0.181248 -0.7102947 -1.126599 -1.186205 0.4948983 [2,] -0.7756409 0.9800687 -0.181248 -0.7102947 -1.126599 -1.186205 0.4948983 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 0.2357334 0.7960937 0.3761717 0.03852248 -1.151442 -0.2647639 0.4062567 [2,] 0.2357334 0.7960937 0.3761717 0.03852248 -1.151442 -0.2647639 0.4062567 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -2.574081 -0.9660725 -1.817423 0.6337668 -0.4491294 0.9256009 -0.1504953 [2,] -2.574081 -0.9660725 -1.817423 0.6337668 -0.4491294 0.9256009 -0.1504953 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.6656241 0.7656557 -0.3505133 0.4169437 1.098687 -0.298647 0.1769682 [2,] -0.6656241 0.7656557 -0.3505133 0.4169437 1.098687 -0.298647 0.1769682 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -1.228544 1.178037 -0.897632 -0.1943629 0.02324336 -0.1507791 0.9044018 [2,] -1.228544 1.178037 -0.897632 -0.1943629 0.02324336 -0.1507791 0.9044018 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.4902505 -0.02920052 -1.060837 0.8006919 0.3533807 -0.7739798 -1.456397 [2,] -0.4902505 -0.02920052 -1.060837 0.8006919 0.3533807 -0.7739798 -1.456397 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] 1.703896 2.475116 -0.7412525 0.05264514 0.6945403 -0.9841885 -0.166524 [2,] 1.703896 2.475116 -0.7412525 0.05264514 0.6945403 -0.9841885 -0.166524 [,99] [,100] [1,] -2.040093 -0.03042827 [2,] -2.040093 -0.03042827 > > > Max(tmp2) [1] 2.713254 > Min(tmp2) [1] -2.481848 > mean(tmp2) [1] 0.009060189 > Sum(tmp2) [1] 0.9060189 > Var(tmp2) [1] 1.014519 > > rowMeans(tmp2) [1] -0.66445945 0.42564418 -0.10153881 -0.46669693 -0.46702990 -0.72281691 [7] 1.30098214 0.93400199 2.19287415 -2.19351980 -0.48236484 -0.50502781 [13] -0.60937422 -0.69391046 0.15059587 -1.03631955 -0.76985511 0.50030711 [19] 1.09898828 1.17068437 0.26009837 -0.22979863 0.16121246 0.54016437 [25] 0.78411783 0.41834015 1.19840360 0.84469365 -0.67644316 1.60325620 [31] 0.27234995 -0.03278269 1.19545195 2.71325445 0.41338428 0.69779801 [37] 0.39222052 -0.27584861 0.45341087 0.93918194 0.65972921 -0.07044250 [43] -0.81499450 -1.38391648 -0.32737804 0.35528874 -0.23475986 -0.50079746 [49] -0.76631029 -0.89082085 1.73179132 -1.69647614 -0.59720724 0.03849907 [55] -2.04402439 0.44635242 -1.79421983 -0.10132004 -0.58166738 0.62641928 [61] 0.68879986 1.85908431 0.85385782 0.54454973 -0.97858841 0.65516282 [67] 0.12586524 2.37442076 -0.34528874 1.55638895 -0.02249873 -2.48184819 [73] -0.39174384 0.42195996 -2.12614652 1.08251527 -0.26670212 -0.99857650 [79] -1.34700800 -0.77787838 -1.47024760 0.61288512 -0.13864507 -1.81239423 [85] -1.18521139 0.74207495 0.23584457 -0.57207372 -0.12698421 -0.95394863 [91] 0.08043809 0.33110435 0.46315953 -0.47845217 -0.68451817 1.03074021 [97] 1.01101813 0.32649388 -0.71861546 0.99965054 > rowSums(tmp2) [1] -0.66445945 0.42564418 -0.10153881 -0.46669693 -0.46702990 -0.72281691 [7] 1.30098214 0.93400199 2.19287415 -2.19351980 -0.48236484 -0.50502781 [13] -0.60937422 -0.69391046 0.15059587 -1.03631955 -0.76985511 0.50030711 [19] 1.09898828 1.17068437 0.26009837 -0.22979863 0.16121246 0.54016437 [25] 0.78411783 0.41834015 1.19840360 0.84469365 -0.67644316 1.60325620 [31] 0.27234995 -0.03278269 1.19545195 2.71325445 0.41338428 0.69779801 [37] 0.39222052 -0.27584861 0.45341087 0.93918194 0.65972921 -0.07044250 [43] -0.81499450 -1.38391648 -0.32737804 0.35528874 -0.23475986 -0.50079746 [49] -0.76631029 -0.89082085 1.73179132 -1.69647614 -0.59720724 0.03849907 [55] -2.04402439 0.44635242 -1.79421983 -0.10132004 -0.58166738 0.62641928 [61] 0.68879986 1.85908431 0.85385782 0.54454973 -0.97858841 0.65516282 [67] 0.12586524 2.37442076 -0.34528874 1.55638895 -0.02249873 -2.48184819 [73] -0.39174384 0.42195996 -2.12614652 1.08251527 -0.26670212 -0.99857650 [79] -1.34700800 -0.77787838 -1.47024760 0.61288512 -0.13864507 -1.81239423 [85] -1.18521139 0.74207495 0.23584457 -0.57207372 -0.12698421 -0.95394863 [91] 0.08043809 0.33110435 0.46315953 -0.47845217 -0.68451817 1.03074021 [97] 1.01101813 0.32649388 -0.71861546 0.99965054 > 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.66445945 0.42564418 -0.10153881 -0.46669693 -0.46702990 -0.72281691 [7] 1.30098214 0.93400199 2.19287415 -2.19351980 -0.48236484 -0.50502781 [13] -0.60937422 -0.69391046 0.15059587 -1.03631955 -0.76985511 0.50030711 [19] 1.09898828 1.17068437 0.26009837 -0.22979863 0.16121246 0.54016437 [25] 0.78411783 0.41834015 1.19840360 0.84469365 -0.67644316 1.60325620 [31] 0.27234995 -0.03278269 1.19545195 2.71325445 0.41338428 0.69779801 [37] 0.39222052 -0.27584861 0.45341087 0.93918194 0.65972921 -0.07044250 [43] -0.81499450 -1.38391648 -0.32737804 0.35528874 -0.23475986 -0.50079746 [49] -0.76631029 -0.89082085 1.73179132 -1.69647614 -0.59720724 0.03849907 [55] -2.04402439 0.44635242 -1.79421983 -0.10132004 -0.58166738 0.62641928 [61] 0.68879986 1.85908431 0.85385782 0.54454973 -0.97858841 0.65516282 [67] 0.12586524 2.37442076 -0.34528874 1.55638895 -0.02249873 -2.48184819 [73] -0.39174384 0.42195996 -2.12614652 1.08251527 -0.26670212 -0.99857650 [79] -1.34700800 -0.77787838 -1.47024760 0.61288512 -0.13864507 -1.81239423 [85] -1.18521139 0.74207495 0.23584457 -0.57207372 -0.12698421 -0.95394863 [91] 0.08043809 0.33110435 0.46315953 -0.47845217 -0.68451817 1.03074021 [97] 1.01101813 0.32649388 -0.71861546 0.99965054 > rowMin(tmp2) [1] -0.66445945 0.42564418 -0.10153881 -0.46669693 -0.46702990 -0.72281691 [7] 1.30098214 0.93400199 2.19287415 -2.19351980 -0.48236484 -0.50502781 [13] -0.60937422 -0.69391046 0.15059587 -1.03631955 -0.76985511 0.50030711 [19] 1.09898828 1.17068437 0.26009837 -0.22979863 0.16121246 0.54016437 [25] 0.78411783 0.41834015 1.19840360 0.84469365 -0.67644316 1.60325620 [31] 0.27234995 -0.03278269 1.19545195 2.71325445 0.41338428 0.69779801 [37] 0.39222052 -0.27584861 0.45341087 0.93918194 0.65972921 -0.07044250 [43] -0.81499450 -1.38391648 -0.32737804 0.35528874 -0.23475986 -0.50079746 [49] -0.76631029 -0.89082085 1.73179132 -1.69647614 -0.59720724 0.03849907 [55] -2.04402439 0.44635242 -1.79421983 -0.10132004 -0.58166738 0.62641928 [61] 0.68879986 1.85908431 0.85385782 0.54454973 -0.97858841 0.65516282 [67] 0.12586524 2.37442076 -0.34528874 1.55638895 -0.02249873 -2.48184819 [73] -0.39174384 0.42195996 -2.12614652 1.08251527 -0.26670212 -0.99857650 [79] -1.34700800 -0.77787838 -1.47024760 0.61288512 -0.13864507 -1.81239423 [85] -1.18521139 0.74207495 0.23584457 -0.57207372 -0.12698421 -0.95394863 [91] 0.08043809 0.33110435 0.46315953 -0.47845217 -0.68451817 1.03074021 [97] 1.01101813 0.32649388 -0.71861546 0.99965054 > > colMeans(tmp2) [1] 0.009060189 > colSums(tmp2) [1] 0.9060189 > colVars(tmp2) [1] 1.014519 > colSd(tmp2) [1] 1.007233 > colMax(tmp2) [1] 2.713254 > colMin(tmp2) [1] -2.481848 > colMedians(tmp2) [1] 0.00800017 > colRanges(tmp2) [,1] [1,] -2.481848 [2,] 2.713254 > > 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.10569671 -1.41875749 -3.27244934 -3.06473577 -0.07685308 0.49889904 [7] 1.35864029 5.08418703 -0.78245694 -1.45152354 > colApply(tmp,quantile)[,1] [,1] [1,] -0.6595818 [2,] -0.2101381 [3,] 0.1304456 [4,] 0.5608820 [5,] 1.5015016 > > rowApply(tmp,sum) [1] -2.9400374 1.2225186 -1.3693586 5.5166234 -2.4763992 2.1299541 [7] -2.7272492 -0.2355497 -0.5797518 0.4398968 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 10 7 3 2 8 5 4 10 5 7 [2,] 7 5 8 5 9 3 1 9 2 4 [3,] 6 2 2 1 7 2 3 8 7 9 [4,] 1 3 5 3 3 10 8 1 4 5 [5,] 3 4 6 4 5 8 10 3 10 2 [6,] 5 8 4 9 1 4 9 5 1 10 [7,] 2 10 7 8 10 1 5 7 8 1 [8,] 8 6 9 10 4 6 7 6 9 8 [9,] 9 9 1 7 6 7 2 4 6 3 [10,] 4 1 10 6 2 9 6 2 3 6 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.15796686 -0.14063776 -5.13593687 -0.37087291 3.34530643 -3.10326826 [7] -1.43553744 1.21323672 -0.37031887 -0.96012609 2.40340610 -0.58480266 [13] -2.62864100 -1.94144604 -0.01257848 -0.91555716 -3.23276763 -4.44830079 [19] -4.89090884 0.74422792 > colApply(tmp,quantile)[,1] [,1] [1,] -1.2414741 [2,] -1.2209848 [3,] -0.1836189 [4,] 0.6479218 [5,] 1.8401891 > > rowApply(tmp,sum) [1] -5.360055 -5.233301 -6.016326 -7.034208 1.020399 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 5 5 20 12 15 [2,] 8 13 17 20 5 [3,] 7 1 2 1 19 [4,] 13 19 9 8 6 [5,] 12 12 19 9 20 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.2209848 -0.8626167 -0.9654195 -0.08478108 -0.17456509 -2.44160200 [2,] -1.2414741 0.1559485 -2.3793403 1.44144670 0.08190447 -0.02899004 [3,] 1.8401891 0.5876191 -1.3952789 -0.82836556 1.41767422 -0.07791378 [4,] -0.1836189 1.3033743 -2.2174789 -0.52804980 -0.50308280 -0.31794656 [5,] 0.6479218 -1.3249629 1.8215808 -0.37112316 2.52337563 -0.23681588 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.7291045 -0.4308809 1.5298219 -0.3249451 0.89671918 0.4807229 [2,] 2.2332207 0.3631666 -0.1265312 0.3854775 0.61355046 -0.9464367 [3,] -1.0605809 0.3278004 0.3762076 -1.0947729 -0.53991361 0.2995125 [4,] -0.6108997 1.1267271 -0.4742601 -0.5532975 0.02202847 -1.3272799 [5,] -0.2681730 -0.1735765 -1.6755571 0.6274118 1.41102160 0.9086785 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 1.7671819 -2.5483186 1.5156122 -1.2388152 -0.3421774 -1.0556569 [2,] -1.0439565 -0.8432305 -1.2908540 0.4889161 -1.5570209 -1.1796760 [3,] -1.3855802 0.9243590 0.1604521 -1.0984177 -1.5963203 -1.3676339 [4,] -0.1004628 0.1551307 -2.0049891 0.7115013 0.2033919 0.7336992 [5,] -1.8658234 0.3706134 1.6072003 0.2212583 0.0593590 -1.5790332 [,19] [,20] [1,] 0.5525277 1.3172264 [2,] -1.3889405 1.0295188 [3,] -1.3744869 -0.1308755 [4,] -1.3013812 -1.1673132 [5,] -1.3786279 -0.3043287 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 649 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 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.19-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 -0.2129909 -1.538386 0.883643 -0.07811251 0.8401573 -0.08579522 1.393066 col8 col9 col10 col11 col12 col13 col14 row1 -1.441978 1.122026 -1.202252 0.39134 1.633353 0.1717418 -1.280766 col15 col16 col17 col18 col19 col20 row1 -2.078037 -0.5448039 -0.1115954 0.6312493 0.2303173 0.5318631 > tmp[,"col10"] col10 row1 -1.2022523 row2 1.1633947 row3 2.3024567 row4 -0.3966048 row5 0.1942420 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 -0.2129909 -1.5383861 0.8836430 -0.07811251 0.8401573 -0.08579522 row5 0.5443792 -0.8080539 0.7765278 0.03102178 0.7785924 -0.74593101 col7 col8 col9 col10 col11 col12 col13 row1 1.3930657 -1.4419780 1.122026 -1.202252 0.3913400 1.6333534 0.1717418 row5 -0.2151411 0.9564085 -2.138784 0.194242 -0.8990519 0.5594276 2.4121207 col14 col15 col16 col17 col18 col19 row1 -1.280766 -2.0780367 -0.54480388 -0.1115954 0.63124935 0.2303173 row5 -1.162110 -0.7557949 -0.03929401 0.2777472 -0.02162955 1.2557505 col20 row1 0.5318631 row5 -0.7142257 > tmp[,c("col6","col20")] col6 col20 row1 -0.08579522 0.5318631 row2 2.29973736 -0.2685357 row3 0.23623558 -0.8052372 row4 -0.87745859 1.1890685 row5 -0.74593101 -0.7142257 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.08579522 0.5318631 row5 -0.74593101 -0.7142257 > > > > > 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.43045 49.86247 49.13178 50.30206 48.38406 104.859 50.39239 50.70939 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.83129 50.63753 51.30087 50.68278 49.32085 50.48551 48.37885 49.39282 col17 col18 col19 col20 row1 49.31023 50.76104 49.90923 104.4465 > tmp[,"col10"] col10 row1 50.63753 row2 30.07071 row3 29.42608 row4 29.35181 row5 49.61035 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.43045 49.86247 49.13178 50.30206 48.38406 104.859 50.39239 50.70939 row5 50.16859 48.25450 52.67745 50.49782 50.05750 105.360 50.12210 49.65956 col9 col10 col11 col12 col13 col14 col15 col16 row1 49.83129 50.63753 51.30087 50.68278 49.32085 50.48551 48.37885 49.39282 row5 50.13082 49.61035 48.89578 50.53146 51.60218 50.38650 49.01033 49.07992 col17 col18 col19 col20 row1 49.31023 50.76104 49.90923 104.4465 row5 48.91101 49.17077 49.63891 103.8894 > tmp[,c("col6","col20")] col6 col20 row1 104.85898 104.44650 row2 75.74102 76.39308 row3 74.45206 74.31707 row4 74.47526 75.40694 row5 105.36000 103.88938 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.859 104.4465 row5 105.360 103.8894 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.859 104.4465 row5 105.360 103.8894 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.35278488 [2,] -0.35716710 [3,] -0.41038673 [4,] -1.46546772 [5,] 0.01676246 > tmp[,c("col17","col7")] col17 col7 [1,] -0.5726167 -0.8861414 [2,] 1.3041800 -1.4448500 [3,] 0.7645496 0.1547295 [4,] -0.1804821 -1.0740585 [5,] -0.8809667 2.5071522 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 1.3286348 0.1873268 [2,] -0.7670321 2.1740339 [3,] -0.2149854 0.8580072 [4,] -1.4271411 -0.7484355 [5,] 0.9162317 0.1221138 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 1.328635 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 1.3286348 [2,] -0.7670321 > > > > 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.9547968 -0.1518111 0.7267268 1.0963836 0.247471768 0.2786178 row1 -0.4959588 -1.6158237 -1.7579434 0.1403902 0.005829339 -0.7381776 [,7] [,8] [,9] [,10] [,11] [,12] row3 1.5630060 -1.4176570 -0.2343042 0.4426637 -0.3030738 -0.74137880 row1 0.4834254 -0.1091383 1.1362906 -0.3983239 1.3176666 -0.06503243 [,13] [,14] [,15] [,16] [,17] [,18] [,19] row3 0.62252121 0.3738310 2.471098 1.036794 -0.3512469 1.177644 0.8015782 row1 -0.09555372 -0.9104681 2.159371 -1.386950 1.3619229 -1.370971 0.3060681 [,20] row3 -0.1625648 row1 0.9043262 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.02911865 -0.9566149 0.5409379 0.002609536 1.907063 1.132289 -0.1632463 [,8] [,9] [,10] row2 -1.547108 -0.9935086 -0.1864415 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.2528949 0.4220061 1.029685 0.1055771 0.08170962 -0.8062829 1.397239 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 0.5496579 1.030056 -0.4015256 -1.722462 0.466078 1.573517 -0.007405897 [,15] [,16] [,17] [,18] [,19] [,20] row5 -1.090625 0.1415268 -0.4705039 0.6325884 -1.780406 0.09566731 > > > 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: 0x6000011c00c0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb45a19fb14" [2] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb45fb30c42" [3] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb463e9f223" [4] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb414180b14" [5] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb4367f585a" [6] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb4628198a9" [7] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb42a4db1c5" [8] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb452d21235" [9] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb45da9800d" [10] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb423160585" [11] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb47ac470c1" [12] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb476c6cdde" [13] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb475f5e6bd" [14] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb462ffbecb" [15] "/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests/BMbbb44473434" > > > ### 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: 0x6000011dc060> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6000011dc060> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.19-bioc/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6000011dc060> > rowMedians(tmp) [1] -0.5419818308 0.4483621429 -0.4248065480 -0.2192632065 -0.2882717644 [6] -0.4488021708 0.2799901596 0.3936543836 0.2520734718 0.0097220710 [11] -0.4694126450 -0.6754462591 0.5614856538 0.4964602196 0.3507103523 [16] 0.2574622622 0.0353274348 -0.5664388715 0.0482915921 0.5035333984 [21] -0.4650308640 0.2333782889 -0.6058091408 0.0591789924 -0.1941642112 [26] 0.4084946274 -0.0708939042 -0.4965401227 0.1010500444 0.0558588474 [31] -0.3764727570 0.1879079988 0.1861845050 0.4532501270 0.4189735871 [36] 0.3345296759 0.4322106381 -0.6520475405 0.3576420206 -0.2730554799 [41] 0.2353696484 0.3052750000 0.2299874669 -0.1297009287 0.1743207308 [46] 0.1174049061 0.1959949488 -0.2468201602 0.4220030604 -0.1251897259 [51] 0.8072172615 -0.0515312585 -0.4099980267 -0.2088487765 -0.2105147823 [56] -0.4133523587 0.4968796585 0.3068853617 -0.1339215110 0.0741848193 [61] 0.4823751395 -0.2030298515 0.2889111288 0.0691210911 -0.3415974853 [66] 0.5094489615 -0.5085090637 0.0147342544 0.5438184324 0.1141170974 [71] -0.4552864983 0.2423041634 -0.3791101371 -0.2123688949 0.4318205067 [76] -0.1204729729 0.3314047680 0.3931534765 0.6552389868 -0.2666098735 [81] 0.2660080536 -0.5932530422 0.2136340916 0.1482242573 -0.0387503216 [86] -0.3111999467 -0.6040381180 -0.3129873886 -0.8666458904 0.6184394085 [91] 0.0352065293 0.2520743884 0.4986016046 0.0977218035 0.5363724225 [96] 0.2395193900 0.0918475651 -0.4240318863 0.2428290201 0.2622103866 [101] -0.1255486791 -0.0846642280 0.1172421392 -0.4151203400 -0.2753327707 [106] -0.0412621219 0.1587272736 -0.3354839451 -0.3209424054 0.0295028572 [111] -0.1129953447 -0.0932262693 0.3200271966 -0.1720153801 -0.4797455212 [116] 0.0082054694 0.1402186349 -0.0350875591 -0.5179006162 0.0321656515 [121] -0.4852332682 0.1327646546 0.1925066359 -0.0770446554 0.4782290343 [126] 0.5688667749 0.2263425790 -0.5667548204 0.3210586435 -0.0119178138 [131] -0.1630794392 -0.0156214809 -0.5788403092 -0.3348637505 0.1507029335 [136] -0.3109938815 0.5869094433 0.2574405614 0.2326288473 -0.5186755713 [141] -0.1820800754 -0.1177827753 0.2705191712 0.6617944496 0.1542267024 [146] 0.1395608755 0.0348185497 -0.8117692491 -0.2564549947 0.2646730692 [151] 0.1772914300 0.3989267889 -0.0006459295 0.1583397347 -0.1289114731 [156] -0.0376900454 0.2269537833 -0.1409656065 0.3378417778 0.1928996776 [161] -0.1067804375 -0.1874182842 0.2110978578 -0.1483297062 -0.2188274556 [166] 0.3675977910 -0.2160206178 0.0572515670 0.0953990277 0.1346110048 [171] -0.0058439383 0.2969120012 0.1238190644 0.1055996669 -0.3769874530 [176] -0.1209174098 0.4191937318 -0.1196714992 -0.0795494330 0.2129335346 [181] -0.0584264260 -0.4160749514 -0.0525565054 0.0251304253 0.0477652549 [186] 0.4344279435 -0.3639824420 0.2687203627 0.0937171080 -0.1984057983 [191] 0.2146860306 0.1212423025 1.2366489517 0.0068021820 0.5605118137 [196] 0.4776154924 -0.3052055227 -0.2395241096 -0.7640154851 -0.0844087038 [201] -0.1554084310 -0.1882885430 0.2294387598 0.5593178894 -0.1858388976 [206] -0.3155234226 -0.2971331040 0.2286536364 0.0733112090 -0.2047135714 [211] -0.0446772638 -0.0854059614 0.2936851171 -0.0268922441 -0.3208243445 [216] -0.1868804577 0.0155516764 -0.5796789769 0.0760524738 0.0995081309 [221] 0.0507794010 -0.4993212630 -0.3511030585 -0.2677835369 0.4953655876 [226] -0.2702175719 0.4651889438 -0.1079095194 0.1806557899 0.2877488706 > > proc.time() user system elapsed 5.030 17.761 29.292
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2024-01-16 r85808) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > prefix <- "dbmtest" > directory <- getwd() > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_Test_C",P) RBufferedMatrix Checking dimensions Rows: 5 Cols: 5 Buffer Rows: 1 Buffer Cols: 1 Assigning Values 0.000000 1.000000 2.000000 3.000000 4.000000 1.000000 2.000000 3.000000 4.000000 5.000000 2.000000 3.000000 4.000000 5.000000 6.000000 3.000000 4.000000 5.000000 6.000000 7.000000 4.000000 5.000000 6.000000 7.000000 8.000000 <pointer: 0x600000a800c0> > .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: 0x600000a800c0> > .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: 0x600000a800c0> > .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: 0x600000a800c0> > 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: 0x600000a94000> > .Call("R_bm_AddColumn",P) <pointer: 0x600000a94000> > .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: 0x600000a94000> > .Call("R_bm_AddColumn",P) <pointer: 0x600000a94000> > .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: 0x600000a94000> > 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: 0x600000a84120> > .Call("R_bm_AddColumn",P) <pointer: 0x600000a84120> > .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: 0x600000a84120> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600000a84120> > .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: 0x600000a84120> > > .Call("R_bm_RowMode",P) <pointer: 0x600000a84120> > .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: 0x600000a84120> > > .Call("R_bm_ColMode",P) <pointer: 0x600000a84120> > .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: 0x600000a84120> > 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: 0x600000a90000> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600000a90000> > .Call("R_bm_AddColumn",P) <pointer: 0x600000a90000> > .Call("R_bm_AddColumn",P) <pointer: 0x600000a90000> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile10223746edc25" "BufferedMatrixFile10223debcf2e" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile10223746edc25" "BufferedMatrixFile10223debcf2e" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600000ab8420> > .Call("R_bm_AddColumn",P) <pointer: 0x600000ab8420> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600000ab8420> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600000ab8420> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600000ab8420> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600000ab8420> > .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: 0x600000aa0120> > .Call("R_bm_AddColumn",P) <pointer: 0x600000aa0120> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600000aa0120> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600000aa0120> > 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: 0x600000a94240> > .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: 0x600000a94240> > rm(P) > > proc.time() user system elapsed 0.584 0.213 0.855
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2024-01-16 r85808) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BufferedMatrix);library.dynam("BufferedMatrix","BufferedMatrix", .libPaths()); Attaching package: 'BufferedMatrix' The following objects are masked from 'package:base': colMeans, colSums, rowMeans, rowSums > > Temp <- createBufferedMatrix(100) > dim(Temp) [1] 100 0 > buffer.dim(Temp) [1] 1 1 > > > proc.time() user system elapsed 0.583 0.140 0.762