Back to Mac ARM64 build report for BioC 3.18 |
|
This page was generated on 2024-04-18 11:32:07 -0400 (Thu, 18 Apr 2024).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
kjohnson1 | macOS 13.6.1 Ventura | arm64 | 4.3.3 (2024-02-29) -- "Angel Food Cake" | 4388 |
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
| kjohnson1 | macOS 13.6.1 Ventura / arm64 | OK | OK | WARNINGS | OK | ||||||||
To the developers/maintainers of the BufferedMatrix package: - 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-04-17 07:48:33 -0400 (Wed, 17 Apr 2024) |
EndedAt: 2024-04-17 07:49:11 -0400 (Wed, 17 Apr 2024) |
EllapsedTime: 38.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-mac-arm64/meat/BufferedMatrix.Rcheck’ * using R version 4.3.3 (2024-02-29) * using platform: aarch64-apple-darwin20 (64-bit) * R was compiled by Apple clang version 14.0.0 (clang-1400.0.29.202) GNU Fortran (GCC) 12.2.0 * running under: macOS Ventura 13.6.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-mac-arm64/meat/BufferedMatrix.Rcheck/00install.out’ for details. * used C compiler: ‘Apple clang version 15.0.0 (clang-1500.0.40.1)’ * used SDK: ‘MacOSX11.3.sdk’ * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking 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-mac-arm64/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-arm64/Resources/library’ * installing *source* package ‘BufferedMatrix’ ... ** using staged installation ** libs using C compiler: ‘Apple clang version 15.0.0 (clang-1500.0.40.1)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RBufferedMatrix.c -o RBufferedMatrix.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c:1580:7: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!(Matrix->readonly) & setting){ ^ ~ doubleBufferedMatrix.c:1580:7: note: add parentheses after the '!' to evaluate the bitwise operator first if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:1580:7: note: add parentheses around left hand side expression to silence this warning if (!(Matrix->readonly) & setting){ ^ ( ) doubleBufferedMatrix.c:3327:12: warning: unused function 'sort_double' [-Wunused-function] static int sort_double(const double *a1,const double *a2){ ^ 2 warnings generated. clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init_package.c -o init_package.o clang -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o BufferedMatrix.so RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs ** R ** inst ** byte-compile and prepare package for lazy loading Creating a new generic function for ‘rowMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘rowSums’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colMeans’ in package ‘BufferedMatrix’ Creating a new generic function for ‘colSums’ in package ‘BufferedMatrix’ Creating a generic function for ‘ncol’ from package ‘base’ in package ‘BufferedMatrix’ Creating a generic function for ‘nrow’ from package ‘base’ in package ‘BufferedMatrix’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (BufferedMatrix)
BufferedMatrix.Rcheck/tests/c_code_level_tests.Rout
R version 4.3.3 (2024-02-29) -- "Angel Food Cake" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: aarch64-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.353 0.103 0.445
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R version 4.3.3 (2024-02-29) -- "Angel Food Cake" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: aarch64-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-mac-arm64/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 460364 24.6 992622 53.1 NA 645405 34.5 Vcells 848863 6.5 8388608 64.0 65536 2020260 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] "Wed Apr 17 07:48:53 2024" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Wed Apr 17 07:48:53 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: 0x6000003f4120> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Wed Apr 17 07:48:55 2024" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Wed Apr 17 07:48:56 2024" > > ColMode(tmp2) <pointer: 0x6000003f4120> > > > > ### 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,] 100.3149494 -1.2761105 -0.6681039 0.2475088 [2,] 0.3408202 0.1698438 -0.7658413 2.0319564 [3,] -1.4675307 -0.4451677 1.6844849 -1.1869670 [4,] 1.1830163 0.9129389 -0.3748184 0.7641428 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2.1 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 100.3149494 1.2761105 0.6681039 0.2475088 [2,] 0.3408202 0.1698438 0.7658413 2.0319564 [3,] 1.4675307 0.4451677 1.6844849 1.1869670 [4,] 1.1830163 0.9129389 0.3748184 0.7641428 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: /Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2.1 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 10.0157351 1.1296506 0.8173762 0.4975025 [2,] 0.5837981 0.4121211 0.8751236 1.4254671 [3,] 1.2114168 0.6672089 1.2978771 1.0894801 [4,] 1.0876655 0.9554784 0.6122242 0.8741526 > > 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-mac-arm64/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2.1 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 225.47230 37.57262 33.84187 30.22253 [2,] 31.17880 29.29106 34.51708 41.28663 [3,] 38.58170 32.11726 39.66326 37.08177 [4,] 37.05967 35.46772 31.49706 34.50567 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x6000003f4a20> > exp(tmp5) <pointer: 0x6000003f4a20> > log(tmp5,2) <pointer: 0x6000003f4a20> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 469.2911 > Min(tmp5) [1] 54.69959 > mean(tmp5) [1] 72.29939 > Sum(tmp5) [1] 14459.88 > Var(tmp5) [1] 867.8045 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 88.00849 69.87528 72.44096 72.94362 70.25793 68.58933 68.21589 70.07074 [9] 74.88324 67.70842 > rowSums(tmp5) [1] 1760.170 1397.506 1448.819 1458.872 1405.159 1371.787 1364.318 1401.415 [9] 1497.665 1354.168 > rowVars(tmp5) [1] 8116.50948 68.38940 89.24736 90.06230 94.42105 29.87834 [7] 36.38050 90.44108 60.65860 75.84405 > rowSd(tmp5) [1] 90.091673 8.269788 9.447082 9.490116 9.717050 5.466109 6.031625 [8] 9.510051 7.788363 8.708849 > rowMax(tmp5) [1] 469.29105 85.93271 95.36206 97.37341 88.01392 79.00588 80.99210 [8] 89.83822 86.59636 82.01025 > rowMin(tmp5) [1] 58.30123 58.19235 57.36620 56.16920 56.31373 58.25957 56.05134 55.02716 [9] 60.32895 54.69959 > > colMeans(tmp5) [1] 111.80192 67.96761 71.69346 70.62160 71.54599 69.29806 72.58386 [8] 68.08250 68.64958 70.23974 68.12773 63.77907 69.61721 69.61064 [15] 72.46331 70.66952 69.78776 78.17355 73.31615 67.95856 > colSums(tmp5) [1] 1118.0192 679.6761 716.9346 706.2160 715.4599 692.9806 725.8386 [8] 680.8250 686.4958 702.3974 681.2773 637.7907 696.1721 696.1064 [15] 724.6331 706.6952 697.8776 781.7355 733.1615 679.5856 > colVars(tmp5) [1] 15821.29473 62.25048 59.69117 42.28522 79.92539 106.55751 [7] 79.18799 47.34596 28.57491 24.04024 70.72328 37.36482 [13] 79.06093 59.88274 118.75269 74.40370 115.38719 134.87199 [19] 68.51852 83.34233 > colSd(tmp5) [1] 125.782728 7.889897 7.726006 6.502708 8.940100 10.322670 [7] 8.898763 6.880840 5.345551 4.903085 8.409713 6.112677 [13] 8.891622 7.738394 10.897371 8.625758 10.741843 11.613440 [19] 8.277592 9.129202 > colMax(tmp5) [1] 469.29105 81.79318 82.55387 85.93271 85.00557 89.83822 83.54280 [8] 77.70419 79.31969 79.46563 79.52224 74.28020 82.70436 79.00588 [15] 97.37341 83.64250 88.08438 95.36206 84.50043 82.84287 > colMin(tmp5) [1] 59.88472 56.94910 56.31373 62.90424 59.61058 57.63895 56.05134 54.69959 [9] 58.44492 64.38641 55.02716 56.16920 58.84461 56.81711 57.18419 58.30123 [17] 59.28190 60.32895 60.39472 58.05625 > > > ### 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] 88.00849 69.87528 72.44096 NA 70.25793 68.58933 68.21589 70.07074 [9] 74.88324 67.70842 > rowSums(tmp5) [1] 1760.170 1397.506 1448.819 NA 1405.159 1371.787 1364.318 1401.415 [9] 1497.665 1354.168 > rowVars(tmp5) [1] 8116.50948 68.38940 89.24736 94.74289 94.42105 29.87834 [7] 36.38050 90.44108 60.65860 75.84405 > rowSd(tmp5) [1] 90.091673 8.269788 9.447082 9.733596 9.717050 5.466109 6.031625 [8] 9.510051 7.788363 8.708849 > rowMax(tmp5) [1] 469.29105 85.93271 95.36206 NA 88.01392 79.00588 80.99210 [8] 89.83822 86.59636 82.01025 > rowMin(tmp5) [1] 58.30123 58.19235 57.36620 NA 56.31373 58.25957 56.05134 55.02716 [9] 60.32895 54.69959 > > colMeans(tmp5) [1] 111.80192 67.96761 71.69346 70.62160 71.54599 69.29806 72.58386 [8] 68.08250 NA 70.23974 68.12773 63.77907 69.61721 69.61064 [15] 72.46331 70.66952 69.78776 78.17355 73.31615 67.95856 > colSums(tmp5) [1] 1118.0192 679.6761 716.9346 706.2160 715.4599 692.9806 725.8386 [8] 680.8250 NA 702.3974 681.2773 637.7907 696.1721 696.1064 [15] 724.6331 706.6952 697.8776 781.7355 733.1615 679.5856 > colVars(tmp5) [1] 15821.29473 62.25048 59.69117 42.28522 79.92539 106.55751 [7] 79.18799 47.34596 NA 24.04024 70.72328 37.36482 [13] 79.06093 59.88274 118.75269 74.40370 115.38719 134.87199 [19] 68.51852 83.34233 > colSd(tmp5) [1] 125.782728 7.889897 7.726006 6.502708 8.940100 10.322670 [7] 8.898763 6.880840 NA 4.903085 8.409713 6.112677 [13] 8.891622 7.738394 10.897371 8.625758 10.741843 11.613440 [19] 8.277592 9.129202 > colMax(tmp5) [1] 469.29105 81.79318 82.55387 85.93271 85.00557 89.83822 83.54280 [8] 77.70419 NA 79.46563 79.52224 74.28020 82.70436 79.00588 [15] 97.37341 83.64250 88.08438 95.36206 84.50043 82.84287 > colMin(tmp5) [1] 59.88472 56.94910 56.31373 62.90424 59.61058 57.63895 56.05134 54.69959 [9] NA 64.38641 55.02716 56.16920 58.84461 56.81711 57.18419 58.30123 [17] 59.28190 60.32895 60.39472 58.05625 > > Max(tmp5,na.rm=TRUE) [1] 469.2911 > Min(tmp5,na.rm=TRUE) [1] 54.69959 > mean(tmp5,na.rm=TRUE) [1] 72.30796 > Sum(tmp5,na.rm=TRUE) [1] 14389.28 > Var(tmp5,na.rm=TRUE) [1] 872.1726 > > rowMeans(tmp5,na.rm=TRUE) [1] 88.00849 69.87528 72.44096 73.06729 70.25793 68.58933 68.21589 70.07074 [9] 74.88324 67.70842 > rowSums(tmp5,na.rm=TRUE) [1] 1760.170 1397.506 1448.819 1388.278 1405.159 1371.787 1364.318 1401.415 [9] 1497.665 1354.168 > rowVars(tmp5,na.rm=TRUE) [1] 8116.50948 68.38940 89.24736 94.74289 94.42105 29.87834 [7] 36.38050 90.44108 60.65860 75.84405 > rowSd(tmp5,na.rm=TRUE) [1] 90.091673 8.269788 9.447082 9.733596 9.717050 5.466109 6.031625 [8] 9.510051 7.788363 8.708849 > rowMax(tmp5,na.rm=TRUE) [1] 469.29105 85.93271 95.36206 97.37341 88.01392 79.00588 80.99210 [8] 89.83822 86.59636 82.01025 > rowMin(tmp5,na.rm=TRUE) [1] 58.30123 58.19235 57.36620 56.16920 56.31373 58.25957 56.05134 55.02716 [9] 60.32895 54.69959 > > colMeans(tmp5,na.rm=TRUE) [1] 111.80192 67.96761 71.69346 70.62160 71.54599 69.29806 72.58386 [8] 68.08250 68.43355 70.23974 68.12773 63.77907 69.61721 69.61064 [15] 72.46331 70.66952 69.78776 78.17355 73.31615 67.95856 > colSums(tmp5,na.rm=TRUE) [1] 1118.0192 679.6761 716.9346 706.2160 715.4599 692.9806 725.8386 [8] 680.8250 615.9019 702.3974 681.2773 637.7907 696.1721 696.1064 [15] 724.6331 706.6952 697.8776 781.7355 733.1615 679.5856 > colVars(tmp5,na.rm=TRUE) [1] 15821.29473 62.25048 59.69117 42.28522 79.92539 106.55751 [7] 79.18799 47.34596 31.62172 24.04024 70.72328 37.36482 [13] 79.06093 59.88274 118.75269 74.40370 115.38719 134.87199 [19] 68.51852 83.34233 > colSd(tmp5,na.rm=TRUE) [1] 125.782728 7.889897 7.726006 6.502708 8.940100 10.322670 [7] 8.898763 6.880840 5.623319 4.903085 8.409713 6.112677 [13] 8.891622 7.738394 10.897371 8.625758 10.741843 11.613440 [19] 8.277592 9.129202 > colMax(tmp5,na.rm=TRUE) [1] 469.29105 81.79318 82.55387 85.93271 85.00557 89.83822 83.54280 [8] 77.70419 79.31969 79.46563 79.52224 74.28020 82.70436 79.00588 [15] 97.37341 83.64250 88.08438 95.36206 84.50043 82.84287 > colMin(tmp5,na.rm=TRUE) [1] 59.88472 56.94910 56.31373 62.90424 59.61058 57.63895 56.05134 54.69959 [9] 58.44492 64.38641 55.02716 56.16920 58.84461 56.81711 57.18419 58.30123 [17] 59.28190 60.32895 60.39472 58.05625 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 88.00849 69.87528 72.44096 NaN 70.25793 68.58933 68.21589 70.07074 [9] 74.88324 67.70842 > rowSums(tmp5,na.rm=TRUE) [1] 1760.170 1397.506 1448.819 0.000 1405.159 1371.787 1364.318 1401.415 [9] 1497.665 1354.168 > rowVars(tmp5,na.rm=TRUE) [1] 8116.50948 68.38940 89.24736 NA 94.42105 29.87834 [7] 36.38050 90.44108 60.65860 75.84405 > rowSd(tmp5,na.rm=TRUE) [1] 90.091673 8.269788 9.447082 NA 9.717050 5.466109 6.031625 [8] 9.510051 7.788363 8.708849 > rowMax(tmp5,na.rm=TRUE) [1] 469.29105 85.93271 95.36206 NA 88.01392 79.00588 80.99210 [8] 89.83822 86.59636 82.01025 > rowMin(tmp5,na.rm=TRUE) [1] 58.30123 58.19235 57.36620 NA 56.31373 58.25957 56.05134 55.02716 [9] 60.32895 54.69959 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 115.65381 67.31719 72.37529 70.48855 70.49096 69.47638 71.94028 [8] 67.42479 NaN 70.00989 68.28953 64.62461 68.73386 68.94060 [15] 69.69552 71.13073 70.54329 77.85510 72.07345 69.05881 > colSums(tmp5,na.rm=TRUE) [1] 1040.8843 605.8547 651.3776 634.3969 634.4186 625.2875 647.4625 [8] 606.8231 0.0000 630.0890 614.6058 581.6215 618.6047 620.4654 [15] 627.2597 640.1766 634.8896 700.6959 648.6610 621.5293 > colVars(tmp5,na.rm=TRUE) [1] 17632.03913 65.27248 61.92255 47.37172 77.39373 119.51946 [7] 84.42676 48.39772 NA 26.45091 79.26917 33.99237 [13] 80.16509 62.31737 47.41439 81.31109 123.38879 150.59014 [19] 59.70999 80.14126 > colSd(tmp5,na.rm=TRUE) [1] 132.785689 8.079138 7.869088 6.882712 8.797371 10.932495 [7] 9.188403 6.956847 NA 5.143044 8.903323 5.830297 [13] 8.953496 7.894135 6.885811 9.017266 11.108051 12.271517 [19] 7.727224 8.952165 > colMax(tmp5,na.rm=TRUE) [1] 469.29105 81.79318 82.55387 85.93271 85.00557 89.83822 83.54280 [8] 77.70419 -Inf 79.46563 79.52224 74.28020 82.70436 79.00588 [15] 81.44946 83.64250 88.08438 95.36206 83.24666 82.84287 > colMin(tmp5,na.rm=TRUE) [1] 59.88472 56.94910 56.31373 62.90424 59.61058 57.63895 56.05134 54.69959 [9] Inf 64.38641 55.02716 57.36620 58.84461 56.81711 57.18419 58.30123 [17] 59.28190 60.32895 60.39472 58.19235 > > > > > 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] 204.3611 274.1379 181.3522 303.0941 312.6853 116.8442 305.1112 199.1081 [9] 130.6880 184.7758 > apply(copymatrix,1,var,na.rm=TRUE) [1] 204.3611 274.1379 181.3522 303.0941 312.6853 116.8442 305.1112 199.1081 [9] 130.6880 184.7758 > > > > 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.136868e-13 1.136868e-13 2.842171e-14 5.684342e-14 -1.705303e-13 [6] -2.131628e-14 0.000000e+00 -2.842171e-14 -1.136868e-13 -1.136868e-13 [11] -8.526513e-14 1.705303e-13 5.684342e-14 -1.136868e-13 5.684342e-14 [16] 2.842171e-13 0.000000e+00 -5.684342e-14 -5.684342e-14 1.421085e-13 > > > > > > > > > > > ## 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 4 1 5 6 17 4 9 10 6 10 10 9 3 4 11 10 1 4 13 1 12 5 17 9 6 6 18 10 3 7 18 8 1 5 5 5 3 2 2 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.625819 > Min(tmp) [1] -2.615156 > mean(tmp) [1] 0.02378258 > Sum(tmp) [1] 2.378258 > Var(tmp) [1] 1.260904 > > rowMeans(tmp) [1] 0.02378258 > rowSums(tmp) [1] 2.378258 > rowVars(tmp) [1] 1.260904 > rowSd(tmp) [1] 1.1229 > rowMax(tmp) [1] 2.625819 > rowMin(tmp) [1] -2.615156 > > colMeans(tmp) [1] -0.792628570 1.000765088 -0.683462036 0.297966922 1.714591444 [6] -1.155646452 -0.970314730 -1.369086080 0.057013564 0.917224408 [11] 0.672685984 -1.657865942 1.128598787 0.998124692 0.482640650 [16] 1.389043133 -1.381335157 1.568721676 -0.850730520 -0.923176644 [21] 0.314035579 1.113422983 0.036582374 -0.279403802 -0.659776174 [26] -0.688402171 -2.450542598 -0.272055751 0.942886429 -0.079444531 [31] 0.460507728 -0.366205450 0.005307373 0.274253013 0.541928934 [36] -0.194937523 -1.647499098 0.159616424 1.638646098 0.622990846 [41] 0.287698755 -0.248987365 -1.188517172 -0.831292430 1.109998934 [46] -0.660703607 -0.709530016 0.509130779 0.461177939 1.561506953 [51] -2.344392228 -0.812229271 -0.989048552 2.625818551 0.165472725 [56] 0.013270511 1.189638779 -1.173128866 -1.662602403 -1.430628458 [61] 1.270125885 1.130032158 -1.397045345 1.087930865 1.278194048 [66] -2.615156317 -2.513142719 -0.244080710 -0.152390064 0.425147874 [71] 0.200765581 1.614092099 1.406480865 0.574699607 0.805939856 [76] -0.034549685 1.879614782 1.647676597 2.402228578 1.070304762 [81] 0.195820711 0.181381217 -1.025758018 -1.244990355 0.570908023 [86] -1.881769835 1.510485594 -0.629424619 -0.417714738 -0.610198080 [91] -0.229157205 -0.765713890 -1.130880181 -0.855367725 -0.682170425 [96] 0.710030669 0.323495525 0.390273276 1.388267745 0.956177367 > colSums(tmp) [1] -0.792628570 1.000765088 -0.683462036 0.297966922 1.714591444 [6] -1.155646452 -0.970314730 -1.369086080 0.057013564 0.917224408 [11] 0.672685984 -1.657865942 1.128598787 0.998124692 0.482640650 [16] 1.389043133 -1.381335157 1.568721676 -0.850730520 -0.923176644 [21] 0.314035579 1.113422983 0.036582374 -0.279403802 -0.659776174 [26] -0.688402171 -2.450542598 -0.272055751 0.942886429 -0.079444531 [31] 0.460507728 -0.366205450 0.005307373 0.274253013 0.541928934 [36] -0.194937523 -1.647499098 0.159616424 1.638646098 0.622990846 [41] 0.287698755 -0.248987365 -1.188517172 -0.831292430 1.109998934 [46] -0.660703607 -0.709530016 0.509130779 0.461177939 1.561506953 [51] -2.344392228 -0.812229271 -0.989048552 2.625818551 0.165472725 [56] 0.013270511 1.189638779 -1.173128866 -1.662602403 -1.430628458 [61] 1.270125885 1.130032158 -1.397045345 1.087930865 1.278194048 [66] -2.615156317 -2.513142719 -0.244080710 -0.152390064 0.425147874 [71] 0.200765581 1.614092099 1.406480865 0.574699607 0.805939856 [76] -0.034549685 1.879614782 1.647676597 2.402228578 1.070304762 [81] 0.195820711 0.181381217 -1.025758018 -1.244990355 0.570908023 [86] -1.881769835 1.510485594 -0.629424619 -0.417714738 -0.610198080 [91] -0.229157205 -0.765713890 -1.130880181 -0.855367725 -0.682170425 [96] 0.710030669 0.323495525 0.390273276 1.388267745 0.956177367 > 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.792628570 1.000765088 -0.683462036 0.297966922 1.714591444 [6] -1.155646452 -0.970314730 -1.369086080 0.057013564 0.917224408 [11] 0.672685984 -1.657865942 1.128598787 0.998124692 0.482640650 [16] 1.389043133 -1.381335157 1.568721676 -0.850730520 -0.923176644 [21] 0.314035579 1.113422983 0.036582374 -0.279403802 -0.659776174 [26] -0.688402171 -2.450542598 -0.272055751 0.942886429 -0.079444531 [31] 0.460507728 -0.366205450 0.005307373 0.274253013 0.541928934 [36] -0.194937523 -1.647499098 0.159616424 1.638646098 0.622990846 [41] 0.287698755 -0.248987365 -1.188517172 -0.831292430 1.109998934 [46] -0.660703607 -0.709530016 0.509130779 0.461177939 1.561506953 [51] -2.344392228 -0.812229271 -0.989048552 2.625818551 0.165472725 [56] 0.013270511 1.189638779 -1.173128866 -1.662602403 -1.430628458 [61] 1.270125885 1.130032158 -1.397045345 1.087930865 1.278194048 [66] -2.615156317 -2.513142719 -0.244080710 -0.152390064 0.425147874 [71] 0.200765581 1.614092099 1.406480865 0.574699607 0.805939856 [76] -0.034549685 1.879614782 1.647676597 2.402228578 1.070304762 [81] 0.195820711 0.181381217 -1.025758018 -1.244990355 0.570908023 [86] -1.881769835 1.510485594 -0.629424619 -0.417714738 -0.610198080 [91] -0.229157205 -0.765713890 -1.130880181 -0.855367725 -0.682170425 [96] 0.710030669 0.323495525 0.390273276 1.388267745 0.956177367 > colMin(tmp) [1] -0.792628570 1.000765088 -0.683462036 0.297966922 1.714591444 [6] -1.155646452 -0.970314730 -1.369086080 0.057013564 0.917224408 [11] 0.672685984 -1.657865942 1.128598787 0.998124692 0.482640650 [16] 1.389043133 -1.381335157 1.568721676 -0.850730520 -0.923176644 [21] 0.314035579 1.113422983 0.036582374 -0.279403802 -0.659776174 [26] -0.688402171 -2.450542598 -0.272055751 0.942886429 -0.079444531 [31] 0.460507728 -0.366205450 0.005307373 0.274253013 0.541928934 [36] -0.194937523 -1.647499098 0.159616424 1.638646098 0.622990846 [41] 0.287698755 -0.248987365 -1.188517172 -0.831292430 1.109998934 [46] -0.660703607 -0.709530016 0.509130779 0.461177939 1.561506953 [51] -2.344392228 -0.812229271 -0.989048552 2.625818551 0.165472725 [56] 0.013270511 1.189638779 -1.173128866 -1.662602403 -1.430628458 [61] 1.270125885 1.130032158 -1.397045345 1.087930865 1.278194048 [66] -2.615156317 -2.513142719 -0.244080710 -0.152390064 0.425147874 [71] 0.200765581 1.614092099 1.406480865 0.574699607 0.805939856 [76] -0.034549685 1.879614782 1.647676597 2.402228578 1.070304762 [81] 0.195820711 0.181381217 -1.025758018 -1.244990355 0.570908023 [86] -1.881769835 1.510485594 -0.629424619 -0.417714738 -0.610198080 [91] -0.229157205 -0.765713890 -1.130880181 -0.855367725 -0.682170425 [96] 0.710030669 0.323495525 0.390273276 1.388267745 0.956177367 > colMedians(tmp) [1] -0.792628570 1.000765088 -0.683462036 0.297966922 1.714591444 [6] -1.155646452 -0.970314730 -1.369086080 0.057013564 0.917224408 [11] 0.672685984 -1.657865942 1.128598787 0.998124692 0.482640650 [16] 1.389043133 -1.381335157 1.568721676 -0.850730520 -0.923176644 [21] 0.314035579 1.113422983 0.036582374 -0.279403802 -0.659776174 [26] -0.688402171 -2.450542598 -0.272055751 0.942886429 -0.079444531 [31] 0.460507728 -0.366205450 0.005307373 0.274253013 0.541928934 [36] -0.194937523 -1.647499098 0.159616424 1.638646098 0.622990846 [41] 0.287698755 -0.248987365 -1.188517172 -0.831292430 1.109998934 [46] -0.660703607 -0.709530016 0.509130779 0.461177939 1.561506953 [51] -2.344392228 -0.812229271 -0.989048552 2.625818551 0.165472725 [56] 0.013270511 1.189638779 -1.173128866 -1.662602403 -1.430628458 [61] 1.270125885 1.130032158 -1.397045345 1.087930865 1.278194048 [66] -2.615156317 -2.513142719 -0.244080710 -0.152390064 0.425147874 [71] 0.200765581 1.614092099 1.406480865 0.574699607 0.805939856 [76] -0.034549685 1.879614782 1.647676597 2.402228578 1.070304762 [81] 0.195820711 0.181381217 -1.025758018 -1.244990355 0.570908023 [86] -1.881769835 1.510485594 -0.629424619 -0.417714738 -0.610198080 [91] -0.229157205 -0.765713890 -1.130880181 -0.855367725 -0.682170425 [96] 0.710030669 0.323495525 0.390273276 1.388267745 0.956177367 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.7926286 1.000765 -0.683462 0.2979669 1.714591 -1.155646 -0.9703147 [2,] -0.7926286 1.000765 -0.683462 0.2979669 1.714591 -1.155646 -0.9703147 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.369086 0.05701356 0.9172244 0.672686 -1.657866 1.128599 0.9981247 [2,] -1.369086 0.05701356 0.9172244 0.672686 -1.657866 1.128599 0.9981247 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.4826406 1.389043 -1.381335 1.568722 -0.8507305 -0.9231766 0.3140356 [2,] 0.4826406 1.389043 -1.381335 1.568722 -0.8507305 -0.9231766 0.3140356 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.113423 0.03658237 -0.2794038 -0.6597762 -0.6884022 -2.450543 -0.2720558 [2,] 1.113423 0.03658237 -0.2794038 -0.6597762 -0.6884022 -2.450543 -0.2720558 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.9428864 -0.07944453 0.4605077 -0.3662055 0.005307373 0.274253 0.5419289 [2,] 0.9428864 -0.07944453 0.4605077 -0.3662055 0.005307373 0.274253 0.5419289 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.1949375 -1.647499 0.1596164 1.638646 0.6229908 0.2876988 -0.2489874 [2,] -0.1949375 -1.647499 0.1596164 1.638646 0.6229908 0.2876988 -0.2489874 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -1.188517 -0.8312924 1.109999 -0.6607036 -0.70953 0.5091308 0.4611779 [2,] -1.188517 -0.8312924 1.109999 -0.6607036 -0.70953 0.5091308 0.4611779 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.561507 -2.344392 -0.8122293 -0.9890486 2.625819 0.1654727 0.01327051 [2,] 1.561507 -2.344392 -0.8122293 -0.9890486 2.625819 0.1654727 0.01327051 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 1.189639 -1.173129 -1.662602 -1.430628 1.270126 1.130032 -1.397045 [2,] 1.189639 -1.173129 -1.662602 -1.430628 1.270126 1.130032 -1.397045 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 1.087931 1.278194 -2.615156 -2.513143 -0.2440807 -0.1523901 0.4251479 [2,] 1.087931 1.278194 -2.615156 -2.513143 -0.2440807 -0.1523901 0.4251479 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 0.2007656 1.614092 1.406481 0.5746996 0.8059399 -0.03454969 1.879615 [2,] 0.2007656 1.614092 1.406481 0.5746996 0.8059399 -0.03454969 1.879615 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [,85] [1,] 1.647677 2.402229 1.070305 0.1958207 0.1813812 -1.025758 -1.24499 0.570908 [2,] 1.647677 2.402229 1.070305 0.1958207 0.1813812 -1.025758 -1.24499 0.570908 [,86] [,87] [,88] [,89] [,90] [,91] [,92] [1,] -1.88177 1.510486 -0.6294246 -0.4177147 -0.6101981 -0.2291572 -0.7657139 [2,] -1.88177 1.510486 -0.6294246 -0.4177147 -0.6101981 -0.2291572 -0.7657139 [,93] [,94] [,95] [,96] [,97] [,98] [,99] [1,] -1.13088 -0.8553677 -0.6821704 0.7100307 0.3234955 0.3902733 1.388268 [2,] -1.13088 -0.8553677 -0.6821704 0.7100307 0.3234955 0.3902733 1.388268 [,100] [1,] 0.9561774 [2,] 0.9561774 > > > Max(tmp2) [1] 2.715259 > Min(tmp2) [1] -2.578968 > mean(tmp2) [1] -0.105173 > Sum(tmp2) [1] -10.5173 > Var(tmp2) [1] 0.8793395 > > rowMeans(tmp2) [1] 0.503388586 -0.853128511 0.475530942 -0.312466762 1.633646913 [6] -0.469314801 -0.865767591 0.651908602 -0.769966616 -0.528222196 [11] -0.305204107 -0.520447445 -0.700473204 -0.002488013 0.861123439 [16] -1.330717097 -1.873273719 -0.205161686 -1.047594604 -1.946115826 [21] -1.079088091 1.519145552 -0.633329928 2.715258511 -0.371989631 [26] 0.635991902 0.047262971 0.294712870 -0.052166661 0.379859361 [31] 0.250901358 -0.181225892 -0.642633281 -0.334283872 0.661304611 [36] 1.082530372 -2.578968080 -1.028689930 0.067957544 -0.206394707 [41] 0.151835932 -0.289228284 0.007989551 -0.223266957 0.207397054 [46] -0.070302557 0.232150068 0.816061279 -2.281663472 -0.568470727 [51] -1.684841363 0.398477835 0.724214002 1.267997942 1.092110472 [56] 0.831929516 0.357230521 -1.632508305 0.710756744 -1.004663112 [61] -0.447162278 -0.543634529 0.929070734 0.432515074 -0.764822932 [66] -0.919630690 -0.064951857 -0.592559761 -0.068875392 -0.026337310 [71] -1.129527148 -1.264704210 -0.324733907 -0.535140009 -0.135636118 [76] -0.265213538 -0.306522246 0.685431793 0.145759767 1.649305493 [81] -1.005892193 -0.330663823 -1.025869442 1.270538014 1.494670468 [86] -1.644009864 -0.691605754 -0.434002936 1.056716303 -0.212759411 [91] 0.823133670 0.380090492 -1.949017141 1.656168987 -0.373743502 [96] 0.565350122 1.043517247 -0.469332258 0.093175662 0.798984976 > rowSums(tmp2) [1] 0.503388586 -0.853128511 0.475530942 -0.312466762 1.633646913 [6] -0.469314801 -0.865767591 0.651908602 -0.769966616 -0.528222196 [11] -0.305204107 -0.520447445 -0.700473204 -0.002488013 0.861123439 [16] -1.330717097 -1.873273719 -0.205161686 -1.047594604 -1.946115826 [21] -1.079088091 1.519145552 -0.633329928 2.715258511 -0.371989631 [26] 0.635991902 0.047262971 0.294712870 -0.052166661 0.379859361 [31] 0.250901358 -0.181225892 -0.642633281 -0.334283872 0.661304611 [36] 1.082530372 -2.578968080 -1.028689930 0.067957544 -0.206394707 [41] 0.151835932 -0.289228284 0.007989551 -0.223266957 0.207397054 [46] -0.070302557 0.232150068 0.816061279 -2.281663472 -0.568470727 [51] -1.684841363 0.398477835 0.724214002 1.267997942 1.092110472 [56] 0.831929516 0.357230521 -1.632508305 0.710756744 -1.004663112 [61] -0.447162278 -0.543634529 0.929070734 0.432515074 -0.764822932 [66] -0.919630690 -0.064951857 -0.592559761 -0.068875392 -0.026337310 [71] -1.129527148 -1.264704210 -0.324733907 -0.535140009 -0.135636118 [76] -0.265213538 -0.306522246 0.685431793 0.145759767 1.649305493 [81] -1.005892193 -0.330663823 -1.025869442 1.270538014 1.494670468 [86] -1.644009864 -0.691605754 -0.434002936 1.056716303 -0.212759411 [91] 0.823133670 0.380090492 -1.949017141 1.656168987 -0.373743502 [96] 0.565350122 1.043517247 -0.469332258 0.093175662 0.798984976 > 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.503388586 -0.853128511 0.475530942 -0.312466762 1.633646913 [6] -0.469314801 -0.865767591 0.651908602 -0.769966616 -0.528222196 [11] -0.305204107 -0.520447445 -0.700473204 -0.002488013 0.861123439 [16] -1.330717097 -1.873273719 -0.205161686 -1.047594604 -1.946115826 [21] -1.079088091 1.519145552 -0.633329928 2.715258511 -0.371989631 [26] 0.635991902 0.047262971 0.294712870 -0.052166661 0.379859361 [31] 0.250901358 -0.181225892 -0.642633281 -0.334283872 0.661304611 [36] 1.082530372 -2.578968080 -1.028689930 0.067957544 -0.206394707 [41] 0.151835932 -0.289228284 0.007989551 -0.223266957 0.207397054 [46] -0.070302557 0.232150068 0.816061279 -2.281663472 -0.568470727 [51] -1.684841363 0.398477835 0.724214002 1.267997942 1.092110472 [56] 0.831929516 0.357230521 -1.632508305 0.710756744 -1.004663112 [61] -0.447162278 -0.543634529 0.929070734 0.432515074 -0.764822932 [66] -0.919630690 -0.064951857 -0.592559761 -0.068875392 -0.026337310 [71] -1.129527148 -1.264704210 -0.324733907 -0.535140009 -0.135636118 [76] -0.265213538 -0.306522246 0.685431793 0.145759767 1.649305493 [81] -1.005892193 -0.330663823 -1.025869442 1.270538014 1.494670468 [86] -1.644009864 -0.691605754 -0.434002936 1.056716303 -0.212759411 [91] 0.823133670 0.380090492 -1.949017141 1.656168987 -0.373743502 [96] 0.565350122 1.043517247 -0.469332258 0.093175662 0.798984976 > rowMin(tmp2) [1] 0.503388586 -0.853128511 0.475530942 -0.312466762 1.633646913 [6] -0.469314801 -0.865767591 0.651908602 -0.769966616 -0.528222196 [11] -0.305204107 -0.520447445 -0.700473204 -0.002488013 0.861123439 [16] -1.330717097 -1.873273719 -0.205161686 -1.047594604 -1.946115826 [21] -1.079088091 1.519145552 -0.633329928 2.715258511 -0.371989631 [26] 0.635991902 0.047262971 0.294712870 -0.052166661 0.379859361 [31] 0.250901358 -0.181225892 -0.642633281 -0.334283872 0.661304611 [36] 1.082530372 -2.578968080 -1.028689930 0.067957544 -0.206394707 [41] 0.151835932 -0.289228284 0.007989551 -0.223266957 0.207397054 [46] -0.070302557 0.232150068 0.816061279 -2.281663472 -0.568470727 [51] -1.684841363 0.398477835 0.724214002 1.267997942 1.092110472 [56] 0.831929516 0.357230521 -1.632508305 0.710756744 -1.004663112 [61] -0.447162278 -0.543634529 0.929070734 0.432515074 -0.764822932 [66] -0.919630690 -0.064951857 -0.592559761 -0.068875392 -0.026337310 [71] -1.129527148 -1.264704210 -0.324733907 -0.535140009 -0.135636118 [76] -0.265213538 -0.306522246 0.685431793 0.145759767 1.649305493 [81] -1.005892193 -0.330663823 -1.025869442 1.270538014 1.494670468 [86] -1.644009864 -0.691605754 -0.434002936 1.056716303 -0.212759411 [91] 0.823133670 0.380090492 -1.949017141 1.656168987 -0.373743502 [96] 0.565350122 1.043517247 -0.469332258 0.093175662 0.798984976 > > colMeans(tmp2) [1] -0.105173 > colSums(tmp2) [1] -10.5173 > colVars(tmp2) [1] 0.8793395 > colSd(tmp2) [1] 0.9377311 > colMax(tmp2) [1] 2.715259 > colMin(tmp2) [1] -2.578968 > colMedians(tmp2) [1] -0.1931938 > colRanges(tmp2) [,1] [1,] -2.578968 [2,] 2.715259 > > dataset1 <- matrix(dataset1,1,100) > > agree.checks(tmp,dataset1) > > dataset2 <- matrix(dataset2,100,1) > agree.checks(tmp2,dataset2) > > > tmp <- createBufferedMatrix(10,10) > > tmp[1:10,1:10] <- rnorm(100) > colApply(tmp,sum) [1] 0.1230675 0.7481465 3.8497767 -1.8052259 1.3314451 2.5473361 [7] 0.8169537 -5.4938397 4.4809579 0.4297421 > colApply(tmp,quantile)[,1] [,1] [1,] -1.362759310 [2,] -0.527389818 [3,] 0.000846664 [4,] 0.436097679 [5,] 1.500019228 > > rowApply(tmp,sum) [1] 5.22612029 3.21233465 0.56533355 -2.49523224 3.51159045 2.46047315 [7] -3.11782603 0.02828401 -2.89382927 0.53111141 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 5 4 8 2 2 9 6 2 9 7 [2,] 4 10 2 1 3 8 10 8 8 2 [3,] 6 8 6 7 6 7 3 1 10 9 [4,] 2 9 3 6 8 6 1 4 4 5 [5,] 7 1 4 3 4 3 5 7 7 10 [6,] 10 3 7 8 1 5 4 10 3 6 [7,] 1 6 10 4 7 10 8 3 2 3 [8,] 9 2 5 5 5 1 9 5 1 1 [9,] 8 7 9 9 10 4 2 6 5 8 [10,] 3 5 1 10 9 2 7 9 6 4 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] -0.3063726 -1.3845567 1.6035235 3.5885708 1.4945785 -1.6282005 [7] 1.8854084 -1.8897655 -3.3257816 0.4178474 1.1848909 -2.0726254 [13] -2.2969586 3.8389052 0.4360317 0.2682210 -0.8990189 7.5818318 [19] -2.5249507 -2.0338306 > colApply(tmp,quantile)[,1] [,1] [1,] -1.13219238 [2,] -0.30724486 [3,] 0.01528869 [4,] 0.32229552 [5,] 0.79548048 > > rowApply(tmp,sum) [1] -4.0403513 -0.9622021 6.3280120 4.6330432 -2.0207538 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 17 11 4 3 12 [2,] 6 6 13 16 3 [3,] 14 18 8 7 13 [4,] 8 9 9 18 20 [5,] 10 20 17 12 4 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.79548048 -0.7284464 -0.02635555 -0.5192199 -0.4381731 -0.6800890 [2,] 0.01528869 -0.5921119 1.49325280 -0.2721345 1.9811679 0.3485051 [3,] -0.30724486 0.5965594 -0.14817476 -0.1156411 1.1340541 0.8106959 [4,] -1.13219238 1.1303400 -0.04787715 1.1870228 0.4376099 -0.9268039 [5,] 0.32229552 -1.7908978 0.33267812 3.3085435 -1.6200802 -1.1805086 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.2034633 -1.8125397 -1.96443987 0.3900493 -0.4633799 -1.0089174 [2,] 0.9131475 -1.4225259 -0.18159362 -1.1779683 0.3388421 -0.9841064 [3,] -0.2817923 -1.2193619 0.98755190 0.5401141 -0.3050008 1.2207903 [4,] 1.5365529 1.7758175 -0.08809937 -1.3532100 0.6544753 -1.9040606 [5,] -0.0790364 0.7888444 -2.07920067 2.0188623 0.9599542 0.6036686 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.07295872 1.98807644 -0.8776287 0.8216839 0.2527595 2.1052813 [2,] -2.72403499 1.01659104 0.6565408 0.3192910 -0.5403202 1.5344511 [3,] 1.86328060 0.05135246 -0.2530369 0.6032712 0.4786251 1.5905146 [4,] 0.04447251 0.27910538 1.1550847 0.1217447 0.7380712 0.4029701 [5,] -1.40771800 0.50377987 -0.2449283 -1.5977699 -1.8281544 1.9486147 [,19] [,20] [1,] -0.31082688 -1.2872437 [2,] -1.30988572 -0.3745988 [3,] -0.31317701 -0.6053680 [4,] -0.08102926 0.7030487 [5,] -0.51003181 -0.4696687 > > > 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-mac-arm64/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2.1 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-mac-arm64/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 708 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-mac-arm64/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 612 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-mac-arm64/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 2.1 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.9508645 -0.263932 -1.219409 0.2430024 -0.02357033 -0.3657319 -1.839269 col8 col9 col10 col11 col12 col13 col14 row1 -1.17305 1.615525 -0.5883951 0.2771313 1.22103 0.9057427 -0.6824355 col15 col16 col17 col18 col19 col20 row1 -0.2593303 1.121406 1.653321 -0.58091 -0.5780802 0.3324634 > tmp[,"col10"] col10 row1 -0.58839510 row2 0.09011442 row3 0.12632287 row4 -0.03722888 row5 0.88457393 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.9508645 -0.263932 -1.2194095 0.2430024 -0.02357033 -0.3657319 row5 -0.9523650 0.385004 -0.6399032 1.1005744 -1.78706316 0.1347630 col7 col8 col9 col10 col11 col12 col13 row1 -1.8392687 -1.1730502 1.6155254 -0.5883951 0.2771313 1.2210305 0.9057427 row5 -0.3012012 0.9635523 -0.4309522 0.8845739 0.3117986 -0.1779262 0.1604796 col14 col15 col16 col17 col18 col19 col20 row1 -0.6824355 -0.2593303 1.1214060 1.653321 -0.580910 -0.5780802 0.3324634 row5 1.2376979 -0.7457192 -0.6718195 -1.186499 -2.045632 -0.6971467 -0.2084791 > tmp[,c("col6","col20")] col6 col20 row1 -0.3657319 0.3324634 row2 0.9432228 -0.7423083 row3 1.6703246 0.3989353 row4 2.0832492 -0.3428262 row5 0.1347630 -0.2084791 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.3657319 0.3324634 row5 0.1347630 -0.2084791 > > > > > 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 51.30862 49.01253 50.13323 50.67141 49.85757 104.5149 49.77264 49.38668 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.73012 50.32566 50.17249 48.87902 49.99225 49.25213 49.48891 52.80102 col17 col18 col19 col20 row1 50.15437 50.98385 48.8769 104.5296 > tmp[,"col10"] col10 row1 50.32566 row2 29.39926 row3 31.38703 row4 28.63576 row5 49.22902 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 51.30862 49.01253 50.13323 50.67141 49.85757 104.5149 49.77264 49.38668 row5 49.58835 50.28306 48.06348 50.20871 49.52293 104.4737 49.65700 48.89568 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.73012 50.32566 50.17249 48.87902 49.99225 49.25213 49.48891 52.80102 row5 50.74893 49.22902 49.92212 50.34471 49.50782 49.37627 49.26179 50.53509 col17 col18 col19 col20 row1 50.15437 50.98385 48.87690 104.5296 row5 49.89763 49.20996 51.92499 105.0679 > tmp[,c("col6","col20")] col6 col20 row1 104.51486 104.52958 row2 75.41101 73.27756 row3 76.51153 76.20333 row4 74.30795 75.24869 row5 104.47372 105.06790 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 104.5149 104.5296 row5 104.4737 105.0679 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 104.5149 104.5296 row5 104.4737 105.0679 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.7560705 [2,] -0.9275309 [3,] 0.4489159 [4,] -0.9673527 [5,] 0.2445393 > tmp[,c("col17","col7")] col17 col7 [1,] -0.8916599 1.24019190 [2,] -0.1084343 0.15829303 [3,] -1.1407619 0.70089049 [4,] -1.9555509 -0.13795693 [5,] 1.1025988 -0.08879725 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -1.21162425 -0.7478089 [2,] -0.06799743 -1.3927200 [3,] 0.47720378 -1.2636097 [4,] 1.70383695 -1.1131255 [5,] -0.48316133 -0.4930452 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -1.211624 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -1.21162425 [2,] -0.06799743 > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > > > > subBufferedMatrix(tmp,c("row3","row1"),)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row3 -0.64487535 1.456866 -0.3214786 0.2774945 -0.2402591 2.3226019 0.4093047 row1 0.07534875 1.403652 2.1458076 0.5565722 2.0701166 0.8527521 -0.8166659 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 1.101514 0.8951960 -1.2611819 1.176842 -1.1511288 -2.6969897 0.05785806 row1 2.073045 0.3539149 -0.2326745 1.890358 -0.4507658 0.8664675 2.98249177 [,15] [,16] [,17] [,18] [,19] [,20] row3 0.7724110 -0.8813395 -0.1220078 0.3370512 0.4993105 0.8260216 row1 0.7583516 0.2339132 -0.4957334 -0.2156366 0.6419940 1.9606363 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -1.10139 0.01924628 0.07225446 -0.6692773 -1.629171 -0.0575012 -1.038141 [,8] [,9] [,10] row2 1.244573 -0.6028623 -0.2236059 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -0.4254028 -1.60711 1.373145 -2.40164 -0.7014411 -0.7786665 0.847004 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 1.796541 -1.274563 -2.265689 -0.03670012 1.175879 -0.6865542 -0.4590135 [,15] [,16] [,17] [,18] [,19] [,20] row5 0.1254799 0.4892758 -1.414975 -0.667741 0.3949897 0.7016431 > > > 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: 0x6000003ff420> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc31c543621" [2] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc35cadbf0e" [3] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc312da5fab" [4] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc33ebedd38" [5] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc364ada7b6" [6] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc344ddd15d" [7] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc33edc53fd" [8] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc3730e2748" [9] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc3263522fb" [10] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc36a8ba055" [11] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc374cb6318" [12] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc354d6f88f" [13] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc36d589fcc" [14] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc355634229" [15] "/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests/BMbdc3678cbd8a" > > > ### 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: 0x6000003d9740> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x6000003d9740> Warning message: In dir.create(new.directory) : '/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/BufferedMatrix.Rcheck/tests' already exists > > > RowMode(tmp) <pointer: 0x6000003d9740> > rowMedians(tmp) [1] -0.1359131056 -0.7267168701 0.4144857517 -0.1519766208 -0.0978644133 [6] 0.5421080379 0.5545904137 -0.7053164541 -0.6023006858 -0.0856271334 [11] 0.0919277996 -0.1528213211 0.3621126016 0.3793149842 -0.0520359347 [16] 0.0217771740 0.2695960959 0.0799270673 0.1450663317 0.1582194856 [21] -0.3402355606 0.0866341393 0.0678683169 -0.2639070812 0.2443763275 [26] 0.0494704665 -0.3785652922 -0.1352169601 0.0136248897 0.0639621966 [31] 0.0075232373 0.5960581802 0.6915204839 -0.5409177835 0.1584279761 [36] 0.6853987632 -0.1771131062 0.1366303055 0.4251757835 -0.2352948286 [41] 0.0192626432 -0.3360023434 -0.0481051373 0.8634371796 0.2615489190 [46] 0.2640874878 0.5019192415 0.3093481946 -0.2683583375 0.2752238608 [51] 0.0964840009 -0.2091203480 0.2416056049 0.3610030671 -0.2954984474 [56] 0.2872038929 -0.1820672132 -0.0268812653 -0.3967510233 0.1042923129 [61] 0.1287343961 0.5970241400 -0.0090343058 0.3597131766 -0.2862190273 [66] 0.1449330418 -0.1917680672 -0.1403079004 0.0962045702 -0.2770783337 [71] -0.3932663100 0.3688201640 0.2042595263 0.5513379011 -0.2634909299 [76] 0.6168919050 0.0828268457 -0.2692220883 0.1274109627 -0.2990229525 [81] -0.1719583528 -0.7720918097 0.3788210557 0.1027271374 -0.5926532045 [86] -0.1004508818 -0.0182255265 0.4290896689 0.3436023694 -0.3967875148 [91] 0.3790182138 -0.1716318907 0.0684717571 0.0009627751 -0.1778895951 [96] 0.1417738813 0.4792439479 -0.1524922762 0.2216376297 -0.5824071124 [101] 0.0699066987 0.7535040514 -0.3035376230 -0.0113071154 -0.2457836147 [106] 0.0351876428 0.5269387014 0.4057348103 -0.3231751755 -0.2803661267 [111] -0.0304086361 0.5839405150 -0.0707750415 -0.3098675316 -0.1738307805 [116] -0.2499095264 0.5004218040 0.4184929546 0.6765643926 0.1153965126 [121] 0.1634946647 -0.0004056549 -0.0723265434 0.3007582316 0.0802627903 [126] 0.0622449551 -0.0047955533 -0.3549354893 0.2202540212 -0.1517142668 [131] -0.2359713916 -0.4266005301 -0.3903681609 -0.2237063006 -0.1292523718 [136] 0.1099098988 -0.0123315889 0.0061762336 -0.9966727587 -0.1663608658 [141] -0.1136452310 -0.3640858766 0.1499811956 0.6143608678 -0.1332499899 [146] 0.1280122345 -0.0731183833 -0.0164216412 -0.5102683477 -0.3722465768 [151] 0.6112059886 0.0224636860 -0.5001318451 0.0178634479 -0.1849101643 [156] -0.0175188655 0.6477109831 -0.0822811923 0.7740394862 0.1024726225 [161] 0.4643337912 -0.2243129703 0.2198804732 -0.1449524990 -0.1703464473 [166] -0.5894459884 -0.0882436551 -0.3071652762 0.0763447844 0.6517450839 [171] 0.0997925254 -0.1664398944 -0.3493569205 -0.3821970377 0.3954829017 [176] 0.3233368123 0.3346121622 -0.1783355923 -0.0997087414 0.0402491894 [181] 0.1592730012 0.0922552681 0.4732665769 -0.1625843265 0.0568251861 [186] 0.2921390671 0.1755122339 -0.1637316627 0.0362184093 -0.5744884174 [191] 0.4000762349 0.1738823267 0.1920601914 0.3725092957 0.5224817547 [196] -0.2220177110 0.3042630325 0.1327840288 -0.2644322614 -0.3815037686 [201] 0.0339301075 0.6158330819 0.0794236878 -0.2811307660 0.4100567515 [206] 0.2109490414 0.0252904343 0.0649733293 0.4251317306 0.2669202355 [211] -0.1489863823 0.2117149909 -0.1260909312 0.2818491321 -0.0741194340 [216] 0.0701059934 0.1039866834 0.4427922694 0.2152241009 0.0959315359 [221] -0.1801609707 -0.1838805764 -0.2929909879 -0.3122406966 0.1341589788 [226] -0.5840433923 -0.2696893742 -0.0091288046 0.0893242583 0.0976107322 > > proc.time() user system elapsed 1.911 7.169 9.261
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R version 4.3.3 (2024-02-29) -- "Angel Food Cake" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: aarch64-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: 0x60000277c660> > .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: 0x60000277c660> > .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: 0x60000277c660> > .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: 0x60000277c660> > 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: 0x600002778660> > .Call("R_bm_AddColumn",P) <pointer: 0x600002778660> > .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: 0x600002778660> > .Call("R_bm_AddColumn",P) <pointer: 0x600002778660> > .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: 0x600002778660> > 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: 0x600002778840> > .Call("R_bm_AddColumn",P) <pointer: 0x600002778840> > .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: 0x600002778840> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600002778840> > .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: 0x600002778840> > > .Call("R_bm_RowMode",P) <pointer: 0x600002778840> > .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: 0x600002778840> > > .Call("R_bm_ColMode",P) <pointer: 0x600002778840> > .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: 0x600002778840> > 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: 0x600002778a20> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x600002778a20> > .Call("R_bm_AddColumn",P) <pointer: 0x600002778a20> > .Call("R_bm_AddColumn",P) <pointer: 0x600002778a20> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilebdf944a84e71" "BufferedMatrixFilebdf95a3ca9af" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFilebdf944a84e71" "BufferedMatrixFilebdf95a3ca9af" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x600002778b40> > .Call("R_bm_AddColumn",P) <pointer: 0x600002778b40> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600002778b40> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x600002778b40> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x600002778b40> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x600002778b40> > .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: 0x600002778d20> > .Call("R_bm_AddColumn",P) <pointer: 0x600002778d20> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x600002778d20> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x600002778d20> > 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: 0x600002778f00> > .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: 0x600002778f00> > rm(P) > > proc.time() user system elapsed 0.375 0.099 0.461
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R version 4.3.3 (2024-02-29) -- "Angel Food Cake" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: aarch64-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.391 0.073 0.449