Back to Multiple platform build/check report for BioC 3.21: simplified long |
|
This page was generated on 2025-01-04 11:41 -0500 (Sat, 04 Jan 2025).
Hostname | OS | Arch (*) | R version | Installed pkgs |
---|---|---|---|---|
nebbiolo1 | Linux (Ubuntu 24.04.1 LTS) | x86_64 | R Under development (unstable) (2024-10-21 r87258) -- "Unsuffered Consequences" | 4756 |
palomino7 | Windows Server 2022 Datacenter | x64 | R Under development (unstable) (2024-10-26 r87273 ucrt) -- "Unsuffered Consequences" | 4475 |
lconway | macOS 12.7.1 Monterey | x86_64 | R Under development (unstable) (2024-11-20 r87352) -- "Unsuffered Consequences" | 4435 |
kjohnson3 | macOS 13.7.1 Ventura | arm64 | R Under development (unstable) (2024-11-20 r87352) -- "Unsuffered Consequences" | 4390 |
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) | aarch64 | R Under development (unstable) (2024-11-24 r87369) -- "Unsuffered Consequences" | 4383 |
Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X |
Package 246/2275 | 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 | |||||||||
kunpeng2 | Linux (openEuler 22.03 LTS-SP1) / aarch64 | OK | OK | OK | ||||||||||
To the developers/maintainers of the BufferedMatrix package: - Allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/BufferedMatrix.git to reflect on this report. See Troubleshooting Build Report for more information. - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
Package: BufferedMatrix |
Version: 1.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-01-03 23:05:48 -0500 (Fri, 03 Jan 2025) |
EndedAt: 2025-01-03 23:09:10 -0500 (Fri, 03 Jan 2025) |
EllapsedTime: 202.2 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) (2024-10-26 r87273 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.2.0 GNU Fortran (GCC) 13.2.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' ... ** 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) (2024-10-26 r87273 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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.40 0.14 2.31
BufferedMatrix.Rcheck/tests/objectTesting.Rout
R Under development (unstable) (2024-10-26 r87273 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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 474902 25.4 1041921 55.7 629882 33.7 Vcells 866328 6.7 8388608 64.0 2037059 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] "Fri Jan 3 23:06:28 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] "Fri Jan 3 23:06: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: 0x0000018c194fd0b0> > > > > 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] "Fri Jan 3 23:07: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] "Fri Jan 3 23:07:36 2025" > > ColMode(tmp2) <pointer: 0x0000018c194fd0b0> > > > > ### 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.9312291 0.7071979 -0.8309915 -0.08230534 [2,] 1.0173719 0.1063706 0.4129172 -1.44143774 [3,] 0.8086911 0.6073029 1.1793132 -0.34284545 [4,] 1.3201062 -0.7526002 0.1801534 0.92510710 > 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.9312291 0.7071979 0.8309915 0.08230534 [2,] 1.0173719 0.1063706 0.4129172 1.44143774 [3,] 0.8086911 0.6073029 1.1793132 0.34284545 [4,] 1.3201062 0.7526002 0.1801534 0.92510710 > 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.9965609 0.8409506 0.9115874 0.2868891 [2,] 1.0086486 0.3261450 0.6425863 1.2005989 [3,] 0.8992725 0.7792964 1.0859619 0.5855301 [4,] 1.1489587 0.8675253 0.4244448 0.9618249 > > 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.89684 34.11670 34.94687 27.95120 [2,] 36.10386 28.36782 31.83878 38.44743 [3,] 34.80142 33.40027 37.03893 31.19815 [4,] 37.80969 34.42785 29.42460 35.54336 > > > > ## testing functions that elementwise transform the matrix > sqrt(tmp5) <pointer: 0x0000018c194fdb90> > exp(tmp5) <pointer: 0x0000018c194fdb90> > log(tmp5,2) <pointer: 0x0000018c194fdb90> > pow(tmp5,2) > > > > > > ## testing functions that apply to entire matrix > Max(tmp5) [1] 468.0933 > Min(tmp5) [1] 53.14931 > mean(tmp5) [1] 73.69848 > Sum(tmp5) [1] 14739.7 > Var(tmp5) [1] 865.3883 > > > ## testing functions applied to rows or columns > > rowMeans(tmp5) [1] 92.98691 67.78008 72.63330 72.24996 71.63013 72.99922 71.45137 72.64440 [9] 71.32529 71.28418 > rowSums(tmp5) [1] 1859.738 1355.602 1452.666 1444.999 1432.603 1459.984 1429.027 1452.888 [9] 1426.506 1425.684 > rowVars(tmp5) [1] 7828.80382 104.69144 107.07257 98.90524 63.92300 77.92022 [7] 51.47565 52.98609 101.89368 120.66627 > rowSd(tmp5) [1] 88.480528 10.231884 10.347588 9.945111 7.995186 8.827243 7.174653 [8] 7.279154 10.094240 10.984820 > rowMax(tmp5) [1] 468.09330 86.90565 91.83014 93.25406 89.31012 89.43178 81.10963 [8] 86.52365 93.30021 91.78454 > rowMin(tmp5) [1] 58.17675 53.31087 54.02866 53.14931 58.30708 59.00669 58.96696 58.64460 [9] 58.05969 57.48683 > > colMeans(tmp5) [1] 113.34476 72.12816 73.83813 72.68706 68.96628 70.66541 74.72060 [8] 71.49934 73.33374 74.82339 72.97157 70.63998 73.85512 74.88843 [15] 71.49768 69.29276 68.23009 66.56964 70.30868 69.70885 > colSums(tmp5) [1] 1133.4476 721.2816 738.3813 726.8706 689.6628 706.6541 747.2060 [8] 714.9934 733.3374 748.2339 729.7157 706.3998 738.5512 748.8843 [15] 714.9768 692.9276 682.3009 665.6964 703.0868 697.0885 > colVars(tmp5) [1] 15546.87691 108.85350 66.69538 97.65583 76.40987 95.87227 [7] 58.46982 63.50786 90.97446 64.16424 135.81770 100.95263 [13] 84.69573 56.31449 121.61064 137.16933 54.21553 41.20760 [19] 104.63114 75.36007 > colSd(tmp5) [1] 124.687116 10.433288 8.166724 9.882097 8.741274 9.791438 [7] 7.646556 7.969182 9.538053 8.010259 11.654085 10.047519 [13] 9.203028 7.504298 11.027721 11.711931 7.363120 6.419315 [19] 10.228936 8.681018 > colMax(tmp5) [1] 468.09330 89.43178 91.78454 89.31012 83.85082 86.90565 89.81601 [8] 81.81102 93.25406 86.62727 93.30021 89.01903 91.83014 91.56857 [15] 90.40031 87.88021 79.74845 77.93686 85.82412 79.53896 > colMin(tmp5) [1] 67.87548 59.04390 61.24345 58.17675 58.00938 55.21905 64.49520 61.70879 [9] 60.19961 60.64187 56.51519 53.31087 61.53206 63.56130 54.68836 54.02866 [17] 58.05969 58.96696 53.14931 58.46178 > > > ### setting a random element to NA and then testing with na.rm=TRUE or na.rm=FALSE (The default) > > > which.row <- sample(1:10,1,replace=TRUE) > which.col <- sample(1:20,1,replace=TRUE) > > tmp5[which.row,which.col] <- NA > > Max(tmp5) [1] NA > Min(tmp5) [1] NA > mean(tmp5) [1] NA > Sum(tmp5) [1] NA > Var(tmp5) [1] NA > > rowMeans(tmp5) [1] 92.98691 67.78008 72.63330 72.24996 71.63013 72.99922 71.45137 NA [9] 71.32529 71.28418 > rowSums(tmp5) [1] 1859.738 1355.602 1452.666 1444.999 1432.603 1459.984 1429.027 NA [9] 1426.506 1425.684 > rowVars(tmp5) [1] 7828.80382 104.69144 107.07257 98.90524 63.92300 77.92022 [7] 51.47565 55.78954 101.89368 120.66627 > rowSd(tmp5) [1] 88.480528 10.231884 10.347588 9.945111 7.995186 8.827243 7.174653 [8] 7.469239 10.094240 10.984820 > rowMax(tmp5) [1] 468.09330 86.90565 91.83014 93.25406 89.31012 89.43178 81.10963 [8] NA 93.30021 91.78454 > rowMin(tmp5) [1] 58.17675 53.31087 54.02866 53.14931 58.30708 59.00669 58.96696 NA [9] 58.05969 57.48683 > > colMeans(tmp5) [1] 113.34476 72.12816 73.83813 72.68706 68.96628 70.66541 74.72060 [8] 71.49934 73.33374 74.82339 72.97157 70.63998 NA 74.88843 [15] 71.49768 69.29276 68.23009 66.56964 70.30868 69.70885 > colSums(tmp5) [1] 1133.4476 721.2816 738.3813 726.8706 689.6628 706.6541 747.2060 [8] 714.9934 733.3374 748.2339 729.7157 706.3998 NA 748.8843 [15] 714.9768 692.9276 682.3009 665.6964 703.0868 697.0885 > colVars(tmp5) [1] 15546.87691 108.85350 66.69538 97.65583 76.40987 95.87227 [7] 58.46982 63.50786 90.97446 64.16424 135.81770 100.95263 [13] NA 56.31449 121.61064 137.16933 54.21553 41.20760 [19] 104.63114 75.36007 > colSd(tmp5) [1] 124.687116 10.433288 8.166724 9.882097 8.741274 9.791438 [7] 7.646556 7.969182 9.538053 8.010259 11.654085 10.047519 [13] NA 7.504298 11.027721 11.711931 7.363120 6.419315 [19] 10.228936 8.681018 > colMax(tmp5) [1] 468.09330 89.43178 91.78454 89.31012 83.85082 86.90565 89.81601 [8] 81.81102 93.25406 86.62727 93.30021 89.01903 NA 91.56857 [15] 90.40031 87.88021 79.74845 77.93686 85.82412 79.53896 > colMin(tmp5) [1] 67.87548 59.04390 61.24345 58.17675 58.00938 55.21905 64.49520 61.70879 [9] 60.19961 60.64187 56.51519 53.31087 NA 63.56130 54.68836 54.02866 [17] 58.05969 58.96696 53.14931 58.46178 > > Max(tmp5,na.rm=TRUE) [1] 468.0933 > Min(tmp5,na.rm=TRUE) [1] 53.14931 > mean(tmp5,na.rm=TRUE) [1] 73.71156 > Sum(tmp5,na.rm=TRUE) [1] 14668.6 > Var(tmp5,na.rm=TRUE) [1] 869.7246 > > rowMeans(tmp5,na.rm=TRUE) [1] 92.98691 67.78008 72.63330 72.24996 71.63013 72.99922 71.45137 72.72590 [9] 71.32529 71.28418 > rowSums(tmp5,na.rm=TRUE) [1] 1859.738 1355.602 1452.666 1444.999 1432.603 1459.984 1429.027 1381.792 [9] 1426.506 1425.684 > rowVars(tmp5,na.rm=TRUE) [1] 7828.80382 104.69144 107.07257 98.90524 63.92300 77.92022 [7] 51.47565 55.78954 101.89368 120.66627 > rowSd(tmp5,na.rm=TRUE) [1] 88.480528 10.231884 10.347588 9.945111 7.995186 8.827243 7.174653 [8] 7.469239 10.094240 10.984820 > rowMax(tmp5,na.rm=TRUE) [1] 468.09330 86.90565 91.83014 93.25406 89.31012 89.43178 81.10963 [8] 86.52365 93.30021 91.78454 > rowMin(tmp5,na.rm=TRUE) [1] 58.17675 53.31087 54.02866 53.14931 58.30708 59.00669 58.96696 58.64460 [9] 58.05969 57.48683 > > colMeans(tmp5,na.rm=TRUE) [1] 113.34476 72.12816 73.83813 72.68706 68.96628 70.66541 74.72060 [8] 71.49934 73.33374 74.82339 72.97157 70.63998 74.16170 74.88843 [15] 71.49768 69.29276 68.23009 66.56964 70.30868 69.70885 > colSums(tmp5,na.rm=TRUE) [1] 1133.4476 721.2816 738.3813 726.8706 689.6628 706.6541 747.2060 [8] 714.9934 733.3374 748.2339 729.7157 706.3998 667.4553 748.8843 [15] 714.9768 692.9276 682.3009 665.6964 703.0868 697.0885 > colVars(tmp5,na.rm=TRUE) [1] 15546.87691 108.85350 66.69538 97.65583 76.40987 95.87227 [7] 58.46982 63.50786 90.97446 64.16424 135.81770 100.95263 [13] 94.22530 56.31449 121.61064 137.16933 54.21553 41.20760 [19] 104.63114 75.36007 > colSd(tmp5,na.rm=TRUE) [1] 124.687116 10.433288 8.166724 9.882097 8.741274 9.791438 [7] 7.646556 7.969182 9.538053 8.010259 11.654085 10.047519 [13] 9.706972 7.504298 11.027721 11.711931 7.363120 6.419315 [19] 10.228936 8.681018 > colMax(tmp5,na.rm=TRUE) [1] 468.09330 89.43178 91.78454 89.31012 83.85082 86.90565 89.81601 [8] 81.81102 93.25406 86.62727 93.30021 89.01903 91.83014 91.56857 [15] 90.40031 87.88021 79.74845 77.93686 85.82412 79.53896 > colMin(tmp5,na.rm=TRUE) [1] 67.87548 59.04390 61.24345 58.17675 58.00938 55.21905 64.49520 61.70879 [9] 60.19961 60.64187 56.51519 53.31087 61.53206 63.56130 54.68836 54.02866 [17] 58.05969 58.96696 53.14931 58.46178 > > # now set an entire row to NA > > tmp5[which.row,] <- NA > rowMeans(tmp5,na.rm=TRUE) [1] 92.98691 67.78008 72.63330 72.24996 71.63013 72.99922 71.45137 NaN [9] 71.32529 71.28418 > rowSums(tmp5,na.rm=TRUE) [1] 1859.738 1355.602 1452.666 1444.999 1432.603 1459.984 1429.027 0.000 [9] 1426.506 1425.684 > rowVars(tmp5,na.rm=TRUE) [1] 7828.80382 104.69144 107.07257 98.90524 63.92300 77.92022 [7] 51.47565 NA 101.89368 120.66627 > rowSd(tmp5,na.rm=TRUE) [1] 88.480528 10.231884 10.347588 9.945111 7.995186 8.827243 7.174653 [8] NA 10.094240 10.984820 > rowMax(tmp5,na.rm=TRUE) [1] 468.09330 86.90565 91.83014 93.25406 89.31012 89.43178 81.10963 [8] NA 93.30021 91.78454 > rowMin(tmp5,na.rm=TRUE) [1] 58.17675 53.31087 54.02866 53.14931 58.30708 59.00669 58.96696 NA [9] 58.05969 57.48683 > > > # now set an entire col to NA > > > tmp5[,which.col] <- NA > colMeans(tmp5,na.rm=TRUE) [1] 117.96712 70.52866 73.56784 72.24579 70.07529 72.00106 75.12878 [8] 71.39725 73.14956 75.00833 73.11172 70.26447 NaN 74.77210 [15] 72.21084 68.29610 67.97982 66.95674 68.58474 68.90417 > colSums(tmp5,na.rm=TRUE) [1] 1061.7040 634.7580 662.1105 650.2121 630.6776 648.0095 676.1590 [8] 642.5752 658.3461 675.0750 658.0055 632.3802 0.0000 672.9489 [15] 649.8976 614.6649 611.8184 602.6107 617.2627 620.1375 > colVars(tmp5,na.rm=TRUE) [1] 17249.86727 93.67825 74.21041 107.67228 72.12470 87.78685 [7] 63.90419 71.32909 101.96465 71.80000 152.57393 111.98539 [13] NA 63.20155 131.09013 143.14052 60.28778 44.67277 [19] 84.27548 77.49560 > colSd(tmp5,na.rm=TRUE) [1] 131.338750 9.678752 8.614546 10.376526 8.492626 9.369464 [7] 7.994010 8.445655 10.097755 8.473488 12.352082 10.582315 [13] NA 7.949940 11.449460 11.964135 7.764521 6.683769 [19] 9.180168 8.803158 > colMax(tmp5,na.rm=TRUE) [1] 468.09330 89.43178 91.78454 89.31012 83.85082 86.90565 89.81601 [8] 81.81102 93.25406 86.62727 93.30021 89.01903 -Inf 91.56857 [15] 90.40031 87.88021 79.74845 77.93686 77.83280 79.53896 > colMin(tmp5,na.rm=TRUE) [1] 67.87548 59.04390 61.24345 58.17675 58.00938 55.21905 64.49520 61.70879 [9] 60.19961 60.64187 56.51519 53.31087 Inf 63.56130 54.68836 54.02866 [17] 58.05969 58.96696 53.14931 58.46178 > > > > > 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] 217.6465 341.9605 281.4619 146.3618 277.5658 303.8096 289.5238 264.0056 [9] 123.9243 176.5748 > apply(copymatrix,1,var,na.rm=TRUE) [1] 217.6465 341.9605 281.4619 146.3618 277.5658 303.8096 289.5238 264.0056 [9] 123.9243 176.5748 > > > > 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] -8.526513e-14 -5.684342e-14 -5.684342e-14 2.273737e-13 1.421085e-14 [6] -2.842171e-14 -2.842171e-14 2.842171e-14 -2.842171e-14 0.000000e+00 [11] 1.421085e-14 5.684342e-14 -8.526513e-14 0.000000e+00 5.684342e-14 [16] -1.136868e-13 -1.705303e-13 0.000000e+00 -7.105427e-14 2.842171e-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) + } 7 7 3 14 5 12 9 11 1 5 8 11 1 15 1 6 1 17 8 3 7 17 1 15 5 19 9 8 6 8 4 15 1 5 8 7 6 4 10 6 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.234687 > Min(tmp) [1] -2.253262 > mean(tmp) [1] -0.2053148 > Sum(tmp) [1] -20.53148 > Var(tmp) [1] 1.152774 > > rowMeans(tmp) [1] -0.2053148 > rowSums(tmp) [1] -20.53148 > rowVars(tmp) [1] 1.152774 > rowSd(tmp) [1] 1.073673 > rowMax(tmp) [1] 2.234687 > rowMin(tmp) [1] -2.253262 > > colMeans(tmp) [1] -0.34369610 0.82062638 -2.25326182 0.53697564 -0.17541079 0.82793838 [7] 0.92812363 1.35994448 0.16349032 0.32331053 -0.06942702 0.37396944 [13] -1.14325312 1.39043482 -1.67759569 -0.05101301 -0.13197408 -1.62338720 [19] 0.51246117 -1.57010487 0.46078456 1.38480951 0.04971953 0.90693052 [25] -0.47182490 -1.76421382 2.18916612 -0.78689830 -0.97588972 0.10750585 [31] -0.82704405 -0.24624957 -0.06972869 0.39154503 0.31440401 -0.89140249 [37] -1.97157458 -0.12097574 1.27045539 0.09934196 -1.06039260 -0.41617646 [43] 0.78176689 -0.07629876 0.81745938 -2.00763281 0.80925105 1.44349821 [49] -1.09019073 0.45061323 -1.84110737 -1.18890096 -0.87366713 -0.96439903 [55] 0.20488218 0.81649178 -0.59950150 0.33425786 0.69239097 0.76103001 [61] -0.56987304 0.58332683 -2.00988103 -0.64567618 -0.56578046 0.13406772 [67] 0.29938281 -1.42521474 -0.85684815 2.23468715 1.43919689 -0.58000315 [73] 0.13811085 0.40258549 -0.79372800 0.78099739 -0.42095552 -1.27318700 [79] -1.12112959 1.46760505 0.63807503 -2.04201114 -1.23618689 0.26441236 [85] 0.06835966 -1.37778553 -2.14257576 -1.74371129 -1.28472404 -2.19238024 [91] 0.41066386 -1.16385725 0.22182213 -0.16829300 -0.89425657 -1.86099389 [97] -1.30764803 1.82630057 0.71135760 1.28388420 > colSums(tmp) [1] -0.34369610 0.82062638 -2.25326182 0.53697564 -0.17541079 0.82793838 [7] 0.92812363 1.35994448 0.16349032 0.32331053 -0.06942702 0.37396944 [13] -1.14325312 1.39043482 -1.67759569 -0.05101301 -0.13197408 -1.62338720 [19] 0.51246117 -1.57010487 0.46078456 1.38480951 0.04971953 0.90693052 [25] -0.47182490 -1.76421382 2.18916612 -0.78689830 -0.97588972 0.10750585 [31] -0.82704405 -0.24624957 -0.06972869 0.39154503 0.31440401 -0.89140249 [37] -1.97157458 -0.12097574 1.27045539 0.09934196 -1.06039260 -0.41617646 [43] 0.78176689 -0.07629876 0.81745938 -2.00763281 0.80925105 1.44349821 [49] -1.09019073 0.45061323 -1.84110737 -1.18890096 -0.87366713 -0.96439903 [55] 0.20488218 0.81649178 -0.59950150 0.33425786 0.69239097 0.76103001 [61] -0.56987304 0.58332683 -2.00988103 -0.64567618 -0.56578046 0.13406772 [67] 0.29938281 -1.42521474 -0.85684815 2.23468715 1.43919689 -0.58000315 [73] 0.13811085 0.40258549 -0.79372800 0.78099739 -0.42095552 -1.27318700 [79] -1.12112959 1.46760505 0.63807503 -2.04201114 -1.23618689 0.26441236 [85] 0.06835966 -1.37778553 -2.14257576 -1.74371129 -1.28472404 -2.19238024 [91] 0.41066386 -1.16385725 0.22182213 -0.16829300 -0.89425657 -1.86099389 [97] -1.30764803 1.82630057 0.71135760 1.28388420 > colVars(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colSd(tmp) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > colMax(tmp) [1] -0.34369610 0.82062638 -2.25326182 0.53697564 -0.17541079 0.82793838 [7] 0.92812363 1.35994448 0.16349032 0.32331053 -0.06942702 0.37396944 [13] -1.14325312 1.39043482 -1.67759569 -0.05101301 -0.13197408 -1.62338720 [19] 0.51246117 -1.57010487 0.46078456 1.38480951 0.04971953 0.90693052 [25] -0.47182490 -1.76421382 2.18916612 -0.78689830 -0.97588972 0.10750585 [31] -0.82704405 -0.24624957 -0.06972869 0.39154503 0.31440401 -0.89140249 [37] -1.97157458 -0.12097574 1.27045539 0.09934196 -1.06039260 -0.41617646 [43] 0.78176689 -0.07629876 0.81745938 -2.00763281 0.80925105 1.44349821 [49] -1.09019073 0.45061323 -1.84110737 -1.18890096 -0.87366713 -0.96439903 [55] 0.20488218 0.81649178 -0.59950150 0.33425786 0.69239097 0.76103001 [61] -0.56987304 0.58332683 -2.00988103 -0.64567618 -0.56578046 0.13406772 [67] 0.29938281 -1.42521474 -0.85684815 2.23468715 1.43919689 -0.58000315 [73] 0.13811085 0.40258549 -0.79372800 0.78099739 -0.42095552 -1.27318700 [79] -1.12112959 1.46760505 0.63807503 -2.04201114 -1.23618689 0.26441236 [85] 0.06835966 -1.37778553 -2.14257576 -1.74371129 -1.28472404 -2.19238024 [91] 0.41066386 -1.16385725 0.22182213 -0.16829300 -0.89425657 -1.86099389 [97] -1.30764803 1.82630057 0.71135760 1.28388420 > colMin(tmp) [1] -0.34369610 0.82062638 -2.25326182 0.53697564 -0.17541079 0.82793838 [7] 0.92812363 1.35994448 0.16349032 0.32331053 -0.06942702 0.37396944 [13] -1.14325312 1.39043482 -1.67759569 -0.05101301 -0.13197408 -1.62338720 [19] 0.51246117 -1.57010487 0.46078456 1.38480951 0.04971953 0.90693052 [25] -0.47182490 -1.76421382 2.18916612 -0.78689830 -0.97588972 0.10750585 [31] -0.82704405 -0.24624957 -0.06972869 0.39154503 0.31440401 -0.89140249 [37] -1.97157458 -0.12097574 1.27045539 0.09934196 -1.06039260 -0.41617646 [43] 0.78176689 -0.07629876 0.81745938 -2.00763281 0.80925105 1.44349821 [49] -1.09019073 0.45061323 -1.84110737 -1.18890096 -0.87366713 -0.96439903 [55] 0.20488218 0.81649178 -0.59950150 0.33425786 0.69239097 0.76103001 [61] -0.56987304 0.58332683 -2.00988103 -0.64567618 -0.56578046 0.13406772 [67] 0.29938281 -1.42521474 -0.85684815 2.23468715 1.43919689 -0.58000315 [73] 0.13811085 0.40258549 -0.79372800 0.78099739 -0.42095552 -1.27318700 [79] -1.12112959 1.46760505 0.63807503 -2.04201114 -1.23618689 0.26441236 [85] 0.06835966 -1.37778553 -2.14257576 -1.74371129 -1.28472404 -2.19238024 [91] 0.41066386 -1.16385725 0.22182213 -0.16829300 -0.89425657 -1.86099389 [97] -1.30764803 1.82630057 0.71135760 1.28388420 > colMedians(tmp) [1] -0.34369610 0.82062638 -2.25326182 0.53697564 -0.17541079 0.82793838 [7] 0.92812363 1.35994448 0.16349032 0.32331053 -0.06942702 0.37396944 [13] -1.14325312 1.39043482 -1.67759569 -0.05101301 -0.13197408 -1.62338720 [19] 0.51246117 -1.57010487 0.46078456 1.38480951 0.04971953 0.90693052 [25] -0.47182490 -1.76421382 2.18916612 -0.78689830 -0.97588972 0.10750585 [31] -0.82704405 -0.24624957 -0.06972869 0.39154503 0.31440401 -0.89140249 [37] -1.97157458 -0.12097574 1.27045539 0.09934196 -1.06039260 -0.41617646 [43] 0.78176689 -0.07629876 0.81745938 -2.00763281 0.80925105 1.44349821 [49] -1.09019073 0.45061323 -1.84110737 -1.18890096 -0.87366713 -0.96439903 [55] 0.20488218 0.81649178 -0.59950150 0.33425786 0.69239097 0.76103001 [61] -0.56987304 0.58332683 -2.00988103 -0.64567618 -0.56578046 0.13406772 [67] 0.29938281 -1.42521474 -0.85684815 2.23468715 1.43919689 -0.58000315 [73] 0.13811085 0.40258549 -0.79372800 0.78099739 -0.42095552 -1.27318700 [79] -1.12112959 1.46760505 0.63807503 -2.04201114 -1.23618689 0.26441236 [85] 0.06835966 -1.37778553 -2.14257576 -1.74371129 -1.28472404 -2.19238024 [91] 0.41066386 -1.16385725 0.22182213 -0.16829300 -0.89425657 -1.86099389 [97] -1.30764803 1.82630057 0.71135760 1.28388420 > colRanges(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.3436961 0.8206264 -2.253262 0.5369756 -0.1754108 0.8279384 0.9281236 [2,] -0.3436961 0.8206264 -2.253262 0.5369756 -0.1754108 0.8279384 0.9281236 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.359944 0.1634903 0.3233105 -0.06942702 0.3739694 -1.143253 1.390435 [2,] 1.359944 0.1634903 0.3233105 -0.06942702 0.3739694 -1.143253 1.390435 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -1.677596 -0.05101301 -0.1319741 -1.623387 0.5124612 -1.570105 0.4607846 [2,] -1.677596 -0.05101301 -0.1319741 -1.623387 0.5124612 -1.570105 0.4607846 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] 1.38481 0.04971953 0.9069305 -0.4718249 -1.764214 2.189166 -0.7868983 [2,] 1.38481 0.04971953 0.9069305 -0.4718249 -1.764214 2.189166 -0.7868983 [,29] [,30] [,31] [,32] [,33] [,34] [,35] [1,] -0.9758897 0.1075059 -0.827044 -0.2462496 -0.06972869 0.391545 0.314404 [2,] -0.9758897 0.1075059 -0.827044 -0.2462496 -0.06972869 0.391545 0.314404 [,36] [,37] [,38] [,39] [,40] [,41] [,42] [1,] -0.8914025 -1.971575 -0.1209757 1.270455 0.09934196 -1.060393 -0.4161765 [2,] -0.8914025 -1.971575 -0.1209757 1.270455 0.09934196 -1.060393 -0.4161765 [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 0.7817669 -0.07629876 0.8174594 -2.007633 0.8092511 1.443498 -1.090191 [2,] 0.7817669 -0.07629876 0.8174594 -2.007633 0.8092511 1.443498 -1.090191 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [1,] 0.4506132 -1.841107 -1.188901 -0.8736671 -0.964399 0.2048822 0.8164918 [2,] 0.4506132 -1.841107 -1.188901 -0.8736671 -0.964399 0.2048822 0.8164918 [,57] [,58] [,59] [,60] [,61] [,62] [,63] [1,] -0.5995015 0.3342579 0.692391 0.76103 -0.569873 0.5833268 -2.009881 [2,] -0.5995015 0.3342579 0.692391 0.76103 -0.569873 0.5833268 -2.009881 [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] -0.6456762 -0.5657805 0.1340677 0.2993828 -1.425215 -0.8568481 2.234687 [2,] -0.6456762 -0.5657805 0.1340677 0.2993828 -1.425215 -0.8568481 2.234687 [,71] [,72] [,73] [,74] [,75] [,76] [,77] [1,] 1.439197 -0.5800032 0.1381109 0.4025855 -0.793728 0.7809974 -0.4209555 [2,] 1.439197 -0.5800032 0.1381109 0.4025855 -0.793728 0.7809974 -0.4209555 [,78] [,79] [,80] [,81] [,82] [,83] [,84] [1,] -1.273187 -1.12113 1.467605 0.638075 -2.042011 -1.236187 0.2644124 [2,] -1.273187 -1.12113 1.467605 0.638075 -2.042011 -1.236187 0.2644124 [,85] [,86] [,87] [,88] [,89] [,90] [,91] [1,] 0.06835966 -1.377786 -2.142576 -1.743711 -1.284724 -2.19238 0.4106639 [2,] 0.06835966 -1.377786 -2.142576 -1.743711 -1.284724 -2.19238 0.4106639 [,92] [,93] [,94] [,95] [,96] [,97] [,98] [1,] -1.163857 0.2218221 -0.168293 -0.8942566 -1.860994 -1.307648 1.826301 [2,] -1.163857 0.2218221 -0.168293 -0.8942566 -1.860994 -1.307648 1.826301 [,99] [,100] [1,] 0.7113576 1.283884 [2,] 0.7113576 1.283884 > > > Max(tmp2) [1] 3.402067 > Min(tmp2) [1] -2.302161 > mean(tmp2) [1] 0.09865273 > Sum(tmp2) [1] 9.865273 > Var(tmp2) [1] 1.122648 > > rowMeans(tmp2) [1] 0.777477918 0.305460553 -0.340067692 1.044725907 0.167114438 [6] -1.023632034 1.613786291 1.256844187 1.248654481 0.997806488 [11] 1.011296170 0.199267161 -0.207448825 1.214307846 2.178994612 [16] 0.101324517 0.388382722 3.402066774 0.267135213 0.034259797 [21] -0.681671301 -0.361162395 0.841863412 -0.272084200 -1.216539224 [26] -0.168000690 -0.034924192 -0.562093619 1.349592800 1.049349143 [31] -0.969160586 0.400111970 -2.302161316 -0.948795455 1.215372135 [36] -1.958157090 0.253818308 1.773926322 1.055488844 0.325185948 [41] -1.240720949 0.025284080 1.197498884 0.029549558 0.918233010 [46] -1.136902376 -0.176975826 0.081823393 0.241020810 0.565760004 [51] -1.100138492 -1.645292224 0.788735666 0.094106453 -0.454933233 [56] -1.318601178 -0.187805196 0.663309189 0.440492975 1.730157431 [61] -1.608530188 2.791879288 -1.030648902 0.955307448 1.121134128 [66] -0.781137164 -1.409469305 -0.907839568 -0.404431255 0.990975991 [71] 0.465419341 -1.443384879 -1.422814016 0.288693360 -0.858338588 [76] -1.971239981 0.720330979 -0.035620319 0.630430640 0.282431730 [81] 0.000636033 -0.231174245 -1.294965014 0.514613257 -0.078884675 [86] 1.005543557 0.865375577 -1.139106190 1.268724685 0.208829808 [91] -0.551372989 0.514754447 -0.983432503 1.502714191 -0.255991968 [96] -1.893982243 0.920214200 0.554667111 -0.827503700 0.450147750 > rowSums(tmp2) [1] 0.777477918 0.305460553 -0.340067692 1.044725907 0.167114438 [6] -1.023632034 1.613786291 1.256844187 1.248654481 0.997806488 [11] 1.011296170 0.199267161 -0.207448825 1.214307846 2.178994612 [16] 0.101324517 0.388382722 3.402066774 0.267135213 0.034259797 [21] -0.681671301 -0.361162395 0.841863412 -0.272084200 -1.216539224 [26] -0.168000690 -0.034924192 -0.562093619 1.349592800 1.049349143 [31] -0.969160586 0.400111970 -2.302161316 -0.948795455 1.215372135 [36] -1.958157090 0.253818308 1.773926322 1.055488844 0.325185948 [41] -1.240720949 0.025284080 1.197498884 0.029549558 0.918233010 [46] -1.136902376 -0.176975826 0.081823393 0.241020810 0.565760004 [51] -1.100138492 -1.645292224 0.788735666 0.094106453 -0.454933233 [56] -1.318601178 -0.187805196 0.663309189 0.440492975 1.730157431 [61] -1.608530188 2.791879288 -1.030648902 0.955307448 1.121134128 [66] -0.781137164 -1.409469305 -0.907839568 -0.404431255 0.990975991 [71] 0.465419341 -1.443384879 -1.422814016 0.288693360 -0.858338588 [76] -1.971239981 0.720330979 -0.035620319 0.630430640 0.282431730 [81] 0.000636033 -0.231174245 -1.294965014 0.514613257 -0.078884675 [86] 1.005543557 0.865375577 -1.139106190 1.268724685 0.208829808 [91] -0.551372989 0.514754447 -0.983432503 1.502714191 -0.255991968 [96] -1.893982243 0.920214200 0.554667111 -0.827503700 0.450147750 > rowVars(tmp2) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > rowSd(tmp2) [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > rowMax(tmp2) [1] 0.777477918 0.305460553 -0.340067692 1.044725907 0.167114438 [6] -1.023632034 1.613786291 1.256844187 1.248654481 0.997806488 [11] 1.011296170 0.199267161 -0.207448825 1.214307846 2.178994612 [16] 0.101324517 0.388382722 3.402066774 0.267135213 0.034259797 [21] -0.681671301 -0.361162395 0.841863412 -0.272084200 -1.216539224 [26] -0.168000690 -0.034924192 -0.562093619 1.349592800 1.049349143 [31] -0.969160586 0.400111970 -2.302161316 -0.948795455 1.215372135 [36] -1.958157090 0.253818308 1.773926322 1.055488844 0.325185948 [41] -1.240720949 0.025284080 1.197498884 0.029549558 0.918233010 [46] -1.136902376 -0.176975826 0.081823393 0.241020810 0.565760004 [51] -1.100138492 -1.645292224 0.788735666 0.094106453 -0.454933233 [56] -1.318601178 -0.187805196 0.663309189 0.440492975 1.730157431 [61] -1.608530188 2.791879288 -1.030648902 0.955307448 1.121134128 [66] -0.781137164 -1.409469305 -0.907839568 -0.404431255 0.990975991 [71] 0.465419341 -1.443384879 -1.422814016 0.288693360 -0.858338588 [76] -1.971239981 0.720330979 -0.035620319 0.630430640 0.282431730 [81] 0.000636033 -0.231174245 -1.294965014 0.514613257 -0.078884675 [86] 1.005543557 0.865375577 -1.139106190 1.268724685 0.208829808 [91] -0.551372989 0.514754447 -0.983432503 1.502714191 -0.255991968 [96] -1.893982243 0.920214200 0.554667111 -0.827503700 0.450147750 > rowMin(tmp2) [1] 0.777477918 0.305460553 -0.340067692 1.044725907 0.167114438 [6] -1.023632034 1.613786291 1.256844187 1.248654481 0.997806488 [11] 1.011296170 0.199267161 -0.207448825 1.214307846 2.178994612 [16] 0.101324517 0.388382722 3.402066774 0.267135213 0.034259797 [21] -0.681671301 -0.361162395 0.841863412 -0.272084200 -1.216539224 [26] -0.168000690 -0.034924192 -0.562093619 1.349592800 1.049349143 [31] -0.969160586 0.400111970 -2.302161316 -0.948795455 1.215372135 [36] -1.958157090 0.253818308 1.773926322 1.055488844 0.325185948 [41] -1.240720949 0.025284080 1.197498884 0.029549558 0.918233010 [46] -1.136902376 -0.176975826 0.081823393 0.241020810 0.565760004 [51] -1.100138492 -1.645292224 0.788735666 0.094106453 -0.454933233 [56] -1.318601178 -0.187805196 0.663309189 0.440492975 1.730157431 [61] -1.608530188 2.791879288 -1.030648902 0.955307448 1.121134128 [66] -0.781137164 -1.409469305 -0.907839568 -0.404431255 0.990975991 [71] 0.465419341 -1.443384879 -1.422814016 0.288693360 -0.858338588 [76] -1.971239981 0.720330979 -0.035620319 0.630430640 0.282431730 [81] 0.000636033 -0.231174245 -1.294965014 0.514613257 -0.078884675 [86] 1.005543557 0.865375577 -1.139106190 1.268724685 0.208829808 [91] -0.551372989 0.514754447 -0.983432503 1.502714191 -0.255991968 [96] -1.893982243 0.920214200 0.554667111 -0.827503700 0.450147750 > > colMeans(tmp2) [1] 0.09865273 > colSums(tmp2) [1] 9.865273 > colVars(tmp2) [1] 1.122648 > colSd(tmp2) [1] 1.059551 > colMax(tmp2) [1] 3.402067 > colMin(tmp2) [1] -2.302161 > colMedians(tmp2) [1] 0.1831908 > colRanges(tmp2) [,1] [1,] -2.302161 [2,] 3.402067 > > 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.2997713 -5.8299800 -2.9228395 1.7611912 2.0085858 -3.1373679 [7] 1.0661646 1.4237231 0.6926879 -0.4240550 > colApply(tmp,quantile)[,1] [,1] [1,] -2.1704157 [2,] -0.9378761 [3,] -0.3547062 [4,] 0.6590374 [5,] 2.7922607 > > rowApply(tmp,sum) [1] -1.038768 2.123896 -6.183978 -1.435455 4.329763 -2.579044 -2.655952 [8] 2.681269 -4.903958 4.000567 > rowApply(tmp,rank)[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 10 8 7 2 2 7 10 1 4 [2,] 4 2 1 1 5 3 5 1 9 9 [3,] 3 1 9 6 6 1 9 3 6 5 [4,] 10 9 7 3 4 9 3 5 4 3 [5,] 2 6 4 9 8 5 6 6 8 8 [6,] 5 7 10 2 1 4 1 4 7 7 [7,] 7 8 2 10 9 7 4 8 10 1 [8,] 9 3 5 5 7 8 10 9 2 6 [9,] 6 4 3 8 3 10 8 7 3 10 [10,] 8 5 6 4 10 6 2 2 5 2 > > tmp <- createBufferedMatrix(5,20) > > tmp[1:5,1:20] <- rnorm(100) > colApply(tmp,sum) [1] 0.1413776 3.5768993 -0.5761491 0.3879410 3.4801937 -1.7147033 [7] -2.1477657 3.4374288 -2.9257527 3.1602799 -0.1499903 3.9534118 [13] 0.2529638 -1.2398714 2.4141555 -0.6800716 -2.0527455 -1.2377878 [19] -2.1942154 -1.0179890 > colApply(tmp,quantile)[,1] [,1] [1,] -0.6073048 [2,] -0.4160148 [3,] -0.2534448 [4,] 0.4376375 [5,] 0.9805046 > > rowApply(tmp,sum) [1] 6.060629 1.914245 4.849306 -2.819164 -5.137406 > rowApply(tmp,rank)[1:5,] [,1] [,2] [,3] [,4] [,5] [1,] 14 6 11 6 10 [2,] 15 17 1 18 20 [3,] 8 5 5 16 16 [4,] 1 19 20 13 1 [5,] 11 8 13 20 14 > > > as.matrix(tmp) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.9805046 1.0090163 -0.1516981 -1.2264363 0.2536423 0.1699044 [2,] -0.4160148 0.8749379 -0.7721341 1.5960778 -0.3282901 0.1150315 [3,] 0.4376375 -1.9055813 -0.7209467 2.6065231 0.5014654 0.3983218 [4,] -0.6073048 1.2316579 0.7873426 -0.0894475 2.9098744 -0.7228345 [5,] -0.2534448 2.3668685 0.2812871 -2.4987760 0.1435016 -1.6751265 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1.6945984 1.6855898 -1.0625912 1.0718493 -0.97759170 3.3871115 [2,] -0.8703873 1.7162605 -0.3617942 1.0747762 -0.26492670 0.8424550 [3,] -1.2282423 -0.6209697 -1.2930801 1.0431992 0.02390818 1.3741513 [4,] -1.1863211 -0.5731192 -0.3091737 -0.5085918 1.01456651 -0.3437248 [5,] -0.5574134 1.2296675 0.1008865 0.4790471 0.05405342 -1.3065811 [,13] [,14] [,15] [,16] [,17] [,18] [1,] 0.6558868 -0.55585257 1.1140288 -0.47462736 -0.89407977 0.2788661 [2,] 0.4940845 0.66309906 -0.9195931 0.58605207 -1.20362012 0.7175900 [3,] 1.6273353 -0.06340602 1.2076069 0.06100429 0.79006344 -1.0092214 [4,] -2.0697196 -0.07380948 1.8182214 -0.71806990 -0.02487904 -0.5573480 [5,] -0.4546231 -1.20990238 -0.8061085 -0.13443073 -0.72023005 -0.6676745 [,19] [,20] [1,] -1.0546109 0.1571184 [2,] -0.1222614 -1.5070977 [3,] 1.1308551 0.4886821 [4,] -2.2990930 -0.4973908 [5,] 0.1508948 0.3406990 > > > 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 0.2587784 0.5452848 -1.421023 -1.555198 0.5672333 -0.7864644 -2.505654 col8 col9 col10 col11 col12 col13 col14 row1 -0.1486289 -0.1405021 1.083724 0.3237457 -0.4995653 -0.7896091 -0.1340767 col15 col16 col17 col18 col19 col20 row1 -1.219029 -0.7586999 -0.6369081 0.1992493 -0.7301731 0.2055845 > tmp[,"col10"] col10 row1 1.0837243 row2 -0.5276619 row3 1.6191631 row4 -0.1889097 row5 -1.6208226 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 row1 0.2587784 0.54528481 -1.4210225 -1.5551983 0.5672333 -0.7864644 row5 -0.2015092 -0.02633751 -0.7779249 -0.2961103 -0.5945127 0.1881265 col7 col8 col9 col10 col11 col12 row1 -2.5056543 -0.1486289 -0.1405021 1.083724 0.32374568 -0.4995653 row5 -0.3781356 -1.9247611 0.1119116 -1.620823 0.02890972 1.2646574 col13 col14 col15 col16 col17 col18 row1 -0.7896091 -0.1340767 -1.2190288 -0.7586999 -0.6369081 0.1992493 row5 0.3381698 -0.5249841 -0.3863585 -0.5604740 1.7979950 -0.6768414 col19 col20 row1 -0.7301731 0.2055845 row5 0.1037828 -1.9244549 > tmp[,c("col6","col20")] col6 col20 row1 -0.7864644 0.20558446 row2 -1.7403148 -0.08720521 row3 -1.0147579 0.81930335 row4 -0.8406130 0.02828449 row5 0.1881265 -1.92445491 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 -0.7864644 0.2055845 row5 0.1881265 -1.9244549 > > > > > tmp["row1",] <- rnorm(20,mean=10) > tmp[,"col10"] <- rnorm(5,mean=30) > tmp[c("row1","row5"),] <- rnorm(40,mean=50) > tmp[,c("col6","col20")] <- rnorm(10,mean=75) > tmp[c("row1","row5"),c("col6","col20")] <- rnorm(4,mean=105) > > tmp["row1",] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.72665 50.3751 50.38828 49.42184 49.73785 106.0595 48.06664 51.27251 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.63016 49.64884 49.06655 49.41132 50.11126 49.56229 48.40718 49.21965 col17 col18 col19 col20 row1 49.16197 51.28667 49.01251 104.7772 > tmp[,"col10"] col10 row1 49.64884 row2 29.98863 row3 29.85567 row4 29.80326 row5 49.38935 > tmp[c("row1","row5"),] col1 col2 col3 col4 col5 col6 col7 col8 row1 49.72665 50.37510 50.38828 49.42184 49.73785 106.0595 48.06664 51.27251 row5 49.31077 50.67859 50.36758 49.66189 48.93484 103.8204 51.61794 50.84592 col9 col10 col11 col12 col13 col14 col15 col16 row1 51.63016 49.64884 49.06655 49.41132 50.11126 49.56229 48.40718 49.21965 row5 50.69810 49.38935 51.30461 51.25822 50.09314 50.65519 48.98104 50.28091 col17 col18 col19 col20 row1 49.16197 51.28667 49.01251 104.7772 row5 51.61773 48.75683 51.34165 104.8108 > tmp[,c("col6","col20")] col6 col20 row1 106.05952 104.77722 row2 73.33456 75.62792 row3 74.29734 76.82140 row4 73.92677 75.69032 row5 103.82036 104.81080 > tmp[c("row1","row5"),c("col6","col20")] col6 col20 row1 106.0595 104.7772 row5 103.8204 104.8108 > > > subBufferedMatrix(tmp,c("row1","row5"),c("col6","col20"))[1:2,1:2] col6 col20 row1 106.0595 104.7772 row5 103.8204 104.8108 > > > > > > tmp <- createBufferedMatrix(5,20) > tmp[1:5,1:20] <- rnorm(100) > colnames(tmp) <- colnames(tmp,do.NULL=FALSE) > > tmp[,"col13"] col13 [1,] -0.05666882 [2,] -0.20770121 [3,] 1.61700333 [4,] -0.64969094 [5,] -0.54657239 > tmp[,c("col17","col7")] col17 col7 [1,] 1.5247793 0.4915633 [2,] -2.6277496 -0.1395887 [3,] 0.3238231 0.8187042 [4,] 1.8762096 -1.4037119 [5,] 0.2020584 1.2069896 > > subBufferedMatrix(tmp,,c("col6","col20"))[,1:2] col6 col20 [1,] 0.6924659 0.69982099 [2,] 0.3683615 0.79667221 [3,] -0.4893673 0.60579367 [4,] 0.3826582 0.86767568 [5,] -1.6533144 0.03029961 > subBufferedMatrix(tmp,1,c("col6"))[,1] col1 [1,] 0.6924659 > subBufferedMatrix(tmp,1:2,c("col6"))[,1] col6 [1,] 0.6924659 [2,] 0.3683615 > > > > 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.1390237 1.144773 1.506957 0.7210719 -1.0298715 1.42780672 1.042956 row1 -1.2439362 -1.389860 1.749783 0.5092788 0.3607799 0.02708636 0.902009 [,8] [,9] [,10] [,11] [,12] [,13] row3 0.22860583 -0.9921267 -1.093054099 1.4003754 -2.3904130 0.9499032 row1 -0.04756115 0.1658965 0.003634545 0.6430462 0.1224428 3.1085049 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row3 0.533803 -0.2691851 1.357226 -2.257808 0.331161 -1.204202 -0.7262049 row1 -1.023882 -0.2739830 1.733020 2.806794 -1.406515 -1.364255 -2.3270107 > subBufferedMatrix(tmp,c("row2"),1:10)[,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] row2 -1.223679 -0.4461802 1.08441 1.662838 0.2594958 -1.726922 1.357442 [,8] [,9] [,10] row2 0.09757626 -0.7193015 -0.9431285 > subBufferedMatrix(tmp,c("row5"),1:20)[,1:20] [,1] [,2] [,3] [,4] [,5] [,6] row5 -0.01329525 -1.276694 -0.00707777 0.9790878 0.947609 -0.3471844 [,7] [,8] [,9] [,10] [,11] [,12] [,13] row5 -0.09293347 -1.33982 0.8377313 -1.275294 -1.019455 0.658767 0.5562074 [,14] [,15] [,16] [,17] [,18] [,19] [,20] row5 -1.783743 -0.5932127 -0.4136895 -1.174154 -0.5456142 -1.216683 -0.556451 > > > 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: 0x0000018c194fd9b0> > is.ReadOnlyMode(tmp) [1] TRUE > > filenames(tmp) [1] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c44f81845" [2] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c48903c6" [3] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c4dd01ce3" [4] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c78661b6" [5] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c5fc96edb" [6] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c5838119" [7] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c1d7a7176" [8] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c6f9866a4" [9] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c4e15f32" [10] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2cdfe11e2" [11] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c7147e15" [12] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c52291429" [13] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c4a607e41" [14] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c3d8113cd" [15] "E:/biocbuild/bbs-3.21-bioc/meat/BufferedMatrix.Rcheck/tests\\BM1fa2c26b476c9" > > > ### 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: 0x0000018c1b6ff830> > MoveStorageDirectory(tmp,getwd(),full.path=TRUE) <pointer: 0x0000018c1b6ff830> Warning message: In dir.create(new.directory) : 'E:\biocbuild\bbs-3.21-bioc\meat\BufferedMatrix.Rcheck\tests' already exists > > > RowMode(tmp) <pointer: 0x0000018c1b6ff830> > rowMedians(tmp) [1] -0.3611360478 0.4148669010 -0.1273972550 0.1843994315 -0.0610179191 [6] -0.0194477235 -0.2211458280 -0.0464593537 0.1659121872 0.0153535393 [11] 0.2310390810 0.5178550159 0.1154784651 0.5774087090 -0.0792999783 [16] -0.5314688432 0.1176795870 0.2023799073 0.0352808524 0.0374071393 [21] -0.3444230320 -0.3822258993 -0.1939072524 0.4414453277 0.1567437107 [26] -0.6376546395 0.2419733765 0.2377445990 -0.0591012916 -0.3142970496 [31] -0.0762766607 -0.2771824741 0.1566537036 -0.5278528557 -0.1117253592 [36] 0.2173506922 -0.2665435847 -0.2401650314 -0.3959285557 -0.2410963061 [41] -0.0598694430 -0.1267103606 0.4991346200 -0.6682407678 0.0355037913 [46] 0.0129008019 0.2804347976 -0.0005056178 -0.0846744412 0.2122416698 [51] -0.0719754514 0.8544411911 -0.1594605355 -0.2064858973 0.3263940337 [56] 0.4371242885 -0.1179358406 -0.2728099442 -0.1584101052 0.2207916987 [61] 0.0292080889 0.0964659585 -0.2533625092 0.0419195392 0.1749135948 [66] 0.1470228723 -0.1736015796 -0.5128217519 -0.6153885952 0.0760517839 [71] -0.2612146645 -0.2769265362 -0.4430145958 0.2784744709 0.1530505407 [76] -0.1570712961 -0.1484548454 0.2371427778 -0.1883494755 0.0080070681 [81] 0.2227992032 0.1192266411 0.5150115904 -0.2002367999 0.1313920886 [86] -0.0412908282 0.2323814750 -0.9122887102 -0.2469742053 -0.4815402577 [91] -0.0386021671 -0.1083534228 0.0891864954 -0.0849049423 -0.2414922329 [96] 0.8990572654 -0.5395305392 -0.0939950641 -0.2686776696 -0.0599891682 [101] -0.1794955379 0.4905042497 -0.0282620600 0.3122684130 -0.2752563190 [106] 0.3927836782 -0.3706555872 -0.1714287376 0.5498718332 -0.0471171581 [111] -0.4312591994 -0.2480840741 -0.2257517803 0.6572041116 -0.0398409388 [116] 0.2015277182 -0.6068864112 0.0329167407 -0.1630618588 -0.3286539632 [121] 0.3163906069 0.5110866784 0.0534555304 0.2832545438 -0.4058203000 [126] -0.0234881819 0.2057089662 0.1994892520 -0.2117705174 0.4084160850 [131] -0.4610772320 -0.0048327320 0.1928829937 -0.1486227203 0.2291177243 [136] -0.0224950720 0.1443826642 0.2744926258 -0.2174025944 0.4603480249 [141] -0.1622020290 0.2933583953 0.3505857357 0.2388077677 0.2190545030 [146] -0.0486869195 -0.1754135256 0.5413576736 0.3796955116 0.1170179164 [151] -0.3755039422 0.1523947261 0.2118752973 0.3461618709 -0.4192314059 [156] -0.0499012416 -0.2320015143 -0.0184551770 -0.0192152706 -0.1559657021 [161] 0.4860982882 0.2262538495 -0.1320194270 -0.1986251307 -0.2005921251 [166] 0.0120420183 -0.3924284172 -0.5218691394 0.6541453230 0.0937889065 [171] 0.2946206957 -0.0550108664 0.2971139234 -0.1603599465 0.1394575681 [176] -0.1523073424 -0.0658916463 0.0122118144 0.0727415372 -0.0293468475 [181] -0.2504289083 -0.0592893203 0.2217837254 0.2717008849 -0.3353196512 [186] 0.0424089454 -0.3218547930 0.1819784707 -0.3449823664 -0.1383626369 [191] 0.7066605481 0.4778090490 -0.1532624120 -0.1314008115 -0.1341824431 [196] 0.5209650853 0.2342580546 0.0418194727 -0.0521464289 -0.2275383476 [201] -0.3660918260 -0.0085413147 0.1702456936 -0.2051886094 -0.1961629431 [206] 0.0888412982 -0.6613643124 0.6198074333 -0.5263278899 0.2598461346 [211] 0.1561257065 -0.4523606670 0.1910315730 0.3102098318 0.1882556377 [216] 0.5186884485 0.0738731326 0.1238327568 0.1675847165 -0.8119286661 [221] -0.7617037341 -0.2609262037 0.3075277342 0.2893733703 -0.2411643377 [226] 0.3425465309 -0.2200360682 0.9374648584 0.5213084940 -0.3293928847 > > proc.time() user system elapsed 3.18 14.93 161.92
BufferedMatrix.Rcheck/tests/rawCalltesting.Rout
R Under development (unstable) (2024-10-26 r87273 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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: 0x000001e9562ffbf0> > .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: 0x000001e9562ffbf0> > .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: 0x000001e9562ffbf0> > .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: 0x000001e9562ffbf0> > 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: 0x000001e9562ffb90> > .Call("R_bm_AddColumn",P) <pointer: 0x000001e9562ffb90> > .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: 0x000001e9562ffb90> > .Call("R_bm_AddColumn",P) <pointer: 0x000001e9562ffb90> > .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: 0x000001e9562ffb90> > 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: 0x000001e9562ff6b0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001e9562ff6b0> > .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: 0x000001e9562ff6b0> > > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000001e9562ff6b0> > .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: 0x000001e9562ff6b0> > > .Call("R_bm_RowMode",P) <pointer: 0x000001e9562ff6b0> > .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: 0x000001e9562ff6b0> > > .Call("R_bm_ColMode",P) <pointer: 0x000001e9562ff6b0> > .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: 0x000001e9562ff6b0> > 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: 0x000001e9562ffef0> > .Call("R_bm_SetPrefix",P,"BufferedMatrixFile") <pointer: 0x000001e9562ffef0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001e9562ffef0> > .Call("R_bm_AddColumn",P) <pointer: 0x000001e9562ffef0> > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile136e44d34552" "BufferedMatrixFile136e4d053cf7" > rm(P) > dir(pattern="BufferedMatrixFile") [1] "BufferedMatrixFile136e44d34552" "BufferedMatrixFile136e4d053cf7" > > > P <- .Call("R_bm_Create",prefix,directory,1,1) > .Call("R_bm_setRows",P,10) [1] TRUE > .Call("R_bm_AddColumn",P) <pointer: 0x000001e9580ffb90> > .Call("R_bm_AddColumn",P) <pointer: 0x000001e9580ffb90> > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x000001e9580ffb90> > .Call("R_bm_isReadOnlyMode",P) [1] TRUE > .Call("R_bm_ReadOnlyModeToggle",P) <pointer: 0x000001e9580ffb90> > .Call("R_bm_isReadOnlyMode",P) [1] FALSE > .Call("R_bm_isRowMode",P) [1] FALSE > .Call("R_bm_RowMode",P) <pointer: 0x000001e9580ffb90> > .Call("R_bm_isRowMode",P) [1] TRUE > .Call("R_bm_ColMode",P) <pointer: 0x000001e9580ffb90> > .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: 0x000001e9580ff770> > .Call("R_bm_AddColumn",P) <pointer: 0x000001e9580ff770> > > .Call("R_bm_getSize",P) [1] 10 2 > .Call("R_bm_getBufferSize",P) [1] 1 1 > .Call("R_bm_ResizeBuffer",P,5,5) <pointer: 0x000001e9580ff770> > > .Call("R_bm_getBufferSize",P) [1] 5 5 > .Call("R_bm_ResizeBuffer",P,-1,5) <pointer: 0x000001e9580ff770> > 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: 0x000001e9580ff830> > .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: 0x000001e9580ff830> > rm(P) > > proc.time() user system elapsed 0.29 0.14 0.71
BufferedMatrix.Rcheck/tests/Rcodetesting.Rout
R Under development (unstable) (2024-10-26 r87273 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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.35 0.06 0.42