Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-02-04 11:41 -0500 (Tue, 04 Feb 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | R Under development (unstable) (2025-01-20 r87609) -- "Unsuffered Consequences" | 4716 |
palomino7 | Windows Server 2022 Datacenter | x64 | R Under development (unstable) (2025-01-21 r87610 ucrt) -- "Unsuffered Consequences" | 4478 |
lconway | macOS 12.7.1 Monterey | x86_64 | R Under development (unstable) (2025-01-22 r87618) -- "Unsuffered Consequences" | 4489 |
kjohnson3 | macOS 13.7.1 Ventura | arm64 | R Under development (unstable) (2025-01-20 r87609) -- "Unsuffered Consequences" | 4442 |
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 247/2295 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
BufferedMatrix 1.71.1 (landing page) Ben Bolstad
| nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) / x86_64 | OK | OK | OK | |||||||||
palomino7 | Windows Server 2022 Datacenter / x64 | OK | OK | OK | OK | |||||||||
lconway | macOS 12.7.1 Monterey / x86_64 | OK | OK | WARNINGS | OK | |||||||||
kjohnson3 | macOS 13.7.1 Ventura / arm64 | OK | OK | WARNINGS | OK | |||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.71.1 |
Command: E:\biocbuild\bbs-3.21-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=E:\biocbuild\bbs-3.21-bioc\R\library --no-vignettes --timings BufferedMatrix_1.71.1.tar.gz |
StartedAt: 2025-02-03 23:44:50 -0500 (Mon, 03 Feb 2025) |
EndedAt: 2025-02-03 23:47:57 -0500 (Mon, 03 Feb 2025) |
EllapsedTime: 187.0 seconds |
RetCode: 0 |
Status: OK |
CheckDir: BufferedMatrix.Rcheck |
Warnings: 0 |
############################################################################## ############################################################################## ### ### Running command: ### ### E:\biocbuild\bbs-3.21-bioc\R\bin\R.exe CMD check --no-multiarch --install=check:BufferedMatrix.install-out.txt --library=E:\biocbuild\bbs-3.21-bioc\R\library --no-vignettes --timings BufferedMatrix_1.71.1.tar.gz ### ############################################################################## ############################################################################## * using log directory 'E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck' * using R Under development (unstable) (2025-01-21 r87610 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.3.0 GNU Fortran (GCC) 13.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * using option '--no-vignettes' * checking for file 'BufferedMatrix/DESCRIPTION' ... OK * this is package 'BufferedMatrix' version '1.71.1' * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'BufferedMatrix' can be installed ... OK * used C compiler: 'gcc.exe (GCC) 13.3.0' * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... NOTE checkRd: (-1) BufferedMatrix-class.Rd:209: Lost braces; missing escapes or markup? 209 | $x^{power}$ elementwise of the matrix | ^ prepare_Rd: createBufferedMatrix.Rd:26: Dropping empty section \keyword prepare_Rd: createBufferedMatrix.Rd:17-18: Dropping empty section \details prepare_Rd: createBufferedMatrix.Rd:15-16: Dropping empty section \value prepare_Rd: createBufferedMatrix.Rd:19-20: Dropping empty section \references prepare_Rd: createBufferedMatrix.Rd:21-22: Dropping empty section \seealso prepare_Rd: createBufferedMatrix.Rd:23-24: Dropping empty section \examples * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... NOTE Note: information on .o files for x64 is not available File 'E:/biocbuild/bbs-3.21-bioc/R/library/BufferedMatrix/libs/x64/BufferedMatrix.dll': Found '_exit', possibly from '_exit' (C) Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran) Compiled code should not call entry points which might terminate R nor write to stdout/stderr instead of to the console, nor use Fortran I/O nor system RNGs nor [v]sprintf. The detected symbols are linked into the code but might come from libraries and not actually be called. See 'Writing portable packages' in the 'Writing R Extensions' manual. * 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: 2 NOTEs See 'E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/00check.log' for details.
BufferedMatrix.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### E:\biocbuild\bbs-3.21-bioc\R\bin\R.exe CMD INSTALL BufferedMatrix ### ############################################################################## ############################################################################## * installing to library 'E:/biocbuild/bbs-3.21-bioc/R/library' * installing *source* package 'BufferedMatrix' ... ** this is package 'BufferedMatrix' version '1.71.1' ** using staged installation ** libs using C compiler: 'gcc.exe (GCC) 13.3.0' gcc -I"E:/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RBufferedMatrix.c -o RBufferedMatrix.o gcc -I"E:/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix.c -o doubleBufferedMatrix.o doubleBufferedMatrix.c: In function 'dbm_ReadOnlyMode': doubleBufferedMatrix.c:1580:7: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] 1580 | if (!(Matrix->readonly) & setting){ | ^~~~~~~~~~~~~~~~~~~ doubleBufferedMatrix.c: At top level: doubleBufferedMatrix.c:3327:12: warning: 'sort_double' defined but not used [-Wunused-function] 3327 | static int sort_double(const double *a1,const double *a2){ | ^~~~~~~~~~~ gcc -I"E:/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c doubleBufferedMatrix_C_tests.c -o doubleBufferedMatrix_C_tests.o gcc -I"E:/biocbuild/bbs-3.21-bioc/R/include" -DNDEBUG -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c init_package.c -o init_package.o gcc -shared -s -static-libgcc -o BufferedMatrix.dll tmp.def RBufferedMatrix.o doubleBufferedMatrix.o doubleBufferedMatrix_C_tests.o init_package.o -LC:/rtools44/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools44/x86_64-w64-mingw32.static.posix/lib -LE:/biocbuild/bbs-3.21-bioc/R/bin/x64 -lR installing to E:/biocbuild/bbs-3.21-bioc/R/library/00LOCK-BufferedMatrix/00new/BufferedMatrix/libs/x64 ** 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 ** 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) (2025-01-21 r87610 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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.23 0.17 1.67
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2025-01-21 r87610 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests" > prefix(tmp3) [1] "BM" > > ## testing if we can remove these objects > rm(tmp, tmp2, tmp3) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 474475 25.4 1040745 55.6 629794 33.7 Vcells 866166 6.7 8388608 64.0 2036777 15.6 > > > > > ## > ## checking reads > ## > > tmp2 <- createBufferedMatrix(10,20) > > test.sample <- rnorm(10*20) > > tmp2[1:10,1:20] <- test.sample > > test.matrix <- matrix(test.sample,10,20) > > ## testing reads > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Mon Feb 3 23:45:46 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Mon Feb 3 23:45:48 2025" > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > > > RowMode(tmp2) <pointer: 0x000001f2702f81d0> > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + which.col <- sample(1:20,1) + if (tmp2[which.row,which.col] != test.matrix[which.row,which.col]){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.row <- sample(1:10,1) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > for (rep in 1:nreps){ + which.col <- sample(1:20,1) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[,which.col] == test.matrix[,which.col])){ + cat("incorrect agreement") + break; + } + } > > > > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + if (!all(tmp2[which.row,] == test.matrix[which.row,])){ + cat("incorrect agreement") + break; + } + } > > > date() [1] "Mon Feb 3 23:46:14 2025" > for (rep in 1:nreps){ + which.row <- sample(1:10,5,replace=TRUE) + which.col <- sample(1:20,5,replace=TRUE) + if (!all(tmp2[which.row,which.col] == test.matrix[which.row,which.col])){ + cat("incorrect agreement") + break; + } + } > date() [1] "Mon Feb 3 23:46:21 2025" > > ColMode(tmp2) <pointer: 0x000001f2702f81d0> > > > > ### 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.55043209 0.1678350 -0.6765531 0.9884638 [2,] -0.03322580 0.7454572 1.3267072 0.5848318 [3,] -0.08638372 1.2770758 1.3629775 0.2410968 [4,] 0.51592263 0.3308406 1.4911147 2.2148429 > ewApply(tmp5,abs) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 99.55043209 0.1678350 0.6765531 0.9884638 [2,] 0.03322580 0.7454572 1.3267072 0.5848318 [3,] 0.08638372 1.2770758 1.3629775 0.2410968 [4,] 0.51592263 0.3308406 1.4911147 2.2148429 > ewApply(tmp5,sqrt) BufferedMatrix object Matrix size: 10 20 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 9.9774963 0.4096767 0.8225285 0.9942152 [2,] 0.1822795 0.8633987 1.1518278 0.7647430 [3,] 0.2939111 1.1300778 1.1674663 0.4910160 [4,] 0.7182775 0.5751874 1.2211121 1.4882348 > > 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: E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.9 Kilobytes. Disk usage : 1.6 Kilobytes. > tmp5[1:4,1:4] [,1] [,2] [,3] [,4] [1,] 224.32539 29.26460 33.90184 35.93062 [2,] 26.85602 34.37944 37.84498 33.23226 [3,] 28.02549 37.57785 38.03764 30.15126 [4,] 32.69870 31.08271 38.70224 42.09719 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x000001f2702f85f0> > exp(tmp5) <pointer: 0x000001f2702f85f0> > log(tmp5,2) <pointer: 0x000001f2702f85f0> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 466.9039 > Min(tmp5) [1] 54.2027 > mean(tmp5) [1] 72.974 > Sum(tmp5) [1] 14594.8 > Var(tmp5) [1] 854.6646 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 90.55628 72.58790 70.14162 73.31031 70.28103 70.94506 67.71572 73.54305 [9] 68.29589 72.36312 > rowSums(tmp5) [1] 1811.126 1451.758 1402.832 1466.206 1405.621 1418.901 1354.314 1470.861 [9] 1365.918 1447.262 > rowVars(tmp5) [1] 7901.58169 60.92173 69.97077 75.04647 73.45838 60.61727 [7] 104.19298 87.26365 36.38352 83.08164 > rowSd(tmp5) [1] 88.890841 7.805237 8.364853 8.662937 8.570786 7.785709 10.207496 [8] 9.341501 6.031875 9.114913 > rowMax(tmp5) [1] 466.90392 82.44301 91.74046 87.61979 87.94310 81.85931 85.63461 [8] 89.78264 75.15647 87.74860 > rowMin(tmp5) [1] 57.43639 54.40143 57.02010 55.48204 55.97628 54.95542 54.20270 58.55626 [9] 55.60945 54.28886 > > colMeans(tmp5) [1] 109.28944 71.75993 74.31354 73.67668 70.33402 68.58622 70.44890 [8] 68.54031 72.36264 70.41333 70.07275 75.87871 70.91055 71.55435 [15] 71.22158 70.59503 70.52673 74.10514 66.20263 68.68743 > colSums(tmp5) [1] 1092.8944 717.5993 743.1354 736.7668 703.3402 685.8622 704.4890 [8] 685.4031 723.6264 704.1333 700.7275 758.7871 709.1055 715.5435 [15] 712.2158 705.9503 705.2673 741.0514 662.0263 686.8743 > colVars(tmp5) [1] 15864.18449 82.34286 82.04621 68.53124 44.99224 21.39119 [7] 61.19011 55.21020 44.72479 64.30954 91.36348 126.13452 [13] 113.05867 101.38365 81.55720 85.47167 31.23216 75.12676 [19] 53.09132 100.11706 > colSd(tmp5) [1] 125.953104 9.074297 9.057936 8.278360 6.707625 4.625062 [7] 7.822411 7.430357 6.687660 8.019323 9.558425 11.230963 [13] 10.632905 10.068945 9.030903 9.245089 5.588574 8.667569 [19] 7.286379 10.005851 > colMax(tmp5) [1] 466.90392 87.94310 83.34998 87.61979 79.24853 75.54083 79.31255 [8] 78.74858 83.01353 82.44301 85.63461 91.74046 87.41830 84.52555 [15] 89.75197 87.74860 79.93641 86.39362 76.97700 81.85931 > colMin(tmp5) [1] 55.89729 60.74483 54.28886 62.15861 58.27699 61.83035 55.87929 55.97628 [9] 60.36657 54.77993 54.95542 60.04579 56.42277 54.40143 57.98667 54.20270 [17] 59.34561 61.94699 54.59646 55.48204 > > > ### 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] 90.55628 72.58790 70.14162 73.31031 70.28103 NA 67.71572 73.54305 [9] 68.29589 72.36312 > rowSums(tmp5) [1] 1811.126 1451.758 1402.832 1466.206 1405.621 NA 1354.314 1470.861 [9] 1365.918 1447.262 > rowVars(tmp5) [1] 7901.58169 60.92173 69.97077 75.04647 73.45838 58.88277 [7] 104.19298 87.26365 36.38352 83.08164 > rowSd(tmp5) [1] 88.890841 7.805237 8.364853 8.662937 8.570786 7.673511 10.207496 [8] 9.341501 6.031875 9.114913 > rowMax(tmp5) [1] 466.90392 82.44301 91.74046 87.61979 87.94310 NA 85.63461 [8] 89.78264 75.15647 87.74860 > rowMin(tmp5) [1] 57.43639 54.40143 57.02010 55.48204 55.97628 NA 54.20270 58.55626 [9] 55.60945 54.28886 > > colMeans(tmp5) [1] 109.28944 71.75993 74.31354 73.67668 70.33402 68.58622 70.44890 [8] 68.54031 72.36264 70.41333 70.07275 75.87871 70.91055 71.55435 [15] 71.22158 NA 70.52673 74.10514 66.20263 68.68743 > colSums(tmp5) [1] 1092.8944 717.5993 743.1354 736.7668 703.3402 685.8622 704.4890 [8] 685.4031 723.6264 704.1333 700.7275 758.7871 709.1055 715.5435 [15] 712.2158 NA 705.2673 741.0514 662.0263 686.8743 > colVars(tmp5) [1] 15864.18449 82.34286 82.04621 68.53124 44.99224 21.39119 [7] 61.19011 55.21020 44.72479 64.30954 91.36348 126.13452 [13] 113.05867 101.38365 81.55720 NA 31.23216 75.12676 [19] 53.09132 100.11706 > colSd(tmp5) [1] 125.953104 9.074297 9.057936 8.278360 6.707625 4.625062 [7] 7.822411 7.430357 6.687660 8.019323 9.558425 11.230963 [13] 10.632905 10.068945 9.030903 NA 5.588574 8.667569 [19] 7.286379 10.005851 > colMax(tmp5) [1] 466.90392 87.94310 83.34998 87.61979 79.24853 75.54083 79.31255 [8] 78.74858 83.01353 82.44301 85.63461 91.74046 87.41830 84.52555 [15] 89.75197 NA 79.93641 86.39362 76.97700 81.85931 > colMin(tmp5) [1] 55.89729 60.74483 54.28886 62.15861 58.27699 61.83035 55.87929 55.97628 [9] 60.36657 54.77993 54.95542 60.04579 56.42277 54.40143 57.98667 NA [17] 59.34561 61.94699 54.59646 55.48204 > > Max(tmp5,na.rm=TRUE) [1] 466.9039 > Min(tmp5,na.rm=TRUE) [1] 54.2027 > mean(tmp5,na.rm=TRUE) [1] 73.03113 > Sum(tmp5,na.rm=TRUE) [1] 14533.19 > Var(tmp5,na.rm=TRUE) [1] 858.325 > > rowMeans(tmp5,na.rm=TRUE) [1] 90.55628 72.58790 70.14162 73.31031 70.28103 71.43667 67.71572 73.54305 [9] 68.29589 72.36312 > rowSums(tmp5,na.rm=TRUE) [1] 1811.126 1451.758 1402.832 1466.206 1405.621 1357.297 1354.314 1470.861 [9] 1365.918 1447.262 > rowVars(tmp5,na.rm=TRUE) [1] 7901.58169 60.92173 69.97077 75.04647 73.45838 58.88277 [7] 104.19298 87.26365 36.38352 83.08164 > rowSd(tmp5,na.rm=TRUE) [1] 88.890841 7.805237 8.364853 8.662937 8.570786 7.673511 10.207496 [8] 9.341501 6.031875 9.114913 > rowMax(tmp5,na.rm=TRUE) [1] 466.90392 82.44301 91.74046 87.61979 87.94310 81.85931 85.63461 [8] 89.78264 75.15647 87.74860 > rowMin(tmp5,na.rm=TRUE) [1] 57.43639 54.40143 57.02010 55.48204 55.97628 54.95542 54.20270 58.55626 [9] 55.60945 54.28886 > > colMeans(tmp5,na.rm=TRUE) [1] 109.28944 71.75993 74.31354 73.67668 70.33402 68.58622 70.44890 [8] 68.54031 72.36264 70.41333 70.07275 75.87871 70.91055 71.55435 [15] 71.22158 71.59398 70.52673 74.10514 66.20263 68.68743 > colSums(tmp5,na.rm=TRUE) [1] 1092.8944 717.5993 743.1354 736.7668 703.3402 685.8622 704.4890 [8] 685.4031 723.6264 704.1333 700.7275 758.7871 709.1055 715.5435 [15] 712.2158 644.3458 705.2673 741.0514 662.0263 686.8743 > colVars(tmp5,na.rm=TRUE) [1] 15864.18449 82.34286 82.04621 68.53124 44.99224 21.39119 [7] 61.19011 55.21020 44.72479 64.30954 91.36348 126.13452 [13] 113.05867 101.38365 81.55720 84.92924 31.23216 75.12676 [19] 53.09132 100.11706 > colSd(tmp5,na.rm=TRUE) [1] 125.953104 9.074297 9.057936 8.278360 6.707625 4.625062 [7] 7.822411 7.430357 6.687660 8.019323 9.558425 11.230963 [13] 10.632905 10.068945 9.030903 9.215706 5.588574 8.667569 [19] 7.286379 10.005851 > colMax(tmp5,na.rm=TRUE) [1] 466.90392 87.94310 83.34998 87.61979 79.24853 75.54083 79.31255 [8] 78.74858 83.01353 82.44301 85.63461 91.74046 87.41830 84.52555 [15] 89.75197 87.74860 79.93641 86.39362 76.97700 81.85931 > colMin(tmp5,na.rm=TRUE) [1] 55.89729 60.74483 54.28886 62.15861 58.27699 61.83035 55.87929 55.97628 [9] 60.36657 54.77993 54.95542 60.04579 56.42277 54.40143 57.98667 54.20270 [17] 59.34561 61.94699 54.59646 55.48204 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 90.55628 72.58790 70.14162 73.31031 70.28103 NaN 67.71572 73.54305 [9] 68.29589 72.36312 > rowSums(tmp5,na.rm=TRUE) [1] 1811.126 1451.758 1402.832 1466.206 1405.621 0.000 1354.314 1470.861 [9] 1365.918 1447.262 > rowVars(tmp5,na.rm=TRUE) [1] 7901.58169 60.92173 69.97077 75.04647 73.45838 NA [7] 104.19298 87.26365 36.38352 83.08164 > rowSd(tmp5,na.rm=TRUE) [1] 88.890841 7.805237 8.364853 8.662937 8.570786 NA 10.207496 [8] 9.341501 6.031875 9.114913 > rowMax(tmp5,na.rm=TRUE) [1] 466.90392 82.44301 91.74046 87.61979 87.94310 NA 85.63461 [8] 89.78264 75.15647 87.74860 > rowMin(tmp5,na.rm=TRUE) [1] 57.43639 54.40143 57.02010 55.48204 55.97628 NA 54.20270 58.55626 [9] 55.60945 54.28886 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 112.92896 72.40941 73.65546 74.95646 70.07062 67.81348 70.35799 [8] 68.80659 71.50981 71.10433 71.75245 76.07333 71.99630 70.69264 [15] 70.87458 NaN 69.48122 74.45222 66.23496 67.22389 > colSums(tmp5,na.rm=TRUE) [1] 1016.3607 651.6847 662.8991 674.6082 630.6356 610.3213 633.2220 [8] 619.2593 643.5883 639.9390 645.7721 684.6599 647.9667 636.2337 [15] 637.8712 0.0000 625.3309 670.0700 596.1146 605.0150 > colVars(tmp5,na.rm=TRUE) [1] 17698.18863 87.89021 87.42988 58.67184 49.83575 17.34750 [7] 68.74591 61.31382 42.13311 66.97662 71.04313 141.47523 [13] 113.92876 105.70282 90.39719 NA 22.83868 83.16241 [19] 59.71597 88.53468 > colSd(tmp5,na.rm=TRUE) [1] 133.034539 9.374978 9.350395 7.659755 7.059444 4.165033 [7] 8.291315 7.830314 6.491002 8.183925 8.428708 11.894336 [13] 10.673741 10.281187 9.507744 NA 4.778984 9.119343 [19] 7.727611 9.409287 > colMax(tmp5,na.rm=TRUE) [1] 466.90392 87.94310 83.34998 87.61979 79.24853 73.92233 79.31255 [8] 78.74858 83.01353 82.44301 85.63461 91.74046 87.41830 84.52555 [15] 89.75197 -Inf 74.40458 86.39362 76.97700 77.36035 > colMin(tmp5,na.rm=TRUE) [1] 55.89729 60.74483 54.28886 62.75589 58.27699 61.83035 55.87929 55.97628 [9] 60.36657 54.77993 57.43639 60.04579 56.42277 54.40143 57.98667 Inf [17] 59.34561 61.94699 54.59646 55.48204 > > > > > 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] 163.6213 117.1961 185.7781 239.4746 190.0870 327.0160 206.3437 184.9361 [9] 163.8589 192.8061 > apply(copymatrix,1,var,na.rm=TRUE) [1] 163.6213 117.1961 185.7781 239.4746 190.0870 327.0160 206.3437 184.9361 [9] 163.8589 192.8061 > > > > 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] 0.000000e+00 1.136868e-13 5.684342e-14 -1.705303e-13 -1.421085e-13 [6] -1.705303e-13 -5.684342e-14 8.526513e-14 -2.842171e-14 1.421085e-13 [11] 0.000000e+00 -5.684342e-14 5.684342e-14 5.684342e-14 -7.105427e-14 [16] 0.000000e+00 5.684342e-14 -2.557954e-13 -8.526513e-14 2.842171e-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) + } 10 15 3 13 3 6 10 8 4 17 3 13 3 11 10 6 3 9 8 7 9 20 7 8 6 14 4 3 7 17 5 2 6 3 8 5 6 2 5 5 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.101025 > Min(tmp) [1] -1.976976 > mean(tmp) [1] 0.08650964 > Sum(tmp) [1] 8.650964 > Var(tmp) [1] 0.861887 > > rowMeans(tmp) [1] 0.08650964 > rowSums(tmp) [1] 8.650964 > rowVars(tmp) [1] 0.861887 > rowSd(tmp) [1] 0.9283787 > rowMax(tmp) [1] 2.101025 > rowMin(tmp) [1] -1.976976 > > colMeans(tmp) [1] -1.12509027 -0.53978427 0.39933405 -1.13029376 -0.32930286 -1.25210215 [7] -0.02723231 -1.74274730 -0.18277109 1.01322536 0.16162147 2.10102514 [13] 0.76933398 1.63188193 0.22221195 0.36982576 -0.19616542 -1.23469785 [19] 0.75128422 0.25929296 -1.10259921 1.63841662 0.23985251 0.61681073 [25] 1.72817411 0.65521575 0.07903885 0.81303515 0.74662746 1.47314903 [31] 0.90079321 -0.10184799 0.08857215 -0.76067500 1.67157475 -0.17318935 [37] 1.53732812 -0.69880568 0.31897633 0.50729706 -1.97697622 0.34297030 [43] -1.58041041 0.90839142 -0.94333333 0.30635284 0.08229418 0.75552945 [49] 1.24073083 0.10045748 0.20636550 0.05609227 -0.08433611 0.85289651 [55] -0.02785379 -0.56036904 -1.26485544 1.46052413 -0.21537488 -0.57151746 [61] 1.26673834 -0.57141928 0.71849644 1.49167502 -0.90791114 1.48567503 [67] 1.43139997 -1.70492346 -0.64530653 -0.38298381 -0.11744891 0.79470033 [73] -1.20091858 0.35160419 1.41171122 -0.31678632 0.30568852 -0.62304349 [79] 0.73417246 -0.46574255 -1.00314185 -0.76155433 0.58475763 1.16766028 [85] -0.09514958 0.39731103 0.87133943 -0.70895059 -1.37901610 0.51419643 [91] 0.59465087 -0.54263752 -1.65276612 0.40891456 -0.23978217 0.09230761 [97] 0.01691533 -1.11143224 0.67831344 -1.42052153 > colSums(tmp) [1] -1.12509027 -0.53978427 0.39933405 -1.13029376 -0.32930286 -1.25210215 [7] -0.02723231 -1.74274730 -0.18277109 1.01322536 0.16162147 2.10102514 [13] 0.76933398 1.63188193 0.22221195 0.36982576 -0.19616542 -1.23469785 [19] 0.75128422 0.25929296 -1.10259921 1.63841662 0.23985251 0.61681073 [25] 1.72817411 0.65521575 0.07903885 0.81303515 0.74662746 1.47314903 [31] 0.90079321 -0.10184799 0.08857215 -0.76067500 1.67157475 -0.17318935 [37] 1.53732812 -0.69880568 0.31897633 0.50729706 -1.97697622 0.34297030 [43] -1.58041041 0.90839142 -0.94333333 0.30635284 0.08229418 0.75552945 [49] 1.24073083 0.10045748 0.20636550 0.05609227 -0.08433611 0.85289651 [55] -0.02785379 -0.56036904 -1.26485544 1.46052413 -0.21537488 -0.57151746 [61] 1.26673834 -0.57141928 0.71849644 1.49167502 -0.90791114 1.48567503 [67] 1.43139997 -1.70492346 -0.64530653 -0.38298381 -0.11744891 0.79470033 [73] -1.20091858 0.35160419 1.41171122 -0.31678632 0.30568852 -0.62304349 [79] 0.73417246 -0.46574255 -1.00314185 -0.76155433 0.58475763 1.16766028 [85] -0.09514958 0.39731103 0.87133943 -0.70895059 -1.37901610 0.51419643 [91] 0.59465087 -0.54263752 -1.65276612 0.40891456 -0.23978217 0.09230761 [97] 0.01691533 -1.11143224 0.67831344 -1.42052153 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] -1.12509027 -0.53978427 0.39933405 -1.13029376 -0.32930286 -1.25210215 [7] -0.02723231 -1.74274730 -0.18277109 1.01322536 0.16162147 2.10102514 [13] 0.76933398 1.63188193 0.22221195 0.36982576 -0.19616542 -1.23469785 [19] 0.75128422 0.25929296 -1.10259921 1.63841662 0.23985251 0.61681073 [25] 1.72817411 0.65521575 0.07903885 0.81303515 0.74662746 1.47314903 [31] 0.90079321 -0.10184799 0.08857215 -0.76067500 1.67157475 -0.17318935 [37] 1.53732812 -0.69880568 0.31897633 0.50729706 -1.97697622 0.34297030 [43] -1.58041041 0.90839142 -0.94333333 0.30635284 0.08229418 0.75552945 [49] 1.24073083 0.10045748 0.20636550 0.05609227 -0.08433611 0.85289651 [55] -0.02785379 -0.56036904 -1.26485544 1.46052413 -0.21537488 -0.57151746 [61] 1.26673834 -0.57141928 0.71849644 1.49167502 -0.90791114 1.48567503 [67] 1.43139997 -1.70492346 -0.64530653 -0.38298381 -0.11744891 0.79470033 [73] -1.20091858 0.35160419 1.41171122 -0.31678632 0.30568852 -0.62304349 [79] 0.73417246 -0.46574255 -1.00314185 -0.76155433 0.58475763 1.16766028 [85] -0.09514958 0.39731103 0.87133943 -0.70895059 -1.37901610 0.51419643 [91] 0.59465087 -0.54263752 -1.65276612 0.40891456 -0.23978217 0.09230761 [97] 0.01691533 -1.11143224 0.67831344 -1.42052153 > colMin(tmp) [1] -1.12509027 -0.53978427 0.39933405 -1.13029376 -0.32930286 -1.25210215 [7] -0.02723231 -1.74274730 -0.18277109 1.01322536 0.16162147 2.10102514 [13] 0.76933398 1.63188193 0.22221195 0.36982576 -0.19616542 -1.23469785 [19] 0.75128422 0.25929296 -1.10259921 1.63841662 0.23985251 0.61681073 [25] 1.72817411 0.65521575 0.07903885 0.81303515 0.74662746 1.47314903 [31] 0.90079321 -0.10184799 0.08857215 -0.76067500 1.67157475 -0.17318935 [37] 1.53732812 -0.69880568 0.31897633 0.50729706 -1.97697622 0.34297030 [43] -1.58041041 0.90839142 -0.94333333 0.30635284 0.08229418 0.75552945 [49] 1.24073083 0.10045748 0.20636550 0.05609227 -0.08433611 0.85289651 [55] -0.02785379 -0.56036904 -1.26485544 1.46052413 -0.21537488 -0.57151746 [61] 1.26673834 -0.57141928 0.71849644 1.49167502 -0.90791114 1.48567503 [67] 1.43139997 -1.70492346 -0.64530653 -0.38298381 -0.11744891 0.79470033 [73] -1.20091858 0.35160419 1.41171122 -0.31678632 0.30568852 -0.62304349 [79] 0.73417246 -0.46574255 -1.00314185 -0.76155433 0.58475763 1.16766028 [85] -0.09514958 0.39731103 0.87133943 -0.70895059 -1.37901610 0.51419643 [91] 0.59465087 -0.54263752 -1.65276612 0.40891456 -0.23978217 0.09230761 [97] 0.01691533 -1.11143224 0.67831344 -1.42052153 > colMedians(tmp) [1] -1.12509027 -0.53978427 0.39933405 -1.13029376 -0.32930286 -1.25210215 [7] -0.02723231 -1.74274730 -0.18277109 1.01322536 0.16162147 2.10102514 [13] 0.76933398 1.63188193 0.22221195 0.36982576 -0.19616542 -1.23469785 [19] 0.75128422 0.25929296 -1.10259921 1.63841662 0.23985251 0.61681073 [25] 1.72817411 0.65521575 0.07903885 0.81303515 0.74662746 1.47314903 [31] 0.90079321 -0.10184799 0.08857215 -0.76067500 1.67157475 -0.17318935 [37] 1.53732812 -0.69880568 0.31897633 0.50729706 -1.97697622 0.34297030 [43] -1.58041041 0.90839142 -0.94333333 0.30635284 0.08229418 0.75552945 [49] 1.24073083 0.10045748 0.20636550 0.05609227 -0.08433611 0.85289651 [55] -0.02785379 -0.56036904 -1.26485544 1.46052413 -0.21537488 -0.57151746 [61] 1.26673834 -0.57141928 0.71849644 1.49167502 -0.90791114 1.48567503 [67] 1.43139997 -1.70492346 -0.64530653 -0.38298381 -0.11744891 0.79470033 [73] -1.20091858 0.35160419 1.41171122 -0.31678632 0.30568852 -0.62304349 [79] 0.73417246 -0.46574255 -1.00314185 -0.76155433 0.58475763 1.16766028 [85] -0.09514958 0.39731103 0.87133943 -0.70895059 -1.37901610 0.51419643 [91] 0.59465087 -0.54263752 -1.65276612 0.40891456 -0.23978217 0.09230761 [97] 0.01691533 -1.11143224 0.67831344 -1.42052153 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.12509 -0.5397843 0.399334 -1.130294 -0.3293029 -1.252102 -0.02723231 [2,] -1.12509 -0.5397843 0.399334 -1.130294 -0.3293029 -1.252102 -0.02723231 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -1.742747 -0.1827711 1.013225 0.1616215 2.101025 0.769334 1.631882 [2,] -1.742747 -0.1827711 1.013225 0.1616215 2.101025 0.769334 1.631882 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.2222119 0.3698258 -0.1961654 -1.234698 0.7512842 0.259293 -1.102599 [2,] 0.2222119 0.3698258 -0.1961654 -1.234698 0.7512842 0.259293 -1.102599 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.638417 0.2398525 0.6168107 1.728174 0.6552157 0.07903885 0.8130351 [2,] 1.638417 0.2398525 0.6168107 1.728174 0.6552157 0.07903885 0.8130351 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] 0.7466275 1.473149 0.9007932 -0.101848 0.08857215 -0.760675 1.671575 [2,] 0.7466275 1.473149 0.9007932 -0.101848 0.08857215 -0.760675 1.671575 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.1731894 1.537328 -0.6988057 0.3189763 0.5072971 -1.976976 0.3429703 [2,] -0.1731894 1.537328 -0.6988057 0.3189763 0.5072971 -1.976976 0.3429703 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] -1.58041 0.9083914 -0.9433333 0.3063528 0.08229418 0.7555295 1.240731 [2,] -1.58041 0.9083914 -0.9433333 0.3063528 0.08229418 0.7555295 1.240731 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.1004575 0.2063655 0.05609227 -0.08433611 0.8528965 -0.02785379 -0.560369 [2,] 0.1004575 0.2063655 0.05609227 -0.08433611 0.8528965 -0.02785379 -0.560369 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -1.264855 1.460524 -0.2153749 -0.5715175 1.266738 -0.5714193 0.7184964 [2,] -1.264855 1.460524 -0.2153749 -0.5715175 1.266738 -0.5714193 0.7184964 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 1.491675 -0.9079111 1.485675 1.4314 -1.704923 -0.6453065 -0.3829838 [2,] 1.491675 -0.9079111 1.485675 1.4314 -1.704923 -0.6453065 -0.3829838 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] -0.1174489 0.7947003 -1.200919 0.3516042 1.411711 -0.3167863 0.3056885 [2,] -0.1174489 0.7947003 -1.200919 0.3516042 1.411711 -0.3167863 0.3056885 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -0.6230435 0.7341725 -0.4657426 -1.003142 -0.7615543 0.5847576 1.16766 [2,] -0.6230435 0.7341725 -0.4657426 -1.003142 -0.7615543 0.5847576 1.16766 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -0.09514958 0.397311 0.8713394 -0.7089506 -1.379016 0.5141964 0.5946509 [2,] -0.09514958 0.397311 0.8713394 -0.7089506 -1.379016 0.5141964 0.5946509 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -0.5426375 -1.652766 0.4089146 -0.2397822 0.09230761 0.01691533 -1.111432 [2,] -0.5426375 -1.652766 0.4089146 -0.2397822 0.09230761 0.01691533 -1.111432 [,99] [,100] [1,] 0.6783134 -1.420522 [2,] 0.6783134 -1.420522 > > > Max(tmp2) [1] 2.318793 > Min(tmp2) [1] -2.935 > mean(tmp2) [1] -0.2767268 > Sum(tmp2) [1] -27.67268 > Var(tmp2) [1] 0.9700193 > > rowMeans(tmp2) [1] -1.690538719 1.082546528 -1.772758784 1.224896796 0.136300007 [6] -1.133998279 0.191741883 -0.330197487 -0.669771876 -0.016488406 [11] -0.762166729 -1.534870727 0.064063951 0.074239047 0.621669804 [16] 0.297277890 -1.945920331 -0.771063606 -0.210218079 0.531181262 [21] -1.224717238 -1.336753266 1.237025763 -0.083282302 -0.493171085 [26] 1.127806478 -0.174675671 1.319021608 0.972021888 -1.248937440 [31] 0.583062910 -0.027877249 0.059312482 0.090789729 0.452293503 [36] 2.318792521 -1.982005584 -1.402436073 -0.140281853 -0.607835342 [41] -0.192994943 -0.636955428 -0.565609255 -0.550079524 -1.730084231 [46] -2.290294812 -2.934999990 -0.746943298 -1.506896217 0.993142361 [51] -0.450617185 -0.646605666 0.345130276 -0.875420193 0.655605894 [56] 0.415631383 -1.271851314 -0.614657125 0.790607600 -0.907164162 [61] 1.785888873 -0.947863342 -1.039029228 -0.937723304 -1.033597191 [66] 0.269114421 -0.195839821 -0.904927949 -0.213974848 -0.423861752 [71] 0.011353586 0.830835294 -1.784645815 -0.867565705 1.298922884 [76] -0.003581264 -1.105713853 0.837592760 0.224090069 0.104549624 [81] -1.024815884 -0.154514875 -2.339057446 0.415293039 0.039726612 [86] -0.270297681 0.040530994 -1.546057374 0.746072742 -0.666812319 [91] 0.309806256 0.051788555 0.888572610 -0.619127766 -0.988043534 [96] 1.547586347 0.203595286 0.677921909 -1.609163633 0.617273129 > rowSums(tmp2) [1] -1.690538719 1.082546528 -1.772758784 1.224896796 0.136300007 [6] -1.133998279 0.191741883 -0.330197487 -0.669771876 -0.016488406 [11] -0.762166729 -1.534870727 0.064063951 0.074239047 0.621669804 [16] 0.297277890 -1.945920331 -0.771063606 -0.210218079 0.531181262 [21] -1.224717238 -1.336753266 1.237025763 -0.083282302 -0.493171085 [26] 1.127806478 -0.174675671 1.319021608 0.972021888 -1.248937440 [31] 0.583062910 -0.027877249 0.059312482 0.090789729 0.452293503 [36] 2.318792521 -1.982005584 -1.402436073 -0.140281853 -0.607835342 [41] -0.192994943 -0.636955428 -0.565609255 -0.550079524 -1.730084231 [46] -2.290294812 -2.934999990 -0.746943298 -1.506896217 0.993142361 [51] -0.450617185 -0.646605666 0.345130276 -0.875420193 0.655605894 [56] 0.415631383 -1.271851314 -0.614657125 0.790607600 -0.907164162 [61] 1.785888873 -0.947863342 -1.039029228 -0.937723304 -1.033597191 [66] 0.269114421 -0.195839821 -0.904927949 -0.213974848 -0.423861752 [71] 0.011353586 0.830835294 -1.784645815 -0.867565705 1.298922884 [76] -0.003581264 -1.105713853 0.837592760 0.224090069 0.104549624 [81] -1.024815884 -0.154514875 -2.339057446 0.415293039 0.039726612 [86] -0.270297681 0.040530994 -1.546057374 0.746072742 -0.666812319 [91] 0.309806256 0.051788555 0.888572610 -0.619127766 -0.988043534 [96] 1.547586347 0.203595286 0.677921909 -1.609163633 0.617273129 > 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] -1.690538719 1.082546528 -1.772758784 1.224896796 0.136300007 [6] -1.133998279 0.191741883 -0.330197487 -0.669771876 -0.016488406 [11] -0.762166729 -1.534870727 0.064063951 0.074239047 0.621669804 [16] 0.297277890 -1.945920331 -0.771063606 -0.210218079 0.531181262 [21] -1.224717238 -1.336753266 1.237025763 -0.083282302 -0.493171085 [26] 1.127806478 -0.174675671 1.319021608 0.972021888 -1.248937440 [31] 0.583062910 -0.027877249 0.059312482 0.090789729 0.452293503 [36] 2.318792521 -1.982005584 -1.402436073 -0.140281853 -0.607835342 [41] -0.192994943 -0.636955428 -0.565609255 -0.550079524 -1.730084231 [46] -2.290294812 -2.934999990 -0.746943298 -1.506896217 0.993142361 [51] -0.450617185 -0.646605666 0.345130276 -0.875420193 0.655605894 [56] 0.415631383 -1.271851314 -0.614657125 0.790607600 -0.907164162 [61] 1.785888873 -0.947863342 -1.039029228 -0.937723304 -1.033597191 [66] 0.269114421 -0.195839821 -0.904927949 -0.213974848 -0.423861752 [71] 0.011353586 0.830835294 -1.784645815 -0.867565705 1.298922884 [76] -0.003581264 -1.105713853 0.837592760 0.224090069 0.104549624 [81] -1.024815884 -0.154514875 -2.339057446 0.415293039 0.039726612 [86] -0.270297681 0.040530994 -1.546057374 0.746072742 -0.666812319 [91] 0.309806256 0.051788555 0.888572610 -0.619127766 -0.988043534 [96] 1.547586347 0.203595286 0.677921909 -1.609163633 0.617273129 > rowMin(tmp2) [1] -1.690538719 1.082546528 -1.772758784 1.224896796 0.136300007 [6] -1.133998279 0.191741883 -0.330197487 -0.669771876 -0.016488406 [11] -0.762166729 -1.534870727 0.064063951 0.074239047 0.621669804 [16] 0.297277890 -1.945920331 -0.771063606 -0.210218079 0.531181262 [21] -1.224717238 -1.336753266 1.237025763 -0.083282302 -0.493171085 [26] 1.127806478 -0.174675671 1.319021608 0.972021888 -1.248937440 [31] 0.583062910 -0.027877249 0.059312482 0.090789729 0.452293503 [36] 2.318792521 -1.982005584 -1.402436073 -0.140281853 -0.607835342 [41] -0.192994943 -0.636955428 -0.565609255 -0.550079524 -1.730084231 [46] -2.290294812 -2.934999990 -0.746943298 -1.506896217 0.993142361 [51] -0.450617185 -0.646605666 0.345130276 -0.875420193 0.655605894 [56] 0.415631383 -1.271851314 -0.614657125 0.790607600 -0.907164162 [61] 1.785888873 -0.947863342 -1.039029228 -0.937723304 -1.033597191 [66] 0.269114421 -0.195839821 -0.904927949 -0.213974848 -0.423861752 [71] 0.011353586 0.830835294 -1.784645815 -0.867565705 1.298922884 [76] -0.003581264 -1.105713853 0.837592760 0.224090069 0.104549624 [81] -1.024815884 -0.154514875 -2.339057446 0.415293039 0.039726612 [86] -0.270297681 0.040530994 -1.546057374 0.746072742 -0.666812319 [91] 0.309806256 0.051788555 0.888572610 -0.619127766 -0.988043534 [96] 1.547586347 0.203595286 0.677921909 -1.609163633 0.617273129 > > colMeans(tmp2) [1] -0.2767268 > colSums(tmp2) [1] -27.67268 > colVars(tmp2) [1] 0.9700193 > colSd(tmp2) [1] 0.9848956 > colMax(tmp2) [1] 2.318793 > colMin(tmp2) [1] -2.935 > colMedians(tmp2) [1] -0.1944174 > colRanges(tmp2) [,1] [1,] -2.935000 [2,] 2.318793 > > 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] -1.0670595 -2.3841534 1.1819252 -1.5052567 -3.5697046 -6.4556837 [7] 0.1092118 -2.9131601 -1.1144871 -1.3504279 > colApply(tmp,quantile)[,1] [,1] [1,] -1.8261378 [2,] -0.6228094 [3,] -0.4202505 [4,] 0.6633877 [5,] 1.8143750 > > rowApply(tmp,sum) [1] -5.9234880 1.6605712 -5.3241563 0.6563360 -0.5239633 -1.1776202 [7] -5.1730206 -0.9530000 1.0777966 -3.3882515 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 6 5 1 9 10 5 7 2 9 4 [2,] 8 3 3 2 2 10 9 7 1 6 [3,] 7 10 8 3 4 1 8 8 10 3 [4,] 9 1 10 10 3 3 5 1 8 9 [5,] 5 4 7 8 1 7 3 4 5 8 [6,] 3 7 6 6 5 2 1 6 3 2 [7,] 10 2 5 7 8 6 6 9 2 7 [8,] 2 6 2 5 7 8 4 3 6 10 [9,] 4 8 4 4 6 9 2 5 7 5 [10,] 1 9 9 1 9 4 10 10 4 1 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.6296825 0.9137605 4.0239792 -4.1990904 3.6410730 -0.4011636 [7] 0.2245369 2.7797018 -1.2677239 -1.5015889 -3.4439720 -1.0296443 [13] -0.2612093 0.4497188 2.1469796 0.1166359 3.4660542 -0.5042917 [19] -3.6078053 -1.5718861 > colApply(tmp,quantile)[,1] [,1] [1,] -1.717076 [2,] -1.509562 [3,] 1.135269 [4,] 1.160823 [5,] 1.560229 > > rowApply(tmp,sum) [1] -0.6964083 -0.5673356 3.7576914 -4.2753089 2.3851085 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 1 17 14 3 19 [2,] 6 19 10 14 12 [3,] 10 14 20 18 14 [4,] 2 15 3 1 7 [5,] 20 5 18 15 18 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.717076 -0.80455010 -0.1096467 -1.3066383 1.2816281 0.950235395 [2,] 1.160823 1.39352587 0.6928676 0.8059310 -1.1541832 1.476785150 [3,] 1.135269 0.14329050 1.7722107 -1.4908574 1.5566976 -1.786960959 [4,] -1.509562 0.02422758 1.3448071 -1.9514165 0.4413418 -1.038488779 [5,] 1.560229 0.15726669 0.3237405 -0.2561092 1.5155886 -0.002734438 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -1.22570978 0.14837135 1.0351786 0.4417628 0.1224168 0.8722889 [2,] 0.96077329 1.34477102 0.6390792 -1.1810744 -1.3872597 -0.5312627 [3,] -0.05584706 0.04292997 -1.3582740 0.7253411 -0.4637180 -0.2029112 [4,] 1.00823151 -0.35111762 -0.1266123 -1.8433026 -1.1049305 -0.4756382 [5,] -0.46291102 1.59474707 -1.4570953 0.3556842 -0.6104805 -0.6921211 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.92545838 -0.3805904 1.0739755 -0.2224969 0.4170331 -0.22123276 [2,] -0.32468021 -0.3776431 -1.3480391 -2.0412619 -0.5513536 -0.31699861 [3,] 1.75596654 0.4726504 1.4878733 1.2444716 1.3196782 0.83847309 [4,] -0.75065856 1.3472876 -0.0472848 0.8118865 2.1051574 -0.78752755 [5,] -0.01637866 -0.6119857 0.9804547 0.3240367 0.1755392 -0.01700588 [,19] [,20] [1,] -1.1069805 0.98108126 [2,] 0.1212725 0.05059196 [3,] -2.3162063 -1.06238597 [4,] -0.1356246 -1.23608410 [5,] -0.1702665 -0.30508929 > > > is.BufferedMatrix(tmp) [1] TRUE > > as.BufferedMatrix(as.matrix(tmp)) BufferedMatrix object Matrix size: 5 20 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 800 bytes. > > > > subBufferedMatrix(tmp,1:5,1:5) BufferedMatrix object Matrix size: 5 5 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 624 bytes. Disk usage : 200 bytes. > subBufferedMatrix(tmp,,5:8) BufferedMatrix object Matrix size: 5 4 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 542 bytes. Disk usage : 160 bytes. > subBufferedMatrix(tmp,1:3,) BufferedMatrix object Matrix size: 3 20 Buffer size: 1 1 Directory: E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests Prefix: BM Mode: Col mode Read Only: FALSE Memory usage : 1.8 Kilobytes. Disk usage : 480 bytes. > > > rm(tmp) > > > ### > ### Testing colnames and rownames > ### > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > > > colnames(tmp) NULL > rownames(tmp) NULL > > > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > rownames(tmp) <- rownames(tmp,do.NULL=FALSE) > > colnames(tmp) [1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" [10] "col10" "col11" "col12" "col13" "col14" "col15" "col16" "col17" "col18" [19] "col19" "col20" > rownames(tmp) [1] "row1" "row2" "row3" "row4" "row5" > > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 row1 1.006692 -0.8839999 -0.1425164 -0.3566069 -0.8956643 -0.9102946 1.204742 col8 col9 col10 col11 col12 col13 col14 row1 -1.072006 -1.455182 -0.6627793 -0.5872421 -1.151275 1.866623 0.09431694 col15 col16 col17 col18 col19 col20 row1 0.648235 0.2828212 -0.1217816 -0.5620688 1.557209 -0.6535884 > tmp[,"col10"] col10 row1 -0.6627793 row2 -2.0396015 row3 1.6287950 row4 0.6777049 row5 -1.2934883 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 1.0066916 -0.8839999 -0.1425164 -0.3566069 -0.8956643 -0.9102946 row5 -0.5900343 0.4191943 1.0333121 0.2436769 0.7699725 -0.1505832 col7 col8 col9 col10 col11 col12 col13 row1 1.2047420 -1.072006 -1.4551818 -0.6627793 -0.5872421 -1.1512749 1.8666229 row5 0.5499024 1.561485 0.5887496 -1.2934883 0.1827709 -0.2444437 0.4785483 col14 col15 col16 col17 col18 col19 row1 0.09431694 0.6482350 0.2828212 -0.1217816 -0.5620688 1.5572088 row5 0.99047831 -0.5928478 -0.3129672 1.1577075 -0.5716062 0.2100469 col20 row1 -0.6535884 row5 -1.3998366 > tmp[,c("col6","col20")] col6 col20 row1 -0.9102946 -0.6535884 row2 -0.5704492 -0.3372395 row3 1.6739799 0.7570007 row4 0.4008449 0.4423340 row5 -0.1505832 -1.3998366 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.9102946 -0.6535884 row5 -0.1505832 -1.3998366 > > > > > 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 52.64537 49.35254 47.37534 49.54291 50.77787 102.3723 48.55503 50.32796 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.5407 50.45454 47.63365 49.36573 51.89548 51.602 51.48216 48.54226 col17 col18 col19 col20 row1 49.69176 50.21947 50.41342 104.1157 > tmp[,"col10"] col10 row1 50.45454 row2 30.46873 row3 31.22461 row4 29.53613 row5 49.09839 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 52.64537 49.35254 47.37534 49.54291 50.77787 102.3723 48.55503 50.32796 row5 49.15239 49.93928 51.42296 48.57790 48.80940 103.1176 49.81990 49.34354 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.54070 50.45454 47.63365 49.36573 51.89548 51.6020 51.48216 48.54226 row5 48.92921 49.09839 50.17513 50.57118 49.88325 49.9306 49.07389 49.02148 col17 col18 col19 col20 row1 49.69176 50.21947 50.41342 104.1157 row5 50.41349 49.32552 48.25978 104.6628 > tmp[,c("col6","col20")] col6 col20 row1 102.37231 104.11574 row2 76.61950 74.86239 row3 75.90573 74.55607 row4 73.76081 75.95451 row5 103.11755 104.66281 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 102.3723 104.1157 row5 103.1176 104.6628 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 102.3723 104.1157 row5 103.1176 104.6628 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 0.7232344 [2,] -0.5462245 [3,] -0.2974048 [4,] -0.4192396 [5,] -0.5477497 > tmp[,c("col17","col7")] col17 col7 [1,] -0.21933129 0.9357155 [2,] 1.04452236 -1.5422954 [3,] 0.01864071 0.5541914 [4,] -0.95139288 -0.5285933 [5,] 1.18203404 -0.2852953 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.5150210 -0.85765877 [2,] 0.9894492 0.82556707 [3,] -0.3814467 0.15429339 [4,] -1.0310981 0.43208473 [5,] -0.5152991 0.00761961 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.515021 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.5150210 [2,] 0.9894492 > > > > 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.1099552 0.3559523 -0.03183485 0.3378333 0.4715189 0.4726296 -2.173145 row1 -1.1360900 0.6756862 -0.59937173 1.6793103 0.9025519 0.3797837 -1.130135 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row3 -0.1921219 1.857858 0.3298781 -2.0233756 1.61125084 -0.451944 0.2982384 row1 0.4551285 1.517121 -1.1151698 0.3792966 0.06214978 -1.290668 1.5110726 [,15] [,16] [,17] [,18] [,19] [,20] row3 -1.6729257 -0.3451932 0.2312714 1.57571887 -0.7017214 1.084800 row1 0.5988409 -1.3806340 1.8082040 -0.05898887 -0.1334216 -1.188748 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -0.6075826 0.5643337 0.6441175 1.669198 -0.5505267 -0.8103598 -2.468084 [,8] [,9] [,10] row2 0.04715729 0.1687209 1.579986 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 0.8020334 -1.874587 -0.8467814 -1.018566 -1.000916 0.498452 0.8751969 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -0.3112728 -0.7016097 2.16995 1.182406 -0.2522001 0.836919 -0.023034 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.26894 -0.5235072 1.106553 0.47993 0.9944189 -2.047195 > > > 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: 0x000001f2702f8a10> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f075d1799c" [2] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f0cdd7223" [3] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f0346269df" [4] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f01d686cbb" [5] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f04f2a4c18" [6] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f0684c1bad" [7] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f066bf1e53" [8] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f013e96a21" [9] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f05ebf689" [10] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f07bef1c5c" [11] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f024634ed9" [12] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f04c8a4e2c" [13] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f043567715" [14] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f05dd63087" [15] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM43f03cc77f80" > > > ### 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: 0x000001f2719ff110> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x000001f2719ff110> Warning message: In dir.create(new.directory) : 'E:\biocbuild\bbs-3.21-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x000001f2719ff110> > rowMedians(tmp) [1] 0.182178909 -0.363757504 -0.297927347 -0.275048828 -0.126264705 [6] -0.552951468 -0.003914850 0.390757603 0.001088278 -0.030191826 [11] -0.561821668 -0.429319950 -0.304144416 0.554563238 0.403394136 [16] -0.269889309 -0.091286931 -0.430836733 -0.112015247 -0.177553081 [21] 0.270032584 0.075509324 -0.150982936 0.152944077 -0.238485541 [26] -0.330269607 -0.205112949 -0.493616347 0.055664355 -0.277646258 [31] 0.315505419 -0.050540028 -0.013813934 0.494329043 -0.094627488 [36] -0.298997937 0.423288054 -0.442364146 -0.156953558 0.192129581 [41] 0.104335118 0.257207120 0.189150361 0.378445760 0.177646462 [46] -0.495569071 0.114540581 -0.342372062 -0.200313882 0.026411959 [51] 0.219265703 -0.757704030 -0.628732160 0.503754334 -0.441365229 [56] 0.103938074 -0.133019909 0.180345186 0.763767922 -0.083294279 [61] -0.115885186 0.164215145 -0.619439825 0.164425351 -0.024627145 [66] -0.239103015 0.084536062 0.212667885 -0.159349854 0.525786297 [71] -0.011063825 -0.177238980 0.046832609 -0.183684301 0.179094719 [76] -0.184121923 -0.439453880 0.444793596 0.135228851 0.287206770 [81] -0.214581658 -0.087035943 -0.589921764 -0.343555544 0.056601236 [86] -0.626241455 0.020564904 0.089617091 -0.028845731 -0.307469437 [91] 0.230421615 -0.020725576 -0.337043089 0.088340698 0.429751310 [96] -0.078476696 0.010136176 -0.107623204 -0.131530250 0.119456191 [101] -0.240343720 0.087611190 0.306061290 -0.061017276 0.699358544 [106] 0.057209746 0.350186104 0.203312129 0.304409928 0.390848249 [111] -0.314060075 -0.043806833 0.283378711 0.083929390 0.317770282 [116] 0.181826452 0.094673955 -0.302588414 0.458747684 0.705373678 [121] -0.092824381 0.095023822 0.826751675 0.018436630 0.053286896 [126] 0.254079414 -0.058177710 0.756531448 -0.418665888 0.142831866 [131] -0.058515989 -0.421711530 0.311319842 -0.480490646 -0.601109696 [136] 0.178797221 0.170483009 -0.203147322 -0.062466216 -0.173750857 [141] 0.390794915 0.177473380 0.357174922 -0.167280969 -0.029039077 [146] 0.122550031 0.459094324 0.229760024 -0.247372479 -0.012060580 [151] -0.078750058 -0.205090190 0.612607275 -0.423080191 -0.375897856 [156] -0.419937790 0.243163901 0.153980870 -0.474686423 0.403941164 [161] -0.251075925 -0.016907072 0.077425325 -0.120166578 0.358755786 [166] 0.199244179 -0.381651512 -0.167092128 -0.501995065 -0.112988129 [171] 0.323451511 -0.336023717 -0.405045494 -0.512753514 0.538760643 [176] -0.252588316 -0.174856216 -0.041557562 -0.661645076 0.083551485 [181] 0.038784310 0.016867142 -0.001829550 -0.089199035 0.007243343 [186] -0.211040500 -0.093900697 0.152502717 -0.285025431 -0.024650633 [191] 0.109530841 -0.640278814 -0.358429879 -0.417500045 -0.372926098 [196] -0.014972442 0.055959988 -0.200728173 -0.451166246 -0.400213260 [201] 0.267456414 -0.067042677 -0.174181544 -0.034603615 0.577586695 [206] 0.129749599 0.023863351 -0.266989072 -0.274001033 0.526119975 [211] 0.120627208 -0.199930251 0.076258575 -0.248643085 -0.278094958 [216] 0.135596977 -0.208325008 0.080229707 0.346489515 -0.488290395 [221] -0.066336247 0.425784194 0.733783370 0.025795903 0.522951792 [226] 0.149304649 0.071300494 -0.338572663 0.252664335 0.062186138 > > proc.time() user system elapsed 3.28 14.51 122.85
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2025-01-21 r87610 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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: 0x0000029b9acf9230> > .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: 0x0000029b9acf9230> > .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: 0x0000029b9acf9230> > .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: 0x0000029b9acf9230> > 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: 0x0000029b9acf9350> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029b9acf9350> > .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: 0x0000029b9acf9350> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029b9acf9350> > .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: 0x0000029b9acf9350> > 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: 0x0000029b9acf9290> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029b9acf9290> > .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: 0x0000029b9acf9290> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x0000029b9acf9290> > .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: 0x0000029b9acf9290> > > .Call("R_bm_RowMode",P) <pointer: 0x0000029b9acf9290> > .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: 0x0000029b9acf9290> > > .Call("R_bm_ColMode",P) <pointer: 0x0000029b9acf9290> > .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: 0x0000029b9acf9290> > 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: 0x0000029b9acf9110> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x0000029b9acf9110> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029b9acf9110> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029b9acf9110> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile124a8276b1818" "BufferedMatrixFile124a84cb5122" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile124a8276b1818" "BufferedMatrixFile124a84cb5122" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x0000029b9acf9170> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029b9acf9170> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x0000029b9acf9170> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x0000029b9acf9170> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x0000029b9acf9170> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x0000029b9acf9170> > .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: 0x0000029b9acf9e30> > .Call("R_bm_AddColumn",P) <pointer: 0x0000029b9acf9e30> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x0000029b9acf9e30> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x0000029b9acf9e30> > 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: 0x0000029b9acf9d70> > .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: 0x0000029b9acf9d70> > rm(P) > > proc.time() user system elapsed 0.28 0.20 1.76
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2025-01-21 r87610 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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.31 0.04 0.34