Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-02-05 11:40 -0500 (Wed, 05 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" | 4717 |
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-04 23:42:00 -0500 (Tue, 04 Feb 2025) |
EndedAt: 2025-02-04 23:45:04 -0500 (Tue, 04 Feb 2025) |
EllapsedTime: 184.3 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.37 0.09 0.98
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 866174 6.7 8388608 64.0 2036793 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] "Tue Feb 4 23:42:31 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] "Tue Feb 4 23:42:32 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: 0x00000275442f83b0> > > > > 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] "Tue Feb 4 23:42:56 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] "Tue Feb 4 23:43:04 2025" > > ColMode(tmp2) <pointer: 0x00000275442f83b0> > > > > ### 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.9769737 -0.1265646 -0.6044871 -0.2170567 [2,] -0.3903333 -0.9074854 0.3402943 -0.7671209 [3,] 1.1413561 -1.8879854 -0.1266385 -0.4558715 [4,] 1.2118431 -0.7856789 0.6401732 -0.6892634 > 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.9769737 0.1265646 0.6044871 0.2170567 [2,] 0.3903333 0.9074854 0.3402943 0.7671209 [3,] 1.1413561 1.8879854 0.1266385 0.4558715 [4,] 1.2118431 0.7856789 0.6401732 0.6892634 > 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.9988486 0.3557592 0.7774877 0.4658934 [2,] 0.6247666 0.9526203 0.5833475 0.8758544 [3,] 1.0683427 1.3740398 0.3558630 0.6751826 [4,] 1.1008374 0.8863853 0.8001082 0.8302189 > > 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.96546 28.68416 33.37936 29.87599 [2,] 31.63800 35.43369 31.17377 34.52566 [3,] 36.82478 40.62838 28.68527 32.20770 [4,] 37.22022 34.64953 33.64126 33.99145 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x00000275442f8650> > exp(tmp5) <pointer: 0x00000275442f8650> > log(tmp5,2) <pointer: 0x00000275442f8650> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 468.2361 > Min(tmp5) [1] 54.36491 > mean(tmp5) [1] 72.80333 > Sum(tmp5) [1] 14560.67 > Var(tmp5) [1] 872.9929 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 88.18116 70.41454 69.42198 71.84630 66.88571 73.03414 69.24168 73.37143 [9] 73.00303 72.63331 > rowSums(tmp5) [1] 1763.623 1408.291 1388.440 1436.926 1337.714 1460.683 1384.834 1467.429 [9] 1460.061 1452.666 > rowVars(tmp5) [1] 8084.02272 69.81451 77.30137 68.02588 56.79209 118.13195 [7] 93.01006 91.85091 74.17350 91.71693 > rowSd(tmp5) [1] 89.911194 8.355508 8.792120 8.247780 7.536053 10.868852 9.644172 [8] 9.583888 8.612404 9.576896 > rowMax(tmp5) [1] 468.23613 90.19644 86.38443 85.90223 81.86033 89.67543 94.15346 [8] 88.44673 84.11356 91.35089 > rowMin(tmp5) [1] 54.95250 56.49002 58.59687 56.53281 54.57932 57.84027 54.36491 55.83046 [9] 56.61298 56.09050 > > colMeans(tmp5) [1] 112.86486 71.10878 67.40621 74.24353 69.01508 69.02651 66.97550 [8] 73.84863 71.88969 71.45043 68.57415 75.88538 68.88413 71.79061 [15] 73.09348 77.02122 70.04549 67.67532 68.19745 67.07013 > colSums(tmp5) [1] 1128.6486 711.0878 674.0621 742.4353 690.1508 690.2651 669.7550 [8] 738.4863 718.8969 714.5043 685.7415 758.8538 688.8413 717.9061 [15] 730.9348 770.2122 700.4549 676.7532 681.9745 670.7013 > colVars(tmp5) [1] 15635.98610 98.67873 38.33991 52.44733 65.89414 117.92028 [7] 21.37085 196.44076 128.95105 108.64235 105.24206 80.03655 [13] 26.34819 72.65773 132.27370 63.77655 99.07739 84.17244 [19] 83.84711 29.66371 > colSd(tmp5) [1] 125.043937 9.933717 6.191923 7.242053 8.117521 10.859110 [7] 4.622862 14.015733 11.355662 10.423164 10.258755 8.946315 [13] 5.133049 8.523950 11.501030 7.986022 9.953762 9.174554 [19] 9.156806 5.446440 > colMax(tmp5) [1] 468.23613 84.56266 81.70823 85.88971 88.44673 88.71239 74.58678 [8] 91.35089 94.15346 87.42299 83.66894 87.35522 75.10633 85.12802 [15] 86.38443 89.67543 85.90223 90.19644 82.72378 76.41231 > colMin(tmp5) [1] 61.88608 55.96921 59.52073 62.18296 61.28219 55.83046 61.42025 54.38203 [9] 54.95250 56.49002 54.36491 63.32215 58.26339 58.69398 57.86676 65.42764 [17] 56.61298 57.12638 59.25829 54.57932 > > > ### 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.18116 70.41454 69.42198 71.84630 66.88571 73.03414 69.24168 NA [9] 73.00303 72.63331 > rowSums(tmp5) [1] 1763.623 1408.291 1388.440 1436.926 1337.714 1460.683 1384.834 NA [9] 1460.061 1452.666 > rowVars(tmp5) [1] 8084.02272 69.81451 77.30137 68.02588 56.79209 118.13195 [7] 93.01006 89.02579 74.17350 91.71693 > rowSd(tmp5) [1] 89.911194 8.355508 8.792120 8.247780 7.536053 10.868852 9.644172 [8] 9.435348 8.612404 9.576896 > rowMax(tmp5) [1] 468.23613 90.19644 86.38443 85.90223 81.86033 89.67543 94.15346 [8] NA 84.11356 91.35089 > rowMin(tmp5) [1] 54.95250 56.49002 58.59687 56.53281 54.57932 57.84027 54.36491 NA [9] 56.61298 56.09050 > > colMeans(tmp5) [1] 112.86486 71.10878 67.40621 74.24353 69.01508 69.02651 66.97550 [8] 73.84863 71.88969 71.45043 68.57415 75.88538 68.88413 71.79061 [15] 73.09348 77.02122 NA 67.67532 68.19745 67.07013 > colSums(tmp5) [1] 1128.6486 711.0878 674.0621 742.4353 690.1508 690.2651 669.7550 [8] 738.4863 718.8969 714.5043 685.7415 758.8538 688.8413 717.9061 [15] 730.9348 770.2122 NA 676.7532 681.9745 670.7013 > colVars(tmp5) [1] 15635.98610 98.67873 38.33991 52.44733 65.89414 117.92028 [7] 21.37085 196.44076 128.95105 108.64235 105.24206 80.03655 [13] 26.34819 72.65773 132.27370 63.77655 NA 84.17244 [19] 83.84711 29.66371 > colSd(tmp5) [1] 125.043937 9.933717 6.191923 7.242053 8.117521 10.859110 [7] 4.622862 14.015733 11.355662 10.423164 10.258755 8.946315 [13] 5.133049 8.523950 11.501030 7.986022 NA 9.174554 [19] 9.156806 5.446440 > colMax(tmp5) [1] 468.23613 84.56266 81.70823 85.88971 88.44673 88.71239 74.58678 [8] 91.35089 94.15346 87.42299 83.66894 87.35522 75.10633 85.12802 [15] 86.38443 89.67543 NA 90.19644 82.72378 76.41231 > colMin(tmp5) [1] 61.88608 55.96921 59.52073 62.18296 61.28219 55.83046 61.42025 54.38203 [9] 54.95250 56.49002 54.36491 63.32215 58.26339 58.69398 57.86676 65.42764 [17] NA 57.12638 59.25829 54.57932 > > Max(tmp5,na.rm=TRUE) [1] 468.2361 > Min(tmp5,na.rm=TRUE) [1] 54.36491 > mean(tmp5,na.rm=TRUE) [1] 72.85898 > Sum(tmp5,na.rm=TRUE) [1] 14498.94 > Var(tmp5,na.rm=TRUE) [1] 876.7794 > > rowMeans(tmp5,na.rm=TRUE) [1] 88.18116 70.41454 69.42198 71.84630 66.88571 73.03414 69.24168 73.98424 [9] 73.00303 72.63331 > rowSums(tmp5,na.rm=TRUE) [1] 1763.623 1408.291 1388.440 1436.926 1337.714 1460.683 1384.834 1405.701 [9] 1460.061 1452.666 > rowVars(tmp5,na.rm=TRUE) [1] 8084.02272 69.81451 77.30137 68.02588 56.79209 118.13195 [7] 93.01006 89.02579 74.17350 91.71693 > rowSd(tmp5,na.rm=TRUE) [1] 89.911194 8.355508 8.792120 8.247780 7.536053 10.868852 9.644172 [8] 9.435348 8.612404 9.576896 > rowMax(tmp5,na.rm=TRUE) [1] 468.23613 90.19644 86.38443 85.90223 81.86033 89.67543 94.15346 [8] 88.44673 84.11356 91.35089 > rowMin(tmp5,na.rm=TRUE) [1] 54.95250 56.49002 58.59687 56.53281 54.57932 57.84027 54.36491 55.83046 [9] 56.61298 56.09050 > > colMeans(tmp5,na.rm=TRUE) [1] 112.86486 71.10878 67.40621 74.24353 69.01508 69.02651 66.97550 [8] 73.84863 71.88969 71.45043 68.57415 75.88538 68.88413 71.79061 [15] 73.09348 77.02122 70.96964 67.67532 68.19745 67.07013 > colSums(tmp5,na.rm=TRUE) [1] 1128.6486 711.0878 674.0621 742.4353 690.1508 690.2651 669.7550 [8] 738.4863 718.8969 714.5043 685.7415 758.8538 688.8413 717.9061 [15] 730.9348 770.2122 638.7268 676.7532 681.9745 670.7013 > colVars(tmp5,na.rm=TRUE) [1] 15635.98610 98.67873 38.33991 52.44733 65.89414 117.92028 [7] 21.37085 196.44076 128.95105 108.64235 105.24206 80.03655 [13] 26.34819 72.65773 132.27370 63.77655 101.85381 84.17244 [19] 83.84711 29.66371 > colSd(tmp5,na.rm=TRUE) [1] 125.043937 9.933717 6.191923 7.242053 8.117521 10.859110 [7] 4.622862 14.015733 11.355662 10.423164 10.258755 8.946315 [13] 5.133049 8.523950 11.501030 7.986022 10.092265 9.174554 [19] 9.156806 5.446440 > colMax(tmp5,na.rm=TRUE) [1] 468.23613 84.56266 81.70823 85.88971 88.44673 88.71239 74.58678 [8] 91.35089 94.15346 87.42299 83.66894 87.35522 75.10633 85.12802 [15] 86.38443 89.67543 85.90223 90.19644 82.72378 76.41231 > colMin(tmp5,na.rm=TRUE) [1] 61.88608 55.96921 59.52073 62.18296 61.28219 55.83046 61.42025 54.38203 [9] 54.95250 56.49002 54.36491 63.32215 58.26339 58.69398 57.86676 65.42764 [17] 56.61298 57.12638 59.25829 54.57932 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 88.18116 70.41454 69.42198 71.84630 66.88571 73.03414 69.24168 NaN [9] 73.00303 72.63331 > rowSums(tmp5,na.rm=TRUE) [1] 1763.623 1408.291 1388.440 1436.926 1337.714 1460.683 1384.834 0.000 [9] 1460.061 1452.666 > rowVars(tmp5,na.rm=TRUE) [1] 8084.02272 69.81451 77.30137 68.02588 56.79209 118.13195 [7] 93.01006 NA 74.17350 91.71693 > rowSd(tmp5,na.rm=TRUE) [1] 89.911194 8.355508 8.792120 8.247780 7.536053 10.868852 9.644172 [8] NA 8.612404 9.576896 > rowMax(tmp5,na.rm=TRUE) [1] 468.23613 90.19644 86.38443 85.90223 81.86033 89.67543 94.15346 [8] NA 84.11356 91.35089 > rowMin(tmp5,na.rm=TRUE) [1] 54.95250 56.49002 58.59687 56.53281 54.57932 57.84027 54.36491 NA [9] 56.61298 56.09050 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 117.05180 71.41965 68.28237 73.84144 66.85601 70.49274 66.77482 [8] 72.47610 70.94849 70.44118 67.62594 74.81115 68.56377 73.24579 [15] 72.43056 77.98338 NaN 67.11169 66.58342 66.89419 > colSums(tmp5,na.rm=TRUE) [1] 1053.4662 642.7769 614.5414 664.5730 601.7041 634.4347 600.9733 [8] 652.2849 638.5364 633.9706 608.6334 673.3003 617.0739 659.2121 [15] 651.8750 701.8504 0.0000 604.0052 599.2508 602.0477 > colVars(tmp5,na.rm=TRUE) [1] 17393.26684 109.92636 34.49618 57.18438 21.68802 108.47479 [7] 23.58911 199.80280 135.10411 110.76351 108.28244 77.05881 [13] 28.48710 57.91749 143.86390 61.33387 NA 91.12017 [19] 65.02047 33.02345 > colSd(tmp5,na.rm=TRUE) [1] 131.883535 10.484577 5.873345 7.562035 4.657040 10.415123 [7] 4.856862 14.135162 11.623430 10.524424 10.405885 8.778315 [13] 5.337330 7.610354 11.994328 7.831594 NA 9.545689 [19] 8.063527 5.746603 > colMax(tmp5,na.rm=TRUE) [1] 468.23613 84.56266 81.70823 85.88971 74.82183 88.71239 74.58678 [8] 91.35089 94.15346 87.42299 83.66894 87.35522 75.10633 85.12802 [15] 86.38443 89.67543 -Inf 90.19644 81.86033 76.41231 > colMin(tmp5,na.rm=TRUE) [1] 61.88608 55.96921 59.70463 62.18296 61.28219 57.84027 61.42025 54.38203 [9] 54.95250 56.49002 54.36491 63.32215 58.26339 62.54368 57.86676 65.42764 [17] Inf 57.12638 59.25829 54.57932 > > > > > 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] 393.3808 287.5484 262.2113 270.7247 212.6422 264.2244 243.6959 267.3776 [9] 158.0078 212.9231 > apply(copymatrix,1,var,na.rm=TRUE) [1] 393.3808 287.5484 262.2113 270.7247 212.6422 264.2244 243.6959 267.3776 [9] 158.0078 212.9231 > > > > 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 -2.842171e-14 2.842171e-13 5.684342e-14 [6] 5.684342e-14 -2.842171e-14 1.136868e-13 -2.842171e-14 1.136868e-13 [11] 1.705303e-13 -1.421085e-13 -5.684342e-14 1.421085e-13 -5.684342e-14 [16] -5.684342e-14 -2.842171e-14 8.526513e-14 1.705303e-13 -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) + } 5 15 6 3 7 7 7 12 10 6 7 5 6 11 3 13 7 15 7 9 10 12 4 8 10 9 8 6 7 4 5 9 3 7 2 5 8 4 6 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] 3.00713 > Min(tmp) [1] -3.082203 > mean(tmp) [1] 0.1217896 > Sum(tmp) [1] 12.17896 > Var(tmp) [1] 1.107708 > > rowMeans(tmp) [1] 0.1217896 > rowSums(tmp) [1] 12.17896 > rowVars(tmp) [1] 1.107708 > rowSd(tmp) [1] 1.052477 > rowMax(tmp) [1] 3.00713 > rowMin(tmp) [1] -3.082203 > > colMeans(tmp) [1] -1.118178806 1.285919556 0.335875119 1.398661518 0.110453437 [6] -1.511261606 1.169863149 -0.111879599 -1.151676014 -0.323676349 [11] 0.154722569 -0.809129651 -0.158920419 -0.372644570 -0.556018341 [16] 0.943939720 -0.422859105 1.087612667 -0.249751703 -0.276261125 [21] 0.656828779 0.118585430 0.419151135 0.153501173 -2.810846696 [26] -1.197285495 0.596666233 1.204258124 -1.294263782 0.407621250 [31] 0.126093650 0.263380362 -1.001418780 0.775023663 0.567961249 [36] 0.492890934 -0.673965173 -0.220212045 -0.721150360 -0.327468402 [41] -0.325839734 -0.783761655 0.559560310 1.545542016 -0.333530318 [46] 0.288651082 1.334036667 -0.322627738 0.287051800 1.089593886 [51] 0.940205505 0.908424175 -0.059548642 1.483095260 1.175485210 [56] 0.149585512 1.656801712 0.785313026 3.007129527 -0.614708602 [61] -3.082203041 -0.568640828 1.080732446 2.870912458 0.547028136 [66] -0.090369159 0.539922265 0.946809696 -1.049921202 -0.149332025 [71] 1.287631715 -0.002963514 -0.297058829 -0.038697650 -1.011959900 [76] 1.048989216 0.272898998 1.253260422 -0.032894963 -1.745005744 [81] 0.886591552 -1.093669942 0.809255573 -0.165440673 -1.770413539 [86] -0.998458478 -1.933922944 -0.082783557 0.528035674 1.123446449 [91] -0.596518991 -1.625215708 0.725453564 1.239286660 -0.991794065 [96] 0.516657648 1.519320411 1.615972965 -0.369067210 1.332485930 > colSums(tmp) [1] -1.118178806 1.285919556 0.335875119 1.398661518 0.110453437 [6] -1.511261606 1.169863149 -0.111879599 -1.151676014 -0.323676349 [11] 0.154722569 -0.809129651 -0.158920419 -0.372644570 -0.556018341 [16] 0.943939720 -0.422859105 1.087612667 -0.249751703 -0.276261125 [21] 0.656828779 0.118585430 0.419151135 0.153501173 -2.810846696 [26] -1.197285495 0.596666233 1.204258124 -1.294263782 0.407621250 [31] 0.126093650 0.263380362 -1.001418780 0.775023663 0.567961249 [36] 0.492890934 -0.673965173 -0.220212045 -0.721150360 -0.327468402 [41] -0.325839734 -0.783761655 0.559560310 1.545542016 -0.333530318 [46] 0.288651082 1.334036667 -0.322627738 0.287051800 1.089593886 [51] 0.940205505 0.908424175 -0.059548642 1.483095260 1.175485210 [56] 0.149585512 1.656801712 0.785313026 3.007129527 -0.614708602 [61] -3.082203041 -0.568640828 1.080732446 2.870912458 0.547028136 [66] -0.090369159 0.539922265 0.946809696 -1.049921202 -0.149332025 [71] 1.287631715 -0.002963514 -0.297058829 -0.038697650 -1.011959900 [76] 1.048989216 0.272898998 1.253260422 -0.032894963 -1.745005744 [81] 0.886591552 -1.093669942 0.809255573 -0.165440673 -1.770413539 [86] -0.998458478 -1.933922944 -0.082783557 0.528035674 1.123446449 [91] -0.596518991 -1.625215708 0.725453564 1.239286660 -0.991794065 [96] 0.516657648 1.519320411 1.615972965 -0.369067210 1.332485930 > 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.118178806 1.285919556 0.335875119 1.398661518 0.110453437 [6] -1.511261606 1.169863149 -0.111879599 -1.151676014 -0.323676349 [11] 0.154722569 -0.809129651 -0.158920419 -0.372644570 -0.556018341 [16] 0.943939720 -0.422859105 1.087612667 -0.249751703 -0.276261125 [21] 0.656828779 0.118585430 0.419151135 0.153501173 -2.810846696 [26] -1.197285495 0.596666233 1.204258124 -1.294263782 0.407621250 [31] 0.126093650 0.263380362 -1.001418780 0.775023663 0.567961249 [36] 0.492890934 -0.673965173 -0.220212045 -0.721150360 -0.327468402 [41] -0.325839734 -0.783761655 0.559560310 1.545542016 -0.333530318 [46] 0.288651082 1.334036667 -0.322627738 0.287051800 1.089593886 [51] 0.940205505 0.908424175 -0.059548642 1.483095260 1.175485210 [56] 0.149585512 1.656801712 0.785313026 3.007129527 -0.614708602 [61] -3.082203041 -0.568640828 1.080732446 2.870912458 0.547028136 [66] -0.090369159 0.539922265 0.946809696 -1.049921202 -0.149332025 [71] 1.287631715 -0.002963514 -0.297058829 -0.038697650 -1.011959900 [76] 1.048989216 0.272898998 1.253260422 -0.032894963 -1.745005744 [81] 0.886591552 -1.093669942 0.809255573 -0.165440673 -1.770413539 [86] -0.998458478 -1.933922944 -0.082783557 0.528035674 1.123446449 [91] -0.596518991 -1.625215708 0.725453564 1.239286660 -0.991794065 [96] 0.516657648 1.519320411 1.615972965 -0.369067210 1.332485930 > colMin(tmp) [1] -1.118178806 1.285919556 0.335875119 1.398661518 0.110453437 [6] -1.511261606 1.169863149 -0.111879599 -1.151676014 -0.323676349 [11] 0.154722569 -0.809129651 -0.158920419 -0.372644570 -0.556018341 [16] 0.943939720 -0.422859105 1.087612667 -0.249751703 -0.276261125 [21] 0.656828779 0.118585430 0.419151135 0.153501173 -2.810846696 [26] -1.197285495 0.596666233 1.204258124 -1.294263782 0.407621250 [31] 0.126093650 0.263380362 -1.001418780 0.775023663 0.567961249 [36] 0.492890934 -0.673965173 -0.220212045 -0.721150360 -0.327468402 [41] -0.325839734 -0.783761655 0.559560310 1.545542016 -0.333530318 [46] 0.288651082 1.334036667 -0.322627738 0.287051800 1.089593886 [51] 0.940205505 0.908424175 -0.059548642 1.483095260 1.175485210 [56] 0.149585512 1.656801712 0.785313026 3.007129527 -0.614708602 [61] -3.082203041 -0.568640828 1.080732446 2.870912458 0.547028136 [66] -0.090369159 0.539922265 0.946809696 -1.049921202 -0.149332025 [71] 1.287631715 -0.002963514 -0.297058829 -0.038697650 -1.011959900 [76] 1.048989216 0.272898998 1.253260422 -0.032894963 -1.745005744 [81] 0.886591552 -1.093669942 0.809255573 -0.165440673 -1.770413539 [86] -0.998458478 -1.933922944 -0.082783557 0.528035674 1.123446449 [91] -0.596518991 -1.625215708 0.725453564 1.239286660 -0.991794065 [96] 0.516657648 1.519320411 1.615972965 -0.369067210 1.332485930 > colMedians(tmp) [1] -1.118178806 1.285919556 0.335875119 1.398661518 0.110453437 [6] -1.511261606 1.169863149 -0.111879599 -1.151676014 -0.323676349 [11] 0.154722569 -0.809129651 -0.158920419 -0.372644570 -0.556018341 [16] 0.943939720 -0.422859105 1.087612667 -0.249751703 -0.276261125 [21] 0.656828779 0.118585430 0.419151135 0.153501173 -2.810846696 [26] -1.197285495 0.596666233 1.204258124 -1.294263782 0.407621250 [31] 0.126093650 0.263380362 -1.001418780 0.775023663 0.567961249 [36] 0.492890934 -0.673965173 -0.220212045 -0.721150360 -0.327468402 [41] -0.325839734 -0.783761655 0.559560310 1.545542016 -0.333530318 [46] 0.288651082 1.334036667 -0.322627738 0.287051800 1.089593886 [51] 0.940205505 0.908424175 -0.059548642 1.483095260 1.175485210 [56] 0.149585512 1.656801712 0.785313026 3.007129527 -0.614708602 [61] -3.082203041 -0.568640828 1.080732446 2.870912458 0.547028136 [66] -0.090369159 0.539922265 0.946809696 -1.049921202 -0.149332025 [71] 1.287631715 -0.002963514 -0.297058829 -0.038697650 -1.011959900 [76] 1.048989216 0.272898998 1.253260422 -0.032894963 -1.745005744 [81] 0.886591552 -1.093669942 0.809255573 -0.165440673 -1.770413539 [86] -0.998458478 -1.933922944 -0.082783557 0.528035674 1.123446449 [91] -0.596518991 -1.625215708 0.725453564 1.239286660 -0.991794065 [96] 0.516657648 1.519320411 1.615972965 -0.369067210 1.332485930 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.118179 1.28592 0.3358751 1.398662 0.1104534 -1.511262 1.169863 [2,] -1.118179 1.28592 0.3358751 1.398662 0.1104534 -1.511262 1.169863 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -0.1118796 -1.151676 -0.3236763 0.1547226 -0.8091297 -0.1589204 -0.3726446 [2,] -0.1118796 -1.151676 -0.3236763 0.1547226 -0.8091297 -0.1589204 -0.3726446 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -0.5560183 0.9439397 -0.4228591 1.087613 -0.2497517 -0.2762611 0.6568288 [2,] -0.5560183 0.9439397 -0.4228591 1.087613 -0.2497517 -0.2762611 0.6568288 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 0.1185854 0.4191511 0.1535012 -2.810847 -1.197285 0.5966662 1.204258 [2,] 0.1185854 0.4191511 0.1535012 -2.810847 -1.197285 0.5966662 1.204258 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -1.294264 0.4076213 0.1260937 0.2633804 -1.001419 0.7750237 0.5679612 [2,] -1.294264 0.4076213 0.1260937 0.2633804 -1.001419 0.7750237 0.5679612 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] 0.4928909 -0.6739652 -0.220212 -0.7211504 -0.3274684 -0.3258397 -0.7837617 [2,] 0.4928909 -0.6739652 -0.220212 -0.7211504 -0.3274684 -0.3258397 -0.7837617 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.5595603 1.545542 -0.3335303 0.2886511 1.334037 -0.3226277 0.2870518 [2,] 0.5595603 1.545542 -0.3335303 0.2886511 1.334037 -0.3226277 0.2870518 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 1.089594 0.9402055 0.9084242 -0.05954864 1.483095 1.175485 0.1495855 [2,] 1.089594 0.9402055 0.9084242 -0.05954864 1.483095 1.175485 0.1495855 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] 1.656802 0.785313 3.00713 -0.6147086 -3.082203 -0.5686408 1.080732 [2,] 1.656802 0.785313 3.00713 -0.6147086 -3.082203 -0.5686408 1.080732 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 2.870912 0.5470281 -0.09036916 0.5399223 0.9468097 -1.049921 -0.149332 [2,] 2.870912 0.5470281 -0.09036916 0.5399223 0.9468097 -1.049921 -0.149332 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 1.287632 -0.002963514 -0.2970588 -0.03869765 -1.01196 1.048989 0.272899 [2,] 1.287632 -0.002963514 -0.2970588 -0.03869765 -1.01196 1.048989 0.272899 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] 1.25326 -0.03289496 -1.745006 0.8865916 -1.09367 0.8092556 -0.1654407 [2,] 1.25326 -0.03289496 -1.745006 0.8865916 -1.09367 0.8092556 -0.1654407 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] -1.770414 -0.9984585 -1.933923 -0.08278356 0.5280357 1.123446 -0.596519 [2,] -1.770414 -0.9984585 -1.933923 -0.08278356 0.5280357 1.123446 -0.596519 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.625216 0.7254536 1.239287 -0.9917941 0.5166576 1.51932 1.615973 [2,] -1.625216 0.7254536 1.239287 -0.9917941 0.5166576 1.51932 1.615973 [,99] [,100] [1,] -0.3690672 1.332486 [2,] -0.3690672 1.332486 > > > Max(tmp2) [1] 2.499616 > Min(tmp2) [1] -2.787282 > mean(tmp2) [1] 0.1061936 > Sum(tmp2) [1] 10.61936 > Var(tmp2) [1] 0.9659175 > > rowMeans(tmp2) [1] 1.641537077 -0.105994013 0.072913945 -0.854724443 -1.682951106 [6] 0.842595021 0.803320026 -2.670636903 -0.002988608 0.165783926 [11] 0.002057900 -0.119496273 0.928767521 0.725678862 -0.084825822 [16] -0.416376646 0.147925683 -0.610399663 1.195119508 1.637508881 [21] 1.334341413 -0.941275369 0.439946477 0.627502471 -0.900993089 [26] 0.783124553 0.669284209 -0.358005665 -0.667832811 -1.420375117 [31] 0.175567243 -0.431147682 0.754463779 -0.057285307 -0.409590882 [36] -0.307405408 -1.192172257 -0.128467993 1.075353121 0.237985039 [41] 0.456050617 0.854090578 0.330141869 2.499615873 0.199006577 [46] -1.223893100 0.850404490 0.184242705 0.078895809 1.485055674 [51] -0.902557722 1.779490507 -0.178074777 0.437346656 0.413639084 [56] 0.127837819 0.020510030 0.028825735 2.469101552 0.287082259 [61] 1.265683897 -1.334745455 -0.269170034 0.170707105 -2.787281733 [66] 0.530450865 0.004290350 -0.072493635 -1.728831595 0.040960513 [71] -0.227515286 2.025768487 -0.565059968 -0.673854621 1.263629511 [76] 0.766172280 -1.111566356 -0.761696415 -0.855349982 0.539493118 [81] -1.203629436 1.187646403 0.975951549 0.829643958 0.272705677 [86] -0.444675816 0.676115848 -0.024319415 -0.121240909 -0.469121299 [91] -1.865298432 0.815325450 1.018348201 -1.105702482 -1.242904886 [96] 1.385459139 0.966695719 0.078708511 0.995366946 0.580054534 > rowSums(tmp2) [1] 1.641537077 -0.105994013 0.072913945 -0.854724443 -1.682951106 [6] 0.842595021 0.803320026 -2.670636903 -0.002988608 0.165783926 [11] 0.002057900 -0.119496273 0.928767521 0.725678862 -0.084825822 [16] -0.416376646 0.147925683 -0.610399663 1.195119508 1.637508881 [21] 1.334341413 -0.941275369 0.439946477 0.627502471 -0.900993089 [26] 0.783124553 0.669284209 -0.358005665 -0.667832811 -1.420375117 [31] 0.175567243 -0.431147682 0.754463779 -0.057285307 -0.409590882 [36] -0.307405408 -1.192172257 -0.128467993 1.075353121 0.237985039 [41] 0.456050617 0.854090578 0.330141869 2.499615873 0.199006577 [46] -1.223893100 0.850404490 0.184242705 0.078895809 1.485055674 [51] -0.902557722 1.779490507 -0.178074777 0.437346656 0.413639084 [56] 0.127837819 0.020510030 0.028825735 2.469101552 0.287082259 [61] 1.265683897 -1.334745455 -0.269170034 0.170707105 -2.787281733 [66] 0.530450865 0.004290350 -0.072493635 -1.728831595 0.040960513 [71] -0.227515286 2.025768487 -0.565059968 -0.673854621 1.263629511 [76] 0.766172280 -1.111566356 -0.761696415 -0.855349982 0.539493118 [81] -1.203629436 1.187646403 0.975951549 0.829643958 0.272705677 [86] -0.444675816 0.676115848 -0.024319415 -0.121240909 -0.469121299 [91] -1.865298432 0.815325450 1.018348201 -1.105702482 -1.242904886 [96] 1.385459139 0.966695719 0.078708511 0.995366946 0.580054534 > 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.641537077 -0.105994013 0.072913945 -0.854724443 -1.682951106 [6] 0.842595021 0.803320026 -2.670636903 -0.002988608 0.165783926 [11] 0.002057900 -0.119496273 0.928767521 0.725678862 -0.084825822 [16] -0.416376646 0.147925683 -0.610399663 1.195119508 1.637508881 [21] 1.334341413 -0.941275369 0.439946477 0.627502471 -0.900993089 [26] 0.783124553 0.669284209 -0.358005665 -0.667832811 -1.420375117 [31] 0.175567243 -0.431147682 0.754463779 -0.057285307 -0.409590882 [36] -0.307405408 -1.192172257 -0.128467993 1.075353121 0.237985039 [41] 0.456050617 0.854090578 0.330141869 2.499615873 0.199006577 [46] -1.223893100 0.850404490 0.184242705 0.078895809 1.485055674 [51] -0.902557722 1.779490507 -0.178074777 0.437346656 0.413639084 [56] 0.127837819 0.020510030 0.028825735 2.469101552 0.287082259 [61] 1.265683897 -1.334745455 -0.269170034 0.170707105 -2.787281733 [66] 0.530450865 0.004290350 -0.072493635 -1.728831595 0.040960513 [71] -0.227515286 2.025768487 -0.565059968 -0.673854621 1.263629511 [76] 0.766172280 -1.111566356 -0.761696415 -0.855349982 0.539493118 [81] -1.203629436 1.187646403 0.975951549 0.829643958 0.272705677 [86] -0.444675816 0.676115848 -0.024319415 -0.121240909 -0.469121299 [91] -1.865298432 0.815325450 1.018348201 -1.105702482 -1.242904886 [96] 1.385459139 0.966695719 0.078708511 0.995366946 0.580054534 > rowMin(tmp2) [1] 1.641537077 -0.105994013 0.072913945 -0.854724443 -1.682951106 [6] 0.842595021 0.803320026 -2.670636903 -0.002988608 0.165783926 [11] 0.002057900 -0.119496273 0.928767521 0.725678862 -0.084825822 [16] -0.416376646 0.147925683 -0.610399663 1.195119508 1.637508881 [21] 1.334341413 -0.941275369 0.439946477 0.627502471 -0.900993089 [26] 0.783124553 0.669284209 -0.358005665 -0.667832811 -1.420375117 [31] 0.175567243 -0.431147682 0.754463779 -0.057285307 -0.409590882 [36] -0.307405408 -1.192172257 -0.128467993 1.075353121 0.237985039 [41] 0.456050617 0.854090578 0.330141869 2.499615873 0.199006577 [46] -1.223893100 0.850404490 0.184242705 0.078895809 1.485055674 [51] -0.902557722 1.779490507 -0.178074777 0.437346656 0.413639084 [56] 0.127837819 0.020510030 0.028825735 2.469101552 0.287082259 [61] 1.265683897 -1.334745455 -0.269170034 0.170707105 -2.787281733 [66] 0.530450865 0.004290350 -0.072493635 -1.728831595 0.040960513 [71] -0.227515286 2.025768487 -0.565059968 -0.673854621 1.263629511 [76] 0.766172280 -1.111566356 -0.761696415 -0.855349982 0.539493118 [81] -1.203629436 1.187646403 0.975951549 0.829643958 0.272705677 [86] -0.444675816 0.676115848 -0.024319415 -0.121240909 -0.469121299 [91] -1.865298432 0.815325450 1.018348201 -1.105702482 -1.242904886 [96] 1.385459139 0.966695719 0.078708511 0.995366946 0.580054534 > > colMeans(tmp2) [1] 0.1061936 > colSums(tmp2) [1] 10.61936 > colVars(tmp2) [1] 0.9659175 > colSd(tmp2) [1] 0.982811 > colMax(tmp2) [1] 2.499616 > colMin(tmp2) [1] -2.787282 > colMedians(tmp2) [1] 0.1033668 > colRanges(tmp2) [,1] [1,] -2.787282 [2,] 2.499616 > > 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.9771932 -2.7564951 -2.8472880 2.7548136 -0.1440925 -2.6308957 [7] -1.8715934 -0.1676450 -3.7533232 0.5136108 > colApply(tmp,quantile)[,1] [,1] [1,] -1.35623511 [2,] -0.45487649 [3,] 0.02043274 [4,] 0.16627975 [5,] 1.19197578 > > rowApply(tmp,sum) [1] 0.51913246 -3.58593749 6.46876549 -1.97072248 1.16994902 -1.36007789 [7] -2.76561431 -5.29375782 -0.04857366 -5.01326498 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 4 3 2 10 4 8 4 3 10 6 [2,] 5 7 5 5 6 10 2 4 2 4 [3,] 1 6 6 9 8 2 3 2 6 7 [4,] 7 2 8 7 3 6 6 10 7 8 [5,] 3 1 9 3 10 9 10 8 5 1 [6,] 9 9 7 8 5 1 1 5 3 2 [7,] 10 8 3 2 1 3 5 7 9 5 [8,] 2 10 4 1 7 4 7 9 1 10 [9,] 6 4 1 4 9 5 8 1 4 9 [10,] 8 5 10 6 2 7 9 6 8 3 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 1.01079723 -1.91097166 4.91242994 1.44289813 1.67073287 0.88978795 [7] -2.94046429 3.55982857 0.03387666 -0.80400942 -0.97051420 -0.33137488 [13] -1.13273471 1.29207371 6.61828497 0.19345253 0.28303608 1.37508900 [19] 0.60173183 -2.88165055 > colApply(tmp,quantile)[,1] [,1] [1,] -1.4906925 [2,] -0.7264700 [3,] 0.1853317 [4,] 1.4726567 [5,] 1.5699712 > > rowApply(tmp,sum) [1] 6.5994413 -2.8869926 0.5101882 6.5156599 2.1740030 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 1 6 11 19 19 [2,] 10 5 2 6 9 [3,] 20 16 19 15 12 [4,] 8 12 20 14 4 [5,] 11 13 17 11 11 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1.4906925 0.1247615 2.0743094 0.06019586 0.2884288 -0.7299151 [2,] -0.7264700 -0.9713839 0.4309062 -0.04155874 0.2233654 0.4177466 [3,] 0.1853317 -1.2080300 1.0217639 2.04519916 0.7451119 0.2798031 [4,] 1.5699712 -0.2579861 0.8810064 0.76390496 0.0100786 0.2337974 [5,] 1.4726567 0.4016668 0.5044440 -1.38484310 0.4037482 0.6883560 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.3807485 2.0632286 -0.3595111 1.117606432 0.8081601 0.3580286 [2,] -0.4745730 1.2880235 -0.6371833 -0.227714530 -1.5290358 -1.3038030 [3,] 0.2569391 -1.5830861 -0.1955540 0.008295903 0.4484366 -0.2504517 [4,] -1.0539475 0.6899794 1.5043177 -0.074478400 -0.4640817 -0.1325168 [5,] -2.0496314 1.1016832 -0.2781928 -1.627718826 -0.2339934 0.9973680 [,13] [,14] [,15] [,16] [,17] [,18] [1,] -0.7886590 -0.07860449 1.7720040 1.3633434 -0.6541609 0.5713657 [2,] -1.6767144 1.10253112 1.2823395 -1.4791200 1.4383158 0.3902179 [3,] 0.6900012 0.10092944 0.8384814 -0.8763889 -0.8902558 -0.4938387 [4,] -0.2011701 1.14430689 2.3221698 1.5301742 -0.4687493 -0.2870507 [5,] 0.8438076 -0.97708925 0.4032903 -0.3445562 0.8578863 1.1943948 [,19] [,20] [1,] -0.3584952 0.07729840 [2,] -0.1148050 -0.27807692 [3,] 0.4831420 -1.09564190 [4,] -1.1839106 -0.01015537 [5,] 1.7758007 -1.57507476 > > > 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 : 630 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 : 547 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.83365 -0.6381857 0.6610779 0.5128634 0.7874386 -2.498362 -2.499447 col8 col9 col10 col11 col12 col13 col14 row1 -0.5367414 0.7696338 -1.316608 0.43723 -0.7506328 -0.06691489 0.4407559 col15 col16 col17 col18 col19 col20 row1 0.5516489 1.349583 0.971566 -0.4081751 -1.738123 -3.146078 > tmp[,"col10"] col10 row1 -1.3166083 row2 0.3989635 row3 -0.7343588 row4 -1.6330079 row5 1.4613268 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 row1 -1.833650 -0.6381857 0.6610779 0.5128634 0.7874386 -2.498362 -2.499447 row5 -1.142318 0.5272453 -0.1560926 -0.6195490 -0.4470340 0.322773 -1.485016 col8 col9 col10 col11 col12 col13 col14 row1 -0.5367414 0.7696338 -1.316608 0.437230 -0.7506328 -0.066914892 0.4407559 row5 -0.2431868 -0.3895769 1.461327 2.191544 2.8340958 0.008638274 1.8916563 col15 col16 col17 col18 col19 col20 row1 0.5516489 1.3495832 0.971566 -0.4081751 -1.738123 -3.14607802 row5 0.8524619 -0.3388747 1.425898 -1.1297332 -1.900349 0.05510392 > tmp[,c("col6","col20")] col6 col20 row1 -2.4983618 -3.14607802 row2 0.3732484 0.27858280 row3 2.5455703 0.49986193 row4 0.9651416 1.16540829 row5 0.3227730 0.05510392 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -2.498362 -3.14607802 row5 0.322773 0.05510392 > > > > > 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 50.7747 49.30504 48.29112 51.08377 50.43581 106.189 49.81649 49.23354 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.71932 51.03825 50.48662 51.29769 49.37893 49.83896 50.19292 50.24299 col17 col18 col19 col20 row1 49.75441 49.18355 50.67919 103.77 > tmp[,"col10"] col10 row1 51.03825 row2 29.92708 row3 29.99969 row4 31.74678 row5 50.02691 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 50.77470 49.30504 48.29112 51.08377 50.43581 106.189 49.81649 49.23354 row5 49.46423 49.93277 48.92734 50.26977 49.34118 105.505 50.99654 49.81121 col9 col10 col11 col12 col13 col14 col15 col16 row1 50.71932 51.03825 50.48662 51.29769 49.37893 49.83896 50.19292 50.24299 row5 50.38809 50.02691 50.88265 49.45410 50.96602 49.82377 49.57530 49.70705 col17 col18 col19 col20 row1 49.75441 49.18355 50.67919 103.7700 row5 50.46572 49.45777 50.48478 105.7701 > tmp[,c("col6","col20")] col6 col20 row1 106.18901 103.76999 row2 75.33247 75.67886 row3 74.49334 74.11443 row4 75.49065 73.38130 row5 105.50505 105.77013 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 106.189 103.7700 row5 105.505 105.7701 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 106.189 103.7700 row5 105.505 105.7701 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] 1.21303383 [2,] 1.07795869 [3,] 1.20507019 [4,] -0.06736375 [5,] -2.25859605 > tmp[,c("col17","col7")] col17 col7 [1,] -1.3386926 -0.5016411 [2,] -2.5706346 -0.5497710 [3,] -0.6271176 -1.2832368 [4,] -0.3972003 -1.4783866 [5,] 1.8687873 -0.6498068 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] -0.7564227 0.5156875 [2,] -0.5643890 0.4054607 [3,] -0.9691798 -1.9914458 [4,] 0.3109623 0.3204067 [5,] 1.0621618 0.4401589 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] -0.7564227 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] -0.7564227 [2,] -0.5643890 > > > > 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.4628887 0.3539251 -1.2637838 0.1700949 1.1910940 -0.4935858 -1.563230 row1 1.3378978 0.8847200 0.6510823 -0.7433165 -0.6579069 0.8228670 -1.255794 [,8] [,9] [,10] [,11] [,12] [,13] row3 -0.9944144 0.2524973 0.15231314 0.3715975 0.2389035 -0.4539029 row1 0.1940520 -1.7832290 0.05480919 -1.0709756 -0.1176014 -0.2629080 [,14] [,15] [,16] [,17] [,18] [,19] row3 0.9567643 -1.0234361 -0.1583167 -0.08395674 0.7750918 0.30464826 row1 0.3585845 -0.3006847 -1.8694258 1.18485038 -0.9818726 -0.01529692 [,20] row3 -0.5361044 row1 0.3709151 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 0.1289274 -0.004842618 -1.122153 -2.575368 0.03227228 0.0844483 -0.5873015 [,8] [,9] [,10] row2 -0.9325808 -1.615241 -0.794311 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row5 -1.120598 0.8929412 -1.468551 -0.9824996 0.003688643 -0.9351527 2.553407 [,8] [,9] [,10] [,11] [,12] [,13] [,14] row5 -1.460519 -0.1267612 -1.229054 1.428558 0.03856442 0.1688368 0.6368399 [,15] [,16] [,17] [,18] [,19] [,20] row5 1.518466 0.07553707 1.77937 -0.3351359 0.6551833 2.853862 > > > 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: 0x00000275442f8830> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba45dbe7ad" [2] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba459d64b6b" [3] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba476adc59" [4] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba47eac609d" [5] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba45740860" [6] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba43698251c" [7] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba4743c6446" [8] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba4339a39" [9] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba45fb85194" [10] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba469a73c66" [11] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba47745fdc" [12] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba45fa06453" [13] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba42d6c62f7" [14] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba4c817b56" [15] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1bba44eade91" > > > ### 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: 0x0000027545cff2f0> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x0000027545cff2f0> Warning message: In dir.create(new.directory) : 'E:\biocbuild\bbs-3.21-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x0000027545cff2f0> > rowMedians(tmp) [1] 0.2159589772 -0.0765763083 -0.1666739436 0.4279324799 -0.4158094732 [6] -0.3020697811 -0.6954955809 0.2182607007 0.1628852851 -0.0606627968 [11] -0.9991553394 0.0489915556 -0.7788376023 0.0994983862 -0.0848236667 [16] -0.1947693678 0.2656993477 0.3037566292 -0.4537601300 -0.2169990807 [21] 0.1743010048 -0.1709404734 0.6086226750 -0.0389320698 -0.1065541856 [26] 0.2806010313 -0.2509621180 -0.0277815124 -0.0519555905 -0.2993338936 [31] 0.5272176820 0.9167814632 0.1492203736 0.1474257645 0.2260340616 [36] 0.1168513005 -0.5251401123 0.0120177928 0.2126780961 -0.1614840745 [41] -0.4559627921 -0.0307556954 -0.2890507909 0.3247716272 0.2381646354 [46] 0.0598597049 0.2900573107 -0.0113627874 0.1520949934 -0.0373198311 [51] -0.3712641211 -0.2893978797 0.3194289705 0.0817057114 0.3807353457 [56] 0.1776995257 -0.1921110480 0.3585714670 -0.1187338935 0.2033868122 [61] 0.2080425983 0.0964018237 0.1328127736 0.0597833048 -0.0007085804 [66] -0.1592545997 -0.5827242549 -0.2859405887 -0.2454672242 0.3504027591 [71] -0.0227047862 -0.0804374881 -0.2136781734 0.0352207526 0.4446464537 [76] 0.1768498102 0.2967176158 0.1303968387 0.0947451412 0.1478563102 [81] -0.2936878653 0.1455849415 -0.2946814595 0.2010112977 0.1436095717 [86] -0.0539287835 0.0813165484 -0.2486156481 0.0449928930 -0.1207406824 [91] 0.6076454754 -0.4307301601 0.1883772370 0.1219478606 -0.0754965645 [96] -0.2412145987 0.1002623511 -0.0956265953 -0.1155196832 -0.0252903815 [101] -0.2643390092 0.1242040661 0.4800288610 -0.3721347426 -0.1423355110 [106] -0.3633916984 0.3110634679 0.2504167269 -0.2253218165 0.1321298010 [111] 0.5451566793 -0.0358252035 0.0959018425 0.2198376194 -0.5311046511 [116] 0.0752025824 0.0195590754 0.4578009786 -0.1283779387 0.2164440852 [121] 0.1858096483 -0.0645999315 0.2643615904 0.1563757998 0.4136484826 [126] -0.0688950527 0.2618166548 -0.1835350791 0.7703139094 0.4744242508 [131] -0.1353848517 0.2137312689 0.3549984107 -0.0958819661 0.4521034428 [136] -0.0246464841 -0.5240235798 -0.1873972008 -0.0124484448 0.1535350264 [141] -0.3861377763 -0.3530509702 0.2901732648 -0.4188349429 -0.2680022622 [146] -0.3034025857 -0.0895320332 0.3186417082 -0.0760196247 0.0424410433 [151] -0.0721759705 0.2145833849 -0.4469488870 0.0149785216 0.2456662208 [156] -0.0924684310 -0.2566733356 0.1553168511 -0.2750868906 -0.3082978967 [161] -0.1168757564 -0.0483893490 0.3735793118 0.1922630960 -0.3438886474 [166] 0.3727519048 0.1269955153 -0.0837128452 -0.1170260237 -0.1274974241 [171] 0.1374086663 0.1244791447 -0.2575345330 0.0451225264 -0.8406713648 [176] 0.2424565707 -0.2178561280 0.0075889245 -1.2358610237 -0.1288357167 [181] 0.2183779564 0.3171400866 0.0999510899 -0.5235969518 0.3243590436 [186] -0.1922463267 0.2747608313 0.2737827389 -0.0775776491 -0.0681670882 [191] -0.0227373528 0.4309105436 -0.0089954604 0.7523175618 -0.1176395470 [196] -0.0124269540 0.5770470983 -0.1784680346 -0.0518533352 0.3297507200 [201] -0.3491149878 0.0471290271 -0.1848842683 -0.5415074464 0.1433083167 [206] -0.0567075975 0.0629219411 0.0149029846 0.5388421541 0.5492766780 [211] -0.0082313445 -0.0880216171 0.3919655243 -0.0445274599 0.2061783773 [216] -0.2007386899 -0.7765589436 -0.0692346081 -0.6528324691 0.0092202746 [221] 0.0952149282 0.1448409327 -0.1204993348 0.0907949966 -0.0891668928 [226] 0.2422533902 0.1678770546 -0.2698696208 -0.7670516453 0.2849808712 > > proc.time() user system elapsed 3.70 15.65 148.09
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: 0x00000245b54f8410> > .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: 0x00000245b54f8410> > .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: 0x00000245b54f8410> > .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: 0x00000245b54f8410> > 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: 0x00000245b54f80b0> > .Call("R_bm_AddColumn",P) <pointer: 0x00000245b54f80b0> > .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: 0x00000245b54f80b0> > .Call("R_bm_AddColumn",P) <pointer: 0x00000245b54f80b0> > .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: 0x00000245b54f80b0> > 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: 0x00000245b54f8590> > .Call("R_bm_AddColumn",P) <pointer: 0x00000245b54f8590> > .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: 0x00000245b54f8590> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x00000245b54f8590> > .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: 0x00000245b54f8590> > > .Call("R_bm_RowMode",P) <pointer: 0x00000245b54f8590> > .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: 0x00000245b54f8590> > > .Call("R_bm_ColMode",P) <pointer: 0x00000245b54f8590> > .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: 0x00000245b54f8590> > 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: 0x00000245b54f8170> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x00000245b54f8170> > .Call("R_bm_AddColumn",P) <pointer: 0x00000245b54f8170> > .Call("R_bm_AddColumn",P) <pointer: 0x00000245b54f8170> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile7af41395641d" "BufferedMatrixFile7af4612d1bf9" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile7af41395641d" "BufferedMatrixFile7af4612d1bf9" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x00000245b54f8650> > .Call("R_bm_AddColumn",P) <pointer: 0x00000245b54f8650> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x00000245b54f8650> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x00000245b54f8650> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x00000245b54f8650> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x00000245b54f8650> > .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: 0x00000245b54f8290> > .Call("R_bm_AddColumn",P) <pointer: 0x00000245b54f8290> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x00000245b54f8290> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x00000245b54f8290> > 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: 0x00000245b54f82f0> > .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: 0x00000245b54f82f0> > rm(P) > > proc.time() user system elapsed 0.34 0.12 0.93
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.29 0.09 0.36